Skip to content

gh-88013: ntpath.realpath may raise TypeError in some cases #102813

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

Merged
merged 4 commits into from
Apr 7, 2023

Conversation

aisk
Copy link
Contributor

@aisk aisk commented Mar 18, 2023

@aisk aisk force-pushed the realpath-typeerror branch from 225c518 to cd9c542 Compare March 20, 2023 06:19
Copy link
Member

@zooba zooba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Barney can merge now ;)

By the way, listdrives was only added in 3.12, so if we want to backport this we'll need an updated test.

@aisk aisk force-pushed the realpath-typeerror branch from 2bff9d8 to 87a542f Compare March 23, 2023 07:03
@aisk aisk force-pushed the realpath-typeerror branch from 87a542f to 8192b73 Compare March 23, 2023 08:35
@zooba
Copy link
Member

zooba commented Mar 23, 2023

@aisk No need to force push - we will always squash merge and rewrite the commit message here, and force pushes mean we can't see what was changed since the last review.

@aisk
Copy link
Contributor Author

aisk commented Mar 23, 2023

I just force push between reviews for clean

@aisk No need to force push - we will always squash merge and rewrite the commit message here, and force pushes mean we can't see what was changed since the last review.

Got it

@aisk aisk requested a review from barneygale March 30, 2023 11:46
Copy link
Contributor

@barneygale barneygale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@barneygale barneygale added needs backport to 3.10 only security fixes needs backport to 3.11 only security fixes labels Mar 30, 2023
@hugovk hugovk removed the needs backport to 3.10 only security fixes label Apr 7, 2023
@hugovk
Copy link
Member

hugovk commented Apr 7, 2023

I removed the 3.10 backport label because it's now getting security fixes only.

@barneygale Would you like to do the honours with the big green merge button? :)

@barneygale barneygale merged commit 4dc339b into python:main Apr 7, 2023
@miss-islington
Copy link
Contributor

Thanks @aisk for the PR, and @barneygale for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-103343 is a backport of this pull request to the 3.11 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 7, 2023
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Apr 7, 2023
@aisk aisk deleted the realpath-typeerror branch April 7, 2023 12:00
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 Fedora Stable Clang 3.x has failed when building commit 4dc339b.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/234/builds/3407) and take a look at the build logs.
  4. Check if the failure is related to this commit (4dc339b) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/234/builds/3407

Failed tests:

  • test_asyncio

Summary of the results of the build (if available):

==

Click to see traceback logs
remote: Enumerating objects: 11, done.        
remote: Counting objects:  11% (1/9)        
remote: Counting objects:  22% (2/9)        
remote: Counting objects:  33% (3/9)        
remote: Counting objects:  44% (4/9)        
remote: Counting objects:  55% (5/9)        
remote: Counting objects:  66% (6/9)        
remote: Counting objects:  77% (7/9)        
remote: Counting objects:  88% (8/9)        
remote: Counting objects: 100% (9/9)        
remote: Counting objects: 100% (9/9), done.        
remote: Compressing objects:  20% (1/5)        
remote: Compressing objects:  40% (2/5)        
remote: Compressing objects:  60% (3/5)        
remote: Compressing objects:  80% (4/5)        
remote: Compressing objects: 100% (5/5)        
remote: Compressing objects: 100% (5/5), done.        
remote: Total 11 (delta 4), reused 5 (delta 4), pack-reused 2        
From https://github.com/python/cpython
 * branch                  main       -> FETCH_HEAD
Note: switching to '4dc339b4d69195448207e1faecc3e258700daf33'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 4dc339b4d6 GH-88013: Fix TypeError raised by ntpath.realpath in some cases (GH-102813)
Switched to and reset branch 'main'

Timeout (0:15:00)!
Thread 0x0000ffff811a9020 (most recent call first):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/test_asyncio/test_tasks.py", line 137 in __del__
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/test_asyncio/test_tasks.py", line 142 in test_task_del_collect
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/case.py", line 589 in _callTestMethod
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/case.py", line 634 in run
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/case.py", line 690 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 122 in run
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/suite.py", line 84 in __call__
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/unittest/runner.py", line 240 in run
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/support/__init__.py", line 1106 in _run_suite
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/support/__init__.py", line 1232 in run_unittest
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/libregrtest/runtest.py", line 281 in _test_module
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/libregrtest/runtest.py", line 317 in _runtest_inner2
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/libregrtest/runtest.py", line 360 in _runtest_inner
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/libregrtest/runtest.py", line 235 in _runtest
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/libregrtest/runtest.py", line 265 in runtest
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/libregrtest/main.py", line 365 in rerun_failed_tests
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/libregrtest/main.py", line 783 in _main
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/libregrtest/main.py", line 738 in main
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/libregrtest/main.py", line 802 in main
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/test/__main__.py", line 2 in <module>
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/runpy.py", line 88 in _run_code
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/Lib/runpy.py", line 198 in _run_module_as_main
make: *** [Makefile:1951: buildbottest] Error 1

Cannot open file '/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.clang/build/test-results.xml' for upload

barneygale added a commit that referenced this pull request Apr 7, 2023
GH-102813, GH-103343)

(cherry picked from commit 4dc339b)

Co-authored-by: AN Long <[email protected]>
Co-authored-by: Barney Gale <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants