Skip to content
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

chore(dist): remove setup.cfg #2277

Merged
merged 14 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Release Process:

1. Bump version and update tag.
1. Bump version (including the suffix for pre-release, if applicable).
2. Update changelog and render towncrier fragments.
3. Release beta or rc.
4. Run benchmark and check for regressions.
Expand All @@ -12,16 +12,30 @@ Release Process:
8. Announce the new version in Gitter channels and on the socials.
9. Improve this document.

### Bump version and update tag
### Bump version

Modify `falcon/version.py` if it has not been updated since the previous
release. Examine the rendered changelog to determine the appropriate SEMVER
field to modify.

Update changelog filename in `pyproject.toml` to suit.
Note that we have dropped `setup.cfg` altogether, so `__version__` in
`falcon/version.py` must contain the **whole version**
(including the previously separately managed `tag_build`), for instance:
```python
# Development version
__version__ = '4.0.0.dev1'

# First alpha
__version__ = '4.0.0a1'

# Release candidate
__version__ = '4.0.0rc1'

# Stable release
__version__ = '4.0.0'
```

Update the build tag in `setup.cfg` under `[egg_info]` for pre-release builds,
or remove it (leaving it blank as in `tag_build =`) for a final release.
Update changelog filename in `pyproject.toml` to suit.

### Update changelog and render towncrier fragments

Expand All @@ -30,22 +44,14 @@ the following template, and update the summary and changes to supported
platforms to suit:

```rst
Changelog for Falcon 3.0.1
Changelog for Falcon 4.0.1
vytas7 marked this conversation as resolved.
Show resolved Hide resolved
==========================

Summary
-------

This is a minor point release to take care of a couple of bugs that we did
not catch for 3.0.0.

Changes to Supported Platforms
------------------------------

- CPython 3.10 is now fully supported. (`#1966 <https://github.com/falconry/falcon/issues/1966>`__)
- Support for Python 3.6 is now deprecated and will be removed in Falcon 4.0.
- As with the previous release, Python 3.5 support remains deprecated and will
no longer be supported in Falcon 4.0.
not catch for 4.0.0.


.. towncrier release notes start
Expand Down
5 changes: 3 additions & 2 deletions docs/_newsfragments/2182.breakingchange.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
The function :func:`falcon.http_date_to_dt` now validates http-dates to have the correct
timezone set. It now also returns timezone aware datetime objects.
The function :func:`falcon.http_date_to_dt` now validates HTTP dates to have
the correct timezone set. It now also returns timezone-aware
:class:`~datetime.datetime` objects.
5 changes: 3 additions & 2 deletions docs/_newsfragments/2253.misc.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
The functions ``create_task()`` and ``get_running_loop()`` of `falcon.util.sync` are deprecated.
The counterpart functions in the builtin package `asyncio` are encouraged to be used.
The :ref:`utility functions <util>` ``create_task()`` and
``get_running_loop()`` are now deprecated in favor of their standard library
counterparts, :func:`asyncio.create_task` and `:func:`asyncio.get_running_loop`.
3 changes: 2 additions & 1 deletion docs/_newsfragments/2301.misc.rst
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Deprecated the ``TimezoneGMT`` class. Use :attr:`datetime.timezone.utc` instead.
The ``falcon.TimezoneGMT`` class was deprecated. Use the UTC timezone
(:attr:`datetime.timezone.utc`) from the standard library instead.
5 changes: 5 additions & 0 deletions docs/_newsfragments/2314.breakingchange.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
``setup.cfg`` was dropped in favor of consolidating all static project
configuration in ``pyproject.toml`` (``setup.py`` is still needed for
programmatic control of the build process). While this change should not impact
the framework's end-users directly, some ``setuptools``\-based legacy workflows
(such as the obsolete ``setup.py test``) will no longer work.
17 changes: 8 additions & 9 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# serve to show the default.

from collections import OrderedDict
import configparser
from datetime import datetime
import multiprocessing
import os
Expand Down Expand Up @@ -87,19 +86,19 @@
# |version| and |release|, also used in various other places throughout the
# built documents.

cfg = configparser.ConfigParser()
cfg.read('../setup.cfg')
tag = cfg.get('egg_info', 'tag_build')
_version_components = falcon.__version__.split('.')
_prerelease = any(
not component.isdigit() and not component.startswith('post')
for component in _version_components
)

html_context = {
'prerelease': bool(tag), # True if tag is not the empty string
}
html_context = {'prerelease': _prerelease}

# The short X.Y version.
version = '.'.join(falcon.__version__.split('.')[0:2]) + tag
version = '.'.join(_version_components[0:2])

# The full version, including alpha/beta/rc tags.
release = falcon.__version__ + tag
release = falcon.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion falcon/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@

"""Falcon version."""

__version__ = '4.0.0'
__version__ = '4.0.0.dev2'
"""Current version of Falcon."""
87 changes: 81 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,85 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=47",
"wheel>=0.34",
"cython>=3.0.8; python_implementation == 'CPython'", # Skip cython when using pypy
]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=47",
"wheel>=0.34",
vytas7 marked this conversation as resolved.
Show resolved Hide resolved
"cython>=3.0.8; python_implementation == 'CPython'", # Skip cython when using pypy
]

[project]
name = "falcon"
readme = {file = "README.rst", content-type = "text/x-rst"}
dynamic = ["version"]
dependencies = []
requires-python = ">=3.8"
description = "The ultra-reliable, fast ASGI+WSGI framework for building data plane APIs at scale."
authors = [
{name = "Kurt Griffiths", email = "[email protected]"},
]
license = {text = "Apache 2.0"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Natural Language :: English",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Topic :: Internet :: WWW/HTTP :: WSGI",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Cython",
"Typing :: Typed",
]
keywords = [
"asgi",
"wsgi",
"web",
"api",
"framework",
"rest",
"http",
"cloud",
]

[project.optional-dependencies]
test = ["pytest"]

[project.scripts]
falcon-bench = "falcon.cmd.bench:main"
falcon-inspect-app = "falcon.cmd.inspect_app:main"
falcon-print-routes = "falcon.cmd.inspect_app:route_main"

[project.urls]
Homepage = "https://falconframework.org"
Documentation = "https://falcon.readthedocs.io/en/stable/"
"Release Notes" = "https://falcon.readthedocs.io/en/stable/changes/"
"Source" = "https://github.com/falconry/falcon"
"Issue Tracker" = "https://github.com/falconry/falcon/issues"
Funding = "https://opencollective.com/falcon"
Chat = "https://gitter.im/falconry/user"

[tool.setuptools]
include-package-data = true
license-files = ["LICENSE"]
zip-safe = false

[tool.setuptools.dynamic]
version = {attr = "falcon.version.__version__"}

[tool.setuptools.packages.find]
exclude = ["examples", "tests"]

[tool.mypy]
exclude = [
Expand Down
83 changes: 0 additions & 83 deletions setup.cfg

This file was deleted.