Merge pull request #3620 from pallets/requirements
Before adoption: this commit came in with the history the project adopted, so no landing records it.
use pip-compile to pin dev requirements
authored by David Lord · committed by GitHub · parents 295e1e7, eea31f2 · Browse files · 13 files·+254 added−109 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
13 files+254 added−109 removed
- other:+254 added−109 removed
Provenance
- Commit
51c87e6- Tree
edc4dd6- Author
David Lord <davidism@gmail.com>- Committer
GitHub <noreply@github.com>- Parent 1
295e1e7- Parent 2
eea31f2
13 files changed+254 added−109 removed
deleted:docs/requirements.txt-5 removed
1-Sphinx~=3.0.02-Pallets-Sphinx-Themes~=1.2.33-sphinxcontrib-log-cabinet~=1.0.14-sphinx-issues~=1.2.05-packaging~=20.3added:requirements/dev.in+5 added
1+-r docs.in2+-r tests.in3+pip-tools4+pre-commit5+toxadded:requirements/dev.txt+59 added
1+#2+# This file is autogenerated by pip-compile3+# To update, run:4+#5+# pip-compile requirements/dev.in6+#7+alabaster==0.7.12 # via sphinx8+appdirs==1.4.4 # via virtualenv9+attrs==19.3.0 # via pytest10+babel==2.8.0 # via sphinx11+blinker==1.4 # via -r requirements/tests.in12+certifi==2020.4.5.1 # via requests13+cfgv==3.1.0 # via pre-commit14+chardet==3.0.4 # via requests15+click==7.1.2 # via pip-tools16+distlib==0.3.0 # via virtualenv17+docutils==0.16 # via sphinx18+filelock==3.0.12 # via tox, virtualenv19+greenlet==0.4.15 # via -r requirements/tests.in20+identify==1.4.16 # via pre-commit21+idna==2.9 # via requests22+imagesize==1.2.0 # via sphinx23+jinja2==2.11.2 # via sphinx24+markupsafe==1.1.1 # via jinja225+more-itertools==8.3.0 # via pytest26+nodeenv==1.3.5 # via pre-commit27+packaging==20.4 # via -r requirements/docs.in, pallets-sphinx-themes, pytest, sphinx, tox28+pallets-sphinx-themes==1.2.3 # via -r requirements/docs.in29+pip-tools==5.1.2 # via -r requirements/dev.in30+pluggy==0.13.1 # via pytest, tox31+pre-commit==2.4.0 # via -r requirements/dev.in32+py==1.8.1 # via pytest, tox33+pygments==2.6.1 # via sphinx34+pyparsing==2.4.7 # via packaging35+pytest==5.4.2 # via -r requirements/tests.in36+python-dotenv==0.13.0 # via -r requirements/tests.in37+pytz==2020.1 # via babel38+pyyaml==5.3.1 # via pre-commit39+requests==2.23.0 # via sphinx40+six==1.15.0 # via packaging, pip-tools, tox, virtualenv41+snowballstemmer==2.0.0 # via sphinx42+sphinx-issues==1.2.0 # via -r requirements/docs.in43+sphinx==3.0.3 # via -r requirements/docs.in, pallets-sphinx-themes, sphinx-issues, sphinxcontrib-log-cabinet44+sphinxcontrib-applehelp==1.0.2 # via sphinx45+sphinxcontrib-devhelp==1.0.2 # via sphinx46+sphinxcontrib-htmlhelp==1.0.3 # via sphinx47+sphinxcontrib-jsmath==1.0.1 # via sphinx48+sphinxcontrib-log-cabinet==1.0.1 # via -r requirements/docs.in49+sphinxcontrib-qthelp==1.0.3 # via sphinx50+sphinxcontrib-serializinghtml==1.1.4 # via sphinx51+toml==0.10.1 # via pre-commit, tox52+tox==3.15.1 # via -r requirements/dev.in53+urllib3==1.25.9 # via requests54+virtualenv==20.0.21 # via pre-commit, tox55+wcwidth==0.1.9 # via pytest56+57+# The following packages are considered to be unsafe in a requirements file:58+# pip59+# setuptoolsadded:requirements/docs.in+5 added
1+Pallets-Sphinx-Themes2+packaging3+Sphinx4+sphinx-issues5+sphinxcontrib-log-cabinetadded:requirements/docs.txt+36 added
1+#2+# This file is autogenerated by pip-compile3+# To update, run:4+#5+# pip-compile requirements/docs.in6+#7+alabaster==0.7.12 # via sphinx8+babel==2.8.0 # via sphinx9+certifi==2020.4.5.1 # via requests10+chardet==3.0.4 # via requests11+docutils==0.16 # via sphinx12+idna==2.9 # via requests13+imagesize==1.2.0 # via sphinx14+jinja2==2.11.2 # via sphinx15+markupsafe==1.1.1 # via jinja216+packaging==20.4 # via -r requirements/docs.in, pallets-sphinx-themes, sphinx17+pallets-sphinx-themes==1.2.3 # via -r requirements/docs.in18+pygments==2.6.1 # via sphinx19+pyparsing==2.4.7 # via packaging20+pytz==2020.1 # via babel21+requests==2.23.0 # via sphinx22+six==1.15.0 # via packaging23+snowballstemmer==2.0.0 # via sphinx24+sphinx-issues==1.2.0 # via -r requirements/docs.in25+sphinx==3.0.3 # via -r requirements/docs.in, pallets-sphinx-themes, sphinx-issues, sphinxcontrib-log-cabinet26+sphinxcontrib-applehelp==1.0.2 # via sphinx27+sphinxcontrib-devhelp==1.0.2 # via sphinx28+sphinxcontrib-htmlhelp==1.0.3 # via sphinx29+sphinxcontrib-jsmath==1.0.1 # via sphinx30+sphinxcontrib-log-cabinet==1.0.1 # via -r requirements/docs.in31+sphinxcontrib-qthelp==1.0.3 # via sphinx32+sphinxcontrib-serializinghtml==1.1.4 # via sphinx33+urllib3==1.25.9 # via requests34+35+# The following packages are considered to be unsafe in a requirements file:36+# setuptoolsadded:requirements/tests.in+4 added
1+pytest2+blinker3+greenlet4+python-dotenvadded:requirements/tests.txt+18 added
1+#2+# This file is autogenerated by pip-compile3+# To update, run:4+#5+# pip-compile requirements/tests.in6+#7+attrs==19.3.0 # via pytest8+blinker==1.4 # via -r requirements/tests.in9+greenlet==0.4.15 # via -r requirements/tests.in10+more-itertools==8.3.0 # via pytest11+packaging==20.4 # via pytest12+pluggy==0.13.1 # via pytest13+py==1.8.1 # via pytest14+pyparsing==2.4.7 # via packaging15+pytest==5.4.2 # via -r requirements/tests.in16+python-dotenv==0.13.0 # via -r requirements/tests.in17+six==1.15.0 # via packaging18+wcwidth==0.1.9 # via pytestmodified:.pre-commit-config.yaml+4 added-4 removed
123345678891011122 unmodified lines151617181919202122232425262627282930repos: - repo: https://github.com/asottile/pyupgrade rev: v2.1.0 rev: v2.4.3 hooks: - id: pyupgrade args: ["--py36-plus"] - repo: https://github.com/asottile/reorder_python_imports rev: v2.1.0 rev: v2.3.0 hooks: - id: reorder-python-imports name: Reorder Python imports (src, tests) files: "^(?!examples/)"2 unmodified lines rev: 19.10b0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 rev: 3.7.9 rev: 3.8.2 hooks: - id: flake8 additional_dependencies: - flake8-bugbear - flake8-implicit-str-concat - repo: https://github.com/pre-commit/pre-commit-hooks rev: v2.5.0 rev: v3.1.0 hooks: - id: check-byte-order-marker - id: trailing-whitespace - id: end-of-file-fixermodified:.readthedocs.yaml+1 added-1 removed
1 version: 22 python:3 install:4+ - requirements: requirements/docs.txt5 - method: pip6 path: .6- - requirements: docs/requirements.txt7 sphinx:8 builder: dirhtmlmodified:CONTRIBUTING.rst+118 added-82 removed
1 unmodified line2 ==========================3 4 Thank you for considering contributing to Flask!5 6+7 Support questions8 -----------------9 10 Please, don't use the issue tracker for this. Use one of the following11 resources for questions about your own code:12 12-* The ``#get-help`` channel on our Discord chat: https://discordapp.com/invite/t6rrQZH13+- The ``#get-help`` channel on our Discord chat:14+ https://discord.gg/t6rrQZH15 14- * The IRC channel ``#pocoo`` on FreeNode is linked to Discord, but15- Discord is preferred.16+ - The IRC channel ``#pocoo`` on FreeNode is linked to Discord, but17+ Discord is preferred.18 19+- The mailing list flask@python.org for long term discussion or larger17-* The mailing list flask@python.org for long term discussion or larger issues.18-* Ask on `Stack Overflow`_. Search with Google first using:19- ``site:stackoverflow.com flask {search term, exception message, etc.}``20+ issues.21+- Ask on `Stack Overflow`_. Search with Google first using:22+ ``site:stackoverflow.com flask {search term, exception message, etc.}``23 24 .. _Stack Overflow: https://stackoverflow.com/questions/tagged/flask?sort=linked25 26+27 Reporting issues28 ----------------29 26-- Describe what you expected to happen.27-- If possible, include a `minimal reproducible example`_ to help us28- identify the issue. This also helps check that the issue is not with29- your own code.30-- Describe what actually happened. Include the full traceback if there was an31- exception.32-- List your Python, Flask, and Werkzeug versions. If possible, check if this33- issue is already fixed in the repository.30+- Describe what you expected to happen.31+- If possible, include a `minimal reproducible example`_ to help us32+ identify the issue. This also helps check that the issue is not with33+ your own code.34+- Describe what actually happened. Include the full traceback if there35+ was an exception.36+- List your Python, Flask, and Werkzeug versions. If possible, check37+ if this issue is already fixed in the repository.38 39 .. _minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example40 41+42 Submitting patches43 ------------------44 40-- Use `Black`_ to autoformat your code. This should be done for you as a41- git `pre-commit`_ hook, which gets installed when you run ``pip install -e .[dev]``.42- You may also wish to use Black's `Editor integration`_.43-- Include tests if your patch is supposed to solve a bug, and explain44- clearly under which circumstances the bug happens. Make sure the test fails45- without your patch.46-- Include a string like "Fixes #123" in your commit message47- (where 123 is the issue you fixed).48- See `Closing issues using keywords49- <https://help.github.com/articles/creating-a-pull-request/>`__.45+- Use `Black`_ to autoformat your code. This should be done for you as46+ a Git `pre-commit`_ hook, set up below. You may also wish to use47+ Black's `Editor integration`_.48+- Include tests if your patch is supposed to solve a bug, and explain49+ clearly under which circumstances the bug happens. Make sure the50+ test fails without your patch.51+- Include a string like "Fixes #123" in your commit message (where 12352+ is the issue you fixed). See `Closing issues using keywords53+ <https://help.github.com/articles/creating-a-pull-request/>`__.54 55+56 First time setup57 ~~~~~~~~~~~~~~~~58 54-- Download and install the `latest version of git`_.55-- Configure git with your `username`_ and `email`_::59+- Download and install the `latest version of git`_.60+- Configure git with your `username`_ and `email`_.61 57- git config --global user.name 'your name'58- git config --global user.email 'your email'62+ .. code-block:: text63 60-- Make sure you have a `GitHub account`_.61-- Fork Flask to your GitHub account by clicking the `Fork`_ button.62-- `Clone`_ your GitHub fork locally::64+ $ git config --global user.name 'your name'65+ $ git config --global user.email 'your email'66 64- git clone https://github.com/{username}/flask65- cd flask67+- Make sure you have a `GitHub account`_.68+- Fork Flask to your GitHub account by clicking the `Fork`_ button.69+- `Clone`_ your GitHub fork locally.70 67-- Add the main repository as a remote to update later::71+ .. code-block:: text72 73+ $ git clone https://github.com/{username}/flask74+ $ cd flask75+76+- Add the main repository as a remote to update later::77+78+ .. code-block:: text79+80 git remote add pallets https://github.com/pallets/flask81 git fetch pallets82 72-- Create a virtualenv::83+- Create a virtualenv.84 74- python3 -m venv env75- . env/bin/activate76- # or "env\Scripts\activate" on Windows85+ .. code-block:: text86 78-- Install Flask in editable mode with development dependencies::87+ $ python3 -m venv env88+ $ . env/bin/activate89 80- pip install -e ".[dev]"90+ On Windows, activating is different.91 82-- Install the `pre-commit framework`_.83-- Install the pre-commit hooks::92+ .. code-block:: text93 85- pre-commit install --install-hooks94+ > env\Scripts\activate95 96+- Install Flask in editable mode with development dependencies.97+98+ .. code-block:: text99+100+ $ pip install -e . -r requirements/dev.txt101+102+- Install the pre-commit hooks.103+104+ .. code-block:: text105+106+ $ pre-commit install107+108 .. _GitHub account: https://github.com/join109 .. _latest version of git: https://git-scm.com/downloads110 .. _username: https://help.github.com/en/articles/setting-your-username-in-git111 .. _email: https://help.github.com/en/articles/setting-your-commit-email-address-in-git112 .. _Fork: https://github.com/pallets/flask/fork113 .. _Clone: https://help.github.com/en/articles/fork-a-repo#step-2-create-a-local-clone-of-your-fork114 .. _pre-commit framework: https://pre-commit.com/#install115 116+117 Start coding118 ~~~~~~~~~~~~119 120 - Create a branch to identify the issue you would like to work on. If121 you're submitting a bug or documentation fix, branch off of the100- latest ".x" branch::122+ latest ".x" branch.123 102- git checkout -b your-branch-name origin/1.0.x124+ .. code-block:: text125 126+ $ git checkout -b your-branch-name origin/1.0.x127+128 If you're submitting a feature addition or change, branch off of the105- "master" branch::129+ "master" branch.130 107- git checkout -b your-branch-name origin/master131+ .. code-block:: text132 109-- Using your favorite editor, make your changes, `committing as you go`_.110-- Include tests that cover any code changes you make. Make sure the test fails111- without your patch. `Run the tests <contributing-testsuite_>`_.112-- Push your commits to GitHub and `create a pull request`_ by using::133+ $ git checkout -b your-branch-name origin/master134 114- git push --set-upstream origin your-branch-name135+- Using your favorite editor, make your changes,136+ `committing as you go`_.137+- Include tests that cover any code changes you make. Make sure the138+ test fails without your patch.139+ `Run the tests <contributing-testsuite_>`_.140+- Push your commits to GitHub and `create a pull request`_.141 116-- Celebrate 🎉142+ .. code-block:: text143 144+ $ git push --set-upstream origin your-branch-name145+146 .. _committing as you go: https://dont-be-afraid-to-commit.readthedocs.io/en/latest/git/commandlinegit.html#commit-your-changes147 .. _Black: https://black.readthedocs.io148 .. _Editor integration: https://black.readthedocs.io/en/stable/editor_integration.html149 .. _pre-commit: https://pre-commit.com150 .. _create a pull request: https://help.github.com/en/articles/creating-a-pull-request151 152+153 .. _contributing-testsuite: #running-the-tests154 155 Running the tests156 ~~~~~~~~~~~~~~~~~157 129-Run the basic test suite with::158+Run the basic test suite with pytest.159 131- pytest160+.. code-block:: text161 133-This only runs the tests for the current environment. Whether this is relevant134-depends on which part of Flask you're working on. Travis-CI will run the full135-suite when you submit your pull request.162+ $ pytest163 164+This only runs the tests for the current environment. Whether this is165+relevant depends on which part of Flask you're working on. CI will run166+the full suite when you submit your pull request.167+168 The full test suite takes a long time to run because it tests multiple169 combinations of Python and dependencies. If you don't have a Python170 version installed, it will be skipped with a warning message at the end.140-Run::171 142- tox172+.. code-block:: text173 174+ $ tox175+176+177 Running test coverage178 ~~~~~~~~~~~~~~~~~~~~~179 180 Generating a report of lines that do not have test coverage can indicate148-where to start contributing. Run ``pytest`` using ``coverage`` and generate a149-report on the terminal and as an interactive HTML document::181+where to start contributing. Run ``pytest`` using ``coverage`` and182+generate a report on the terminal and as an interactive HTML document.183 151- coverage run -m pytest152- coverage report153- coverage html154- # then open htmlcov/index.html184+.. code-block:: text185 186+ $ coverage run -m pytest187+ $ coverage report188+ $ coverage html # then open htmlcov/index.html189+190 Read more about `coverage <https://coverage.readthedocs.io>`_.191 192 Running the full test suite with ``tox`` will combine the coverage reports193 from all runs.1 unmodified line195 196 Building the docs197 ~~~~~~~~~~~~~~~~~198 165-Build the docs in the ``docs`` directory using Sphinx::199+Build the docs in the ``docs`` directory using Sphinx.200 167- cd docs168- pip install -r requirements.txt169- make html201+.. code-block:: text202 203+ $ cd docs204+ $ make html205+206 Open ``_build/html/index.html`` in your browser to view the docs.207 208 Read more about `Sphinx <https://www.sphinx-doc.org/en/master/>`_.209 210 211 Caution: zero-padded file modes212 -------------------------------213 179-This repository contains several zero-padded file modes that may cause issues180-when pushing this repository to git hosts other than GitHub. Fixing this is181-destructive to the commit history, so we suggest ignoring these warnings. If it182-fails to push and you're using a self-hosted git service like GitLab, you can183-turn off repository checks in the admin panel.214+This repository contains several zero-padded file modes that may cause215+issues when pushing this repository to Git hosts other than GitHub.216+Fixing this is destructive to the commit history, so we suggest ignoring217+these warnings. If it fails to push and you're using a self-hosted Git218+service like GitLab, you can turn off repository checks in the admin219+panel.220 185-These files can also cause issues while cloning. If you have ::221+These files can also cause issues while cloning if you have222+``fsckObjects`` enabled with either of the following in your git config.223 224+.. code-block::225+226 [fetch]188- fsckobjects = true227+ fsckObjects = true228 190-or ::191-229 [receive]230 fsckObjects = true231 195-set in your git configuration file, cloning this repository will fail. The only196-solution is to set both of the above settings to false while cloning, and then197-setting them back to true after the cloning is finished.232+The only solution is to set both of the above to ``false``, clone, and233+then set them back to ``true`` after.modified:MANIFEST.in+1 added
1 include CHANGES.rst2 include CONTRIBUTING.rst3 include LICENSE.rst4 include tox.ini5+include requirements/*.txt6 graft artwork7 graft docs8 prune docs/_build9 graft examples2 unmodified linesmodified:setup.py+1 added-12 removed
13 unmodified lines14 "Jinja2>=2.10.1",15 "itsdangerous>=0.24",16 "click>=5.1",17 ],18- extras_require={19- "dotenv": ["python-dotenv"],20- "dev": [21- "pytest",22- "coverage",23- "tox",24- "sphinx",25- "pallets-sphinx-themes",26- "sphinxcontrib-log-cabinet",27- "sphinx-issues",28- ],29- },18+ extras_require={"dotenv": ["python-dotenv"]},19 )modified:tox.ini+2 added-5 removed
6 unmodified lines7 skip_missing_interpreters = true8 9 [testenv]10 deps =11- pytest12- greenlet13- blinker14- python-dotenv11+ -r requirements/tests.txt12 13 lowest: Werkzeug==0.15.514 lowest: Jinja2==2.1015 lowest: itsdangerous==0.2416 unmodified lines32 skip_install = true33 commands = pre-commit run --all-files --show-diff-on-failure34 35 [testenv:docs]39-deps = -r docs/requirements.txt36+deps = -r requirements/docs.txt37 commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html