summary refs log tree commit diff stats
path: root/lib/pure
Commit message (Collapse)AuthorAgeFilesLines
* Peg captures get stack-like behavior (#18369)gemath2021-06-281-31/+59
| | | | | * Implements reverse capture indexing. * Now works for modified backrefs too. * Changed reverse indexing syntax prefix for back-references to '$^'.
* Add sink annotation to option some() (#18358)tomc19982021-06-251-2/+2
|
* couple tiny typo fixes (#18344)Smooth Operator2021-06-241-2/+2
|
* [std/times]getTime now uses high resolution API on windows (#17901)flywind2021-06-231-2/+3
|
* OS.nim: style changes (#18331)Andreas Rumpf2021-06-231-30/+28
|
* fixes #17768 [backport:1.4] (#18317)flywind2021-06-211-6/+4
| | | | | * fixes #17768 [backport:1.4] * tiny
* [std/terminal] improve docs a bit (#18296)flywind2021-06-201-70/+45
| | | | | | | | | | | | | | | | | | | | | | | * Revert "add missing import to asynchttpserver's example" This reverts commit 7ef364a402d3d827f10c893280f8dc7b9ef056f5. * alternative to #18185 * add std/mutexes * cvlose #17696 * Revert "add std/mutexes" This reverts commit 69abc8b64954206da6ffe5fc40a1142b39777762. * tiny * test * improve terminal docs * follow advice
* move {.injectStmt.} to experimental; add a test (#18300)Timothee Cour2021-06-201-2/+0
| | | | | * move {.injectStmt.} to experimental; add a test * undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
* add `typetraits.pointerBase` to return `T` in `ref T|ptr T` (#18293)Timothee Cour2021-06-201-0/+10
| | | | | | | | | * add typetraits.deref to return T in ref T|ptr T * deref => refBase * refBase=>pointerBase * [skip ci] address comment
* strformat.fmt now supports non-literal const strings (#18274)Timothee Cour2021-06-181-25/+38
| | | Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix for #18284 int32 should be int (#18285)Adrian Veith2021-06-171-1/+1
| | | the var exp was typed as int32 - it should be int since frep expects an int
* fixes #17696 (#18276)flywind2021-06-161-2/+5
|
* httpclient.nim Fixes #14794 and an issue where content-header is not set on ↵Mark Pointing2021-06-141-2/+6
| | | | | | | | | | | | | | | | 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>
* Improve httpClient docs on SSL cert verification (#15201)Federico Ceratto2021-06-131-3/+16
| | | | | | | | | * 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>
* #18216 make moveDir work across partitions on windows (#18223)Fröhlich A2021-06-101-19/+25
| | | | | | | * return false if AccessDeniedError in tryMoveFSObject - fixes #18216 * add moveDir & moveFile tests * rename `isMoveDir` parameter to `isDir`
* fixes #18220 (#18227)Andreas Rumpf2021-06-101-1/+1
|
* fixes #18088 (#18209)Andreas Rumpf2021-06-071-1/+1
|
* change mimedb stroe stringtable to orderedtable (#18065)Bung2021-06-071-3/+4
| | | | | | | * change mimedb stroe stringtable to orderedtable * Update lib/pure/mimetypes.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix #7295: use move(result) inside template to avoid copy with --gc:refc ↵Timothee Cour2021-06-041-10/+10
| | | | (#18168)
* workaround bug in sharedtables.withValue to unblock frozen CI on OSX (#18172)flywind2021-06-041-0/+4
|
* Revert "add missing import to asynchttpserver's example" (#18164)flywind2021-06-031-1/+1
| | | This reverts commit 7ef364a402d3d827f10c893280f8dc7b9ef056f5.
* add missing import to asynchttpserver's examplenarimiran2021-06-031-1/+1
|
* reuse algorithm.fill while building SkipTable (#18138)n5m2021-06-031-12/+2
| | | | | | | | | * 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>
* Ref #17697 improve withValue docs (#18154)flywind2021-06-031-31/+50
| | | | | * Ref #17697 improve withValue docs * address comments
* [std/tables] remove unnecessary `do: ` (#18160)flywind2021-06-021-10/+16
|
* [std/hashcommon]improve docs a bit (#18153)flywind2021-06-021-3/+3
| | | | * reduce duplicated deprecated messages
* add `os.getCacheDir` (#18126)Timothee Cour2021-05-311-6/+38
| | | | | | | * add `os.getCacheDir` * fixup * address comments
* improve fast returns of find and rfind (#18127)n5m2021-05-311-1/+3
|
* hashes for refs should be an opt-in feature (#18098)Miran2021-05-301-1/+1
|
* close #16569: deprecated `reversed(a, start, last)` overload, use ↵Timothee Cour2021-05-301-30/+11
| | | | | | | | | toOpenArray instead (#18047) * close #16569: deprecated reversed overload, use toOpenArray instead * [skip ci] change wording in changelog per review * fixup
* Move async example to asynchronous version of proc (#18078)xioren2021-05-241-7/+14
| | | | | | | | | | * improve runnableExamples in std/httpclient * Add synchronous example. * Update lib/pure/httpclient.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* close #18009 parseJson JInt vs JFloat; preserve -0.0 as JFloat to ↵Timothee Cour2021-05-231-1/+1
| | | | distinguish from 0.0 (#18067)
* asyncdispatch+stackTraceOverride: fix premature collection (#18039) ↵Ștefan Talpalaru2021-05-191-14/+32
| | | | | | | | | | | | | | | | | | | | | | [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.
* make strformat part of the prelude (#18046)Andreas Rumpf2021-05-191-1/+1
|
* add sink and lent annotations for xmltree and streams (#18037)Antonis Geralis2021-05-182-16/+16
|
* fix #18007: std/json now serializes nan,inf,-inf as strings instead of ↵Timothee Cour2021-05-161-50/+71
| | | | | | | | | | | | | | | | | invalid json (#18026) * fix #18007: std/json now serializes nan,inf,-inf as raw strings instead of invalid json * fix roundtrip * fix tests * fix changelog * simplify * add runnableExamples * fix typo [skip ci]
* fix #17467 1st call to rand is now non-skewed; allow seed == 0 (#17468)Timothee Cour2021-05-111-57/+36
| | | | | | | | | | | | | | | * fix #17467 1st call to rand is now non-skewed; allow passing 0 as seed * changelog + fallback * document behavior for seed == 0 * address comments * _ * fix tests, disable kdtree * re-enable kdtree with -d:nimLegacyRandomInitRand
* Revert "Fix parseUri to sanitize urls containing ASCII newline or tab ↵Andreas Rumpf2021-05-091-29/+3
| | | | | (#17967)" (#17984) This reverts commit f4dd95f3bee14b69caec63c3be984c4a75f43c8a.
* Fix parseUri to sanitize urls containing ASCII newline or tab (#17967)Beshr Kayali2021-05-091-3/+29
| | | | | | | | | | | | | | | | | | | * Fix parseUri to sanitize urls containing ASCII newline or tab * Fix ups based on review Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Additional fix ups based on review - Avoid unnecessary `removeUnsafeBytesFromUri` call if parseUri is strict - Move some parseUri tests to uri module test file Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com> * Update changelog Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
* merge `initUri()` overloads, improve uri examples (#17970)Timothee Cour2021-05-081-30/+11
| | | | | | | * deprecate `uri.initUri` and improve uri examples * remove `func initUri*()` and make isIpv6 optional * fixup
* ORC: cursor inference bugfix (#17973)Andreas Rumpf2021-05-081-2/+2
| | | | | * fixed a .cursor inference bug * added a test case
* fix #17941: UnusedImport works for var/let/const/type invoked inside a ↵Timothee Cour2021-05-082-2/+2
| | | | | | | generic (#17942) * fix #17941: UnusedImport works for var/let/const/type invoked inside a generic * fixup
* Export sslHandle in `net` and `asyncnet`. (#17573)Ardek Romak2021-05-062-0/+10
|
* parsecsv fix style (#17933)Juan Carlos2021-05-041-67/+64
| | | | | | | * ReSync with Devel * Fix style in parsecsv * Update lib/pure/parsecsv.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* typo: nonexistant => nonexistent (#17918)Timothee Cour2021-05-022-2/+2
| | | | | * typo: nonexistant => nonexistent * fix test (ordering differs because of https://github.com/nim-lang/Nim/issues/17910)
* fix #17911 rawProc for cpp (#17912)Timothee Cour2021-05-011-6/+12
|
* system.nim cleanup some exported constants which should never have be… ↵Andreas Rumpf2021-05-012-1/+3
| | | | | | (#17909) * system.nim cleanup some exported constants which should never have been exported
* [std/base64] uses runnableExamples (#17882)flywind2021-05-011-32/+30
| | | | | | * [std/base64] uses runnableExamples * Update lib/pure/base64.nim Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fix #17905: hash(closure) was not being tested (#17906)Timothee Cour2021-04-301-12/+20
|
* fix #17888: remove undefined behavior for posix.open; fix ↵Timothee Cour2021-04-291-0/+1
| | | | | | | | | | | tempfiles.createTempFile (#17889) * fix #17888: remove undefined behavior for posix.open; fix tempfiles.createTempFile * fix for tests/async/tasyncfile.nim * hide mode for now * add notice regarding stability