#32372 closed enhancement (fixed)

requests: Upgrade to 2.26.0, add new (unvendored) deps

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-9.5
Component: packages: standard Keywords:
Cc: Frédéric Chapoton, Samuel Lelièvre, Dima Pasechnik Merged in:
Authors: Matthias Koeppe Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: 8cc62de (Commits, GitHub, GitLab) Commit: 8cc62de53d45d251dc7121cbffec7a1154ad8bf0
Dependencies: Stopgaps:

Status badges

Description (last modified by Samuel Lelièvre)

(split out from #31280)

As noted in ticket:31280#comment:65, this helps for #30768 and hence for Python 3.10 compatibility.

Three packages are added, each becoming a standard spkg.

charset-normalizer

Added under the name charset_normalizer.

"Charset Detection, for Everyone"

A library that helps you read text from an unknown charset encoding.

[...] All IANA character set names for which the Python core library provides codecs are supported.

idna

Support for the Internationalised Domain Names in Applications (IDNA) protocol as specified in RFC 5891. This is the latest version of the protocol and is sometimes referred to as “IDNA 2008”.

This library also provides support for Unicode Technical Standard 46, Unicode IDNA Compatibility Processing.

This acts as a suitable replacement for the “encodings.idna” module that comes with the Python standard library, but which only supports the old, deprecated IDNA specification (RFC 3490).

urllib3

a powerful, user-friendly HTTP client for Python. [...] urllib3 brings many critical features that are missing from the Python standard libraries:

  • Thread safety.
  • Connection pooling.
  • Client-side SSL/TLS verification.
  • File uploads with multipart encoding.
  • Helpers for retrying requests and dealing with HTTP redirects.
  • Support for gzip, deflate, and brotli encoding.
  • Proxy support for HTTP and SOCKS.
  • 100% test coverage.

Change History (16)

comment:1 Changed 16 months ago by Matthias Köppe

Branch: u/mkoeppe/requests__upgrade_to_2_26_0__add_new__unvendored__deps

comment:2 Changed 16 months ago by Matthias Köppe

Authors: Matthias Koeppe
Commit: 9a057767ffa01b57822f2852e732ed7ab247b5f9
Status: newneeds_review

New commits:

764b341build/pkgs/chardet: New (unvendored from requests)
5b5e721build/pkgs/idna: New (unvendored from requests)
649f5afbuild/pkgs/urllib3: New (unvendored from requests)
b8cf517build/pkgs/requests: Update to 2.26.0
b5dc185build/pkgs/requests/dependencies: Add unvendored packages
9a05776build/pkgs/urllib3: Update to 1.26.6

comment:3 Changed 16 months ago by git

Commit: 9a057767ffa01b57822f2852e732ed7ab247b5f981af3bffde5f6de81c16749c269a85c396d138e8

Branch pushed to git repo; I updated commit sha1. New commits:

fbb7da9build/pkgs/idna: Update to 3.2
81af3bfbuild/pkgs/requests/checksums.ini: Add upstream_url

comment:4 Changed 16 months ago by Matthias Köppe

Status: needs_reviewneeds_work

requests 2.26.0 has switched from chardet to charset_normalizer https://docs.python-requests.org/en/master/community/updates/#id1

comment:5 Changed 16 months ago by git

Commit: 81af3bffde5f6de81c16749c269a85c396d138e88cc62de53d45d251dc7121cbffec7a1154ad8bf0

Branch pushed to git repo; I updated commit sha1. New commits:

8c8a766build/pkgs/charset_normalizer: New, use it instead of chardet as a dependency of requests
8cc62debuild/pkgs/chardet: Remove

comment:6 Changed 16 months ago by Matthias Köppe

Status: needs_workneeds_review

comment:7 Changed 15 months ago by Samuel Lelièvre

Cc: Samuel Lelièvre added
Description: modified (diff)

Would a round of github-actions be a good way to start a review of this?

comment:8 Changed 15 months ago by Frédéric Chapoton

I have launched one some hours ago. It should take 1 day or more.

https://github.com/sagemath/sagetrac-mirror/actions/runs/1153312296

Last edited 15 months ago by Frédéric Chapoton (previous) (diff)

comment:9 Changed 15 months ago by Frédéric Chapoton

apparently, the github CI is not able to use the "upstream_url" for "charset_normalizer"

comment:10 Changed 15 months ago by Matthias Köppe

The download failure on ubuntu-trusty-standard https://github.com/sagemath/sagetrac-mirror/runs/3388617349?check_suite_focus=true

  [urllib3-1.26.6]   [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx]
  [urllib3-1.26.6]   ERROR [transfer|run:135]: [Errno 403] SNI is required: '//pypi.io/packages/source/u/urllib3/urllib3-1.26.6.tar.gz'
  [urllib3-1.26.6]   ************************************************************************
  [urllib3-1.26.6]   Traceback (most recent call last):
  [urllib3-1.26.6]     File "/sage/build/bin/../sage_bootstrap/download/cmdline.py", line 126, in run_safe
  [urllib3-1.26.6]       run()

is new (and unrelated to #32403)

comment:11 Changed 15 months ago by Matthias Köppe

This appears to be from https://github.com/pypa/pypi-support/issues/978 ("Deprecation of non-SNI compatible clients")

comment:12 Changed 15 months ago by Matthias Köppe

I've opened #32405 for this failure; it has no technical relation to the present ticket.

comment:13 Changed 15 months ago by Matthias Köppe

Cc: Dima Pasechnik added

comment:14 Changed 15 months ago by Dima Pasechnik

Reviewers: Dima Pasechnik
Status: needs_reviewpositive_review

lgtm

comment:15 Changed 15 months ago by Matthias Köppe

Thanks!

comment:16 Changed 15 months ago by Volker Braun

Branch: u/mkoeppe/requests__upgrade_to_2_26_0__add_new__unvendored__deps8cc62de53d45d251dc7121cbffec7a1154ad8bf0
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.