From 7343b7829babfd5826a18db7d7313a306038e167 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Tue, 24 Nov 2020 14:34:27 -0500 Subject: [PATCH 01/15] Add towncrier and changes since 3.2.0 --- changelog/.gitignore | 1 + changelog/670.feature.rst | 1 + changelog/675.feature.rst | 1 + changelog/678.bugfix.rst | 1 + changelog/680.doc.rst | 1 + changelog/685.feature.rst | 1 + changelog/693.bugfix.rst | 1 + changelog/698.bugfix.rst | 1 + changelog/708.feature.rst | 1 + changelog/714.bugfix.rst | 1 + changelog/715.feature.rst | 1 + pyproject.toml | 7 +++++++ tox.ini | 8 ++++++++ 13 files changed, 26 insertions(+) create mode 100644 changelog/.gitignore create mode 100644 changelog/670.feature.rst create mode 100644 changelog/675.feature.rst create mode 100644 changelog/678.bugfix.rst create mode 100644 changelog/680.doc.rst create mode 100644 changelog/685.feature.rst create mode 100644 changelog/693.bugfix.rst create mode 100644 changelog/698.bugfix.rst create mode 100644 changelog/708.feature.rst create mode 100644 changelog/714.bugfix.rst create mode 100644 changelog/715.feature.rst diff --git a/changelog/.gitignore b/changelog/.gitignore new file mode 100644 index 00000000..f935021a --- /dev/null +++ b/changelog/.gitignore @@ -0,0 +1 @@ +!.gitignore diff --git a/changelog/670.feature.rst b/changelog/670.feature.rst new file mode 100644 index 00000000..33d0b08e --- /dev/null +++ b/changelog/670.feature.rst @@ -0,0 +1 @@ +Print files to be uploaded using ``upload --verbose`` diff --git a/changelog/675.feature.rst b/changelog/675.feature.rst new file mode 100644 index 00000000..1b3f392c --- /dev/null +++ b/changelog/675.feature.rst @@ -0,0 +1 @@ +Print configuration file location when using ``upload --verbose`` diff --git a/changelog/678.bugfix.rst b/changelog/678.bugfix.rst new file mode 100644 index 00000000..f4932eb8 --- /dev/null +++ b/changelog/678.bugfix.rst @@ -0,0 +1 @@ +Make password optional when using ``upload --client-cert`` diff --git a/changelog/680.doc.rst b/changelog/680.doc.rst new file mode 100644 index 00000000..d0c3ca16 --- /dev/null +++ b/changelog/680.doc.rst @@ -0,0 +1 @@ +Adopt PSF code of conduct diff --git a/changelog/685.feature.rst b/changelog/685.feature.rst new file mode 100644 index 00000000..2e19d059 --- /dev/null +++ b/changelog/685.feature.rst @@ -0,0 +1 @@ +Print source and values of credentials when using ``upload --verbose`` diff --git a/changelog/693.bugfix.rst b/changelog/693.bugfix.rst new file mode 100644 index 00000000..5ba037fe --- /dev/null +++ b/changelog/693.bugfix.rst @@ -0,0 +1 @@ +Support more Nexus versions with ``upload --skip-existing`` diff --git a/changelog/698.bugfix.rst b/changelog/698.bugfix.rst new file mode 100644 index 00000000..2e5df63b --- /dev/null +++ b/changelog/698.bugfix.rst @@ -0,0 +1 @@ +Support Gitlab Enterprise with ``upload --skip-existing`` diff --git a/changelog/708.feature.rst b/changelog/708.feature.rst new file mode 100644 index 00000000..adcccace --- /dev/null +++ b/changelog/708.feature.rst @@ -0,0 +1 @@ +Add support for Python 3.9 diff --git a/changelog/714.bugfix.rst b/changelog/714.bugfix.rst new file mode 100644 index 00000000..4c1187a2 --- /dev/null +++ b/changelog/714.bugfix.rst @@ -0,0 +1 @@ +Show a better error message for malformed files diff --git a/changelog/715.feature.rst b/changelog/715.feature.rst new file mode 100644 index 00000000..b96bbafa --- /dev/null +++ b/changelog/715.feature.rst @@ -0,0 +1 @@ +Turn warnings into errors when using ``check --strict`` diff --git a/pyproject.toml b/pyproject.toml index c5effd95..f98ada88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,10 @@ [build-system] requires = ["setuptools>=40.8", "wheel", "setuptools_scm>=1.15"] build-backend = "setuptools.build_meta:__legacy__" + +[tool.towncrier] +package = "twine" +filename = "docs/changelog.rst" +directory = "changelog" +title_format = "{version} ({project_date})" +issue_format = "`#{issue} `_" diff --git a/tox.ini b/tox.ini index 8de21d14..ae3bc0ea 100644 --- a/tox.ini +++ b/tox.ini @@ -77,6 +77,14 @@ commands = mypy --html-report mypy --txt-report mypy {posargs:twine} python -c 'with open("mypy/index.txt") as f: print(f.read())' +[testenv:changelog] +basepython = python3 +skip_install = true +deps = + towncrier +commands = + towncrier {posargs} + [testenv:release] # disabled for twine to cause it to upload itself # skip_install = True From 52913c3cc4168bb8c96035c5fa321325879ea410 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Tue, 24 Nov 2020 15:37:55 -0500 Subject: [PATCH 02/15] Generate example changelog --- changelog.rst | 26 ++++++++++++++++++++++++++ pyproject.toml | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 changelog.rst diff --git a/changelog.rst b/changelog.rst new file mode 100644 index 00000000..d4c4f050 --- /dev/null +++ b/changelog.rst @@ -0,0 +1,26 @@ +3.2.1.dev23+gafbf79f (2020-11-24) +--------------------------------- + +Features +^^^^^^^^ + +- Print files to be uploaded using ``upload --verbose`` (`#670 `_) +- Print configuration file location when using ``upload --verbose`` (`#675 `_) +- Print source and values of credentials when using ``upload --verbose`` (`#685 `_) +- Add support for Python 3.9 (`#708 `_) +- Turn warnings into errors when using ``check --strict`` (`#715 `_) + + +Bugfixes +^^^^^^^^ + +- Make password optional when using ``upload --client-cert`` (`#678 `_) +- Support more Nexus versions with ``upload --skip-existing`` (`#693 `_) +- Support Gitlab Enterprise with ``upload --skip-existing`` (`#698 `_) +- Show a better error message for malformed files (`#714 `_) + + +Improved Documentation +^^^^^^^^^^^^^^^^^^^^^^ + +- Adopt PSF code of conduct (`#680 `_) diff --git a/pyproject.toml b/pyproject.toml index f98ada88..59a995d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,8 @@ build-backend = "setuptools.build_meta:__legacy__" [tool.towncrier] package = "twine" -filename = "docs/changelog.rst" +filename = "changelog.rst" directory = "changelog" title_format = "{version} ({project_date})" issue_format = "`#{issue} `_" +underlines = ["-", "^"] From bdef826b4f8dd6b98bee00b59926dfb670603687 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 29 Nov 2020 09:12:18 -0500 Subject: [PATCH 03/15] Remove releases tooling --- docs/changelog.rst | 2 -- docs/conf.py | 11 +---------- docs/contributing.rst | 1 - 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 7aa7695b..be7e459c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,7 +1,5 @@ :orphan: -.. See https://releases.readthedocs.io/ for instructions - ========= Changelog ========= diff --git a/docs/conf.py b/docs/conf.py index 2aa3d89d..1a287338 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -24,7 +24,7 @@ # -- General configuration ---------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = '1.7.0' +needs_sphinx = "1.7.0" # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. @@ -34,15 +34,8 @@ "sphinx.ext.intersphinx", "sphinx.ext.coverage", "sphinx.ext.viewcode", - "releases", ] -# 'releases' (changelog) settings -releases_issue_uri = "https://github.com/pypa/twine/issues/%s" -releases_release_uri = "https://github.com/pypa/twine/tree/%s" - -releases_debug = False # Change to True to see debug output - # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -188,10 +181,8 @@ latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # 'papersize': 'letterpaper', - # The font size ('10pt', '11pt' or '12pt'). # 'pointsize': '10pt', - # Additional stuff for the LaTeX preamble. # 'preamble': '', } diff --git a/docs/contributing.rst b/docs/contributing.rst index a9652c88..85989939 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -228,6 +228,5 @@ merge into a single tool; see `ongoing discussion .. _`black`: https://black.readthedocs.io/ .. _`flake8`: https://flake8.pycqa.org/ .. _`mypy`: https://mypy.readthedocs.io/ -.. _`plugin`: https://github.com/bitprophet/releases .. _`projects`: https://packaging.python.org/glossary/#term-Project .. _`open issues`: https://github.com/pypa/twine/issues From a9e271db39035fcd97797c4e3772b7af42151f5f Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 29 Nov 2020 08:58:06 -0500 Subject: [PATCH 04/15] Reformat existing changelog --- docs/changelog.rst | 458 ++++++++++++++++++++++++--------------------- 1 file changed, 244 insertions(+), 214 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index be7e459c..4f59bfd8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,128 +1,140 @@ -:orphan: - ========= Changelog ========= -* :release:`3.2.0 <2020-06-24>` -* :feature:`666` Improve display of HTTP errors during upload -* :feature:`649` Use red text when printing errors on the command line -* :feature:`652` Print packages and signatures to be uploaded when using - ``--verbose`` option -* :bug:`655 major` Update URL to ``.pypirc`` specification -* :feature:`602` Require repository URL scheme to be ``http`` or ``https`` -* :bug:`612 major` Don't raise an exception when Python version can't be - parsed from filename -* :bug:`611 major` Fix inaccurate retry message during ``upload`` -* :bug:`601 major` Clarify error messages for archive format -* :feature:`231` Add type annotations, checked with mypy, with :pep:`561` - support for users of Twine's API -* :release:`3.1.1 <2019-11-27>` -* :bug:`548` Restore ``--non-interactive`` as a flag not expecting an - argument. -* :release:`3.1.0 <2019-11-23>` -* :feature:`547` Add support for specifying ``--non-interactive`` as an - environment variable. -* :release:`3.0.0 <2019-11-18>` -* :feature:`336` When a client certificate is indicated, all password - processing is disabled. -* :feature:`489` Add ``--non-interactive`` flag to abort upload rather than - interactively prompt if credentials are missing. -* :feature:`524` Twine now unconditionally requires the keyring library - and no longer supports uninstalling ``keyring`` as a means to disable - that functionality. Instead, use ``keyring --disable`` keyring functionality - if necessary. -* :feature:`518` Add Python 3.8 to classifiers. -* :bug:`332 major` More robust handling of server response in - ``--skip-existing`` -* :release:`2.0.0 <2019-09-24>` -* :feature:`437` Twine now requires Python 3.6 or later. Use pip - 9 or pin to "twine<2" to install twine on older Python versions. -* :bug:`491 major` Require requests 2.20 or later to avoid reported security - vulnerabilities in earlier releases. -* :release:`1.15.0 <2019-09-17>` -* :feature:`488` Improved output on ``check`` command: - Prints a message when there are no distributions given to check. - Improved handling of errors in a distribution's markup, avoiding - messages flowing through to the next distribution's errors. -* :release:`1.14.0 <2019-09-06>` -* :feature:`456` Better error handling and gpg2 fallback if gpg not available. -* :bug:`341 major` Fail more gracefully when encountering bad metadata -* :feature:`459` Show Warehouse URL after uploading a package -* :feature:`310` Now provide a more meaningful error on redirect during upload. -* :release:`1.13.0 <2019-02-13>` -* :bug:`452 major` Restore prompts while retaining support for suppressing - prompts. -* :bug:`447 major` Avoid requests-toolbelt to 0.9.0 to prevent attempting to - use - openssl when it isn't available. -* :feature:`427` Add disable_progress_bar option to disable tqdm. -* :feature:`426` Allow defining an empty username and password in .pypirc. -* :bug:`441 major` Only install pyblake2 if needed. -* :bug:`444 major` Use io.StringIO instead of StringIO. -* :bug:`436 major` Use modern Python language features. -* :support:`439` Refactor tox env and travis config. -* :bug:`435 major` Specify python_requires in setup.py -* :bug:`432 major` Use https URLs everywhere. -* :bug:`428 major` Fix --skip-existing for Nexus Repos. -* :feature:`419` Support keyring.get_credential. -* :feature:`418` Support keyring.get_username_and_password. -* :bug:`421 major` Remove unnecessary usage of readme_render.markdown. -* :feature:`416` Add Python 3.7 to classifiers. -* :bug:`412 major` Don't crash if there's no package description. -* :bug:`408 major` Fix keyring support. -* :release:`1.12.1 <2018-09-24>` -* :bug:`404` Fix regression with upload exit code -* :release:`1.12.0 <2018-09-24>` -* :feature:`395 major` Add ``twine check`` command to check long description -* :feature:`392 major` Drop support for Python 3.3 -* :feature:`363` Empower ``--skip-existing`` for Artifactory repositories -* :bug:`367 major` Avoid MD5 when Python is compiled in FIPS mode -* :release:`1.11.0 <2018-03-19>` -* :bug:`269 major` Avoid uploading to PyPI when given alternate - repository URL, and require ``http://`` or ``https://`` in - ``repository_url``. -* :support:`277` Add instructions on how to use keyring. -* :support:`314` Add new maintainer, release checklists. -* :bug:`322 major` Raise exception if attempting upload to deprecated legacy - PyPI URLs. -* :feature:`320` Remove PyPI as default ``register`` package index. -* :feature:`319` Support Metadata 2.1 (:pep:`566`), including Markdown - for ``description`` fields. -* :support:`318` `Update PyPI URLs - `_. -* :release:`1.10.0 <2018-03-07>` -* :bug:`315 major` Degrade gracefully when keyring is unavailable -* :feature:`304` Reorganize & improve user & developer documentation. -* :feature:`46` Link to changelog from ``README`` -* :feature:`295` Add doc building instructions -* :feature:`296` Add architecture overview to docs -* :feature:`303` Revise docs predicting future of ``twine`` -* :bug:`298 major` Fix syntax highlighting in ``README`` -* :bug:`299 major` Fix changelog formatting -* :bug:`200 major` Remove obsolete registration guidance -* :bug:`286 major` Fix Travis CI and test configuration -* :feature:`257` Declare support for Python 3.6 -* :bug:`297 major` Fix Read the Docs, tox, Travis configuration -* :bug:`268 major` Print progress to ``stdout``, not ``stderr`` -* :bug:`265 major` Fix ``--repository[-url]`` help text -* :feature:`256` Improve progressbar -* :release:`1.9.1 <2017-05-27>` -* :bug:`-` Blacklist known bad versions of Requests. See also :bug:`253` -* :release:`1.9.0 <2017-05-22>` -* :support:`-` Twine will now resolve passwords using the - `keyring `_ if available. - Module can be required with the ``keyring`` extra. -* :support:`-` Twine will use ``hashlib.blake2b`` on Python 3.6+ - instead of using pyblake2 for Blake2 hashes 256 bit hashes. -* :support:`-` Twine sends less information about the user's system in - the User-Agent string. See also :bug:`229` -* :support:`-` Fix ``--skip-existing`` when used to upload a package - for the first time. See also :bug:`220` -* :support:`-` Fix precedence of ``--repository-url`` over - ``--repository``. See also :bug:`206` -* :release:`1.8.1 <2016-08-09>` -* :support:`-` Check if a package exists if the URL is one of: +3.2.0 (2020-06-24) +------------------ + +- *Feature* Improve display of HTTP errors during upload (`#666 `_) +- *Feature* Print packages and signatures to be uploaded when using ``--verbose`` option (`#652 `_) +- *Feature* Use red text when printing errors on the command line (`#649 `_) +- *Feature* Require repository URL scheme to be ``http`` or ``https`` (`#602 `_) +- *Feature* Add type annotations, checked with mypy, with :pep:`561` support for users of Twine's API (`#231 `_) +- *Bugfix* Update URL to ``.pypirc`` specification (`#655 `_) +- *Bugfix* Don't raise an exception when Python version can't be parsed from filename (`#612 `_) +- *Bugfix* Fix inaccurate retry message during ``upload`` (`#611 `_) +- *Bugfix* Clarify error messages for archive format (`#601 `_) + +3.1.1 (2019-11-27) +------------------ + +- *Bugfix* Restore ``--non-interactive`` as a flag not expecting an argument. (`#548 `_) + +3.1.0 (2019-11-23) +------------------ + +- *Feature* Add support for specifying ``--non-interactive`` as an environment variable. (`#547 `_) + +3.0.0 (2019-11-18) +------------------ + +- *Feature* When a client certificate is indicated, all password processing is disabled. (`#336 `_) +- *Feature* Add ``--non-interactive`` flag to abort upload rather than interactively prompt if credentials are missing. (`#489 `_) +- *Feature* Twine now unconditionally requires the keyring library and no longer supports uninstalling ``keyring`` as a means to disable that functionality. Instead, use ``keyring --disable`` keyring functionality if necessary. (`#524 `_) +- *Feature* Add Python 3.8 to classifiers. (`#518 `_) +- *Bugfix* More robust handling of server response in ``--skip-existing`` (`#332 `_) + +2.0.0 (2019-09-24) +------------------ + +- *Feature* Twine now requires Python 3.6 or later. Use pip 9 or pin to "twine<2" to install twine on older Python versions. (`#437 `_) +- *Bugfix* Require requests 2.20 or later to avoid reported security vulnerabilities in earlier releases. (`#491 `_) + +1.15.0 (2019-09-17) +------------------- + +- *Feature* Improved output on ``check`` command: Prints a message when there are no distributions given to check. Improved handling of errors in a distribution's markup, avoiding messages flowing through to the next distribution's errors. (`#488 `_) + +1.14.0 (2019-09-06) +------------------- + +- *Feature* Show Warehouse URL after uploading a package (`#459 `_) +- *Feature* Better error handling and gpg2 fallback if gpg not available. (`#456 `_) +- *Feature* Now provide a more meaningful error on redirect during upload. (`#310 `_) +- *Bugfix* Fail more gracefully when encountering bad metadata (`#341 `_) + +1.13.0 (2019-02-13) +------------------- + +- *Feature* Add disable_progress_bar option to disable tqdm. (`#427 `_) +- *Feature* Allow defining an empty username and password in .pypirc. (`#426 `_) +- *Feature* Support keyring.get_credential. (`#419 `_) +- *Feature* Support keyring.get_username_and_password. (`#418 `_) +- *Feature* Add Python 3.7 to classifiers. (`#416 `_) +- *Bugfix* Restore prompts while retaining support for suppressing prompts. (`#452 `_) +- *Bugfix* Avoid requests-toolbelt to 0.9.0 to prevent attempting to use openssl when it isn't available. (`#447 `_) +- *Bugfix* Use io.StringIO instead of StringIO. (`#444 `_) +- *Bugfix* Only install pyblake2 if needed. (`#441 `_) +- *Bugfix* Use modern Python language features. (`#436 `_) +- *Bugfix* Specify python_requires in setup.py (`#435 `_) +- *Bugfix* Use https URLs everywhere. (`#432 `_) +- *Bugfix* Fix --skip-existing for Nexus Repos. (`#428 `_) +- *Bugfix* Remove unnecessary usage of readme_render.markdown. (`#421 `_) +- *Bugfix* Don't crash if there's no package description. (`#412 `_) +- *Bugfix* Fix keyring support. (`#408 `_) +- *Misc* Refactor tox env and travis config. (`#439 `_) + +1.12.1 (2018-09-24) +------------------- + +- *Bugfix* Fix regression with upload exit code (`#404 `_) + +1.12.0 (2018-09-24) +------------------- + +- *Feature* Add ``twine check`` command to check long description (`#395 `_) +- *Feature* Drop support for Python 3.3 (`#392 `_) +- *Feature* Empower ``--skip-existing`` for Artifactory repositories (`#363 `_) +- *Bugfix* Avoid MD5 when Python is compiled in FIPS mode (`#367 `_) + +1.11.0 (2018-03-19) +------------------- + +- *Feature* Remove PyPI as default ``register`` package index. (`#320 `_) +- *Feature* Support Metadata 2.1 (:pep:`566`), including Markdown for ``description`` fields. (`#319 `_) +- *Bugfix* Raise exception if attempting upload to deprecated legacy PyPI URLs. (`#322 `_) +- *Bugfix* Avoid uploading to PyPI when given alternate repository URL, and require ``http://`` or ``https://`` in ``repository_url``. (`#269 `_) +- *Misc* `Update PyPI URLs `_. (`#318 `_) +- *Misc* Add new maintainer, release checklists. (`#314 `_) +- *Misc* Add instructions on how to use keyring. (`#277 `_) + +1.10.0 (2018-03-07) +------------------- + +- *Feature* Link to changelog from ``README`` (`#46 `_) +- *Feature* Reorganize & improve user & developer documentation. (`#304 `_) +- *Feature* Revise docs predicting future of ``twine`` (`#303 `_) +- *Feature* Add architecture overview to docs (`#296 `_) +- *Feature* Add doc building instructions (`#295 `_) +- *Feature* Declare support for Python 3.6 (`#257 `_) +- *Feature* Improve progressbar (`#256 `_) +- *Bugfix* Degrade gracefully when keyring is unavailable (`#315 `_) +- *Bugfix* Fix changelog formatting (`#299 `_) +- *Bugfix* Fix syntax highlighting in ``README`` (`#298 `_) +- *Bugfix* Fix Read the Docs, tox, Travis configuration (`#297 `_) +- *Bugfix* Fix Travis CI and test configuration (`#286 `_) +- *Bugfix* Print progress to ``stdout``, not ``stderr`` (`#268 `_) +- *Bugfix* Fix ``--repository[-url]`` help text (`#265 `_) +- *Bugfix* Remove obsolete registration guidance (`#200 `_) + +1.9.1 (2017-05-27) +------------------ + +- *Bugfix* Blacklist known bad versions of Requests. (`#253 `_) + +1.9.0 (2017-05-22) +------------------ + +- *Bugfix* Twine sends less information about the user's system in the User-Agent string. (`#229 `_) +- *Bugfix* Fix ``--skip-existing`` when used to upload a package for the first time. (`#220 `_) +- *Bugfix* Fix precedence of ``--repository-url`` over ``--repository``. (`#206 `_) +- *Misc* Twine will now resolve passwords using the `keyring `_ if available. Module can be required with the ``keyring`` extra. +- *Misc* Twine will use ``hashlib.blake2b`` on Python 3.6+ instead of using pyblake2 for Blake2 hashes 256 bit hashes. + +1.8.1 (2016-08-09) +------------------ + +- *Misc* Check if a package exists if the URL is one of: * ``https://pypi.python.org/pypi/`` * ``https://upload.pypi.org/`` @@ -131,67 +143,74 @@ Changelog This helps people with ``https://upload.pypi.io`` still in their :file:`.pypirc` file. -* :release:`1.8.0 <2016-08-08>` -* :feature:`201` Switch from upload.pypi.io to upload.pypi.org. -* :feature:`144` Retrieve configuration from the environment as a default. + +1.8.0 (2016-08-08) +------------------ + +- *Feature* Switch from upload.pypi.io to upload.pypi.org. (`#201 `_) +- *Feature* Retrieve configuration from the environment as a default. (`#144 `_) * Repository URL will default to ``TWINE_REPOSITORY`` * Username will default to ``TWINE_USERNAME`` * Password will default to ``TWINE_PASSWORD`` -* :feature:`166` Allow the Repository URL to be provided on the - command-line (``--repository-url``) or via an environment variable - (``TWINE_REPOSITORY_URL``). -* :support:`-` Generate SHA256 digest for all packages - by default. -* :feature:`171` Generate Blake2b 256 digests for packages *if* ``pyblake2`` - is installed. Users can use ``python -m pip install twine[with-blake2]`` - to have ``pyblake2`` installed with Twine. -* :support:`-` Stop testing on Python 2.6. 2.6 support will be "best - effort" until 2.0.0 -* :support:`-` Warn users if they receive a 500 error when uploading - to ``*pypi.python.org`` -* :release:`1.7.4 <2016-07-09>` -* :bug:`-` Correct a packaging error. -* :release:`1.7.3 <2016-07-08>` -* :bug:`195` Fix uploads to instances of pypiserver using - ``--skip-existing``. We were not properly checking the return - status code on the response after attempting an upload. -* :support:`-` Do not generate traffic to Legacy PyPI unless we're - uploading to it or uploading to Warehouse (e.g., pypi.io). This - avoids the attempt to upload a package to the index if we can find - it on Legacy PyPI already. -* :release:`1.7.2 <2016-07-05>` -* :bug:`189`, :bug:`191` Fix issue where we were checking the existence of - packages even if the user didn't specify ``--skip-existing``. -* :release:`1.7.1 <2016-07-05>` -* :bug:`187` Clint was not specified in the wheel metadata as a dependency. -* :release:`1.7.0 <2016-07-04>` -* :feature:`142` Support ``--cert`` and ``--client-cert`` command-line flags - and config file options for feature parity with pip. This allows users to - verify connections to servers other than PyPI (e.g., local package - repositories) with different certificates. -* :feature:`152` Add progress bar to uploads. -* :feature:`162` Allow ``--skip-existing`` to work for 409 status codes. -* :feature:`167` Implement retries when the CDN in front of PyPI gives us a - 5xx error. -* :feature:`177` Switch Twine to upload to pypi.io instead of - pypi.python.org. -* :bug:`186 major` Allow passwords to have ``%``\ s in them. -* :release:`1.6.5 <2015-12-16>` -* :bug:`155` Bump requests-toolbelt version to ensure we avoid - ConnectionErrors -* :release:`1.6.4 <2015-10-27>` -* :bug:`145` Paths with hyphens in them break the Wheel regular expression. -* :bug:`146` Exception while accessing the ``repository`` key (sic) - when raising a redirect exception. -* :release:`1.6.3 <2015-10-05>` -* :bug:`137`, :bug:`140` Uploading signatures was broken due to the pull - request that added large file support via ``requests-toolbelt``. This - caused a 500 error on PyPI and prevented package and signature upload in - twine 1.6.0 -* :release:`1.6.2 <2015-09-28>` -* :bug:`132` Upload signatures with packages appropriately +- *Feature* Allow the Repository URL to be provided on the command-line (``--repository-url``) or via an environment variable (``TWINE_REPOSITORY_URL``). (`#166 `_) +- *Feature* Generate Blake2b 256 digests for packages *if* ``pyblake2`` is installed. Users can use ``python -m pip install twine[with-blake2]`` to have ``pyblake2`` installed with Twine. (`#171 `_) +- *Misc* Generate SHA256 digest for all packages by default. +- *Misc* Stop testing on Python 2.6. 2.6 support will be "best effort" until 2.0.0 +- *Misc* Warn users if they receive a 500 error when uploading to ``*pypi.python.org`` + +1.7.4 (2016-07-09) +------------------ + +- *Bugfix* Correct a packaging error. + +1.7.3 (2016-07-08) +------------------ + +- *Bugfix* Fix uploads to instances of pypiserver using ``--skip-existing``. We were not properly checking the return status code on the response after attempting an upload. (`#195 `_) +- *Misc* Do not generate traffic to Legacy PyPI unless we're uploading to it or uploading to Warehouse (e.g., pypi.io). This avoids the attempt to upload a package to the index if we can find it on Legacy PyPI already. + +1.7.2 (2016-07-05) +------------------ + +- *Bugfix* Fix issue where we were checking the existence of packages even if the user didn't specify ``--skip-existing``. (`#189 `_) (`#191 `_) + +1.7.1 (2016-07-05) +------------------ + +- *Bugfix* Clint was not specified in the wheel metadata as a dependency. (`#187 `_) + +1.7.0 (2016-07-04) +------------------ + +- *Feature* Support ``--cert`` and ``--client-cert`` command-line flags and config file options for feature parity with pip. This allows users to verify connections to servers other than PyPI (e.g., local package repositories) with different certificates. (`#142 `_) +- *Feature* Add progress bar to uploads. (`#152 `_) +- *Feature* Allow ``--skip-existing`` to work for 409 status codes. (`#162 `_) +- *Feature* Implement retries when the CDN in front of PyPI gives us a 5xx error. (`#167 `_) +- *Feature* Switch Twine to upload to pypi.io instead of pypi.python.org. (`#177 `_) +- *Bugfix* Allow passwords to have ``%``\ s in them. (`#186 `_) + +1.6.5 (2015-12-16) +------------------ + +- *Bugfix* Bump requests-toolbelt version to ensure we avoid ConnectionErrors (`#155 `_) + +1.6.4 (2015-10-27) +------------------ + +- *Bugfix* Paths with hyphens in them break the Wheel regular expression. (`#145 `_) +- *Bugfix* Exception while accessing the ``repository`` key (sic) when raising a redirect exception. (`#146 `_) + +1.6.3 (2015-10-05) +------------------ + +- *Bugfix* Uploading signatures was broken due to the pull request that added large file support via ``requests-toolbelt``. This caused a 500 error on PyPI and prevented package and signature upload in twine 1.6.0 (`137`, `140`) + +1.6.2 (2015-09-28) +------------------ + +- *Bugfix* Upload signatures with packages appropriately (`#132 `_) As part of the refactor for the 1.6.0 release, we were using the wrong name to find the signature file. @@ -200,40 +219,51 @@ Changelog ``*`` is not expanded by your shell, we might also miss uploading signatures to PyPI. Both were fixed as part of this. -* :release:`1.6.1 <2015-09-18>` -* :bug:`130` Fix signing support for uploads -* :release:`1.6.0 <2015-09-14>` -* :feature:`106` Upload wheels first to PyPI -* :feature:`104` Large file support via the ``requests-toolbelt`` -* :bug:`92 major` Raise an exception on redirects -* :feature:`97` Allow the user to specify the location of their - :file:`.pypirc` -* :feature:`115` Add the ``--skip-existing`` flag to ``twine upload`` to - allow users to skip releases that already exist on PyPI. -* :bug:`114 major` Warnings triggered by pkginfo searching for - ``PKG-INFO`` files should no longer be user visible. -* :bug:`116 major` Work around problems with Windows when using - ``getpass.getpass`` -* :bug:`111 major` Provide more helpful messages if :file:`.pypirc` is - out of date. -* :feature:`8` Support registering new packages with ``twine register`` -* :release:`1.5.0 <2015-03-10>` -* :bug:`85 major` Display information about the version of setuptools installed -* :bug:`61 major` Support deprecated pypirc file format -* :feature:`29` Support commands not named "gpg" for signing -* :support:`-` Add lower-limit to requests dependency -* :release:`1.4.0 <2014-12-12>` -* :bug:`28 major` Prevent ResourceWarning from being shown -* :bug:`34 major` List registered commands in help text -* :bug:`32 major` Use ``pkg_resources`` to load registered commands -* :bug:`47 major` Fix issue uploading packages with ``_``\ s in the name -* :bug:`26 major` Add support for uploading Windows installers -* :bug:`65 major` Expand globs and check for existence of dists to upload -* :feature:`13` Parse :file:`~/.pypirc` ourselves and use - ``subprocess`` instead of the ``distutils.spawn`` module. -* :feature:`6` Switch to a git style dispatching for the commands to enable - simpler commands and programmatic invocation. -* :release:`1.3.0 <2014-03-31>` -* :feature:`-` Additional functionality. -* :release:`1.2.2 <2013-10-03>` -* :feature:`0` Basic functionality. + +1.6.1 (2015-09-18) +------------------ + +- *Bugfix* Fix signing support for uploads (`#130 `_) + +1.6.0 (2015-09-14) +------------------ + +- *Feature* Allow the user to specify the location of their :file:`.pypirc` (`#97 `_) +- *Feature* Support registering new packages with ``twine register`` (`#8 `_) +- *Feature* Add the ``--skip-existing`` flag to ``twine upload`` to allow users to skip releases that already exist on PyPI. (`#115 `_) +- *Feature* Upload wheels first to PyPI (`#106 `_) +- *Feature* Large file support via the ``requests-toolbelt`` (`#104 `_) +- *Bugfix* Raise an exception on redirects (`#92 `_) +- *Bugfix* Work around problems with Windows when using ``getpass.getpass`` (`#116 `_) +- *Bugfix* Warnings triggered by pkginfo searching for ``PKG-INFO`` files should no longer be user visible. (`#114 `_) +- *Bugfix* Provide more helpful messages if :file:`.pypirc` is out of date. (`#111 `_) + +1.5.0 (2015-03-10) +------------------ + +- *Feature* Support commands not named "gpg" for signing (`#29 `_) +- *Bugfix* Display information about the version of setuptools installed (`#85 `_) +- *Bugfix* Support deprecated pypirc file format (`#61 `_) +- *Misc* Add lower-limit to requests dependency + +1.4.0 (2014-12-12) +------------------ + +- *Feature* Switch to a git style dispatching for the commands to enable simpler commands and programmatic invocation. (`#6 `_) +- *Feature* Parse :file:`~/.pypirc` ourselves and use ``subprocess`` instead of the ``distutils.spawn`` module. (`#13 `_) +- *Bugfix* Expand globs and check for existence of dists to upload (`#65 `_) +- *Bugfix* Fix issue uploading packages with ``_``\ s in the name (`#47 `_) +- *Bugfix* List registered commands in help text (`#34 `_) +- *Bugfix* Use ``pkg_resources`` to load registered commands (`#32 `_) +- *Bugfix* Prevent ResourceWarning from being shown (`#28 `_) +- *Bugfix* Add support for uploading Windows installers (`#26 `_) + +1.3.0 (2014-03-31) +------------------ + +- *Feature* Additional functionality. + +1.2.2 (2013-10-03) +------------------ + +- *Feature* Basic functionality. From f5e7bca3d957421247aa673cdfd5d545d182564f Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 29 Nov 2020 10:21:51 -0500 Subject: [PATCH 05/15] Fix long lines --- docs/changelog.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 4f59bfd8..8fb48db9 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -129,7 +129,7 @@ Changelog - *Bugfix* Fix ``--skip-existing`` when used to upload a package for the first time. (`#220 `_) - *Bugfix* Fix precedence of ``--repository-url`` over ``--repository``. (`#206 `_) - *Misc* Twine will now resolve passwords using the `keyring `_ if available. Module can be required with the ``keyring`` extra. -- *Misc* Twine will use ``hashlib.blake2b`` on Python 3.6+ instead of using pyblake2 for Blake2 hashes 256 bit hashes. +- *Misc* Twine will use ``hashlib.blake2b`` on Python 3.6+ instead of pyblake2 1.8.1 (2016-08-09) ------------------ @@ -157,8 +157,8 @@ Changelog - *Feature* Allow the Repository URL to be provided on the command-line (``--repository-url``) or via an environment variable (``TWINE_REPOSITORY_URL``). (`#166 `_) - *Feature* Generate Blake2b 256 digests for packages *if* ``pyblake2`` is installed. Users can use ``python -m pip install twine[with-blake2]`` to have ``pyblake2`` installed with Twine. (`#171 `_) - *Misc* Generate SHA256 digest for all packages by default. -- *Misc* Stop testing on Python 2.6. 2.6 support will be "best effort" until 2.0.0 -- *Misc* Warn users if they receive a 500 error when uploading to ``*pypi.python.org`` +- *Misc* Stop testing on Python 2.6. +- *Misc* Warn users if they receive a 500 error when uploading to ``*pypi.python.org`` (`#199 `_) 1.7.4 (2016-07-09) ------------------ @@ -169,7 +169,7 @@ Changelog ------------------ - *Bugfix* Fix uploads to instances of pypiserver using ``--skip-existing``. We were not properly checking the return status code on the response after attempting an upload. (`#195 `_) -- *Misc* Do not generate traffic to Legacy PyPI unless we're uploading to it or uploading to Warehouse (e.g., pypi.io). This avoids the attempt to upload a package to the index if we can find it on Legacy PyPI already. +- *Misc* Avoid attempts to upload a package if we can find it on Legacy PyPI. 1.7.2 (2016-07-05) ------------------ @@ -205,7 +205,7 @@ Changelog 1.6.3 (2015-10-05) ------------------ -- *Bugfix* Uploading signatures was broken due to the pull request that added large file support via ``requests-toolbelt``. This caused a 500 error on PyPI and prevented package and signature upload in twine 1.6.0 (`137`, `140`) +- *Bugfix* Fix uploading signatures causing a 500 error after large file support was added. (`#137 `_, `#140 `_) 1.6.2 (2015-09-28) ------------------ From 884320be13e3bb585b670cdefdf0636c8a5e4365 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 29 Nov 2020 10:26:57 -0500 Subject: [PATCH 06/15] Add new changelog to existing changelog --- changelog.rst | 26 -------------------------- docs/changelog.rst | 2 ++ pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 27 deletions(-) delete mode 100644 changelog.rst diff --git a/changelog.rst b/changelog.rst deleted file mode 100644 index d4c4f050..00000000 --- a/changelog.rst +++ /dev/null @@ -1,26 +0,0 @@ -3.2.1.dev23+gafbf79f (2020-11-24) ---------------------------------- - -Features -^^^^^^^^ - -- Print files to be uploaded using ``upload --verbose`` (`#670 `_) -- Print configuration file location when using ``upload --verbose`` (`#675 `_) -- Print source and values of credentials when using ``upload --verbose`` (`#685 `_) -- Add support for Python 3.9 (`#708 `_) -- Turn warnings into errors when using ``check --strict`` (`#715 `_) - - -Bugfixes -^^^^^^^^ - -- Make password optional when using ``upload --client-cert`` (`#678 `_) -- Support more Nexus versions with ``upload --skip-existing`` (`#693 `_) -- Support Gitlab Enterprise with ``upload --skip-existing`` (`#698 `_) -- Show a better error message for malformed files (`#714 `_) - - -Improved Documentation -^^^^^^^^^^^^^^^^^^^^^^ - -- Adopt PSF code of conduct (`#680 `_) diff --git a/docs/changelog.rst b/docs/changelog.rst index 8fb48db9..de9d4b9a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,8 @@ Changelog ========= +.. towncrier release notes start + 3.2.0 (2020-06-24) ------------------ diff --git a/pyproject.toml b/pyproject.toml index 59a995d0..21b5d297 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta:__legacy__" [tool.towncrier] package = "twine" -filename = "changelog.rst" +filename = "docs/changelog.rst" directory = "changelog" title_format = "{version} ({project_date})" issue_format = "`#{issue} `_" From cf741c5d0e8e34ade7316819e44a79ad15576e61 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 29 Nov 2020 10:28:42 -0500 Subject: [PATCH 07/15] Generate example changelog entry --- docs/changelog.rst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index de9d4b9a..a79eba56 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,34 @@ Changelog .. towncrier release notes start +3.2.1.dev28+g0c6ff22.d20201129 (2020-11-29) +------------------------------------------- + +Features +^^^^^^^^ + +- Print files to be uploaded using ``upload --verbose`` (`#670 `_) +- Print configuration file location when using ``upload --verbose`` (`#675 `_) +- Print source and values of credentials when using ``upload --verbose`` (`#685 `_) +- Add support for Python 3.9 (`#708 `_) +- Turn warnings into errors when using ``check --strict`` (`#715 `_) + + +Bugfixes +^^^^^^^^ + +- Make password optional when using ``upload --client-cert`` (`#678 `_) +- Support more Nexus versions with ``upload --skip-existing`` (`#693 `_) +- Support Gitlab Enterprise with ``upload --skip-existing`` (`#698 `_) +- Show a better error message for malformed files (`#714 `_) + + +Improved Documentation +^^^^^^^^^^^^^^^^^^^^^^ + +- Adopt PSF code of conduct (`#680 `_) + + 3.2.0 (2020-06-24) ------------------ From edd44f9fa2a9a5c87461da6079c3e1618932bece Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 29 Nov 2020 10:52:47 -0500 Subject: [PATCH 08/15] Group entries by type --- docs/changelog.rst | 407 +++++++++++++++++++++++++++++++-------------- 1 file changed, 286 insertions(+), 121 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index a79eba56..21c5522c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -35,136 +35,225 @@ Improved Documentation 3.2.0 (2020-06-24) ------------------ -- *Feature* Improve display of HTTP errors during upload (`#666 `_) -- *Feature* Print packages and signatures to be uploaded when using ``--verbose`` option (`#652 `_) -- *Feature* Use red text when printing errors on the command line (`#649 `_) -- *Feature* Require repository URL scheme to be ``http`` or ``https`` (`#602 `_) -- *Feature* Add type annotations, checked with mypy, with :pep:`561` support for users of Twine's API (`#231 `_) -- *Bugfix* Update URL to ``.pypirc`` specification (`#655 `_) -- *Bugfix* Don't raise an exception when Python version can't be parsed from filename (`#612 `_) -- *Bugfix* Fix inaccurate retry message during ``upload`` (`#611 `_) -- *Bugfix* Clarify error messages for archive format (`#601 `_) +Features +^^^^^^^^ + +- Improve display of HTTP errors during upload (`#666 `_) +- Print packages and signatures to be uploaded when using ``--verbose`` option (`#652 `_) +- Use red text when printing errors on the command line (`#649 `_) +- Require repository URL scheme to be ``http`` or ``https`` (`#602 `_) +- Add type annotations, checked with mypy, with :pep:`561` support for users of Twine's API (`#231 `_) + +Bugfixes +^^^^^^^^ + +- Update URL to ``.pypirc`` specification (`#655 `_) +- Don't raise an exception when Python version can't be parsed from filename (`#612 `_) +- Fix inaccurate retry message during ``upload`` (`#611 `_) +- Clarify error messages for archive format (`#601 `_) 3.1.1 (2019-11-27) ------------------ -- *Bugfix* Restore ``--non-interactive`` as a flag not expecting an argument. (`#548 `_) +Bugfixes +^^^^^^^^ + +- Restore ``--non-interactive`` as a flag not expecting an argument. (`#548 `_) 3.1.0 (2019-11-23) ------------------ -- *Feature* Add support for specifying ``--non-interactive`` as an environment variable. (`#547 `_) +Features +^^^^^^^^ + +- Add support for specifying ``--non-interactive`` as an environment variable. (`#547 `_) 3.0.0 (2019-11-18) ------------------ -- *Feature* When a client certificate is indicated, all password processing is disabled. (`#336 `_) -- *Feature* Add ``--non-interactive`` flag to abort upload rather than interactively prompt if credentials are missing. (`#489 `_) -- *Feature* Twine now unconditionally requires the keyring library and no longer supports uninstalling ``keyring`` as a means to disable that functionality. Instead, use ``keyring --disable`` keyring functionality if necessary. (`#524 `_) -- *Feature* Add Python 3.8 to classifiers. (`#518 `_) -- *Bugfix* More robust handling of server response in ``--skip-existing`` (`#332 `_) +Features +^^^^^^^^ + +- When a client certificate is indicated, all password processing is disabled. (`#336 `_) +- Add ``--non-interactive`` flag to abort upload rather than interactively prompt if credentials are missing. (`#489 `_) +- Twine now unconditionally requires the keyring library and no longer supports uninstalling ``keyring`` as a means to disable that functionality. Instead, use ``keyring --disable`` keyring functionality if necessary. (`#524 `_) +- Add Python 3.8 to classifiers. (`#518 `_) + +Bugfixes +^^^^^^^^ + +- More robust handling of server response in ``--skip-existing`` (`#332 `_) 2.0.0 (2019-09-24) ------------------ -- *Feature* Twine now requires Python 3.6 or later. Use pip 9 or pin to "twine<2" to install twine on older Python versions. (`#437 `_) -- *Bugfix* Require requests 2.20 or later to avoid reported security vulnerabilities in earlier releases. (`#491 `_) +Features +^^^^^^^^ + +- Twine now requires Python 3.6 or later. Use pip 9 or pin to "twine<2" to install twine on older Python versions. (`#437 `_) + +Bugfixes +^^^^^^^^ + +- Require requests 2.20 or later to avoid reported security vulnerabilities in earlier releases. (`#491 `_) 1.15.0 (2019-09-17) ------------------- -- *Feature* Improved output on ``check`` command: Prints a message when there are no distributions given to check. Improved handling of errors in a distribution's markup, avoiding messages flowing through to the next distribution's errors. (`#488 `_) +Features +^^^^^^^^ + +- Improved output on ``check`` command: Prints a message when there are no distributions given to check. Improved handling of errors in a distribution's markup, avoiding messages flowing through to the next distribution's errors. (`#488 `_) 1.14.0 (2019-09-06) ------------------- -- *Feature* Show Warehouse URL after uploading a package (`#459 `_) -- *Feature* Better error handling and gpg2 fallback if gpg not available. (`#456 `_) -- *Feature* Now provide a more meaningful error on redirect during upload. (`#310 `_) -- *Bugfix* Fail more gracefully when encountering bad metadata (`#341 `_) +Features +^^^^^^^^ + +- Show Warehouse URL after uploading a package (`#459 `_) +- Better error handling and gpg2 fallback if gpg not available. (`#456 `_) +- Now provide a more meaningful error on redirect during upload. (`#310 `_) + +Bugfixes +^^^^^^^^ + +- Fail more gracefully when encountering bad metadata (`#341 `_) 1.13.0 (2019-02-13) ------------------- -- *Feature* Add disable_progress_bar option to disable tqdm. (`#427 `_) -- *Feature* Allow defining an empty username and password in .pypirc. (`#426 `_) -- *Feature* Support keyring.get_credential. (`#419 `_) -- *Feature* Support keyring.get_username_and_password. (`#418 `_) -- *Feature* Add Python 3.7 to classifiers. (`#416 `_) -- *Bugfix* Restore prompts while retaining support for suppressing prompts. (`#452 `_) -- *Bugfix* Avoid requests-toolbelt to 0.9.0 to prevent attempting to use openssl when it isn't available. (`#447 `_) -- *Bugfix* Use io.StringIO instead of StringIO. (`#444 `_) -- *Bugfix* Only install pyblake2 if needed. (`#441 `_) -- *Bugfix* Use modern Python language features. (`#436 `_) -- *Bugfix* Specify python_requires in setup.py (`#435 `_) -- *Bugfix* Use https URLs everywhere. (`#432 `_) -- *Bugfix* Fix --skip-existing for Nexus Repos. (`#428 `_) -- *Bugfix* Remove unnecessary usage of readme_render.markdown. (`#421 `_) -- *Bugfix* Don't crash if there's no package description. (`#412 `_) -- *Bugfix* Fix keyring support. (`#408 `_) -- *Misc* Refactor tox env and travis config. (`#439 `_) +Features +^^^^^^^^ + +- Add disable_progress_bar option to disable tqdm. (`#427 `_) +- Allow defining an empty username and password in .pypirc. (`#426 `_) +- Support keyring.get_credential. (`#419 `_) +- Support keyring.get_username_and_password. (`#418 `_) +- Add Python 3.7 to classifiers. (`#416 `_) + +Bugfixes +^^^^^^^^ + +- Restore prompts while retaining support for suppressing prompts. (`#452 `_) +- Avoid requests-toolbelt to 0.9.0 to prevent attempting to use openssl when it isn't available. (`#447 `_) +- Use io.StringIO instead of StringIO. (`#444 `_) +- Only install pyblake2 if needed. (`#441 `_) +- Use modern Python language features. (`#436 `_) +- Specify python_requires in setup.py (`#435 `_) +- Use https URLs everywhere. (`#432 `_) +- Fix --skip-existing for Nexus Repos. (`#428 `_) +- Remove unnecessary usage of readme_render.markdown. (`#421 `_) +- Don't crash if there's no package description. (`#412 `_) +- Fix keyring support. (`#408 `_) + +Misc +^^^^ + +- Refactor tox env and travis config. (`#439 `_) 1.12.1 (2018-09-24) ------------------- -- *Bugfix* Fix regression with upload exit code (`#404 `_) +Bugfixes +^^^^^^^^ + +- Fix regression with upload exit code (`#404 `_) 1.12.0 (2018-09-24) ------------------- -- *Feature* Add ``twine check`` command to check long description (`#395 `_) -- *Feature* Drop support for Python 3.3 (`#392 `_) -- *Feature* Empower ``--skip-existing`` for Artifactory repositories (`#363 `_) -- *Bugfix* Avoid MD5 when Python is compiled in FIPS mode (`#367 `_) +Features +^^^^^^^^ + +- Add ``twine check`` command to check long description (`#395 `_) +- Drop support for Python 3.3 (`#392 `_) +- Empower ``--skip-existing`` for Artifactory repositories (`#363 `_) + +Bugfixes +^^^^^^^^ + +- Avoid MD5 when Python is compiled in FIPS mode (`#367 `_) 1.11.0 (2018-03-19) ------------------- -- *Feature* Remove PyPI as default ``register`` package index. (`#320 `_) -- *Feature* Support Metadata 2.1 (:pep:`566`), including Markdown for ``description`` fields. (`#319 `_) -- *Bugfix* Raise exception if attempting upload to deprecated legacy PyPI URLs. (`#322 `_) -- *Bugfix* Avoid uploading to PyPI when given alternate repository URL, and require ``http://`` or ``https://`` in ``repository_url``. (`#269 `_) -- *Misc* `Update PyPI URLs `_. (`#318 `_) -- *Misc* Add new maintainer, release checklists. (`#314 `_) -- *Misc* Add instructions on how to use keyring. (`#277 `_) +Features +^^^^^^^^ + +- Remove PyPI as default ``register`` package index. (`#320 `_) +- Support Metadata 2.1 (:pep:`566`), including Markdown for ``description`` fields. (`#319 `_) + +Bugfixes +^^^^^^^^ + +- Raise exception if attempting upload to deprecated legacy PyPI URLs. (`#322 `_) +- Avoid uploading to PyPI when given alternate repository URL, and require ``http://`` or ``https://`` in ``repository_url``. (`#269 `_) + +Misc +^^^^ + +- `Update PyPI URLs `_. (`#318 `_) +- Add new maintainer, release checklists. (`#314 `_) +- Add instructions on how to use keyring. (`#277 `_) 1.10.0 (2018-03-07) ------------------- -- *Feature* Link to changelog from ``README`` (`#46 `_) -- *Feature* Reorganize & improve user & developer documentation. (`#304 `_) -- *Feature* Revise docs predicting future of ``twine`` (`#303 `_) -- *Feature* Add architecture overview to docs (`#296 `_) -- *Feature* Add doc building instructions (`#295 `_) -- *Feature* Declare support for Python 3.6 (`#257 `_) -- *Feature* Improve progressbar (`#256 `_) -- *Bugfix* Degrade gracefully when keyring is unavailable (`#315 `_) -- *Bugfix* Fix changelog formatting (`#299 `_) -- *Bugfix* Fix syntax highlighting in ``README`` (`#298 `_) -- *Bugfix* Fix Read the Docs, tox, Travis configuration (`#297 `_) -- *Bugfix* Fix Travis CI and test configuration (`#286 `_) -- *Bugfix* Print progress to ``stdout``, not ``stderr`` (`#268 `_) -- *Bugfix* Fix ``--repository[-url]`` help text (`#265 `_) -- *Bugfix* Remove obsolete registration guidance (`#200 `_) +Features +^^^^^^^^ + +- Link to changelog from ``README`` (`#46 `_) +- Reorganize & improve user & developer documentation. (`#304 `_) +- Revise docs predicting future of ``twine`` (`#303 `_) +- Add architecture overview to docs (`#296 `_) +- Add doc building instructions (`#295 `_) +- Declare support for Python 3.6 (`#257 `_) +- Improve progressbar (`#256 `_) + +Bugfixes +^^^^^^^^ + +- Degrade gracefully when keyring is unavailable (`#315 `_) +- Fix changelog formatting (`#299 `_) +- Fix syntax highlighting in ``README`` (`#298 `_) +- Fix Read the Docs, tox, Travis configuration (`#297 `_) +- Fix Travis CI and test configuration (`#286 `_) +- Print progress to ``stdout``, not ``stderr`` (`#268 `_) +- Fix ``--repository[-url]`` help text (`#265 `_) +- Remove obsolete registration guidance (`#200 `_) 1.9.1 (2017-05-27) ------------------ -- *Bugfix* Blacklist known bad versions of Requests. (`#253 `_) +Bugfixes +^^^^^^^^ + +- Blacklist known bad versions of Requests. (`#253 `_) 1.9.0 (2017-05-22) ------------------ -- *Bugfix* Twine sends less information about the user's system in the User-Agent string. (`#229 `_) -- *Bugfix* Fix ``--skip-existing`` when used to upload a package for the first time. (`#220 `_) -- *Bugfix* Fix precedence of ``--repository-url`` over ``--repository``. (`#206 `_) -- *Misc* Twine will now resolve passwords using the `keyring `_ if available. Module can be required with the ``keyring`` extra. -- *Misc* Twine will use ``hashlib.blake2b`` on Python 3.6+ instead of pyblake2 +Bugfixes +^^^^^^^^ + +- Twine sends less information about the user's system in the User-Agent string. (`#229 `_) +- Fix ``--skip-existing`` when used to upload a package for the first time. (`#220 `_) +- Fix precedence of ``--repository-url`` over ``--repository``. (`#206 `_) + +Misc +^^^^ + +- Twine will now resolve passwords using the `keyring `_ if available. Module can be required with the ``keyring`` extra. +- Twine will use ``hashlib.blake2b`` on Python 3.6+ instead of pyblake2 1.8.1 (2016-08-09) ------------------ -- *Misc* Check if a package exists if the URL is one of: +Misc +^^^^ + +- Check if a package exists if the URL is one of: * ``https://pypi.python.org/pypi/`` * ``https://upload.pypi.org/`` @@ -177,70 +266,112 @@ Improved Documentation 1.8.0 (2016-08-08) ------------------ -- *Feature* Switch from upload.pypi.io to upload.pypi.org. (`#201 `_) -- *Feature* Retrieve configuration from the environment as a default. (`#144 `_) +Features +^^^^^^^^ + +- Switch from upload.pypi.io to upload.pypi.org. (`#201 `_) +- Retrieve configuration from the environment as a default. (`#144 `_) * Repository URL will default to ``TWINE_REPOSITORY`` * Username will default to ``TWINE_USERNAME`` * Password will default to ``TWINE_PASSWORD`` -- *Feature* Allow the Repository URL to be provided on the command-line (``--repository-url``) or via an environment variable (``TWINE_REPOSITORY_URL``). (`#166 `_) -- *Feature* Generate Blake2b 256 digests for packages *if* ``pyblake2`` is installed. Users can use ``python -m pip install twine[with-blake2]`` to have ``pyblake2`` installed with Twine. (`#171 `_) -- *Misc* Generate SHA256 digest for all packages by default. -- *Misc* Stop testing on Python 2.6. -- *Misc* Warn users if they receive a 500 error when uploading to ``*pypi.python.org`` (`#199 `_) +- Allow the Repository URL to be provided on the command-line (``--repository-url``) or via an environment variable (``TWINE_REPOSITORY_URL``). (`#166 `_) +- Generate Blake2b 256 digests for packages *if* ``pyblake2`` is installed. Users can use ``python -m pip install twine[with-blake2]`` to have ``pyblake2`` installed with Twine. (`#171 `_) + +Misc +^^^^ + +- Generate SHA256 digest for all packages by default. +- Stop testing on Python 2.6. +- Warn users if they receive a 500 error when uploading to ``*pypi.python.org`` (`#199 `_) 1.7.4 (2016-07-09) ------------------ -- *Bugfix* Correct a packaging error. +Bugfixes +^^^^^^^^ + +- Correct a packaging error. 1.7.3 (2016-07-08) ------------------ -- *Bugfix* Fix uploads to instances of pypiserver using ``--skip-existing``. We were not properly checking the return status code on the response after attempting an upload. (`#195 `_) -- *Misc* Avoid attempts to upload a package if we can find it on Legacy PyPI. +Bugfixes +^^^^^^^^ + +- Fix uploads to instances of pypiserver using ``--skip-existing``. We were not properly checking the return status code on the response after attempting an upload. (`#195 `_) + +Misc +^^^^ + +- Avoid attempts to upload a package if we can find it on Legacy PyPI. 1.7.2 (2016-07-05) ------------------ -- *Bugfix* Fix issue where we were checking the existence of packages even if the user didn't specify ``--skip-existing``. (`#189 `_) (`#191 `_) +Bugfixes +^^^^^^^^ + +- Fix issue where we were checking the existence of packages even if the user didn't specify ``--skip-existing``. (`#189 `_) (`#191 `_) 1.7.1 (2016-07-05) ------------------ -- *Bugfix* Clint was not specified in the wheel metadata as a dependency. (`#187 `_) +Bugfixes +^^^^^^^^ + +- Clint was not specified in the wheel metadata as a dependency. (`#187 `_) 1.7.0 (2016-07-04) ------------------ -- *Feature* Support ``--cert`` and ``--client-cert`` command-line flags and config file options for feature parity with pip. This allows users to verify connections to servers other than PyPI (e.g., local package repositories) with different certificates. (`#142 `_) -- *Feature* Add progress bar to uploads. (`#152 `_) -- *Feature* Allow ``--skip-existing`` to work for 409 status codes. (`#162 `_) -- *Feature* Implement retries when the CDN in front of PyPI gives us a 5xx error. (`#167 `_) -- *Feature* Switch Twine to upload to pypi.io instead of pypi.python.org. (`#177 `_) -- *Bugfix* Allow passwords to have ``%``\ s in them. (`#186 `_) +Features +^^^^^^^^ + +- Support ``--cert`` and ``--client-cert`` command-line flags and config file options for feature parity with pip. This allows users to verify connections to servers other than PyPI (e.g., local package repositories) with different certificates. (`#142 `_) +- Add progress bar to uploads. (`#152 `_) +- Allow ``--skip-existing`` to work for 409 status codes. (`#162 `_) +- Implement retries when the CDN in front of PyPI gives us a 5xx error. (`#167 `_) +- Switch Twine to upload to pypi.io instead of pypi.python.org. (`#177 `_) + +Bugfixes +^^^^^^^^ + +- Allow passwords to have ``%``\ s in them. (`#186 `_) 1.6.5 (2015-12-16) ------------------ -- *Bugfix* Bump requests-toolbelt version to ensure we avoid ConnectionErrors (`#155 `_) +Bugfixes +^^^^^^^^ + +- Bump requests-toolbelt version to ensure we avoid ConnectionErrors (`#155 `_) 1.6.4 (2015-10-27) ------------------ -- *Bugfix* Paths with hyphens in them break the Wheel regular expression. (`#145 `_) -- *Bugfix* Exception while accessing the ``repository`` key (sic) when raising a redirect exception. (`#146 `_) +Bugfixes +^^^^^^^^ + +- Paths with hyphens in them break the Wheel regular expression. (`#145 `_) +- Exception while accessing the ``repository`` key (sic) when raising a redirect exception. (`#146 `_) 1.6.3 (2015-10-05) ------------------ -- *Bugfix* Fix uploading signatures causing a 500 error after large file support was added. (`#137 `_, `#140 `_) +Bugfixes +^^^^^^^^ + +- Fix uploading signatures causing a 500 error after large file support was added. (`#137 `_, `#140 `_) 1.6.2 (2015-09-28) ------------------ -- *Bugfix* Upload signatures with packages appropriately (`#132 `_) +Bugfixes +^^^^^^^^ + +- Upload signatures with packages appropriately (`#132 `_) As part of the refactor for the 1.6.0 release, we were using the wrong name to find the signature file. @@ -253,47 +384,81 @@ Improved Documentation 1.6.1 (2015-09-18) ------------------ -- *Bugfix* Fix signing support for uploads (`#130 `_) +Bugfixes +^^^^^^^^ + +- Fix signing support for uploads (`#130 `_) 1.6.0 (2015-09-14) ------------------ -- *Feature* Allow the user to specify the location of their :file:`.pypirc` (`#97 `_) -- *Feature* Support registering new packages with ``twine register`` (`#8 `_) -- *Feature* Add the ``--skip-existing`` flag to ``twine upload`` to allow users to skip releases that already exist on PyPI. (`#115 `_) -- *Feature* Upload wheels first to PyPI (`#106 `_) -- *Feature* Large file support via the ``requests-toolbelt`` (`#104 `_) -- *Bugfix* Raise an exception on redirects (`#92 `_) -- *Bugfix* Work around problems with Windows when using ``getpass.getpass`` (`#116 `_) -- *Bugfix* Warnings triggered by pkginfo searching for ``PKG-INFO`` files should no longer be user visible. (`#114 `_) -- *Bugfix* Provide more helpful messages if :file:`.pypirc` is out of date. (`#111 `_) +Features +^^^^^^^^ + +- Allow the user to specify the location of their :file:`.pypirc` (`#97 `_) +- Support registering new packages with ``twine register`` (`#8 `_) +- Add the ``--skip-existing`` flag to ``twine upload`` to allow users to skip releases that already exist on PyPI. (`#115 `_) +- Upload wheels first to PyPI (`#106 `_) +- Large file support via the ``requests-toolbelt`` (`#104 `_) + +Bugfixes +^^^^^^^^ + +- Raise an exception on redirects (`#92 `_) +- Work around problems with Windows when using ``getpass.getpass`` (`#116 `_) +- Warnings triggered by pkginfo searching for ``PKG-INFO`` files should no longer be user visible. (`#114 `_) +- Provide more helpful messages if :file:`.pypirc` is out of date. (`#111 `_) 1.5.0 (2015-03-10) ------------------ -- *Feature* Support commands not named "gpg" for signing (`#29 `_) -- *Bugfix* Display information about the version of setuptools installed (`#85 `_) -- *Bugfix* Support deprecated pypirc file format (`#61 `_) -- *Misc* Add lower-limit to requests dependency +Features +^^^^^^^^ + +- Support commands not named "gpg" for signing (`#29 `_) + +Bugfixes +^^^^^^^^ + +- Display information about the version of setuptools installed (`#85 `_) +- Support deprecated pypirc file format (`#61 `_) + +Misc +^^^^ + +- Add lower-limit to requests dependency 1.4.0 (2014-12-12) ------------------ -- *Feature* Switch to a git style dispatching for the commands to enable simpler commands and programmatic invocation. (`#6 `_) -- *Feature* Parse :file:`~/.pypirc` ourselves and use ``subprocess`` instead of the ``distutils.spawn`` module. (`#13 `_) -- *Bugfix* Expand globs and check for existence of dists to upload (`#65 `_) -- *Bugfix* Fix issue uploading packages with ``_``\ s in the name (`#47 `_) -- *Bugfix* List registered commands in help text (`#34 `_) -- *Bugfix* Use ``pkg_resources`` to load registered commands (`#32 `_) -- *Bugfix* Prevent ResourceWarning from being shown (`#28 `_) -- *Bugfix* Add support for uploading Windows installers (`#26 `_) +Features +^^^^^^^^ + +- Switch to a git style dispatching for the commands to enable simpler commands and programmatic invocation. (`#6 `_) +- Parse :file:`~/.pypirc` ourselves and use ``subprocess`` instead of the ``distutils.spawn`` module. (`#13 `_) + +Bugfixes +^^^^^^^^ + +- Expand globs and check for existence of dists to upload (`#65 `_) +- Fix issue uploading packages with ``_``\ s in the name (`#47 `_) +- List registered commands in help text (`#34 `_) +- Use ``pkg_resources`` to load registered commands (`#32 `_) +- Prevent ResourceWarning from being shown (`#28 `_) +- Add support for uploading Windows installers (`#26 `_) 1.3.0 (2014-03-31) ------------------ -- *Feature* Additional functionality. +Features +^^^^^^^^ + +- Additional functionality. 1.2.2 (2013-10-03) ------------------ -- *Feature* Basic functionality. +Features +^^^^^^^^ + +- Basic functionality. From f5bb951fcc6b603e60f51bdb6fe3277f3cbd509e Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 29 Nov 2020 13:48:07 -0500 Subject: [PATCH 09/15] Document SemVer --- docs/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 21c5522c..b2d45076 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,10 @@ Changelog ========= +This project follows the `semantic versioning `_ +and `pre-release versioning `_ +schemes recommended by the Python Packaging Authority. + .. towncrier release notes start 3.2.1.dev28+g0c6ff22.d20201129 (2020-11-29) From 55f4bdcff86d9b15f032b7838f6b389c0d94007e Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 29 Nov 2020 13:50:31 -0500 Subject: [PATCH 10/15] Add changelog entry --- changelog/718.doc.rst | 1 + docs/changelog.rst | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelog/718.doc.rst diff --git a/changelog/718.doc.rst b/changelog/718.doc.rst new file mode 100644 index 00000000..7609858b --- /dev/null +++ b/changelog/718.doc.rst @@ -0,0 +1 @@ +Adopt towncrier for the changleog diff --git a/docs/changelog.rst b/docs/changelog.rst index b2d45076..13806a1f 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -8,7 +8,7 @@ schemes recommended by the Python Packaging Authority. .. towncrier release notes start -3.2.1.dev28+g0c6ff22.d20201129 (2020-11-29) +3.2.1.dev32+gedd44f9.d20201129 (2020-11-29) ------------------------------------------- Features @@ -34,6 +34,7 @@ Improved Documentation ^^^^^^^^^^^^^^^^^^^^^^ - Adopt PSF code of conduct (`#680 `_) +- Adopt towncrier for the changleog (`#718 `_) 3.2.0 (2020-06-24) From 5a059590d347946abe35136d045b861aeb7394fd Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 20 Dec 2020 19:48:43 -0500 Subject: [PATCH 11/15] Remove releases from docs requirements --- docs/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 7c78e46e..303f6d72 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,4 @@ doc8>=0.8.0 readme-renderer>=17.4 -releases>=1.4.0 Sphinx>=1.7.0 sphinx_rtd_theme>=0.2.4 From f3b8590054065d421874e1f9f961d6165c794f2c Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 20 Dec 2020 19:50:58 -0500 Subject: [PATCH 12/15] Remove example changelog entry --- docs/changelog.rst | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 13806a1f..8cfad324 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -8,35 +8,6 @@ schemes recommended by the Python Packaging Authority. .. towncrier release notes start -3.2.1.dev32+gedd44f9.d20201129 (2020-11-29) -------------------------------------------- - -Features -^^^^^^^^ - -- Print files to be uploaded using ``upload --verbose`` (`#670 `_) -- Print configuration file location when using ``upload --verbose`` (`#675 `_) -- Print source and values of credentials when using ``upload --verbose`` (`#685 `_) -- Add support for Python 3.9 (`#708 `_) -- Turn warnings into errors when using ``check --strict`` (`#715 `_) - - -Bugfixes -^^^^^^^^ - -- Make password optional when using ``upload --client-cert`` (`#678 `_) -- Support more Nexus versions with ``upload --skip-existing`` (`#693 `_) -- Support Gitlab Enterprise with ``upload --skip-existing`` (`#698 `_) -- Show a better error message for malformed files (`#714 `_) - - -Improved Documentation -^^^^^^^^^^^^^^^^^^^^^^ - -- Adopt PSF code of conduct (`#680 `_) -- Adopt towncrier for the changleog (`#718 `_) - - 3.2.0 (2020-06-24) ------------------ From b792abd4fab3c9019517ba6c1f12b26e2ba79dea Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 20 Dec 2020 21:03:21 -0500 Subject: [PATCH 13/15] Add changelog instructions --- changelog/README.rst | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 changelog/README.rst diff --git a/changelog/README.rst b/changelog/README.rst new file mode 100644 index 00000000..d61d7a9e --- /dev/null +++ b/changelog/README.rst @@ -0,0 +1,42 @@ +Changelog Entries +================= + +The ``docs/changelog.rst`` file is managed using `towncrier`_, and all +non-trivial changes must be accompanied by a changelog entry. + +Adding a changelog entry +------------------------ + +First open a pull request with the change you want to make, ideally referencing +an open issue. Then, create a file in the ``changelog/`` directory named +``{number}.{type}.rst``, where ``{number}`` is the PR number, and ``{type}`` is +``feature``, ``bugfix``, ``doc``, ``removal``, or ``misc``. + +For example, if your PR number is ``1234`` and it's fixing a bug, then you +would create ``changelog/1234.bugfix.rst``. PRs can span multiple categories by +creating multiple files: if you added a feature and deprecated/removed the old +feature in one PR, you would create ``changelog/1234.feature.rst`` and +``changelog/1234.removal.rst``. + +Contents of a changelog entry +----------------------------- + +A changelog entry is meant for end users and should only contain details +relevant to them. In order to maintain a consistent style, please keep the +entry to the point, in sentence case, shorter than 80 characters, and in an +imperative tone. An entry should complete the sentence "This change will ...". +If one line is not enough, use a summary line in an imperative tone, followed +by a description of the change in one or more paragraphs, each wrapped at 80 +characters and separated by blank lines. + +You don't need to reference the pull request or issue number in a changelog +entry, since ``towncrier`` will add a link using the number in the file name, +and the pull request should reference an issue number. Similarly, you don't +need to add your name to the entry, since that will be associated with the pull +request. + +Changelog entries are rendered using `reStructuredText`_, but they should only +have minimal formatting (such as ````monospaced text````). + +.. _`towncrier`: https://pypi.org/project/towncrier/ +.. _`reStructuredText`: https://www.writethedocs.org/guide/writing/reStructuredText/ From c5c8d9b447f3084e76ae17bb2896455b15e016bf Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Sun, 20 Dec 2020 21:31:33 -0500 Subject: [PATCH 14/15] Move changelog instructions to contributing.rst --- changelog/README.rst | 42 ------------------------------------------ docs/changelog.rst | 4 ++++ docs/contributing.rst | 42 +++++++++++++++++++++++++++++++++++++++--- 3 files changed, 43 insertions(+), 45 deletions(-) delete mode 100644 changelog/README.rst diff --git a/changelog/README.rst b/changelog/README.rst deleted file mode 100644 index d61d7a9e..00000000 --- a/changelog/README.rst +++ /dev/null @@ -1,42 +0,0 @@ -Changelog Entries -================= - -The ``docs/changelog.rst`` file is managed using `towncrier`_, and all -non-trivial changes must be accompanied by a changelog entry. - -Adding a changelog entry ------------------------- - -First open a pull request with the change you want to make, ideally referencing -an open issue. Then, create a file in the ``changelog/`` directory named -``{number}.{type}.rst``, where ``{number}`` is the PR number, and ``{type}`` is -``feature``, ``bugfix``, ``doc``, ``removal``, or ``misc``. - -For example, if your PR number is ``1234`` and it's fixing a bug, then you -would create ``changelog/1234.bugfix.rst``. PRs can span multiple categories by -creating multiple files: if you added a feature and deprecated/removed the old -feature in one PR, you would create ``changelog/1234.feature.rst`` and -``changelog/1234.removal.rst``. - -Contents of a changelog entry ------------------------------ - -A changelog entry is meant for end users and should only contain details -relevant to them. In order to maintain a consistent style, please keep the -entry to the point, in sentence case, shorter than 80 characters, and in an -imperative tone. An entry should complete the sentence "This change will ...". -If one line is not enough, use a summary line in an imperative tone, followed -by a description of the change in one or more paragraphs, each wrapped at 80 -characters and separated by blank lines. - -You don't need to reference the pull request or issue number in a changelog -entry, since ``towncrier`` will add a link using the number in the file name, -and the pull request should reference an issue number. Similarly, you don't -need to add your name to the entry, since that will be associated with the pull -request. - -Changelog entries are rendered using `reStructuredText`_, but they should only -have minimal formatting (such as ````monospaced text````). - -.. _`towncrier`: https://pypi.org/project/towncrier/ -.. _`reStructuredText`: https://www.writethedocs.org/guide/writing/reStructuredText/ diff --git a/docs/changelog.rst b/docs/changelog.rst index 8cfad324..320cf22b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -6,6 +6,10 @@ This project follows the `semantic versioning `_ schemes recommended by the Python Packaging Authority. +.. Do *NOT* add changelog entries here! + This changelog is managed by towncrier and is built at release time. + See https://twine.readthedocs.io/en/latest/contributing.html#changelog-entries for details. + .. towncrier release notes start 3.2.0 (2020-06-24) diff --git a/docs/contributing.rst b/docs/contributing.rst index 85989939..466b0a31 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -130,15 +130,51 @@ and build the documentation, run: Submitting changes -^^^^^^^^^^^^^^^^^^ +------------------ 1. Fork `the GitHub repository`_. 2. Make a branch off of ``master`` and commit your changes to it. 3. Run the tests, check code style, and build the docs as described above. -4. Ensure that your name is added to the end of the :file:`AUTHORS` +4. Optionally, add your name to the end of the :file:`AUTHORS` file using the format ``Name (url)``, where the ``(url)`` portion is optional. -5. Submit a pull request to the ``master`` branch on GitHub. +5. Submit a pull request to the ``master`` branch on GitHub, referencing an + open issue. +6. Add a changelog entry. + +Changelog entries +^^^^^^^^^^^^^^^^^ + +The ``docs/changelog.rst`` file is built by `towncrier`_ from files in the +``changelog/`` directory. To add an entry, create a file in that directory +named ``{number}.{type}.rst``, where ``{number}`` is the pull request number, +and ``{type}`` is ``feature``, ``bugfix``, ``doc``, ``removal``, or ``misc``. + +For example, if your PR number is 1234 and it's fixing a bug, then you +would create ``changelog/1234.bugfix.rst``. PRs can span multiple categories by +creating multiple files: if you added a feature and deprecated/removed an old +feature in PR #5678, you would create ``changelog/5678.feature.rst`` and +``changelog/5678.removal.rst``. + +A changelog entry is meant for end users and should only contain details +relevant to them. In order to maintain a consistent style, please keep the +entry to the point, in sentence case, shorter than 80 characters, and in an +imperative tone. An entry should complete the sentence "This change will ...". +If one line is not enough, use a summary line in an imperative tone, followed +by a description of the change in one or more paragraphs, each wrapped at 80 +characters and separated by blank lines. + +You don't need to reference the pull request or issue number in a changelog +entry, since towncrier will add a link using the number in the file name, +and the pull request should reference an issue number. Similarly, you don't +need to add your name to the entry, since that will be associated with the pull +request. + +Changelog entries are rendered using `reStructuredText`_, but they should only +have minimal formatting (such as ````monospaced text````). + +.. _`towncrier`: https://pypi.org/project/towncrier/ +.. _`reStructuredText`: https://www.writethedocs.org/guide/writing/reStructuredText/ Architectural overview From 777f3b425ee63323c1615aefe2c73b9ae5a2cdb5 Mon Sep 17 00:00:00 2001 From: Brian Rutledge Date: Mon, 21 Dec 2020 06:02:30 -0500 Subject: [PATCH 15/15] Update release instructions --- docs/contributing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index 466b0a31..a3e8e064 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -232,9 +232,9 @@ Making a new release A checklist for creating, testing, and distributing a new version. -#. Add user-facing changes to :file:`docs/changelog.rst`. -#. Choose a version number, e.g. ``3.2.0``. -#. Add a ``:release:`` line to :file:`docs/changelog.rst`. +#. Choose a version number, e.g. ``3.3.0``. +#. Run ``tox -e changelog -- --version {version}`` to build + :file:`docs/changelog.rst`. #. Commit and open a pull request for review. #. Merge the pull request, and ensure the `GitHub Actions`_ build passes. #. Create a new git tag with ``git tag -m "Release v{version}" {version}``.