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

feat: python 3.12 upgrade #99

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
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, '3.8', '3.12']
toxenv: [py38, quality, django42]
python-version: ['3.12']
toxenv: [py38, py312, quality, django42]

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions calc/calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ def eval_variable(x):
return all_variables[casify(x[0])]

def eval_function(x):
if x[0] in ['fact', 'factorial']: # pythong 3.12 math.factorial won't allow floats
return all_functions[(x[0])](int(x[1]))
return all_functions[casify(x[0])](x[1])

evaluate_actions = {
Expand Down
18 changes: 9 additions & 9 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
lxml==4.9.1
lxml==5.1.0
# via -r requirements/base.in
markupsafe==2.1.1
markupsafe==2.1.5
# via -r requirements/base.in
mpmath==1.2.1
mpmath==1.3.0
# via sympy
numpy==1.23.1
numpy==1.26.4
# via
# -r requirements/base.in
# scipy
pyparsing==3.0.9
pyparsing==3.1.2
# via -r requirements/base.in
scipy==1.8.1
scipy==1.12.0
# via -r requirements/base.in
sympy==1.10.1
sympy==1.12
# via -r requirements/base.in
59 changes: 30 additions & 29 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
@@ -1,66 +1,67 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
certifi==2022.6.15
cachetools==5.3.3
# via
# -r requirements/tox.txt
# tox
certifi==2024.2.2
# via requests
charset-normalizer==2.1.0
chardet==5.2.0
# via
# -r requirements/tox.txt
# tox
charset-normalizer==3.3.2
# via requests
coverage==6.4.2
colorama==0.4.6
# via
# -r requirements/tox.txt
# tox
coverage==6.5.0
# via coveralls
coveralls==3.3.1
# via -r requirements/ci.in
distlib==0.3.5
distlib==0.3.8
# via
# -r requirements/tox.txt
# virtualenv
docopt==0.6.2
# via coveralls
filelock==3.7.1
filelock==3.13.1
# via
# -r requirements/tox.txt
# tox
# virtualenv
idna==3.3
idna==3.6
# via requests
packaging==21.3
packaging==23.2
# via
# -r requirements/tox.txt
# pyproject-api
# tox
platformdirs==2.5.2
platformdirs==4.2.0
# via
# -r requirements/tox.txt
# tox
# virtualenv
pluggy==1.0.0
pluggy==1.4.0
# via
# -r requirements/tox.txt
# tox
py==1.11.0
pyproject-api==1.6.1
# via
# -r requirements/tox.txt
# tox
pyparsing==3.0.9
# via
# -r requirements/tox.txt
# packaging
requests==2.28.1
requests==2.31.0
# via coveralls
six==1.16.0
# via
# -r requirements/tox.txt
# tox
# virtualenv
toml==0.10.2
# via
# -r requirements/tox.txt
# tox
tox==3.25.1
tox==4.14.1
# via -r requirements/tox.txt
urllib3==1.26.10
urllib3==2.2.1
# via requests
virtualenv==20.15.1
virtualenv==20.25.1
# via
# -r requirements/tox.txt
# tox
4 changes: 1 addition & 3 deletions requirements/common_constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@


# using LTS django version
Django<4.0
Django<5.0

# elasticsearch>=7.14.0 includes breaking changes in it which caused issues in discovery upgrade process.
# elastic search changelog: https://www.elastic.co/guide/en/enterprise-search/master/release-notes-7.14.0.html
elasticsearch<7.14.0

setuptools<60

# django-simple-history>3.0.0 adds indexing and causes a lot of migrations to be affected
django-simple-history==3.0.0
14 changes: 6 additions & 8 deletions requirements/pip.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
wheel==0.37.1
wheel==0.42.0
# via -r requirements/pip.in

# The following packages are considered to be unsafe in a requirements file:
pip==22.2
pip==24.0
# via -r requirements/pip.in
setuptools==69.1.1
# via -r requirements/pip.in
setuptools==59.8.0
# via
# -c requirements/common_constraints.txt
# -r requirements/pip.in
22 changes: 9 additions & 13 deletions requirements/pip_tools.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
build==0.8.0
build==1.1.1
# via pip-tools
click==8.1.3
click==8.1.7
# via pip-tools
packaging==21.3
packaging==23.2
# via build
pep517==0.12.0
# via build
pip-tools==6.8.0
pip-tools==7.4.1
# via -r requirements/pip_tools.in
pyparsing==3.0.9
# via packaging
tomli==2.0.1
pyproject-hooks==1.0.0
# via
# build
# pep517
wheel==0.37.1
# pip-tools
wheel==0.42.0
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down
1 change: 1 addition & 0 deletions requirements/test.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
-r base.txt # Core dependencies for the cookiecutter

coverage
setuptools
edx-lint
pycodestyle
pylint
Expand Down
102 changes: 47 additions & 55 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,71 +1,76 @@
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
# This file is autogenerated by pip-compile with Python 3.12
# by the following command:
#
# make upgrade
#
astroid==2.11.7
astroid==3.1.0
# via
# pylint
# pylint-celery
click==8.1.3
cachetools==5.3.3
# via tox
chardet==5.2.0
# via tox
click==8.1.7
# via
# click-log
# code-annotations
# edx-lint
click-log==0.4.0
# via edx-lint
code-annotations==1.3.0
code-annotations==1.6.0
# via edx-lint
coverage==6.4.2
colorama==0.4.6
# via tox
coverage==7.4.3
# via -r requirements/test.in
dill==0.3.5.1
dill==0.3.8
# via pylint
distlib==0.3.5
distlib==0.3.8
# via virtualenv
edx-lint==5.2.4
edx-lint==5.3.6
# via -r requirements/test.in
filelock==3.7.1
filelock==3.13.1
# via
# tox
# virtualenv
isort==5.10.1
isort==5.13.2
# via pylint
jinja2==3.1.2
jinja2==3.1.3
# via code-annotations
lazy-object-proxy==1.7.1
# via astroid
lxml==4.9.1
lxml==5.1.0
# via -r requirements/base.txt
markupsafe==2.1.1
markupsafe==2.1.5
# via
# -r requirements/base.txt
# jinja2
mccabe==0.7.0
# via pylint
mpmath==1.2.1
mpmath==1.3.0
# via
# -r requirements/base.txt
# sympy
numpy==1.23.1
numpy==1.26.4
# via
# -r requirements/base.txt
# scipy
packaging==21.3
# via tox
pbr==5.9.0
packaging==23.2
# via
# pyproject-api
# tox
pbr==6.0.0
# via stevedore
platformdirs==2.5.2
platformdirs==4.2.0
# via
# pylint
# tox
# virtualenv
pluggy==1.0.0
# via tox
py==1.11.0
pluggy==1.4.0
# via tox
pycodestyle==2.8.0
pycodestyle==2.11.1
# via -r requirements/test.in
pylint==2.14.5
pylint==3.1.0
# via
# -r requirements/test.in
# edx-lint
Expand All @@ -74,49 +79,36 @@ pylint==2.14.5
# pylint-plugin-utils
pylint-celery==0.3
# via edx-lint
pylint-django==2.5.3
pylint-django==2.5.5
# via edx-lint
pylint-plugin-utils==0.7
pylint-plugin-utils==0.8.2
# via
# pylint-celery
# pylint-django
pyparsing==3.0.9
# via
# -r requirements/base.txt
# packaging
python-slugify==6.1.2
pyparsing==3.1.2
# via -r requirements/base.txt
pyproject-api==1.6.1
# via tox
python-slugify==8.0.4
# via code-annotations
pyyaml==6.0
pyyaml==6.0.1
# via code-annotations
scipy==1.8.1
scipy==1.12.0
# via -r requirements/base.txt
six==1.16.0
# via
# edx-lint
# tox
# virtualenv
stevedore==4.0.0
# via edx-lint
stevedore==5.2.0
# via code-annotations
sympy==1.10.1
sympy==1.12
# via -r requirements/base.txt
text-unidecode==1.3
# via python-slugify
toml==0.10.2
# via tox
tomli==2.0.1
# via pylint
tomlkit==0.11.1
tomlkit==0.12.4
# via pylint
tox==3.25.1
tox==4.14.1
# via -r requirements/test.in
typing-extensions==4.3.0
# via
# astroid
# pylint
virtualenv==20.15.1
virtualenv==20.25.1
# via tox
wrapt==1.14.1
# via astroid

# The following packages are considered to be unsafe in a requirements file:
# setuptools
Loading
Loading