check-python-versions 0.22.0__tar.gz → 0.23.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/CHANGES.rst +17 -0
  2. {check-python-versions-0.22.0/src/check_python_versions.egg-info → check_python_versions-0.23.0}/PKG-INFO +21 -4
  3. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/README.rst +2 -2
  4. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/release.mk +4 -4
  5. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/setup.cfg +0 -6
  6. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/setup.py +2 -1
  7. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/__init__.py +1 -1
  8. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/cli.py +11 -3
  9. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/parsers/poetry_version_spec.py +7 -10
  10. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/parsers/requires_python.py +6 -9
  11. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/parsers/yaml.py +1 -1
  12. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/versions.py +1 -1
  13. {check-python-versions-0.22.0 → check_python_versions-0.23.0/src/check_python_versions.egg-info}/PKG-INFO +21 -4
  14. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions.egg-info/SOURCES.txt +0 -1
  15. check_python_versions-0.23.0/src/check_python_versions.egg-info/requires.txt +2 -0
  16. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/test_cli.py +28 -0
  17. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tox.ini +1 -1
  18. check-python-versions-0.22.0/appveyor.yml +0 -32
  19. check-python-versions-0.22.0/src/check_python_versions.egg-info/requires.txt +0 -5
  20. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/.coveragerc +0 -0
  21. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/.gitignore +0 -0
  22. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/.pre-commit-hooks.yaml +0 -0
  23. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/CLASSIFIERS +0 -0
  24. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/LICENSE +0 -0
  25. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/MANIFEST.in +0 -0
  26. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/Makefile +0 -0
  27. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/check-python-versions +0 -0
  28. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/pytest.ini +0 -0
  29. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/__main__.py +0 -0
  30. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/parsers/__init__.py +0 -0
  31. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/parsers/classifiers.py +0 -0
  32. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/parsers/ini.py +0 -0
  33. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/parsers/python.py +0 -0
  34. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/__init__.py +0 -0
  35. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/all.py +0 -0
  36. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/appveyor.py +0 -0
  37. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/base.py +0 -0
  38. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/github.py +0 -0
  39. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/manylinux.py +0 -0
  40. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/pyproject.py +0 -0
  41. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/setup_py.py +0 -0
  42. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/tox.py +0 -0
  43. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/sources/travis.py +0 -0
  44. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions/utils.py +0 -0
  45. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions.egg-info/dependency_links.txt +0 -0
  46. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions.egg-info/entry_points.txt +0 -0
  47. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions.egg-info/not-zip-safe +0 -0
  48. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/src/check_python_versions.egg-info/top_level.txt +0 -0
  49. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/__init__.py +0 -0
  50. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/conftest.py +0 -0
  51. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/parsers/test_classifiers.py +0 -0
  52. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/parsers/test_ini.py +0 -0
  53. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/parsers/test_poetry_version_spec.py +0 -0
  54. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/parsers/test_python.py +0 -0
  55. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/parsers/test_requires_python.py +0 -0
  56. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/parsers/test_yaml.py +0 -0
  57. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/sources/test_appveyor.py +0 -0
  58. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/sources/test_github.py +0 -0
  59. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/sources/test_manylinux.py +0 -0
  60. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/sources/test_pyproject.py +0 -0
  61. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/sources/test_setup_py.py +0 -0
  62. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/sources/test_tox.py +0 -0
  63. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/sources/test_travis.py +0 -0
  64. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/test___main__.py +0 -0
  65. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/test_utils.py +0 -0
  66. {check-python-versions-0.22.0 → check_python_versions-0.23.0}/tests/test_versions.py +0 -0
@@ -1,6 +1,23 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ 0.23.0 (2025-10-14)
5
+ -------------------
6
+
7
+ - Add support for Python 3.14: treat it as a released version, run CI tests on
8
+ 3.14.
9
+
10
+ - New option ``--allow-non-packages`` so you can automate tox.ini or GitHub
11
+ workflow updates in projects that are not Python packages.
12
+
13
+
14
+ 0.22.1 (2024-10-09)
15
+ -------------------
16
+
17
+ - Add support for Python 3.13: treat it as a released version, run CI tests on
18
+ 3.13.
19
+
20
+
4
21
  0.22.0 (2023-10-04)
5
22
  -------------------
6
23
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: check-python-versions
3
- Version: 0.22.0
3
+ Version: 0.23.0
4
4
  Summary: Compare supported Python versions in setup.py vs tox.ini et al.
5
5
  Home-page: https://github.com/mgedmin/check-python-versions
6
6
  Author: Marius Gedminas
@@ -20,11 +20,28 @@ Classifier: Programming Language :: Python :: 3.9
20
20
  Classifier: Programming Language :: Python :: 3.10
21
21
  Classifier: Programming Language :: Python :: 3.11
22
22
  Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
23
25
  Classifier: Programming Language :: Python :: Implementation :: CPython
24
26
  Classifier: Programming Language :: Python :: Implementation :: PyPy
25
27
  Requires-Python: >=3.8
26
28
  Description-Content-Type: text/x-rst
27
29
  License-File: LICENSE
30
+ Requires-Dist: pyyaml
31
+ Requires-Dist: tomlkit
32
+ Dynamic: author
33
+ Dynamic: author-email
34
+ Dynamic: classifier
35
+ Dynamic: description
36
+ Dynamic: description-content-type
37
+ Dynamic: home-page
38
+ Dynamic: keywords
39
+ Dynamic: license
40
+ Dynamic: license-file
41
+ Dynamic: project-url
42
+ Dynamic: requires-dist
43
+ Dynamic: requires-python
44
+ Dynamic: summary
28
45
 
29
46
  check-python-versions
30
47
  =====================
@@ -37,7 +54,7 @@ check-python-versions
37
54
  :target: https://pypi.org/project/check-python-versions/
38
55
  :alt: Supported Python versions
39
56
 
40
- .. image:: https://github.com/mgedmin/check-python-versions/workflows/build/badge.svg?branch=master
57
+ .. image:: https://github.com/mgedmin/check-python-versions/actions/workflows/build.yml/badge.svg?branch=master
41
58
  :target: https://github.com/mgedmin/check-python-versions/actions
42
59
  :alt: Build status
43
60
 
@@ -412,6 +429,6 @@ Add the following snippet to your ``.pre-commit-config.yaml``.
412
429
 
413
430
  repos:
414
431
  - repo: https://github.com/mgedmin/check-python-versions
415
- rev: "0.22.0"
432
+ rev: "0.23.0"
416
433
  hooks:
417
434
  - id: check-python-versions
@@ -9,7 +9,7 @@ check-python-versions
9
9
  :target: https://pypi.org/project/check-python-versions/
10
10
  :alt: Supported Python versions
11
11
 
12
- .. image:: https://github.com/mgedmin/check-python-versions/workflows/build/badge.svg?branch=master
12
+ .. image:: https://github.com/mgedmin/check-python-versions/actions/workflows/build.yml/badge.svg?branch=master
13
13
  :target: https://github.com/mgedmin/check-python-versions/actions
14
14
  :alt: Build status
15
15
 
@@ -384,6 +384,6 @@ Add the following snippet to your ``.pre-commit-config.yaml``.
384
384
 
385
385
  repos:
386
386
  - repo: https://github.com/mgedmin/check-python-versions
387
- rev: "0.22.0"
387
+ rev: "0.23.0"
388
388
  hooks:
389
389
  - id: check-python-versions
@@ -1,4 +1,4 @@
1
- # release.mk version 2.1 (2021-04-19)
1
+ # release.mk version 2.2.3 (2024-10-10)
2
2
  #
3
3
  # Helpful Makefile rules for releasing Python packages.
4
4
  # https://github.com/mgedmin/python-project-skel
@@ -12,7 +12,7 @@ DISTCHECK_DIFF_OPTS ?= $(DISTCHECK_DIFF_DEFAULT_OPTS)
12
12
 
13
13
  # These should be fine
14
14
  PYTHON ?= python3
15
- PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) setup.py -q sdist bdist_wheel && twine check dist/* && twine upload dist/*
15
+ PYPI_PUBLISH ?= rm -rf dist && $(PYTHON) -m build && twine check dist/* && twine upload dist/*
16
16
  LATEST_RELEASE_MK_URL = https://raw.githubusercontent.com/mgedmin/python-project-skel/master/release.mk
17
17
  DISTCHECK_DIFF_DEFAULT_OPTS = -x PKG-INFO -x setup.cfg -x '*.egg-info' -x .github -I'^\#'
18
18
 
@@ -44,7 +44,7 @@ help:
44
44
 
45
45
  .PHONY: dist
46
46
  dist:
47
- $(PYTHON) setup.py -q sdist bdist_wheel
47
+ $(PYTHON) -m build
48
48
 
49
49
  # Provide a default 'make check' to be the same as 'make test', since that's
50
50
  # what 80% of my projects use, but make it possible to override. Now
@@ -79,7 +79,7 @@ endif
79
79
 
80
80
  .PHONY: distcheck-sdist
81
81
  distcheck-sdist: dist
82
- pkg_and_version=`$(PYTHON) setup.py --name`-`$(PYTHON) setup.py --version` && \
82
+ pkg_and_version=`$(PYTHON) setup.py --name|tr A-Z.- a-z__`-`$(PYTHON) setup.py --version` && \
83
83
  rm -rf tmp && \
84
84
  mkdir tmp && \
85
85
  $(VCS_EXPORT) && \
@@ -1,9 +1,3 @@
1
- [bdist_wheel]
2
- universal = 1
3
-
4
- [metadata]
5
- license_files = LICENSE
6
-
7
1
  [zest.releaser]
8
2
  python-file-with-version = src/check_python_versions/__init__.py
9
3
 
@@ -56,6 +56,8 @@ setup(
56
56
  'Programming Language :: Python :: 3.10',
57
57
  'Programming Language :: Python :: 3.11',
58
58
  'Programming Language :: Python :: 3.12',
59
+ 'Programming Language :: Python :: 3.13',
60
+ 'Programming Language :: Python :: 3.14',
59
61
  'Programming Language :: Python :: Implementation :: CPython',
60
62
  'Programming Language :: Python :: Implementation :: PyPy',
61
63
  ],
@@ -71,7 +73,6 @@ setup(
71
73
  install_requires=[
72
74
  'pyyaml',
73
75
  'tomlkit',
74
- 'typing_extensions; python_version < "3.8"',
75
76
  ],
76
77
  zip_safe=False,
77
78
  )
@@ -13,4 +13,4 @@ Makes sure the set of supported Python versions is consistent between
13
13
  """
14
14
 
15
15
  __author__ = 'Marius Gedminas <marius@gedmin.as>'
16
- __version__ = '0.22.0'
16
+ __version__ = '0.23.0'
@@ -370,6 +370,10 @@ def _main() -> None:
370
370
  parser.add_argument('--skip-non-packages', action='store_true',
371
371
  help='skip arguments that are not Python packages'
372
372
  ' without warning about them')
373
+ parser.add_argument('--allow-non-packages', action='store_true',
374
+ help='try to work on directories that are not Python'
375
+ ' packages but have a tox.ini'
376
+ ' or .github/workflows')
373
377
  parser.add_argument('--only', metavar='FILES',
374
378
  help='check only the specified files'
375
379
  ' (comma-separated list, e.g.'
@@ -399,6 +403,9 @@ def _main() -> None:
399
403
  parser.error("argument --add: not allowed with argument --update")
400
404
  if args.update and args.drop:
401
405
  parser.error("argument --drop: not allowed with argument --update")
406
+ if args.skip_non_packages and args.allow_non_packages:
407
+ parser.error("use either --skip-non-packages or --allow-non-packages,"
408
+ " not both")
402
409
  if args.diff and not (args.update or args.add or args.drop):
403
410
  parser.error(
404
411
  "argument --diff: not allowed without --update/--add/--drop")
@@ -431,9 +438,10 @@ def _main() -> None:
431
438
  if n:
432
439
  print("\n")
433
440
  print(f"{path}:\n")
434
- if not check_package(path):
435
- mismatches.append(path)
436
- continue
441
+ if not args.allow_non_packages:
442
+ if not check_package(path):
443
+ mismatches.append(path)
444
+ continue
437
445
  replacements = {}
438
446
  if args.add or args.drop or args.update:
439
447
  replacements = update_versions(
@@ -6,8 +6,7 @@ https://python-poetry.org/docs/dependency-specification/#version-constraints
6
6
  """
7
7
 
8
8
  import re
9
- from functools import partial
10
- from typing import Callable, Dict, List, Optional, Tuple, Union
9
+ from typing import Callable, Dict, List, Optional, Tuple, TypedDict, Union
11
10
 
12
11
  from ..utils import warn
13
12
  from ..versions import (
@@ -18,12 +17,6 @@ from ..versions import (
18
17
  )
19
18
 
20
19
 
21
- try:
22
- from typing import TypedDict
23
- except ImportError: # pragma: nocover
24
- from typing_extensions import TypedDict
25
-
26
-
27
20
  def parse_poetry_version_constraint(
28
21
  s: str,
29
22
  name: str = "tool.poetry.dependencies.python",
@@ -61,7 +54,11 @@ def parse_poetry_version_constraint(
61
54
  #
62
55
 
63
56
  handlers: Dict[str, HandlerFn] = {}
64
- handler = partial(partial, handlers.__setitem__)
57
+
58
+ def handler(operator: str) -> Callable[[HandlerFn], None]:
59
+ def decorator(fn: HandlerFn) -> None:
60
+ handlers[operator] = fn
61
+ return decorator
65
62
 
66
63
  #
67
64
  # We are not doing a strict version check here because if the spec says,
@@ -231,7 +228,7 @@ def detect_poetry_version_spec_style(spec: str) -> VersionSpecStyle:
231
228
  """Determine how a python_requires string was formatted.
232
229
 
233
230
  The return value is a dict of kwargs that can be splatted
234
- into compute_python_requires(..., **style).
231
+ into compute_poetry_spec(..., **style).
235
232
  """
236
233
  comma = ', '
237
234
  if ',' in spec and ', ' not in spec:
@@ -2,8 +2,7 @@
2
2
  Tools for manipulating requires-python PyPI classifiers.
3
3
  """
4
4
  import re
5
- from functools import partial
6
- from typing import Callable, Dict, List, Optional, Tuple, Union
5
+ from typing import Callable, Dict, List, Optional, Tuple, TypedDict, Union
7
6
 
8
7
  from ..utils import warn
9
8
  from ..versions import (
@@ -14,12 +13,6 @@ from ..versions import (
14
13
  )
15
14
 
16
15
 
17
- try:
18
- from typing import TypedDict
19
- except ImportError: # pragma: nocover
20
- from typing_extensions import TypedDict
21
-
22
-
23
16
  def parse_python_requires(
24
17
  s: str,
25
18
  name: str = "python_requires",
@@ -58,7 +51,11 @@ def parse_python_requires(
58
51
  #
59
52
 
60
53
  handlers: Dict[str, HandlerFn] = {}
61
- handler = partial(partial, handlers.__setitem__)
54
+
55
+ def handler(operator: str) -> Callable[[HandlerFn], None]:
56
+ def decorator(fn: HandlerFn) -> None:
57
+ handlers[operator] = fn
58
+ return decorator
62
59
 
63
60
  #
64
61
  # We are not doing a strict PEP-440 implementation here because if
@@ -111,7 +111,7 @@ def update_yaml_list(
111
111
  if kept_last:
112
112
  if replacements and value in replacements:
113
113
  lines_to_keep.append(
114
- f"{' '* indent}- {replacements[value]}\n"
114
+ f"{' ' * indent}- {replacements[value]}\n"
115
115
  )
116
116
  else:
117
117
  lines_to_keep.append(line)
@@ -11,7 +11,7 @@ from typing import Collection, List, NamedTuple, Optional, Set, Union
11
11
 
12
12
  MAX_PYTHON_1_VERSION = 6 # i.e. 1.6
13
13
  MAX_PYTHON_2_VERSION = 7 # i.e. 2.7
14
- CURRENT_PYTHON_3_VERSION = 12 # i.e. 3.12
14
+ CURRENT_PYTHON_3_VERSION = 14 # i.e. 3.14
15
15
 
16
16
  MAX_MINOR_FOR_MAJOR = {
17
17
  1: MAX_PYTHON_1_VERSION,
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: check-python-versions
3
- Version: 0.22.0
3
+ Version: 0.23.0
4
4
  Summary: Compare supported Python versions in setup.py vs tox.ini et al.
5
5
  Home-page: https://github.com/mgedmin/check-python-versions
6
6
  Author: Marius Gedminas
@@ -20,11 +20,28 @@ Classifier: Programming Language :: Python :: 3.9
20
20
  Classifier: Programming Language :: Python :: 3.10
21
21
  Classifier: Programming Language :: Python :: 3.11
22
22
  Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: 3.14
23
25
  Classifier: Programming Language :: Python :: Implementation :: CPython
24
26
  Classifier: Programming Language :: Python :: Implementation :: PyPy
25
27
  Requires-Python: >=3.8
26
28
  Description-Content-Type: text/x-rst
27
29
  License-File: LICENSE
30
+ Requires-Dist: pyyaml
31
+ Requires-Dist: tomlkit
32
+ Dynamic: author
33
+ Dynamic: author-email
34
+ Dynamic: classifier
35
+ Dynamic: description
36
+ Dynamic: description-content-type
37
+ Dynamic: home-page
38
+ Dynamic: keywords
39
+ Dynamic: license
40
+ Dynamic: license-file
41
+ Dynamic: project-url
42
+ Dynamic: requires-dist
43
+ Dynamic: requires-python
44
+ Dynamic: summary
28
45
 
29
46
  check-python-versions
30
47
  =====================
@@ -37,7 +54,7 @@ check-python-versions
37
54
  :target: https://pypi.org/project/check-python-versions/
38
55
  :alt: Supported Python versions
39
56
 
40
- .. image:: https://github.com/mgedmin/check-python-versions/workflows/build/badge.svg?branch=master
57
+ .. image:: https://github.com/mgedmin/check-python-versions/actions/workflows/build.yml/badge.svg?branch=master
41
58
  :target: https://github.com/mgedmin/check-python-versions/actions
42
59
  :alt: Build status
43
60
 
@@ -412,6 +429,6 @@ Add the following snippet to your ``.pre-commit-config.yaml``.
412
429
 
413
430
  repos:
414
431
  - repo: https://github.com/mgedmin/check-python-versions
415
- rev: "0.22.0"
432
+ rev: "0.23.0"
416
433
  hooks:
417
434
  - id: check-python-versions
@@ -7,7 +7,6 @@ LICENSE
7
7
  MANIFEST.in
8
8
  Makefile
9
9
  README.rst
10
- appveyor.yml
11
10
  check-python-versions
12
11
  pytest.ini
13
12
  release.mk
@@ -739,6 +739,34 @@ def test_main_skip_non_packages(monkeypatch, capsys, tmp_path):
739
739
  assert capsys.readouterr().out == ''
740
740
 
741
741
 
742
+ def test_main_allow_non_packages(monkeypatch, capsys, tmp_path):
743
+ monkeypatch.setattr(sys, 'argv', [
744
+ 'check-python-versions', '--allow-non-packages', str(tmp_path),
745
+ ])
746
+ with pytest.raises(SystemExit) as exc_info:
747
+ cpv.main()
748
+ assert (
749
+ capsys.readouterr().out + str(exc_info.value) + '\n'
750
+ ).replace(str(tmp_path), 'tmp') == textwrap.dedent("""\
751
+ no file with version information found
752
+
753
+ mismatch!
754
+ """)
755
+
756
+
757
+ def test_main_conflicting_non_packages_options(monkeypatch, capsys, tmp_path):
758
+ monkeypatch.setattr(sys, 'argv', [
759
+ 'check-python-versions', '--skip-non-packages', '--allow-non-packages',
760
+ str(tmp_path),
761
+ ])
762
+ with pytest.raises(SystemExit):
763
+ cpv.main()
764
+ assert (
765
+ 'use either --skip-non-packages or --allow-non-packages, not both'
766
+ in capsys.readouterr().err
767
+ )
768
+
769
+
742
770
  def test_main_single(monkeypatch, capsys, tmp_path):
743
771
  monkeypatch.setattr(sys, 'argv', [
744
772
  'check-python-versions',
@@ -1,5 +1,5 @@
1
1
  [tox]
2
- envlist = py38,py39,py310,py311,py312,pypy3,flake8,mypy,isort,coverage
2
+ envlist = py38,py39,py310,py311,py312,py313,py314,pypy3,flake8,mypy,isort,coverage
3
3
 
4
4
  [testenv]
5
5
  deps =
@@ -1,32 +0,0 @@
1
- version: build-{build}-{branch}
2
-
3
- environment:
4
- matrix:
5
- # https://www.appveyor.com/docs/installed-software#python lists available
6
- # versions
7
- - PYTHON: "C:\\Python38"
8
- - PYTHON: "C:\\Python39"
9
- - PYTHON: "C:\\Python310"
10
- - PYTHON: "C:\\Python311"
11
- - PYTHON: "C:\\Python312"
12
-
13
- init:
14
- - "echo %PYTHON%"
15
-
16
- install:
17
- - ps: |
18
- if (-not (Test-Path $env:PYTHON)) {
19
- curl -o install_python.ps1 https://raw.githubusercontent.com/matthew-brett/multibuild/11a389d78892cf90addac8f69433d5e22bfa422a/install_python.ps1
20
- .\install_python.ps1
21
- }
22
- - ps: if (-not (Test-Path $env:PYTHON)) { throw "No $env:PYTHON" }
23
- - "set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
24
- - python --version
25
- - pip install -U virtualenv # upgrade pip in tox's virtualenvs
26
- - pip install setuptools # the test suite needs the system python to have setuptools
27
- - pip install tox
28
-
29
- build: off
30
-
31
- test_script:
32
- - tox -e py
@@ -1,5 +0,0 @@
1
- pyyaml
2
- tomlkit
3
-
4
- [:python_version < "3.8"]
5
- typing_extensions