#11655 Update package metadata#11656
Conversation
9029bc7 to
0f6eba3
Compare
|
Thanks for helping with this.
What is that file. Do we need it?
Thanks. This needs and update... but maybe in another PR. There is also this PR #1656 I guess that it would help to merge that first. Don't forgot to ask for a review, when you think this is ready for review |
|
Oh thanks I forgot: please review |
No need I think https://src.fedoraproject.org/rpms/python-twisted/blob/rawhide/f/python-twisted.spec |
95d4b73 to
0295a48
Compare
|
I rebased to fix the conflict. |
|
Thanks, @ofek for the updates and the changes. The changes look good. I don't have much experience with python packaging ...so I don't know what to say. I understand that the changes don't bring many benefits...at least not in the short term. This is more about getting the This looks to me more like a political decision, rather than a technical one :) Before merging this I would like to get some feedback from other team members. @graingert you were at some point our packaging champion, Any comments against merging this. @glyph sorry for the noise, maybe you care. I have not mentioned Tom and Jean-Paul as I think they are already subscribed to this. |
Not at all! As I mentioned:
|
flattery will get you everywhere :) |
| * **all-non-platform** - installs **tls**, **conch**, **soap**, and **serial** options. | ||
|
|
||
| * **macos_platform** - **all_non_platform** options and `pyobjc`_ to work with Objective-C apis. | ||
| * **macos-platform** - **all-non-platform** options and `pyobjc`_ to work with Objective-C apis. |
There was a problem hiding this comment.
Thanks for updating the docs here.
Co-authored-by: Glyph <glyph@twistedmatrix.com>
glyph
left a comment
There was a problem hiding this comment.
So, @ofek, I'm inclined to approve this, I love the idea of moving into the future here, and I appreciate your thoroughness in mentioning platforms and distribution channels which support the necessary tooling.
I particularly love getting rid of MANIFEST.in / check-manifest, which involves a huge amount of obscure knowledge that nobody really understands, and centralizing around pyproject.toml which is much friendlier to user comprehension.
However, here's the question that I would really prefer to answer before saying "yes, definitely", which is: what platforms, and particularly what out-of-the-box experiences, are we breaking here?
For example: on macOS, you generally should install your own Python. However, there's a "default" workflow where, if you run python3 in a terminal, a dialog box pops up and installs command-line development tools, which is a convenient and frequently-used workflow for novice developers who may not have much experience of the CLI or of other platforms. So there's some motivation to continue to support Python 3.9.6, which is the current version of Python bundled into Xcode, and pip 21.2.4.
So, hooray, for that use-case, we're all good. But what versions of Linux and Windows do people actually run on their laptops and production servers? What audiences depend on old versions of things?
In general we're becoming less tolerant of people who are massively out of date and using unsupported platforms, but are there any still-supported platforms that are going to have difficulty with this?
That said, I think that blocking based on this concern would be bad. It may create a huge amount of tedious work to figure out, and then if we do figure out that some platform is broken we have to actually come up with some crisp criteria for which ones we support and why, which is work we haven't done yet. And meanwhile, as you say, new installs are gonna break one day when setup.py stops working.
So here's how I would suggest splitting the difference: send an email to twisted@python.org to increase the visibility of the upcoming change, explain as best you can what versions of things will be supported, ask people to test out this branch for a little while — not more than two weeks, probably less if we actually get any feedback — and then land it.
|
I sent an email as requested! |
Hm. I don't even see any held messages on the mailing list admin interface. Did you subscribe to the list first? |
|
Oops no, how? |
|
Okay, I think it worked this time edit: yes https://mail.python.org/archives/list/twisted@python.org/thread/CCDCU4R2VLJEPENPGBJLRJL3IMRXVEYT/ |
|
To put
into perspective: Black, the probably most used Python CLI tool has switched to Hatch. |
Local build hook:
We're still doing that here thanks to @hynek's hatch-fancy-pypi-readme plugin |
|
Tests are passing but uploading to Codecov is failing. I actually added that to Hatch over the weekend for a day then got rid of it pypa/hatch#545 |
|
Hi, The coverage was fixed after a retry...but I see the documentation build failing when using tox. https://github.com/twisted/twisted/actions/runs/3237401117/jobs/5304748238#step:5:17 It looks like sphinx is not automatically installed by The separate Read the docs build works. |
|
Woah, real bug. pip treats (pre-PEP 685) |
|
Fixed, Hatchling made this quite easy 🙂
Now we're doing such a thing! |
7349295 to
bd6eeb2
Compare
One important piece of information: Using Executing the file, in the sense of running it as a CLI tool, is deprecated, so, from the setuptools point of view, the important change is to replace:
|
|
CI is passing now btw |
|
Thanks for the updated. I will get this up to date and enable automerge. It looks like the other Twisted devs are busy or don't care that much about this change. For me, this is also not very important and I am not very excited about this changes. Also, this is pushing a new dependency. But the tests are green, so I think we can merge this. And if people are saying that this is the future, what can I say ? :) If someone complains about this change we should be able to revert it. |
|
Codecov flakes again |
|
Hello, I'm one of the maintainers of pyca/cryptography. We run twisted's test suite in our CI. It recently broke -- somewhere in 4b62da0...8d8f1b0. I think this PR is most likely https://github.com/pyca/cryptography/actions/runs/3324679422/jobs/5496544314 is the failure we are seeing. Do you have a clue what caused this? Is this an issue on our side, or in twisted? |
|
Thanks, @alex for the report. Most probably this is the reason for the failure. I see that the zope-interface is recognized and installed https://github.com/pyca/cryptography/actions/runs/3324679422/jobs/5496544314#step:5:102 I will wait a bit for @ofek to see if there is a quick fix. But I think that this PR will need a revert. Thanks again for the report |
|
I'm going to pull this change immediately; no reason to leave trunk broken. If this doesn't fix the issue then we can put it back in, if @ofek can fix it quickly he can fix it in the revert-the-revert PR :) |
|
Looking |
|
@ofek you may have a little while as we figure out what to do with the buggy newsfragment check ;-) |
|
finding link to setuptools issue now |
|
https://github.com/twisted/twisted/blob/trunk/src/twisted/trial/__main__.py needs to not use the deprecated pkg_resources but rather https://docs.python.org/3/library/importlib.metadata.html I'll make a PR |
|
I suspect (haven't had chance to confirm) that this change caused us to fail to |
|
Works for me: |
|
Hmm, odd. Maybe there's some unusual interaction between Twisted's dependencies and poetry's dependencies which was breaking for us? Thanks for trying: if it pops up again I'll investigate more and file a proper report. |
|
was a Poetry thing matrix-org/synapse#14296 (comment) |
Scope and purpose
Fixes #11655
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.pyfiles 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.pyandMANIFEST.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.Notes
src/*.egg-infofrompython setup.py develop; this is now fixedadmin/twisted.specis right but I'm not an expertFuture
setup.cfgsetup.pyContributor Checklist:
please review.Our bot will trigger the review process, by applying the pending review label
and requesting a review from the Twisted dev team.