repoze / repoze.sphinx.autointerface

Auto-generate Sphinx API docs from Zope interfaces
http://pypi.python.org/pypi/repoze.sphinx.autointerface
Other
8 stars 7 forks source link

Add Sphinx 4.0 compatibility, drop EOLed Pythons #17

Closed stevepiercy closed 2 years ago

stevepiercy commented 3 years ago

See #16, #13.

This is a work in progress.

hugovk commented 3 years ago

I recommend adding python_requires=">=3.6", to setup.py, it will help pip know which library version to install depending on the user's Python version.

jugmac00 commented 3 years ago

Also, Travis announced to shut down travis-ci.org at the end of May.

stevepiercy commented 3 years ago

@hugovk thank you, added!

@jugmac00 thanks for the reminder. I'll start adding GitHub Actions. Someone with permission needs to enable GHA on this repo.

What should be the author_email attribute in setup.py? It is currently repoze-dev@lists.repoze.org, and repoze.org is dead.

jugmac00 commented 3 years ago

What should be the author_email attribute in setup.py? It is currently repoze-dev@lists.repoze.org, and repoze.org is dead.

The author e-mail field is not required, see https://github.com/python/cpython/pull/17388

stevepiercy commented 3 years ago

@malthe @MatthewWilkes @mcdonc @tseaver show as developers of the Repoze organization. I assume that they have access to enable GitHub Actions. Anyone else? Maybe PyPI maintainers @wichert or @dataflake?

hugovk commented 3 years ago

Also, Travis announced to shut down travis-ci.org at the end of May.

@jugmac00 Please could you point me to where they announced it? The banner has said "in several weeks" since 15 Dec 2020, and they initially said they would shut down by the end of 2020. Anyway, definitely agree with migrating to GitHub Actions 🚀

@stevepiercy To enable GHA, I think you just need to have a workflow file merged?

jugmac00 commented 3 years ago

Also, Travis announced to shut down travis-ci.org at the end of May.

@jugmac00 Please could you point me to where they announced it? The banner has said "in several weeks" since 15 Dec 2020, and they initially said they would shut down by the end of 2020.

https://blog.travis-ci.com/2021-05-07-orgshutdown

@hugovk Let's spread the word: https://twitter.com/jugmac00/status/1393852612588544001?s=19

stevepiercy commented 3 years ago

I've done the easy things from https://github.com/repoze/repoze.sphinx.autointerface/issues/16#issuecomment-838303842. That leaves at least these two items to resolve, probably others:

stevepiercy commented 3 years ago

@hugovk for some reason it is not running on this repo as I would expect, so I added CI to this branch and it has queued the tests on my fork. It seems to be taking a while to start.

Anyway, I think maintainers need to do something, such as create a new branch sphinx-40-compat to align with mine, and I can open a PR against that branch for pushes.

hugovk commented 3 years ago

@hugovk for some reason it is not running on this repo as I would expect, so I added CI to this branch and it has queued the tests on my fork. It seems to be taking a while to start.

There's an "incident" right now, should get cleared in a little white:

stevepiercy commented 3 years ago

Incident resolved, restarted build, and it fails, but now everyone can see what causes the failures.

I'll keep slogging through the housecleaning stuff, like this one:

lint run-test: commands[0] | python setup.py check -r -s -m
warning: Check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too
jugmac00 commented 3 years ago

Incident resolved, restarted build, and it fails, but now everyone can see what causes the failures.

I'll keep slogging through the housecleaning stuff, like this one:

lint run-test: commands[0] | python setup.py check -r -s -m
warning: Check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too

Looks like my fix made it in Python 3.9+ only, and was not backported.

Update so you could run tox with basepython = python3.9 added to the lint env

stevepiercy commented 3 years ago

I've restored the author and author_email. Either that pair or maintainer and maintainer_email are required.

I've reached out to @tseaver and @mcdonc in Keybase as well as @mmerickel and @bertjwregeer from Pylons to ask what is the best way forward to ensure that this package is maintained. I've volunteered, but need direction, whether that's being granted maintainer permission here and on PyPI, forking it to another organization, or something else.

stevepiercy commented 3 years ago

Progress! The housecleaning now brings us to a point where the build fails due to what brought up this issue in the first place.

https://github.com/stevepiercy/repoze.sphinx.autointerface/runs/2595700723?check_suite_focus=true#step:5:23

ImportError: cannot import name 'AutoDirective' from 'sphinx.ext.autodoc' (/home/runner/work/repoze.sphinx.autointerface/repoze.sphinx.autointerface/.tox/py/lib/python3.7/site-packages/sphinx/ext/autodoc/__init__.py)
digitalresistor commented 3 years ago

Incident resolved, restarted build, and it fails, but now everyone can see what causes the failures. I'll keep slogging through the housecleaning stuff, like this one:

lint run-test: commands[0] | python setup.py check -r -s -m
warning: Check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too

Looks like my fix made it in Python 3.9+ only, and was not backported.

Update so you could run tox with basepython = python3.9 added to the lint env

We shouldn't be using setup.py check, instead we should delegate that to twine. See pyramid or waitress/webob as examples.

stevepiercy commented 3 years ago

@bertjwregeer already done in https://github.com/repoze/repoze.sphinx.autointerface/pull/17/commits/54e9b80619ae5c5ee57dc63171c748eeecce9a35#diff-ef2cef9f88b4fe09ca3082140e67f5ad34fb65fb6e228f119d3812261ae51449R17-R18 I might break lint into format and build tox envs later, and adopt more from Pyramid.

stevepiercy commented 3 years ago

I went ahead with it. I noticed that waitress and webob use pep517.build, which appears to be deprecated. https://github.com/ipython/traitlets/issues/622

digitalresistor commented 3 years ago

@stevepiercy then build it is. It doesn't matter much, just that the check is now in twine, because that validates the information outside of setup tools.

stevepiercy commented 3 years ago

We got a temporary reprieve in https://github.com/sphinx-doc/sphinx/pull/9326 but it will come back in Sphinx 5.0.

icemac commented 2 years ago

See https://github.com/stevepiercy/repoze.sphinx.autointerface/pull/1 which builds on this PR to get the tests running again.

stevepiercy commented 2 years ago

@bertjwregeer @tseaver @mcdonc @mmerickel @malthe @MatthewWilkes @wichert @dataflake this PR is ready for review.

Travis-ci.org is dead, and GitHub Actions don't run in this organization yet. Nonetheless tests did pass on my fork.

https://github.com/stevepiercy/repoze.sphinx.autointerface/runs/6484737469?check_suite_focus=true

dataflake commented 2 years ago

I realize that Python 3.5 is EOL, but is there a specific technical reason why it must be excluded? I'm only saying that because on the Zope side we have promised to support Python 3.5 in conjunction with Zope 4 until Zope 4 is EOL itself.

stevepiercy commented 2 years ago

@dataflake I could try adding 3.5 to the test matrix. Let's see:

https://github.com/stevepiercy/repoze.sphinx.autointerface/runs/6485627391?check_suite_focus=true

stevepiercy commented 2 years ago

@dataflake Sphinx 4.0 dropped Python 3.5 support. https://www.sphinx-doc.org/en/master/changes.html#id308

I reverted the restoration of 3.5, and kept 3.10: https://github.com/stevepiercy/repoze.sphinx.autointerface/actions/runs/2344271403

icemac commented 2 years ago

@dataflake wrote:

I realize that Python 3.5 is EOL, but is there a specific technical reason why it must be excluded? I'm only saying that because on the Zope side we have promised to support Python 3.5 in conjunction with Zope 4 until Zope 4 is EOL itself.

As this library is only needed while creating the documentation. I think in Zope land we can live with the drop of Python 3.5 support. I'd rather like to see progress using a more modern Sphinx version than being stuck on an older one because of an unsupported Python version.

dataflake commented 2 years ago

@stevepiercy Never mind then, it's OK to drop 3.5. Thanks for the work!

stevepiercy commented 2 years ago

@dataflake I do not have write access and cannot merge this PR.

I've done what I can to push this forward, except fork it and release it as a new package as a last resort.

dataflake commented 2 years ago

@tseaver @mcdonc Can someone please give me write access to this repository so I can merge the PR and then make a release (I already have access to the PyPI side)?

dataflake commented 2 years ago

repoze.shinx.autointerface version 1.0.0 is now on PyPI.