New submission from Antoine Pitrou <pit...@free.fr>: In 2.x, os.getcwd() uses a dynamic allocation scheme to accomodate whatever buffer size the current path needs to be represented.
In 3.x, the max path length is hardcoded to 1026 bytes or characters, and an error is raised if the current path length is larger than that. Even on systems where MAX_PATH is 1024 (a common value), it is still valid to create paths larger than that (using e.g. os.mkdir()). The attached script shows that os.getcwd() works with a 1032-character path in 2.x, but fails in 3.x. ---------- components: Extension Modules files: bigpath.py messages: 110177 nosy: haypo, loewis, pitrou, skrah priority: normal severity: normal stage: needs patch status: open title: os.getcwd() hardcodes max path len type: behavior versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17983/bigpath.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9246> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com