Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-filelock for openSUSE:Factory 
checked in at 2023-09-08 21:15:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-filelock (Old)
 and      /work/SRC/openSUSE:Factory/.python-filelock.new.1766 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-filelock"

Fri Sep  8 21:15:16 2023 rev:15 rq:1109649 version:3.12.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-filelock/python-filelock.changes  
2023-06-21 22:37:32.121532065 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-filelock.new.1766/python-filelock.changes    
    2023-09-08 21:15:46.698979411 +0200
@@ -1,0 +2,13 @@
+Fri Sep  8 04:26:16 UTC 2023 - Steve Kowalik <steven.kowa...@suse.com>
+
+- Add missing Requires on typing-extensions if < 3.11 
+
+-------------------------------------------------------------------
+Thu Sep  7 11:00:28 UTC 2023 - Dirk Müller <dmuel...@suse.com>
+
+- update to 3.12.3:
+  * Fix import ordering
+  * Exclude dependabot and pre-commit ci from release notes
+  * Create parent directories if necessary
+
+-------------------------------------------------------------------

Old:
----
  filelock-3.12.2.tar.gz

New:
----
  filelock-3.12.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-filelock.spec ++++++
--- /var/tmp/diff_new_pack.KAfqIG/_old  2023-09-08 21:15:47.795018583 +0200
+++ /var/tmp/diff_new_pack.KAfqIG/_new  2023-09-08 21:15:47.799018726 +0200
@@ -19,7 +19,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-filelock
-Version:        3.12.2
+Version:        3.12.3
 Release:        0
 Summary:        Platform Independent File Lock in Python
 License:        Unlicense
@@ -33,6 +33,9 @@
 BuildRequires:  %{python_module wheel}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+%if 0%{?python_version_nodots} < 311
+Requires:       python-typing_extensions >= 4.7.1
+%endif
 BuildArch:      noarch
 %python_subpackages
 

++++++ filelock-3.12.2.tar.gz -> filelock-3.12.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/PKG-INFO new/filelock-3.12.3/PKG-INFO
--- old/filelock-3.12.2/PKG-INFO        2020-02-02 01:00:00.000000000 +0100
+++ new/filelock-3.12.3/PKG-INFO        2020-02-02 01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: filelock
-Version: 3.12.2
+Version: 3.12.3
 Summary: A platform independent file lock.
 Project-URL: Documentation, https://py-filelock.readthedocs.io
 Project-URL: Homepage, https://github.com/tox-dev/py-filelock
@@ -16,7 +16,6 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3 :: Only
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
@@ -25,22 +24,23 @@
 Classifier: Topic :: Internet
 Classifier: Topic :: Software Development :: Libraries
 Classifier: Topic :: System
-Requires-Python: >=3.7
+Requires-Python: >=3.8
+Requires-Dist: typing-extensions>=4.7.1; python_version < '3.11'
 Provides-Extra: docs
-Requires-Dist: furo>=2023.5.20; extra == 'docs'
-Requires-Dist: sphinx-autodoc-typehints!=1.23.4,>=1.23; extra == 'docs'
-Requires-Dist: sphinx>=7.0.1; extra == 'docs'
+Requires-Dist: furo>=2023.7.26; extra == 'docs'
+Requires-Dist: sphinx-autodoc-typehints!=1.23.4,>=1.24; extra == 'docs'
+Requires-Dist: sphinx>=7.1.2; extra == 'docs'
 Provides-Extra: testing
 Requires-Dist: covdefaults>=2.3; extra == 'testing'
-Requires-Dist: coverage>=7.2.7; extra == 'testing'
-Requires-Dist: diff-cover>=7.5; extra == 'testing'
+Requires-Dist: coverage>=7.3; extra == 'testing'
+Requires-Dist: diff-cover>=7.7; extra == 'testing'
 Requires-Dist: pytest-cov>=4.1; extra == 'testing'
-Requires-Dist: pytest-mock>=3.10; extra == 'testing'
+Requires-Dist: pytest-mock>=3.11.1; extra == 'testing'
 Requires-Dist: pytest-timeout>=2.1; extra == 'testing'
-Requires-Dist: pytest>=7.3.1; extra == 'testing'
+Requires-Dist: pytest>=7.4; extra == 'testing'
 Description-Content-Type: text/markdown
 
-# py-filelock
+# filelock
 
 
[![PyPI](https://img.shields.io/pypi/v/filelock)](https://pypi.org/project/filelock/)
 [![Supported Python
@@ -49,7 +49,7 @@
 
status](https://readthedocs.org/projects/py-filelock/badge/?version=latest)](https://py-filelock.readthedocs.io/en/latest/?badge=latest)
 [![Code style:
 
black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
-[![Downloads](https://pepy.tech/badge/filelock/month)](https://pepy.tech/project/filelock)
+[![Downloads](https://static.pepy.tech/badge/filelock/month)](https://pepy.tech/project/filelock)
 
[![check](https://github.com/tox-dev/py-filelock/actions/workflows/check.yml/badge.svg)](https://github.com/tox-dev/py-filelock/actions/workflows/check.yml)
 
 For more information checkout the [official 
documentation](https://py-filelock.readthedocs.io/en/latest/index.html).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/README.md 
new/filelock-3.12.3/README.md
--- old/filelock-3.12.2/README.md       2020-02-02 01:00:00.000000000 +0100
+++ new/filelock-3.12.3/README.md       2020-02-02 01:00:00.000000000 +0100
@@ -1,4 +1,4 @@
-# py-filelock
+# filelock
 
 
[![PyPI](https://img.shields.io/pypi/v/filelock)](https://pypi.org/project/filelock/)
 [![Supported Python
@@ -7,7 +7,7 @@
 
status](https://readthedocs.org/projects/py-filelock/badge/?version=latest)](https://py-filelock.readthedocs.io/en/latest/?badge=latest)
 [![Code style:
 
black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
-[![Downloads](https://pepy.tech/badge/filelock/month)](https://pepy.tech/project/filelock)
+[![Downloads](https://static.pepy.tech/badge/filelock/month)](https://pepy.tech/project/filelock)
 
[![check](https://github.com/tox-dev/py-filelock/actions/workflows/check.yml/badge.svg)](https://github.com/tox-dev/py-filelock/actions/workflows/check.yml)
 
 For more information checkout the [official 
documentation](https://py-filelock.readthedocs.io/en/latest/index.html).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/pyproject.toml 
new/filelock-3.12.3/pyproject.toml
--- old/filelock-3.12.2/pyproject.toml  2020-02-02 01:00:00.000000000 +0100
+++ new/filelock-3.12.3/pyproject.toml  2020-02-02 01:00:00.000000000 +0100
@@ -2,7 +2,7 @@
 build-backend = "hatchling.build"
 requires = [
   "hatch-vcs>=0.3",
-  "hatchling>=1.17.1",
+  "hatchling>=1.18",
 ]
 
 [project]
@@ -18,7 +18,7 @@
 ]
 license = "Unlicense"
 maintainers = [{ name = "Bernát Gábor", email = "gaborjber...@gmail.com" }]
-requires-python = ">=3.7"
+requires-python = ">=3.8"
 classifiers = [
   "Development Status :: 5 - Production/Stable",
   "Intended Audience :: Developers",
@@ -26,7 +26,6 @@
   "Operating System :: OS Independent",
   "Programming Language :: Python",
   "Programming Language :: Python :: 3 :: Only",
-  "Programming Language :: Python :: 3.7",
   "Programming Language :: Python :: 3.8",
   "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
@@ -39,18 +38,21 @@
 dynamic = [
   "version",
 ]
+dependencies = [
+  'typing-extensions>=4.7.1; python_version < "3.11"',
+]
 optional-dependencies.docs = [
-  "furo>=2023.5.20",
-  "sphinx>=7.0.1",
-  "sphinx-autodoc-typehints!=1.23.4,>=1.23",
+  "furo>=2023.7.26",
+  "sphinx>=7.1.2",
+  "sphinx-autodoc-typehints!=1.23.4,>=1.24",
 ]
 optional-dependencies.testing = [
   "covdefaults>=2.3",
-  "coverage>=7.2.7",
-  "diff-cover>=7.5",
-  "pytest>=7.3.1",
+  "coverage>=7.3",
+  "diff-cover>=7.7",
+  "pytest>=7.4",
   "pytest-cov>=4.1",
-  "pytest-mock>=3.10",
+  "pytest-mock>=3.11.1",
   "pytest-timeout>=2.1",
 ]
 urls.Documentation = "https://py-filelock.readthedocs.io";
@@ -60,32 +62,17 @@
 
 [tool.hatch]
 build.hooks.vcs.version-file = "src/filelock/version.py"
-build.targets.sdist.include = ["/src", "/tests"]
+build.targets.sdist.include = ["/src", "/tests", "/tox.ini"]
 version.source = "vcs"
 
 [tool.black]
 line-length = 120
 
-[tool.coverage]
-html.show_contexts = true
-html.skip_covered = false
-paths.source = ["src", ".tox/*/lib/*/site-packages", 
".tox\\*\\Lib\\site-packages", "**/src", "**\\src"]
-paths.other = [".", "*/py-filelock", "*\\py-filelock"]
-report.fail_under = 76
-run.parallel = true
-run.plugins = ["covdefaults"]
-
-[tool.mypy]
-python_version = "3.11"
-show_error_codes = true
-strict = true
-overrides = [{ module = ["appdirs.*", "jnius.*"], ignore_missing_imports = 
true }]
-
 [tool.ruff]
 select = ["ALL"]
 line-length = 120
-target-version = "py37"
-isort = {known-first-party = ["platformdirs", "tests"], required-imports = 
["from __future__ import annotations"]}
+target-version = "py38"
+isort = {known-first-party = ["filelock"], required-imports = ["from 
__future__ import annotations"]}
 ignore = [
     "ANN101",  # Missing type annotation for `self` in method
     "D301",  #  Use `r"""` if any backslashes in a docstring
@@ -104,3 +91,18 @@
     "S603",  # `subprocess` call: check for execution of untrusted input
     "PLR2004",  # Magic value used in comparison, consider replacing with a 
constant variable
 ]
+
+[tool.coverage]
+html.show_contexts = true
+html.skip_covered = false
+paths.source = ["src", ".tox/*/lib/*/site-packages", 
".tox\\*\\Lib\\site-packages", "**/src", "**\\src"]
+paths.other = [".", "*/filelock", "*\\filelock"]
+report.fail_under = 76
+run.parallel = true
+run.plugins = ["covdefaults"]
+
+[tool.mypy]
+python_version = "3.11"
+show_error_codes = true
+strict = true
+overrides = [{ module = ["appdirs.*", "jnius.*"], ignore_missing_imports = 
true }]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/src/filelock/__init__.py 
new/filelock-3.12.3/src/filelock/__init__.py
--- old/filelock-3.12.2/src/filelock/__init__.py        2020-02-02 
01:00:00.000000000 +0100
+++ new/filelock-3.12.3/src/filelock/__init__.py        2020-02-02 
01:00:00.000000000 +0100
@@ -24,8 +24,8 @@
 
 if sys.platform == "win32":  # pragma: win32 cover
     _FileLock: type[BaseFileLock] = WindowsFileLock
-else:  # pragma: win32 no cover
-    if has_fcntl:  # noqa: PLR5501
+else:  # pragma: win32 no cover # noqa: PLR5501
+    if has_fcntl:
         _FileLock: type[BaseFileLock] = UnixFileLock
     else:
         _FileLock = SoftFileLock
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/src/filelock/_api.py 
new/filelock-3.12.3/src/filelock/_api.py
--- old/filelock-3.12.2/src/filelock/_api.py    2020-02-02 01:00:00.000000000 
+0100
+++ new/filelock-3.12.3/src/filelock/_api.py    2020-02-02 01:00:00.000000000 
+0100
@@ -13,8 +13,15 @@
 from ._error import Timeout
 
 if TYPE_CHECKING:
+    import sys
     from types import TracebackType
 
+    if sys.version_info >= (3, 11):  # pragma: no cover (py311+)
+        from typing import Self
+    else:  # pragma: no cover (<py311)
+        from typing_extensions import Self
+
+
 _LOGGER = logging.getLogger("filelock")
 
 
@@ -71,7 +78,7 @@
 
     def __init__(
         self,
-        lock_file: str | os.PathLike[Any],
+        lock_file: str | os.PathLike[str],
         timeout: float = -1,
         mode: int = 0o644,
         thread_local: bool = True,  # noqa: FBT001, FBT002
@@ -246,7 +253,7 @@
                 self._context.lock_counter = 0
                 _LOGGER.debug("Lock %s released on %s", lock_id, lock_filename)
 
-    def __enter__(self) -> BaseFileLock:
+    def __enter__(self) -> Self:
         """
         Acquire the lock.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/src/filelock/_soft.py 
new/filelock-3.12.3/src/filelock/_soft.py
--- old/filelock-3.12.2/src/filelock/_soft.py   2020-02-02 01:00:00.000000000 
+0100
+++ new/filelock-3.12.3/src/filelock/_soft.py   2020-02-02 01:00:00.000000000 
+0100
@@ -7,7 +7,7 @@
 from pathlib import Path
 
 from ._api import BaseFileLock
-from ._util import raise_on_not_writable_file
+from ._util import ensure_directory_exists, raise_on_not_writable_file
 
 
 class SoftFileLock(BaseFileLock):
@@ -15,6 +15,7 @@
 
     def _acquire(self) -> None:
         raise_on_not_writable_file(self.lock_file)
+        ensure_directory_exists(self.lock_file)
         # first check for exists and read-only mode as the open will mask this 
case as EEXIST
         flags = (
             os.O_WRONLY  # open for writing only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/src/filelock/_unix.py 
new/filelock-3.12.3/src/filelock/_unix.py
--- old/filelock-3.12.2/src/filelock/_unix.py   2020-02-02 01:00:00.000000000 
+0100
+++ new/filelock-3.12.3/src/filelock/_unix.py   2020-02-02 01:00:00.000000000 
+0100
@@ -7,6 +7,7 @@
 from typing import cast
 
 from ._api import BaseFileLock
+from ._util import ensure_directory_exists
 
 #: a flag to indicate if the fcntl API is available
 has_fcntl = False
@@ -33,6 +34,7 @@
         """Uses the :func:`fcntl.flock` to hard lock the lock file on unix 
systems."""
 
         def _acquire(self) -> None:
+            ensure_directory_exists(self.lock_file)
             open_flags = os.O_RDWR | os.O_CREAT | os.O_TRUNC
             fd = os.open(self.lock_file, open_flags, self._context.mode)
             with suppress(PermissionError):  # This locked is not owned by 
this UID
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/src/filelock/_util.py 
new/filelock-3.12.3/src/filelock/_util.py
--- old/filelock-3.12.2/src/filelock/_util.py   2020-02-02 01:00:00.000000000 
+0100
+++ new/filelock-3.12.3/src/filelock/_util.py   2020-02-02 01:00:00.000000000 
+0100
@@ -4,6 +4,7 @@
 import stat
 import sys
 from errno import EACCES, EISDIR
+from pathlib import Path
 
 
 def raise_on_not_writable_file(filename: str) -> None:
@@ -32,6 +33,15 @@
                 raise IsADirectoryError(EISDIR, "Is a directory", filename)
 
 
+def ensure_directory_exists(filename: Path | str) -> None:
+    """
+    Ensure the directory containing the file exists (create it if necessary)
+    :param filename: file.
+    """
+    Path(filename).parent.mkdir(parents=True, exist_ok=True)
+
+
 __all__ = [
     "raise_on_not_writable_file",
+    "ensure_directory_exists",
 ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/src/filelock/_windows.py 
new/filelock-3.12.3/src/filelock/_windows.py
--- old/filelock-3.12.2/src/filelock/_windows.py        2020-02-02 
01:00:00.000000000 +0100
+++ new/filelock-3.12.3/src/filelock/_windows.py        2020-02-02 
01:00:00.000000000 +0100
@@ -8,7 +8,7 @@
 from typing import cast
 
 from ._api import BaseFileLock
-from ._util import raise_on_not_writable_file
+from ._util import ensure_directory_exists, raise_on_not_writable_file
 
 if sys.platform == "win32":  # pragma: win32 cover
     import msvcrt
@@ -18,6 +18,7 @@
 
         def _acquire(self) -> None:
             raise_on_not_writable_file(self.lock_file)
+            ensure_directory_exists(self.lock_file)
             flags = (
                 os.O_RDWR  # open for read and write
                 | os.O_CREAT  # create file if not exists
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/src/filelock/version.py 
new/filelock-3.12.3/src/filelock/version.py
--- old/filelock-3.12.2/src/filelock/version.py 2020-02-02 01:00:00.000000000 
+0100
+++ new/filelock-3.12.3/src/filelock/version.py 2020-02-02 01:00:00.000000000 
+0100
@@ -1,4 +1,4 @@
 # file generated by setuptools_scm
 # don't change, don't track in version control
-__version__ = version = '3.12.2'
-__version_tuple__ = version_tuple = (3, 12, 2)
+__version__ = version = '3.12.3'
+__version_tuple__ = version_tuple = (3, 12, 3)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/tests/test_filelock.py 
new/filelock-3.12.3/tests/test_filelock.py
--- old/filelock-3.12.2/tests/test_filelock.py  2020-02-02 01:00:00.000000000 
+0100
+++ new/filelock-3.12.3/tests/test_filelock.py  2020-02-02 01:00:00.000000000 
+0100
@@ -16,33 +16,27 @@
 from uuid import uuid4
 
 import pytest
+
 from filelock import BaseFileLock, FileLock, SoftFileLock, Timeout, 
UnixFileLock, WindowsFileLock
 
 if TYPE_CHECKING:
     from pytest_mock import MockerFixture
 
 
-@pytest.mark.parametrize(
-    ("lock_type", "path_type"),
-    [
-        (FileLock, str),
-        (FileLock, PurePath),
-        (FileLock, Path),
-        (SoftFileLock, str),
-        (SoftFileLock, PurePath),
-        (SoftFileLock, Path),
-    ],
-)
+@pytest.mark.parametrize("lock_type", [FileLock, SoftFileLock])
+@pytest.mark.parametrize("path_type", [str, PurePath, Path])
+@pytest.mark.parametrize("filename", ["a", "new/b", "new2/new3/c"])
 def test_simple(
     lock_type: type[BaseFileLock],
-    path_type: type[str] | type[Path],
+    path_type: type[str | Path],
+    filename: str,
     tmp_path: Path,
     caplog: pytest.LogCaptureFixture,
 ) -> None:
     caplog.set_level(logging.DEBUG)
 
     # test lock creation by passing a `str`
-    lock_path = tmp_path / "a"
+    lock_path = tmp_path / filename
     lock = lock_type(path_type(lock_path))
     with lock as locked:
         assert lock.is_locked
@@ -112,7 +106,6 @@
 @pytest.mark.parametrize(
     ("expected_error", "match", "bad_lock_file"),
     [
-        pytest.param(FileNotFoundError, "No such file or directory:", "a/b", 
id="non_existent_directory"),
         pytest.param(FileNotFoundError, "No such file or directory:", "", 
id="blank_filename"),
         pytest.param(ValueError, "embedded null (byte|character)", "\0", 
id="null_byte"),
         # Should be PermissionError on Windows
@@ -568,11 +561,8 @@
 
     lock_file, txt_file = tmp_path / "test.txt.lock", tmp_path / "test.txt"
     lock = lock_type(lock_file)
-    results = []
     with ThreadPoolExecutor() as executor:
-        for _ in range(100):
-            results.append(executor.submit(mess_with_file, lock))
-
+        results = [executor.submit(mess_with_file, lock) for _ in range(100)]
     assert all(r.result() is None for r in results)
 
 
@@ -584,10 +574,8 @@
 
     lock_file, txt_file = tmp_path / "test.txt.lock", tmp_path / "test.txt"
     lock = lock_type(lock_file)
-    results = []
     with ThreadPoolExecutor() as executor:
-        for _ in range(100):
-            results.append(executor.submit(mess_with_file))
+        results = [executor.submit(mess_with_file) for _ in range(100)]
 
     assert all(r.result() is None for r in results)
 
@@ -602,10 +590,8 @@
             _check_file_read_write(txt_file)
 
     lock_file, txt_file = tmp_path / "test.txt.lock", tmp_path / "test.txt"
-    results = []
     with ThreadPoolExecutor() as executor:
-        for _ in range(100):
-            results.append(executor.submit(mess_with_file))
+        results = [executor.submit(mess_with_file) for _ in range(100)]
 
     assert all(r.result() is None for r in results)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/filelock-3.12.2/tox.ini new/filelock-3.12.3/tox.ini
--- old/filelock-3.12.2/tox.ini 1970-01-01 01:00:00.000000000 +0100
+++ new/filelock-3.12.3/tox.ini 2020-02-02 01:00:00.000000000 +0100
@@ -0,0 +1,109 @@
+[tox]
+requires =
+    tox>=4.2
+env_list =
+    fix
+    py312
+    py311
+    py310
+    py39
+    py38
+    py37
+    type
+    coverage
+    docs
+    readme
+skip_missing_interpreters = true
+
+[testenv]
+description = run tests with {basepython}
+package = wheel
+wheel_build_env = .pkg
+extras =
+    testing
+pass_env =
+    PYTEST_ADDOPTS
+set_env =
+    COVERAGE_FILE = {toxworkdir}{/}.coverage.{envname}
+commands =
+    pytest {tty:--color=yes} {posargs: \
+      --junitxml {toxworkdir}{/}junit.{envname}.xml --cov 
{envsitepackagesdir}{/}filelock --cov {toxinidir}{/}tests \
+      --cov-config=pyproject.toml --no-cov-on-fail --cov-report 
term-missing:skip-covered --cov-context=test \
+      --cov-report html:{envtmpdir}{/}htmlcov --cov-report 
xml:{toxworkdir}{/}coverage.{envname}.xml \
+      tests
+    diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} 
{toxworkdir}{/}coverage.{envname}.xml}
+
+[testenv:fix]
+description = format the code base to adhere to our styles, and complain about 
what we cannot do automatically
+base_python = python3.10
+skip_install = true
+deps =
+    pre-commit>=3.3.3
+commands =
+    pre-commit run --all-files --show-diff-on-failure
+    python -c 'import pathlib; print("hint: run \{\} install to add checks as 
pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))'
+
+[testenv:type]
+description = run type check on code base
+deps =
+    mypy==1.5
+set_env =
+    {tty:MYPY_FORCE_COLOR = 1}
+commands =
+    mypy --strict src/filelock
+    mypy --strict tests
+
+[testenv:coverage]
+description = combine coverage files and generate diff (against DIFF_AGAINST 
defaulting to origin/main)
+skip_install = true
+deps =
+    covdefaults>=2.3
+    coverage[toml]>=7.3
+    diff-cover>=7.7
+extras =
+parallel_show_output = true
+pass_env =
+    DIFF_AGAINST
+set_env =
+    COVERAGE_FILE = {toxworkdir}/.coverage
+commands =
+    coverage combine
+    coverage report --skip-covered --show-missing
+    coverage xml -o {toxworkdir}/coverage.xml
+    coverage html -d {toxworkdir}/htmlcov
+    diff-cover --compare-branch {env:DIFF_AGAINST:origin/main} 
{toxworkdir}/coverage.xml
+depends =
+    py311
+    py310
+    py39
+    py38
+    py37
+
+[testenv:docs]
+description = build documentation
+extras =
+    docs
+commands =
+    sphinx-build -d "{envtmpdir}{/}doctree" docs "{toxworkdir}{/}docs_out" 
--color -b html -W {posargs}
+    python -c 'print(r"documentation available under 
file://{toxworkdir}{/}docs_out{/}index.html")'
+
+[testenv:readme]
+description = check that the long description is valid (need for PyPI)
+skip_install = true
+deps =
+    build[virtualenv]>=0.10
+    twine>=4.0.2
+extras =
+commands =
+    pyproject-build -o {envtmpdir} --wheel --sdist .
+    twine check {envtmpdir}/*
+
+[testenv:dev]
+description = generate a DEV environment
+package = editable
+extras =
+    docs
+    testing
+commands =
+    python -m pip list --format=columns
+    python -c 'import sys; print(sys.executable)'

Reply via email to