Skip to content

Python 3.12 #1486

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

Merged
merged 3 commits into from
Mar 30, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install Python Dependencies
uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.2
with:
python_version: "3.11"
python_version: "3.12"

# Check all of our dev dependencies are compatible with the MIT license.
# If you added a new dependencies that is being rejected,
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tasks:
- name: "Python Environment"
before: "pyenv install 3.11 && pyenv global 3.11"
before: "pyenv install 3.12 && pyenv global 3.12"
init: "pip install poetry"
command: "export PIP_USER=false && poetry install && poetry run pre-commit install"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 ghcr.io/owl-corp/python-poetry-base:3.11-slim
FROM --platform=linux/amd64 ghcr.io/owl-corp/python-poetry-base:3.12-slim

# Install dependencies
WORKDIR /bot
Expand Down
6 changes: 2 additions & 4 deletions bot/exts/fun/battleship.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,11 @@ def predicate(

return True

if (
return bool(
user.id == ctx.author.id
and str(reaction.emoji) == CROSS_EMOJI
and reaction.message.id == announcement.id
):
return True
return False
)

def already_playing(self, player: discord.Member) -> bool:
"""Check if someone is already in a game."""
Expand Down
6 changes: 2 additions & 4 deletions bot/exts/fun/connect_four.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,11 @@ def get_player(

return True

if (
return bool(
user.id == ctx.author.id
and str(reaction.emoji) == CROSS_EMOJI
and reaction.message.id == announcement.id
):
return True
return False
)

def already_playing(self, player: discord.Member) -> bool:
"""Check if someone is already in a game."""
Expand Down
430 changes: 210 additions & 220 deletions poetry.lock

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ authors = ["Python Discord <info@pythondiscord.com>"]
license = "MIT"

[tool.poetry.dependencies]
python = "3.11.*"
python = "3.12.*"

# See https://bot-core.pythondiscord.com/ for docs.
pydis_core = { version = "11.0.1", extras = ["all"] }
pydis_core = { version = "11.1.0", extras = ["all"] }

rapidfuzz = "3.6.2"
rapidfuzz = "3.7.0"
arrow = "1.3.0"
beautifulsoup4 = "4.12.3"
pillow = "10.2.0"
Expand All @@ -29,9 +29,9 @@ pydantic-settings = "2.2.1"

[tool.poetry.dev-dependencies]
pip-licenses = "4.4.0"
pre-commit = "3.6.2"
pre-commit = "3.7.0"
python-dotenv = "1.0.1"
ruff = "0.3.3"
ruff = "0.3.4"
taskipy = "1.12.2"

[tool.taskipy.tasks]
Expand All @@ -53,8 +53,9 @@ atomic = true
known_first_party = ["bot"]

[tool.ruff]
target-version = "py311"
target-version = "py312"
extend-exclude = [".cache"]
output-format = "concise"
line-length = 120
unsafe-fixes = true
preview = true
Expand Down