Skip to content

Conversation

@EpicWink
Copy link
Contributor

@EpicWink EpicWink commented Feb 9, 2026

Makes most metadata and build configuration declarative

Also:

  • Drop License :: OSI Approved :: BSD License classifier (license classifiers are deprecated)
  • Specify license using SPDX identifier
  • Specify setuptools explicitly as a build requirement using PEP 518 (and as the backend using PEP 517)
  • Fix keywords declaration (from string to list)

I kept your custom long_description (pyproject.toml: readme) construction: there's no harm in it. Setuptools also has native functionality to read the version from a Python module attribute.

Comment on lines 5 to 12
@@ -16,47 +12,5 @@
)
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to figure out how to get rid of setup.py entirely. Maybe we could use the README.rst instead for the long description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's generally the goal, especially the most PyPI project pages don't include the changelog. The README is the traditional long description, but perhaps you could first consolidate docs/introduction.rst and the README into one file (and have the docs build pull in the README).

Again, it's not too important to remove setup.py for sdist metadata generation, as it will be indefinitely supported and is perfectly fine for non-programmatic metadata such as long-description

Copy link
Member

Choose a reason for hiding this comment

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

perhaps you could first consolidate docs/introduction.rst and the README into one file (and have the docs build pull in the README).

This sounds good to me.

Comment on lines +57 to +58
[tool.setuptools.dynamic]
version = { attr = "dateparser.__version__" }
Copy link
Member

Choose a reason for hiding this comment

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

We use bumpversion. So it probably makes sense to hard-code the version instead of making it dynamic, bumpversion will take care of updating it in both places. In fact, I think it can update it in pyproject.toml without specific configuration for it, and it may be possible to remove the current_version definition under [tool.bumpversion] once the project version is defined through standard pyproject.toml syntax.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have no familiarity with bumpversion, and its docs (and its fork's docs) don't mention pyproject.toml. This pull request currently keeps the current release process unchanged, but I'm open to suggestions.

Copy link
Member

Choose a reason for hiding this comment

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

https://callowayproject.github.io/bump-my-version/reference/configuration/global/#current_version

‡ If pyproject.toml exists, then current_version falls back to project.version in pyproject.toml. This only works if project.version is statically set.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, so you use Bump My Version, not bumpversion. Either way, do you want to store the current version in project.version in pyproject.toml, or in dateparser.__version__? The second way isn't actually dynamic, it's simply not statically defined in pyproject.toml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants