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

Setup: fix orjson import on frozen py3.8 #2458

Merged
merged 1 commit into from
Nov 13, 2023
Merged

Conversation

black-sliver
Copy link
Member

orjson has a .py entry point that imports from .orjson (from the DLL), which does not work on 3.8 if the DLL is not in the same folder as the .py. The changed import system in 3.9+ seems to allow this. Excluding it from libraries.zip will put both files into the same folder.

orjson has a .py entry point that imports `from .orjson` (from the DLL), which does not work on 3.8 if the DLL is not in the same folder as the .py. The changed import system in 3.9+ seems to allow this. Excluding it from libraries.zip will put both files into the same folder.
@ThePhar
Copy link
Member

ThePhar commented Nov 13, 2023

Confirmed this does work on a frozen 3.8 build on Windows where it didn't before.

FactorioClient appears to launch without issue. Didn't check anything past that, as I don't own Factorio.

@ThePhar ThePhar added is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. affects: core Issues/PRs that touch core and may need additional validation. labels Nov 13, 2023
@black-sliver black-sliver merged commit 0239578 into main Nov 13, 2023
11 checks passed
@black-sliver black-sliver deleted the orjson-py38-fix branch November 13, 2023 21:42
FlySniper pushed a commit to FlySniper/Archipelago that referenced this pull request Nov 14, 2023
orjson has a .py entry point that imports `from .orjson` (from the DLL), which does not work on 3.8 if the DLL is not in the same folder as the .py. The changed import system in 3.9+ seems to allow this. Excluding it from libraries.zip will put both files into the same folder.
Jouramie pushed a commit to Jouramie/Archipelago that referenced this pull request Feb 28, 2024
orjson has a .py entry point that imports `from .orjson` (from the DLL), which does not work on 3.8 if the DLL is not in the same folder as the .py. The changed import system in 3.9+ seems to allow this. Excluding it from libraries.zip will put both files into the same folder.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants