-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
follow #15357 and move decodeQuery #15860
Conversation
Change it to iterator and make cgi call this |
Sorry but this seems to be a bad idea.
Omg why? It's |
So we tend not to deprecate duplicated things in stdlib and only deprecate wrong/outdated things in stdlib? |
Your code introduced the duplication as far as I can tell. We should avoid both the duplication and the deprecation process. |
as of right now, only the API declaration is duplicated between cgi and uri, not the implementation, that's an acceptable tradeoff vs the benefits it brings:
plus discoverability, So the current version of this PR is fine IMO, not deprecating cgi.decodeData (but uri.decodeQuery could be mentioned in docs for cgi.decodeData) and introducing uri.decodeQuery |
ECgi* = object of EIO ## the exception that is raised, if a CGI error occurs
Does
|
probably bootstrap but can't reproduce locally ( |
This one: |
ok, I can reproduce (locally too, via # uri.nim:
iterator decodeQuery(data: string): tuple[key, value: TaintedString] = ...
since (1,5,1): export decodeQuery
# cgi.nim
from uri {.privateImport.} import decodeQuery (or equivalently, via but until then the simplest IMO is to just leave out |
needs rebase against devel for conflict |
* follow nim-lang#15357 and move decodeQuery * solve problem one * minor * deprecate decodeData * add changelog and since * add testcase for decodeQuery
* follow nim-lang#15860 clean cgi module * follow nim-lang#15860 clean cgi module
* follow nim-lang#15357 and move decodeQuery * solve problem one * minor * deprecate decodeData * add changelog and since * add testcase for decodeQuery
* follow nim-lang#15860 clean cgi module * follow nim-lang#15860 clean cgi module
decodeData
is very common to use and should work in JS backend(cgi
doesn't work in JS backend).So I move
decodeData
tostd/uri
and rename it todecodeQuery
. MoveCgiError
etc tostd/uri
to keep backwards compatibility.Or we should continue #15357 and change
proc
toiterator
.