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

Loading _sqlite3 fails with MSYSTEM not set and /bin not in PATH #141

Closed
lazka opened this issue Jul 28, 2023 · 3 comments · Fixed by #144
Closed

Loading _sqlite3 fails with MSYSTEM not set and /bin not in PATH #141

lazka opened this issue Jul 28, 2023 · 3 comments · Fixed by #144

Comments

@lazka
Copy link
Member

lazka commented Jul 28, 2023

Noticed because this makes one test in the meson test suite fail:

git clone https://github.com/mesonbuild/meson
cd meson
MSYSTEM= python3 run_unittests.py -n0 test_vsenv_option

With Python 3.11.4 and empty MSYSTEM things fail:

$ PATH= MSYSTEM= /ucrt64/bin/python3.exe -c "import _sqlite3; print(_sqlite3)"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.

$ PATH= /ucrt64/bin/python3.exe -c "import _sqlite3; print(_sqlite3)"
<module '_sqlite3' from 'C:/msys64/ucrt64/lib/python3.11/lib-dynload/_sqlite3.cp311-mingw_x86_64_ucrt.pyd'>

With Python 3.10.12 both cases work:

$ PATH= MSYSTEM= /ucrt64/bin/python3.exe -c "import _sqlite3; print(_sqlite3)"
<module '_sqlite3' from 'C:\\msys64\\ucrt64\\lib\\python3.10\\lib-dynload\\_sqlite3.cp310-mingw_x86_64_ucrt.pyd'>

$ PATH= /ucrt64/bin/python3.exe -c "import _sqlite3; print(_sqlite3)"
<module '_sqlite3' from 'C:/msys64/ucrt64/lib/python3.10/lib-dynload/_sqlite3.cp310-mingw_x86_64_ucrt.pyd'>
@lazka
Copy link
Member Author

lazka commented Jul 28, 2023

@naveen521kk do you have any ideas?

I guess related to getpath.py?

@lazka

This comment was marked as off-topic.

@lazka lazka changed the title Loading pyd modules fails with MSYSTEM not set and /bin not in PATH Loading _sqlite3 fails with MSYSTEM not set and /bin not in PATH Jul 28, 2023
lazka added a commit to lazka/meson that referenced this issue Jul 28, 2023
For some (atm unknown) reason mingw Python fails to load some modules
when the prefix is removed from PATH, like in this test.

Skip for now to make the test suite pass again. Once
msys2-contrib/cpython-mingw#141 is fixed
this can be reverted.
@lazka
Copy link
Member Author

lazka commented Jul 28, 2023

I've created a meson branch to skip the failing test, in case we update before this is fixed: https://github.com/lazka/meson/tree/msys2-python311-upgrade

edit: we did, so mesonbuild/meson#12049

lazka added a commit to lazka/meson that referenced this issue Jul 29, 2023
For some (atm unknown) reason mingw Python fails to load some modules
when MSYS2 is removed from PATH, like in this test.

Skip for now to make the test suite pass again. Once
msys2-contrib/cpython-mingw#141 is fixed
this can be reverted.
eli-schwartz pushed a commit to mesonbuild/meson that referenced this issue Jul 31, 2023
For some (atm unknown) reason mingw Python fails to load some modules
when MSYS2 is removed from PATH, like in this test.

Skip for now to make the test suite pass again. Once
msys2-contrib/cpython-mingw#141 is fixed
this can be reverted.
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Aug 5, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Aug 5, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Aug 5, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit that referenced this issue Aug 6, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
eli-schwartz pushed a commit to mesonbuild/meson that referenced this issue Aug 6, 2023
For some (atm unknown) reason mingw Python fails to load some modules
when MSYS2 is removed from PATH, like in this test.

Skip for now to make the test suite pass again. Once
msys2-contrib/cpython-mingw#141 is fixed
this can be reverted.

(cherry picked from commit 68dce66)
eli-schwartz pushed a commit to mesonbuild/meson that referenced this issue Aug 6, 2023
For some (atm unknown) reason mingw Python fails to load some modules
when MSYS2 is removed from PATH, like in this test.

Skip for now to make the test suite pass again. Once
msys2-contrib/cpython-mingw#141 is fixed
this can be reverted.

(cherry picked from commit 68dce66)
eli-schwartz pushed a commit to mesonbuild/meson that referenced this issue Aug 6, 2023
For some (atm unknown) reason mingw Python fails to load some modules
when MSYS2 is removed from PATH, like in this test.

Skip for now to make the test suite pass again. Once
msys2-contrib/cpython-mingw#141 is fixed
this can be reverted.

(cherry picked from commit 68dce66)
lazka pushed a commit that referenced this issue Aug 25, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
bruchar1 pushed a commit to bruchar1/meson that referenced this issue Aug 25, 2023
For some (atm unknown) reason mingw Python fails to load some modules
when MSYS2 is removed from PATH, like in this test.

Skip for now to make the test suite pass again. Once
msys2-contrib/cpython-mingw#141 is fixed
this can be reverted.
lazka pushed a commit that referenced this issue Aug 27, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
lazka added a commit to lazka/meson that referenced this issue Sep 3, 2023
xclaesse pushed a commit to mesonbuild/meson that referenced this issue Sep 14, 2023
lazka pushed a commit that referenced this issue Oct 2, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
lazka pushed a commit that referenced this issue Oct 2, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
robtaylor pushed a commit to robtaylor/meson that referenced this issue Oct 14, 2023
lazka pushed a commit that referenced this issue Dec 6, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
lazka pushed a commit that referenced this issue Dec 7, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Dec 31, 2023
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jan 1, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jan 1, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jan 1, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jan 1, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jan 1, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jan 1, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jan 1, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jan 1, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
lazka pushed a commit that referenced this issue Feb 10, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
lazka pushed a commit that referenced this issue Feb 12, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Feb 19, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Feb 19, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Feb 19, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Feb 21, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
lazka pushed a commit that referenced this issue Apr 11, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
lazka pushed a commit that referenced this issue Apr 12, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jul 11, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Jul 11, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit that referenced this issue Aug 5, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Sep 4, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit to naveen521kk/cpython that referenced this issue Sep 9, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes msys2-contrib#48
Also fixes msys2-contrib#141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
naveen521kk added a commit that referenced this issue Sep 9, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
lazka pushed a commit that referenced this issue Sep 10, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
lazka pushed a commit that referenced this issue Sep 10, 2024
This is the default behavior on upstream Python. We previously
reverted this behavior because it broke some use cases.

The old behavior can be restored by setting the environment variable
PYTHONLEGACYWINDOWSDLLLOADING to 1.

Fixes #48
Also fixes #141

Signed-off-by: Naveen M K <naveen521kk@gmail.com>
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 a pull request may close this issue.

1 participant