Timothee Cour
adba5eb45e
deprecate strutils.delete and add an overload with saner semantics consistent with sequtils.delete; follows #18487 ( #18510 )
2021-07-18 11:10:08 +02:00
Miran
8091545f95
Revert #17398 and #17402 ( #18480 )
...
* Revert "followup #17398 : `getTempDir`, `getConfigDir` now do not have trailing DirSep (#17402 )"
This reverts commit 2356d0603f .
* Revert "fix #17393 getHomeDir and expandTilde should not include trailing `/` (#17398 )"
This reverts commit bebf2ce24a .
* fix test
2021-07-18 11:04:19 +02:00
Andreas Rumpf
96a7f9b31c
deprecate cuchar, don't redefine it ( #18505 )
2021-07-16 15:50:02 +02:00
Timothee Cour
1d6863a789
deprecate sequtils.delete and add an overload with saner semantics consistent with system.delete ( #18487 )
...
* deprecate sequtils.delete and add an overload with saner semantics
* AssertionDefect => IndexDefect
* improve tsequtils
* add tests; use splice in js for optimization
2021-07-15 20:54:07 +02:00
flywind
15fdcd0c4d
workaround #18481 ( #18482 )
2021-07-13 09:22:33 +02:00
flywind
6869157cd1
[docs] improve std/encodings ( #18458 )
...
* [docs] improve std/encodings
* tiny
* shrink
* Apply suggestions from code review
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
* Apply suggestions from code review
* Update lib/pure/encodings.nim
Co-authored-by: Varriount <Varriount@users.noreply.github.com >
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: Varriount <Varriount@users.noreply.github.com >
2021-07-09 07:44:38 +02:00
Ivan Bobev
86f5a56fcd
Fix a bug with starting of asynchronous processes ( #18464 )
...
The asynchronous process completion handler callback should be called
only once. This is achieved by passing `WT_EXECUTEONLYONCE` flag to the
`registerWaitForSingleObject` Windows API procedure.
Related to cheatfate/asynctools#35
2021-07-08 20:26:49 -04:00
Timothee Cour
ffce6de84c
improve rendering of newOSError.additionalInfo ( #18443 )
...
* improve rendering of newOSError.additionalInfo
* fixup
2021-07-07 09:43:16 +02:00
Timothee Cour
b72ecaf639
fix shebangs #! /xxx => #!/xxx ( #18444 )
2021-07-07 06:00:59 +02:00
pyautogui
927a832dde
deprecate std/mersenne ( #18395 )
...
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-07-05 10:12:58 -07:00
Timothee Cour
ffa638ed50
std/net: show addr+port on address already in use error; code-block => runnableExamples ( #18428 )
...
* std/net: show addr+port on address already in use error; code-block => runnableExamples
* var=>let
2021-07-05 14:26:40 +02:00
Antonis Geralis
d1d2498c7b
Add lent annotation to avoid extra copies in sample ( #18404 )
...
* Add lent annotation to avoid extra copies in sample
* Remove lent
* Update random.nim
2021-07-02 23:20:59 +02:00
Timothee Cour
779b4e307b
don't use {.rtl.} for generics, otherwise -d:useNimRtl gives ambiguous identifier nimrtl error ( #18406 )
2021-07-01 11:14:01 +02:00
Endeg
28a4814019
Missing spaces when compiling testament and nim_dbg. ( #18403 )
2021-06-30 10:19:22 -07:00
Elliot Waite
afe5eb569b
Add commas to docs for clarity ( #18398 )
2021-06-29 19:21:30 -07:00
gemath
e720bbdd76
Peg captures get stack-like behavior ( #18369 )
...
* Implements reverse capture indexing.
* Now works for modified backrefs too.
* Changed reverse indexing syntax prefix for back-references to '$^'.
2021-06-28 12:33:20 +02:00
tomc1998
f6bea08eac
Add sink annotation to option some() ( #18358 )
2021-06-25 22:06:24 +02:00
Smooth Operator
6be8a66833
couple tiny typo fixes ( #18344 )
2021-06-24 18:48:57 +01:00
flywind
496bd790e1
[std/times]getTime now uses high resolution API on windows ( #17901 )
2021-06-23 12:33:19 -07:00
Andreas Rumpf
0eee7f5727
OS.nim: style changes ( #18331 )
2021-06-23 14:39:10 +02:00
flywind
2deb7011f5
fixes #17768 [backport:1.4] ( #18317 )
...
* fixes #17768 [backport:1.4]
* tiny
2021-06-21 12:50:47 +02:00
flywind
e45b858f04
[std/terminal] improve docs a bit ( #18296 )
...
* Revert "add missing import to asynchttpserver's example"
This reverts commit 7ef364a402 .
* alternative to #18185
* add std/mutexes
* cvlose #17696
* Revert "add std/mutexes"
This reverts commit 69abc8b649 .
* tiny
* test
* improve terminal docs
* follow advice
2021-06-20 09:57:59 +02:00
Timothee Cour
6030e139b5
move {.injectStmt.} to experimental; add a test ( #18300 )
...
* move {.injectStmt.} to experimental; add a test
* undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
2021-06-20 09:51:07 +02:00
Timothee Cour
128d21be1c
add typetraits.pointerBase to return T in ref T|ptr T ( #18293 )
...
* add typetraits.deref to return T in ref T|ptr T
* deref => refBase
* refBase=>pointerBase
* [skip ci] address comment
2021-06-20 09:49:18 +02:00
Timothee Cour
5600a62229
strformat.fmt now supports non-literal const strings ( #18274 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-18 08:57:51 -07:00
Adrian Veith
5a3456d220
fix for #18284 int32 should be int ( #18285 )
...
the var exp was typed as int32 - it should be int since frep expects an int
2021-06-17 11:23:38 +02:00
flywind
c51680e701
fixes #17696 ( #18276 )
2021-06-16 11:31:20 +02:00
Mark Pointing
e80d7ff0f2
httpclient.nim Fixes #14794 and an issue where content-header is not set on postContent ( #18208 )
...
* Fixed missing newline after bound marker in mulipart post (#14794 ) and a problem where calling postContent with multipart data does not set content-length header.
* Update lib/pure/httpclient.nim
* Added comment outlining the reason for changes to httpclient.nim and added tests to ensure that multipart post has a newline at the end of the body, and that the content-length header is present.
* Fixed typo in comments.
* Removed redundant blank lines in thttpclient_standalone.nim.
Co-authored-by: Mark Pointing <mark@futurepoint.com.au >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-14 19:29:23 +02:00
Federico Ceratto
a266c54921
Improve httpClient docs on SSL cert verification ( #15201 )
...
* Improve httpClient docs on SSL cert verification
Cert verification is enabled by default after CVE-2021-29495
* Update httpclient.nim
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com >
2021-06-13 16:50:04 +01:00
Fröhlich A
7bf0404dd8
#18216 make moveDir work across partitions on windows ( #18223 )
...
* return false if AccessDeniedError in tryMoveFSObject - fixes #18216
* add moveDir & moveFile tests
* rename `isMoveDir` parameter to `isDir`
2021-06-10 14:28:00 +02:00
Andreas Rumpf
0a4858dc59
fixes #18220 ( #18227 )
2021-06-10 09:25:51 +02:00
Andreas Rumpf
21f3b8539a
fixes #18088 ( #18209 )
2021-06-07 17:22:35 +02:00
Bung
429b128632
change mimedb stroe stringtable to orderedtable ( #18065 )
...
* change mimedb stroe stringtable to orderedtable
* Update lib/pure/mimetypes.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-07 13:57:42 +02:00
Timothee Cour
cc7ec5a6a4
fix #7295 : use move(result) inside template to avoid copy with --gc:refc ( #18168 )
2021-06-04 15:32:46 -07:00
flywind
a77360da5b
workaround bug in sharedtables.withValue to unblock frozen CI on OSX ( #18172 )
2021-06-04 12:41:13 -07:00
flywind
d31cbfd167
Revert "add missing import to asynchttpserver's example" ( #18164 )
...
This reverts commit 7ef364a402 .
2021-06-03 16:44:11 +02:00
narimiran
7ef364a402
add missing import to asynchttpserver's example
2021-06-03 15:20:42 +02:00
n5m
9df631a379
reuse algorithm.fill while building SkipTable ( #18138 )
...
* reuse algorithm.fill while building SkipTable
* Update lib/pure/strutils.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-06-03 14:25:52 +02:00
flywind
06960bb9cb
Ref #17697 improve withValue docs ( #18154 )
...
* Ref #17697 improve withValue docs
* address comments
2021-06-03 07:35:24 +02:00
flywind
bbce3d2da9
[std/tables] remove unnecessary do: ( #18160 )
2021-06-02 21:09:04 -07:00
flywind
f27f3f65df
[std/hashcommon]improve docs a bit ( #18153 )
...
* reduce duplicated deprecated messages
2021-06-02 22:59:06 -04:00
Timothee Cour
9559350e34
add os.getCacheDir ( #18126 )
...
* add `os.getCacheDir`
* fixup
* address comments
2021-05-31 22:16:33 +02:00
n5m
064fe18de6
improve fast returns of find and rfind ( #18127 )
2021-05-31 11:20:15 +02:00
Miran
50e98e6efa
hashes for refs should be an opt-in feature ( #18098 )
2021-05-30 23:55:51 +02:00
Timothee Cour
4a7f2c386c
close #16569 : deprecated reversed(a, start, last) overload, use toOpenArray instead ( #18047 )
...
* close #16569 : deprecated reversed overload, use toOpenArray instead
* [skip ci] change wording in changelog per review
* fixup
2021-05-30 22:37:21 +02:00
xioren
478f717377
Move async example to asynchronous version of proc ( #18078 )
...
* improve runnableExamples in std/httpclient
* Add synchronous example.
* Update lib/pure/httpclient.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-05-24 20:56:31 -07:00
Timothee Cour
d217888e56
close #18009 parseJson JInt vs JFloat; preserve -0.0 as JFloat to distinguish from 0.0 ( #18067 )
2021-05-23 23:06:14 +02:00
Ștefan Talpalaru
a1c82c39af
asyncdispatch+stackTraceOverride: fix premature collection ( #18039 ) [backport:1.2]
...
Copying StackTraceEntry instances when nimStackTraceOverride is defined
breaks the link between a cstring field that's supposed to point at
another string field in the same object.
Sometimes, the original object is garbage collected, that memory region
reused for storing other strings, so when the StackTraceEntry copy tries
to use its cstring pointer to construct a traceback message, it accesses
unrelated strings.
This only happens for async tracebacks and this patch prevents that by
making sure we only use the string fields when nimStackTraceOverride is
defined.
Async tracebacks also beautified slightly by getting rid of an extra line
that was supposed to be commented out, along with the corresponding debugging output.
There's also a micro-optimisation to avoid concatenating two strings just
to get their combined length.
2021-05-19 19:19:11 +02:00
Andreas Rumpf
7052503ca8
make strformat part of the prelude ( #18046 )
2021-05-19 19:18:16 +02:00
Antonis Geralis
6e0fe965da
add sink and lent annotations for xmltree and streams ( #18037 )
2021-05-18 08:16:07 +02:00