Skip to content

Commit

Permalink
Merge pull request #244 from bashhack/feat.add_python_310_311_312
Browse files Browse the repository at this point in the history
[FEAT] Add coverage + support for Python 3.10-3.12
  • Loading branch information
maxkahan authored Oct 11, 2024
2 parents dd0ffb8 + 943880c commit 24a7e73
Show file tree
Hide file tree
Showing 13 changed files with 171 additions and 181 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ on: [push]
jobs:
test:

runs-on: "ubuntu-20.04"
runs-on: "ubuntu-24.04"
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]

steps:
- uses: actions/checkout@v3
Expand All @@ -21,6 +21,6 @@ jobs:
python -m pip install --upgrade pip
pip install -r test_requirements.txt
pip install -r requirements.txt
- name: Test with nosetests
- name: Test with pytest
run: |
nosetests -v tests/test_*
pytest -v tests/test_*
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pip-delete-this-directory.txt
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
Expand All @@ -52,4 +51,7 @@ env/
.vscode

#Pypi
.pypirc
.pypirc

# Pyenv
.python-version
4 changes: 2 additions & 2 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ other script in your environment, and continue to update and you make changes.

### Testing

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

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

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

$ nosetests
$ pytest

If you would like to run the test suite against a variety of Python versions, we recommend installing
`act` and running out Github Action "test" workflow:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ coverage:
coverage html

test:
nosetests -v
pytest -v

dist:
python setup.py sdist --formats gztar bdist_wheel
Expand All @@ -26,4 +26,4 @@ requirements: .requirements.txt
.requirements.txt: requirements.txt
python -m pip install --upgrade pip setuptools
python -m pip install -r requirements.txt
python -m pip freeze > .requirements.txt
python -m pip freeze > .requirements.txt
87 changes: 37 additions & 50 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,71 +12,58 @@
def find_version(*file_paths):
# Open in Latin-1 so that we avoid encoding errors.
# Use codecs.open for Python 2 compatibility
with codecs.open(os.path.join(here, *file_paths), 'r', 'latin1') as f:
with codecs.open(os.path.join(here, *file_paths), "r", "latin1") as f:
version_file = f.read()

# The version line must have the form
# __version__ = 'ver'
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")


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

install_requires = [
'requests',
'six',
'pytz',
'python-jose',
'rsa>=4.7'
]
install_requires = ["requests", "six", "pytz", "python-jose", "rsa>=4.7"]

setup(
name = 'opentok',
version = find_version('opentok', 'version.py'),
description = 'OpenTok server-side SDK',
long_description_content_type='text/x-rst',
url='https://github.com/opentok/Opentok-Python-SDK/',
name="opentok",
version=find_version("opentok", "version.py"),
description="OpenTok server-side SDK",
long_description_content_type="text/x-rst",
url="https://github.com/opentok/Opentok-Python-SDK/",
long_description=long_description,

author='TokBox, Inc.',
author_email='support@tokbox.com',
license='LICENSE.txt',

classifiers = [
'Development Status :: 5 - Production/Stable',

'Intended Audience :: Developers',
'Intended Audience :: Telecommunications Industry',

'License :: OSI Approved :: MIT License',

'Programming Language :: Python :: 3',
'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',

'Topic :: Communications',
'Topic :: Communications :: Chat',
'Topic :: Communications :: Conferencing',
'Topic :: Multimedia :: Video :: Capture',
'Topic :: Multimedia :: Video :: Display',
'Topic :: Multimedia :: Sound/Audio :: Players',
'Topic :: Multimedia :: Sound/Audio :: Capture/Recording',
'Topic :: Software Development :: Libraries :: Python Modules'
author="TokBox, Inc.",
author_email="support@tokbox.com",
license="LICENSE.txt",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Telecommunications Industry",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"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 :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Communications",
"Topic :: Communications :: Chat",
"Topic :: Communications :: Conferencing",
"Topic :: Multimedia :: Video :: Capture",
"Topic :: Multimedia :: Video :: Display",
"Topic :: Multimedia :: Sound/Audio :: Players",
"Topic :: Multimedia :: Sound/Audio :: Capture/Recording",
"Topic :: Software Development :: Libraries :: Python Modules",
],

keywords = 'video chat tokbox tok opentok python media webrtc archiving realtime',

keywords="video chat tokbox tok opentok python media webrtc archiving realtime",
packages=find_packages(exclude=["contrib", "docs", "tests*"]),

install_requires=install_requires,

include_package_data = True,
include_package_data=True,
)
2 changes: 1 addition & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nose
pytest
httpretty
expects
wheel
Expand Down
Loading

0 comments on commit 24a7e73

Please sign in to comment.