You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We test our cookiecutter with a pytest. Since the release of chardet 5.0.0, which requests 2.0.12 treats as incompatible, this produces a (caught) AssertionError and a runtime warning, both of which are treated as failures by pytest. There has been an issue opened to support chardet 5.0.0 in cookiecutter but no maintainer activity has occurred there yet: psf/requests#6177
While this has a severe impact on us (causes our Actions runs to all fail), for most users of cookiecutter this only causes the warning to be printed each time cookiecutter is run.
Most likely we'll be taking steps to ensure chardet<5 is installed during our CI process. I'm honestly not sure what would be constructive for cookiecutter to do about this, but I wanted to file this issue anyway for others who may encounter the warning, especially in a context that turns it into an error like ours does.
What I've run:
$ pip install cookiecutter
$ cookiecutter --version
/tmp/_envcc/lib/python3.9/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.0.0)/charset_normalizer (2.0.12) doesn't match a supported version!
warnings.warn(
Cookiecutter 2.1.1 from /tmp/_envcc/lib/python3.9/site-packages (Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110])
also
$ python3 -mpytest
============================= test session starts ==============================
platform linux -- Python 3.9.2, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/jepler/src/cookiecutter-adafruit-circuitpython, configfile: pytest.ini
collected 0 items / 1 error
==================================== ERRORS ====================================
_________________ ERROR collecting tests/test_make_cookies.py __________________
/tmp/_envcc/lib/python3.9/site-packages/requests/__init__.py:105: in <module>
check_compatibility(
/tmp/_envcc/lib/python3.9/site-packages/requests/__init__.py:79: in check_compatibility
assert (3, 0, 2) <= (major, minor, patch) < (5, 0, 0)
E AssertionError
During handling of the above exception, another exception occurred:
tests/test_make_cookies.py:11: in <module>
from cookiecutter.main import cookiecutter
/tmp/_envcc/lib/python3.9/site-packages/cookiecutter/main.py:17: in <module>
from cookiecutter.repository import determine_repo_dir
/tmp/_envcc/lib/python3.9/site-packages/cookiecutter/repository.py:7: in <module>
from cookiecutter.zipfile import unzip
/tmp/_envcc/lib/python3.9/site-packages/cookiecutter/zipfile.py:6: in <module>
import requests
/tmp/_envcc/lib/python3.9/site-packages/requests/__init__.py:109: in <module>
warnings.warn(
E requests.exceptions.RequestsDependencyWarning: urllib3 (1.26.9) or chardet (5.0.0)/charset_normalizer (2.0.12) doesn't match a supported version!
=========================== short test summary info ============================
ERROR tests/test_make_cookies.py - requests.exceptions.RequestsDependencyWarn...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.15s ===============================
The text was updated successfully, but these errors were encountered:
Description:
We test our cookiecutter with a
pytest
. Since the release of chardet 5.0.0, which requests 2.0.12 treats as incompatible, this produces a (caught) AssertionError and a runtime warning, both of which are treated as failures by pytest. There has been an issue opened to support chardet 5.0.0 in cookiecutter but no maintainer activity has occurred there yet: psf/requests#6177While this has a severe impact on us (causes our Actions runs to all fail), for most users of cookiecutter this only causes the warning to be printed each time cookiecutter is run.
Most likely we'll be taking steps to ensure chardet<5 is installed during our CI process. I'm honestly not sure what would be constructive for cookiecutter to do about this, but I wanted to file this issue anyway for others who may encounter the warning, especially in a context that turns it into an error like ours does.
What I've run:
also
The text was updated successfully, but these errors were encountered: