Skip to content
Myr

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

32 files+282 added−341 removed

modified:.github/workflows/tests.yaml+1 added-1 removed
modified:docs/deploying/eventlet.rst+2 added-2 removed
32 unmodified lines
3334.. code-block:: text3536 $ cd hello-app37 $ python -m venv venv38 $ . venv/bin/activate37 $ python -m venv .venv38 $ . .venv/bin/activate39 $ pip install . # install your application40 $ pip install eventlet4142
38 unmodified lines
modified:docs/deploying/gevent.rst+2 added-2 removed
31 unmodified lines
3233.. code-block:: text3435 $ cd hello-app36 $ python -m venv venv37 $ . venv/bin/activate36 $ python -m venv .venv37 $ . .venv/bin/activate38 $ pip install . # install your application39 $ pip install gevent4041
39 unmodified lines
modified:docs/deploying/gunicorn.rst+2 added-2 removed
28 unmodified lines
2930.. code-block:: text3132 $ cd hello-app33 $ python -m venv venv34 $ . venv/bin/activate33 $ python -m venv .venv34 $ . .venv/bin/activate35 $ pip install . # install your application36 $ pip install gunicorn3738
92 unmodified lines
modified:docs/deploying/mod_wsgi.rst+3 added-3 removed
31 unmodified lines
3233.. code-block:: text3435 $ 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_wsgi4041
46 unmodified lines
88mod_wsgi to drop to that user after starting.8990.. code-block:: text9192 $ 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 4
modified:docs/deploying/uwsgi.rst+2 added-2 removed
27 unmodified lines
2829.. code-block:: text3031 $ cd hello-app32 $ python -m venv venv33 $ . venv/bin/activate32 $ python -m venv .venv33 $ . .venv/bin/activate34 $ pip install . # install your application35 $ pip install pyuwsgi3637If you have a compiler available, you can install the ``uwsgi`` package
108 unmodified lines
modified:docs/deploying/waitress.rst+2 added-2 removed
25 unmodified lines
2627.. code-block:: text2829 $ cd hello-app30 $ python -m venv venv31 $ . venv/bin/activate30 $ python -m venv .venv31 $ . .venv/bin/activate32 $ pip install . # install your application33 $ pip install waitress3435
40 unmodified lines
modified:docs/patterns/packages.rst+13 added-12 removed
40 unmodified lines
4142But how do you run your application now? The naive ``python43yourapplication/__init__.py`` will not work. Let's just say that Python44does not want modules in packages to be the startup file. But that is not45a big problem, just add a new file called :file:`setup.py` next to the inner46:file:`yourapplication` folder with the following contents::45a big problem, just add a new file called :file:`pyproject.toml` next to the inner46:file:`yourapplication` folder with the following contents:4748 from setuptools import setup48.. code-block:: toml4950 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 ]5556 [build-system]57 requires = ["setuptools"]58 build-backend = "setuptools.build_meta"5960Install your application so it is importable:6162.. code-block:: text63
34 unmodified lines
9899You should then end up with something like that::100101 /yourapplication101 setup.py102 pyproject.toml103 /yourapplication104 __init__.py105 views.py106 /static
25 unmodified lines
modified:docs/tutorial/deploy.rst+6 added-15 removed
12 unmodified lines
1314Build and Install15-----------------1617When you want to deploy your application elsewhere, you build a18distribution file. The current standard for Python distribution is the19*wheel* format, with the ``.whl`` extension. Make sure the wheel library20is installed first:17When you want to deploy your application elsewhere, you build a *wheel*18(``.whl``) file. Install and use the ``build`` tool to do this.1920.. code-block:: none2124 $ pip install wheel22 $ pip install build23 $ python -m build --wheel2426Running ``setup.py`` with Python gives you a command line tool to issue27build-related commands. The ``bdist_wheel`` command will build a wheel28distribution file.2930.. code-block:: none3132 $ python setup.py bdist_wheel3325You can find the file in ``dist/flaskr-1.0.0-py3-none-any.whl``. The26file name is in the format of {project name}-{version}-{python tag}27-{abi tag}-{platform tag}.28
15 unmodified lines
44 $ flask --app flaskr init-db4546When Flask detects that it's installed (not in editable mode), it uses47a different directory for the instance folder. You can find it at57``venv/var/flaskr-instance`` instead.48``.venv/var/flaskr-instance`` instead.495051Configure the Secret Key52------------------------
14 unmodified lines
67Create the ``config.py`` file in the instance folder, which the factory68will read from if it exists. Copy the generated value into it.6970.. code-block:: python80 :caption: ``venv/var/flaskr-instance/config.py``71 :caption: ``.venv/var/flaskr-instance/config.py``7273 SECRET_KEY = '192b9bdd22ab9ed4d12e236c78afcb9a393ec15f71bbf5dc987d54727823bcbf'7475You can also set any other necessary configuration here, although
36 unmodified lines
modified:docs/tutorial/install.rst+24 added-32 removed
1Make the Project Installable2============================34Making your project installable means that you can build a5*distribution* file and install that in another environment, just like6you installed Flask in your project's environment. This makes deploying7your project the same as installing any other library, so you're using8all the standard Python tools to manage everything.4Making your project installable means that you can build a *wheel* file and install that5in another environment, just like you installed Flask in your project's environment.6This makes deploying your project the same as installing any other library, so you're7using all the standard Python tools to manage everything.89Installing also comes with other benefits that might not be obvious from10the tutorial or as a new Python user, including:11
14 unmodified lines
2627Describe the Project28--------------------2931The ``setup.py`` file describes your project and the files that belong32to it.30The ``pyproject.toml`` file describes your project and how to build it.3134.. code-block:: python35 :caption: ``setup.py``32.. code-block:: toml33 :caption: ``pyproject.toml``3437 from setuptools import find_packages, setup35 [project]36 name = "flaskr"37 version = "1.0.0"38 dependencies = [39 "flask",40 ]4139 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"454650``packages`` tells Python what package directories (and the Python files51they contain) to include. ``find_packages()`` finds these directories52automatically so you don't have to type them out. To include other53files, 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.47The setuptools build backend needs another file named ``MANIFEST.in`` to tell it about48non-Python files to include.4950.. code-block:: none51 :caption: ``MANIFEST.in``52
1 unmodified line
54 graft flaskr/static55 graft flaskr/templates56 global-exclude *.pyc5765This tells Python to copy everything in the ``static`` and ``templates``66directories, and the ``schema.sql`` file, but to exclude all bytecode67files.58This tells the build to copy everything in the ``static`` and ``templates`` directories,59and the ``schema.sql`` file, but to exclude all bytecode files.6061See the official `Packaging tutorial <packaging tutorial_>`_ and62`detailed guide <packaging guide_>`_ for more explanation of the files63and options used.
10 unmodified lines
74.. code-block:: none7576 $ pip install -e .7786This tells pip to find ``setup.py`` in the current directory and install87it in *editable* or *development* mode. Editable mode means that as you88make changes to your local code, you'll only need to re-install if you89change the metadata about the project, such as its dependencies.78This tells pip to find ``pyproject.toml`` in the current directory and install the79project in *editable* or *development* mode. Editable mode means that as you make80changes to your local code, you'll only need to re-install if you change the metadata81about the project, such as its dependencies.8283You can observe that the project is now installed with ``pip list``.8485.. code-block:: none
22 unmodified lines
modified:docs/tutorial/layout.rst+4 added-4 removed
39 unmodified lines
4041* ``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 matter
30 unmodified lines
79 │ ├── test_factory.py80 │ ├── test_db.py81 │ ├── test_auth.py82 │ └── test_blog.py83 ├── venv/84 ├── setup.py83 ├── .venv/84 ├── pyproject.toml85 └── MANIFEST.in8687If you're using version control, the following files that are generated88while running your project should be ignored. There may be other files
2 unmodified lines
9192.. code-block:: none93 :caption: ``.gitignore``9495 venv/95 .venv/9697 *.pyc98 __pycache__/99
11 unmodified lines
modified:docs/tutorial/tests.rst+10 added-12 removed
488 unmodified lines
489490Running the Tests491-----------------492493Some extra configuration, which is not required but makes running494tests with coverage less verbose, can be added to the project's495``setup.cfg`` file.493Some extra configuration, which is not required but makes running tests with coverage494less verbose, can be added to the project's ``pyproject.toml`` file.495497.. code-block:: none498 :caption: ``setup.cfg``496.. code-block:: toml497 :caption: ``pyproject.toml``498500 [tool:pytest]501 testpaths = tests499 [tool.pytest.ini_options]500 testpaths = ["tests"]501503 [coverage:run]504 branch = True505 source =506 flaskr502 [tool.coverage.run]503 branch = true504 source = ["flaskr"]505506To run the tests, use the ``pytest`` command. It will find and run all507the test functions you've written.508
2 unmodified lines
511 $ pytest512513 ========================= 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 items517518 tests/test_auth.py ........ [ 34%]519 tests/test_blog.py ............ [ 86%]
40 unmodified lines
modified:docs/cli.rst+13 added-28 removed
278 unmodified lines
279.. tabs::280281 .. group-tab:: Bash282283 Unix Bash, :file:`venv/bin/activate`::283 Unix Bash, :file:`.venv/bin/activate`::284285 $ export FLASK_APP=hello286287 .. group-tab:: Fish288289 Fish, :file:`venv/bin/activate.fish`::289 Fish, :file:`.venv/bin/activate.fish`::290291 $ set -x FLASK_APP hello292293 .. group-tab:: CMD294295 Windows CMD, :file:`venv\\Scripts\\activate.bat`::295 Windows CMD, :file:`.venv\\Scripts\\activate.bat`::296297 > set FLASK_APP=hello298299 .. group-tab:: Powershell300301 Windows Powershell, :file:`venv\\Scripts\\activate.ps1`::301 Windows Powershell, :file:`.venv\\Scripts\\activate.ps1`::302303 > $env:FLASK_APP = "hello"304305It is preferred to use dotenv support over this, since :file:`.flaskenv` can be
131 unmodified lines
437-------438439Flask will automatically load commands specified in the ``flask.commands``440`entry point`_. This is useful for extensions that want to add commands when441they are installed. Entry points are specified in :file:`setup.py` ::441they are installed. Entry points are specified in :file:`pyproject.toml`:442443 from setuptools import setup443.. code-block:: toml444445 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"447455448.. _entry point: https://packaging.python.org/tutorials/packaging-projects/#entry-points449458Inside :file:`flask_my_extension/commands.py` you can then export a Click450Inside :file:`my_extension/commands.py` you can then export a Click451object::452453 import click454
29 unmodified lines
484 @click.group(cls=FlaskGroup, create_app=create_app)485 def cli():486 """Management script for the Wiki application."""487496Define the entry point in :file:`setup.py`::488Define the entry point in :file:`pyproject.toml`:489498 from setuptools import setup490.. code-block:: toml491500 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"494495Install the application in the virtualenv in editable mode and the custom496script is available. Note that you don't need to set ``--app``. ::497
51 unmodified lines
modified:docs/installation.rst+5 added-5 removed
83 unmodified lines
8485Create an environment86~~~~~~~~~~~~~~~~~~~~~8788Create a project folder and a :file:`venv` folder within:88Create a project folder and a :file:`.venv` folder within:8990.. tabs::9192 .. group-tab:: macOS/Linux
1 unmodified line
94 .. code-block:: text9596 $ mkdir myproject97 $ cd myproject98 $ python3 -m venv venv98 $ python3 -m venv .venv99100 .. group-tab:: Windows101102 .. code-block:: text103104 > mkdir myproject105 > cd myproject106 > py -3 -m venv venv106 > py -3 -m venv .venv107108109.. _install-activate-env:110
7 unmodified lines
118 .. group-tab:: macOS/Linux119120 .. code-block:: text121122 $ . venv/bin/activate122 $ . .venv/bin/activate123124 .. group-tab:: Windows125126 .. code-block:: text127128 > venv\Scripts\activate128 > .venv\Scripts\activate129130Your shell prompt will change to show the name of the activated131environment.132
13 unmodified lines
modified:examples/javascript/.gitignore+1 added-1 removed
1venv/1.venv/2*.pyc3__pycache__/4instance/5.cache/
9 unmodified lines
added:examples/javascript/pyproject.toml+26 added
1[project]2name = "js_example"3version = "1.1.0"4description = "Demonstrates making AJAX requests to Flask."5readme = "README.rst"6license = {text = "BSD-3-Clause"}7maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]8dependencies = ["flask"]910[project.urls]11Documentation = "https://flask.palletsprojects.com/patterns/jquery/"1213[project.optional-dependencies]14test = ["pytest", "blinker"]1516[build-system]17requires = ["setuptools"]18build-backend = "setuptools.build_meta"1920[tool.pytest.ini_options]21testpaths = ["tests"]22filterwarnings = ["error"]2324[tool.coverage.run]25branch = true26source = ["js_example", "tests"]
modified:examples/javascript/README.rst+2 added-2 removed
21 unmodified lines
22-------2324.. code-block:: text2526 $ python3 -m venv venv27 $ . venv/bin/activate26 $ python3 -m venv .venv27 $ . .venv/bin/activate28 $ pip install -e .293031Run
17 unmodified lines
deleted:examples/javascript/setup.cfg-29 removed
1[metadata]2name = js_example3version = 1.1.04url = https://flask.palletsprojects.com/patterns/jquery/5license = BSD-3-Clause6maintainer = Pallets7maintainer_email = contact@palletsprojects.com8description = Demonstrates making AJAX requests to Flask.9long_description = file: README.rst10long_description_content_type = text/x-rst1112[options]13packages = find:14include_package_data = true15install_requires =16 Flask1718[options.extras_require]19test =20 pytest21 blinker2223[tool:pytest]24testpaths = tests2526[coverage:run]27branch = True28source =29 js_example
deleted:examples/javascript/setup.py-3 removed
1from setuptools import setup23setup()
modified:examples/tutorial/.gitignore+1 added-1 removed
1venv/1.venv/2*.pyc3__pycache__/4instance/5.cache/
9 unmodified lines
added:examples/tutorial/pyproject.toml+28 added
1[project]2name = "flaskr"3version = "1.0.0"4description = "The basic blog app built in the Flask tutorial."5readme = "README.rst"6license = {text = "BSD-3-Clause"}7maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]8dependencies = [9 "flask",10]1112[project.urls]13Documentation = "https://flask.palletsprojects.com/tutorial/"1415[project.optional-dependencies]16test = ["pytest"]1718[build-system]19requires = ["setuptools"]20build-backend = "setuptools.build_meta"2122[tool.pytest.ini_options]23testpaths = ["tests"]24filterwarnings = ["error"]2526[tool.coverage.run]27branch = true28source = ["flaskr", "tests"]
modified:examples/tutorial/README.rst+4 added-4 removed
21 unmodified lines
22 $ cd examples/tutorial2324Create a virtualenv and activate it::2526 $ python3 -m venv venv27 $ . venv/bin/activate26 $ python3 -m venv .venv27 $ . .venv/bin/activate2829Or on Windows cmd::3031 $ py -3 -m venv venv32 $ venv\Scripts\activate.bat31 $ py -3 -m venv .venv32 $ .venv\Scripts\activate.bat3334Install Flaskr::3536 $ pip install -e .
32 unmodified lines
deleted:examples/tutorial/setup.cfg-28 removed
1[metadata]2name = flaskr3version = 1.0.04url = https://flask.palletsprojects.com/tutorial/5license = BSD-3-Clause6maintainer = Pallets7maintainer_email = contact@palletsprojects.com8description = The basic blog app built in the Flask tutorial.9long_description = file: README.rst10long_description_content_type = text/x-rst1112[options]13packages = find:14include_package_data = true15install_requires =16 Flask1718[options.extras_require]19test =20 pytest2122[tool:pytest]23testpaths = tests2425[coverage:run]26branch = True27source =28 flaskr
deleted:examples/tutorial/setup.py-3 removed
1from setuptools import setup23setup()
modified:tests/test_appctx.py+3 added-3 removed
118 unmodified lines
119 cleanup_stuff.append(exception)120121 @app.route("/")122 def index():123 raise Exception("dummy")123 raise ValueError("dummy")124125 with pytest.raises(Exception, match="dummy"):125 with pytest.raises(ValueError, match="dummy"):126 with app.app_context():127 client.get("/")128129 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"132133134def test_app_ctx_globals_methods(app, app_ctx):
78 unmodified lines
modified:tests/test_basic.py+2 added-2 removed
1470 unmodified lines
1471 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 lines
added:.flake8+27 added
1[flake8]2extend-select =3 # bugbear4 B5 # bugbear opinions6 B97 # implicit str concat8 ISC9extend-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 B95024max-line-length = 8025per-file-ignores =26 # __init__ exports names27 src/flask/__init__.py: F401
modified:CHANGES.rst+2 added
1 unmodified line
2-------------34Unreleased56- Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.7 :pr:`4947`8- Ensure subdomains are applied with nested blueprints. :issue:`4834`91011Version 2.2.3
1418 unmodified lines
modified:CONTRIBUTING.rst+3 added-3 removed
100 unmodified lines
101 - Linux/macOS102103 .. code-block:: text104105 $ python3 -m venv env106 $ . env/bin/activate105 $ python3 -m venv .venv106 $ . .venv/bin/activate107108 - Windows109110 .. code-block:: text111112 > py -3 -m venv env112 > py -3 -m venv .venv113 > env\Scripts\activate114115- Upgrade pip and setuptools.116
111 unmodified lines
added:pyproject.toml+94 added
1[project]2name = "Flask"3description = "A simple framework for building complex web applications."4readme = "README.rst"5license = {text = "BSD-3-Clause"}6maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]7authors = [{name = "Armin Ronacher", email = "armin.ronacher@active-4.com"}]8classifiers = [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]21requires-python = ">=3.7"22dependencies = [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]29dynamic = ["version"]3031[project.urls]32Donate = "https://palletsprojects.com/donate"33Documentation = "https://flask.palletsprojects.com/"34Changes = "https://flask.palletsprojects.com/changes/"35"Source Code" = "https://github.com/pallets/flask/"36"Issue Tracker" = "https://github.com/pallets/flask/issues/"37Twitter = "https://twitter.com/PalletsTeam"38Chat = "https://discord.gg/pallets"3940[project.optional-dependencies]41async = ["asgiref>=3.2"]42dotenv = ["python-dotenv"]4344[project.scripts]45flask = "flask.cli:main"4647[build-system]48requires = ["setuptools"]49build-backend = "setuptools.build_meta"5051[tool.setuptools.dynamic]52version = {attr = "flask.__version__"}5354[tool.pytest.ini_options]55testpaths = ["tests"]56filterwarnings = ["error"]5758[tool.coverage.run]59branch = true60source = ["flask", "tests"]6162[tool.coverage.paths]63source = ["src", "*/site-packages"]6465[tool.mypy]66python_version = "3.7"67files = ["src/flask"]68show_error_codes = true69pretty = true70#strict = true71allow_redefinition = true72disallow_subclassing_any = true73#disallow_untyped_calls = true74#disallow_untyped_defs = true75#disallow_incomplete_defs = true76no_implicit_optional = true77local_partial_types = true78#no_implicit_reexport = true79strict_equality = true80warn_redundant_casts = true81warn_unused_configs = true82warn_unused_ignores = true83#warn_return_any = true84#warn_unreachable = true8586[[tool.mypy.overrides]]87module = [88 "asgiref.*",89 "blinker.*",90 "dotenv.*",91 "cryptography.*",92 "importlib_metadata",93]94ignore_missing_imports = true
deleted:setup.cfg-123 removed
1[metadata]2name = Flask3version = attr: flask.__version__4url = https://palletsprojects.com/p/flask5project_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/pallets13license = BSD-3-Clause14author = Armin Ronacher15author_email = armin.ronacher@active-4.com16maintainer = Pallets17maintainer_email = contact@palletsprojects.com18description = A simple framework for building complex web applications.19long_description = file: README.rst20long_description_content_type = text/x-rst21classifiers =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 Frameworks3334[options]35packages = find:36package_dir = = src37include_package_data = True38python_requires = >= 3.739# Dependencies are in setup.py for GitHub's dependency graph.4041[options.packages.find]42where = src4344[options.entry_points]45console_scripts =46 flask = flask.cli:main4748[tool:pytest]49testpaths = tests50filterwarnings =51 error5253[coverage:run]54branch = True55source =56 flask57 tests5859[coverage:paths]60source =61 src62 */site-packages6364[flake8]65# B = bugbear66# E = pycodestyle errors67# F = flake8 pyflakes68# W = pycodestyle warnings69# B9 = bugbear opinions70# ISC = implicit str concat71select = B, E, F, W, B9, ISC72ignore =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 B95086max-line-length = 8087per-file-ignores =88 # __init__ exports names89 src/flask/__init__.py: F4019091[mypy]92files = src/flask, tests/typing93python_version = 3.794show_error_codes = True95allow_redefinition = True96disallow_subclassing_any = True97# disallow_untyped_calls = True98# disallow_untyped_defs = True99# disallow_incomplete_defs = True100no_implicit_optional = True101local_partial_types = True102# no_implicit_reexport = True103strict_equality = True104warn_redundant_casts = True105warn_unused_configs = True106warn_unused_ignores = True107# warn_return_any = True108# warn_unreachable = True109110[mypy-asgiref.*]111ignore_missing_imports = True112113[mypy-blinker.*]114ignore_missing_imports = True115116[mypy-dotenv.*]117ignore_missing_imports = True118119[mypy-cryptography.*]120ignore_missing_imports = True121122[mypy-importlib_metadata]123ignore_missing_imports = True
deleted:setup.py-17 removed
1from setuptools import setup23# Metadata goes in setup.cfg. These are here for GitHub's dependency graph.4setup(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)