Skip to content

Release new version (v1.0.0-beta.2) #10

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 10 commits into from
Jun 9, 2025
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
48 changes: 37 additions & 11 deletions .github/actions/unittests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,36 +11,59 @@ runs:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Switch to .python-version
- name: Install Python ${{ inputs.python-version }} via pyenv
run: |
pyenv local "$(cat .python-version)"
if python -V | grep -q "$(cat .python-version)"; then
echo "Python version is '$(python -V)'"
else
echo "Python version is '$(python -V)', but should be '$(cat .python-version)'. Exiting workflow."
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
pyenv install -s ${{ inputs.python-version }}
pyenv global ${{ inputs.python-version }}
echo "${{ inputs.python-version }}" > .python-version
shell: bash

- name: Verify installed Python version
run: |
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
ACTUAL=$(python -V)
EXPECTED=${{ inputs.python-version }}
echo "Python version installed: $ACTUAL"
if ! python -V | grep -q "$EXPECTED"; then
echo "Python version is not correct. Exiting."
exit 1
fi
shell: bash

- name: Install pipenv
run: |
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
python -m pip install --upgrade pip
pip install pipenv
shell: bash

- name: Setup virtual environment
run: |
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
pipenv --python ${{ inputs.python-version }} install --dev --deploy
shell: bash

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

- name: Run unittests
run: |
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
PYTHONPATH=./src:./tests pipenv run pytest ./tests
shell: bash
6 changes: 3 additions & 3 deletions .github/workflows/feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
pre-commit:
name: Run pre-commit
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -23,11 +23,11 @@ jobs:

unittests:
name: Run tests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
matrix:
python-version: [3.7.16, 3.8.18, 3.9.18, "3.10.13", 3.11.5, 3.12.0]
python-version: [3.7.16, 3.8.18, 3.9.18, "3.10.13", 3.11.5, 3.12.0, 3.13.4]
fail-fast: false

steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
pre-commit:
name: Run pre-commit
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout code
Expand All @@ -25,11 +25,11 @@ jobs:

unittests:
name: Run unittests
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
matrix:
python-version: [3.7.16, 3.8.18, 3.9.18, "3.10.13", 3.11.5, 3.12.0]
python-version: [3.7.16, 3.8.18, 3.9.18, "3.10.13", 3.11.5, 3.12.0, 3.13.4]
fail-fast: false

steps:
Expand All @@ -45,7 +45,7 @@ jobs:
name: Pre-release (test-pypi)
needs: unittests
if: success()
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout code
Expand All @@ -72,7 +72,7 @@ jobs:
name: Release (pypi)
needs: prerelease
if: success() && (github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Download artifact
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ black-check: ## check code don't violate black formatting rules

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

.PHONY: pre-commit-install
pre-commit-install: ## install the pre-commit git hook
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ A dependency injection library for Python.

The library is compatible with the following Python versions:

- 3.7, 3.8, 3.9, 3.10, 3.11, 3.12
- 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13

## Installation

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

## Release Notes

### [1.0.0-beta.2](https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-beta.2) (2025-06-09)

- **Enhancement**: Constructor parameters with default values or `Optional[...]` are now supported without requiring explicit registration.
- **Python Version Support**: Added support for Python version 3.13.

### [1.0.0-beta.1](https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-beta.1) (2025-01-06)

- **Transition to Beta**: Transitioned from alpha to beta. Features have been stabilized and are ready for broader testing.
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@
# -- Project information -----------------------------------------------------

project = "py-dependency-injection"
copyright = "2024, David Runemalm"
copyright = "2025, David Runemalm"
author = "David Runemalm"

# The version
version = "1.0"

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


# -- General configuration ---------------------------------------------------
Expand Down
7 changes: 7 additions & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
Version History
###############

**1.0.0-beta.2 (2025-06-09)**

- **Enhancement**: Constructor parameters with default values or `Optional[...]` are now supported without requiring explicit registration.
- **Python Version Support**: Added support for Python version 3.13.

`View release on GitHub <https://github.com/runemalm/py-dependency-injection/releases/tag/v1.0.0-beta.2>`_

**1.0.0-beta.1 (2025-01-06)**

- **Transition to Beta**: Transitioned from alpha to beta. Features have been stabilized and are ready for broader testing.
Expand Down
2 changes: 1 addition & 1 deletion docs/userguide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Install the library using pip:

$ pip install py-dependency-injection

The library supports Python versions 3.7 through 3.12.
The library supports Python versions 3.7 through 3.13.

##########################
Core Concepts and Features
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

setup(
name="py-dependency-injection",
version="1.0.0-beta.1",
author="David Runemalm, 2024",
version="1.0.0-beta.2",
author="David Runemalm, 2025",
author_email="david.runemalm@gmail.com",
description="A dependency injection library for Python.",
long_description=long_description,
Expand Down Expand Up @@ -43,6 +43,7 @@
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
],
)
Loading