Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix isabs() check in NodeInfo for Py 3.13 #4505

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

mwichmann
Copy link
Collaborator

Python 3.13 (alpha) changes the behavior of os.path.isabs on Windows. SCons has places where it does splitdrive on an absolute path, then checks if the path part is absolute - this answer is now False, which caused some interesting test fails. Do the check on the original path to get a more accurate answer. There may be more subtle issues with the Python change, but first fix the ones we can see.

Simplify the setup of _my_splitdrive a bit: every caller is supposed to check do_splitdrive before calling, but a couple of locations did not. Remove the special check for UNC support, all Python versions SCons runs on do UNC handling, so just eliminate that bit.

Fixes #4502, #4504.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt (and read the README.rst)
  • I have updated the appropriate documentation

Python 3.13 (alpha) changes the behavior of isabs() on Windows. SCons
has places where it does splitdrive on an absolute path, then checks
if the path part is absolute - this answer is now False, which caused
some interesting test fails.  Do the check on the original path to get
a more accurate answer.  There may be more subtle issues with the Python
change, but first fix the ones we can see.

Simplify the setup of _my_splitdrive() a bit: every caller is supposed to
check do_splitdrive but a couple of locations did not. Remove the special
check for UNC support, all Python versions SCons runs on do UNC handling,
so just eliminate that bit.

Fixes SCons#4502, SCons#4504.

Signed-off-by: Mats Wichmann <mats@linux.com>
@bdbaddog bdbaddog merged commit 7e64842 into SCons:master Mar 24, 2024
4 of 5 checks passed
@mwichmann mwichmann added this to the 4.8 milestone Mar 24, 2024
@mwichmann mwichmann deleted the py313-isabs branch March 24, 2024 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

testing: implicit cache issue as of Python 3.13a5
2 participants