Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup deployment #622

Merged
merged 5 commits into from
Oct 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions CHANGES/.TEMPLATE.rst

This file was deleted.

1 change: 1 addition & 0 deletions CHANGES/622.feature.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added support Python 3.10
asvetlov marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions CHANGES/622.feature.2.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes.
1 change: 1 addition & 0 deletions CHANGES/622.feature.3.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes.Started shipping platform-specific arm64 wheels for Apple Silicon.
asvetlov marked this conversation as resolved.
Show resolved Hide resolved
86 changes: 86 additions & 0 deletions CHANGES/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
.. _Adding change notes with your PRs:

Adding change notes with your PRs
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It is very important to maintain a log for news of how
updating to the new version of the software will affect
end-users. This is why we enforce collection of the change
fragment files in pull requests as per `Towncrier philosophy`_.

The idea is that when somebody makes a change, they must record
the bits that would affect end-users only including information
that would be useful to them. Then, when the maintainers publish
a new release, they'll automatically use these records to compose
a change log for the respective version. It is important to
understand that including unnecessary low-level implementation
related details generates noise that is not particularly useful
to the end-users most of the time. And so such details should be
recorded in the Git history rather than a changelog.

Alright! So how to add a news fragment?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

``multidict`` uses `towncrier <https://pypi.org/project/towncrier/>`_
asvetlov marked this conversation as resolved.
Show resolved Hide resolved
for changelog management.
To submit a change note about your PR, add a text file into the
``CHANGES/`` folder. It should contain an
explanation of what applying this PR will change in the way
end-users interact with the project. One sentence is usually
enough but feel free to add as many details as you feel necessary
for the users to understand what it means.

**Use the past tense** for the text in your fragment because,
combined with others, it will be a part of the "news digest"
telling the readers **what changed** in a specific version of
the library *since the previous version*. You should also use
reStructuredText syntax for highlighting code (inline or block),
linking parts of the docs or external sites.

Finally, name your file following the convention that Towncrier
understands: it should start with the number of an issue or a
PR followed by a dot, then add a patch type, like ``feature``,
``doc``, ``misc`` etc., and add ``.rst`` as a suffix. If you
need to add more than one fragment, you may add an optional
sequence number (delimited with another period) between the type
and the suffix.

In general the name will follow ``<pr_number>.<category>.rst`` pattern,
where the categories are:

- ``feature``: Any new feature
- ``bugfix``: A bug fix
- ``doc``: A change to the documentation
- ``misc``: Changes internal to the repo like CI, test and build changes
- ``removal``: For deprecations and removals of an existing feature or behavior

A pull request may have more than one of these components, for example
a code change may introduce a new feature that deprecates an old
feature, in which case two fragments should be added. It is not
necessary to make a separate documentation fragment for documentation
changes accompanying the relevant code changes.

Examples for adding changelog entries to your Pull Requests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File :file:`CHANGES/603.removal.1.rst`:

.. code-block:: rst

Droped Python 3.5 support; Python 3.6 is the minimal supported Python version.

File :file:`CHANGES/550.bugfix.rst`:

.. code-block:: rst

Started shipping Windows wheels for the x86 architecture.

File :file:`CHANGES/553.feature.rst`:

.. code-block:: rst

Added support for ``GenericAliases`` (``MultiDict[str]``) under Python 3.9 and higher.


.. _Towncrier philosophy:
https://towncrier.readthedocs.io/en/actual-freaking-docs/#philosophy
11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
[build-system]
requires = ["setuptools>=40", "wheel"]

[tool.towncrier]
package = "yarl"
filename = "CHANGES.rst"
directory = "CHANGES/"
title_format = "{version} ({project_date})"
template = "CHANGES/.TEMPLATE.rst"
issue_format = "`#{issue} <https://github.com/aio-libs/yarl/issues/{issue}>`_"


[tool.cibuildwheel]
test-requires = "-r requirements/ci.txt"
test-command = "pytest {project}/tests"
# don't build PyPy wheels, install from source instead
skip = "pp*"