Skip to content

Commit 24a7e73

Browse files
authored
Merge pull request #244 from bashhack/feat.add_python_310_311_312
[FEAT] Add coverage + support for Python 3.10-3.12
2 parents dd0ffb8 + 943880c commit 24a7e73

13 files changed

+171
-181
lines changed

.github/workflows/ot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on: [push]
55
jobs:
66
test:
77

8-
runs-on: "ubuntu-20.04"
8+
runs-on: "ubuntu-24.04"
99
strategy:
1010
matrix:
11-
python-version: [3.6, 3.7, 3.8, 3.9]
11+
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
1212

1313
steps:
1414
- uses: actions/checkout@v3
@@ -21,6 +21,6 @@ jobs:
2121
python -m pip install --upgrade pip
2222
pip install -r test_requirements.txt
2323
pip install -r requirements.txt
24-
- name: Test with nosetests
24+
- name: Test with pytest
2525
run: |
26-
nosetests -v tests/test_*
26+
pytest -v tests/test_*

.gitignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ pip-delete-this-directory.txt
3232
.tox/
3333
.coverage
3434
.cache
35-
nosetests.xml
3635
coverage.xml
3736

3837
# Translations
@@ -52,4 +51,7 @@ env/
5251
.vscode
5352

5453
#Pypi
55-
.pypirc
54+
.pypirc
55+
56+
# Pyenv
57+
.python-version

DEVELOPING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ other script in your environment, and continue to update and you make changes.
5050

5151
### Testing
5252

53-
This project's tests are built using the `unittest` [`Nose'](https://nose.readthedocs.org) modules.
53+
This project's tests are built using the `unittest` [Pytest](https://docs.pytest.org/en/stable/) modules.
5454
To run the unit tests, install the core as well as development dependencies inside your `virtualenv`:
5555

5656
$ pip install -r requirements.txt -r test_requirements.txt
5757

5858
You can manually run the test suite for your version of python with:
5959

60-
$ nosetests
60+
$ pytest
6161

6262
If you would like to run the test suite against a variety of Python versions, we recommend installing
6363
`act` and running out Github Action "test" workflow:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ coverage:
88
coverage html
99

1010
test:
11-
nosetests -v
11+
pytest -v
1212

1313
dist:
1414
python setup.py sdist --formats gztar bdist_wheel
@@ -26,4 +26,4 @@ requirements: .requirements.txt
2626
.requirements.txt: requirements.txt
2727
python -m pip install --upgrade pip setuptools
2828
python -m pip install -r requirements.txt
29-
python -m pip freeze > .requirements.txt
29+
python -m pip freeze > .requirements.txt

setup.py

Lines changed: 37 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -12,71 +12,58 @@
1212
def find_version(*file_paths):
1313
# Open in Latin-1 so that we avoid encoding errors.
1414
# Use codecs.open for Python 2 compatibility
15-
with codecs.open(os.path.join(here, *file_paths), 'r', 'latin1') as f:
15+
with codecs.open(os.path.join(here, *file_paths), "r", "latin1") as f:
1616
version_file = f.read()
1717

1818
# The version line must have the form
1919
# __version__ = 'ver'
20-
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
21-
version_file, re.M)
20+
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
2221
if version_match:
2322
return version_match.group(1)
2423
raise RuntimeError("Unable to find version string.")
2524

25+
2626
# Get the long description from the relevant file
27-
with codecs.open('README.rst', encoding='utf-8') as f:
27+
with codecs.open("README.rst", encoding="utf-8") as f:
2828
long_description = f.read()
2929

30-
install_requires = [
31-
'requests',
32-
'six',
33-
'pytz',
34-
'python-jose',
35-
'rsa>=4.7'
36-
]
30+
install_requires = ["requests", "six", "pytz", "python-jose", "rsa>=4.7"]
3731

3832
setup(
39-
name = 'opentok',
40-
version = find_version('opentok', 'version.py'),
41-
description = 'OpenTok server-side SDK',
42-
long_description_content_type='text/x-rst',
43-
url='https://github.com/opentok/Opentok-Python-SDK/',
33+
name="opentok",
34+
version=find_version("opentok", "version.py"),
35+
description="OpenTok server-side SDK",
36+
long_description_content_type="text/x-rst",
37+
url="https://github.com/opentok/Opentok-Python-SDK/",
4438
long_description=long_description,
45-
46-
author='TokBox, Inc.',
47-
author_email='[email protected]',
48-
license='LICENSE.txt',
49-
50-
classifiers = [
51-
'Development Status :: 5 - Production/Stable',
52-
53-
'Intended Audience :: Developers',
54-
'Intended Audience :: Telecommunications Industry',
55-
56-
'License :: OSI Approved :: MIT License',
57-
58-
'Programming Language :: Python :: 3',
59-
'Programming Language :: Python :: 3.5',
60-
'Programming Language :: Python :: 3.6',
61-
'Programming Language :: Python :: 3.7',
62-
'Programming Language :: Python :: 3.8',
63-
'Programming Language :: Python :: 3.9',
64-
65-
'Topic :: Communications',
66-
'Topic :: Communications :: Chat',
67-
'Topic :: Communications :: Conferencing',
68-
'Topic :: Multimedia :: Video :: Capture',
69-
'Topic :: Multimedia :: Video :: Display',
70-
'Topic :: Multimedia :: Sound/Audio :: Players',
71-
'Topic :: Multimedia :: Sound/Audio :: Capture/Recording',
72-
'Topic :: Software Development :: Libraries :: Python Modules'
39+
author="TokBox, Inc.",
40+
author_email="[email protected]",
41+
license="LICENSE.txt",
42+
classifiers=[
43+
"Development Status :: 5 - Production/Stable",
44+
"Intended Audience :: Developers",
45+
"Intended Audience :: Telecommunications Industry",
46+
"License :: OSI Approved :: MIT License",
47+
"Programming Language :: Python :: 3",
48+
"Programming Language :: Python :: 3.5",
49+
"Programming Language :: Python :: 3.6",
50+
"Programming Language :: Python :: 3.7",
51+
"Programming Language :: Python :: 3.8",
52+
"Programming Language :: Python :: 3.9",
53+
"Programming Language :: Python :: 3.10",
54+
"Programming Language :: Python :: 3.11",
55+
"Programming Language :: Python :: 3.12",
56+
"Topic :: Communications",
57+
"Topic :: Communications :: Chat",
58+
"Topic :: Communications :: Conferencing",
59+
"Topic :: Multimedia :: Video :: Capture",
60+
"Topic :: Multimedia :: Video :: Display",
61+
"Topic :: Multimedia :: Sound/Audio :: Players",
62+
"Topic :: Multimedia :: Sound/Audio :: Capture/Recording",
63+
"Topic :: Software Development :: Libraries :: Python Modules",
7364
],
74-
75-
keywords = 'video chat tokbox tok opentok python media webrtc archiving realtime',
76-
65+
keywords="video chat tokbox tok opentok python media webrtc archiving realtime",
7766
packages=find_packages(exclude=["contrib", "docs", "tests*"]),
78-
7967
install_requires=install_requires,
80-
81-
include_package_data = True,
68+
include_package_data=True,
8269
)

test_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
nose
1+
pytest
22
httpretty
33
expects
44
wheel

0 commit comments

Comments
 (0)