Commit Graph

18532 Commits

Author SHA1 Message Date
konsumlamm
bd5ce5b351 Improve documentation for stats (#16742)
* Improve documentation for stats

* Address nits

* Update lib/pure/stats.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-01-19 08:40:09 +01:00
Timothee Cour
2e5254ff27 fix config/nim.cfg: @if not bsd or haiku: was buggy (#16748) 2021-01-19 08:25:21 +01:00
Clyybber
580b8f744b Fix bump CI 2021-01-18 23:33:41 +01:00
Timothee Cour
6c07b0a1f8 jsonutils.jsonTo: support opt (#16739) 2021-01-17 11:37:06 +01:00
konsumlamm
44ceefa9fe Improve documentation for packedsets (#16715)
* Improve documentation for packedsets

Add more runnableExamples
Add deprecated pragma to intsets
Replace intsets with packedsets in lib.rst

* Apply suggested changes
2021-01-16 16:09:53 +01:00
flywind
8939de15d7 minor improvement on math.nim (#16733) 2021-01-16 12:37:23 +01:00
Timothee Cour
18e14f5920 js: improve tests + some docs (#16727)
* js: improve tests

* _

* _

* _

* fixup
2021-01-16 12:08:40 +01:00
flywind
e4a529962e close #10735 add testcase (#16690) 2021-01-15 22:23:49 -08:00
flywind
5ed6a94d8f promote math.isNaN (#16734) 2021-01-15 22:19:17 -08:00
Juan Carlos
78a99587a4 Deprecate TaintedString (#15423)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-01-15 18:56:38 -08:00
konsumlamm
7b632f9ccb Improve documentation for the hashes module (#16720)
* Improve documentation for hashes

* Fix runnableExamples

* Apply suggestions
2021-01-15 22:42:01 +00:00
cooldome
fc9cf2088d Fix 16722 (#16730)
* fix #16722

* fix spacing

* spacing
2021-01-15 18:16:24 +00:00
Timothee Cour
52cf728001 followup for #16717: minimized example + improved comment (#16721) 2021-01-15 01:09:58 +01:00
Andrey Makarov
554fe8f88f conservative approach to fix #15184 (#16723) 2021-01-15 00:53:36 +01:00
Juan Carlos
41965880ce Add js BigInts (#16409)
* Add BigInts
* Renames tos plurals
* Improve Stringifications
* Update changelog.md

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>

* RunnableExamplerize
* discard the discardable pragma
* Several improvements from peer reviews, more docs
* More doc, more test
* More doc, more test
* Better error message 'Error: usage of low is an {.error.} defined at jsbigints.nim' instead of just 'type mismatch JsBigInt'
* is an overload, rename
* proc to scare kids away
* Update lib/js/jsbigints.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

* https://github.com/nim-lang/Nim/pull/16409#discussion_r554365041

Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-01-14 20:19:41 +01:00
vabresto
a90f7a66ed Transfer-Encoding:chunked tests (#16678)
* Add tests and fix extra newlines in body

* Fixes per comments

* Slight rephrase per comments

* Improvements per comments

* Add getSocket to reduce test flakiness per comment

* Remove unused lines from header

* Add doc comment to getSocket per comment

* Apply witchcraft to replace `discard Future`

* Return HTTP 400 on bad encoding in request

* Fix runnable example for getSocket

* Fix import to fix runnable examples

* Even more imports for the example

* Better self documenting runnable example

* Add missing import

* Import from module with correct signature

* Resolve port type mismatch
2021-01-14 20:17:02 +01:00
Andreas Rumpf
1fd4c666dc IC: next steps (#16705)
* code cleanups
* refactorings for IC
* more refactorings for IC
* IC: attach the 'nil' type to its module
* IC: refactorings and improvements
* IC: progress
* IC: more serialization fixes
* IC: embarrassing omission
* code cleanups
2021-01-14 17:30:41 +01:00
flywind
ef9027c290 fix #16706 (#16717) [backport:1.4] 2021-01-14 16:52:00 +01:00
Timothee Cour
94430a2e6d enable tests/stdlib/thttpclient.nim (#16710)
* enable tests/stdlib/thttpclient.nim

* disable windows, openbsd
2021-01-14 11:10:02 +01:00
Timothee Cour
287dec06ae disable hint:processing in tests (#16713)
* disable hint:processing in tests

* fix test
2021-01-14 10:19:20 +01:00
Yuriy Glukhov
4ae520711d Fixes #16436 (#16695)
* Fixes #16436

* Comments addressed
2021-01-14 08:53:21 +01:00
Timothee Cour
7f67c593c1 improve formatting of error message when runnableExamples fails (#16677) 2021-01-13 19:09:00 -08:00
Timothee Cour
fee5fbc722 fix #16703; revert most of #16480; add tests/stdlib/tmimetypes.nim (#16711) 2021-01-13 14:52:59 -08:00
Yuriy Glukhov
165d39738d Check for errors after sendPendingSslData (#16696)
* Check for errors after sendPendingSslData

* Leftover comment removed
2021-01-13 15:09:28 +01:00
flywind
b727217229 refactor cmpNimIdentifier (#16611)
* refactor cmpNimIdentifier

* Apply suggestions from code review

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-01-13 12:29:30 +01:00
Timothee Cour
61fd19c7e6 revive PR #16320 (CRLF fix); fix #16308; Update openssl.nim (#16648)
* Update openssl.nim

Fix issue # 16308

* Update openssl.nim

These are also related to Issues [#16308](https://github.com/nim-lang/Nim/issues/16308)

* Update openssl.nim

* Add files via upload

SSL PEM_read_RSAPUBKEY check

* Delete topenssl_rsa_private_key.pem
* Delete topenssl_rsa_public_key.pem
* Delete topenssl.nim
* Add files via upload
* Update topenssl.nim

This test makes me dizzy. Variables such as' PRSA 'must be declared in advance, otherwise they will run incorrectly. The argument uses a cString, and string also makes an error.

* Update topenssl.nim

```
lhf@lhf-pc:/media/lhf/D$ cat -e ./topenssl.nim
import std/wordwrap$
import openssl$
```

* Update topenssl.nim
* dos2unix tests/stdlib/topenssl.nim

Co-authored-by: lihaifeng <lihaifeng@wxm.com>
2021-01-12 20:11:30 +01:00
Mildred Ki'Lya
71db2be833 Improve uri.parseQuery to never raise an error (#16647)
In case of malformed query string where there is `=` on the value, handle
this character as part of the value instead of throwing an error.

The following query string should no longer crash a program:

    key=value&key2=x=1

It will be interpreted as [("key", "value"), ("key2", "x=1")]

This is correct according to latest WhatWG's HTML5 specification
recarding the urlencoded parser:
https://url.spec.whatwg.org/#concept-urlencoded-parser

Older behavior can be restored using the -d:nimLegacyParseQueryStrict
flag.
2021-01-12 13:42:05 +01:00
Saem Ghani
bb3c6d0797 fixes nim-lang/nimsuggest#103 con dot exprs (#16657)
- con calls for dot exprs now returns results
- discovered an issue with dot expr results -- documented
2021-01-12 13:35:21 +01:00
Yuriy Glukhov
e5ea3f0cce Compile sqlite3 with -O3 flag (#16697) 2021-01-12 13:26:52 +01:00
flywind
736b0d13c0 close #10734 add testcase (#16692)
* close #10734 add testcase

* fix

* fix
2021-01-12 12:10:22 +01:00
Andreas Rumpf
cf6dd57efe IC: next steps (#16632)
* removed dead code
* beginnings of a rodfile reader
* IC: record global VM state changes and pragma state changes
* IC: replay pragmas and VM state changes
* implemented rod load file simuation for easier, extensive testing
* critical bugfix
* IC: stress test logic; should also help with recursive module dependencies; WIP
* IC: loading from .rod files begins to work reliably
* removed ugly hacks
* yet another silly mistake
2021-01-12 09:36:51 +01:00
konsumlamm
bf184bcdd9 Remove longestMatch in _WithPrefix iterators (#16689) 2021-01-12 08:35:27 +01:00
flywind
f0cfc95372 fix docs typo (#16637)
* fix typo

* fix typo

* Update doc/astspec.txt
2021-01-12 14:08:24 +08:00
Andrey Makarov
fd5c8ef208 RST: implement internal targets (#16614) 2021-01-11 19:51:04 +01:00
flywind
335f849c36 close #9901 add testcase (#16662)
* close #9901 add testcase

* follow advice
2021-01-11 18:00:57 +00:00
flywind
da28df6113 remove deprecated specs (#16684) 2021-01-11 18:02:53 +01:00
flywind
5af13c5ace close #9655 add testcase (#16683) 2021-01-11 18:02:32 +01:00
flywind
0c128259bb close #7097 add testcase (#16682) 2021-01-11 15:13:13 +01:00
flywind
aa185c0e9b fix #13517 (#16681) 2021-01-11 15:07:48 +01:00
flywind
be6e8916fa fix negative nan (#16628) 2021-01-11 11:39:38 +01:00
konsumlamm
5897ed9d3d Improve documentation of strmisc (#16665)
Simplify examples
2021-01-11 10:53:15 +01:00
Saem Ghani
bbc96f974d fixed nim-lang/nimsuggest#82 pure enum field sug (#16676)
- previous code wasn't account for tyEnum being wrapped in tyTypeDesc
- now pure enum fields are suggested
2021-01-11 10:18:01 +01:00
Timothee Cour
f6c2450cdb fix #16555, fixes #16405: len, high honors '\0' for cstring in vm (#16610) 2021-01-11 10:16:20 +01:00
cooldome
0286a0879b fix #16651 (#16658)
* fix #16651
2021-01-11 10:09:38 +01:00
flywind
510e383d92 add error messages (#16679) 2021-01-10 22:26:52 -08:00
flywind
2c6f5ae681 fix #16650 (#16660) 2021-01-10 21:51:29 +00:00
flywind
f82100ac93 fix broken CI (#16663) 2021-01-10 16:19:40 +00:00
Antonis Geralis
7bde6aa37f Httpclient improvements (#15919)
* Allow passing Uri instead of strings

* Teach httpclient about 308

* Deprecate request proc where httpMethod is string

* More use of HttpMethod enum

Also fix handling of 308, I forgot to add the hunk to the previous
commit.

* Well behaved redirect handler

* Also remove Transfer-Encoding

* Removed unused proc

* Secure redirection rules

Strip sensitive headers for cross-domain redirects.

* Allow httpMethod to be a string again

This way unknown http verbs can be used without any problem.

* Respect user-specified Host header

* Missed multipart argument.

* Try another method

* add changelog

* Fix hidden deprecation warning, parseEnum failing

* This is wrong

* Have to do it manually, parseEnum is not suitable

* Review comments

* update

Co-authored-by: LemonBoy <thatlemon@gmail.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
2021-01-10 13:40:53 +00:00
vabresto
65df5762a1 Add support for Transfer-Encoding: chunked (#16636)
* Add support for Transfer-Encoding: chunked

* Minor whitespace fixes

* Use recv instead of recvLineInto

* Undo changes to httpcore, inline changes
2021-01-10 11:42:23 +00:00
flywind
dbff2cd938 close #4834 add testcase (#16649) 2021-01-09 11:54:26 +01:00