bitprophet / releases

A powerful Sphinx changelog-generating extension.
http://releases.readthedocs.io/
BSD 2-Clause "Simplified" License
176 stars 41 forks source link

Sphinx 1.7 changed more APIs #73

Closed bitprophet closed 6 years ago

bitprophet commented 6 years ago

Or something. See e.g. invocations exploding when it attempts to import Releases 1.4.0 on travis recently (with no changes on my end on either project):

Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.14/bin/inv", line 11, in <module>
    sys.exit(program.run())
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/invoke/program.py", line 282, in run
    self.parse_collection()
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/invoke/program.py", line 356, in parse_collection
    self.load_collection()
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/invoke/program.py", line 508, in load_collection
    module, parent = loader.load(coll_name)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/invoke/loader.py", line 69, in load
    module = imp.load_module(name, fd, path, desc)
  File "/home/travis/build/pyinvoke/invocations/tasks.py", line 3, in <module>
    from invocations.packaging import release
  File "/home/travis/build/pyinvoke/invocations/invocations/packaging/__init__.py", line 3, in <module>
    from . import release
  File "/home/travis/build/pyinvoke/invocations/invocations/packaging/release.py", line 30, in <module>
    from releases.util import parse_changelog
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/releases/util.py", line 15, in <module>
    from sphinx.environment import (
ImportError: cannot import name SphinxStandaloneReader

(link: https://travis-ci.org/pyinvoke/invocations/jobs/357642688#L573-L593)

Kinda frustrating since it's not like that particular class is marked as being private or anything, but, such is Sphinx.

Need to either dial back Releases' setup.py (which I'm not a fan of but given Sphinx has broken us two minor releases in a row, seems prudent...) or dive in and add more conditional imports and such.

bitprophet commented 6 years ago

Fixed in 8276fa81b7a64f08e0afa3651f7d1b921be1d556 - neglected to add commit msg hook. (It's a day.)

bitprophet commented 6 years ago

Well, let's leave this open since it's not actually "fixed" aside from the dependency update. I would certainly like to support Sphinx 1.7 sometime.

rixx commented 6 years ago

I'd really appreciate you supporting Sphinx 1.7. If there is anything people can do to help with that, please let us know.

bitprophet commented 6 years ago

@rixx Not a lot that can be done besides somebody deep-diving to identify exactly what breaks on our end, what the diff was in Sphinx which caused it, and figuring out how we can adapt to get back to functionality.

Typically involves a lot of either duck typing or explicit Sphinx version checking, which we already have in a few places (though I may be partly remembering Alabaster). As usual preference is on the former ("can I import module X / does object Y have attribute Z?") over the latter ("if Sphinx 1.7, do X, else do Y").

hroncok commented 6 years ago

This might only be moved SphinxStandaloneReader module. Will try.

hroncok commented 6 years ago

Prepping a PR.