Skip to content

Commit 7913b6d

Browse files
authored
Merge pull request #10 from runemalm/feature/next-version
Release new version (v1.0.0-beta.2)
2 parents fea5c4d + 3dd82d7 commit 7913b6d

File tree

13 files changed

+338
-88
lines changed

13 files changed

+338
-88
lines changed

.github/actions/unittests/action.yml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,59 @@ runs:
1111
- name: Checkout code
1212
uses: actions/checkout@v4
1313

14-
- name: Install .python-version and ${{ inputs.python-version }}
15-
uses: "gabrielfalcao/pyenv-action@v18"
16-
with:
17-
default: 3.7.17
18-
versions: ${{ inputs.python-version }}
14+
- name: Install pyenv from source
15+
run: |
16+
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
17+
echo "PYENV_ROOT=$HOME/.pyenv" >> $GITHUB_ENV
18+
echo "$HOME/.pyenv/bin" >> $GITHUB_PATH
19+
shell: bash
1920

20-
- name: Switch to .python-version
21+
- name: Install Python ${{ inputs.python-version }} via pyenv
2122
run: |
22-
pyenv local "$(cat .python-version)"
23-
if python -V | grep -q "$(cat .python-version)"; then
24-
echo "Python version is '$(python -V)'"
25-
else
26-
echo "Python version is '$(python -V)', but should be '$(cat .python-version)'. Exiting workflow."
23+
export PYENV_ROOT="$HOME/.pyenv"
24+
export PATH="$PYENV_ROOT/bin:$PATH"
25+
eval "$(pyenv init --path)"
26+
pyenv install -s ${{ inputs.python-version }}
27+
pyenv global ${{ inputs.python-version }}
28+
echo "${{ inputs.python-version }}" > .python-version
29+
shell: bash
30+
31+
- name: Verify installed Python version
32+
run: |
33+
export PYENV_ROOT="$HOME/.pyenv"
34+
export PATH="$PYENV_ROOT/bin:$PATH"
35+
eval "$(pyenv init --path)"
36+
ACTUAL=$(python -V)
37+
EXPECTED=${{ inputs.python-version }}
38+
echo "Python version installed: $ACTUAL"
39+
if ! python -V | grep -q "$EXPECTED"; then
40+
echo "Python version is not correct. Exiting."
2741
exit 1
2842
fi
2943
shell: bash
3044

3145
- name: Install pipenv
3246
run: |
47+
export PYENV_ROOT="$HOME/.pyenv"
48+
export PATH="$PYENV_ROOT/bin:$PATH"
49+
eval "$(pyenv init --path)"
3350
python -m pip install --upgrade pip
3451
pip install pipenv
3552
shell: bash
3653

3754
- name: Setup virtual environment
3855
run: |
56+
export PYENV_ROOT="$HOME/.pyenv"
57+
export PATH="$PYENV_ROOT/bin:$PATH"
58+
eval "$(pyenv init --path)"
3959
pipenv --python ${{ inputs.python-version }} install --dev --deploy
4060
shell: bash
4161

4262
- name: Verify virtual environment uses python version ${{ inputs.python-version }}
4363
run: |
64+
export PYENV_ROOT="$HOME/.pyenv"
65+
export PATH="$PYENV_ROOT/bin:$PATH"
66+
eval "$(pyenv init --path)"
4467
if pipenv run python -V | grep -q "${{ inputs.python-version }}"; then
4568
echo "Python ${{ inputs.python-version }} is being used."
4669
else
@@ -51,5 +74,8 @@ runs:
5174

5275
- name: Run unittests
5376
run: |
77+
export PYENV_ROOT="$HOME/.pyenv"
78+
export PATH="$PYENV_ROOT/bin:$PATH"
79+
eval "$(pyenv init --path)"
5480
PYTHONPATH=./src:./tests pipenv run pytest ./tests
5581
shell: bash

.github/workflows/feature.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
jobs:
99
pre-commit:
1010
name: Run pre-commit
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-22.04
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
@@ -23,11 +23,11 @@ jobs:
2323

2424
unittests:
2525
name: Run tests
26-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-22.04
2727

2828
strategy:
2929
matrix:
30-
python-version: [3.7.16, 3.8.18, 3.9.18, "3.10.13", 3.11.5, 3.12.0]
30+
python-version: [3.7.16, 3.8.18, 3.9.18, "3.10.13", 3.11.5, 3.12.0, 3.13.4]
3131
fail-fast: false
3232

3333
steps:

.github/workflows/master.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
pre-commit:
1111
name: Run pre-commit
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-22.04
1313

1414
steps:
1515
- name: Checkout code
@@ -25,11 +25,11 @@ jobs:
2525

2626
unittests:
2727
name: Run unittests
28-
runs-on: ubuntu-latest
28+
runs-on: ubuntu-22.04
2929

3030
strategy:
3131
matrix:
32-
python-version: [3.7.16, 3.8.18, 3.9.18, "3.10.13", 3.11.5, 3.12.0]
32+
python-version: [3.7.16, 3.8.18, 3.9.18, "3.10.13", 3.11.5, 3.12.0, 3.13.4]
3333
fail-fast: false
3434

3535
steps:
@@ -45,7 +45,7 @@ jobs:
4545
name: Pre-release (test-pypi)
4646
needs: unittests
4747
if: success()
48-
runs-on: ubuntu-latest
48+
runs-on: ubuntu-22.04
4949

5050
steps:
5151
- name: Checkout code
@@ -72,7 +72,7 @@ jobs:
7272
name: Release (pypi)
7373
needs: prerelease
7474
if: success() && (github.event_name == 'workflow_dispatch')
75-
runs-on: ubuntu-latest
75+
runs-on: ubuntu-22.04
7676

7777
steps:
7878
- name: Download artifact

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ black-check: ## check code don't violate black formatting rules
9292

9393
.PHONY: flake
9494
flake: ## lint code with flake
95-
pipenv run flake8 $(SRC)
95+
pipenv run flake8 --max-line-length=88 $(SRC)
9696

9797
.PHONY: pre-commit-install
9898
pre-commit-install: ## install the pre-commit git hook

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ A dependency injection library for Python.
2020

2121
The library is compatible with the following Python versions:
2222

23-
- 3.7, 3.8, 3.9, 3.10, 3.11, 3.12
23+
- 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
2424

2525
## Installation
2626

@@ -83,6 +83,11 @@ You can find the source code for `py-dependency-injection` on [GitHub](https://g
8383

8484
## Release Notes
8585

86+
### [1.0.0-beta.2](https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-beta.2) (2025-06-09)
87+
88+
- **Enhancement**: Constructor parameters with default values or `Optional[...]` are now supported without requiring explicit registration.
89+
- **Python Version Support**: Added support for Python version 3.13.
90+
8691
### [1.0.0-beta.1](https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-beta.1) (2025-01-06)
8792

8893
- **Transition to Beta**: Transitioned from alpha to beta. Features have been stabilized and are ready for broader testing.

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
# -- Project information -----------------------------------------------------
2929

3030
project = "py-dependency-injection"
31-
copyright = "2024, David Runemalm"
31+
copyright = "2025, David Runemalm"
3232
author = "David Runemalm"
3333

3434
# The version
3535
version = "1.0"
3636

3737
# The full version, including alpha/beta/rc tags
38-
release = "1.0.0-beta.1"
38+
release = "1.0.0-beta.2"
3939

4040

4141
# -- General configuration ---------------------------------------------------

docs/releases.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
Version History
88
###############
99

10+
**1.0.0-beta.2 (2025-06-09)**
11+
12+
- **Enhancement**: Constructor parameters with default values or `Optional[...]` are now supported without requiring explicit registration.
13+
- **Python Version Support**: Added support for Python version 3.13.
14+
15+
`View release on GitHub <https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-beta.2>`_
16+
1017
**1.0.0-beta.1 (2025-01-06)**
1118

1219
- **Transition to Beta**: Transitioned from alpha to beta. Features have been stabilized and are ready for broader testing.

docs/userguide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Install the library using pip:
2323
2424
$ pip install py-dependency-injection
2525
26-
The library supports Python versions 3.7 through 3.12.
26+
The library supports Python versions 3.7 through 3.13.
2727

2828
##########################
2929
Core Concepts and Features

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
setup(
88
name="py-dependency-injection",
9-
version="1.0.0-beta.1",
10-
author="David Runemalm, 2024",
9+
version="1.0.0-beta.2",
10+
author="David Runemalm, 2025",
1111
author_email="david.runemalm@gmail.com",
1212
description="A dependency injection library for Python.",
1313
long_description=long_description,
@@ -43,6 +43,7 @@
4343
"Programming Language :: Python :: 3.10",
4444
"Programming Language :: Python :: 3.11",
4545
"Programming Language :: Python :: 3.12",
46+
"Programming Language :: Python :: 3.13",
4647
"Topic :: Software Development :: Libraries :: Python Modules",
4748
],
4849
)

0 commit comments

Comments
 (0)