Skip to content

Conversation

@pietrodn
Copy link

@pietrodn pietrodn commented Dec 8, 2025

The attribute was removed in a breaking change in urllib 2.6.0 and should be replaced by .headers.get(). It has been deprecated since 2.0.0.

https://urllib3.readthedocs.io/en/stable/changelog.html

Using the library with urllib3==2.6.0 causes:

AttributeError: 'HTTPResponse' object has no attribute 'getheader'

The attribute was removed in a breaking change in urllib 2.6.0 and should be replaced by `.headers.get()`. It has been deprecated since 2.0.0.

https://urllib3.readthedocs.io/en/stable/changelog.html
@potiuk
Copy link

potiuk commented Dec 8, 2025

Yep. Would be great to fix it - urllib had deprecated it in 2.0.0 with lots of time to fix, having this quickly addressed by major users - like fastly but also kuvernetes kubernetes-client/python#2477 and few other big users of urllib3 tha have not yet caught up woudl also be good for security. The 2.6.0 issue solves two high vulnerabilities with high severity 8.9/10 both:

https://nvd.nist.gov/vuln/detail/CVE-2025-66471
https://nvd.nist.gov/vuln/detail/CVE-2025-66418

So it would be great if fastly users have a version available that allows them to use urrlib3 2.6.0

@kpfleming
Copy link
Contributor

Thanks for the PR! Unfortunately the content of this repository is auto-generated from templates which are located in an internal (private) repository, so we can't make the changes here as they will get overwritten. I'll ask @harmony7 to make the corresponding changes in the internal repository and then they will be included in this month's release of all the generated clients.

@pietrodn
Copy link
Author

pietrodn commented Dec 8, 2025

Great, thanks! In the meantime, urllib3 maintainers released 2.6.1 with the security patch and the restored methods, so this is not urgent anymore. Still, it'd be nice to replace the deprecated calls. urllib3/urllib3#3731 (comment)

@harmony7 harmony7 self-assigned this Dec 9, 2025
@harmony7
Copy link
Member

harmony7 commented Dec 9, 2025

Thanks for the PR. As @kpfleming mentioned above, this will be included in the December release of the clients.

@harmony7
Copy link
Member

harmony7 commented Dec 9, 2025

Released 12.1.0 that includes this fix

https://pypi.org/project/fastly/12.1.0/

@harmony7 harmony7 closed this Dec 9, 2025
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.

4 participants