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

Fixing CERTIFICATE_VERIFY_FAILED error #12

Closed
wants to merge 34 commits into from

Conversation

jraylan
Copy link

@jraylan jraylan commented Nov 12, 2022

This commit fixes the CERTIFICATE_VERIFY_FAILED error by adding a HTTPSHandler on build_opener at fields.py. This handler will use an available TLS version on its ssl context.

tiesjan and others added 30 commits June 3, 2021 13:32
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
tiesjan and others added 4 commits April 19, 2022 22:55
Added ssl context on build_opener based on tls version supported by the
system. This will fix the CERTIFICATE_VERIFY_FAILED error.
@jraylan jraylan closed this Nov 12, 2022
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.

3 participants