[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2019-08-21 Thread Jordon.X
Jordon.X <9651...@qq.com> added the comment: Thanks vstinner. I also don't think it's necessary to backport to the old version. Close this issue is fine. -- ___ Python tracker <https://bugs.python.org/i

[issue37752] Redundant Py_CHARMASK called in some files

2019-08-09 Thread Jordon.X
Jordon.X <9651...@qq.com> added the comment: Hi Ma, I think this is a very valuable suggestion. And if we want to delete the definition of Py_CHARMASK, maybe another issue needed. I am not very sure about the considerations of this macro definition. And whether there are an

[issue37752] Redundant Py_CHARMASK called in some files

2019-08-05 Thread Jordon.X
Jordon.X <9651...@qq.com> added the comment: After the full search for the project code, there are more than a dozen similar issues that need to be modified. A new PR will be added later. -- title: Redundant Py_CHARMASK called in normalizestring(codecs.c) -> Redundant Py

[issue37752] Redundant Py_CHARMASK called in normalizestring(codecs.c)

2019-08-03 Thread Jordon.X
Jordon.X <9651...@qq.com> added the comment: Thanks Ma,I also think all these redundant Py_CHARMASK should be deleted. -- ___ Python tracker <https://bugs.python.org/i

[issue37752] Redundant Py_CHARMASK called in normalizestring(codecs.c)

2019-08-03 Thread Jordon.X
Jordon.X <9651...@qq.com> added the comment: Thanks Hai, for your careful check. There is a misoperation in PR 15093. Now I closed PR 15093. And resubmit code as PR 15095. -- ___ Python tracker <https://bugs.python.org/i

[issue37752] Redundant Py_CHARMASK called in normalizestring(codecs.c)

2019-08-03 Thread Jordon.X
Change by Jordon.X <9651...@qq.com>: -- pull_requests: +14842 pull_request: https://github.com/python/cpython/pull/15095 ___ Python tracker <https://bugs.python.org/i

[issue37752] Redundant Py_CHARMASK called in normalizestring(codecs.c)

2019-08-03 Thread Jordon.X
Change by Jordon.X <9651...@qq.com>: -- keywords: +patch, patch pull_requests: +14839, 14840 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15093 ___ Python tracker <https://bugs.python.or

[issue37752] Redundant Py_CHARMASK called in normalizestring(codecs.c)

2019-08-03 Thread Jordon.X
Change by Jordon.X <9651...@qq.com>: -- keywords: +patch pull_requests: +14839 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15093 ___ Python tracker <https://bugs.python.or

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2019-08-03 Thread Jordon.X
Jordon.X <9651...@qq.com> added the comment: The design and code of the following four places need to be consistent, No.1 https://github.com/python/peps/blob/master/pep-0100.txt#L292 No.2 https://github.com/python/cpython/blob/master/Python/codecs.c#L113 No.3 https://github.com/python/c

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2019-08-03 Thread Jordon.X
Change by Jordon.X <9651...@qq.com>: -- keywords: +patch pull_requests: +14838 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15092 ___ Python tracker <https://bugs.python.or

[issue37752] Redundant Py_CHARMASK called in normalizestring(codecs.c)

2019-08-03 Thread Jordon.X
New submission from Jordon.X <9651...@qq.com>: In normalizestring(), ch = Py_TOLOWER(Py_CHARMASK(ch)); Where Py_TOLOWER is defined as following, #define Py_TOLOWER(c) (_Py_ctype_tolower[Py_CHARMASK(c)]) Redundant Py_CHARMASK called here. -- components: U

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2019-08-03 Thread Jordon.X
Jordon.X <9651...@qq.com> added the comment: and I will try to fix it. -- ___ Python tracker <https://bugs.python.org/issue37751> ___ ___ Python-bugs-list

[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2019-08-03 Thread Jordon.X
New submission from Jordon.X <9651...@qq.com>: In codecs.c, when _PyCodec_Lookup() call normalizestring(), both spaces and hyphens should be convered to underscores. Not convert spaces to hyphens. see:https://github.com/python/peps/blob/master/pep-0100.txt, Codecs (Coder/Decoders)