Skip to content

Commit d6e474d

Browse files
authored
Merge pull request #218 from beeware/py310
Add support for Python 3.10
2 parents 3d693e6 + 2fd1b3c commit d6e474d

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Python
2323
uses: actions/setup-python@v1
2424
with:
25-
python-version: 3.9
25+
python-version: "3.X"
2626
- name: Install dependencies
2727
run: |
2828
python -m pip install --upgrade pip
@@ -77,7 +77,7 @@ jobs:
7777
strategy:
7878
max-parallel: 4
7979
matrix:
80-
python-version: [3.6, 3.7, 3.8, 3.9]
80+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
8181
steps:
8282
- uses: actions/checkout@v1
8383
- name: Set up Python ${{ matrix.python-version }}

changes/218.feature.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add support for Python 3.10

rubicon/objc/ctypes_patch.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
# This module relies on the layout of a few internal Python and ctypes structures.
1919
# Because of this, it's possible (but not all that likely) that things will break on newer/older Python versions.
20-
if sys.version_info < (3, 4) or sys.version_info >= (3, 10):
20+
if sys.version_info < (3, 4) or sys.version_info >= (3, 11):
2121
warnings.warn(
22-
"rubicon.objc.ctypes_patch has only been tested with Python 3.4 through 3.9. "
22+
"rubicon.objc.ctypes_patch has only been tested with Python 3.4 through 3.10. "
2323
"You are using Python {v.major}.{v.minor}.{v.micro}. Most likely things will "
2424
"work properly, but you may experience crashes if Python's internals have "
2525
"changed significantly."

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ classifiers =
2020
Programming Language :: Python :: 3.7
2121
Programming Language :: Python :: 3.8
2222
Programming Language :: Python :: 3.9
23+
Programming Language :: Python :: 3.10
2324
Programming Language :: Python :: 3 :: Only
2425
Topic :: Software Development
2526
license = New BSD
@@ -50,6 +51,7 @@ exclude=
5051
build/*
5152
docs/*
5253
venv*/*
54+
local/*
5355

5456
max-complexity = 20
5557
max-line-length = 119

tests/test_async.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,14 @@ def echo_server(reader, writer):
135135
writer.close()
136136

137137
self.server = self.loop.run_until_complete(
138-
asyncio.start_server(echo_server, '127.0.0.1', 3742, loop=self.loop)
138+
asyncio.start_server(echo_server, '127.0.0.1', 3742)
139139
)
140140

141141
client_messages = []
142142

143143
@asyncio.coroutine
144-
def echo_client(message, loop):
145-
reader, writer = yield from asyncio.open_connection('127.0.0.1', 3742,
146-
loop=loop)
144+
def echo_client(message):
145+
reader, writer = yield from asyncio.open_connection('127.0.0.1', 3742)
147146

148147
writer.write(message.encode())
149148

@@ -152,8 +151,8 @@ def echo_client(message, loop):
152151

153152
writer.close()
154153

155-
self.loop.run_until_complete(echo_client('Hello, World!', self.loop))
156-
self.loop.run_until_complete(echo_client('Goodbye, World!', self.loop))
154+
self.loop.run_until_complete(echo_client('Hello, World!'))
155+
self.loop.run_until_complete(echo_client('Goodbye, World!'))
157156

158157
self.assertEqual(server_messages, ['Hello, World!', 'Goodbye, World!'])
159158
self.assertEqual(client_messages, ['Hello, World!', 'Goodbye, World!'])

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = flake8,towncrier-check,docs,package,py{35,36,37,38,39},pypy3
7+
envlist = flake8,towncrier-check,docs,package,py{35,36,37,38,39,310},pypy3
88
skip_missing_interpreters = true
99

1010
[testenv]

0 commit comments

Comments
 (0)