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

Adjust Windows DLL search path for Python 3.8+ #1440

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

JGamache-autodesk
Copy link
Contributor

Fixes #1439

Required by python/cpython#80266

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 4, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@JGamache-autodesk JGamache-autodesk deleted the adsk/bugfix/module_path_fix_python_3_8 branch August 4, 2023 15:45
@JGamache-autodesk JGamache-autodesk restored the adsk/bugfix/module_path_fix_python_3_8 branch August 4, 2023 15:45
@JGamache-autodesk JGamache-autodesk deleted the adsk/bugfix/module_path_fix_python_3_8 branch August 4, 2023 15:47
@JGamache-autodesk JGamache-autodesk restored the adsk/bugfix/module_path_fix_python_3_8 branch August 4, 2023 17:51
# - https://docs.python.org/3.8/library/os.html#os.add_dll_directory
import os
import sys
if sys.platform == "win32" and sys.version_info >= (3, 8):

Choose a reason for hiding this comment

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

Should we handle Python less than 3.8 by appending to PATH or sys.path?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably not. It was never done before and this code only became necessary in 3.8 when accessing PATH for library lookups was disabled because it was quite a large security risk.

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.

Python bindings not working on Windows with Python 3.8+
3 participants