Skip to content

Commit

Permalink
feat: Add support for Python 3.10 (#692)
Browse files Browse the repository at this point in the history
* Test on Python 3.10

* Upgrade pytest

* Fix calling fixtures directly

* Remove lower pytest version limit

* Update README.rst

Co-authored-by: Łukasz Socha <31014760+lukaszsocha2@users.noreply.github.com>
  • Loading branch information
adamchainz and lukaszsocha2 committed Feb 11, 2022
1 parent 7fea17a commit d4aed82
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Expand Up @@ -12,7 +12,15 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.6', 'pypy-3.6-v7.3.3', '3.7', 'pypy-3.7', '3.8', 'pypy-3.8', '3.9']
python-version:
- '3.6'
- 'pypy-3.6-v7.3.3'
- '3.7'
- 'pypy-3.7'
- '3.8'
- 'pypy-3.8'
- '3.9'
- '3.10'
name: Build with Python ${{ matrix.python-version }}
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -419,8 +419,8 @@ Run all tests using -
The tox tests include code style checks via pep8 and pylint.

The tox tests are configured to run on Python 2.7, 3.4, 3.5, 3.6, 3.7, and
PyPy (our CI is configured to run PyPy tests on PyPy 4.0).
The tox tests are configured to run on Python 3.6, 3.7, 3.8, 3.9, 3.10 and
PyPy (our CI is configured to run PyPy tests on pypy-3.6, pypy-3.7, pypy-3.8).


Questions, Bugs, and Feature Requests?
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Expand Up @@ -14,9 +14,11 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Operating System :: OS Independent',
Expand Down Expand Up @@ -69,9 +71,9 @@ def main():
'sphinx',
'sqlalchemy<1.4.0',
'tox',
'pytest>=2.8.3, <4.0.0',
'pytest',
'pytest-cov',
'pytest-xdist<1.28.0',
'pytest-xdist',
'coveralls',
'coverage',
'tox-gh-actions',
Expand Down
11 changes: 5 additions & 6 deletions test/unit/object/test_search.py
Expand Up @@ -67,11 +67,10 @@ def search_entries():


@pytest.fixture
def search_response():
entries = search_entries()
def search_response(search_entries):
return {
'entries': entries,
'total_count': len(entries),
'entries': search_entries,
'total_count': len(search_entries),
'limit': 20,
'offset': 0
}
Expand Down Expand Up @@ -136,8 +135,8 @@ def search_with_shared_links_entries():


@pytest.fixture
def search_with_shared_links_response():
entries = search_with_shared_links_entries()
def search_with_shared_links_response(search_with_shared_links_entries):
entries = search_with_shared_links_entries
return {
'entries': entries,
'total_count': len(entries),
Expand Down
2 changes: 2 additions & 0 deletions tox.ini
Expand Up @@ -14,6 +14,7 @@ envlist =
py38,
pypy38,
py39,
py310,
rst,
docs,
coverage
Expand All @@ -27,6 +28,7 @@ python =
3.8: py38
pypy-3.8: pypy38
3.9: py39
3.10: py310

[testenv]
commands =
Expand Down

0 comments on commit d4aed82

Please sign in to comment.