[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Concur with Christian. Heh, I was going to propose the same.

--
resolution:  -> rejected
stage: patch review -> 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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-08 Thread Christian Heimes


Christian Heimes  added the comment:

There is no need to add a new flag to quote. You can easily archive your goal 
with a simple regular expression substitution:

>>> import re, urllib.parse
>>> s = urllib.parse.quote("Example|#?")
>>> s
'Example%7C%23%3F'
>>> re.sub("%[0-9A-F]{2}", lambda q: q.group(0).lower(), s)
'Example%7c%23%3f'

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-08 Thread Eisuke Kawashima


Eisuke Kawashima  added the comment:

> Why do you require a lower case string here?

Well, I want to use urllib.parse.quote to escape special characters, such as 
()[]#*/\, in filenames, and for visibility lower hex digits are preferable.
PR 19766 does not break compatibility.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-08 Thread Christian Heimes


Christian Heimes  added the comment:

No, they are not required. RFC 3986 recommends upper case and says that upper 
and lower case percent encoding are equivalent:

   The uppercase hexadecimal digits 'A' through 'F' are equivalent to
   the lowercase digits 'a' through 'f', respectively.  If two URIs
   differ only in the case of hexadecimal digits used in percent-encoded
   octets, they are equivalent.  For consistency, URI producers and
   normalizers should use uppercase hexadecimal digits for all percent-
   encodings.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-08 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

But they are not required, right?

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-08 Thread Christian Heimes


Christian Heimes  added the comment:

I'm -0 on the new argument. Why do you require a lower case string here?

--
nosy: +christian.heimes

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-08 Thread Eisuke Kawashima


Eisuke Kawashima  added the comment:

I require lower hex digits for percent encoding, which is allowed by the RFC.  
Small modifications of the codes can achieve it.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-04 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
nosy:  -lys.nikolaou

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-04 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

What is wrong with the current behavior? Why does the case of hexadecimal 
digits matter?

There are no options to repr() to control the case of hexadecimal digits in 
 and '\ufffe', and I doubt there are such 
options in other functions producing hexadecimals. So it is a very uncommon 
request.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

After Serhiy unlinked the linked PR, it did not happen again, so it may have 
been an one-off hiccup. I updated the description GH-19888 nevertheless.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

In the title -> in the description

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think that may be happening because you are still refering to this issue in 
the title of
https://github.com/python/cpython/pull/19888?

Not sure how the linkage is made, but if this keeps happening you may open an 
issue in the core-workflow repo in the Python org.

--
nosy: +pablogsal

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests:  -19201

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

PRs keep getting linked to this issue under my name, without me doing anything.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19201
pull_request: https://github.com/python/cpython/pull/19888

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:

I opened a pull request with an invalid bpo issue number so I unlinked it. Then 
a completely unrelated PR was is shown as linked by me, but I didn't do that. 
Unlinking that as well.

--

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests:  -19200

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +19200
pull_request: https://github.com/python/cpython/pull/19888

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests:  -19198

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-03 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
nosy: +lys.nikolaou
nosy_count: 3.0 -> 4.0
pull_requests: +19198
pull_request: https://github.com/python/cpython/pull/19888

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-05-01 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +orsenthil

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-04-28 Thread E Kawashima


Change by E Kawashima :


--
keywords: +patch
nosy: +E Kawashima
nosy_count: 1.0 -> 2.0
pull_requests: +19087
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19766

___
Python tracker 

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



[issue40426] Unable to use lowercase hexadecimal digits for percent encoding

2020-04-28 Thread Eisuke Kawashima


New submission from Eisuke Kawashima :

RFC 3986 (https://tools.ietf.org/html/rfc3986#section-2.1) allows lower 
hexadecimal digits for percent encoding, but urllib.parse.quote and its 
variants convert into only UPPERCASE digits [A-F].

I will create a PR for fix.

--
components: Library (Lib)
messages: 367551
nosy: e-kwsm
priority: normal
severity: normal
status: open
title: Unable to use lowercase hexadecimal digits for percent encoding
type: enhancement
versions: Python 3.9

___
Python tracker 

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