NiklasRosenstein / pydoc-markdown

Create Python API documentation in Markdown format.
http://niklasrosenstein.github.io/pydoc-markdown/
Other
449 stars 104 forks source link

feat: upgrade pyyaml & fix extras management #278

Closed zifeo closed 1 year ago

zifeo commented 1 year ago

Currently, installing:

RuntimeError: The Poetry configuration is invalid:
[105](https://github.com/metatypedev/metatype/actions/runs/4044528683/jobs/6956107882#step:8:106)
          - [extras.docs.0] 'novella >=0.1.10,<0.3.0' does not match '^[a-zA-Z-_.0-9]+$'
[106](https://github.com/metatypedev/metatype/actions/runs/4044528683/jobs/6956107882#step:8:107)
          - [extras.novella.0] 'novella >=0.1.10,<0.3.0' does not match '^[a-zA-Z-_.0-9]+$'
NiklasRosenstein commented 1 year ago

Thanks @zifeo 🚀

What triggered the Python version bump; I suppose the higher PyYAML version?

If we accept PyYAML = ">=5.3,<7.0" we'll keep the 3.7 compatibility.

hippalectryon-0 commented 1 year ago

Cf #283 : the python bump has nothing to do with PyYAML, it's because of a breaking change in poetry 1.3.2->1.4.0. From what I understand, it was actually never intended that extras were not resolved alongside other dependencies. They've "fixed" that in 1.4.0 (alongside changing the way extras are defined, hence why we need to move where the novella version is defined), hence we can't use the "extras" as a way to have modules only for some versions of python (which has never been the intended use case anyways)

@NiklasRosenstein You'll need to make a choice, either force poetry<1.4 in your github workflow (which has several obvious downsides), find an alternative solution, or bump the minimal version of python to 3.8 (which imo is clearly the way to go,3.7 is 5 years old and there's no good reason not to upgrade. This won't prevent the people on 3.7 for legacy reasons to keep using the old releases. )

NiklasRosenstein commented 1 year ago

We can just use Poetry's new group format, Slap supports it now.

@zifeo Unfortunately I can't push to your fork's branch via the this MR so I can't bring it over the finish line. I'll open up a new PR.