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

Revert "Merge pull request #633 from cherrypy/debt/drop-py37" #686

Closed
wants to merge 7 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
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
4 changes: 0 additions & 4 deletions docs/changelog-fragments.d/565.breaking.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: 1 addition & 0 deletions requirements/tox-py36-cp36-darwin-x86_64.in
151 changes: 151 additions & 0 deletions requirements/tox-py36-cp36-darwin-x86_64.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
#
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
#
# pip-compile --allow-unsafe --output-file=requirements/tox-py36-cp36-darwin-x86_64.txt --strip-extras requirements/tox-py36-cp36-darwin-x86_64.in setup.cfg
#
attrs==22.2.0
# via pytest
certifi==2022.12.7
# via requests
cffi==1.15.1
# via cryptography
chardet==4.0.0
# via requests
charset-normalizer==2.0.12
# via requests
colorama==0.4.5
# via pytest-watch
commonmark==0.9.1
# via rich
coverage==6.2
# via
# -r requirements/tox-py36-cp36-darwin-x86_64.in
# pytest-cov
cryptography==40.0.1
# via
# pyopenssl
# trustme
dataclasses==0.8
# via rich
docopt==0.6.2
# via pytest-watch
execnet==1.9.0
# via pytest-xdist
idna==3.4
# via
# requests
# trustme
importlib-metadata==4.8.3 ; python_version < "3.8"
# via
# cheroot (setup.cfg)
# pluggy
# pytest
# pytest-rerunfailures
importlib-resources==5.4.0
# via jaraco.text
iniconfig==1.1.1
# via pytest
jaraco.context==4.1.1
# via
# -r requirements/tox-py36-cp36-darwin-x86_64.in
# jaraco.text
jaraco.functools==3.4.0
# via
# cheroot (setup.cfg)
# jaraco.text
# tempora
jaraco.text==3.7.0
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
more-itertools==8.14.0
# via
# cheroot (setup.cfg)
# jaraco.functools
packaging==21.3
# via
# pytest
# pytest-rerunfailures
# pytest-sugar
pluggy==1.0.0
# via pytest
portend==3.0.0
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pprintpp==0.4.0
# via pytest-clarity
py==1.11.0
# via
# pypytools
# pytest
# pytest-forked
pycparser==2.21
# via cffi
pygments==2.14.0
# via rich
pyopenssl==23.1.1 ; implementation_name != "pypy"
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pyparsing==3.0.9
# via packaging
pypytools==0.6.2
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pytest==6.2.5
# via
# -r requirements/tox-py36-cp36-darwin-x86_64.in
# pytest-clarity
# pytest-cov
# pytest-forked
# pytest-mock
# pytest-rerunfailures
# pytest-sugar
# pytest-watch
# pytest-xdist
pytest-clarity==1.0.1
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pytest-cov==2.12.0
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pytest-forked==1.4.0 ; sys_platform != "win32"
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pytest-mock==3.6.1
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pytest-rerunfailures==10.3
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pytest-sugar==0.9.6
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pytest-watch==4.2.0
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pytest-xdist==3.0.2
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
pytz==2023.3
# via tempora
requests==2.27.1
# via
# -r requirements/tox-py36-cp36-darwin-x86_64.in
# requests-toolbelt
# requests-unixsocket
requests-toolbelt==0.10.1
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
requests-unixsocket==0.3.0
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
rich==12.6.0
# via pytest-clarity
tempora==4.1.2
# via portend
termcolor==1.1.0
# via pytest-sugar
toml==0.10.2
# via pytest
tomli==1.2.3
# via coverage
trustme==0.9.0
# via -r requirements/tox-py36-cp36-darwin-x86_64.in
typing-extensions==4.1.1
# via
# importlib-metadata
# rich
urllib3==1.26.15
# via requests
watchdog==2.3.1
# via pytest-watch
zipp==3.6.0
# via
# importlib-metadata
# importlib-resources
1 change: 1 addition & 0 deletions requirements/tox-py36-cp36-linux-x86_64.in
Loading
Loading