From 9441b4ca018e475ce493382c0c786222ff1ff169 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 10:27:15 +0000 Subject: [PATCH 01/15] make parsable by setup-py-upgrade --- LONG_DESCRIPTION.rst | 65 +++++++++++++++++++++++++++++++++++++ MANIFEST.in | 1 + setup.py | 76 ++------------------------------------------ 3 files changed, 69 insertions(+), 73 deletions(-) create mode 100644 LONG_DESCRIPTION.rst diff --git a/LONG_DESCRIPTION.rst b/LONG_DESCRIPTION.rst new file mode 100644 index 0000000000..b0cfb99fbc --- /dev/null +++ b/LONG_DESCRIPTION.rst @@ -0,0 +1,65 @@ +.. image:: https://raw.githubusercontent.com/python-trio/trio/9b0bec646a31e0d0f67b8b6ecc6939726faf3e17/logo/logo-with-background.svg + :width: 200px + :align: right + +The Trio project's goal is to produce a production-quality, `permissively +licensed `__, +async/await-native I/O library for Python. Like all async libraries, +its main purpose is to help you write programs that do **multiple +things at the same time** with **parallelized I/O**. A web spider that +wants to fetch lots of pages in parallel, a web server that needs to +juggle lots of downloads and websocket connections at the same time, a +process supervisor monitoring multiple subprocesses... that sort of +thing. Compared to other libraries, Trio attempts to distinguish +itself with an obsessive focus on **usability** and +**correctness**. Concurrency is complicated; we try to make it *easy* +to get things *right*. + +Trio was built from the ground up to take advantage of the `latest +Python features `__, and +draws inspiration from `many sources +`__, in +particular Dave Beazley's `Curio `__. +The resulting design is radically simpler than older competitors like +`asyncio `__ and +`Twisted `__, yet just as capable. Trio is +the Python I/O library I always wanted; I find it makes building +I/O-oriented programs easier, less error-prone, and just plain more +fun. `Perhaps you'll find the same +`__. + +This project is young and still somewhat experimental: the overall +design is solid and the existing features are fully tested and +documented, but you may encounter missing functionality or rough +edges. We *do* encourage you do use it, but you should `read and +subscribe to issue #1 +`__ to get warning and a +chance to give feedback about any compatibility-breaking changes. + +Vital statistics: + +* Supported environments: Linux, macOS, or Windows running some kind of Python + 3.8-or-better (either CPython or PyPy3 is fine). \*BSD and illumos likely + work too, but are not tested. + +* Install: ``python3 -m pip install -U trio`` (or on Windows, maybe + ``py -3 -m pip install -U trio``). No compiler needed. + +* Tutorial and reference manual: https://trio.readthedocs.io + +* Changelog: https://trio.readthedocs.io/en/latest/history.html + +* Bug tracker and source code: https://github.com/python-trio/trio + +* Real-time chat: https://gitter.im/python-trio/general + +* Discussion forum: https://trio.discourse.group + +* License: MIT or Apache 2, your choice + +* Contributor guide: https://trio.readthedocs.io/en/latest/contributing.html + +* Code of conduct: Contributors are requested to follow our `code of + conduct + `_ + in all project spaces. diff --git a/MANIFEST.in b/MANIFEST.in index eb9c0173da..79e7891339 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,6 @@ include LICENSE LICENSE.MIT LICENSE.APACHE2 include README.rst +include LONG_DESCRIPTION.rst include CODE_OF_CONDUCT.md CONTRIBUTING.md include test-requirements.txt include trio/py.typed diff --git a/setup.py b/setup.py index aaf0ab09cf..b82a4fb40a 100644 --- a/setup.py +++ b/setup.py @@ -1,81 +1,11 @@ from setuptools import find_packages, setup -__version__ = "0.0.0" # Overwritten from _version.py below, needed for linter to identify that this variable is defined. - -with open("trio/_version.py", encoding="utf-8") as version_code: - exec(version_code.read()) - -LONG_DESC = """\ -.. image:: https://raw.githubusercontent.com/python-trio/trio/9b0bec646a31e0d0f67b8b6ecc6939726faf3e17/logo/logo-with-background.svg - :width: 200px - :align: right - -The Trio project's goal is to produce a production-quality, `permissively -licensed `__, -async/await-native I/O library for Python. Like all async libraries, -its main purpose is to help you write programs that do **multiple -things at the same time** with **parallelized I/O**. A web spider that -wants to fetch lots of pages in parallel, a web server that needs to -juggle lots of downloads and websocket connections at the same time, a -process supervisor monitoring multiple subprocesses... that sort of -thing. Compared to other libraries, Trio attempts to distinguish -itself with an obsessive focus on **usability** and -**correctness**. Concurrency is complicated; we try to make it *easy* -to get things *right*. - -Trio was built from the ground up to take advantage of the `latest -Python features `__, and -draws inspiration from `many sources -`__, in -particular Dave Beazley's `Curio `__. -The resulting design is radically simpler than older competitors like -`asyncio `__ and -`Twisted `__, yet just as capable. Trio is -the Python I/O library I always wanted; I find it makes building -I/O-oriented programs easier, less error-prone, and just plain more -fun. `Perhaps you'll find the same -`__. - -This project is young and still somewhat experimental: the overall -design is solid and the existing features are fully tested and -documented, but you may encounter missing functionality or rough -edges. We *do* encourage you do use it, but you should `read and -subscribe to issue #1 -`__ to get warning and a -chance to give feedback about any compatibility-breaking changes. - -Vital statistics: - -* Supported environments: Linux, macOS, or Windows running some kind of Python - 3.8-or-better (either CPython or PyPy3 is fine). \\*BSD and illumos likely - work too, but are not tested. - -* Install: ``python3 -m pip install -U trio`` (or on Windows, maybe - ``py -3 -m pip install -U trio``). No compiler needed. - -* Tutorial and reference manual: https://trio.readthedocs.io - -* Changelog: https://trio.readthedocs.io/en/latest/history.html - -* Bug tracker and source code: https://github.com/python-trio/trio - -* Real-time chat: https://gitter.im/python-trio/general - -* Discussion forum: https://trio.discourse.group - -* License: MIT or Apache 2, your choice - -* Contributor guide: https://trio.readthedocs.io/en/latest/contributing.html - -* Code of conduct: Contributors are requested to follow our `code of - conduct - `_ - in all project spaces. -""" +with open("LONG_DESCRIPTION.rst", encoding="utf8") as f: + LONG_DESC = f.read() setup( name="trio", - version=__version__, + version="0.0.0", description="A friendly Python library for async concurrency and I/O", long_description=LONG_DESC, long_description_content_type="text/x-rst", From 8eea4937fa9d16c6fc95e7e49c9f09c3008e5410 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 10:27:30 +0000 Subject: [PATCH 02/15] apply setup-py-upgrade --- setup.cfg | 51 ++++++++++++++++++++++++++++++++++++++++++++ setup.py | 63 ++----------------------------------------------------- 2 files changed, 53 insertions(+), 61 deletions(-) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000000..7c1d9d49f4 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,51 @@ +[metadata] +name = trio +version = 0.0.0 +description = A friendly Python library for async concurrency and I/O +long_description = file: LONG_DESCRIPTION.rst +long_description_content_type = text/x-rst +author = Nathaniel J. Smith +author_email = njs@pobox.com +url = https://github.com/python-trio/trio +license = MIT OR Apache-2.0 +keywords = + async + io + networking + trio +classifiers = + Development Status :: 3 - Alpha + Framework :: Trio + Intended Audience :: Developers + License :: OSI Approved :: MIT License + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Operating System :: MacOS :: MacOS X + Operating System :: POSIX :: BSD + Operating System :: Microsoft :: Windows + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: Implementation :: PyPy + Programming Language :: Python :: 3 :: Only + 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 + Topic :: System :: Networking + Typing :: Typed +project_urls = + Documentation=https://trio.readthedocs.io/ + Changelog=https://trio.readthedocs.io/en/latest/history.html + +[options] +packages = find: +install_requires = + attrs >= 20.1.0 + sortedcontainers + idna + outcome + sniffio >= 1.3.0 + cffi>=1.14; os_name == 'nt' and implementation_name != 'pypy' + exceptiongroup >= 1.0.0rc9; python_version < '3.11' +include_package_data = True +python_requires = >=3.8 diff --git a/setup.py b/setup.py index b82a4fb40a..8bf1ba938a 100644 --- a/setup.py +++ b/setup.py @@ -1,61 +1,2 @@ -from setuptools import find_packages, setup - -with open("LONG_DESCRIPTION.rst", encoding="utf8") as f: - LONG_DESC = f.read() - -setup( - name="trio", - version="0.0.0", - description="A friendly Python library for async concurrency and I/O", - long_description=LONG_DESC, - long_description_content_type="text/x-rst", - author="Nathaniel J. Smith", - author_email="njs@pobox.com", - url="https://github.com/python-trio/trio", - license="MIT OR Apache-2.0", - packages=find_packages(), - install_requires=[ - # attrs 19.2.0 adds `eq` option to decorators - # attrs 20.1.0 adds @frozen - "attrs >= 20.1.0", - "sortedcontainers", - "idna", - "outcome", - "sniffio >= 1.3.0", - # cffi 1.12 adds from_buffer(require_writable=True) and ffi.release() - # cffi 1.14 fixes memory leak inside ffi.getwinerror() - # cffi is required on Windows, except on PyPy where it is built-in - "cffi>=1.14; os_name == 'nt' and implementation_name != 'pypy'", - "exceptiongroup >= 1.0.0rc9; python_version < '3.11'", - ], - # This means, just install *everything* you see under trio/, even if it - # doesn't look like a source file, so long as it appears in MANIFEST.in: - include_package_data=True, - python_requires=">=3.8", - keywords=["async", "io", "networking", "trio"], - classifiers=[ - "Development Status :: 3 - Alpha", - "Framework :: Trio", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "License :: OSI Approved :: Apache Software License", - "Operating System :: POSIX :: Linux", - "Operating System :: MacOS :: MacOS X", - "Operating System :: POSIX :: BSD", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Programming Language :: Python :: 3 :: Only", - "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", - "Topic :: System :: Networking", - "Typing :: Typed", - ], - project_urls={ - "Documentation": "https://trio.readthedocs.io/", - "Changelog": "https://trio.readthedocs.io/en/latest/history.html", - }, -) +from setuptools import setup +setup() From 36a47a1328575e36658934531193a3233597b22c Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 10:29:16 +0000 Subject: [PATCH 03/15] restore comments --- setup.cfg | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/setup.cfg b/setup.cfg index 7c1d9d49f4..6cd0081843 100644 --- a/setup.cfg +++ b/setup.cfg @@ -40,12 +40,21 @@ project_urls = [options] packages = find: install_requires = + # attrs 19.2.0 adds `eq` option to decorators + # attrs 20.1.0 adds @frozen attrs >= 20.1.0 sortedcontainers idna outcome sniffio >= 1.3.0 + # cffi 1.12 adds from_buffer(require_writable=True) and ffi.release() + # cffi 1.14 fixes memory leak inside ffi.getwinerror() + # cffi is required on Windows, except on PyPy where it is built-in cffi>=1.14; os_name == 'nt' and implementation_name != 'pypy' exceptiongroup >= 1.0.0rc9; python_version < '3.11' + +# This means, just install *everything* you see under trio/, even if it +# doesn't look like a source file, so long as it appears in MANIFEST.in: include_package_data = True + python_requires = >=3.8 From 5d0a914297f658aa34b2f8a59c36ed412401c116 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 10:30:04 +0000 Subject: [PATCH 04/15] fix version --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 6cd0081843..c9087724f8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = trio -version = 0.0.0 +version = attr: trio._version.__version__ description = A friendly Python library for async concurrency and I/O long_description = file: LONG_DESCRIPTION.rst long_description_content_type = text/x-rst From d66e7ca7f4e03c09804f0adda15eccd11a5d707a Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 10:31:36 +0000 Subject: [PATCH 05/15] apply ini2toml --- pyproject.toml | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++ setup.cfg | 60 ----------------------------------------- 2 files changed, 73 insertions(+), 60 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index e7422591f8..b6de158f42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,76 @@ +[build-system] +requires = ["setuptools>=61.2"] +build-backend = "setuptools.build_meta" + +[project] +name = "trio" +description = "A friendly Python library for async concurrency and I/O" +authors = [{name = "Nathaniel J. Smith", email = "njs@pobox.com"}] +license = {text = "MIT OR Apache-2.0"} +keywords = [ + "async", + "io", + "networking", + "trio", +] +classifiers = [ + "Development Status :: 3 - Alpha", + "Framework :: Trio", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Apache Software License", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS :: MacOS X", + "Operating System :: POSIX :: BSD", + "Operating System :: Microsoft :: Windows", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Programming Language :: Python :: 3 :: Only", + "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", + "Topic :: System :: Networking", + "Typing :: Typed", +] +requires-python = ">=3.8" +dependencies = [ + # attrs 19.2.0 adds `eq` option to decorators + # attrs 20.1.0 adds @frozen + "attrs >= 20.1.0", + "sortedcontainers", + "idna", + "outcome", + "sniffio >= 1.3.0", + # cffi 1.12 adds from_buffer(require_writable=True) and ffi.release() + # cffi 1.14 fixes memory leak inside ffi.getwinerror() + # cffi is required on Windows, except on PyPy where it is built-in + "cffi>=1.14; os_name == 'nt' and implementation_name != 'pypy'", + "exceptiongroup >= 1.0.0rc9; python_version < '3.11'", +] +dynamic = ["version"] + +[project.readme] +file = "LONG_DESCRIPTION.rst" +content-type = "text/x-rst" + +[project.urls] +Homepage = "https://github.com/python-trio/trio" +Documentation = "https://trio.readthedocs.io/" +Changelog = "https://trio.readthedocs.io/en/latest/history.html" + +[tool.setuptools] +include-package-data = true + +[tool.setuptools.packages] +find = {namespaces = false} +# This means, just install *everything* you see under trio/, even if it +# doesn't look like a source file, so long as it appears in MANIFEST.in: + +[tool.setuptools.dynamic] +version = {attr = "trio._version.__version__"} + [tool.black] target-version = ['py38'] force-exclude = ''' diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index c9087724f8..0000000000 --- a/setup.cfg +++ /dev/null @@ -1,60 +0,0 @@ -[metadata] -name = trio -version = attr: trio._version.__version__ -description = A friendly Python library for async concurrency and I/O -long_description = file: LONG_DESCRIPTION.rst -long_description_content_type = text/x-rst -author = Nathaniel J. Smith -author_email = njs@pobox.com -url = https://github.com/python-trio/trio -license = MIT OR Apache-2.0 -keywords = - async - io - networking - trio -classifiers = - Development Status :: 3 - Alpha - Framework :: Trio - Intended Audience :: Developers - License :: OSI Approved :: MIT License - License :: OSI Approved :: Apache Software License - Operating System :: POSIX :: Linux - Operating System :: MacOS :: MacOS X - Operating System :: POSIX :: BSD - Operating System :: Microsoft :: Windows - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Programming Language :: Python :: 3 :: Only - 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 - Topic :: System :: Networking - Typing :: Typed -project_urls = - Documentation=https://trio.readthedocs.io/ - Changelog=https://trio.readthedocs.io/en/latest/history.html - -[options] -packages = find: -install_requires = - # attrs 19.2.0 adds `eq` option to decorators - # attrs 20.1.0 adds @frozen - attrs >= 20.1.0 - sortedcontainers - idna - outcome - sniffio >= 1.3.0 - # cffi 1.12 adds from_buffer(require_writable=True) and ffi.release() - # cffi 1.14 fixes memory leak inside ffi.getwinerror() - # cffi is required on Windows, except on PyPy where it is built-in - cffi>=1.14; os_name == 'nt' and implementation_name != 'pypy' - exceptiongroup >= 1.0.0rc9; python_version < '3.11' - -# This means, just install *everything* you see under trio/, even if it -# doesn't look like a source file, so long as it appears in MANIFEST.in: -include_package_data = True - -python_requires = >=3.8 From 71af3e2e9b39c7e56c29bebbb78d294344127c3d Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 10:31:59 +0000 Subject: [PATCH 06/15] fix comment location --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b6de158f42..59b3aa7693 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,12 +61,12 @@ Documentation = "https://trio.readthedocs.io/" Changelog = "https://trio.readthedocs.io/en/latest/history.html" [tool.setuptools] +# This means, just install *everything* you see under trio/, even if it +# doesn't look like a source file, so long as it appears in MANIFEST.in: include-package-data = true [tool.setuptools.packages] find = {namespaces = false} -# This means, just install *everything* you see under trio/, even if it -# doesn't look like a source file, so long as it appears in MANIFEST.in: [tool.setuptools.dynamic] version = {attr = "trio._version.__version__"} From e25bdc2be7184ca7ad9b5eb1d1bed52c3597c09a Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 10:39:13 +0000 Subject: [PATCH 07/15] delete setup.py --- .coveragerc | 1 - .github/workflows/autodeps.yml | 2 +- check.sh | 8 ++++---- ci.sh | 4 ++-- docs/source/contributing.rst | 4 ++-- docs/source/releasing.rst | 2 +- setup.py | 2 -- trio/_core/_tests/test_multierror_scripts/__init__.py | 3 ++- trio/_version.py | 2 +- 9 files changed, 13 insertions(+), 15 deletions(-) delete mode 100644 setup.py diff --git a/.coveragerc b/.coveragerc index 604c14775f..805bf1cbb3 100644 --- a/.coveragerc +++ b/.coveragerc @@ -2,7 +2,6 @@ branch=True source=trio omit= - setup.py # These are run in subprocesses, but still don't work. We follow # coverage's documentation to no avail. */trio/_core/_tests/test_multierror_scripts/* diff --git a/.github/workflows/autodeps.yml b/.github/workflows/autodeps.yml index 40cf05726c..663da548ce 100644 --- a/.github/workflows/autodeps.yml +++ b/.github/workflows/autodeps.yml @@ -34,7 +34,7 @@ jobs: # The new dependencies may contain a new black version. # Commit any changes immediately. python -m pip install -r test-requirements.txt - black setup.py trio + black trio - name: Commit changes and create automerge PR env: GH_TOKEN: ${{ github.token }} diff --git a/check.sh b/check.sh index 58b00aa1ce..01efd273db 100755 --- a/check.sh +++ b/check.sh @@ -23,10 +23,10 @@ echo "::endgroup::" # autoflake --recursive --in-place . # pyupgrade --py3-plus $(find . -name "*.py") echo "::group::Black" -if ! black --check setup.py trio; then +if ! black --check trio; then echo "* Black found issues" >> "$GITHUB_STEP_SUMMARY" EXIT_STATUS=1 - black --diff setup.py trio + black --diff trio echo "::endgroup::" echo "::error:: Black found issues" else @@ -118,8 +118,8 @@ Problems were found by static analysis (listed above). To fix formatting and see remaining errors, run pip install -r test-requirements.txt - black setup.py trio - isort setup.py trio + black trio + isort trio ./check.sh in your local checkout. diff --git a/ci.sh b/ci.sh index 157b3ce8b2..27fdad9b21 100755 --- a/ci.sh +++ b/ci.sh @@ -40,8 +40,8 @@ echo "::group::Install dependencies" python -m pip install -U pip setuptools wheel python -m pip --version -python setup.py sdist --formats=zip -python -m pip install dist/*.zip +python -m build --sdist +python -m pip install dist/*.tar.gz if [ "$CHECK_FORMATTING" = "1" ]; then python -m pip install -r test-requirements.txt diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 6189814b3f..3e665b2199 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -133,7 +133,7 @@ in separate sections below: adding a test to make sure it stays fixed. * :ref:`pull-request-formatting`: If you changed Python code, then did - you run ``black setup.py trio``? (Or for other packages, replace + you run ``black trio``? (Or for other packages, replace ``trio`` with the package name.) * :ref:`pull-request-release-notes`: If your change affects @@ -316,7 +316,7 @@ you can can add ``# fmt: off`` and ``# fmt: on`` comments. If you want to see what changes black will make, you can use:: - black --diff setup.py trio + black --diff trio (``--diff`` displays a diff, versus the default mode which fixes files in-place.) diff --git a/docs/source/releasing.rst b/docs/source/releasing.rst index 0fe51370d5..7aec4d7bef 100644 --- a/docs/source/releasing.rst +++ b/docs/source/releasing.rst @@ -44,7 +44,7 @@ Things to do for releasing: * push to PyPI:: git clean -xdf # maybe run 'git clean -xdn' first to see what it will delete - python3 setup.py sdist bdist_wheel + python3 -m build twine upload dist/* * update version number in the same pull request diff --git a/setup.py b/setup.py deleted file mode 100644 index 8bf1ba938a..0000000000 --- a/setup.py +++ /dev/null @@ -1,2 +0,0 @@ -from setuptools import setup -setup() diff --git a/trio/_core/_tests/test_multierror_scripts/__init__.py b/trio/_core/_tests/test_multierror_scripts/__init__.py index a1f6cb598d..26b5192ec7 100644 --- a/trio/_core/_tests/test_multierror_scripts/__init__.py +++ b/trio/_core/_tests/test_multierror_scripts/__init__.py @@ -1,2 +1,3 @@ # This isn't really a package, everything in here is a standalone script. This -# __init__.py is just to fool setup.py into actually installing the things. +# __init__.py is just to fool setuptools' find = {namespaces = false} into +# actually installing the things. diff --git a/trio/_version.py b/trio/_version.py index bce654e40c..387bec2690 100644 --- a/trio/_version.py +++ b/trio/_version.py @@ -1,3 +1,3 @@ -# This file is imported from __init__.py and exec'd from setup.py +# This file is imported from __init__.py and ast parsed by setuptools __version__ = "0.23.1+dev" From 12049e476740beb4b690eac90a31de21802c25fe Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 10:41:05 +0000 Subject: [PATCH 08/15] install build --- ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci.sh b/ci.sh index 27fdad9b21..05f6b9adca 100755 --- a/ci.sh +++ b/ci.sh @@ -37,7 +37,7 @@ python -c "import sys, struct, ssl; print('python:', sys.version); print('versio echo "::endgroup::" echo "::group::Install dependencies" -python -m pip install -U pip setuptools wheel +python -m pip install -U pip build python -m pip --version python -m build --sdist From 5c598b46319e5e8ab63eb0abb8f767a914a1a0de Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 10:48:27 +0000 Subject: [PATCH 09/15] add newsfragment --- newsfragments/2860.misc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 newsfragments/2860.misc.rst diff --git a/newsfragments/2860.misc.rst b/newsfragments/2860.misc.rst new file mode 100644 index 0000000000..508e13b355 --- /dev/null +++ b/newsfragments/2860.misc.rst @@ -0,0 +1 @@ +Moved the metadata into ``PEP 621``-compliant ``pyproject.toml``. From ed4a0db3354be982a79787fe9631f5c560f4e9f1 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 11:03:47 +0000 Subject: [PATCH 10/15] bump setuptools build-system requires to 64 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 59b3aa7693..4212b5f5ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=61.2"] +requires = ["setuptools>=64"] build-backend = "setuptools.build_meta" [project] From 9675f762c1d05cabbb41cbc859e5b268164702ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Sat, 4 Nov 2023 16:26:34 +0200 Subject: [PATCH 11/15] Update ci.sh Co-authored-by: Thomas Grainger --- ci.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci.sh b/ci.sh index 05f6b9adca..b4cde35b82 100755 --- a/ci.sh +++ b/ci.sh @@ -40,8 +40,8 @@ echo "::group::Install dependencies" python -m pip install -U pip build python -m pip --version -python -m build --sdist -python -m pip install dist/*.tar.gz +python -m build +python -m pip install dist/*.whl if [ "$CHECK_FORMATTING" = "1" ]; then python -m pip install -r test-requirements.txt From e070e232f05571d32ef9c48e9f81c9e9cda9c575 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 21:52:11 +0000 Subject: [PATCH 12/15] Update newsfragments/2860.misc.rst Co-authored-by: Sviatoslav Sydorenko --- newsfragments/2860.misc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newsfragments/2860.misc.rst b/newsfragments/2860.misc.rst index 508e13b355..8c5110974a 100644 --- a/newsfragments/2860.misc.rst +++ b/newsfragments/2860.misc.rst @@ -1 +1 @@ -Moved the metadata into ``PEP 621``-compliant ``pyproject.toml``. +Moved the metadata into :pep:`PEP 621`-compliant :file:`pyproject.toml`. From 1a2d1aec13fa584eae384f8dd040c23388a7d4ec Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 21:52:18 +0000 Subject: [PATCH 13/15] Update pyproject.toml Co-authored-by: Sviatoslav Sydorenko --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4212b5f5ff..5aee42b68a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=64"] +requires = ["setuptools >= 64"] build-backend = "setuptools.build_meta" [project] From 062e2f468f9f67a35c06362d4d949f510fb4ffbd Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 4 Nov 2023 21:56:40 +0000 Subject: [PATCH 14/15] Update trio/_version.py Co-authored-by: Sviatoslav Sydorenko --- trio/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trio/_version.py b/trio/_version.py index 387bec2690..c5813474e3 100644 --- a/trio/_version.py +++ b/trio/_version.py @@ -1,3 +1,3 @@ -# This file is imported from __init__.py and ast parsed by setuptools +# This file is imported from __init__.py and parsed by setuptools __version__ = "0.23.1+dev" From 19e63f23f6589e38c2449ed3d294407431279189 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sat, 4 Nov 2023 22:57:21 +0100 Subject: [PATCH 15/15] Update newsfragments/2860.misc.rst --- newsfragments/2860.misc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newsfragments/2860.misc.rst b/newsfragments/2860.misc.rst index 8c5110974a..6e3dbd6ea4 100644 --- a/newsfragments/2860.misc.rst +++ b/newsfragments/2860.misc.rst @@ -1 +1 @@ -Moved the metadata into :pep:`PEP 621`-compliant :file:`pyproject.toml`. +Moved the metadata into :pep:`621`-compliant :file:`pyproject.toml`.