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 and upgrade workflow runner #712

Merged
Merged
Show file tree
Hide file tree
Changes from 4 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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,13 @@ updates:
schedule:
interval: "daily"
open-pull-requests-limit: 5
- package-ecosystem: "docker"
harryzcy marked this conversation as resolved.
Show resolved Hide resolved
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 5
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 5
20 changes: 10 additions & 10 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install Dev dependencies
run: |
Expand Down Expand Up @@ -70,10 +70,10 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install Dev dependencies
run: |
Expand Down Expand Up @@ -105,10 +105,10 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install Dev dependencies
run: |
Expand Down Expand Up @@ -140,10 +140,10 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install Dev dependencies
run: |
Expand Down Expand Up @@ -251,10 +251,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

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

- name: Install Dev dependencies
run: |
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -36,7 +36,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -55,7 +55,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', 3.11]
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -103,10 +103,10 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install Dev dependencies
run: |
Expand Down Expand Up @@ -134,10 +134,10 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install Dev dependencies
run: |
Expand Down Expand Up @@ -169,10 +169,10 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install Dev dependencies
run: |
Expand Down Expand Up @@ -204,10 +204,10 @@ jobs:
steps:
- uses: actions/checkout@v3

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

- name: Install Dev dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11-alpine3.17 as build
FROM python:3.12-alpine3.18 as build

WORKDIR /app

Expand All @@ -17,7 +17,7 @@ RUN pip3 install -e .[dev]

RUN pyinstaller -y --collect-all keyrings.alt --hidden-import pkgutil --collect-all tzdata src/starters/exec.py

FROM alpine:3.17 as runtime
FROM alpine:3.18 as runtime

WORKDIR /app

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version="1.16.2"
name = "icloudpd"
description = "icloudpd is a command-line tool to download photos and videos from iCloud."
readme = "README_PYPI.md"
requires-python = ">=3.8,<3.12"
requires-python = ">=3.8,<=3.12"
keywords = ["icloud", "photo"]
license = {file="LICENSE.md"}
authors=[
Expand All @@ -35,7 +35,6 @@ dependencies = [
"tzlocal==4.3.1",
"pytz==2022.7.1",
"certifi==2022.12.7",
"future==0.18.3",
"keyring==23.13.1",
"keyrings-alt==4.2.0"
]
Expand Down Expand Up @@ -93,5 +92,5 @@ where = ["src"] # list of folders that contain the packages (["."] by default)
exclude = ["starters"]

[[tool.mypy.overrides]]
module = ['piexif.*', 'future.*', 'vcr.*']
module = ['piexif.*', 'vcr.*']
ignore_missing_imports = true
7 changes: 6 additions & 1 deletion src/pyicloud_ipd/services/photos.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@

import pytz

from future.moves.urllib.parse import urlencode
try:
# Python 3
from urllib.parse import urlencode
except ImportError:
# Python 2
harryzcy marked this conversation as resolved.
Show resolved Hide resolved
from urllib import urlencode

logger = logging.getLogger(__name__)

Expand Down