Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-76023: WinFSP giving WinError 1005 fix (Python 3.14.0a3) #128328

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 5 commits into from
May 19, 2025

Conversation

BecoKo
Copy link
Contributor

@BecoKo BecoKo commented Dec 29, 2024

Make os.path.realpath to ignore WinError 1005 in non-strict mode. (Tested on Python 3.14.0a3 on Windows 11)

Cryptomator issue
python related issue

In cryptomator running WinFSP volume as administrator and make encrypted volumes available to all users, is not recommended.

This is retry of PR#128316 to Python 3.11 . (It seems that this is not a security issue.)

…contain a recognized file system

Make os.path.realpath to ignore WinError 1005 in non-strict mode. Issue: cryptomator/cryptomator#2359
@bedevere-app
Copy link

bedevere-app bot commented Dec 29, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@picnixz
Copy link
Member

picnixz commented Dec 29, 2024

(It seems that this is not a security issue.)

FTR, we usually make PRs against main and then we decide where we will backport them. We don't make PRs (except backports) against a past branch in general (because if there is an issue in an older branch, this issue usually remains...).

@ZeroIntensity ZeroIntensity requested a review from zooba December 30, 2024 18:04
@ZeroIntensity ZeroIntensity added OS-windows needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Dec 30, 2024
Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

Can we add a test?

@zooba
Copy link
Member

zooba commented Jan 1, 2025

Can we add a test?

Not trivially - we'd have to (automatically) set up a file system that exhibits this characteristic. But the overall mechanism (non-strict resolution) should be tested well enough.

With the NEWS entry (I suggest Make :meth:`os.path.realpath` ignore Windows error 1005 when in non-strict mode), this is good to go.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. But could you please add a NEWS entry? If this issues bothers users, they will be happy to read that the bug was fixed.

@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) May 19, 2025 09:05
@serhiy-storchaka serhiy-storchaka merged commit d55e11b into python:main May 19, 2025
39 checks passed
@miss-islington-app
Copy link

Thanks @BecoKo for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 19, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 19, 2025
@bedevere-app
Copy link

bedevere-app bot commented May 19, 2025

GH-134203 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 19, 2025
@bedevere-app
Copy link

bedevere-app bot commented May 19, 2025

GH-134204 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 19, 2025
serhiy-storchaka pushed a commit that referenced this pull request May 19, 2025
…-strict mode (GH-128328) (GH-134204)

(cherry picked from commit d55e11b)

Co-authored-by: BecoKo <[email protected]>
serhiy-storchaka pushed a commit that referenced this pull request May 19, 2025
…-strict mode (GH-128328) (GH-134203)

(cherry picked from commit d55e11b)

Co-authored-by: BecoKo <[email protected]>
@bedevere-bot
Copy link

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

Hi! The buildbot AMD64 Windows Server 2022 NoGIL 3.13 (tier-1) has failed when building commit ea9c962.

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/#/builders/1488/builds/1316) and take a look at the build logs.
  4. Check if the failure is related to this commit (ea9c962) 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/#/builders/1488/builds/1316

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

Click to see traceback logs
remote: Enumerating objects: 9, done.        
remote: Counting objects:  12% (1/8)        
remote: Counting objects:  25% (2/8)        
remote: Counting objects:  37% (3/8)        
remote: Counting objects:  50% (4/8)        
remote: Counting objects:  62% (5/8)        
remote: Counting objects:  75% (6/8)        
remote: Counting objects:  87% (7/8)        
remote: Counting objects: 100% (8/8)        
remote: Counting objects: 100% (8/8), done.        
remote: Total 9 (delta 7), reused 7 (delta 7), pack-reused 1 (from 1)        
From https://github.com/python/cpython
 * branch                    3.13       -> FETCH_HEAD
Note: switching to 'ea9c9623f0db4fe8bdf76f5a814db9e6230ebea3'.

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 ea9c9623f0d [3.13] gh-76023: Make os.path.realpath to ignore WinError 1005 in non-strict mode (GH-128328) (GH-134204)
Switched to and reset branch '3.13'

Could Not Find C:\Users\Administrator\buildarea\3.13.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\*.pyc
The system cannot find the file specified.
Could Not Find C:\Users\Administrator\buildarea\3.13.itamaro-win64-srv-22-aws.x64.nogil\build\PCbuild\python*.zip

Could Not Find C:\Users\Administrator\buildarea\3.13.itamaro-win64-srv-22-aws.x64.nogil\build\Lib\*.pyc
The system cannot find the file specified.
Could Not Find C:\Users\Administrator\buildarea\3.13.itamaro-win64-srv-22-aws.x64.nogil\build\PCbuild\python*.zip

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.

6 participants