Project

General

Profile

Bug #9238

Python package Requests 2.18.4-r0 failure: pkg_resources.DistributionNotFound

Added by Stephan Linz 8 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Package update
Target version:
Start date:
08/13/2018
Due date:
% Done:

100%

Estimated time:
Affected versions:
Security IDs:

Description

When installing py2-sphinx and py2-setuptools and execute /usr/bin/sphinx-build-2 I'm running into this error:

Traceback (most recent call last):
  File "/usr/bin/sphinx-build-2", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3086, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3070, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3099, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 576, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 589, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'idna<2.7,>=2.5' distribution was not found and is required by requests

The problem is in package py-requests-2.18.4-r0 that is too old for the currently installable py-idna-2.7-r0 package. Python Requests 2.18.4 needs 'idna<2.7,>=2.5' that is not resolvable by default. See https://github.com/requests/requests/blob/v2.18.4/setup.py#L44

requires = [
    'chardet>=3.0.2,<3.1.0',
    'idna>=2.5,<2.7',
    'urllib3>=1.21.1,<1.23',
    'certifi>=2017.4.17'

]

The Python Requests package py-requests-2.19.1-r0 should set from edge to stabel for v3.8 as soon as possible to avoid this dependency mismatch, because Python Requests 2.19.0 already needs 'idna<2.8,>=2.5' (resolvable by default). See https://github.com/requests/requests/blob/v2.19.0/setup.py#L51

requires = [
    'chardet>=3.0.2,<3.1.0',
    'idna>=2.5,<2.8',
    'urllib3>=1.21.1,<1.24',
    'certifi>=2017.4.17'

]

The same for Python Requests 2.19.1, see https://github.com/requests/requests/blob/v2.19.1/setup.py#L51


Related issues

Related to Alpine Linux - Bug #9053: Certbot 0.25.1-r0 failure: pkg_resources.DistributionNotFoundClosed07/03/2018

Associated revisions

Revision add7b6dd (diff)
Added by Fabian Affolter 7 months ago

main/py-requests: upgrade to 2.19.1

fixes #9053
fixes #9238

(cherry picked from commit c2ede3db1fe3906163c2a37177c97d28e3b52490)

History

#1 Updated by Kevin Daudt 7 months ago

Just manually increased the requirements from 2.7 to 2.8, and it seems to not break in a trivial way.

#2 Updated by Natanael Copa 7 months ago

  • Related to Bug #9053: Certbot 0.25.1-r0 failure: pkg_resources.DistributionNotFound added

#3 Updated by Natanael Copa 7 months ago

  • Target version set to 3.8.2

#4 Updated by Fabian Affolter 7 months ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#5 Updated by Natanael Copa 4 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF