-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fixing CERTIFICATE_VERIFY_FAILED error #12
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This avoids a clash with the base project on GitHub and PyPi. While at it, the README file has been converted to Markdown for easier editing.
The project remains under the BSD 3-Clause License. The authors have been updated and long lines are wrapped.
The initializer of the `hCaptchaField` class has been rewritten such that its properties can be overridden similar to standard Django form fields. Determining data attributes and URL query parameters has now been clearly separated. The `hCaptchaWidget`'s initializer now expects the `js_api_url` and the `sitekey` parameters. The `hCaptchaField` class will automatically pass these on. Altering the `class` attribute is now done inside the widget, so that it can also hold custom CSS classes. The settings module has also been revised. It now contains a class that is responsible for retrieving settings or falling back to defaults. This allows for easy overriding in unit tests.
The tests are run by tox using the pytest testing framework. A GitHub workflow is added to automatically run the unit tests when code is pushed to the repository and a PR is created or updated. It is also scheduled to run every Friday at 18:00 UTC.
This is recommended by hCaptcha to "prevent tokens issued on one sitekey from being redeemed elsewhere."
Python code is linted by Flake8. A GitHub action is added to automatically run the linters when code is pushed to the repository and when a PR is created or updated. Since linting is only relevant upon code changes, it's not run following a time schedule.
A GitHub action is included to automatically publish packages when a new tag is created.
- Remove unused environments - Limit concurrency of package publishing task - Align quote usage
- Disable scheduled workflow runs in GitHub Actions - Update command to separate parameters from test module specification
The `install_requires` in `setup.py` should mention minimum requirements for this package only.
Fix version numbers in installation requirements
- Correct plural forms definition for Polish language. - Move author to copyright heading.
Translate error texts to PL
Added ssl context on build_opener based on tls version supported by the system. This will fix the CERTIFICATE_VERIFY_FAILED error.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit fixes the CERTIFICATE_VERIFY_FAILED error by adding a
HTTPSHandler
onbuild_opener
atfields.py
. This handler will use an available TLS version on its ssl context.