Commit Graph

4653 Commits

Author SHA1 Message Date
Hugo Granström
32ac1b7c9d fix #15033 (#15034) 2020-07-22 10:30:46 +02:00
Mildred Ki'Lya
503c5e0520 smtp: Fix STARTTLS, request HELO once TLS is established (#15032) 2020-07-22 00:30:33 -04:00
Miran
5fafa2fd5c fix several newline problems (#15028) [backend]
* prevent newlines where they shouldn't be
* 'contentLength' shouldn't be negative
2020-07-21 22:49:08 +02:00
Dominik Picheta
1e3a0ef1e1 [Backport] Fixes callbacks being dropped on Linux/macOS/BSD. (#15012)
Fixes #15003.

This is a serious bug which occurs when data cannot be read/sent
immediately and there are a bunch of other read/write events
pending. What happens is that the new events are dropped which
results in the case of the reported bug resulted in some data not
being sent (!).
2020-07-19 08:41:36 +02:00
Araq
ffe7b3a9bf threadpool.nim: minor code style changes 2020-07-18 21:40:57 +02:00
Andy Davidoff
ae358a0c7a fix docs for nativesocket read/write selects (#15010)
The sockets which *cannot* be _[read from or written to]_ will also be removed from ``readfds``.
2020-07-18 16:39:41 +02:00
Tomohiro
c983466c15 Fix #14906 (#14949)
* Fix #14906 by wrapping outputStream with PipeOutStream

* Fix compile error when ./build_all.sh

* Use PipeOutStream on posix

* Fix compile error when build_all.sh

* Use ptr UncheckedArray

* Replace copyRefObj

* Remove tmp buffer from posPeekData

* Add more tests for outputStream

* Add comments about PipeOutStream.buffer

* Fix bug in posReadLine

* Move implementation of newPipeOutStream to streamwrapper module
2020-07-18 10:41:33 +02:00
Miran
c62513049c fix #14082, don't crash on incorrectly formatted input (#14977) [backport]
* fix #14082, don't crash on incorrectly formatted input

* address code review

* remove duplication
2020-07-17 10:59:53 +02:00
Clyybber
282128ab66 Fix #14994 (#14996)
* Fix #14994

* Revert misplaced "optimization"

* Typo
2020-07-15 23:33:58 +02:00
flywind
c5f64f101b fix #13086 (#14987)
* fix #6608

* minor

* fix

* clean tests

* make testamnet happy

* again

* minor

* fix #13086
2020-07-15 03:46:17 -04:00
Juan Carlos
9465b5db44 Clean up macros (#14959) 2020-07-14 16:44:56 +02:00
Hendrik
9ed0dbfa6e fix index error (#14974)
Co-authored-by: Hendrik Albers <mail@hendrik.dev>
2020-07-14 13:15:22 +02:00
Timothee Cour
e07d661d16 fix #14475; unittest.require now works with nim c; require and check now works with -d:nodejs (#14676)
* fix #14475; make unittest work with -d:nodejs

* fixup

* fixup

* disable inim, delaunay which failed after unittest.require got fixed

* re-enable tests that have been fixed
2020-07-14 13:14:32 +02:00
Miran
f4f21c89e5 asyncftpclient.nim - don't assume a sufficiend line length (#14973) 2020-07-14 02:18:02 -04:00
flywind
9ec9a31f46 Fix #12759 (#14967)
* add testcase for #5926

* fix #12759
2020-07-12 03:31:03 -04:00
flywind
3db6d9ea0c add docs and more tests for debug format strings (#14861)
* add debug format string

* remove try except

* add changelog

* add docs and more tests

* Update lib/pure/strformat.nim

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>

* minor

Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
2020-07-08 22:21:30 +02:00
Miran
3de5296337 remove a condition that table size must be passed as power of 2 (#14926)
* remove a condition that table size must be passed as power of 2
* remove power-of-2 condition from sets and sharedtables
* remove power-of-2 condition from deques
* use 'correctSize' for both branches
* prettify changelog.md and fix typos
* add a changelog entry
* fix double-call of 'right-size'
* fix the same thing in sets.nim
* introduce a new internal proc `slotsNeeded`

Deprecate the public proc `rightSize`, which is not needed anymore.
Now it is an identity function, allowing the old code to work
correctly and without extra allocations.
2020-07-08 15:01:47 +02:00
Andreas Rumpf
87f6a9592c fixes #14402 (#14908)
* fixes #14402

* added a test case
2020-07-08 08:21:55 +02:00
narimiran
e82a14b273 fix mistake in times.nim docs 2020-07-07 22:57:06 +02:00
Dominik Picheta
25ceacbe4f Revert commit 3e843ab335. Closes #14930. 2020-07-07 19:18:02 +01:00
ee7
a754160d65 tables.nim: Add named fields in smallest and largest (#14919)
The `smallest` and `largest` procs for `CountTable` returned a tuple
with named fields, but the same procs for `CountTableRef` returned an
anonymous tuple.

This commit makes those `CountTableRef` procs more consistent, and adds
a test.

Fixes: #14918
2020-07-06 14:02:03 +02:00
narimiran
46aacf917f Fix style inconsistencies due to the previous commit 2020-07-06 11:24:43 +02:00
narimiran
ebaf603c84 revert 0944b0f4 2020-07-06 10:55:51 +02:00
Juan Carlos
21b3ca636f Fix logging tiny bug (#14910)
* Fix logging tiny bug

* Update changelog.md

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

* Update changelog.md

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

* Update changelog.md

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>

* https://github.com/nim-lang/Nim/pull/14910#discussion_r450012032

Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
2020-07-06 04:00:25 -04:00
Timothee Cour
695154970d deprecate existsDir; use dirExists instead (#14884) 2020-07-03 23:04:23 +02:00
Timothee Cour
dc5a40f3f3 {.deprecated: [existsFile: fileExists].} (#14735)
* {.deprecated: [existsFile: fileExists].}

* s/existsFile/fileExists/ except under deps

* workaround pending #14819

* fix test
2020-07-02 16:19:13 +02:00
Juan Carlos
d590611fc5 Clean out sharedlists (#14857) 2020-07-02 08:40:58 +02:00
Juan Carlos
cbcaf2bbc4 Clean out strutils (#14859)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-07-01 23:16:50 +02:00
Timothee Cour
2867a33ebc fix #14846; add macros.extractDocCommentsAndRunnables (#14849)
* fix #14846; add macros.extractDocCommentsAndRunnables

* fixup

* update tests

* address comment
2020-07-01 09:26:23 +02:00
Juan Carlos
05384efec5 Clean out sharedtables (#14858)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-06-30 19:09:13 +02:00
Juan Carlos
a519f3b038 Removed asyncdispatch.newAsyncNativeSocket, was deprecated since 0.18 (#14854)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2020-06-30 16:29:53 +02:00
alaviss
56b3d422b0 typetraits: features and fixes (#14791)
* typetraits: add support for nnkTypeOfExpr

* typetraits: don't wrap typedesc symbols in StaticParam

* typetraits: add nested generics support to genericParams

* typetraits: make genericParams understand array[I, T] whackiness

Also moved tests to ttypetraits

* typetraits: clarify comment on genericParams
2020-06-30 15:25:53 +02:00
Ray Imber
36fa79a524 Fix asyncdispatch drain behavior (#14820) (#14838)
* Fix asyncdispatch drain behavior (#14820)

* Changed test to use asyncCheck instead of discard after code review (#14820)

* Added some debug statements to help understand what is happening in Azure.

* Removed debug statements and increased timeouts by 1 order of magnitude to account for slow Azure VMs

Co-authored-by: Ray Imber <ray@crankuptheamps.com>
2020-06-30 15:23:53 +02:00
flywind
8be54b8fa7 add debug fmt string like python's (#14808)
* add debug format string

* remove try except

* add changelog
2020-06-30 15:21:37 +02:00
Timothee Cour
1b41c3122b fix #13432 typetraits.$: $(int,) is now (int,); $tuple[] is now tuple[] (#14799)
* typetraits.$: $(int,) is now (int,); $tuple[] is now tuple[]

* changelog
2020-06-29 09:34:05 +02:00
aguspiza
d968163cd1 SSL_CTX_load_verify_locations parameters are reversed (#14815) [backport] 2020-06-29 08:50:37 +02:00
lqdev
5d5271b789 fixed #14839 (#14840) 2020-06-28 13:38:57 +02:00
rockcavera
252f668829 add a second asyncnet.recvFrom (#14237)
* add a second asyncnet.recvFrom

* fixes

* pre-allocating address

* add a new nativesockets.getAddrString()
2020-06-27 22:59:08 +01:00
narimiran
13193b2964 turn 'runnableExample' into 'code-block' to make nightlies green
This example doesn't work on our nightlies CI.
Other procs in this module already use 'code-block'.
2020-06-25 16:55:11 +02:00
Timothee Cour
3e5743d6f7 add typetraits.elementType (#14780)
* add typetraits.elementType

* add a test for 0-sized seq
2020-06-24 22:31:07 +02:00
Andreas Rumpf
16bdc547b7 fixes #14760 (#14769) 2020-06-23 15:17:17 +02:00
Andreas Rumpf
da29222f86 init checks and 'out' parameters (#14521)
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
2020-06-23 10:53:57 +02:00
Juan Carlos
8e54bc5b0c Deprecate and/or remove ospaths (#14767) 2020-06-23 10:51:33 +02:00
b3liever
59ba4d8c03 added normal variate function (#14725)
* added normal variate function
* change method only slightly faster
* changelog + since

Co-authored-by: b3liever <b3liever@yandex.com>
2020-06-22 20:48:33 +02:00
ee7
1e484ed62b [backport] Docs: Fix broken code-block (#14749)
This commit indents the contents of a `code-block` in `httpclient.nim`
so that it displays correctly. The bug was introduced by 42a64245f8.

I did a quick search for other `code-block`s that are broken in the same
way, but the only other one I found (in `pegs.nim`) is not included in
the generated documentation.
2020-06-22 08:12:50 +02:00
alaviss
c7dee55b87 encodings: use only one iconv definition [backport:1.2] (#14741)
Fix an issue reported on IRC: using encodings with --dynlibOverrideAll
result in duplicated iconv definitions, causing compile errors.

This commit remove the `var` wrapper of iconv and go all out on
pointers, as it should due to how the API accepts nil. Also corrected
the API to resemble iconv(3p).
2020-06-21 19:28:03 +02:00
Timothee Cour
2039e3e883 fix #13899 defer now works with async (#14723) 2020-06-19 15:08:00 +02:00
Araq
65c7884a3c fixes #14718 [backport] 2020-06-19 15:02:38 +02:00
Miran
e7f280bd26 Remove deprecated stuff from stdlib (#14699)
* update to the latest Jester

* remove deprecated procs from some stdlib modules

* 'criterion' is not maintained anymore and relies on obsolete stuff
2020-06-17 15:25:02 +02:00
Timothee Cour
dfe51d10a1 addQuitProc now works with closures, and c, js(node/browser) backend; fix some bugs in testament (#14342)
* make addQuitProc great again

* fix bugs in testament

* fix test

* change 2016 => 2020

* addQuitProc => addExitProc + locks

* move to std/exitprocs
2020-06-16 11:43:48 +02:00