Opened 3 years ago

Closed 3 years ago

#62017 closed defect (fixed)

py-sphinx: @3.4.1 broken after latest python module updates

Reported by: mascguy (Christopher Nielsen) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-requests

Description

After just updating all of my outdated ports, sphinx-build-3.x is now failing.

For example, the output from sphinx-build-3.9 is as follows. (Note that sphinx-build-3.8 is failing with an identical set of errors, apart from the python pathnames.)

$ sphinx-build-3.9
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 567, in _build_master
    ws.require(__requires__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 884, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 775, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (idna 3.1 (/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages), Requirement.parse('idna<3,>=2.5'), {'requests'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/local/bin/sphinx-build-3.9", line 33, in <module>
    sys.exit(load_entry_point('Sphinx==3.4.1', 'console_scripts', 'sphinx-build')())
  File "/opt/local/bin/sphinx-build-3.9", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sphinx/cmd/build.py", line 25, in <module>
    from sphinx.application import Sphinx
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/sphinx/application.py", line 26, in <module>
    from docutils.parsers.rst import Directive, roles
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/docutils/parsers/rst/__init__.py", line 75, in <module>
    from docutils.parsers.rst import roles, states
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/docutils/parsers/rst/roles.py", line 78, in <module>
    from docutils.utils.code_analyzer import Lexer, LexerError
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/docutils/utils/code_analyzer.py", line 12, in <module>
    from pkg_resources import DistributionNotFound as ResourceError
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3239, in <module>
    def _initialize_master_working_set():
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3222, in _call_aside
    f(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3251, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 569, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 582, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pkg_resources/__init__.py", line 770, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'idna<3,>=2.5' distribution was not found and is required by requests

Based on the stack trace, it almost appears as if there's a version mismatch relative to py-idna. But perhaps this is only a side-effect, of a mismatch further down the dependency tree?

Assigning to Josh initially, since he's the py-sphinx maintainer...

Change History (6)

comment:1 Changed 3 years ago by mascguy (Christopher Nielsen)

Of note, all sphinx-related commands are failing with the same error. Not too surprising, but just an FYI.

comment:2 Changed 3 years ago by mascguy (Christopher Nielsen)

Summary: py-sphinx: broken after latest python module updatespy-sphinx: @3.4.1 broken after latest python module updates

comment:3 Changed 3 years ago by mascguy (Christopher Nielsen)

This failure is occurring in macOS 10.12. However, it's now blocking my port development work, so I'm hesitant to upgrade my ports in my other macOS installations. If you need me to do that, I can... but I'd really prefer not to...

comment:4 Changed 3 years ago by reneeotten (Renee Otten)

Owner: changed from jmroot to stromnov
Port: py-requests added; py-sphinx removed

the problem is given in the last line pkg_resources.DistributionNotFound: The 'idna<3,>=2.5' distribution was not found and is required by requests; so py-requests wants a py-idna version less than 3 and that one was just updated to 3.1.

The upstream issue is this one; perhaps just changing the requirement version in py-requests would work for now.

comment:5 in reply to:  4 Changed 3 years ago by mascguy (Christopher Nielsen)

Replying to reneeotten:

the problem is given in the last line pkg_resources.DistributionNotFound: The 'idna<3,>=2.5' distribution was not found and is required by requests; so py-requests wants a py-idna version less than 3 and that one was just updated to 3.1.

Makes sense. Thanks for the quick response Renee!

comment:6 Changed 3 years ago by stromnov (Andrey Stromnov)

Resolution: fixed
Status: assignedclosed

In ed437ee523cbe6c04f63a8386e0e55349d421b33/macports-ports (master):

py-requests: fix py-idna dependency

Closes: #62017

Note: See TracTickets for help on using tickets.