Bug #1227
closedgenerate_packets.py: DeprecationWarning: pathlib.PurePath.is_reserved()
0%
Description
[6/781] Generating packets_server with a custom command
/fast/freeciv/S3_2/builds/mall32/../../src/common/generate_packets.py:46: DeprecationWarning: pathlib.PurePath.is_reserved() is deprecated and scheduled for removal in Python 3.15. Use os.path.isreserved() to detect reserved paths on Windows.
if path.is_reserved() or not path.name:
[12/781] Generating packets_client with a custom command
/fast/freeciv/S3_2/builds/mall32/../../src/common/generate_packets.py:46: DeprecationWarning: pathlib.PurePath.is_reserved() is deprecated and scheduled for removal in Python 3.15. Use os.path.isreserved() to detect reserved paths on Windows.
if path.is_reserved() or not path.name:
[14/781] Generating packets_common with a custom command
/fast/freeciv/S3_2/builds/mall32/../../src/common/generate_packets.py:46: DeprecationWarning: pathlib.PurePath.is_reserved() is deprecated and scheduled for removal in Python 3.15. Use os.path.isreserved() to detect reserved paths on Windows.
if path.is_reserved() or not path.name:
Files
Updated by Marko Lindqvist 27 days ago
- File 0031-generate_packets.py-Fix-deprecated-pathlib.PurePath..patch 0031-generate_packets.py-Fix-deprecated-pathlib.PurePath..patch added
- File 0017-generate_packets.py-Fix-deprecated-pathlib.PurePath..patch 0017-generate_packets.py-Fix-deprecated-pathlib.PurePath..patch added
- Status changed from New to In Review
- Assignee set to Marko Lindqvist
- Target version set to 3.2.0-RC1
Updated by Alina Lenk 26 days ago
I would just remove the check entirely; it's unlikely to ever do anything in practice, and if it does, it only makes the script exit a little earlier; it's not preventing any actual issue that would have repercussions. I originally added it mostly just because it technically did something useful and was trivial to do while remaining platform-agnostic, not because it would be necessary.
Updated by Marko Lindqvist 25 days ago
- File 0031-Remove-deprecated-pathlib.PurePath.is_reserved-usage.patch 0031-Remove-deprecated-pathlib.PurePath.is_reserved-usage.patch added
- File 0017-Remove-deprecated-pathlib.PurePath.is_reserved-usage.patch 0017-Remove-deprecated-pathlib.PurePath.is_reserved-usage.patch added
Alina Lenk wrote in #note-2:
I would just remove the check entirely;
Attached versions do that. Also fix similar case in generate_enums.py.