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

Fix the urllib compatibility #699

Closed
tristanlatr opened this issue May 23, 2023 · 1 comment · Fixed by #700
Closed

Fix the urllib compatibility #699

tristanlatr opened this issue May 23, 2023 · 1 comment · Fixed by #700

Comments

@tristanlatr
Copy link
Contributor

The CI suddenly failed with error like:

ERROR   -  Could not retrieve intersphinx object.inv from https://docs.python.org/3/objects.inv
Traceback (most recent call last):
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/pydoctor/sphinx.py", line 397, in get
    return self._session.get(url).content
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/requests/sessions.py", line 747, in send
    r.content
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/requests/models.py", line 899, in content
    self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/urllib3/response.py", line 935, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/urllib3/response.py", line 874, in read
    data = self._raw_read(amt)
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/urllib3/response.py", line 809, in _raw_read
    data = self._fp_read(amt) if not fp_closed else b""
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/urllib3/response.py", line 794, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/cachecontrol/filewrapper.py", line 96, in read
    self._close()
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/cachecontrol/filewrapper.py", line 76, in _close
    self.__callback(result)
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/cachecontrol/controller.py", line 353, in cache_response
    self._cache_set(cache_url, request, response, body, expires_time)
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/cachecontrol/controller.py", line 274, in _cache_set
    self.serializer.dumps(request, response, body),
  File "/home/runner/work/pydoctor/pydoctor/.tox/apidocs/lib/python3.8/site-packages/cachecontrol/serialize.py", line 54, in dumps
    u"strict": response.strict,
AttributeError: 'HTTPResponse' object has no attribute 'strict'

It might be temporary, but GitHub status seem all green....

Last working checks had the following deps:
alabaster==0.7.13,appdirs==1.4.4,astor==0.8.1,attrs==23.1.0,Automat==22.10.0,Babel==2.12.1,beautifulsoup4==4.12.2,bs4==0.0.1,CacheControl==0.12.11,certifi==2022.12.7,charset-normalizer==3.1.0,ConfigArgParse==1.5.3,constantly==15.1.0,coverage==7.2.5,cython-test-exception-raiser==1.0.0,docutils==0.19,exceptiongroup==1.1.1,hyperlink==21.0.0,hypothesis==6.75.1,idna==3.4,imagesize==1.4.1,importlib-metadata==6.6.0,incremental==22.10.0,iniconfig==2.0.0,Jinja2==3.1.2,lockfile==0.12.2,lunr==0.6.2,MarkupSafe==2.1.2,msgpack==1.0.5,packaging==23.1,pip==23.1.2,pluggy==1.0.0,pydoctor @ file:///home/runner/work/pydoctor/pydoctor/.tox/.tmp/package/1/pydoctor-23.4.0.tar.gz#sha256=59ce4ef301773885d9991a1339d4764a1031da060dd50c72adba428f3ee2b210,Pygments==2.15.1,pytest==7.3.1,requests==2.29.0,setuptools==67.7.2,six==1.16.0,snowballstemmer==2.2.0,sortedcontainers==2.4.0,soupsieve==2.4.1,Sphinx==7.0.0,sphinxcontrib-applehelp==1.0.4,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==2.0.1,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.5,toml==0.10.2,tomli==2.0.1,Twisted==22.10.0,typing_extensions==4.5.0,urllib3==1.26.15,wheel==0.40.0,zipp==3.15.0,zope.interface==6.0

Now it's

test: alabaster==0.7.13,appdirs==1.4.4,astor==0.8.1,attrs==23.1.0,Automat==22.10.0,Babel==2.12.1,beautifulsoup4==4.12.2,bs4==0.0.1,CacheControl==0.12.11,certifi==2023.5.7,charset-normalizer==3.1.0,ConfigArgParse==1.5.3,constantly==15.1.0,coverage==7.2.5,cython-test-exception-raiser==1.0.0,docutils==0.20.1,exceptiongroup==1.1.1,hyperlink==21.0.0,hypothesis==6.75.3,idna==3.4,imagesize==1.4.1,importlib-metadata==6.6.0,incremental==22.10.0,iniconfig==2.0.0,Jinja2==3.1.2,lockfile==0.12.2,lunr==0.6.2,MarkupSafe==2.1.2,msgpack==1.0.5,packaging==23.1,pip==23.1.2,pluggy==1.0.0,pydoctor @ file:///home/runner/work/pydoctor/pydoctor/.tox/.tmp/package/1/pydoctor-23.4.0.dev0.tar.gz#sha256=fcdfffb5e99ede58b2c1ab23de8ed7e927534f59845d24915a1d9ba73263778d,Pygments==2.15.1,pytest==7.3.1,requests==2.31.0,setuptools==67.7.2,six==1.16.0,snowballstemmer==2.2.0,sortedcontainers==2.4.0,soupsieve==2.4.1,Sphinx==7.0.1,sphinxcontrib-applehelp==1.0.4,sphinxcontrib-devhelp==1.0.2,sphinxcontrib-htmlhelp==2.0.1,sphinxcontrib-jsmath==1.0.1,sphinxcontrib-qthelp==1.0.3,sphinxcontrib-serializinghtml==1.1.5,toml==0.10.2,tomli==2.0.1,Twisted==22.10.0,typing_extensions==4.6.0,urllib3==2.0.2,wheel==0.40.0,zipp==3.15.0,zope.interface==6.0

Will investigate...

@tristanlatr
Copy link
Contributor Author

It's the new version of urllib3 that's causing these failures. Since it does not support python3.6 anymore, we can only guard against installing it by adding urllib3<2 in our dependency...

We might also want to move away from cachecontrol all together and adopt it's maintenance fork: psf/cachecontrol#300

@tristanlatr tristanlatr linked a pull request May 23, 2023 that will close this issue
@tristanlatr tristanlatr changed the title Fix the CI Fix the urllib compatibility May 23, 2023
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 a pull request may close this issue.

1 participant