[Python-Dev] Pathlib enhancements - acceptable inputs and outputs for fspath and os.fspath() (original) (raw)
Antoine Pitrou antoine at python.org
Mon Apr 11 13:48:51 EDT 2016
- Previous message (by thread): [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()
- Next message (by thread): [Python-Dev] PEP 506 secrets module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ethan Furman <ethan stoneleaf.us> writes:
On 04/11/2016 07:56 AM, Antoine Pitrou wrote: >> 2) pathlib.Path accepts bytes -- > > Does it? Or are you proposing such a change? It used to (I posted a couple examples from 3.5.0). I finally rebuilt with the latest and it no longer does.
This is surprising, since in its entire lifetime, pathlib was never supposed to support bytes inputs. See the argument check in the initial checkin of pathlib.py: https://hg.python.org/cpython/rev/43377dcfb801/#l6.571
Perhaps that slipped through at some point (and obviously no test was there to prevent it :-)).
Regards
Antoine.
- Previous message (by thread): [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()
- Next message (by thread): [Python-Dev] PEP 506 secrets module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]