Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update repo to Python 3.9-3.12, Django 4.2 #78

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ['3.8']
toxenv: [quality, docs, pii_check, django32, django40]
python-version: ['3.9', '3.10', '3.11', '3.12']
toxenv: [quality, docs, pii_check, django42]

steps:
- uses: actions/checkout@v3
Expand All @@ -37,7 +37,7 @@ jobs:
run: tox

- name: Run coverage
if: matrix.python-version == '3.8' && matrix.toxenv == 'django32'
if: matrix.python-version == '3.12' && matrix.toxenv == 'django42'
uses: codecov/codecov-action@v3
with:
flags: unittests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.12

- name: Install pip
run: pip install -r requirements/pip.txt
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ sphinx:
configuration: docs/conf.py

python:
version: 3.8
version: 3.12
install:
- requirements: requirements/doc.txt
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ One Time Setup
cd event-bus-redis

# Set up a virtualenv using virtualenvwrapper with the same name as the repo and activate it
mkvirtualenv -p python3.8 event-bus-redis
mkvirtualenv -p python3.12 event-bus-redis


Every time you develop something in this repo
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,8 @@ def get_version(*file_paths):

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'python': ('https://docs.python.org/3.8', None),
'django': ('https://docs.djangoproject.com/en/3.2/', 'https://docs.djangoproject.com/en/3.2/_objects/'),
'python': ('https://docs.python.org/3.12', None),
'django': ('https://docs.djangoproject.com/en/4.2/', 'https://docs.djangoproject.com/en/4.2/_objects/'),
'model_utils': ('https://django-model-utils.readthedocs.io/en/latest/', None),
}

Expand Down
14 changes: 11 additions & 3 deletions edx_event_bus_redis/internal/tests/test_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,17 @@ def test_no_event_data(self):
with pytest.raises(UnusableMessageError) as excinfo:
RedisMessage.parse(msg, topic='some-local-topic')

assert excinfo.value.args == (
"Error determining metadata from message headers: "
"__init__() missing 1 required positional argument: 'event_type'",
assert excinfo.value.args in (
# Error in Python <=3.9, can be removed when we drop support for those
(
"Error determining metadata from message headers: "
"__init__() missing 1 required positional argument: 'event_type'",
),
# Error in Python 3.10 and above
(
"Error determining metadata from message headers: "
"EventsMetadata.__init__() missing 1 required positional argument: 'event_type'",
),
)

def test_bad_msg(self):
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,9 @@ def is_requirement(line):
'Natural Language :: English',
'Programming Language :: Python :: 3',
'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',
],
)
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38-django{32,40}
envlist = py{38,39,310,311,312}-django{42}

[pycodestyle]
exclude = .git,.tox,migrations
Expand Down Expand Up @@ -32,8 +32,7 @@ norecursedirs = .* docs requirements site-packages

[testenv]
deps =
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django42: Django>=4.2,<4.3
-r{toxinidir}/requirements/test.txt
commands =
python manage.py check
Expand Down
Loading