This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients martin.panter, pitrou, serhiy.storchaka, vstinner
Date 2016-04-14.10:51:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460631073.66.0.688013652141.issue26754@psf.upfronthosting.co.za>
In-reply-to
Content
PyUnicode_FSDecoder() is used in following functions in the stdlib:

compile()
symtable.symtable()
parser.compile()
parser.compilest()
zipimporter.zipimporter()
_imp.load_dynamic() (before 3.5)

This is behavior of PyUnicode_FSDecoder() from the start (issue9542). All above functions accepted only str in 3.1, thus accepting bytes object and others was new feature.

None tests are failed if reject non-str and non-bytes argument in PyUnicode_FSDecoder(). But none tests are failed even if disable support of bytes argument (there is a lack of tests for bytes path).

What should we do?

1. Add a warning when the argument neither str nor supporting the buffer protocol.

2. Drop support of non-str and not supporting the buffer protocol arguments without a warning.

3. Drop support of non-str and not supporting the buffer protocol arguments without a warning, and add a warning when the argument neither str nor bytes.

4. Drop support of non-str and non-bytes arguments without a warning.
History
Date User Action Args
2016-04-14 10:51:13serhiy.storchakasetrecipients: + serhiy.storchaka, pitrou, vstinner, martin.panter
2016-04-14 10:51:13serhiy.storchakasetmessageid: <1460631073.66.0.688013652141.issue26754@psf.upfronthosting.co.za>
2016-04-14 10:51:13serhiy.storchakalinkissue26754 messages
2016-04-14 10:51:13serhiy.storchakacreate