GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Make compatible with requests 2.29.0 and urllib3 2.0 by felixfontein · Pull Request #3116 · docker/docker-py

Conversation

@felixfontein

@felixfontein felixfontein commented May 2, 2023

Copy link
Copy Markdown
Contributor

Fixes at least part of #3113. (Recent requests versions declare that they need urllib3 < 2.0 since at least 2017, so the urllib3 problems themselves shouldn't really appear except when forcing invalid combinations of requests and urllib3. My hope is that the urllib3 2.0 compatibility is something that only needs changes on the side of requests, and not here - but who knows...)

Since requests 2.29.0, requests uses urllib3's native chunking ability (see psf/requests#6226). By using urllib3's HTTPConnection class (which extends httplib.HTTPConnection`) we make sure that our HTTP transports support this as well.

I was able to reproduce the problem by calling APIClient.put_archive(); the change in this PR fixes the problem for me. (I'm working on a modified vendored version of Docker SDK for Python, so YMMV.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hartwork and nkgilley reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@felixfontein
felixfontein requested review from aiordache and ulyssessouza as code owners May 2, 2023 13:44
@felixfontein
Make compatible with requests 2.29.0.
8291c94
Signed-off-by: Felix Fontein <[email protected]>
@felixfontein
felixfontein force-pushed the requests branch from 2c8084e to 8291c94 Compare May 2, 2023 13:47
@felixfontein

felixfontein commented May 2, 2023

Copy link
Copy Markdown
Contributor Author

Failing CI (https://github.com/docker/docker-py/actions/runs/4861956711/jobs/8667665911?pr=3116) seems to be unrelated since it didn't fail before the force push (which only adjusted the commit message). Restarting CI.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@felixfontein felixfontein closed this May 2, 2023
@felixfontein felixfontein reopened this May 2, 2023
@felixfontein felixfontein mentioned this pull request May 2, 2023
Make compatible with requests 2.29.0 and urllib3 2.0 ansible-collections/community.docker#613
Merged
@felixfontein

felixfontein commented May 2, 2023

Copy link
Copy Markdown
Contributor Author

As a reference, the first test run that didn't fail: https://github.com/docker/docker-py/actions/runs/4861929164/jobs/8667601939

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@felixfontein felixfontein mentioned this pull request May 2, 2023
urllib3 v2 incompatibility #3113
Closed
@felixfontein

felixfontein commented May 2, 2023

Copy link
Copy Markdown
Contributor Author

According to #3117 and #3113 (comment) this also fixes compatibility with urllib3 2.0, once requests officially supports that.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@felixfontein felixfontein changed the title Make compatible with requests 2.29.0 Make compatible with requests 2.29.0 and urllib3 2.0 May 2, 2023
pquentin
pquentin reviewed May 2, 2023
View reviewed changes
Comment thread docker/transport/npipeconn.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@felixfontein
Simplify imports since requests >= 2.16.0 no longer uses vendored url…
115dbce
…lib3.

Signed-off-by: Felix Fontein <[email protected]>
@felixfontein
felixfontein force-pushed the requests branch from 32fdf99 to 115dbce Compare May 2, 2023 16:41
pquentin
pquentin reviewed May 3, 2023
View reviewed changes
Comment thread docker/transport/unixconn.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@pquentin pquentin mentioned this pull request May 3, 2023
Fix urllib3 2.0 compatibility #3117
Closed
@felixfontein
Remove putheader() and response_class().
a48dd4c
Signed-off-by: Felix Fontein <[email protected]>
@felixfontein
felixfontein force-pushed the requests branch from 6798504 to a48dd4c Compare May 3, 2023 16:51
pquentin
pquentin approved these changes May 3, 2023
View reviewed changes
@felixfontein felixfontein mentioned this pull request May 3, 2023
[DO NOT MERGE] requests 2.30.0 + urllib3 test ansible-collections/community.docker#614
Closed
@luzfcb luzfcb mentioned this pull request May 4, 2023
Github Action execution is blocked due to a possible bug on the docker python library. wemake-services/docker-image-size-limit#261
Closed
@felixfontein

felixfontein commented May 5, 2023

Copy link
Copy Markdown
Contributor Author

@milas can you take a look at this PR? Thanks.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@wadhah101 wadhah101 mentioned this pull request May 5, 2023
hotfix: pin urllib3 version to < 2 #3114
Closed
@buluma buluma mentioned this pull request May 5, 2023
urllib3 v2 incompatibility buluma/ansible-role-alternatives#22
Open
@milas milas self-assigned this May 5, 2023
@milas
milas self-requested a review May 5, 2023 14:56
milas
milas approved these changes May 5, 2023
View reviewed changes

@milas milas left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I verified several scenarios under the integration tests (there are calls to put_archive and I see the failures currently without this PR):

  • requests 2.30.0 + urllib3 v2.x
  • requests 2.28.x + urllib3 v1.x
  • requests 2.30.0 + urllib3 v1.x

Looks good across the three. I'll get this merged and a new release tagged momentarily.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pquentin and hartwork reacted with hooray emoji
All reactions
  • 🎉 2 reactions
@milas
milas merged commit 3178c8d into docker:main May 5, 2023
JonasPammer added a commit to JonasPammer/cookiecutter-ansible-role that referenced this pull request May 5, 2023
@JonasPammer
fix: don't mention docker dep itself
8c87d3c
as done in JonasPammer/ansible-role-bootstrap#83
i think the whole reason i started said PR was because I wondered "why cap it at that without reason?".
molecule-plugins[docker] brings the docker dep, with a fitting ">" delimiter which for example brings us docker/docker-py#3116 thus this PR closes #103
@JonasPammer JonasPammer mentioned this pull request May 5, 2023
fix: don't mention docker dep itself JonasPammer/cookiecutter-ansible-role#104
Merged
@felixfontein
felixfontein deleted the requests branch May 5, 2023 19:19
@felixfontein

felixfontein commented May 5, 2023

Copy link
Copy Markdown
Contributor Author

@pquentin @milas thanks a lot for reviewing, testing, and merging!

hartwork and pquentin reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@k-v1 k-v1 mentioned this pull request May 7, 2023
SONiC Broadcom build failure in 202211 with error: "TypeError: request() got an unexpected keyword argument 'chunked'" sonic-net/sonic-buildimage#14974
Closed
@alexdesiqueira alexdesiqueira mentioned this pull request May 8, 2023
Update version to 6.1.0 conda-forge/docker-py-feedstock#67
Merged
3 of 5 tasks
@nikunjdh nikunjdh mentioned this pull request May 8, 2023
SONiC-VPP VM image build is failing. sonic-net/sonic-platform-vpp#28
Closed
@josephkishan

josephkishan commented May 9, 2023

Copy link
Copy Markdown

@pquentin @milas @felixfontein we facing the same issue like "TypeError: request() got an unexpected keyword argument 'chunked'" We are using docker as 5.0.3 and requests as 2.30.0 and urllib3 as 2.0.2. Is these versions fine or do we need to pin the version until the issue resolves? If we have to pin then please suggest to us the versions we need to resolve this issue

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pquentin

pquentin commented May 9, 2023

Copy link
Copy Markdown

@josephkishan You can keep requests 2.30.0 and urllib3 2.0.2, but you should upgrade docker to 6.1.0 or 6.1.1.

josephkishan, hartwork, slonopotamus, MaximMukhametov, pabloxio, and PavanTatikonda reacted with thumbs up emoji
All reactions
  • 👍 6 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

k-v1 added a commit to k-v1/sonic-buildimage that referenced this pull request May 9, 2023
@k-v1
[Build] update python package docker in host image to 6.1.1
7efddee
Fix sonic-net#14974
Refs: docker/docker-py#3116
@k-v1 k-v1 mentioned this pull request May 9, 2023
[Build] update python package docker in host image to 6.1.1 sonic-net/sonic-buildimage#14993
Merged
lguohan pushed a commit to sonic-net/sonic-buildimage that referenced this pull request May 10, 2023
@k-v1
[Build] update python package docker in host image to 6.1.1 (#14993)
bba4fb8
Fix #14974
Refs: docker/docker-py#3116
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request May 12, 2023
@k-v1 @mssonicbld
[Build] update python package docker in host image to 6.1.1 (sonic-ne…
20eb91e
…t#14993)

Fix sonic-net#14974
Refs: docker/docker-py#3116
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request May 12, 2023
@k-v1 @mssonicbld
[Build] update python package docker in host image to 6.1.1 (sonic-ne…
36b66ac
…t#14993)

Fix sonic-net#14974
Refs: docker/docker-py#3116
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request May 12, 2023
@k-v1 @mssonicbld
[Build] update python package docker in host image to 6.1.1 (sonic-ne…
6b09e86
…t#14993)

Fix sonic-net#14974
Refs: docker/docker-py#3116
yxieca pushed a commit to sonic-net/sonic-buildimage that referenced this pull request May 15, 2023
@mssonicbld @k-v1
[Build] update python package docker in host image to 6.1.1 (#14993) (#…
4ee8224
…15050)

Fix #14974
Refs: docker/docker-py#3116

Co-authored-by: Konstantin Vasin <[email protected]>
mssonicbld pushed a commit to sonic-net/sonic-buildimage that referenced this pull request May 19, 2023
@k-v1 @mssonicbld
[Build] update python package docker in host image to 6.1.1 (#14993)
7a87170
Fix #14974
Refs: docker/docker-py#3116
@mssonicbld mssonicbld mentioned this pull request Jul 28, 2023
[action] [PR:14993] [Build] update python package docker in host image to 6.1.1 sonic-net/sonic-buildimage#15989
Merged
mssonicbld pushed a commit to mssonicbld/sonic-buildimage that referenced this pull request Jul 28, 2023
@k-v1 @mssonicbld
[Build] update python package docker in host image to 6.1.1 (sonic-ne…
9c49de6
…t#14993)

Fix sonic-net#14974
Refs: docker/docker-py#3116
@cebtenzzre cebtenzzre mentioned this pull request Oct 10, 2023
Error while fetching server API version: HTTPConnection.request() got an unexpected keyword argument 'chunked' nomic-ai/gpt4all#1259
Closed
2 of 10 tasks
@Tangresh Tangresh mentioned this pull request Nov 9, 2023
[BUG] "TypeError: HTTPConnection.request() got an unexpected keyword argument 'chunked'" in docker_container.running saltstack/salt#65526
Closed
3 of 9 tasks
@adamnovak adamnovak mentioned this pull request Feb 12, 2024
Docker requirement should require a Docker that can use current requests/urllib DataBiosphere/toil#4794
Closed
This was referenced May 23, 2024
gsc build fails for any distro workload on a Ubuntu 24.04 host system gramineproject/gsc#202
Closed
Missing build and installation steps without using pip #3265
Open
@tfoote tfoote mentioned this pull request Sep 25, 2024
Rocker throws DependencyMissing error on Ubuntu 24.04. osrf/rocker#290
Closed
@kulapard kulapard mentioned this pull request Mar 14, 2025
Update urllib3 version constraint to allow up to 3.0.0 anna-money/pytest-pg#221
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aiordache aiordache Awaiting requested review from aiordache
@ulyssessouza ulyssessouza Awaiting requested review from ulyssessouza
2 more reviewers
@pquentin pquentin pquentin approved these changes
@milas milas milas approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@milas milas

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@felixfontein @josephkishan @pquentin @milas
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.