diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 37f0d86cd..a3927814d 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -15,11 +15,11 @@ jobs: strategy: matrix: py: - - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" + - "3.13" - "pypy-3.8" os: - "ubuntu-20.04" @@ -76,7 +76,7 @@ jobs: - name: Setup python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 architecture: x64 - run: pip install tox - run: tox -e docs @@ -88,7 +88,8 @@ jobs: - name: Setup python uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.9 architecture: x64 - run: pip install tox - run: tox -e lint + diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 218fdb215..61e098e3e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,8 +10,7 @@ formats: - pdf - epub python: + install: - method: pip - path: . - extra_requirements: - - docs + path: .[doc] diff --git a/pyproject.toml b/pyproject.toml index 7d25b6231..58543e508 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,6 +2,101 @@ requires = ["setuptools", "wheel"] build-backend = "setuptools.build_meta" +[tool.setuptools.packages.find] +where = ["src"] + +[project] +name = "pyramid" +version = "2.1.dev0" +description = "The Pyramid Web Framework, a Pylons project" + +authors = [ + {name = "Chris McDonough, Agendaless Consulting", email = "pylons-discuss@googlegroups.com"}, +] + +# license = "BSD-derived (Repoze)" +license-files = ["LICENSE.txt"] + +readme = {file = "README.rst", content-type = "text/x-rst"} + +requires-python = ">=3.9" +dependencies = [ + "hupper", + "plaster", + "plaster_pastedeploy", + "setuptools", + "translationstring", + "venusian", + "webob >= 1.8.3", # Accept.parse_offer + "zope.deprecation", + "zope.interface", +] + +keywords = ["web", "wsgi", "pylons", "pyramid"] +classifiers = [ + "Development Status :: 6 - Mature", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Framework :: Pyramid", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: WSGI", + "License :: Repoze Public License", +] + +[tool.setuptools.package-data] +mypkg = ["*.txt", "*.rst"] + +[project.scripts] +pserve = "pyramid.scripts.pserve:main" +pshell = "pyramid.scripts.pshell:main" +proutes = "pyramid.scripts.proutes:main" +pviews = "pyramid.scripts.pviews:main" +ptweens = "pyramid.scripts.ptweens:main" +prequest = "pyramid.scripts.prequest:main" +pdistreport = "pyramid.scripts.pdistreport:main" + +[project.entry-points."paste.server_runner"] +wsgiref = "pyramid.scripts.pserve:wsgiref_server_runner" +cherrypy = "pyramid.scripts.pserve:cherrypy_server_runner" + +[project.entry-points."pyramid.pshell_runner"] +python = "pyramid.scripts.pshell:python_shell_runner" + + +[project.urls] +Homepage = "https://trypyramid.com" +Documentation = "https://docs.pylonsproject.org/projects/pyramid/en/latest/" +Repository = "https://github.com/Pylons/pyramid" +Issues = "https://github.com/Pylons/pyramid/issues" +# add to readme somehow? +Changelog = "https://github.com/Pylons/pyramid/blob/main/CHANGES.rst" + +[project.optional-dependencies] +doc = [ + "sphinx >= 8", + "docutils", + "pylons-sphinx-themes >= 1.0.8", # Ethical Ads + "pylons_sphinx_latesturl", + "repoze.sphinx.autointerface", + "sphinx-copybutton", + "sphinxcontrib-autoprogram", +] +test = [ + "webtest", + "zope.component", + "coverage", + "pytest", + "pytest-cov", +] + + [tool.black] line-length = 79 skip-string-normalization = true @@ -35,3 +130,23 @@ no_lines_before = "THIRDPARTY" sections = "FUTURE,THIRDPARTY,FIRSTPARTY,LOCALFOLDER" default_section = "THIRDPARTY" known_first_party = "pyramid" + +[tool.pytest.ini_options] +minversion = "6.0" +addopts = "-W always" +testpaths = [ + "tests", +] + + +[tool.check-manifest] +ignore = [".gitignore", + ".gitattributes", + "PKG-INFO", + "*.egg-info", + "*.egg-info/*", + ] +ignore-default-rules = true +ignore-bad-ideas = "tests/pkgs/localeapp/**/*.mo" + + diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 55fa7e8b3..000000000 --- a/setup.cfg +++ /dev/null @@ -1,19 +0,0 @@ -[metadata] -license_file = LICENSE.txt - -[check-manifest] -ignore = - .gitignore - .gitattributes - PKG-INFO - *.egg-info - *.egg-info/* -ignore-default-rules = true -ignore-bad-ideas = - tests/pkgs/localeapp/**/*.mo - -[tool:pytest] -python_files = test_*.py -testpaths = - tests -addopts = -W always diff --git a/setup.py b/setup.py deleted file mode 100644 index 08e44d2fa..000000000 --- a/setup.py +++ /dev/null @@ -1,126 +0,0 @@ -############################################################################## -# -# Copyright (c) 2008-2013 Agendaless Consulting and Contributors. -# All Rights Reserved. -# -# This software is subject to the provisions of the BSD-like license at -# http://www.repoze.org/LICENSE.txt. A copy of the license should accompany -# this distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL -# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, -# THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND -# FITNESS FOR A PARTICULAR PURPOSE -# -############################################################################## -from setuptools import find_packages, setup - - -def readfile(name): - with open(name) as f: - return f.read() - - -README = readfile('README.rst') -CHANGES = readfile('CHANGES.rst') - -VERSION = '2.1.dev0' - -install_requires = [ - 'hupper >= 1.5', # ignore_files support - 'plaster', - 'plaster_pastedeploy', - 'setuptools', - 'translationstring >= 0.4', # py3 compat - 'venusian >= 1.0', # ``ignore`` - 'webob >= 1.8.3', # Accept.parse_offer - 'zope.deprecation >= 3.5.0', # py3 compat - 'zope.interface >= 3.8.0', # has zope.interface.registry -] - -tests_require = [ - 'webtest >= 1.3.1', # py3 compat - 'zope.component >= 4.0', # py3 compat -] - -docs_extras = [ - 'Sphinx >= 3.0.0', # Force RTD to use >= 3.0.0 - 'docutils', - 'pylons-sphinx-themes >= 1.0.8', # Ethical Ads - 'pylons_sphinx_latesturl', - 'repoze.sphinx.autointerface', - 'sphinx-copybutton', - 'sphinxcontrib-autoprogram', -] - -testing_extras = tests_require + [ - 'coverage', - 'pytest>=5.4.2', # unittest.TestCase funkyness, see commit 77c1505ab - 'pytest-cov', -] - -branch_version = ".".join(VERSION.split(".")[:2]) - -# black is refusing to make anything under 80 chars so just splitting it up -docs_fmt = 'https://docs.pylonsproject.org/projects/pyramid/en/{}-branch/' -docs_url = docs_fmt.format(branch_version) - -setup( - name='pyramid', - version=VERSION, - description='The Pyramid Web Framework, a Pylons project', - long_description=README + '\n\n' + CHANGES, - long_description_content_type='text/x-rst', - classifiers=[ - "Development Status :: 6 - Mature", - "Intended Audience :: Developers", - "Programming Language :: Python", - "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 :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Framework :: Pyramid", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: WSGI", - "License :: Repoze Public License", - ], - keywords=['web', 'wsgi', 'pylons', 'pyramid'], - author="Chris McDonough, Agendaless Consulting", - author_email="pylons-discuss@googlegroups.com", - url="https://trypyramid.com", - project_urls={ - 'Documentation': docs_url, - 'Changelog': '{}whatsnew-{}.html'.format(docs_url, branch_version), - 'Issue Tracker': 'https://github.com/Pylons/pyramid/issues', - }, - license="BSD-derived (Repoze)", - packages=find_packages('src', exclude=['tests']), - package_dir={'': 'src'}, - include_package_data=True, - zip_safe=False, - python_requires='>=3.8', - install_requires=install_requires, - extras_require={'testing': testing_extras, 'docs': docs_extras}, - tests_require=tests_require, - test_suite="tests", - entry_points={ - 'paste.server_runner': [ - 'wsgiref = pyramid.scripts.pserve:wsgiref_server_runner', - 'cherrypy = pyramid.scripts.pserve:cherrypy_server_runner', - ], - 'pyramid.pshell_runner': [ - 'python = pyramid.scripts.pshell:python_shell_runner' - ], - 'console_scripts': [ - 'pserve = pyramid.scripts.pserve:main', - 'pshell = pyramid.scripts.pshell:main', - 'proutes = pyramid.scripts.proutes:main', - 'pviews = pyramid.scripts.pviews:main', - 'ptweens = pyramid.scripts.ptweens:main', - 'prequest = pyramid.scripts.prequest:main', - 'pdistreport = pyramid.scripts.pdistreport:main', - ], - }, -) diff --git a/tox.ini b/tox.ini index ff962a935..de9c37df3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,13 +1,19 @@ [tox] envlist = lint, - py38,py39,py310,py311,py312,pypy3, + py39,py310,py311,py312,py313,pypy3, py312-cover,coverage, docs isolated_build = true [testenv] +deps = + pytest + pytest-cov + webtest + zope.component + coverage commands = python --version pytest {posargs:} @@ -16,7 +22,7 @@ extras = setenv = COVERAGE_FILE=.coverage.{envname} -[testenv:py312-cover] +[testenv:py313-cover] commands = python --version pytest --cov {posargs:}