#2 Update to 0.12.1
Merged a year ago by dcavalca. Opened a year ago by dcavalca.
rpms/ dcavalca/python-typeguard v0.12.0  into  rawhide

file modified
+11 -3
@@ -1,8 +1,8 @@ 

  %global pypi_name typeguard

  

  Name:           python-%{pypi_name}

- Version:        2.10.0

- Release:        4%{?dist}

+ Version:        2.12.1

+ Release:        1%{?dist}

  Summary:        Run-time type checker for Python

  License:        MIT

  URL:            https://github.com/agronholm/%{pypi_name}
@@ -23,6 +23,7 @@ 

  BuildRequires:    python3-pytest

  BuildRequires:    python3-pytest-cov

  BuildRequires:    python3-typing-extensions

+ BuildRequires:    python3-mypy

  %if %{undefined __pythondist_requires}

  Requires:         python3-six >= 1.9.0

  %endif
@@ -51,7 +52,10 @@ 

  %py3_install

  

  %check

- %{python3} -m pytest

+ %pytest \

+   --deselect tests/test_importhook.py::test_cached_module \

+   --deselect tests/test_typeguard.py::TestTypeChecked::test_literal \

+   --ignore tests/mypy/test_type_annotations.py

  

  %files -n python3-%{pypi_name}

  %doc README.rst
@@ -60,6 +64,10 @@ 

  %{python3_sitelib}/%{pypi_name}-*.egg-info/

  

  %changelog

+ * Tue Jun 08 2021 Davide Cavalca <dcavalca@fedoraproject.org> - 2.12.1-1

+ - Update to 2.12.1

+ - Gate out broken tests

+ 

  * Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.10.0-4

  - Rebuilt for Python 3.10

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (typeguard-2.10.0.tar.gz) = d9b4acd49d0558286aea3e4352e6a4f3e0cba257b29278c71cb0c2c34fc99f59495564c6b23bffa574d99ac67a0fa5fbb4744a8d3fca09d4f4da414611676625

+ SHA512 (typeguard-2.12.1.tar.gz) = 45d96587b6f348366207303824c3e92133a4ed143893fea12208d32767608fe79d11e99d165ba5856f259e8c38378e493ad2ae2e6ebd2516d2e3efdd555e2cd7

This should fix https://bugzilla.redhat.com/show_bug.cgi?id=1900764 and in turn unblock python-TestSlide and other packages. Putting it up here for review as there's a couple of test failures I had to skip:

============================= test session starts ==============================
platform linux -- Python 3.9.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /builddir/build/BUILD/typeguard-2.12.0, configfile: pyproject.toml, testpaths: tests
plugins: typeguard-2.12.0, cov-2.11.1
collected 239 items

tests/test_importhook.py F................                               [  7%]
tests/test_typeguard.py ................................................ [ 27%]
........................................................................ [ 57%]
........................................................................ [ 87%]
...............                                                          [ 93%]
tests/test_typeguard_py36.py .............                               [ 99%]
tests/mypy/test_type_annotations.py FF                                   [100%]

=================================== FAILURES ===================================
______________________________ test_cached_module ______________________________
tests/test_importhook.py:33: in test_cached_module
    assert cached_module_path.is_file()
E   AssertionError: assert False
E    +  where False = <bound method Path.is_file of PosixPath('/builddir/build/BUILD/typeguard-2.12.0/tests/__pycache__/dummymodule.cpython-39.opt-typeguard.pyc')>()
E    +    where <bound method Path.is_file of PosixPath('/builddir/build/BUILD/typeguard-2.12.0/tests/__pycache__/dummymodule.cpython-39.opt-typeguard.pyc')> = PosixPath('/builddir/build/BUILD/typeguard-2.12.0/tests/__pycache__/dummymodule.cpython-39.opt-typeguard.pyc').is_file
________________________________ test_positive _________________________________
/builddir/build/BUILD/typeguard-2.12.0/tests/mypy/test_type_annotations.py:83: in test_positive
    subprocess.check_call(get_mypy_cmd(POSITIVE_FILE))
/usr/lib64/python3.9/subprocess.py:373: in check_call
    raise CalledProcessError(retcode, cmd)
E   subprocess.CalledProcessError: Command '['mypy', '--strict', 'positive.py']' returned non-zero exit status 1.
----------------------------- Captured stdout call -----------------------------
positive.py:2: error: Cannot find implementation or library stub for module named 'typeguard'
positive.py:2: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
positive.py:5: error: Untyped decorator makes function "foo" untyped
positive.py:18: error: Returning Any from function declared to return "bool"
positive.py:40: error: Untyped decorator makes function "get_value_checked" untyped
positive.py:49: error: Untyped decorator makes function "create_myclass_checked" untyped
Found 5 errors in 1 file (checked 1 source file)
________________________________ test_negative _________________________________
/builddir/build/BUILD/typeguard-2.12.0/tests/mypy/test_type_annotations.py:96: in test_negative
    raise RuntimeError(
E   RuntimeError: Expected error lines {32, 11, 16, 20, 52, 53, 24, 28, 31} does not match mypy error lines {1, 4, 9, 11, 14, 16, 20, 52, 53, 24, 28}.
======================== 3 failed, 236 passed in 3.69s =========================

rebased onto 24c2daf

a year ago

rebased onto 1338d41

a year ago
+ /usr/bin/pytest --deselect tests/test_importhook.py::test_cached_module --ignore tests/mypy/test_type_annotations.py
============================= test session starts ==============================
platform linux -- Python 3.10.0b2, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /builddir/build/BUILD/typeguard-2.12.1, configfile: pyproject.toml, testpaths: tests
plugins: typeguard-2.12.1, cov-2.11.1
collected 238 items / 1 deselected / 237 selected
tests/test_importhook.py ................                                [  6%]
tests/test_typeguard.py ................................................ [ 27%]
........................................................................ [ 57%]
...............................................................F........ [ 87%]
...............                                                          [ 94%]
tests/test_typeguard_py36.py ..............                              [100%]
=================================== FAILURES ===================================
_________________________ TestTypeChecked.test_literal _________________________
tests/test_typeguard.py:1275: in test_literal
    pytest.raises(TypeError, foo, 4).match(r"must be one of \(1, True, 'x', b'y', "
E   AssertionError: Regex pattern "must be one of \\(1, True, 'x', b'y', <HTTPStatus.ACCEPTED: 202>\\); got 4 instead$" does not match 'the value of argument "a" must be one of (1, True, \'x\', b\'y\', HTTPStatus.ACCEPTED); got 4 instead'.
=============================== warnings summary ===============================
tests/test_typeguard_py36.py::TestTypeChecker::test_callable
  /builddir/build/BUILDROOT/python-typeguard-2.12.1-1.fc35.noarch/usr/lib/python3.10/site-packages/typeguard/__init__.py:921: UserWarning: no code associated -- not typechecking test_typeguard_py36.<test_typeguard_py36.TestTypeChecker.test_callable.<locals>.command object at 0x3ffa457b400>
    warn('no code associated -- not typechecking {}'.format(function_name(func)))
-- Docs: https://docs.pytest.org/en/stable/warnings.html
============ 1 failed, 236 passed, 1 deselected, 1 warning in 0.84s ============

I just tried a Koji scratch build, also got a s390x builder, and it's failing again. But a local mock run passes. I wonder if something is wonky here, will try this on a scratch build to see if it is indeed a weird arch issue:
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_noarch_with_unported_dependencies

aw, mock is still getting Python 3.9

after using mock --enablerepo=local, looks like adding this works to skip that failing test:

  --deselect tests/test_typeguard.py::TestTypeChecked::test_literal \

rebased onto e11bab3

a year ago

Pull-Request has been merged by dcavalca

a year ago
Metadata