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

đź”– Release v10.0.1rc0 #687

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
48 changes: 48 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ env:
PRE_COMMIT_COLOR: always
PY_COLORS: 1 # Recognized by the `py` package, dependency of `pytest`
PYTHONIOENCODING: utf-8
PYTHONLEGACYWINDOWSSTDIO: 1 # Python 3.6 hack
PYTHONUTF8: 1
TOX_PARALLEL_NO_SPINNER: 1
TOX_TESTENV_PASSENV: >- # Make tox-wrapped tools see color requests
Expand Down Expand Up @@ -911,13 +912,50 @@ jobs:
3.10
- 3.9
- 3.8
- pypy-3.7
- 3.7
- 3.6
- pypy-3.6
os:
- ubuntu-22.04
- ubuntu-20.04
- macos-11.0
- macos-latest
- windows-2019
- windows-2022
exclude:
# NOTE: Windows PyPy jobs are excluded to address the tox bug
# NOTE: https://github.com/tox-dev/tox/issues/1704.
# NOTE: They should be re-added once it's fixed.
- os: windows-2022
python-version: pypy-3.6
- os: windows-2019
python-version: pypy-3.6
# NOTE: Windows PyPy 3.7 jobs are excluded because of the lack
# NOTE: of the build deps to compile cryptography.
# NOTE: They should be re-added once it's fixed.
- os: windows-2022
python-version: pypy-3.7
- os: windows-2019
python-version: pypy-3.7
# NOTE: macOS PyPy jobs are excluded because installing cryptography
# NOTE: needs openssl headers that aren't present at the moment.
# TODO: Remove the exclusions once this is addressed.
- os: macOS-11.0
python-version: pypy-3.6
- os: macos-latest
python-version: pypy-3.6
- os: macos-11.0
python-version: pypy-3.7
- os: macos-latest
python-version: pypy-3.7
# NOTE: Ubuntu 22.04 PyPy 3.6 jobs are excluded because importing
# NOTE: cryptography crashes in that env at the moment.
- os: ubuntu-22.04
python-version: pypy-3.6
# NOTE: Python 3.6 is not available for Ubuntu 22.04
- os: ubuntu-22.04
python-version: 3.6

continue-on-error: >-
${{
Expand Down Expand Up @@ -1021,6 +1059,16 @@ jobs:
--user
'${{ env.TOX_VERSION }}'

- name: Patch tox.ini for Python 3.6 under Windows
if: >-
runner.os == 'Windows'
&& matrix.python-version == '3.6'
run: >-
sed -i
's/^package_env\(\s\)\?=.*/package_env = py36-win-dummy/g'
tox.ini
shell: bash

- name: Download all the dists
uses: actions/download-artifact@v3
with:
Expand Down
1 change: 0 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ version: 2
sphinx:
builder: dirhtml
configuration: docs/conf.py
fail_on_warning: true

# Build documentation with MkDocs
# mkdocs:
Expand Down
161 changes: 161 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,167 @@ Changelog

.. towncrier release notes start

v10.0.1rc0
==========

*(2024-04-17)*


Bug fixes
---------

- Fixed a flaw where internally unhandled exceptions
could crash the worker threads and eventually starve
the server of its processing resources. It is no
longer and issue and the unhandled errors are now
logged and suppressed except for a few expected
exceptions that are used for normal interruption
requests.

-- by :user:`cameronbrunner` and :user:`webknjaz`

*Related issues and pull requests on GitHub:*
:issue:`310`, :issue:`346`, :issue:`354`, :issue:`358`, :issue:`365`, :issue:`375`, :issue:`599`, :issue:`641`, :issue:`649`.

- Fixed compatibility with Python 3.8 in the built-in
TLS adapter that relies on :py:mod:`python:ssl`.

Modern Python versions communicate specialized exceptions
:py:exc:`ssl.SSLEOFError` and :py:exc:`ssl.SSLZeroReturnError`
where the older versions errored out in a very generic way.

-- by :user:`toppk` and :user:`webknjaz`

*Related issues and pull requests on GitHub:*
:issue:`517`, :issue:`518`.


Packaging updates and notes for downstreams
-------------------------------------------

- Started signing the package distribution artifacts in CI/CD
with Sigstore and uploading them to GitHub Releases
-- by :user:`webknjaz`.

*Related commits on GitHub:*
:commit:`27a3c944`, :commit:`c45f184e`.

- The changelog management is now implemented through
the :std:doc:`Towncrier <towncrier:index>` tool
-- by :user:`webknjaz`.

The contributors are now expected to :std:ref:`include
change log fragment files in their pull requests
<adding change notes with your prs>`.

These news snippets can link one or more issues or pull
requests, and be of one or more of the following categories:

* ``bugfix``: A bug fix for something we deemed an improper undesired
behavior that got corrected in the release to match pre-agreed
expectations.
* ``feature``: A new behavior, public APIs. That sort of stuff.
* ``deprecation``: A declaration of future API removals and breaking
changes in behavior.
* ``breaking``: When something public gets removed in a breaking way.
Could be deprecated in an earlier release.
* ``doc``: Notable updates to the documentation structure or build
process.
* ``packaging``: Notes for downstreams about unobvious side effects
and tooling. Changes in the test invocation considerations and
runtime assumptions.
* ``contrib``: Stuff that affects the contributor experience. e.g.
Running tests, building the docs, setting up the development
environment.
* ``misc``: Changes that are hard to assign to any of the above
categories.

*Related issues and pull requests on GitHub:*
:issue:`654`.


Contributor-facing changes
--------------------------

- Started type-checking the project with MyPy against a
range of versions instead of just one — Python 3.8–3.12
-- by :user:`webknjaz`.

*Related commits on GitHub:*
:commit:`4fa1e663`, :commit:`676edc4e`, :commit:`be9dbc41`.

- The project how has a :file:`.git-blame-ignore-revs` letting
GitHub know which auto-formatting revisions to ignore. It is
also possible to integrate it locally, if one wants to do so.

-- by :user:`webknjaz`

*Related commits on GitHub:*
:commit:`5980a3fb`, :commit:`f8a1cc4d`.

- The project adopted the ``autopep8`` tool to assist with
automatic code formatting. It is chosen over ``black``
because it is less intrusive which is important to the
maintainer as it promotes inclusivity.
``autopep8`` is integrated into the ``pre-commit`` check
runner and is configured to only correct :pep:`8`
violations, avoiding changes to compliant snippets.

-- by :user:`webknjaz`

*Related commits on GitHub:*
:commit:`65ba7e69`.

- The continuous integration and pull request merges have been
set up to only merge pull requests through merge queues
-- by :user:`webknjaz`.

*Related commits on GitHub:*
:commit:`a7149e0c`.

- Documented the upgraded :std:doc:`release process
<contributing/release_guide>` -- by :user:`webknjaz`.

*Related commits on GitHub:*
:commit:`df0d1a08`.

- The changelog management is now implemented through
the :std:doc:`Towncrier <towncrier:index>` tool
-- by :user:`webknjaz`.

The contributors are now expected to :std:ref:`include
change log fragment files in their pull requests
<adding change notes with your prs>`.

These news snippets can link one or more issues or pull
requests, and be of one or more of the following categories:

* ``bugfix``: A bug fix for something we deemed an improper undesired
behavior that got corrected in the release to match pre-agreed
expectations.
* ``feature``: A new behavior, public APIs. That sort of stuff.
* ``deprecation``: A declaration of future API removals and breaking
changes in behavior.
* ``breaking``: When something public gets removed in a breaking way.
Could be deprecated in an earlier release.
* ``doc``: Notable updates to the documentation structure or build
process.
* ``packaging``: Notes for downstreams about unobvious side effects
and tooling. Changes in the test invocation considerations and
runtime assumptions.
* ``contrib``: Stuff that affects the contributor experience. e.g.
Running tests, building the docs, setting up the development
environment.
* ``misc``: Changes that are hard to assign to any of the above
categories.

*Related issues and pull requests on GitHub:*
:issue:`654`.


----


v10.0.0
=======

Expand Down
22 changes: 18 additions & 4 deletions cheroot/test/test_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import errno
from re import match as _matches_pattern
import socket
import sys
import time
import logging
import traceback as traceback_
Expand All @@ -18,6 +19,7 @@
import cheroot.server


IS_PY36 = sys.version_info[:2] == (3, 6)
IS_SLOW_ENV = IS_MACOS or IS_WINDOWS


Expand Down Expand Up @@ -738,7 +740,7 @@ def _read_request_line(self):
(
logging.CRITICAL,
r'A fatal exception happened\. Setting the server interrupt flag '
r'to ConnectionResetError\(666\) and giving up\.\n\nPlease, '
r'to ConnectionResetError\(666,?\) and giving up\.\n\nPlease, '
'report this on the Cheroot tracker at '
r'<https://github\.com/cherrypy/cheroot/issues/new/choose>, '
'providing a full reproducer with as much context and details '
Expand Down Expand Up @@ -786,7 +788,7 @@ def _trigger_kb_intr(_req, _resp):
(
logging.DEBUG,
'^Setting the server interrupt flag to KeyboardInterrupt'
r"\('simulated test handler keyboard interrupt'\)$",
r"\('simulated test handler keyboard interrupt',?\)$",
),
(
logging.INFO,
Expand All @@ -806,6 +808,12 @@ def _trigger_kb_intr(_req, _resp):
)


@pytest.mark.xfail(
IS_CI and IS_PYPY and IS_PY36 and not IS_SLOW_ENV,
reason='Fails under PyPy 3.6 under Ubuntu 20.04 in CI for unknown reason',
# NOTE: Actually covers any Linux
strict=False,
)
def test_unhandled_exception_in_request_handler(
mocker,
monkeypatch,
Expand Down Expand Up @@ -855,7 +863,7 @@ def _trigger_scary_exc(_req, _resp):
logging.ERROR,
'^Unhandled error while processing an incoming connection '
'SillyMistake'
r"\('simulated unhandled exception đź’Ł in test handler'\)$",
r"\('simulated unhandled exception đź’Ł in test handler',?\)$",
),
(
logging.INFO,
Expand All @@ -875,6 +883,12 @@ def _trigger_scary_exc(_req, _resp):
)


@pytest.mark.xfail(
IS_CI and IS_PYPY and IS_PY36 and not IS_SLOW_ENV,
reason='Fails under PyPy 3.6 under Ubuntu 20.04 in CI for unknown reason',
# NOTE: Actually covers any Linux
strict=False,
)
def test_remains_alive_post_unhandled_exception(
mocker,
monkeypatch,
Expand Down Expand Up @@ -938,7 +952,7 @@ def _read_request_line(self):
(
logging.ERROR,
'^Unhandled error while processing an incoming connection '
r'ScaryCrash\(666\)$',
r'ScaryCrash\(666,?\)$',
),
(
logging.INFO,
Expand Down
3 changes: 0 additions & 3 deletions docs/changelog-fragments.d/27a3c944.packaging.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/310.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/346.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/354.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/358.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/365.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/375.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/4fa1e663.contrib.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/517.bugfix.rst

This file was deleted.

8 changes: 0 additions & 8 deletions docs/changelog-fragments.d/518.bugfix.rst

This file was deleted.

4 changes: 0 additions & 4 deletions docs/changelog-fragments.d/565.breaking.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/changelog-fragments.d/5980a3fb.contrib.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/599.bugfix.rst

This file was deleted.

6 changes: 0 additions & 6 deletions docs/changelog-fragments.d/628.packaging.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/633.breaking.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/changelog-fragments.d/641.bugfix.rst

This file was deleted.

Loading