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 hauntsaninja
Recipients hauntsaninja
Date 2020-04-30.06:18:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588227495.91.0.144745322662.issue40447@roundup.psfhosted.org>
In-reply-to
Content
Python 3.9 added the stripdir argument to compileall functions. From https://docs.python.org/3.9/library/compileall.html#compileall.compile_file:
> The stripdir, prependdir and limit_sl_dest arguments correspond to the -s, -p and -e options described above. They may be specified as str, bytes or os.PathLike.

```
~ λ python3.9
Python 3.9.0a6+ (heads/master:360371f, Apr 29 2020, 15:44:56) 
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import compileall, pathlib
>>> compileall.compile_file(pathlib.Path("tmp/test.py"), stripdir=pathlib.Path("tmp"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/shantanu/.pyenv/versions/3.9-dev/lib/python3.9/compileall.py", line 161, in compile_file
    stripdir_parts = stripdir.split(os.path.sep)
AttributeError: 'PosixPath' object has no attribute 'split'
```

Found by Jelle Zijlstra in https://github.com/python/typeshed/pull/3956#discussion_r417735663
History
Date User Action Args
2020-04-30 06:18:15hauntsaninjasetrecipients: + hauntsaninja
2020-04-30 06:18:15hauntsaninjasetmessageid: <1588227495.91.0.144745322662.issue40447@roundup.psfhosted.org>
2020-04-30 06:18:15hauntsaninjalinkissue40447 messages
2020-04-30 06:18:15hauntsaninjacreate