Merge pull request #4947 from pallets/pyproject
Before adoption: this commit came in with the history the project adopted, so no landing records it.
switch to pyproject.toml
authored by David Lord · committed by GitHub · parents 9da947a, 261e4a6 · Browse files · 32 files·+282 added−341 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
32 files+282 added−341 removed
- tests:+5 added−5 removed
- other:+277 added−336 removed
Provenance
- Commit
78b42b9- Tree
8cbd684- Author
David Lord <davidism@gmail.com>- Committer
GitHub <noreply@github.com>- Parent 1
9da947a- Parent 2
261e4a6
32 files changed+282 added−341 removed
modified:.github/workflows/tests.yaml+1 added-1 removed
50 unmodified lines51525354555556575850 unmodified lines - name: cache mypy uses: actions/cache@v3.2.2 with: path: ./.mypy_cache key: mypy|${{ matrix.python }}|${{ hashFiles('setup.cfg') }} key: mypy|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }} if: matrix.tox == 'typing' - run: pip install tox - run: tox run -e ${{ matrix.tox }}modified:docs/deploying/eventlet.rst+2 added-2 removed
32 unmodified lines33 34 .. code-block:: text35 36 $ cd hello-app37- $ python -m venv venv38- $ . venv/bin/activate37+ $ python -m venv .venv38+ $ . .venv/bin/activate39 $ pip install . # install your application40 $ pip install eventlet41 42 38 unmodified linesmodified:docs/deploying/gevent.rst+2 added-2 removed
31 unmodified lines32 33 .. code-block:: text34 35 $ cd hello-app36- $ python -m venv venv37- $ . venv/bin/activate36+ $ python -m venv .venv37+ $ . .venv/bin/activate38 $ pip install . # install your application39 $ pip install gevent40 41 39 unmodified linesmodified:docs/deploying/gunicorn.rst+2 added-2 removed
28 unmodified lines29 30 .. code-block:: text31 32 $ cd hello-app33- $ python -m venv venv34- $ . venv/bin/activate33+ $ python -m venv .venv34+ $ . .venv/bin/activate35 $ pip install . # install your application36 $ pip install gunicorn37 38 92 unmodified linesmodified:docs/deploying/mod_wsgi.rst+3 added-3 removed
31 unmodified lines32 33 .. code-block:: text34 35 $ cd hello-app36- $ python -m venv venv37- $ . venv/bin/activate36+ $ python -m venv .venv37+ $ . .venv/bin/activate38 $ pip install . # install your application39 $ pip install mod_wsgi40 41 46 unmodified lines88 mod_wsgi to drop to that user after starting.89 90 .. code-block:: text91 92- $ sudo /home/hello/venv/bin/mod_wsgi-express start-server \92+ $ sudo /home/hello/.venv/bin/mod_wsgi-express start-server \93 /home/hello/wsgi.py \94 --user hello --group hello --port 80 --processes 4modified:docs/deploying/uwsgi.rst+2 added-2 removed
27 unmodified lines28 29 .. code-block:: text30 31 $ cd hello-app32- $ python -m venv venv33- $ . venv/bin/activate32+ $ python -m venv .venv33+ $ . .venv/bin/activate34 $ pip install . # install your application35 $ pip install pyuwsgi36 37 If you have a compiler available, you can install the ``uwsgi`` package108 unmodified linesmodified:docs/deploying/waitress.rst+2 added-2 removed
25 unmodified lines26 27 .. code-block:: text28 29 $ cd hello-app30- $ python -m venv venv31- $ . venv/bin/activate30+ $ python -m venv .venv31+ $ . .venv/bin/activate32 $ pip install . # install your application33 $ pip install waitress34 35 40 unmodified linesmodified:docs/patterns/packages.rst+13 added-12 removed
40 unmodified lines41 42 But how do you run your application now? The naive ``python43 yourapplication/__init__.py`` will not work. Let's just say that Python44 does not want modules in packages to be the startup file. But that is not45-a big problem, just add a new file called :file:`setup.py` next to the inner46-:file:`yourapplication` folder with the following contents::45+a big problem, just add a new file called :file:`pyproject.toml` next to the inner46+:file:`yourapplication` folder with the following contents:47 48- from setuptools import setup48+.. code-block:: toml49 50- setup(51- name='yourapplication',52- packages=['yourapplication'],53- include_package_data=True,54- install_requires=[55- 'flask',56- ],57- )50+ [project]51+ name = "yourapplication"52+ dependencies = [53+ "flask",54+ ]55 56+ [build-system]57+ requires = ["setuptools"]58+ build-backend = "setuptools.build_meta"59+60 Install your application so it is importable:61 62 .. code-block:: text63 34 unmodified lines98 99 You should then end up with something like that::100 101 /yourapplication101- setup.py102+ pyproject.toml103 /yourapplication104 __init__.py105 views.py106 /static25 unmodified linesmodified:docs/tutorial/deploy.rst+6 added-15 removed
12 unmodified lines13 14 Build and Install15 -----------------16 17-When you want to deploy your application elsewhere, you build a18-distribution file. The current standard for Python distribution is the19-*wheel* format, with the ``.whl`` extension. Make sure the wheel library20-is installed first:17+When you want to deploy your application elsewhere, you build a *wheel*18+(``.whl``) file. Install and use the ``build`` tool to do this.19 20 .. code-block:: none21 24- $ pip install wheel22+ $ pip install build23+ $ python -m build --wheel24 26-Running ``setup.py`` with Python gives you a command line tool to issue27-build-related commands. The ``bdist_wheel`` command will build a wheel28-distribution file.29-30-.. code-block:: none31-32- $ python setup.py bdist_wheel33-25 You can find the file in ``dist/flaskr-1.0.0-py3-none-any.whl``. The26 file name is in the format of {project name}-{version}-{python tag}27 -{abi tag}-{platform tag}.28 15 unmodified lines44 $ flask --app flaskr init-db45 46 When Flask detects that it's installed (not in editable mode), it uses47 a different directory for the instance folder. You can find it at57-``venv/var/flaskr-instance`` instead.48+``.venv/var/flaskr-instance`` instead.49 50 51 Configure the Secret Key52 ------------------------14 unmodified lines67 Create the ``config.py`` file in the instance folder, which the factory68 will read from if it exists. Copy the generated value into it.69 70 .. code-block:: python80- :caption: ``venv/var/flaskr-instance/config.py``71+ :caption: ``.venv/var/flaskr-instance/config.py``72 73 SECRET_KEY = '192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf'74 75 You can also set any other necessary configuration here, although36 unmodified linesmodified:docs/tutorial/install.rst+24 added-32 removed
1 Make the Project Installable2 ============================3 4-Making your project installable means that you can build a5-*distribution* file and install that in another environment, just like6-you installed Flask in your project's environment. This makes deploying7-your project the same as installing any other library, so you're using8-all the standard Python tools to manage everything.4+Making your project installable means that you can build a *wheel* file and install that5+in another environment, just like you installed Flask in your project's environment.6+This makes deploying your project the same as installing any other library, so you're7+using all the standard Python tools to manage everything.8 9 Installing also comes with other benefits that might not be obvious from10 the tutorial or as a new Python user, including:11 14 unmodified lines26 27 Describe the Project28 --------------------29 31-The ``setup.py`` file describes your project and the files that belong32-to it.30+The ``pyproject.toml`` file describes your project and how to build it.31 34-.. code-block:: python35- :caption: ``setup.py``32+.. code-block:: toml33+ :caption: ``pyproject.toml``34 37- from setuptools import find_packages, setup35+ [project]36+ name = "flaskr"37+ version = "1.0.0"38+ dependencies = [39+ "flask",40+ ]41 39- setup(40- name='flaskr',41- version='1.0.0',42- packages=find_packages(),43- include_package_data=True,44- install_requires=[45- 'flask',46- ],47- )42+ [build-system]43+ requires = ["setuptools"]44+ build-backend = "setuptools.build_meta"45 46 50-``packages`` tells Python what package directories (and the Python files51-they contain) to include. ``find_packages()`` finds these directories52-automatically so you don't have to type them out. To include other53-files, such as the static and templates directories,54-``include_package_data`` is set. Python needs another file named55-``MANIFEST.in`` to tell what this other data is.47+The setuptools build backend needs another file named ``MANIFEST.in`` to tell it about48+non-Python files to include.49 50 .. code-block:: none51 :caption: ``MANIFEST.in``52 1 unmodified line54 graft flaskr/static55 graft flaskr/templates56 global-exclude *.pyc57 65-This tells Python to copy everything in the ``static`` and ``templates``66-directories, and the ``schema.sql`` file, but to exclude all bytecode67-files.58+This tells the build to copy everything in the ``static`` and ``templates`` directories,59+and the ``schema.sql`` file, but to exclude all bytecode files.60 61 See the official `Packaging tutorial <packaging tutorial_>`_ and62 `detailed guide <packaging guide_>`_ for more explanation of the files63 and options used.10 unmodified lines74 .. code-block:: none75 76 $ pip install -e .77 86-This tells pip to find ``setup.py`` in the current directory and install87-it in *editable* or *development* mode. Editable mode means that as you88-make changes to your local code, you'll only need to re-install if you89-change the metadata about the project, such as its dependencies.78+This tells pip to find ``pyproject.toml`` in the current directory and install the79+project in *editable* or *development* mode. Editable mode means that as you make80+changes to your local code, you'll only need to re-install if you change the metadata81+about the project, such as its dependencies.82 83 You can observe that the project is now installed with ``pip list``.84 85 .. code-block:: none22 unmodified linesmodified:docs/tutorial/layout.rst+4 added-4 removed
39 unmodified lines40 41 * ``flaskr/``, a Python package containing your application code and42 files.43 * ``tests/``, a directory containing test modules.44-* ``venv/``, a Python virtual environment where Flask and other44+* ``.venv/``, a Python virtual environment where Flask and other45 dependencies are installed.46 * Installation files telling Python how to install your project.47 * Version control config, such as `git`_. You should make a habit of48 using some type of version control for all your projects, no matter30 unmodified lines79 │ ├── test_factory.py80 │ ├── test_db.py81 │ ├── test_auth.py82 │ └── test_blog.py83- ├── venv/84- ├── setup.py83+ ├── .venv/84+ ├── pyproject.toml85 └── MANIFEST.in86 87 If you're using version control, the following files that are generated88 while running your project should be ignored. There may be other files2 unmodified lines91 92 .. code-block:: none93 :caption: ``.gitignore``94 95- venv/95+ .venv/96 97 *.pyc98 __pycache__/99 11 unmodified linesmodified:docs/tutorial/tests.rst+10 added-12 removed
488 unmodified lines489 490 Running the Tests491 -----------------492 493-Some extra configuration, which is not required but makes running494-tests with coverage less verbose, can be added to the project's495-``setup.cfg`` file.493+Some extra configuration, which is not required but makes running tests with coverage494+less verbose, can be added to the project's ``pyproject.toml`` file.495 497-.. code-block:: none498- :caption: ``setup.cfg``496+.. code-block:: toml497+ :caption: ``pyproject.toml``498 500- [tool:pytest]501- testpaths = tests499+ [tool.pytest.ini_options]500+ testpaths = ["tests"]501 503- [coverage:run]504- branch = True505- source =506- flaskr502+ [tool.coverage.run]503+ branch = true504+ source = ["flaskr"]505 506 To run the tests, use the ``pytest`` command. It will find and run all507 the test functions you've written.508 2 unmodified lines511 $ pytest512 513 ========================= test session starts ==========================514 platform linux -- Python 3.6.4, pytest-3.5.0, py-1.5.3, pluggy-0.6.0517- rootdir: /home/user/Projects/flask-tutorial, inifile: setup.cfg515+ rootdir: /home/user/Projects/flask-tutorial516 collected 23 items517 518 tests/test_auth.py ........ [ 34%]519 tests/test_blog.py ............ [ 86%]40 unmodified linesmodified:docs/cli.rst+13 added-28 removed
278 unmodified lines279 .. tabs::280 281 .. group-tab:: Bash282 283- Unix Bash, :file:`venv/bin/activate`::283+ Unix Bash, :file:`.venv/bin/activate`::284 285 $ export FLASK_APP=hello286 287 .. group-tab:: Fish288 289- Fish, :file:`venv/bin/activate.fish`::289+ Fish, :file:`.venv/bin/activate.fish`::290 291 $ set -x FLASK_APP hello292 293 .. group-tab:: CMD294 295- Windows CMD, :file:`venv\\Scripts\\activate.bat`::295+ Windows CMD, :file:`.venv\\Scripts\\activate.bat`::296 297 > set FLASK_APP=hello298 299 .. group-tab:: Powershell300 301- Windows Powershell, :file:`venv\\Scripts\\activate.ps1`::301+ Windows Powershell, :file:`.venv\\Scripts\\activate.ps1`::302 303 > $env:FLASK_APP = "hello"304 305 It is preferred to use dotenv support over this, since :file:`.flaskenv` can be131 unmodified lines437 -------438 439 Flask will automatically load commands specified in the ``flask.commands``440 `entry point`_. This is useful for extensions that want to add commands when441-they are installed. Entry points are specified in :file:`setup.py` ::441+they are installed. Entry points are specified in :file:`pyproject.toml`:442 443- from setuptools import setup443+.. code-block:: toml444 445- setup(446- name='flask-my-extension',447- ...,448- entry_points={449- 'flask.commands': [450- 'my-command=flask_my_extension.commands:cli'451- ],452- },453- )445+ [project.entry-points."flask.commands"]446+ my-command = "my_extension.commands:cli"447 455-448 .. _entry point: https://packaging.python.org/tutorials/packaging-projects/#entry-points449 458-Inside :file:`flask_my_extension/commands.py` you can then export a Click450+Inside :file:`my_extension/commands.py` you can then export a Click451 object::452 453 import click454 29 unmodified lines484 @click.group(cls=FlaskGroup, create_app=create_app)485 def cli():486 """Management script for the Wiki application."""487 496-Define the entry point in :file:`setup.py`::488+Define the entry point in :file:`pyproject.toml`:489 498- from setuptools import setup490+.. code-block:: toml491 500- setup(501- name='flask-my-extension',502- ...,503- entry_points={504- 'console_scripts': [505- 'wiki=wiki:cli'506- ],507- },508- )492+ [project.scripts]493+ wiki = "wiki:cli"494 495 Install the application in the virtualenv in editable mode and the custom496 script is available. Note that you don't need to set ``--app``. ::497 51 unmodified linesmodified:docs/installation.rst+5 added-5 removed
83 unmodified lines84 85 Create an environment86 ~~~~~~~~~~~~~~~~~~~~~87 88-Create a project folder and a :file:`venv` folder within:88+Create a project folder and a :file:`.venv` folder within:89 90 .. tabs::91 92 .. group-tab:: macOS/Linux1 unmodified line94 .. code-block:: text95 96 $ mkdir myproject97 $ cd myproject98- $ python3 -m venv venv98+ $ python3 -m venv .venv99 100 .. group-tab:: Windows101 102 .. code-block:: text103 104 > mkdir myproject105 > cd myproject106- > py -3 -m venv venv106+ > py -3 -m venv .venv107 108 109 .. _install-activate-env:110 7 unmodified lines118 .. group-tab:: macOS/Linux119 120 .. code-block:: text121 122- $ . venv/bin/activate122+ $ . .venv/bin/activate123 124 .. group-tab:: Windows125 126 .. code-block:: text127 128- > venv\Scripts\activate128+ > .venv\Scripts\activate129 130 Your shell prompt will change to show the name of the activated131 environment.132 13 unmodified linesmodified:examples/javascript/.gitignore+1 added-1 removed
1-venv/1+.venv/2 *.pyc3 __pycache__/4 instance/5 .cache/9 unmodified linesadded:examples/javascript/pyproject.toml+26 added
1+[project]2+name = "js_example"3+version = "1.1.0"4+description = "Demonstrates making AJAX requests to Flask."5+readme = "README.rst"6+license = {text = "BSD-3-Clause"}7+maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]8+dependencies = ["flask"]9+10+[project.urls]11+Documentation = "https://flask.palletsprojects.com/patterns/jquery/"12+13+[project.optional-dependencies]14+test = ["pytest", "blinker"]15+16+[build-system]17+requires = ["setuptools"]18+build-backend = "setuptools.build_meta"19+20+[tool.pytest.ini_options]21+testpaths = ["tests"]22+filterwarnings = ["error"]23+24+[tool.coverage.run]25+branch = true26+source = ["js_example", "tests"]modified:examples/javascript/README.rst+2 added-2 removed
21 unmodified lines22 -------23 24 .. code-block:: text25 26- $ python3 -m venv venv27- $ . venv/bin/activate26+ $ python3 -m venv .venv27+ $ . .venv/bin/activate28 $ pip install -e .29 30 31 Run17 unmodified linesdeleted:examples/javascript/setup.cfg-29 removed
1-[metadata]2-name = js_example3-version = 1.1.04-url = https://flask.palletsprojects.com/patterns/jquery/5-license = BSD-3-Clause6-maintainer = Pallets7-maintainer_email = contact@palletsprojects.com8-description = Demonstrates making AJAX requests to Flask.9-long_description = file: README.rst10-long_description_content_type = text/x-rst11-12-[options]13-packages = find:14-include_package_data = true15-install_requires =16- Flask17-18-[options.extras_require]19-test =20- pytest21- blinker22-23-[tool:pytest]24-testpaths = tests25-26-[coverage:run]27-branch = True28-source =29- js_exampledeleted:examples/javascript/setup.py-3 removed
1-from setuptools import setup2-3-setup()modified:examples/tutorial/.gitignore+1 added-1 removed
1-venv/1+.venv/2 *.pyc3 __pycache__/4 instance/5 .cache/9 unmodified linesadded:examples/tutorial/pyproject.toml+28 added
1+[project]2+name = "flaskr"3+version = "1.0.0"4+description = "The basic blog app built in the Flask tutorial."5+readme = "README.rst"6+license = {text = "BSD-3-Clause"}7+maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]8+dependencies = [9+ "flask",10+]11+12+[project.urls]13+Documentation = "https://flask.palletsprojects.com/tutorial/"14+15+[project.optional-dependencies]16+test = ["pytest"]17+18+[build-system]19+requires = ["setuptools"]20+build-backend = "setuptools.build_meta"21+22+[tool.pytest.ini_options]23+testpaths = ["tests"]24+filterwarnings = ["error"]25+26+[tool.coverage.run]27+branch = true28+source = ["flaskr", "tests"]modified:examples/tutorial/README.rst+4 added-4 removed
21 unmodified lines22 $ cd examples/tutorial23 24 Create a virtualenv and activate it::25 26- $ python3 -m venv venv27- $ . venv/bin/activate26+ $ python3 -m venv .venv27+ $ . .venv/bin/activate28 29 Or on Windows cmd::30 31- $ py -3 -m venv venv32- $ venv\Scripts\activate.bat31+ $ py -3 -m venv .venv32+ $ .venv\Scripts\activate.bat33 34 Install Flaskr::35 36 $ pip install -e .32 unmodified linesdeleted:examples/tutorial/setup.cfg-28 removed
1-[metadata]2-name = flaskr3-version = 1.0.04-url = https://flask.palletsprojects.com/tutorial/5-license = BSD-3-Clause6-maintainer = Pallets7-maintainer_email = contact@palletsprojects.com8-description = The basic blog app built in the Flask tutorial.9-long_description = file: README.rst10-long_description_content_type = text/x-rst11-12-[options]13-packages = find:14-include_package_data = true15-install_requires =16- Flask17-18-[options.extras_require]19-test =20- pytest21-22-[tool:pytest]23-testpaths = tests24-25-[coverage:run]26-branch = True27-source =28- flaskrdeleted:examples/tutorial/setup.py-3 removed
1-from setuptools import setup2-3-setup()modified:tests/test_appctx.py+3 added-3 removed
118 unmodified lines119 cleanup_stuff.append(exception)120 121 @app.route("/")122 def index():123- raise Exception("dummy")123+ raise ValueError("dummy")124 125- with pytest.raises(Exception, match="dummy"):125+ with pytest.raises(ValueError, match="dummy"):126 with app.app_context():127 client.get("/")128 129 assert len(cleanup_stuff) == 1130- assert isinstance(cleanup_stuff[0], Exception)130+ assert isinstance(cleanup_stuff[0], ValueError)131 assert str(cleanup_stuff[0]) == "dummy"132 133 134 def test_app_ctx_globals_methods(app, app_ctx):78 unmodified linesmodified:tests/test_basic.py+2 added-2 removed
1470 unmodified lines1471 with app.test_request_context():1472 rv = flask.url_for("static", filename="index.html", _external=True)1473 assert rv == "http://example.com/static/index.html"1474 # Providing static_host without host_matching=True should error.1475- with pytest.raises(Exception):1475+ with pytest.raises(AssertionError):1476 flask.Flask(__name__, static_host="example.com")1477 # Providing host_matching=True with static_folder1478 # but without static_host should error.1479- with pytest.raises(Exception):1479+ with pytest.raises(AssertionError):1480 flask.Flask(__name__, host_matching=True)1481 # Providing host_matching=True without static_host1482 # but with static_folder=None should not error.1483 flask.Flask(__name__, host_matching=True, static_folder=None)475 unmodified linesadded:.flake8+27 added
1+[flake8]2+extend-select =3+ # bugbear4+ B5+ # bugbear opinions6+ B97+ # implicit str concat8+ ISC9+extend-ignore =10+ # slice notation whitespace, invalid11+ E20312+ # import at top, too many circular import fixes13+ E40214+ # line length, handled by bugbear B95015+ E50116+ # bare except, handled by bugbear B00117+ E72218+ # zip with strict=, requires python >= 3.1019+ B90520+ # string formatting opinion, B028 renamed to B90721+ B02822+ B90723+# up to 88 allowed by bugbear B95024+max-line-length = 8025+per-file-ignores =26+ # __init__ exports names27+ src/flask/__init__.py: F401modified:CHANGES.rst+2 added
1 unmodified line2 -------------3 4 Unreleased5 6+- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.7+ :pr:`4947`8 - Ensure subdomains are applied with nested blueprints. :issue:`4834`9 10 11 Version 2.2.31418 unmodified linesmodified:CONTRIBUTING.rst+3 added-3 removed
100 unmodified lines101 - Linux/macOS102 103 .. code-block:: text104 105- $ python3 -m venv env106- $ . env/bin/activate105+ $ python3 -m venv .venv106+ $ . .venv/bin/activate107 108 - Windows109 110 .. code-block:: text111 112- > py -3 -m venv env112+ > py -3 -m venv .venv113 > env\Scripts\activate114 115 - Upgrade pip and setuptools.116 111 unmodified linesadded:pyproject.toml+94 added
1+[project]2+name = "Flask"3+description = "A simple framework for building complex web applications."4+readme = "README.rst"5+license = {text = "BSD-3-Clause"}6+maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]7+authors = [{name = "Armin Ronacher", email = "armin.ronacher@active-4.com"}]8+classifiers = [9+ "Development Status :: 5 - Production/Stable",10+ "Environment :: Web Environment",11+ "Framework :: Flask",12+ "Intended Audience :: Developers",13+ "License :: OSI Approved :: BSD License",14+ "Operating System :: OS Independent",15+ "Programming Language :: Python",16+ "Topic :: Internet :: WWW/HTTP :: Dynamic Content",17+ "Topic :: Internet :: WWW/HTTP :: WSGI",18+ "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",19+ "Topic :: Software Development :: Libraries :: Application Frameworks",20+]21+requires-python = ">=3.7"22+dependencies = [23+ "Werkzeug>=2.2.2",24+ "Jinja2>=3.0",25+ "itsdangerous>=2.0",26+ "click>=8.0",27+ "importlib-metadata>=3.6.0; python_version < '3.10'",28+]29+dynamic = ["version"]30+31+[project.urls]32+Donate = "https://palletsprojects.com/donate"33+Documentation = "https://flask.palletsprojects.com/"34+Changes = "https://flask.palletsprojects.com/changes/"35+"Source Code" = "https://github.com/pallets/flask/"36+"Issue Tracker" = "https://github.com/pallets/flask/issues/"37+Twitter = "https://twitter.com/PalletsTeam"38+Chat = "https://discord.gg/pallets"39+40+[project.optional-dependencies]41+async = ["asgiref>=3.2"]42+dotenv = ["python-dotenv"]43+44+[project.scripts]45+flask = "flask.cli:main"46+47+[build-system]48+requires = ["setuptools"]49+build-backend = "setuptools.build_meta"50+51+[tool.setuptools.dynamic]52+version = {attr = "flask.__version__"}53+54+[tool.pytest.ini_options]55+testpaths = ["tests"]56+filterwarnings = ["error"]57+58+[tool.coverage.run]59+branch = true60+source = ["flask", "tests"]61+62+[tool.coverage.paths]63+source = ["src", "*/site-packages"]64+65+[tool.mypy]66+python_version = "3.7"67+files = ["src/flask"]68+show_error_codes = true69+pretty = true70+#strict = true71+allow_redefinition = true72+disallow_subclassing_any = true73+#disallow_untyped_calls = true74+#disallow_untyped_defs = true75+#disallow_incomplete_defs = true76+no_implicit_optional = true77+local_partial_types = true78+#no_implicit_reexport = true79+strict_equality = true80+warn_redundant_casts = true81+warn_unused_configs = true82+warn_unused_ignores = true83+#warn_return_any = true84+#warn_unreachable = true85+86+[[tool.mypy.overrides]]87+module = [88+ "asgiref.*",89+ "blinker.*",90+ "dotenv.*",91+ "cryptography.*",92+ "importlib_metadata",93+]94+ignore_missing_imports = truedeleted:setup.cfg-123 removed
1-[metadata]2-name = Flask3-version = attr: flask.__version__4-url = https://palletsprojects.com/p/flask5-project_urls =6- Donate = https://palletsprojects.com/donate7- Documentation = https://flask.palletsprojects.com/8- Changes = https://flask.palletsprojects.com/changes/9- Source Code = https://github.com/pallets/flask/10- Issue Tracker = https://github.com/pallets/flask/issues/11- Twitter = https://twitter.com/PalletsTeam12- Chat = https://discord.gg/pallets13-license = BSD-3-Clause14-author = Armin Ronacher15-author_email = armin.ronacher@active-4.com16-maintainer = Pallets17-maintainer_email = contact@palletsprojects.com18-description = A simple framework for building complex web applications.19-long_description = file: README.rst20-long_description_content_type = text/x-rst21-classifiers =22- Development Status :: 5 - Production/Stable23- Environment :: Web Environment24- Framework :: Flask25- Intended Audience :: Developers26- License :: OSI Approved :: BSD License27- Operating System :: OS Independent28- Programming Language :: Python29- Topic :: Internet :: WWW/HTTP :: Dynamic Content30- Topic :: Internet :: WWW/HTTP :: WSGI31- Topic :: Internet :: WWW/HTTP :: WSGI :: Application32- Topic :: Software Development :: Libraries :: Application Frameworks33-34-[options]35-packages = find:36-package_dir = = src37-include_package_data = True38-python_requires = >= 3.739-# Dependencies are in setup.py for GitHub's dependency graph.40-41-[options.packages.find]42-where = src43-44-[options.entry_points]45-console_scripts =46- flask = flask.cli:main47-48-[tool:pytest]49-testpaths = tests50-filterwarnings =51- error52-53-[coverage:run]54-branch = True55-source =56- flask57- tests58-59-[coverage:paths]60-source =61- src62- */site-packages63-64-[flake8]65-# B = bugbear66-# E = pycodestyle errors67-# F = flake8 pyflakes68-# W = pycodestyle warnings69-# B9 = bugbear opinions70-# ISC = implicit str concat71-select = B, E, F, W, B9, ISC72-ignore =73- # slice notation whitespace, invalid74- E20375- # import at top, too many circular import fixes76- E40277- # line length, handled by bugbear B95078- E50179- # bare except, handled by bugbear B00180- E72281- # bin op line break, invalid82- W50383- # requires Python 3.1084- B90585-# up to 88 allowed by bugbear B95086-max-line-length = 8087-per-file-ignores =88- # __init__ exports names89- src/flask/__init__.py: F40190-91-[mypy]92-files = src/flask, tests/typing93-python_version = 3.794-show_error_codes = True95-allow_redefinition = True96-disallow_subclassing_any = True97-# disallow_untyped_calls = True98-# disallow_untyped_defs = True99-# disallow_incomplete_defs = True100-no_implicit_optional = True101-local_partial_types = True102-# no_implicit_reexport = True103-strict_equality = True104-warn_redundant_casts = True105-warn_unused_configs = True106-warn_unused_ignores = True107-# warn_return_any = True108-# warn_unreachable = True109-110-[mypy-asgiref.*]111-ignore_missing_imports = True112-113-[mypy-blinker.*]114-ignore_missing_imports = True115-116-[mypy-dotenv.*]117-ignore_missing_imports = True118-119-[mypy-cryptography.*]120-ignore_missing_imports = True121-122-[mypy-importlib_metadata]123-ignore_missing_imports = Truedeleted:setup.py-17 removed
1-from setuptools import setup2-3-# Metadata goes in setup.cfg. These are here for GitHub's dependency graph.4-setup(5- name="Flask",6- install_requires=[7- "Werkzeug >= 2.2.2",8- "Jinja2 >= 3.0",9- "itsdangerous >= 2.0",10- "click >= 8.0",11- "importlib-metadata >= 3.6.0; python_version < '3.10'",12- ],13- extras_require={14- "async": ["asgiref >= 3.2"],15- "dotenv": ["python-dotenv"],16- },17-)