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

Upgrade python to 3.12.7 #1506

Draft
wants to merge 1 commit 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
2 changes: 1 addition & 1 deletion .cookiecutter/cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"package_name": "via",
"slug": "via",
"short_description": "An app that proxies web pages and PDF files and injects the Hypothesis client so you can annotate them.",
"python_version": "3.11.9",
"python_version": "3.12.7",
"port": "9082",
"github_owner": "hypothesis",
"visibility": "public",
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.12'
- name: Cache the .tox dir
uses: actions/cache@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11.9
3.12.7
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<a href="https://github.com/hypothesis/via/actions/workflows/ci.yml?query=branch%3Amain"><img src="https://img.shields.io/github/actions/workflow/status/hypothesis/via/ci.yml?branch=main"></a>
<a><img src="https://img.shields.io/badge/python-3.11-success"></a>
<a><img src="https://img.shields.io/badge/python-3.12-success"></a>
<a href="https://github.com/hypothesis/via/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-BSD--2--Clause-success"></a>
<a href="https://github.com/hypothesis/cookiecutters/tree/main/pyramid-app"><img src="https://img.shields.io/badge/cookiecutter-pyramid--app-success"></a>
<a href="https://black.readthedocs.io/en/stable/"><img src="https://img.shields.io/badge/code%20style-black-000000"></a>
Expand Down
2 changes: 1 addition & 1 deletion bin/make_python
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ -n "${CI+x}" ]; then exit; fi

pyenv_root=$(pyenv root)

for python_version in 3.11.9; do
for python_version in 3.12.7; do
bin_dir=$pyenv_root/versions/$python_version/bin
if [ ! -f "$bin_dir"/tox ]; then
pyenv install --skip-existing "$python_version"
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ filterwarnings = [
"ignore:^pkg_resources is deprecated as an API:DeprecationWarning:pyramid",
"ignore:^Deprecated call to .pkg_resources\\.declare_namespace\\('.*'\\).\\.:DeprecationWarning:pkg_resources",
"ignore:^'cgi' is deprecated and slated for removal in Python 3\\.13$:DeprecationWarning:webob",
"ignore:^datetime\\.datetime\\.utcnow\\(\\) is deprecated and scheduled for removal in a future version\\.:DeprecationWarning",
Copy link
Author

@mtomilov mtomilov Jan 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one due to webob which sadly hasn't been updated 2021 where even the current main has the issue.

]

[tool.pydocstyle]
Expand Down
4 changes: 0 additions & 4 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ google-auth==2.26.2
# google-auth-oauthlib
google-auth-oauthlib==1.2.1
# via -r requirements/prod.txt
greenlet==3.0.3
# via
# -r requirements/prod.txt
# sqlalchemy
gunicorn==23.0.0
# via -r requirements/prod.txt
h-assets==1.0.7
Expand Down
4 changes: 0 additions & 4 deletions requirements/functests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ google-auth==2.26.2
# google-auth-oauthlib
google-auth-oauthlib==1.2.1
# via -r requirements/prod.txt
greenlet==3.0.3
# via
# -r requirements/prod.txt
# sqlalchemy
gunicorn==23.0.0
# via -r requirements/prod.txt
h-assets==1.0.7
Expand Down
5 changes: 0 additions & 5 deletions requirements/lint.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ google-auth-oauthlib==1.2.1
# via
# -r requirements/functests.txt
# -r requirements/tests.txt
greenlet==3.0.3
# via
# -r requirements/functests.txt
# -r requirements/tests.txt
# sqlalchemy
gunicorn==23.0.0
# via
# -r requirements/functests.txt
Expand Down
2 changes: 0 additions & 2 deletions requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ google-auth==2.26.2
# via google-auth-oauthlib
google-auth-oauthlib==1.2.1
# via -r requirements/prod.in
greenlet==3.0.3
# via sqlalchemy
gunicorn==23.0.0
# via -r requirements/prod.in
h-assets==1.0.7
Expand Down
6 changes: 3 additions & 3 deletions requirements/template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ click==8.1.7
# cookiecutter
# pip-tools
cookiecutter==2.6.0
# via -r template.in
# via -r requirements/template.in
idna==3.7
# via requests
importlib-metadata==7.0.1
Expand All @@ -37,10 +37,10 @@ mdurl==0.1.2
packaging==23.2
# via build
pip-sync-faster==0.0.4
# via -r template.in
# via -r requirements/template.in
pip-tools==7.4.1
# via
# -r template.in
# -r requirements/template.in
# pip-sync-faster
pygments==2.17.2
# via rich
Expand Down
4 changes: 0 additions & 4 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ google-auth==2.26.2
# google-auth-oauthlib
google-auth-oauthlib==1.2.1
# via -r requirements/prod.txt
greenlet==3.0.3
# via
# -r requirements/prod.txt
# sqlalchemy
gunicorn==23.0.0
# via -r requirements/prod.txt
h-assets==1.0.7
Expand Down
4 changes: 0 additions & 4 deletions requirements/typecheck.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ google-auth==2.26.2
# google-auth-oauthlib
google-auth-oauthlib==1.2.1
# via -r requirements/prod.txt
greenlet==3.0.3
# via
# -r requirements/prod.txt
# sqlalchemy
gunicorn==23.0.0
# via -r requirements/prod.txt
h-assets==1.0.7
Expand Down
4 changes: 2 additions & 2 deletions via/services/google_drive.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
from json import JSONDecodeError
from logging import getLogger
from typing import ByteString, Iterator
from typing import Iterator
from urllib.parse import parse_qs, urlparse

from google.auth.transport.requests import AuthorizedSession
Expand Down Expand Up @@ -157,7 +157,7 @@ def parse_file_url(cls, public_url):

return data

def iter_file(self, file_id, resource_key=None) -> Iterator[ByteString]:
def iter_file(self, file_id, resource_key=None) -> Iterator[bytes]:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ByteString is now deprecated and we should be using plain bytes instead.

"""Get a generator of chunks of bytes for the specified file.

:param file_id: Google Drive file id to retrieve
Expand Down
Loading