[issue44228] [urllib] Error with handling of urllib.parse.quote. Terminates halfway

2021-05-25 Thread Swee Tat Lim


Swee Tat Lim  added the comment:

yeah.  Please close.  Definitely a problem with the parameter expansion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44228] [urllib] Error with handling of urllib.parse.quote. Terminates halfway

2021-05-25 Thread Martin Panter


Martin Panter  added the comment:

I presume this is because you are running a Unix shell, and it's nothing to do 
with Python. Look up how quoting and variable substitution with dollar signs $ 
works.

$ set -o nounset
$ python3 -c "import urllib.parse; print 
(urllib.parse.quote('ab$cd#hij$klm'))"
bash: cd: unbound variable

Works fine in the Python interpreter:

>>> import urllib.parse; print (urllib.parse.quote('ab$cd#hij$klm'))
ab%24cd%26efg%23hij%24klm

--
nosy: +martin.panter
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44228] [urllib] Error with handling of urllib.parse.quote. Terminates halfway

2021-05-24 Thread Swee Tat Lim


New submission from Swee Tat Lim :

Running this

python3 -c "import urllib.parse; print 
(urllib.parse.quote('ab$cd#hij$klm'))"

Results:
ab%26efg%23hij

Expected Result:
ab%26efg%23hij%26klm

Not sure why it terminated midway

--
components: Library (Lib)
messages: 394284
nosy: sweetat
priority: normal
severity: normal
status: open
title: [urllib] Error with handling of urllib.parse.quote.  Terminates halfway
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com