Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"
- name: Install script's pre-requirements
run: |
python -m pip install -U pip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin_upload_strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'
- name: Install dependencies
run: |
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint_python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
ref: ${{ env.ref }}
- uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"
- run: >
python -m pip install
'pyflakes @ https://github.com/pycqa/pyflakes/tarball/1911c20'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.8'
python-version: '3.11'
- name: Install dependencies
run: |
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.8'
python-version: '3.11'

# Create PR for stable version bump
- name: Update Red version number from input
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'

# Get version to release
- name: Get version to release
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'

- name: Install dependencies
run: |
Expand All @@ -89,7 +89,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'

- name: Install script's dependencies
run: python -m pip install PyYAML
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.8'
python-version: '3.11'

# Version bump to development version
- name: Update Red version number to dev
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/run_pip_compile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,21 @@ jobs:
- name: Checkout the repository.
uses: actions/checkout@v4

- name: Set up Python 3.8.
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: |
3.11
3.10
3.9
3.8

- name: Install dependencies on Linux/macOS
if: matrix.os != 'windows-latest'
run: |
python3.11 -m pip install -U pip pip-tools
python3.10 -m pip install -U pip pip-tools
python3.9 -m pip install -U pip pip-tools
python3.8 -m pip install -U pip pip-tools

- name: Install dependencies on Windows
if: matrix.os == 'windows-latest'
run: |
py -3.11 -m pip install -U pip pip-tools
py -3.10 -m pip install -U pip pip-tools
py -3.9 -m pip install -U pip pip-tools
py -3.8 -m pip install -U pip pip-tools

- name: Generate requirements files.
id: compile_requirements
Expand All @@ -61,10 +52,10 @@ jobs:
- name: Checkout the repository.
uses: actions/checkout@v4

- name: Set up Python 3.8.
- name: Set up Python 3.11.
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'

- name: Install dependencies
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scripts/compile_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pathlib import Path


EXCLUDE_STEM_RE = re.compile(r".*-3\.(?!8-)(\d+)-extra-(doc|style)")
EXCLUDE_STEM_RE = re.compile(r".*-3\.(?!11-)(\d+)-extra-(doc|style)")
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"]
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements"
os.chdir(REQUIREMENTS_FOLDER)
Expand All @@ -19,7 +19,7 @@ def pip_compile(version: str, name: str) -> None:

constraint_flags = [
arg
for file in REQUIREMENTS_FOLDER.glob(f"{sys.platform}-3.8-*.txt")
for file in REQUIREMENTS_FOLDER.glob(f"{sys.platform}-3.11-*.txt")
for arg in ("-c", file.name)
]

Expand All @@ -41,7 +41,7 @@ def pip_compile(version: str, name: str) -> None:
)


for minor in range(8, 11 + 1):
for minor in range(11, 11 + 1):
version = f"3.{minor}"
pip_compile(version, "base")
shutil.copyfile(f"{sys.platform}-{version}-base.txt", "base.txt")
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,11 @@ jobs:
strategy:
matrix:
python_version:
- "3.8"
- "3.11"
tox_env:
- style
- docs
include:
- tox_env: py38
python_version: "3.8"
friendly_name: Python 3.8 - Tests
- tox_env: py39
python_version: "3.9"
friendly_name: Python 3.9 - Tests
- tox_env: py310
python_version: "3.10"
friendly_name: Python 3.10 - Tests
- tox_env: py311
python_version: "3.11"
friendly_name: Python 3.11 - Tests
Expand Down Expand Up @@ -60,9 +51,6 @@ jobs:
strategy:
matrix:
python_version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
fail-fast: false
name: Tox - Postgres
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3.8"
python: "3.11"
jobs:
install:
- pip install .[doc]
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ We love receiving contributions from our community. Any assistance you can provi

# 2. Ground Rules
1. Ensure cross compatibility for Windows, Mac OS and Linux.
2. Ensure all Python features used in contributions exist and work in Python 3.8.1 and above.
2. Ensure all Python features used in contributions exist and work in Python 3.11 and above.
3. Create new tests for code you add or bugs you fix. It helps us help you by making sure we don't accidentally break anything :grinning:
4. Create any issues for new features you'd like to implement and explain why this feature is useful to everyone and not just you personally.
5. Don't add new cogs unless specifically given approval in an issue discussing said cog idea.
Expand All @@ -52,7 +52,7 @@ Red's repository is configured to follow a particular development workflow, usin

### 4.1 Setting up your development environment
The following requirements must be installed prior to setting up:
- Python 3.8.1 or greater
- Python 3.11 or greater
- git
- pip

Expand Down Expand Up @@ -81,7 +81,7 @@ If you're not on Windows, you should also have GNU make installed, and you can o
We're using [tox](https://github.com/tox-dev/tox) to run all of our tests. It's extremely simple to use, and if you followed the previous section correctly, it is already installed to your virtual environment.

Currently, tox does the following, creating its own virtual environments for each stage:
- Runs all of our unit tests with [pytest](https://github.com/pytest-dev/pytest) on python 3.8 (test environment `py38`)
- Runs all of our unit tests with [pytest](https://github.com/pytest-dev/pytest) on python 3.11 (test environment `py311`)
- Ensures documentation builds without warnings, and all hyperlinks have a valid destination (test environment `docs`)
- Ensures that the code meets our style guide with [black](https://github.com/psf/black) (test environment `style`)

Expand All @@ -105,7 +105,7 @@ You may have noticed we have a `Makefile` and a `make.bat` in the top-level dire

The other make recipes are most likely for project maintainers rather than contributors.

You can specify the Python executable used in the make recipes with the `PYTHON` environment variable, e.g. `make PYTHON=/usr/bin/python3.8 newenv`.
You can specify the Python executable used in the make recipes with the `PYTHON` environment variable, e.g. `make PYTHON=/usr/bin/python3.11 newenv`.

### 4.5 Keeping your dependencies up to date
Whenever you pull from upstream (V3/develop on the main repository) and you notice either of the files `setup.cfg` or `tools/dev-requirements.txt` have been changed, it can often mean some package dependencies have been updated, added or removed. To make sure you're testing and formatting with the most up-to-date versions of our dependencies, run `make syncenv`. You could also simply do `make newenv` to install them to a clean new virtual environment.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DEFAULT_GOAL := help

PYTHON ?= python3.8
PYTHON ?= python3.11

ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))

Expand Down
6 changes: 3 additions & 3 deletions docs/guide_cog_creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ you in the process.
Getting started
---------------

To start off, be sure that you have installed Python 3.8.
To start off, be sure that you have installed Python 3.11.
Next, you need to decide if you want to develop against the Stable or Develop version of Red.
Depending on what your goal is should help determine which version you need.

Expand All @@ -26,7 +26,7 @@ Depending on what your goal is should help determine which version you need.
If your goal is to support both versions, make sure you build compatibility layers or use separate branches to keep compatibility until the next Red release

Open a terminal or command prompt and type one of the following
Stable Version: :code:`python3.8 -m pip install -U Red-DiscordBot`
Stable Version: :code:`python3.11 -m pip install -U Red-DiscordBot`

.. note::

Expand All @@ -43,7 +43,7 @@ Open a terminal or command prompt and type one of the following
Red-DiscordBot @ https://github.com/Cog-Creators/Red-DiscordBot/tarball/V3/develop


(Windows users may need to use :code:`py -3.8` or :code:`python` instead of :code:`python3.8`)
(Windows users may need to use :code:`py -3.11` or :code:`python` instead of :code:`python3.11`)

--------------------
Setting up a package
Expand Down
7 changes: 0 additions & 7 deletions docs/install_guides/_includes/create-env-with-venv3.10.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/install_guides/_includes/create-env-with-venv3.9.rst

This file was deleted.

14 changes: 10 additions & 4 deletions docs/install_guides/ubuntu-2204.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@ Installing Red on Ubuntu 22.04 LTS
Installing the pre-requirements
-------------------------------

Ubuntu 22.04 LTS has all required packages available in official repositories. Install them
with apt:
We recommend adding the ``deadsnakes`` ppa to install Python 3.11:

.. prompt:: bash

sudo apt update
sudo apt -y install python3.10 python3.10-dev python3.10-venv git openjdk-17-jre-headless build-essential nano
sudo apt -y install software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa

Now install the pre-requirements with apt:

.. prompt:: bash

sudo apt -y install python3.11 python3.11-dev python3.11-venv git openjdk-17-jre-headless build-essential nano

.. Include common instructions:

.. include:: _includes/create-env-with-venv3.10.rst
.. include:: _includes/create-env-with-venv3.11.rst

.. include:: _includes/install-and-setup-red-unix.rst
2 changes: 1 addition & 1 deletion docs/install_guides/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Manually installing dependencies

* `MSVC Build tools <https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2019>`_

* `Python 3.8.1 - 3.11.x <https://www.python.org/downloads/windows/>`_
* `Python 3.11.x <https://www.python.org/downloads/windows/>`_

.. attention:: Please make sure that the box to add Python to PATH is CHECKED, otherwise
you may run into issues when trying to run Red.
Expand Down
2 changes: 1 addition & 1 deletion make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ goto:eof
goto:eof

:newenv
py -3.8 -m venv --clear .venv
py -3.11 -m venv --clear .venv
"%~dp0.venv\Scripts\python" -m pip install -U pip wheel
goto syncenv

Expand Down
2 changes: 1 addition & 1 deletion make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function stylediff() {
}

function newenv() {
py -3.8 -m venv --clear .venv
py -3.11 -m venv --clear .venv
& $PSScriptRoot\.venv\Scripts\python.exe -m pip install -U pip wheel
syncenv
}
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ classifiers = [
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Communications :: Chat",
]
Expand All @@ -45,7 +42,7 @@ red-discordbot = "redbot.pytest"
[tool.black]
line-length = 99
required-version = '23'
target-version = ['py38']
target-version = ['py311']
include = '\.py$'
force-exclude = '''
/(
Expand Down
11 changes: 1 addition & 10 deletions redbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"VersionInfo",
)

MIN_PYTHON_VERSION = (3, 8, 1)
MIN_PYTHON_VERSION = (3, 11, 0)
if _sys.version_info < MIN_PYTHON_VERSION:
print(
f"Python {'.'.join(map(str, MIN_PYTHON_VERSION))} is required to run Red, but you have "
Expand Down Expand Up @@ -352,15 +352,6 @@ def _early_init():
# Individual warnings - tracked in https://github.com/Cog-Creators/Red-DiscordBot/issues/3529
# DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
_warnings.filterwarnings("ignore", category=DeprecationWarning, module="importlib", lineno=219)
# DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10
# stdin, stdout, stderr = await tasks.gather(stdin, stdout, stderr,
# this is a bug in CPython
_warnings.filterwarnings(
"ignore",
category=DeprecationWarning,
module="asyncio",
message="The loop argument is deprecated since Python 3.8",
)
# DEP-WARN - d.py currently uses audioop module, Danny is aware of the deprecation
#
# DeprecationWarning: 'audioop' is deprecated and slated for removal in Python 3.13
Expand Down
Loading
Loading