Skip to content

migrate packaging to pyproject.toml #9056

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

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

deronnax
Copy link
Contributor

@deronnax deronnax commented Jul 27, 2023

Just an initiative of my own.

Don't forget to squash merge the PR.

@deronnax deronnax marked this pull request as draft July 27, 2023 13:40
@deronnax deronnax force-pushed the migrate_setuppy_to_pryoject.toml branch from 6344069 to 42d468b Compare July 27, 2023 13:41
@deronnax
Copy link
Contributor Author

deronnax commented Jul 29, 2023

OK, it's almost ready except:

  • It can't work on python 3.6 because having setuptools being able to read metadata from pyproject.toml requires setuptools > 61.2, which does not support python 3.6 anymore.
  • I need to figure out what is conftest.py doing with the package_root

@deronnax deronnax force-pushed the migrate_setuppy_to_pryoject.toml branch from 8c65e6d to 6e67258 Compare July 29, 2023 17:07
@terencehonles
Copy link
Contributor

  • I need to figure out what is conftest.py doing with the package_root

This is unrelated to your PR and I fixed it with #9129

@deronnax deronnax force-pushed the migrate_setuppy_to_pryoject.toml branch from 6e67258 to b16826c Compare October 5, 2023 16:28
@deronnax deronnax marked this pull request as ready for review October 5, 2023 22:48
@deronnax
Copy link
Contributor Author

deronnax commented Oct 5, 2023

Wow. It works indeed. Thank you so much.

@auvipy auvipy self-requested a review October 6, 2023 05:42
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to hold this off for now. As we got other priorities.

@deronnax
Copy link
Contributor Author

deronnax commented Oct 6, 2023

Sure. A vague estimation of when it would become envisageable ?

@deronnax deronnax changed the title migrate setup.cfg to pyproject.toml migrate packaging to pyproject.toml Oct 7, 2023
@deronnax
Copy link
Contributor Author

deronnax commented Feb 5, 2024

To merge after #9210, I hope.

@deronnax deronnax force-pushed the migrate_setuppy_to_pryoject.toml branch from 12a5a0b to cf25dcd Compare February 27, 2024 13:37
@deronnax
Copy link
Contributor Author

watch-out: this PR is intended to be squash-merged

@tomchristie
Copy link
Member

So... this is a good example of a nice little pr that's a bit stalled. I don't really have any extra bandwidth to keep this moving, given existing commitments. Should we be having a discussion about getting the project into jazzband.co so that we've got a lower barrier of entry for new maintainers?

@deronnax
Copy link
Contributor Author

Hey, that's a very interesting decision that is (way) beyond the scope of my humble little PR. Maybe let's open a dedicated issue ou GitHub discussion?

@browniebroke
Copy link
Member

@auvipy did you have time to take a closer look? Is my previous message helpful to review what's going on and what's changed?

@auvipy
Copy link
Member

auvipy commented Jan 30, 2025

We can defer this until 3.16 release

@browniebroke
Copy link
Member

browniebroke commented Apr 2, 2025

We can defer this until 3.16 release

Shall we reconsider this now? I know that setuptools are doing some changes to discourage more and more running python setup.py. Implementing this would ensure we follow packaging best practices.

The conflicts are (I think) caused by #9670 and #9634

EDIT: this might conflict too if merged before: #9681

Copy link

stale bot commented Jul 19, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 19, 2025
@ulgens
Copy link
Contributor

ulgens commented Jul 19, 2025

@browniebroke Do we have a blocker? What is needed to push this forward?

@browniebroke
Copy link
Member

Do we have a blocker? What is needed to push this forward?

I don't have any blockers anymore - happy to go ahead with this one. Perhaps for 3.17?

@stale stale bot removed the stale label Jul 24, 2025
@browniebroke browniebroke modified the milestones: 3.16, 3.17 Jul 24, 2025
Copy link
Contributor

@terencehonles terencehonles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good to me and hopefully we can get this merged soon! A couple small notes based on recent pyproject.toml changes that could be addressed while waiting for an official ✔️

pyproject.toml Outdated
Comment on lines 32 to 33
requires-python = ">=3.9"
dependencies = ["django>=4.2"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to my other comments, but a little whitespace makes this a little easier to read:

Suggested change
requires-python = ">=3.9"
dependencies = ["django>=4.2"]
requires-python = ">= 3.9"
dependencies = ["django >= 4.2"]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really mind the way it is now (actually I prefer it).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend https://github.com/tox-dev/pyproject-fmt to standardize this kind of stuff.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to this comment since the project is already using pre-commit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it was on the back of my mind, but didn't want to scope creep too much here 😊 let's review it what this lands

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't think this should just be added since this is the PR that introduces the file and the pre-commit check will just keep the formatting consistent going forward?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum... Yes, I think you're right. It's a new file is added here so let's keep it all together 👍🏻

@browniebroke browniebroke dismissed auvipy’s stale review August 7, 2025 21:03

The PR has changed significantly

@browniebroke
Copy link
Member

A couple small notes based on recent pyproject.toml changes that could be addressed while waiting for an official

Thanks for the reviews, I've heard about these changes but forgot about them. Applied your suggestions.

@browniebroke
Copy link
Member

With 3.16.1 now out of the way, I'd like to get this one merged and released on 3.16.2, either on its own or with very minor other changes. 3.17 will have a number of other more significant changes which means we'll keep postponing this.

Thoughts?

Copy link
Member

@browniebroke browniebroke Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realise this was discussed before but I would vote for removing this file entirely.

Django has dropped it since (at least) version 4.2, so if Django can do it, I'd say we can too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't seen the discussion, but I would vote the same. It's really not providing much other than some "backwards compatibility" for ancient packagers, and they might not be compatible with newer build backends (though I would expect that to be somewhat unlikely). I assume most people are installing via wheels and if it breaks for someone using a non standard approach they can finally update their setup as they have had years to do so.

@browniebroke browniebroke modified the milestones: 3.17, 3.16 Aug 9, 2025
@auvipy auvipy modified the milestones: 3.16, 3.17 Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants