Skip to content

Commit

Permalink
build: python 3.11 and 3.12 support.
Browse files Browse the repository at this point in the history
build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

chore: Updating Python Requirements (#396)

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

build: python 3.11 and 3.12 support.

fix: include setuptools in quality requirements

chore: quality fixes
  • Loading branch information
awais786 authored and Ian2012 committed Apr 1, 2024
1 parent 393cd0b commit 73700eb
Show file tree
Hide file tree
Showing 14 changed files with 71 additions and 54 deletions.
4 changes: 2 additions & 2 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, django42]
python-version: ['3.8', '3.11', '3.12']
toxenv: [quality, docs, pii_check, django42]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ upgrade: ## update the requirements/*.txt files with the latest packages satisfy
$(PIP_COMPILE) -o requirements/base.txt requirements/base.in
$(PIP_COMPILE) -o requirements/test.txt requirements/test.in
$(PIP_COMPILE) -o requirements/doc.txt requirements/doc.in
$(PIP_COMPILE) -o requirements/quality.txt requirements/quality.in
$(PIP_COMPILE) --allow-unsafe -o requirements/quality.txt requirements/quality.in
$(PIP_COMPILE) -o requirements/ci.txt requirements/ci.in
$(PIP_COMPILE) -o requirements/dev.txt requirements/dev.in
# Let tox control the Django version for tests
Expand Down
6 changes: 3 additions & 3 deletions event_routing_backends/processors/xapi/tests/test_xapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,22 @@ def test_send_method_with_successfull_flow(self, mocked_logger, mocked_get_trans

self.processor([self.sample_event])

self.assertIn(call(transformed_event.to_json()), mocked_logger.mock_calls)
self.assertIn(call.info(transformed_event.to_json()), mocked_logger.mock_calls)

@patch(
'event_routing_backends.processors.xapi.transformer_processor.XApiTransformersRegistry.get_transformer'
)
@patch('event_routing_backends.processors.xapi.transformer_processor.xapi_logger')
def test_send_method_with_event_list_successfull_flow(self, mocked_logger, mocked_get_transformer):

transformed_event = Statement()
transformed_event.object = Activity(id=str(uuid.uuid4()))
mocked_transformer = MagicMock()
mocked_transformer.transform.return_value = [transformed_event]
mocked_get_transformer.return_value = mocked_transformer

self.processor([self.sample_event])

self.assertIn(call(transformed_event.to_json()), mocked_logger.mock_calls)
self.assertIn(call.info(transformed_event.to_json()), mocked_logger.mock_calls)

@patch(
'event_routing_backends.processors.xapi.transformer_processor.XApiTransformersRegistry.get_transformer'
Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ apache-libcloud # For bulk event log loading
fasteners # Locking tools, required by apache-libcloud, but somehow not installed with it
openedx-filters
django-redis
setuptools # Python 3.12 requires setuptools package
16 changes: 10 additions & 6 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ async-timeout==4.0.3
# via redis
attrs==23.2.0
# via openedx-events
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# celery
# django
# djangorestframework
Expand Down Expand Up @@ -92,7 +93,7 @@ djangorestframework==3.15.1
# via django-config-models
edx-celeryutils==1.2.5
# via -r requirements/base.in
edx-django-utils==5.11.0
edx-django-utils==5.12.0
# via
# django-config-models
# edx-toggles
Expand Down Expand Up @@ -120,13 +121,13 @@ jsonfield==3.1.0
# via
# -r requirements/base.in
# edx-celeryutils
kombu==5.3.5
kombu==5.3.6
# via celery
markupsafe==2.1.5
# via jinja2
newrelic==9.7.1
newrelic==9.8.0
# via edx-django-utils
openedx-events==9.5.2
openedx-events==9.6.0
# via event-tracking
openedx-filters==1.6.0
# via -r requirements/base.in
Expand All @@ -136,7 +137,7 @@ prompt-toolkit==3.0.43
# via click-repl
psutil==5.9.8
# via edx-django-utils
pycparser==2.21
pycparser==2.22
# via cffi
pymongo==3.13.0
# via
Expand Down Expand Up @@ -197,3 +198,6 @@ vine==5.1.0
# kombu
wcwidth==0.2.13
# via prompt-toolkit

# The following packages are considered to be unsafe in a requirements file:
# setuptools
2 changes: 2 additions & 0 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ sphinx==4.2.0
# This pin can be removed once sphinx constraint is removed.
docutils<0.18
doc8<1.0.0
# it is not availablein python3.9
backports.zoneinfo;python_version<"3.9"
35 changes: 17 additions & 18 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ aniso8601==9.0.1
# via
# -r requirements/quality.txt
# tincan
annotated-types==0.6.0
# via pydantic
apache-libcloud==3.8.0
# via -r requirements/quality.txt
asgiref==3.8.1
Expand All @@ -33,8 +31,9 @@ attrs==23.2.0
# via
# -r requirements/quality.txt
# openedx-events
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/quality.txt
# celery
# django
Expand All @@ -44,7 +43,7 @@ billiard==4.2.0
# via
# -r requirements/quality.txt
# celery
build==1.1.1
build==1.2.1
# via
# -r requirements/pip-tools.txt
# pip-tools
Expand Down Expand Up @@ -179,7 +178,7 @@ djangorestframework==3.15.1
# django-config-models
edx-celeryutils==1.2.5
# via -r requirements/quality.txt
edx-django-utils==5.11.0
edx-django-utils==5.12.0
# via
# -r requirements/quality.txt
# django-config-models
Expand Down Expand Up @@ -230,7 +229,8 @@ importlib-metadata==6.11.0
# -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt
# -r requirements/pip-tools.txt
# build
inflect==7.0.0
# typeguard
inflect==7.2.0
# via jinja2-pluralize
iniconfig==2.0.0
# via
Expand All @@ -254,11 +254,11 @@ jsonfield==3.1.0
# via
# -r requirements/quality.txt
# edx-celeryutils
kombu==5.3.5
kombu==5.3.6
# via
# -r requirements/quality.txt
# celery
lxml==5.1.0
lxml==5.2.0
# via edx-i18n-tools
markupsafe==2.1.5
# via
Expand All @@ -270,11 +270,13 @@ mccabe==0.7.0
# pylint
mock==5.1.0
# via -r requirements/quality.txt
newrelic==9.7.1
more-itertools==10.2.0
# via inflect
newrelic==9.8.0
# via
# -r requirements/quality.txt
# edx-django-utils
openedx-events==9.5.2
openedx-events==9.6.0
# via
# -r requirements/quality.txt
# event-tracking
Expand Down Expand Up @@ -323,14 +325,10 @@ psutil==5.9.8
# edx-django-utils
pycodestyle==2.11.1
# via -r requirements/quality.txt
pycparser==2.21
pycparser==2.22
# via
# -r requirements/quality.txt
# cffi
pydantic==2.6.4
# via inflect
pydantic-core==2.16.3
# via pydantic
pydocstyle==6.3.0
# via -r requirements/quality.txt
pygments==2.17.2
Expand Down Expand Up @@ -455,19 +453,19 @@ tomlkit==0.12.4
# pylint
tox==4.14.2
# via -r requirements/ci.txt
typeguard==4.2.1
# via inflect
typing-extensions==4.10.0
# via
# -r requirements/quality.txt
# annotated-types
# asgiref
# astroid
# edx-opaque-keys
# faker
# inflect
# kombu
# pydantic
# pydantic-core
# pylint
# typeguard
tzdata==2024.1
# via
# -r requirements/quality.txt
Expand All @@ -494,6 +492,7 @@ wcwidth==0.2.13
wheel==0.43.0
# via
# -r requirements/pip-tools.txt
# -r requirements/quality.txt
# pip-tools
zipp==3.18.1
# via
Expand Down
17 changes: 9 additions & 8 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ babel==2.14.0
# via
# pydata-sphinx-theme
# sphinx
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# celery
# django
Expand All @@ -47,7 +48,7 @@ billiard==4.2.0
# via
# -r requirements/test.txt
# celery
build==1.1.1
build==1.2.1
# via -r requirements/doc.in
celery==5.3.6
# via
Expand Down Expand Up @@ -159,7 +160,7 @@ docutils==0.17.1
# sphinx
edx-celeryutils==1.2.5
# via -r requirements/test.txt
edx-django-utils==5.11.0
edx-django-utils==5.12.0
# via
# -r requirements/test.txt
# django-config-models
Expand Down Expand Up @@ -212,7 +213,7 @@ iniconfig==2.0.0
# pytest
isodate==0.6.1
# via -r requirements/test.txt
jaraco-classes==3.3.1
jaraco-classes==3.4.0
# via keyring
jaraco-context==4.3.0
# via keyring
Expand All @@ -233,7 +234,7 @@ jsonfield==3.1.0
# edx-celeryutils
keyring==25.0.0
# via twine
kombu==5.3.5
kombu==5.3.6
# via
# -r requirements/test.txt
# celery
Expand All @@ -251,13 +252,13 @@ more-itertools==10.2.0
# via
# jaraco-classes
# jaraco-functools
newrelic==9.7.1
newrelic==9.8.0
# via
# -r requirements/test.txt
# edx-django-utils
nh3==0.2.17
# via readme-renderer
openedx-events==9.5.2
openedx-events==9.6.0
# via
# -r requirements/test.txt
# event-tracking
Expand Down Expand Up @@ -288,7 +289,7 @@ psutil==5.9.8
# via
# -r requirements/test.txt
# edx-django-utils
pycparser==2.21
pycparser==2.22
# via
# -r requirements/test.txt
# cffi
Expand Down
2 changes: 1 addition & 1 deletion requirements/pip-tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# make upgrade
#
build==1.1.1
build==1.2.1
# via pip-tools
click==8.1.7
# via pip-tools
Expand Down
2 changes: 2 additions & 0 deletions requirements/quality.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ edx-lint # edX pylint rules and plugins
isort # to standardize order of imports
pycodestyle # PEP 8 compliance validation
pydocstyle # PEP 257 compliance validation
wheel
setuptools
19 changes: 13 additions & 6 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ attrs==23.2.0
# via
# -r requirements/test.txt
# openedx-events
backports-zoneinfo[tzdata]==0.2.1
backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9"
# via
# -c requirements/constraints.txt
# -r requirements/test.txt
# celery
# django
Expand Down Expand Up @@ -145,7 +146,7 @@ djangorestframework==3.15.1
# django-config-models
edx-celeryutils==1.2.5
# via -r requirements/test.txt
edx-django-utils==5.11.0
edx-django-utils==5.12.0
# via
# -r requirements/test.txt
# django-config-models
Expand Down Expand Up @@ -202,7 +203,7 @@ jsonfield==3.1.0
# via
# -r requirements/test.txt
# edx-celeryutils
kombu==5.3.5
kombu==5.3.6
# via
# -r requirements/test.txt
# celery
Expand All @@ -214,11 +215,11 @@ mccabe==0.7.0
# via pylint
mock==5.1.0
# via -r requirements/test.txt
newrelic==9.7.1
newrelic==9.8.0
# via
# -r requirements/test.txt
# edx-django-utils
openedx-events==9.5.2
openedx-events==9.6.0
# via
# -r requirements/test.txt
# event-tracking
Expand Down Expand Up @@ -248,7 +249,7 @@ psutil==5.9.8
# edx-django-utils
pycodestyle==2.11.1
# via -r requirements/quality.in
pycparser==2.21
pycparser==2.22
# via
# -r requirements/test.txt
# cffi
Expand Down Expand Up @@ -373,3 +374,9 @@ wcwidth==0.2.13
# via
# -r requirements/test.txt
# prompt-toolkit
wheel==0.43.0
# via -r requirements/quality.in

# The following packages are considered to be unsafe in a requirements file:
setuptools==69.2.0
# via -r requirements/quality.in
Loading

0 comments on commit 73700eb

Please sign in to comment.