Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ adheres to [Semantic Versioning](https://semver.org/).

- Fix test xz files generation for xz-utils 5.5.1+
- Freeze dev dependencies versions
- Update dev dependencies
- Update GitHub actions dependencies
- Add tests for PyPy 3.10 and 3.11
- Improve tox & CI pipelines
Expand Down
6 changes: 3 additions & 3 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ build==1.3.0
ruff==0.13.1

# typing
mypy==1.0.1
mypy==1.18.2

# tests
pytest==7.2.1
pytest-cov==4.0.0
pytest==8.4.2
pytest-cov==7.0.0
3 changes: 1 addition & 2 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ warn_no_return = True
warn_return_any = True
warn_unreachable = True

# Supressing errors
show_none_errors = True
# Suppressing errors
ignore_errors = False

# Miscellaneous strictness flags
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ package_dir = =src
packages = xz
python_requires = >=3.9
setup_requires =
setuptools_scm==7.1.0
setuptools_scm==9.2.0
7 changes: 4 additions & 3 deletions src/xz/open.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from functools import wraps
from io import TextIOWrapper
from typing import BinaryIO, Optional, Union, cast, overload

Expand Down Expand Up @@ -54,16 +53,18 @@ def __init__(
def mode(self) -> str:
return f"{self.xz_file.mode}t"

@wraps(XZFile.change_stream)
def change_stream(self) -> None:
self.flush()
self.xz_file.change_stream()

@wraps(XZFile.change_block)
change_stream.__doc__ = XZFile.change_stream.__doc__

def change_block(self) -> None:
self.flush()
self.xz_file.change_block()

change_block.__doc__ = XZFile.change_block.__doc__


@overload
def xz_open(
Expand Down
14 changes: 6 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ envlist =
package = wheel
wheel_build_env = .pkg # reuse same wheel across envs
deps =
pytest==7.2.1
pytest-cov==4.0.0
pytest==8.4.2
pytest-cov==7.0.0
passenv = PY_COLORS
setenv =
COVERAGE_FILE = {toxworkdir}/{envname}/.coverage
Expand All @@ -27,10 +27,9 @@ commands =
python -m build

[testenv:generate-integration-files]
basepython = python3.11
deps =
pytest==7.2.1
pytest-cov==4.0.0
pytest==8.4.2
pytest-cov==7.0.0
passenv = PY_COLORS
setenv =
PYTEST_ADDOPTS = --no-cov
Expand All @@ -45,10 +44,9 @@ commands =
ruff format --check src tests

[testenv:type]
basepython = python3.11
deps =
mypy==1.0.1
pytest==7.2.1 # for typing
mypy==1.18.2
pytest==8.4.2 # for typing
commands =
mypy
mypy --namespace-packages --explicit-package-bases tests