[issue710931] iconv codec-NG and Korean Codecs

2022-04-10 Thread admin


Change by admin :


--
github: None -> 38224

___
Python tracker 

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



[issue215308] codecs base classes need documentation

2022-04-10 Thread admin


Change by admin :


___
Python tracker 

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



[issue223642] Add site-codecs package to enable drop-in codec support

2022-04-10 Thread admin


Change by admin :


--
github: None -> 33517

___
Python tracker 

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



[issue401877] Completed codecs API docs

2022-04-10 Thread admin


Change by admin :


___
Python tracker 

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



[issue401477] Fixes of ReadStream.readline() in UTF-16 and -LE codecs

2022-04-10 Thread admin


Change by admin :


___
Python tracker 

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



[issue223642] Add site-codecs package to enable drop-in codec support

2022-04-10 Thread admin


Change by admin :


--
github: None -> 33517

___
Python tracker 

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



[issue401877] Completed codecs API docs

2022-04-10 Thread admin


Change by admin :


--
github: None -> 33341

___
Python tracker 

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



[issue215308] codecs base classes need documentation

2022-04-10 Thread admin


Change by admin :


--
github: None -> 33193

___
Python tracker 

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



[issue401477] Fixes of ReadStream.readline() in UTF-16 and -LE codecs

2022-04-10 Thread admin


Change by admin :


--
github: None -> 33086

___
Python tracker 

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



[issue44723] Codec name normalization breaks custom codecs

2022-01-24 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +methane

___
Python tracker 

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



[issue44723] Codec name normalization breaks custom codecs

2022-01-24 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

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



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

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

note that Bodo's own followup issue about the breaking change for python-iconv 
was filed as https://bugs.python.org/issue44723

--

___
Python tracker 

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



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

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

(note: this might not be the true cause of that issue; though it sounds 
potentially related - I haven't investigated far enough yet)

--

___
Python tracker 

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



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

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

https://bugs.python.org/issue46508 filed to track fixing the acceptance and use 
of garbage codec values regression that this caused.

--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i

2021-11-29 Thread Mark Sapiro


Mark Sapiro  added the comment:

The mailman-us...@python.org list received a post with the From: header 
containing a Hebrew display name RFC 2047 encoded with the iso-8859-8-i charset 
which threw a LookupError: unknown encoding: iso-8859-8-i exception in 
processing and shunted the message. The message body also had the charset 
declared as iso-8859-8-i although it contained only ascii. Unfortunately, I 
don't have the original message so I can't say what MUA created it or how 
common this usage is.

I do think that just adding these as aliases for the non-annotated encodings is 
an appropriate response.

--

___
Python tracker 

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



[issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i

2021-11-29 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Even though these are IANA recognized encodings, we need to apply he same logic 
as we do for all new encodings, which essentially boils down to: Are these 
encoding in wider spread use today ?

Reading through the RFC 1556, it seems that the added -i or -e are just 
indications for applications on how to interpret BIDI information: either 
implicit by looking at the order of characters in the stream or explicit via 
control characters embedded in the stream. They are not new encodings, with new 
mappings.

If that's a correct interpretation, we could add those as aliases for the 
non-annotated encodings.

After more than 20 years with Unicode support in Python and the world moving 
towards UTF-8, I have become fairly reluctant towards adding more encoding 
support to Python.

If people are still using unsupported encodings, it's probably better to point 
them to other dedicated tools for converting text to UTF-8, e.g. iconv, than 
extending the pretty extensive support we already have in Python.

--
nosy: +lemburg

___
Python tracker 

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



[issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i

2021-11-29 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
versions: +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



[issue45921] codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i or iso-8859-8-i

2021-11-28 Thread Mark Sapiro


New submission from Mark Sapiro :

iso-8859-6-i, iso-8859-6-e, iso-8859-8-i and iso-8859-8-i are all IANA 
recognized character sets per 
https://www.iana.org/assignments/character-sets/character-sets.xhtml. These are 
all unrecognized by codecs.lookup().

--
components: Library (Lib)
messages: 407240
nosy: msapiro
priority: normal
severity: normal
status: open
title: codecs module doesn't support iso-8859-6-i, iso-8859-6-e, iso-8859-8-i 
or iso-8859-8-i
type: behavior
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

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



[issue25880] codecs should raise specific UnicodeDecodeError/UnicodeEncodeError rather than just UnicodeError

2021-11-26 Thread Irit Katriel

Change by Irit Katriel :


--
title: u'..'.encode('idna') → UnicodeError: label empty or too long -> codecs 
should raise specific UnicodeDecodeError/UnicodeEncodeError rather than just 
UnicodeError
versions: +Python 3.11 -Python 2.7, Python 3.4

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



[issue45277] typo in codecs documentation

2021-10-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 0b568530ecb6ccc696771acf8018ec6fff1a0a5f by Pablo Galindo (Miss 
Islington (bot)) in branch '3.10':
bpo-45277: Fix typo in codecs doc (GH-28555)
https://github.com/python/cpython/commit/0b568530ecb6ccc696771acf8018ec6fff1a0a5f


--
nosy: +pablogsal

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



[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
resolution:  -> fixed
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



[issue45277] typo in codecs documentation

2021-09-24 Thread miss-islington


miss-islington  added the comment:


New changeset 2a7d985bb3a1d85d63f135956750b330408702e6 by Miss Islington (bot) 
in branch '3.9':
bpo-45277: Fix typo in codecs doc (GH-28555)
https://github.com/python/cpython/commit/2a7d985bb3a1d85d63f135956750b330408702e6


--

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



[issue45277] typo in codecs documentation

2021-09-24 Thread miss-islington


miss-islington  added the comment:


New changeset 371ca3b54d355476cc735cb932e80f5cd16310da by Miss Islington (bot) 
in branch '3.10':
bpo-45277: Fix typo in codecs doc (GH-28555)
https://github.com/python/cpython/commit/371ca3b54d355476cc735cb932e80f5cd16310da


--

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



[issue45277] typo in codecs documentation

2021-09-24 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +26939
pull_request: https://github.com/python/cpython/pull/28556

___
Python tracker 

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



[issue45277] typo in codecs documentation

2021-09-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26940
pull_request: https://github.com/python/cpython/pull/28557

___
Python tracker 

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



[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 4c0fc65cd8a6d4c18330505576ccd4b46abeec1c by Terry Jan Reedy in 
branch 'main':
bpo-45277: Fix typo in codecs doc (GH-28555)
https://github.com/python/cpython/commit/4c0fc65cd8a6d4c18330505576ccd4b46abeec1c


--

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



[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +26938
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28555

___
Python tracker 

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



[issue45277] typo in codecs documentation

2021-09-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thanks for the report.  I will fix this.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue45277] typo in codecs documentation

2021-09-24 Thread HugoThiolliere

New submission from HugoThiolliere :

There is a typo in 
https://docs.python.org/3/library/codecs.html#encodings-and-unicode

The first sentence in the last paragraph before the table reads : "There’s 
another encoding that is able to encoding the full range of Unicode characters"

When it should read "There’s another encoding that is able to encode the full 
range of Unicode characters"

--
assignee: docs@python
components: Documentation
messages: 402545
nosy: Gronahak, docs@python
priority: normal
severity: normal
status: open
title: typo in codecs documentation
type: enhancement
versions: Python 3.9

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



[issue44723] Codec name normalization breaks custom codecs

2021-07-23 Thread Bodo Graumann

New submission from Bodo Graumann :

This is a follow up on https://bugs.python.org/issue37751 concerning 
normalization of codec names.

First of all, the changes made therein are not documented correctly.
In the implementation
| Normalization works as follows: all non-alphanumeric
| characters except the dot used for Python package names are
| collapsed and replaced with a single underscore, e.g. '  -;#'
| becomes '_'. Leading and trailing underscores are removed.”
Cf. 
[encodings/__init__.py](https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Lib/encodings/__init__.py#L47-L50)

The documentation however only states that:
| Search functions are expected to take one argument, being the encoding name 
in all lower case letters with hyphens and spaces converted to underscores
Cf. https://docs.python.org/3/library/codecs.html#codecs.register

Secondly, this change breaks lots of iconv codecs with the python-iconv 
binding. E.g. `ASCII//TRANSLIT` is now normalized to `ascii_translit`, which 
iconv does not understand. Codec names which use hyphens also break and iinm 
not all of them have aliases in iconv without hyphens.
Cf. [python-iconv #4](https://github.com/bodograumann/python-iconv/issues/4)

How about first looking up the given name and only then, if the given name 
could not be found, looking for the codec by its normalized name?

--
components: Unicode
messages: 398042
nosy: bodograumann, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: Codec name normalization breaks custom codecs
type: behavior
versions: Python 3.9

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



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

2021-06-13 Thread STINNER Victor


STINNER Victor  added the comment:

> The codecs api feels extremely well-fitting for integrating iconv in python 
> and any alternative I can think of seems unsatisfactory.

This issue is now closed, would you mind to open a new issue?

--

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



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

2021-06-13 Thread Bodo Graumann

Bodo Graumann  added the comment:

Unfortunately this is not quite finished yet.

First of all, the change is bigger than what is documented: “Changed in version 
3.9: Hyphens and spaces are converted to underscore.“

In reality, now
| Normalization works as follows: all non-alphanumeric
| characters except the dot used for Python package names are
| collapsed and replaced with a single underscore, e.g. '  -;#'
| becomes '_'. Leading and trailing underscores are removed.”
Cf. 
[encodings/__init__.py](https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Lib/encodings/__init__.py#L47-L50)

Secondly, this change breaks lots of iconv codecs with the python-iconv 
binding. E.g. `ASCII//TRANSLIT` is now normalized to `ascii_translit`, which 
iconv does not understand. Codec names which use hyphens also break and iinm 
not all of them have aliases in iconv without hyphens.
Cf. [python-iconv #4](https://github.com/bodograumann/python-iconv/issues/4)

The codecs api feels extremely well-fitting for integrating iconv in python and 
any alternative I can think of seems unsatisfactory.
Please advise.

--
nosy: +bodograumann

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



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

2021-04-28 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Inada-san for documenting the change in codecs.register() doc!

--

___
Python tracker 

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



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

2021-04-27 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset cf9d65c5af7905d9e9945a297dbbf15d3bcace15 by Miss Islington (bot) 
in branch '3.9':
bpo-37751: Update `codecs.register()` doc. (GH-25643)
https://github.com/python/cpython/commit/cf9d65c5af7905d9e9945a297dbbf15d3bcace15


--

___
Python tracker 

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



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

2021-04-27 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 5c84bb506aaca01f5f750116d8f7a41d41f8124d by Inada Naoki in branch 
'master':
bpo-37751: Update `codecs.register()` doc. (GH-25643)
https://github.com/python/cpython/commit/5c84bb506aaca01f5f750116d8f7a41d41f8124d


--

___
Python tracker 

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



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

2021-04-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +24368
pull_request: https://github.com/python/cpython/pull/25677

___
Python tracker 

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



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

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 531c81038e28b6cfa0f9791467bf671c88c6f4c4 by Miss Islington (bot) 
in branch '3.9':
bpo-37751: Document codecs.lookup() change in What's New in Python 3.9 
(GH-23096) (GH-25659)
https://github.com/python/cpython/commit/531c81038e28b6cfa0f9791467bf671c88c6f4c4


--

___
Python tracker 

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



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

2021-04-27 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 8.0 -> 9.0
pull_requests: +24350
pull_request: https://github.com/python/cpython/pull/25659

___
Python tracker 

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



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

2021-04-26 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +24336
pull_request: https://github.com/python/cpython/pull/25643

___
Python tracker 

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



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

2021-04-24 Thread hai shi


hai shi  added the comment:

Thanks Marc-Andre for your supplement of PEP-100.
Thanks Inada, victor for your review and merge.

After PR-23096 merged, I suggest to close this bpo.
If there have any other questions, we can reopen it again.

--
resolution:  -> fixed
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



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

2021-04-23 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 32980fb669a6857276da18895fcc0cb6f6fbb544 by Hai Shi in branch 
'master':
bpo-37751: Document codecs.lookup() change in What's New in Python 3.9 
(GH-23096)
https://github.com/python/cpython/commit/32980fb669a6857276da18895fcc0cb6f6fbb544


--

___
Python tracker 

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



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

2021-04-23 Thread Miro Hrončok

Change by Miro Hrončok :


--
nosy:  -hroncok

___
Python tracker 

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



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

2021-04-23 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 23.04.2021 07:47, Inada Naoki wrote:
> 
> Inada Naoki  added the comment:
> 
> I think it is too late. Python 3.9 has been released already.  Reverting the 
> change is also breaking change.
> 
> PEP 100 says:
> "Search functions are expected to take one argument, the encoding name in all 
> lower case letters and with hyphens and spaces converted to underscores"
> https://www.python.org/dev/peps/pep-0100/#codecs-coder-decoders-lookup
> 
> But codecs.register() says:
> "Search functions are expected to take one argument, being the encoding name 
> in all lower case letters".
> 
> I don't know historical reason why two document are inconsistent.
> https://docs.python.org/3/library/codecs.html#codecs.register

I guess just an oversight on my part.

PEP 100 is certainly what I meant and implemented. I should have also
made it clear in PEP 100 that I meant lower case ASCII letters.

--

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



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

2021-04-23 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 23.04.2021 03:37, akdor1154 wrote:
> 
> akdor1154  added the comment:
> 
> If I understand the target of this issue, this is a breaking change in python 
> 3.9 .
> 
> E.g. see https://github.com/SAP/PyHDB/issues/149
> 
> Ideally if we did not intend to break libraries then can this be fixed?
> Or if it is acceptable to have such a breaking change, can it be documented 
> as such? (maybe this is https://github.com/python/cpython/pull/23096 ? though 
> I would not interpret that as a breaking change at first glance)

This patch only restored the behavior we had before (and for many many
years). It's not breaking, it's in fact resolving a break which was
caused by earlier:

https://bugs.python.org/issue37751#msg349448

Please note that search functions determine how to map codec names
to codec implementations. The codec search function in the encodings
package uses one way to do this (and depends on how the package
is structured).

The approach taken by the encodings search function is listed here:
https://github.com/python/cpython/blob/master/Lib/encodings/__init__.py#L43

Other search functions can work in different ways.

Now, unfortunately, parts of this kind of normalization have also made
its way into the codecs module itself and into the Unicode
implementation and perhaps not always in a way which allows search
functions to use a different approach or which is consistent.

As I mentioned before, the safest way to go about this is to use
alnum only names for codecs, with the addition of underscores to
separate important parts.

The Python implementation should make sure that such names continue
to work when passed through any codec name normalization.

--
title: In codecs,  function 'normalizestring' should convert both spaces and 
hyphens to underscores. -> In codecs, function 'normalizestring' should convert 
both spaces and hyphens to underscores.

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



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

2021-04-22 Thread Inada Naoki


Inada Naoki  added the comment:

codecs.register() was added in this commit.
https://github.com/python/cpython/commit/e2d67f98d1aade1059b2ff3278672b2ffbaf180e

And its docstring has been added in this commit.
https://github.com/python/cpython/commit/0ae2981dec3de96a1f7d63b0535992cf1462ac92

Both commits doesn't describe why normalization was differ from PEP 100.

--
nosy: +mark

___
Python tracker 

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



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

2021-04-22 Thread Inada Naoki


Inada Naoki  added the comment:

I think it is too late. Python 3.9 has been released already.  Reverting the 
change is also breaking change.

PEP 100 says:
"Search functions are expected to take one argument, the encoding name in all 
lower case letters and with hyphens and spaces converted to underscores"
https://www.python.org/dev/peps/pep-0100/#codecs-coder-decoders-lookup

But codecs.register() says:
"Search functions are expected to take one argument, being the encoding name in 
all lower case letters".

I don't know historical reason why two document are inconsistent.
https://docs.python.org/3/library/codecs.html#codecs.register

--
nosy: +methane

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



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

2021-04-22 Thread hai shi


hai shi  added the comment:

>Ideally if we did not intend to break libraries then can this be fixed?
Or if it is acceptable to have such a breaking change.

Hi, akdor1154, thanks for your notice. It was a bugfix in fact:) 
https://bugs.python.org/issue37751#msg349448

> maybe this is https://github.com/python/cpython/pull/23096 ? though I would 
> not interpret that as a breaking change at first glance

@victor ping :)

--

___
Python tracker 

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



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

2021-04-22 Thread akdor1154


akdor1154  added the comment:

If I understand the target of this issue, this is a breaking change in python 
3.9 .

E.g. see https://github.com/SAP/PyHDB/issues/149

Ideally if we did not intend to break libraries then can this be fixed?
Or if it is acceptable to have such a breaking change, can it be documented as 
such? (maybe this is https://github.com/python/cpython/pull/23096 ? though I 
would not interpret that as a breaking change at first glance)

--
nosy: +akdor1154

___
Python tracker 

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



[issue12508] Codecs Anomaly

2020-11-11 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3

___
Python tracker 

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



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

2020-11-01 Thread hai shi


Change by hai shi :


--
pull_requests: +22010
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/23096

___
Python tracker 

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



[issue41919] Move the codecs' register operation to testcases

2020-10-03 Thread hai shi


Change by hai shi :


--
keywords: +patch
pull_requests: +21522
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/22513

___
Python tracker 

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



[issue41919] Move the codecs' register operation to testcases

2020-10-03 Thread hai shi


New submission from hai shi :

After PR22360 merged, we can move the codecs' register operation to testcases.

--
components: Tests
messages: 377863
nosy: shihai1991, vstinner
priority: normal
severity: normal
status: open
title: Move the codecs' register operation to testcases
type: enhancement
versions: Python 3.10

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-26 Thread utkarsh


utkarsh  added the comment:

@thatiparthy These were the most logical changes, standard error messages, 
which were already there in the existing code, I just edited them as mentioned 
here. What part of your "work" do you think i copied?
Sent this PR to get familiar to the process mostly, i will close it if you feel 
insecure. No need to be rude.
thanks.

--

___
Python tracker 

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-26 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

@utk You could have taken some other easy issue from 
https://bugs.python.org/issue?status=1&@sort=-activity&@columns=id%2Cactivity%2Ctitle%2Ccreator%2Cstatus&@dispname=Easy%20issues&@startwith=0&@group=priority=6&@action=search&@filter=&@pagesize=50
 instead of copy pasting my work.

--

___
Python tracker 

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-26 Thread utkarsh


Change by utkarsh :


--
nosy: +utk
nosy_count: 8.0 -> 9.0
pull_requests: +20329
pull_request: https://github.com/python/cpython/pull/21170

___
Python tracker 

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-26 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


--
keywords: +patch
pull_requests: +20323
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/21165

___
Python tracker 

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-25 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-25 Thread Walter Dörwald

Walter Dörwald  added the comment:

UnicodeEncodeError and UnicodeDecodeError are used to report un(en|de)codedable 
ranges in the source object, so it wouldn't make sense to use them for errors 
that have nothing to do with problems in the source object. Their constructor 
requires 5 arguments (encoding, object, start, end, reason), not just a simple 
message: e.g. UnicodeEncodeError("utf-8", "foo", 17, 23, "bad string").

But for reporting e.g. missing BOMs at the start it would be useful to use (0,  
0) as the offending range.

--
nosy: +doerwalter

___
Python tracker 

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-25 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

Hi,

IMO this can be mark as an easy issue.

@thatiparthy please, go ahead

--
nosy: +eamanu

___
Python tracker 

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-25 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

This looks like an easy task. Shall I create a PR?

--
nosy: +thatiparthy

___
Python tracker 

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



[issue41115] Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError

2020-06-25 Thread Antoine Pitrou


New submission from Antoine Pitrou :

A number of codecs raise bare UnicodeError, rather than 
Unicode{Decode,Encode}Error. Example:

  File 
"/home/antoine/miniconda3/envs/pyarrow/lib/python3.7/encodings/utf_16.py", line 
67, in _buffer_decode
raise UnicodeError("UTF-16 stream does not start with BOM")

A more complete list can be found here:
https://gist.github.com/pitrou/60594b28d8e47edcdb97d9b15d5f9866

--
components: Library (Lib)
keywords: easy
messages: 372367
nosy: benjamin.peterson, ezio.melotti, lemburg, pitrou, serhiy.storchaka, 
vstinner
priority: normal
severity: normal
stage: needs patch
status: open
title: Codecs should raise precise UnicodeDecodeError or UnicodeEncodeError
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

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



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

2020-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

I created bpo-39337: codecs.lookup() ignores non-ASCII characters, whereas 
encodings.normalize_encoding() copies them.

--

___
Python tracker 

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



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

2020-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

> Please note that external codec packages should not rely on the semantics of 
> the Python stdlib encodings package's search function.

latexcodec does register a search function.

> It's good practice to always only use ASCII lower case chars and the 
> underscore for codec names.

latexcodec uses encoding names like "latex+ascii" and their search function 
used "+" as a separator.

Don't worry, I just fixed latexcodec, my fix is already merged upstream! I 
simply changed the search function to split on "_" if the name contains "_".

* 
https://github.com/mcmtroffaes/latexcodec/commit/a30ae2cf061d7369b1aaa8179ddd1b486974fdad
* https://github.com/mcmtroffaes/latexcodec/pull/76
* https://github.com/mcmtroffaes/latexcodec/issues/75

--

___
Python tracker 

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



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

2020-01-14 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Just to clarify: the change in the C implementation was the breaking change. 
The patch just restores the previous behavior: 
https://github.com/python/cpython/blob/master/Lib/encodings/__init__.py#L43

Please note that external codec packages should not rely on the semantics of 
the Python stdlib encodings package's search function. They should really 
register their own search function: 
https://docs.python.org/3.9/library/codecs.html#codecs.register

It's good practice to always only use ASCII lower case chars and the underscore 
for codec names.

--

___
Python tracker 

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



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

2020-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

It seems quite easy to update latexcodec project to support Python 3.9. I 
proposed a solution there:
https://bugzilla.redhat.com/show_bug.cgi?id=1789613#c6

--

___
Python tracker 

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



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

2020-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

> The change is backwards incompatible and a backport would break things. See 
> for example how it breaks latexcodec:

I reopen the issue. I proposed PR 17997 to *document* the incompatible change 
in What's New in Python 3.8. IMO it's a deliberate change and it's correct.

I rely on Marc-Andre Lemburg who implemented codecs and encodings modules. He 
wrote: "Jordon is right. Conversion has to be to underscores, not hyphens.".

--
resolution: fixed -> 
status: closed -> open

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



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

2020-01-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +17401
pull_request: https://github.com/python/cpython/pull/17997

___
Python tracker 

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



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

2020-01-14 Thread Miro Hrončok

Miro Hrončok  added the comment:

The change is backwards incompatible and a backport would break things. See for 
example how it breaks latexcodec:

https://bugzilla.redhat.com/show_bug.cgi?id=1789613#c2

--
nosy: +hroncok

___
Python tracker 

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



[issue39155] "utf8-sig" missing from codecs (inconsistency)

2019-12-29 Thread Peter Ludemann


New submission from Peter Ludemann :

In general, 'utf8' and 'utf-8' are interchangeable in the codecs (and in many 
parts of the Python library). However, 'utf8-sig' is missing ... and it happens 
to also be generated by lib2to3.tokenize.detect_encoding.

>>> import codecs
>>> codecs.getincrementaldecoder('utf-8-sig')()

>>> codecs.getincrementaldecoder('utf8-sig')()
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.6/codecs.py", line 987, in getincrementaldecoder
decoder = lookup(encoding).incrementaldecoder
LookupError: unknown encoding: utf8-sig

--
components: Unicode
messages: 358996
nosy: Peter Ludemann, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: "utf8-sig" missing from codecs (inconsistency)
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

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



[issue39154] "utf8-sig" missing from codecs (inconsistency)

2019-12-29 Thread Peter Ludemann


New submission from Peter Ludemann :

In general, 'utf8' and 'utf-8' are interchangeable in the codecs (and in many 
parts of the Python library). However, 'utf8-sig' is missing ... and it happens 
to also be generated by lib2to3.tokenize.detect_encoding.

>>> import codecs
>>> codecs.getincrementaldecoder('utf-8-sig')()

>>> codecs.getincrementaldecoder('utf8-sig')()
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.6/codecs.py", line 987, in getincrementaldecoder
decoder = lookup(encoding).incrementaldecoder
LookupError: unknown encoding: utf8-sig

--
components: Unicode
messages: 358994
nosy: Peter Ludemann, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: "utf8-sig" missing from codecs (inconsistency)
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

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



[issue38056] Overhaul Error Handlers section in codecs documentation

2019-10-12 Thread Ma Lin


Ma Lin  added the comment:

PR 15732 became an overhaul:

- replace/backslashreplace/surrogateescape were wrongly described as encoding 
only, in fact they can also be used in decoding.
- clarify the description of surrogatepass.
- add more descriptions to each handler.
- add two REPL examples.
- add indexes for Error Handler's name.
- add default parameter values in codecs.rst
- improve term "text encoding".

PR 15732 has a screenshot of the Error Handlers section.

--
components: +Unicode
nosy: +ezio.melotti, vstinner
title: Add examples for common text encoding Error Handlers -> Overhaul Error 
Handlers section in codecs documentation

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



[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 

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



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

2019-08-21 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks for the fix Jordon Xu.

IMHO this change is not strictly a bugfix, but more like an enhancement. I 
close the issue.

If you consider that a backport to Python 3.7 and 3.8 is needed, please say so.

--
resolution:  -> fixed
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



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

2019-08-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 20f59fe1f7748ae899aceee4cb560e5e1f528a1f by Victor Stinner 
(Jordon Xu) in branch 'master':
bpo-37751: Fix codecs.lookup() normalization (GH-15092)
https://github.com/python/cpython/commit/20f59fe1f7748ae899aceee4cb560e5e1f528a1f


--

___
Python tracker 

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



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

2019-08-12 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Jordon is right. Conversion has to be to underscores, not hyphens. I guess this 
bug was introduced when the normalization function was converted to C.

--
nosy: +lemburg

___
Python tracker 

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



[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/cpython/blob/master/Python/codecs.c#L53  
No.4 https://github.com/python/cpython/blob/master/Python/codecs.c#74

--

___
Python tracker 

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



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

2019-08-03 Thread hai shi


hai shi  added the comment:

Hm, there is a bit misleading between 
desc(https://github.com/python/cpython/blob/master/Python/codecs.c#L53) and the 
code (https://github.com/python/cpython/blob/master/Python/codecs.c#L74).

--
nosy: +shihai1991

___
Python tracker 

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



[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 

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



[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 

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



[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) Lookup

--
components: Unicode
messages: 348953
nosy: ezio.melotti, qigangxu, vstinner
priority: normal
severity: normal
status: open
title: In codecs,  function 'normalizestring' should convert both spaces and 
hyphens to underscores.
type: behavior
versions: Python 3.9

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



[issue8898] The email package should defer to the codecs module for all aliases

2019-07-29 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is not newcomer friendly, I remove the easy keyword.

--
keywords:  -easy
nosy: +vstinner

___
Python tracker 

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



[issue36530] Document codecs decode_encode() and encode_decode() APIs

2019-04-04 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> duplicate
stage: needs patch -> 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



[issue36530] Document codecs decode_encode() and encode_decode() APIs

2019-04-04 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
superseder:  -> Missing documentation for codecs.escape_decode

___
Python tracker 

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



[issue36530] Document codecs decode_encode() and encode_decode() APIs

2019-04-04 Thread Gregory P. Smith


New submission from Gregory P. Smith :

The codecs module has public decode_encode() and encode_decode() functions.  
They have never been documented, but are recommended for some uses such as:

https://stackoverflow.com/questions/14820429/how-do-i-decodestring-escape-in-python3/23151714#23151714

As public APIs, we should document them.

--
assignee: docs@python
components: Documentation
messages: 339467
nosy: docs@python, gregory.p.smith, njs
priority: normal
severity: normal
stage: needs patch
status: open
title: Document codecs decode_encode() and encode_decode() APIs
versions: Python 3.7, Python 3.8

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



[issue13830] codecs error handler is called with a UnicodeDecodeError with the same args

2018-02-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

For reference, this behavior was from beginning, since implementing PEP 293 in 
issue432401.

--

___
Python tracker 

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



[issue13830] codecs error handler is called with a UnicodeDecodeError with the same args

2018-02-28 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue12512] codecs: StreamWriter issues with stateful codecs after a seek or with append mode

2017-06-27 Thread STINNER Victor

STINNER Victor added the comment:

Sorry, I just lost track of this issue and so will just close it.

--
resolution:  -> out of date
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



[issue28543] Incomplete fast path codecs aliases in codecs doc

2016-11-06 Thread Berker Peksag

Berker Peksag added the comment:

This is a duplicate of issue 28393.

--
nosy: +berker.peksag
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Update encoding lookup docs wrt #27938
type: enhancement -> behavior

___
Python tracker 

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



[issue28543] Incomplete fast path codecs aliases in codecs doc

2016-10-27 Thread Xiang Zhang

New submission from Xiang Zhang:

The fast path codec aliases in codecs doc is complete especially after 
99818330b4c0.

--
assignee: docs@python
components: Documentation
files: codecs_doc.patch
keywords: patch
messages: 279538
nosy: docs@python, haypo, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: Incomplete fast path codecs aliases in codecs doc
type: enhancement
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45241/codecs_doc.patch

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue28543>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-07 Thread STINNER Victor

STINNER Victor added the comment:

Feel free to document the change. It's not my patch, it's yours :-)

--

___
Python tracker 

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



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Victor! I benchmarked your patch. There is no regression in comparison 
with my patch. In few cases your patch is even faster!

UnpatchedPatch v.4Patch v.5

148 (+76%)   235 (+11%)   260decode  unicode-escape  'A'*1
197 (+30%)   257 (+0%)257decode  unicode-escape  '\x80'*1
195 (+32%)   232 (+11%)   258decode  unicode-escape'\x80'+'A'*
227 (+39%)   308 (+2%)315decode  unicode-escape  '\u0100'*1
197 (+56%)   241 (+27%)   307decode  unicode-escape'\u0100'+'A'*
201 (+35%)   264 (+3%)271decode  unicode-escape'\u0100'+'\x80'*
227 (+39%)   308 (+2%)315decode  unicode-escape  '\u8000'*1
197 (+56%)   241 (+27%)   307decode  unicode-escape'\u8000'+'A'*
201 (+35%)   264 (+3%)271decode  unicode-escape'\u8000'+'\x80'*
227 (+39%)   308 (+2%)315decode  unicode-escape
'\u8000'+'\u0100'*
200 (+26%)   245 (+2%)251decode  unicode-escape  '\U0001'*1
192 (+38%)   230 (+15%)   265decode  unicode-escape'\U0001'+'A'*
167 (+26%)   203 (+4%)211decode  unicode-escape
'\U0001'+'\x80'*
194 (+31%)   248 (+2%)254decode  unicode-escape
'\U0001'+'\u0100'*
194 (+31%)   247 (+3%)254decode  unicode-escape
'\U0001'+'\u8000'*

197 (+9%)214 (+0%)215decode  raw-unicode-escape  'A'*1
197 (+9%)214 (+0%)214decode  raw-unicode-escape  '\x80'*1
197 (+9%)214 (+0%)214decode  raw-unicode-escape'\x80'+'A'*
216 (+68%)   365 (-1%)363decode  raw-unicode-escape  '\u0100'*1
181 (+43%)   262 (-1%)259decode  raw-unicode-escape'\u0100'+'A'*
181 (+43%)   264 (-2%)258decode  raw-unicode-escape
'\u0100'+'\x80'*
216 (+68%)   365 (-1%)363decode  raw-unicode-escape  '\u8000'*1
181 (+43%)   261 (-1%)259decode  raw-unicode-escape'\u8000'+'A'*
181 (+43%)   263 (-2%)258decode  raw-unicode-escape
'\u8000'+'\x80'*
216 (+68%)   365 (-1%)363decode  raw-unicode-escape
'\u8000'+'\u0100'*
245 (+29%)   313 (+1%)315decode  raw-unicode-escape  '\U0001'*1
211 (+10%)   195 (+19%)   232decode  raw-unicode-escape
'\U0001'+'A'*
211 (+10%)   195 (+19%)   233decode  raw-unicode-escape
'\U0001'+'\x80'*
192 (+51%)   287 (+1%)289decode  raw-unicode-escape
'\U0001'+'\u0100'*
192 (+51%)   287 (+1%)289decode  raw-unicode-escape
'\U0001'+'\u8000'*


269 (+73%)   424 (+10%)   465encode  unicode-escape  'A'*1
266 (+108%)  591 (-6%)553encode  unicode-escape  '\x80'*1
298 (+55%)   423 (+9%)463encode  unicode-escape'\x80'+'A'*
358 (+93%)   695 (-0%)692encode  unicode-escape  '\u0100'*1
190 (+13%)   215 (+0%)215encode  unicode-escape'\u0100'+'A'*
235 (+109%)  520 (-5%)492encode  unicode-escape'\u0100'+'\x80'*
342 (+102%)  695 (-1%)691encode  unicode-escape  '\u8000'*1
190 (+13%)   215 (+0%)215encode  unicode-escape'\u8000'+'A'*
235 (+109%)  520 (-5%)492encode  unicode-escape'\u8000'+'\x80'*
367 (+89%)   698 (-1%)694encode  unicode-escape
'\u8000'+'\u0100'*
531 (+124%)  915 (+30%)   1190   encode  unicode-escape  '\U0001'*1
196 (+20%)   235 (+0%)236encode  unicode-escape'\U0001'+'A'*
237 (+104%)  506 (-4%)484encode  unicode-escape
'\U0001'+'\x80'*
325 (+111%)  681 (+1%)687encode  unicode-escape
'\U0001'+'\u0100'*
325 (+117%)  681 (+3%)704encode  unicode-escape
'\U0001'+'\u8000'*

578 (+853%)  5672 (-3%)   5507   encode  raw-unicode-escape  'A'*1
578 (+731%)  4761 (+1%)   4806   encode  raw-unicode-escape  '\x80'*1
581 (+760%)  5218 (-4%)   4995   encode  raw-unicode-escape'\x80'+'A'*
365 (+96%)   714 (+0%)714encode  raw-unicode-escape  '\u0100'*1
226 (+72%)   389 (+0%)389encode  raw-unicode-escape'\u0100'+'A'*
226 (+72%)   389 (+0%)389encode  raw-unicode-escape
'\u0100'+'\x80'*
373 (+91%)   715 (-0%)714encode  raw-unicode-escape  '\u8000'*1
226 (+72%)   389 (+0%)389encode  raw-unicode-escape'\u8000'+'A'*
226 (+72%)   389 (+0%)389encode  raw-unicode-escape
'\u8000'+'\x80'*
366 (+96%)   718 (+0%)719encode  raw-unicode-escape
'\u8000'+'\u0100'*
537 (+110%)  879 (+28%)   1128   encode  raw-unicode-escape  '\U0001'*1
214 (+37%)   293 (+0%)294encode  raw-unicode-escape
'\U0001'+'A'*
214 (+37%)   293 (+0%)294encode  raw-unicode-escape
'\U0001'+'\x80'*
342 (+96%)   669 (+0%)669encode  raw-unicode-escape
'\U0001'+'\u0100'*
342 (+96%)   669 (+0%)669encode  raw-unicode-escape

[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-06 Thread STINNER Victor

STINNER Victor added the comment:

Since it's almost the 3.6 beta 1, I chose to push the change right now. I'm 
sure that it's faster, I trust your benchmarks ;-)

Thanks Serhiy for this nice enhancement.


> > * Rename WRITECHAR macro to WRITE_ASCII_CHAR()

> This is not correct name. This macro is used for writing non-ascii characters 
> too.

Oh, I fixed this in the pushed change.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ad5a28ace615 by Victor Stinner in branch 'default':
Optimize unicode_escape and raw_unicode_escape
https://hg.python.org/cpython/rev/ad5a28ace615

--
nosy: +python-dev

___
Python tracker 

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



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-02 Thread STINNER Victor

STINNER Victor added the comment:

> Did you benchmark this change? I afraid that this inflates execution code 
> size and can have negative impact on the performance.

I consider that readability (maintainability) matters more than such micro 
optimization.

--

___
Python tracker 

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



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Unicode escape encodecs were modified by the issue #25353 to use the
> _PyBytesWriter API. Sadly, I didn't benchmark my change before pushing it
> :-/

You can benchmark it now by checking out revisions with your patch and just 
before. But AFAIK the performance was not changed since 3.3 and the effect of 
your patch is the difference between columns 3.3 and 3.6 (very good).

I used scripts from https://bitbucket.org/storchaka/cpython-stuff/src/default/
bench/ .

> Your patch basically reverts my change.
> 
> > Py3.2Py3.3Py3.6Py3.6+patch
> > 195 (+136%)  109 (+323%)  258 (+79%)   461encode  unicode-escape 
> > 'A'*1 391 (+1310%) 333 (+1556%) 575 (+859%)  5514   encode 
> > raw-unicode-escape  'A'*1

> I'm surprised that the revert makes raw-unicode-escape encoder so much
> faster. Does it mean that the _PyBytesWriter API is so inefficient?

I don't remember all details, but it seems that after applying all 
optimizations _PyBytesWriter became just not needed (unlike to 
_PyUnicodeWriter that is used for widening a buffer).

The awesome difference in encoding for ascii-only data is not related to using 
_PyBytesWriter. It is caused by reordering checks in the inner loop.

> * Rename WRITECHAR macro to WRITE_ASCII_CHAR()

This is not correct name. This macro is used for writing non-ascii characters 
too.

> * Add WRITE_CHAR() macro to avoid "goto writechar;"
> * Drop the "store" label: use WRITE_CHAR() macro instead,

Did you benchmark this change? I afraid that this inflates execution code size 
and can have negative impact on the performance.

--

___
Python tracker 

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



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-02 Thread STINNER Victor

STINNER Victor added the comment:

I rebased faster_unicode_escape_4.patch and made tiny changes:

* Rename WRITECHAR macro to WRITE_ASCII_CHAR()
* Add WRITE_CHAR() macro to avoid "goto writechar;"
* Drop the "store" label: use WRITE_CHAR() macro instead, expect that getcode() 
only returns valid unicode characters (<= MAX_UNICODE)
* For \U format: since MAX_UNICODE is 0x10, hardcode the first two 
digits as 0, and add an assertion on MAX_UNICODE value
* PEP 7: add {...} on if/else blocks

--
Added file: http://bugs.python.org/file44348/faster_unicode_escape_5.patch

___
Python tracker 

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



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-09-02 Thread STINNER Victor

STINNER Victor added the comment:

Unicode escape encodecs were modified by the issue #25353 to use the 
_PyBytesWriter API. Sadly, I didn't benchmark my change before pushing it :-/

Your patch basically reverts my change.

> Py3.2Py3.3Py3.6Py3.6+patch
> 195 (+136%)  109 (+323%)  258 (+79%)   461encode  unicode-escape  
> 'A'*1
> 391 (+1310%) 333 (+1556%) 575 (+859%)  5514   encode  raw-unicode-escape  
> 'A'*1

I'm surprised that the revert makes raw-unicode-escape encoder so much faster. 
Does it mean that the _PyBytesWriter API is so inefficient?

The most efficient case for _PyBytesWriter is when you only call 
_PyBytesWriter_Alloc() and _PyBytesWriter_Finish() and the output string has 
exactly the allocated length. It should be the case when 'A'*1 is encoded, 
no?

--

___
Python tracker 

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



[issue20132] Many incremental codecs don’t handle fragmented data

2016-08-19 Thread Martin Panter

Martin Panter added the comment:

Split off Issue 27799 for the base-64 incremental decoder

--
dependencies: +Fix base64-codec and bz2-codec incremental decoders

___
Python tracker 

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



[issue16334] Faster unicode-escape and raw-unicode-escape codecs

2016-06-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Victor's patch harvested most fruits, but there is a place for further 
optimization.

Benchmark results for new patch:

Py3.2Py3.3Py3.6Py3.6+patch

451 (-47%)   77 (+209%)   140 (+70%)   238decode  unicode-escape  'A'*1
269 (-14%)   161 (+44%)   187 (+24%)   232decode  unicode-escape  
'\x80'*1
453 (-48%)   85 (+178%)   181 (+30%)   236decode  unicode-escape
'\x80'+'A'*
295 (-4%)185 (+54%)   229 (+24%)   284decode  unicode-escape  
'\u0100'*1
452 (-47%)   75 (+221%)   213 (+13%)   241decode  unicode-escape
'\u0100'+'A'*
275 (-11%)   149 (+64%)   187 (+30%)   244decode  unicode-escape
'\u0100'+'\x80'*
297 (-4%)185 (+54%)   230 (+23%)   284decode  unicode-escape  
'\u8000'*1
452 (-47%)   75 (+221%)   213 (+13%)   241decode  unicode-escape
'\u8000'+'A'*
275 (-11%)   149 (+64%)   187 (+30%)   244decode  unicode-escape
'\u8000'+'\x80'*
295 (-3%)185 (+54%)   230 (+24%)   285decode  unicode-escape
'\u8000'+'\u0100'*
318 (-29%)   203 (+11%)   220 (+2%)225decode  unicode-escape  
'\U0001'*1
452 (-51%)   72 (+207%)   163 (+36%)   221decode  unicode-escape
'\U0001'+'A'*
275 (-31%)   128 (+49%)   160 (+19%)   191decode  unicode-escape
'\U0001'+'\x80'*
295 (-36%)   164 (+16%)   201 (-5%)190decode  unicode-escape
'\U0001'+'\u0100'*
297 (-36%)   166 (+14%)   199 (-5%)190decode  unicode-escape
'\U0001'+'\u8000'*

559 (-62%)   88 (+143%)   194 (+10%)   214decode  raw-unicode-escape  
'A'*1
555 (-62%)   88 (+142%)   195 (+9%)213decode  raw-unicode-escape  
'\x80'*1
559 (-62%)   88 (+142%)   195 (+9%)213decode  raw-unicode-escape
'\x80'+'A'*
265 (+29%)   133 (+156%)  212 (+61%)   341decode  raw-unicode-escape  
'\u0100'*1
563 (-54%)   77 (+235%)   195 (+32%)   258decode  raw-unicode-escape
'\u0100'+'A'*
559 (-54%)   77 (+234%)   194 (+32%)   257decode  raw-unicode-escape
'\u0100'+'\x80'*
269 (+27%)   138 (+147%)  208 (+64%)   341decode  raw-unicode-escape  
'\u8000'*1
562 (-54%)   77 (+235%)   193 (+34%)   258decode  raw-unicode-escape
'\u8000'+'A'*
559 (-54%)   77 (+234%)   194 (+32%)   257decode  raw-unicode-escape
'\u8000'+'\x80'*
265 (+29%)   138 (+147%)  208 (+64%)   341decode  raw-unicode-escape
'\u8000'+'\u0100'*
281 (-13%)   152 (+61%)   228 (+7%)244decode  raw-unicode-escape  
'\U0001'*1
562 (-65%)   74 (+164%)   200 (-2%)195decode  raw-unicode-escape
'\U0001'+'A'*
557 (-65%)   74 (+162%)   200 (-3%)194decode  raw-unicode-escape
'\U0001'+'\x80'*
265 (-2%)122 (+114%)  184 (+42%)   261decode  raw-unicode-escape
'\U0001'+'\u0100'*
269 (-3%)122 (+113%)  185 (+41%)   260decode  raw-unicode-escape
'\U0001'+'\u8000'*


195 (+136%)  109 (+323%)  258 (+79%)   461encode  unicode-escape  'A'*1
673 (-23%)   522 (-1%)254 (+103%)  516encode  unicode-escape  
'\x80'*1
197 (+134%)  132 (+248%)  247 (+86%)   460encode  unicode-escape
'\x80'+'A'*
869 (-22%)   627 (+9%)333 (+105%)  682encode  unicode-escape  
'\u0100'*1
197 (-19%)   124 (+28%)   158 (+1%)159encode  unicode-escape
'\u0100'+'A'*
669 (-35%)   493 (-12%)   236 (+83%)   432encode  unicode-escape
'\u0100'+'\x80'*
866 (-20%)   628 (+10%)   333 (+108%)  692encode  unicode-escape  
'\u8000'*1
197 (-19%)   125 (+27%)   158 (+1%)159encode  unicode-escape
'\u8000'+'A'*
669 (-35%)   492 (-12%)   236 (+83%)   433encode  unicode-escape
'\u8000'+'\x80'*
869 (-20%)   627 (+11%)   324 (+114%)  694encode  unicode-escape
'\u8000'+'\u0100'*
870 (-1%)897 (-4%)501 (+72%)   861encode  unicode-escape  
'\U0001'*1
197 (+20%)   139 (+70%)   234 (+1%)236encode  unicode-escape
'\U0001'+'A'*
668 (-27%)   533 (-9%)249 (+96%)   487encode  unicode-escape
'\U0001'+'\x80'*
869 (-12%)   646 (+18%)   344 (+122%)  764encode  unicode-escape
'\U0001'+'\u0100'*
864 (-12%)   643 (+19%)   344 (+122%)  762encode  unicode-escape
'\U0001'+'\u8000'*

391 (+1310%) 333 (+1556%) 575 (+859%)  5514   encode  raw-unicode-escape  
'A'*1
391 (+1229%) 334 (+1456%) 576 (+802%)  5198   encode  raw-unicode-escape  
'\x80'*1
391 (+1402%) 335 (+1653%) 579 (+914%)  5873   encode  raw-unicode-escape
'\x80'+'A'*
869 (-25%)   687 (-5%)356 (+83%)   652encode  raw-unicode-escape  
'\u0100'*1
391 (+46%)   158 (+260%)  214 (+166%)  569encode  raw-unicode-escape
'\u0100'+'A'*
391 (+46%)   158 (+260%)  214 (+166%)  569encode  raw-unicode-escape
'\u0100'+'\x80'*
873 (-25%)   682 (-4%)356 (+83%)   652

[issue25788] fileinput.hook_encoded has no way to pass arguments to codecs

2016-04-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Committed with some changes. Thank you for your contribution Joseph.

--
resolution:  -> fixed
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



  1   2   3   4   5   6   7   8   9   >