Skip to content

Bump Python to 3.12 #1310

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python 2
uses: actions/setup-python@v3
with:
python-version: 3.11
python-version: 3.12
- name: Install pip
run: |
python -m pip install pip==$(sed -nE 's/pip = "==(.*)"/\1/p' Pipfile)
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Running pytest
run: |
cd techsupport_bot
python3.11 -m pytest tests/ -p no:warnings
python3.12 -m pytest tests/ -p no:warnings

black:
if: |
Expand All @@ -55,10 +55,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: 3.11
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install pip==$(sed -nE 's/pip = "==(.*)"/\1/p' Pipfile)
Expand All @@ -82,10 +82,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: 3.11
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install pip==$(sed -nE 's/pip = "==(.*)"/\1/p' Pipfile)
Expand Down Expand Up @@ -135,10 +135,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: 3.11
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install pip==$(sed -nE 's/pip = "==(.*)"/\1/p' Pipfile)
Expand All @@ -162,10 +162,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: 3.11
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install pip==$(sed -nE 's/pip = "==(.*)"/\1/p' Pipfile)
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-alpine
FROM python:3.12-alpine

RUN apk update
RUN apk add --no-cache postgresql-dev gcc musl-dev libpq git
Expand Down
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ pyyaml = "==6.0.1"
unidecode = "==1.4.0"

[requires]
python_version = "3.11"
python_version = "3.12"
12 changes: 2 additions & 10 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions techsupport_bot/commands/factoids.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
from aiohttp.client_exceptions import InvalidURL
from botlogging import LogContext, LogLevel
from core import auxiliary, cogs, custom_errors, extensionconfig
from croniter import CroniterBadCronError
import cronsim
from discord import app_commands
from discord.ext import commands

Expand Down Expand Up @@ -1077,7 +1077,7 @@ async def cronjob(
try:
await aiocron.crontab(job.cron).next()

except CroniterBadCronError as exception:
except cronsim.CronSimError as exception:
log_channel = None
log_context = None

Expand Down