-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update package metadata #551
base: master
Are you sure you want to change the base?
Conversation
What exactly is |
f7d916e
to
da3db18
Compare
It essentially does the current logic of executing the |
da3db18
to
804b337
Compare
] | ||
|
||
[project.optional-dependencies] | ||
testing = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works as the "testing" extra right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup!
Homepage = "https://github.com/pytest-dev/pytest-cov" | ||
"Issue Tracker" = "https://github.com/pytest-dev/pytest-cov/issues" | ||
|
||
[tool.hatch.metadata.hooks.fancy-pypi-readme] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the fancy pypi readme do the ref tag stripping automatically? The ol setup.py had a re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, but as I mentioned in the OP it was doing nothing:
Python 3.11.0b3 (main, Jun 1 2022, 13:29:14) [MSC v.1932 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pathlib, re
>>>
>>> before = pathlib.Path('CHANGELOG.rst').read_text(encoding='utf-8')
>>> after = re.sub(':[a-z]+:`~?(.*?)`', r'``\1``', before)
>>>
>>> before == after
True
CI passing btw |
Just let me know if I can help! |
I'll be honest here I'm not a fan of redoing something that works. But I am also curious how well this could work so how about this: release it as pytest-cov 5.0.0a (or beta) and we keep this in a special "alpha" branch till people try it out enough? This can only work if you pledge yourself to maintain pytest-cov's packaging from here on out :-) |
I'm also in on this, starting with pluggy, then going for other pytest projects I like hatch enough that i decided to let my own tool die in favour of it. |
fd71fa5
to
9c11353
Compare
I rebased to fix conflicts. Would you mind triggering the CI with that button below? |
9c11353
to
c860920
Compare
I rebased again, accounting for #553 (comment) |
flake? |
c860920
to
7f0fe2e
Compare
I rebased again, accounting for #556 |
Would you mind triggering the CI with that button below? |
Passing 🙂 |
Please rebase. |
cc @graingert as requested!
Background
Hello there! The Python packaging ecosystem has standardized on the interface for build backends (PEP 517/PEP 660) and the format for metadata declaration (PEP 621/PEP 631). As a result, the execution of
setup.py
files is now deprecated.So, I'm spending my free time updating important projects so that they are modernized and set an example for others 😄
Summary of changes
This implements PEP 621, obviating the need for
setup.py
andMANIFEST.in
. The build backendhatchling
(of which I am a maintainer in the PyPA) is now used as that is the default in the official Python packaging tutorial. Hatchling is available on all the major distribution channels such as Debian, Fedora, Arch Linux, conda-forge, Nixpkgs, Alpine Linux, FreeBSD/OpenBSD, Gentoo Linux, MacPorts, OpenEmbedded, Spack, MSYS2, etc.Python support
The earliest supported Python 3 version of Hatchling is 3.7, therefore I've also set that as the minimum here. Python 3.6 is EOL and other build backends like
flit-core
andsetuptools
also dropped support. Python 3.6 accounted for 6-8% of downloads in the last month: https://pypistats.org/packages/pytest-covNotes
*.egg-info
frompython setup.py develop
; this is now fixedCHANGELOG.rst
regex substitution was doing nothing so the PyPI landing page continues to be simplyREADME.rst
+CHANGELOG.rst
pytest-cov.pth
was being checked into the repo but is not necessary now so I've removed itFuture
pytest
out ofsetup.cfg
and intopyproject.toml