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

Windows Python 3.8+: Search current folder for discid.dll #144

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

Conversation

jesus2099
Copy link
Contributor

@jesus2099 jesus2099 commented Mar 26, 2023

Fixes #143 (Windows Python 3.8+ Could not find module 'discid.dll'), without tampering with other setups.

This #125 fix from @omgitsraven was NG for Python 3.7 and less, while OK for Python 3.8+.
I found how to test Python version with https://stackoverflow.com/a/3016198/2236179 and I also test if script is running in Windows.

Tested on Linux (condition not met, do the script runs good as usual) and Windows Python 3.10.1 (condition met, fixes #143 and now the script is running good).
The script works in both cases.

I no longer have old python version but I have tested my version condition and it should work to prevent the new line in python 3.7 and earlier.

Then something must be done to bump version number and to publish new version zip files.

PATCH

If you want to test in your environment, the patch is to insert the following code, before the first try of the script:

# Windows Python 3.8+ scan current folder for discid.dll
if os.name == "nt" and sys.version_info >= (3,8):
    os.add_dll_directory(os.getcwd())

TEST

OS Python 2.1.1-beta Patched 2.1.1-beta 3.0.0-dev Patched 3.0.0-dev
Debian 11 64 bits 3.9.2 👍 👍 👍 👍
Windows XP 32 bits 3.4.3 👍 👍 👍 👍
Windows 11 64 bits 3.10.7 👍 👍

@jesus2099
Copy link
Contributor Author

The failed check is the same PyPy3 check that failed with all previous pull requests:

Error: PyPy 3.6 not found

@jesus2099
Copy link
Contributor Author

jesus2099 commented Mar 27, 2023

Tested successfully on:

  • Debian GNU/Linux 11 64 bits Python 3.9.2 👍 condition not met, add_dll_directory not run: not supported and not needed
  • Windows XP 2002 SP3 32 bits Python 3.4.3 👍 condition not met, add_dll_directory not run: not supported and not needed
  • Windows 11 64 bits Python 3.10.7 👍 condition met, add_dll_directory run: supported and required

@jesus2099 jesus2099 changed the title Windows: Search current folder for discid.dll Windows Python 3.8+: Search current folder for discid.dll Mar 28, 2023
@jesus2099
Copy link
Contributor Author

jesus2099 commented Mar 28, 2023

I put this in draft, leaving some time for the discussion to take place a little bit.

And I want to try git magic to queue my IF change behind @omgitsraven change and also I forgot to bump the version up to 2.2 or 2.1.2.

@jesus2099 jesus2099 marked this pull request as draft March 28, 2023 09:40
@jesus2099 jesus2099 force-pushed the search-current-folder-for-discid.dll branch from 07edba3 to af1f8d7 Compare March 28, 2023 10:12
@jesus2099
Copy link
Contributor Author

I managed to include original bug fix author in the PR.
I found out about version 3.0.0-dev that does include 2.1.1-beta changes in main branch, so I tested this one patched on Windows Python 3.8+ and it's OK.

@jesus2099 jesus2099 marked this pull request as ready for review March 28, 2023 10:22
@jesus2099
Copy link
Contributor Author

I tested 3.0.0-dev and patched 3.0.0-dev on my 2 other environments as well now.
All good.

@jesus2099
Copy link
Contributor Author

I leave you manage the version change, if needed.

@kellnerd
Copy link

I can confirm that this patch works as expected with Windows 10 Pro 64 bit, Python 3.12 and isrcsubmit 2.1.0 (I think I already replaced discid.dll with a 64 bit version a few years ago).

@jesus2099
Copy link
Contributor Author

jesus2099 commented Jan 16, 2024

Thank you for testing successfully!

I already replaced discid.dll with a 64 bit version

Maybe that #127 PR?
But I'm not sure if the downloads are updated, except in isrcsubmit-2.1.1-beta-win64.zip, in hidden downloads listing.

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.

Windows: Could not find module 'discid.dll'
3 participants