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

TypeError: HTTPResponse.__init__() got an unexpected keyword argument 'strict' #1877

Closed
pgjones opened this issue May 3, 2023 · 2 comments
Closed
Labels
🐛 bug Something isn't working

Comments

@pgjones
Copy link
Contributor

pgjones commented May 3, 2023

PDM, version 2.5.3

$ pdm install -v
STATUS: Resolving packages from lockfile...
Set env var PDM_IGNORE_ACTIVE_VENV to ignore it.
STATUS: Fetching hashes for resolved packages...
Synchronizing working set with lock file: 73 to add, 12 to update, 0 to remove

pdm.termui: Removing distribution pip
  ✖ Update pip 23.0 -> 22.2.2 failed
Traceback (most recent call last):
  File ".venv/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "venv/lib/python3.10/site-packages/pdm/core.py", line 255, in main
    return Core().main(args)
  File "venv/lib/python3.10/site-packages/pdm/core.py", line 193, in main
    raise cast(Exception, err).with_traceback(traceback) from None
  File ".venv/lib/python3.10/site-packages/pdm/core.py", line 188, in main
    self.handle(project, options)
  File ".venv/lib/python3.10/site-packages/pdm/core.py", line 154, in handle
    command.handle(project, options)
  File ".venv/lib/python3.10/site-packages/pdm/cli/commands/install.py", line 62, in handle
    actions.do_sync(
  File "venv/lib/python3.10/site-packages/pdm/cli/actions.py", line 214, in do_sync
    synchronizer.synchronize()
  File "venv/lib/python3.10/site-packages/pdm/installers/synchronizers.py", line 401, in synchronize
    handlers[kind](key, progress)
  File ".venv/lib/python3.10/site-packages/pdm/installers/synchronizers.py", line 271, in update_candidate
    self.manager.install(can)
  File ".venv/lib/python3.10/site-packages/pdm/installers/manager.py", line 33, in install
    installer(str(prepared.build()), self.environment, prepared.direct_url())
  File ".venv/lib/python3.10/site-packages/pdm/models/candidates.py", line 360, in build
    self.obtain(allow_all=False)
  File ".venv/lib/python3.10/site-packages/pdm/models/candidates.py", line 419, in obtain
    result = finder.download_and_unpack(self.link, build_dir, download_dir, hash_options)
  File ".venv/lib/python3.10/site-packages/unearth/finder.py", line 391, in download_and_unpack
    file = unpack_link(
  File ".venv/lib/python3.10/site-packages/unearth/preparer.py", line 300, in unpack_link
    resp = session.get(link.normalized, stream=True)
  File ".venv/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File ".venv/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File ".venv/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "venv/lib/python3.10/site-packages/cachecontrol/adapter.py", line 48, in send
    cached_response = self.controller.cached_request(request)
  File ".venv/lib/python3.10/site-packages/cachecontrol/controller.py", line 155, in cached_request
    resp = self.serializer.loads(request, cache_data, body_file)
  File ".venv/lib/python3.10/site-packages/cachecontrol/serialize.py", line 95, in loads
    return getattr(self, "_loads_v{}".format(ver))(request, data, body_file)
  File ".venv/lib/python3.10/site-packages/cachecontrol/serialize.py", line 190, in _loads_v4
    return self.prepare_response(request, cached, body_file)
  File ".venv/lib/python3.10/site-packages/cachecontrol/serialize.py", line 141, in prepare_response
    return HTTPResponse(body=body, preload_content=False, **cached["response"])
TypeError: HTTPResponse.__init__() got an unexpected keyword argument 'strict'

(Also 👋 from a Blinker maintainer)

@pgjones pgjones added the 🐛 bug Something isn't working label May 3, 2023
@pgjones
Copy link
Contributor Author

pgjones commented May 3, 2023

Actually I think this is requests.

@pgjones pgjones closed this as completed May 3, 2023
@pgjones
Copy link
Contributor Author

pgjones commented May 3, 2023

See psf/requests#6437 and psf/cachecontrol#292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant