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

Compatibility issues on Windows #41

Open
fwosar opened this issue Feb 6, 2021 · 1 comment
Open

Compatibility issues on Windows #41

fwosar opened this issue Feb 6, 2021 · 1 comment

Comments

@fwosar
Copy link

fwosar commented Feb 6, 2021

On Windows, any attempt to use the library will ultimately end up with a permission error. I tracked it down to the way you handle the certificate checks in case no bundles can be found (which you will not find on Windows, period). If you can't find a bundle, you ultimately end up writing out the root cert yourself using NamedTemporaryFile. However, NamedTemporaryFile does not work on Windows:

https://bugs.python.org/issue14243

My advice would be to simply bundle the cert as part of the Python package and read it from the class folder or alternatively disable automatic delete when using NamedTemporaryFile, make sure the file gets closed before being passed into wrap_socket, so that wrap_socket can actually open it, and then delete it yourself later when it is no longer needed. But IMHO the cleanest way is to simply get rid of any of that code and simply go with a bundled file.

@adrianog
Copy link

I got past the certificates problem on windows, but something else fails down the line. see #37

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

No branches or pull requests

2 participants