Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Drop support for and remove references to EOL Python 3.6 #11683

Merged
merged 33 commits into from
Jan 21, 2022
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
caf0256
remove reference in comments to python3.6
H-Shay Jan 4, 2022
0b34cde
upgrade tox python env in script
H-Shay Jan 4, 2022
268b817
bump python version in example for completeness
H-Shay Jan 4, 2022
acef726
upgrade python version requirement in setup doc
H-Shay Jan 4, 2022
0add262
upgrade necessary python version in __init__.py
H-Shay Jan 4, 2022
1b98edb
upgrade python version in setup.py
H-Shay Jan 4, 2022
52bd94f
newsfragment
H-Shay Jan 4, 2022
c74dcea
drops refs to bionic and replace with focal
H-Shay Jan 7, 2022
d717f1b
bump refs to postgres 9.6 to 10
H-Shay Jan 7, 2022
b979f33
fix hanging ci
H-Shay Jan 7, 2022
dd20fc1
try installing tzdata first
H-Shay Jan 7, 2022
ebb53f4
revert change made in b979f336
H-Shay Jan 7, 2022
bb476d4
Merge branch 'develop' into excise_36
H-Shay Jan 7, 2022
7496e37
ignore new random mypy error while debugging other error
H-Shay Jan 7, 2022
b156635
fix lint error for temporary workaround
H-Shay Jan 7, 2022
1ccaa28
revert change to install list
H-Shay Jan 8, 2022
c5e6dfa
try passing env var
H-Shay Jan 8, 2022
9978524
export debian frontend var?
H-Shay Jan 8, 2022
b38d9ea
move line and add comment
H-Shay Jan 10, 2022
f810705
bump pillow dependency
H-Shay Jan 10, 2022
36f182f
Merge branch 'develop' into excise_36
H-Shay Jan 10, 2022
0a566a9
bump lxml depenency
H-Shay Jan 10, 2022
112ee00
Merge branch 'excise_36' of https://github.com/matrix-org/synapse int…
H-Shay Jan 10, 2022
efef6d4
install libjpeg-dev for pillow
H-Shay Jan 11, 2022
c5a9ad2
bump automat version to one compatible with py3.8
H-Shay Jan 13, 2022
b76aaae
Merge branch 'develop' into excise_36
H-Shay Jan 13, 2022
26d41fa
add libwebp for pillow
H-Shay Jan 14, 2022
67a8d7b
Merge branch 'excise_36' of https://github.com/matrix-org/synapse int…
H-Shay Jan 14, 2022
8b695ef
bump twisted trunk python version
H-Shay Jan 20, 2022
954665d
change suffix of newsfragment
H-Shay Jan 20, 2022
cb763cc
Merge branch 'develop' into excise_36
H-Shay Jan 20, 2022
7aaa772
remove redundant python 3.7 checks
H-Shay Jan 21, 2022
8d209b2
lint
H-Shay Jan 21, 2022
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
8 changes: 5 additions & 3 deletions .ci/scripts/test_old_deps.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/usr/bin/env bash

# this script is run by GitHub Actions in a plain `bionic` container; it installs the
# this script is run by GitHub Actions in a plain `focal` container; it installs the
# minimal requirements for tox and hands over to the py3-old tox environment.

# Prevent tzdata from asking for user input
export DEBIAN_FRONTEND=noninteractive

set -ex

apt-get update
apt-get install -y python3 python3-dev python3-pip libxml2-dev libxslt-dev xmlsec1 zlib1g-dev tox
apt-get install -y python3 python3-dev python3-pip libxml2-dev libxslt-dev xmlsec1 zlib1g-dev tox libjpeg-dev libwebp-dev

export LANG="C.UTF-8"

H-Shay marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Test with old deps
uses: docker://ubuntu:bionic # For old python and sqlite
uses: docker://ubuntu:focal # For old python and sqlite
with:
workdir: /github/workspace
entrypoint: .ci/scripts/test_old_deps.sh
Expand Down Expand Up @@ -213,15 +213,15 @@ jobs:
fail-fast: false
matrix:
include:
- sytest-tag: bionic
- sytest-tag: focal
DMRobertson marked this conversation as resolved.
Show resolved Hide resolved

- sytest-tag: bionic
- sytest-tag: focal
postgres: postgres

- sytest-tag: testing
postgres: postgres

- sytest-tag: bionic
- sytest-tag: focal
postgres: multi-postgres
workers: workers

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/twisted_trunk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- run: sudo apt-get -qq install xmlsec1
- uses: actions/setup-python@v2
with:
python-version: 3.6
python-version: 3.7
- run: .ci/patch_for_twisted_trunk.sh
- run: pip install tox
- run: tox -e py
Expand Down
1 change: 1 addition & 0 deletions changelog.d/11683.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for Python 3.6, which is EOL.
2 changes: 1 addition & 1 deletion docker/Dockerfile-pgtests
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Use the Sytest image that comes with a lot of the build dependencies
# pre-installed
FROM matrixdotorg/sytest:bionic
FROM matrixdotorg/sytest:focal

# The Sytest image doesn't come with python, so install that
RUN apt-get update && apt-get -qq install -y python3 python3-dev python3-pip
Expand Down
2 changes: 1 addition & 1 deletion docker/run_pg_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ sudo -u postgres /usr/lib/postgresql/10/bin/pg_ctl -w -D /var/lib/postgresql/dat
# Run the tests
cd /src
export TRIAL_FLAGS="-j 4"
tox --workdir=./.tox-pg-container -e py36-postgres "$@"
tox --workdir=./.tox-pg-container -e py37-postgres "$@"
2 changes: 1 addition & 1 deletion docs/admin_api/version_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ It returns a JSON body like the following:
```json
{
"server_version": "0.99.2rc1 (b=develop, abcdef123)",
"python_version": "3.6.8"
"python_version": "3.7.8"
}
```
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def exec_file(path_segments):
zip_safe=False,
long_description=long_description,
long_description_content_type="text/x-rst",
python_requires="~=3.6",
python_requires="~=3.7",
entry_points={
"console_scripts": [
"synapse_homeserver = synapse.app.homeserver:main",
Expand Down
4 changes: 2 additions & 2 deletions synapse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import sys

# Check that we're not running on an unsupported Python version.
if sys.version_info < (3, 6):
print("Synapse requires Python 3.6 or above.")
if sys.version_info < (3, 7):
print("Synapse requires Python 3.7 or above.")
sys.exit(1)

# Twisted and canonicaljson will fail to import when this file is executed to
Expand Down
4 changes: 2 additions & 2 deletions synapse/python_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"pyasn1>=0.1.9",
"pyasn1-modules>=0.0.7",
"bcrypt>=3.1.0",
"pillow>=4.3.0",
H-Shay marked this conversation as resolved.
Show resolved Hide resolved
"pillow>=5.4.0",
"sortedcontainers>=1.4.4",
"pymacaroons>=0.13.0",
"msgpack>=0.5.2",
Expand Down Expand Up @@ -107,7 +107,7 @@
# `systemd.journal.JournalHandler`, as is documented in
# `contrib/systemd/log_config.yaml`.
"systemd": ["systemd-python>=231"],
"url_preview": ["lxml>=3.5.0"],
"url_preview": ["lxml>=4.2.0"],
"sentry": ["sentry-sdk>=0.7.2"],
"opentracing": ["jaeger-client>=4.0.0", "opentracing>=2.2.0"],
"jwt": ["pyjwt>=1.6.4"],
DMRobertson marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
4 changes: 2 additions & 2 deletions synapse/storage/engines/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ def check_database(self, db_conn, allow_outdated_version: bool = False):
self._version = db_conn.server_version

# Are we on a supported PostgreSQL version?
if not allow_outdated_version and self._version < 90600:
raise RuntimeError("Synapse requires PostgreSQL 9.6 or above.")
if not allow_outdated_version and self._version < 100000:
raise RuntimeError("Synapse requires PostgreSQL 10 or above.")

with db_conn.cursor() as txn:
txn.execute("SHOW SERVER_ENCODING")
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,7 @@ usedevelop=true
skip_install = true
usedevelop = false
deps =
# Old automat version for Twisted
Automat == 0.3.0
Automat == 0.8.0
H-Shay marked this conversation as resolved.
Show resolved Hide resolved
lxml
{[base]deps}

H-Shay marked this conversation as resolved.
Show resolved Hide resolved
Expand Down