Remove Python 3.6; add Python 3.10.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2023-01-24 11:07:21 -08:00
parent 4a3d225a38
commit c94da617ed
9 changed files with 28 additions and 48 deletions

View file

@ -17,33 +17,24 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
# Base images are built using `tools/ci/Dockerfile.prod.template`. # Focal ships with Python 3.8.10.
# The comments at the top explain how to build and upload these images.
# Bionic ships with Python 3.6.
- docker_image: zulip/ci:bionic
name: Ubuntu 18.04 Bionic (Python 3.6, backend)
os: bionic
is_bionic: true
include_frontend_tests: false
# Configure this test to run with the Zulip 3.2 release.
legacy_client_interface: 3
server_version: refs/tags/3.2
# Focal ships with Python 3.8.2.
- docker_image: zulip/ci:focal - docker_image: zulip/ci:focal
name: Ubuntu 20.04 Focal (Python 3.8, backend) name: Ubuntu 20.04 (Python 3.8, backend)
os: focal os: focal
is_focal: true legacy_client_interface: "3"
include_frontend_tests: false server_version: refs/tags/3.2
legacy_client_interface: 4
server_version: refs/tags/4.0
# Bullseye ships with Python 3.9.2. # Bullseye ships with Python 3.9.2.
- docker_image: zulip/ci:bullseye - docker_image: zulip/ci:bullseye
name: Debian 11 Bullseye (Python 3.9, backend) name: Debian 11 (Python 3.9, backend)
os: bullseye os: bullseye
is_bullseye: true legacy_client_interface: "4"
include_frontend_tests: false
legacy_client_interface: 4
server_version: refs/tags/4.0 server_version: refs/tags/4.0
# Ubuntu 22.04 ships with Python 3.10.6.
- docker_image: zulip/ci:jammy
name: Ubuntu 22.04 (Python 3.10, backend)
os: jammy
legacy_client_interface: "6"
server_version: refs/tags/6.0
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: ${{ matrix.name }} (Zulip ${{matrix.server_version}}) name: ${{ matrix.name }} (Zulip ${{matrix.server_version}})
@ -58,25 +49,18 @@ jobs:
HOME: /home/github/ HOME: /home/github/
steps: steps:
- name: 'Checkout python-zulip-api' - name: "Check out python-zulip-api"
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
path: api path: api
- name: 'Checkout Zulip server ${{ matrix.server_version }}' - name: "Check out Zulip server ${{ matrix.server_version }}"
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
repository: zulip/zulip repository: zulip/zulip
ref: ${{ matrix.server_version }} ref: ${{ matrix.server_version }}
path: server path: server
- name: Do Bionic hack
if: ${{ matrix.is_bionic }}
run: |
# Temporary hack till `sudo service redis-server start` gets fixes in Bionic. See
# https://chat.zulip.org/#narrow/stream/3-backend/topic/Ubuntu.20bionic.20CircleCI
sudo sed -i '/^bind/s/bind.*/bind 0.0.0.0/' /etc/redis/redis.conf
- name: Install dependencies - name: Install dependencies
run: | run: |
cd server cd server

View file

@ -13,10 +13,10 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup Python 3.6 - name: Set up Python 3.7
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: 3.6 python-version: "3.7"
- name: Install dependencies - name: Install dependencies
run: tools/provision --force run: tools/provision --force
@ -32,15 +32,12 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
os: [ubuntu-latest, windows-latest] os: [ubuntu-latest, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9] python-version: ["3.7", "3.8", "3.9", "3.10"]
exclude:
- os: windows-latest
python-version: 3.6 # cryptography install fails on Windows with python 3.6 since pip is quite old.
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2 uses: actions/setup-python@v2
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}

View file

@ -1,6 +1,6 @@
[tool.black] [tool.black]
line-length = 100 line-length = 100
target-version = ["py36"] target-version = ["py37"]
[tool.isort] [tool.isort]
src_paths = [ src_paths = [

View file

@ -3,7 +3,7 @@
The [Zulip API](https://zulip.com/api) Python bindings require the The [Zulip API](https://zulip.com/api) Python bindings require the
following dependencies: following dependencies:
* **Python (version >= 3.6)** * **Python (version >= 3.7)**
* requests (version >= 0.12.1) * requests (version >= 0.12.1)
**Note**: If you'd like to use the Zulip bindings with Python 2, we **Note**: If you'd like to use the Zulip bindings with Python 2, we

View file

@ -41,7 +41,7 @@ topic = matrix
ZULIP_MESSAGE_TEMPLATE: str = "**{username}** [{uid}]: {message}" ZULIP_MESSAGE_TEMPLATE: str = "**{username}** [{uid}]: {message}"
# For Python 3.6 compatibility. # For Python 3.7 compatibility.
# (Since 3.8, there is unittest.IsolatedAsyncioTestCase!) # (Since 3.8, there is unittest.IsolatedAsyncioTestCase!)
# source: https://stackoverflow.com/a/46324983 # source: https://stackoverflow.com/a/46324983
def async_test(coro: Callable[..., Awaitable[Any]]) -> Callable[..., Any]: def async_test(coro: Callable[..., Awaitable[Any]]) -> Callable[..., Any]:

View file

@ -42,12 +42,12 @@ setup(
"License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: Apache Software License",
"Topic :: Communications :: Chat", "Topic :: Communications :: Chat",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
], ],
python_requires=">=3.6", python_requires=">=3.7",
url="https://www.zulip.org/", url="https://www.zulip.org/",
project_urls={ project_urls={
"Source": "https://github.com/zulip/python-zulip-api/", "Source": "https://github.com/zulip/python-zulip-api/",

View file

@ -34,12 +34,12 @@ setup(
"License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: Apache Software License",
"Topic :: Communications :: Chat", "Topic :: Communications :: Chat",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
], ],
python_requires=">=3.6", python_requires=">=3.7",
url="https://www.zulip.org/", url="https://www.zulip.org/",
project_urls={ project_urls={
"Source": "https://github.com/zulip/python-zulip-api/", "Source": "https://github.com/zulip/python-zulip-api/",

View file

@ -1,2 +1 @@
python-chess==0.31.* ; python_version < '3.7' chess==1.*
chess==1.* ; python_version >= '3.7'

View file

@ -22,12 +22,12 @@ setup(
"License :: OSI Approved :: Apache Software License", "License :: OSI Approved :: Apache Software License",
"Topic :: Communications :: Chat", "Topic :: Communications :: Chat",
"Programming Language :: Python :: 3", "Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
], ],
python_requires=">=3.6", python_requires=">=3.7",
url="https://www.zulip.org/", url="https://www.zulip.org/",
project_urls={ project_urls={
"Source": "https://github.com/zulip/python-zulip-api/", "Source": "https://github.com/zulip/python-zulip-api/",