[issue38668] Update os.path documentation regarding recommended types

2022-04-01 Thread Jack DeVries


Change by Jack DeVries :


--
keywords: +patch
nosy: +jack__d
nosy_count: 2.0 -> 3.0
pull_requests: +30304
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/32232

___
Python tracker 

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



[issue38668] Update os.path documentation regarding recommended types

2019-11-02 Thread Christoph Reiter


New submission from Christoph Reiter :

At the very top of https://docs.python.org/3.9/library/os.path.html there is 
this section regarding str and bytes:

> The path parameters can be passed as either strings, or bytes.

They also accept path-like since Python 3.6, see 
https://www.python.org/dev/peps/pep-0519/ (Adding a file system path protocol). 
I'd add path-like to the list.

> Unfortunately, some file names may not be representable as strings on Unix, 
> so applications that need to support arbitrary file names on Unix should use 
> bytes objects to represent path names.

This is no longer true since Python 3.1 and 
https://www.python.org/dev/peps/pep-0383/ (Non-decodable Bytes in System 
Character Interfaces). I'd suggest to delete this.

> Vice versa, using bytes objects cannot represent all file names on Windows 
> (in the standard mbcs encoding), hence Windows applications should use string 
> objects to access all files.

This is no longer true since Python 3.6 and 
https://www.python.org/dev/peps/pep-0529/ (Change Windows filesystem encoding 
to UTF-8). I'd suggest to delete this as well.

--
assignee: docs@python
components: Documentation
messages: 355878
nosy: docs@python, lazka
priority: normal
severity: normal
status: open
title: Update os.path documentation regarding recommended types
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