pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-typeguard



Module Name:    pkgsrc
Committed By:   wiz
Date:           Mon May  1 09:47:32 UTC 2023

Modified Files:
        pkgsrc/devel/py-typeguard: Makefile PLIST distinfo

Log Message:
py-typeguard: update to 3.0.2.

**3.0.2** (2023-03-22)

- Improved warnings by ensuring that they target user code and not Typeguard internal
  code
- Fixed ``warn_on_error()`` not showing where the type violation actually occurred
- Fixed local assignment to ``*args`` or ``**kwargs`` being type checked incorrectly
- Fixed ``TypeError`` on ``check_type(..., None)``
- Fixed unpacking assignment not working with a starred variable (``x, *y = ...``) in
  the target tuple
- Fixed variable multi-assignment (``a = b = c = ...``) being type checked incorrectly

**3.0.1** (2023-03-16)

- Improved the documentation
- Fixed assignment unpacking (``a, b = ...``) being checked incorrectly
- Fixed ``@typechecked`` attempting to instrument wrapper decorators such as
  ``@contextmanager`` when applied to a class
- Fixed ``py.typed`` missing from the wheel when not building from a git checkout

**3.0.0** (2023-03-15)

- **BACKWARD INCOMPATIBLE** Dropped the ``argname``, ``memo``, ``globals`` and
  ``locals`` arguments from ``check_type()``
- **BACKWARD INCOMPATIBLE** Removed the ``check_argument_types()`` and
  ``check_return_type()`` functions (use ``@typechecked`` instead)
- **BACKWARD INCOMPATIBLE** Moved ``install_import_hook`` to be directly importable
  from the ``typeguard`` module
- **BACKWARD INCOMPATIBLE** Changed the checking of collections (list, set, dict,
  sequence, mapping) to only check the first item by default. To get the old behavior,
  set ``typeguard.config.collection_check_strategy`` to
  ``CollectionCheckStrategy.ALL_ITEMS``
- **BACKWARD INCOMPATIBLE** Type checking failures now raise
  ``typeguard.TypeCheckError`` instead of ``TypeError``
- Dropped Python 3.5 and 3.6 support
- Dropped the deprecated profiler hook (``TypeChecker``)
- Added a configuration system
- Added support for custom type checking functions
- Added support for PEP 604 union types (``X | Y``) on all Python versions
- Added support for generic built-in collection types (``list[int]`` et al) on all
  Python versions
- Added support for checking arbitrary ``Mapping`` types
- Added support for the ``Self`` type
- Added support for ``typing.Never`` (and ``typing_extensions.Never``)
- Added support for ``Never`` and ``NoReturn`` in argument annotations
- Added support for ``LiteralString``
- Added support for ``TypeGuard``
- Added support for the subclassable ``Any`` on Python 3.11 and ``typing_extensions``
- Added the possibility to have the import hook instrument all packages
- Added the ``suppress_type_checks()`` context manager function for temporarily
  disabling type checks
- Much improved error messages showing where the type check failed
- Made it possible to apply ``@typechecked`` on top of ``@classmethod`` /
  ``@staticmethod`` (PR by jacobpbrugh)
- Changed ``check_type()`` to return the passed value, so it can be used (to an extent)
  in place of ``typing.cast()``, but with run-time type checking
- Replaced custom implementation of ``is_typeddict()`` with the implementation from
  ``typing_extensions`` v4.1.0
- Emit ``InstrumentationWarning`` instead of raising ``RuntimeError`` from the pytest
  plugin if modules in the target package have already been imported
- Fixed ``TypeError`` when checking against ``TypedDict`` when the value has mixed types
  among the extra keys (PR by biolds)
- Fixed incompatibility with ``typing_extensions`` v4.1+ on Python 3.10 (PR by David C.)
- Fixed checking of ``Tuple[()]`` on Python 3.11 and ``tuple[()]`` on Python 3.9+
- Fixed integers 0 and 1 passing for ``Literal[False]`` and ``Literal[True]``,
  respectively
- Fixed type checking of annotated variable positional and keyword arguments (``*args``
  and ``**kwargs``)
- Fixed checks against ``unittest.Mock`` and derivatives being done in the wrong place


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/devel/py-typeguard/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/py-typeguard/PLIST \
    pkgsrc/devel/py-typeguard/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-typeguard/Makefile
diff -u pkgsrc/devel/py-typeguard/Makefile:1.2 pkgsrc/devel/py-typeguard/Makefile:1.3
--- pkgsrc/devel/py-typeguard/Makefile:1.2      Thu Jan 27 08:17:13 2022
+++ pkgsrc/devel/py-typeguard/Makefile  Mon May  1 09:47:32 2023
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.2 2022/01/27 08:17:13 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2023/05/01 09:47:32 wiz Exp $
 
-DISTNAME=      typeguard-2.13.3
+DISTNAME=      typeguard-3.0.2
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=t/typeguard/}
@@ -10,17 +10,28 @@ HOMEPAGE=   https://github.com/agronholm/t
 COMMENT=       Python run-time type checking library
 LICENSE=       mit
 
-BUILD_DEPENDS+=        ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
+TOOL_DEPENDS+= ${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
 TEST_DEPENDS+= ${PYPKGPREFIX}-mypy>0:../../lang/py-mypy
 TEST_DEPENDS+= ${PYPKGPREFIX}-test>0:../../devel/py-test
-TEST_DEPENDS+= ${PYPKGPREFIX}-typing-extensions>0:../../devel/py-typing-extensions
 
 USE_LANGUAGES= # none
 
 PYTHON_VERSIONS_INCOMPATIBLE=  27
 
+TEST_ENV+=     PYTHONPATH=${WRKSRC}/build/lib
 do-test:
        cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX} tests
 
-.include "../../lang/python/egg.mk"
+.include "../../lang/python/pyversion.mk"
+
+.if ${PYTHON_VERSION} < 310
+TEST_DEPENDS+= ${PYPKGPREFIX}-importlib-metadata>=3.6:../../devel/py-importlib-metadata
+.endif
+.if ${PYTHON_VERSION} < 311
+TEST_DEPENDS+= ${PYPKGPREFIX}-typing-extensions>=4.4.0:../../devel/py-typing-extensions
+.endif
+
+.include "../../lang/python/wheel.mk"
 .include "../../mk/bsd.pkg.mk"

Index: pkgsrc/devel/py-typeguard/PLIST
diff -u pkgsrc/devel/py-typeguard/PLIST:1.1 pkgsrc/devel/py-typeguard/PLIST:1.2
--- pkgsrc/devel/py-typeguard/PLIST:1.1 Sun Jan 23 19:45:31 2022
+++ pkgsrc/devel/py-typeguard/PLIST     Mon May  1 09:47:32 2023
@@ -1,18 +1,35 @@
-@comment $NetBSD: PLIST,v 1.1 2022/01/23 19:45:31 adam Exp $
-${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
-${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
-${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt
-${PYSITELIB}/${EGG_INFODIR}/entry_points.txt
-${PYSITELIB}/${EGG_INFODIR}/not-zip-safe
-${PYSITELIB}/${EGG_INFODIR}/requires.txt
-${PYSITELIB}/${EGG_INFODIR}/top_level.txt
+@comment $NetBSD: PLIST,v 1.2 2023/05/01 09:47:32 wiz Exp $
+${PYSITELIB}/${WHEEL_INFODIR}/INSTALLER
+${PYSITELIB}/${WHEEL_INFODIR}/LICENSE
+${PYSITELIB}/${WHEEL_INFODIR}/METADATA
+${PYSITELIB}/${WHEEL_INFODIR}/RECORD
+${PYSITELIB}/${WHEEL_INFODIR}/REQUESTED
+${PYSITELIB}/${WHEEL_INFODIR}/WHEEL
+${PYSITELIB}/${WHEEL_INFODIR}/direct_url.json
+${PYSITELIB}/${WHEEL_INFODIR}/entry_points.txt
+${PYSITELIB}/${WHEEL_INFODIR}/top_level.txt
 ${PYSITELIB}/typeguard/__init__.py
 ${PYSITELIB}/typeguard/__init__.pyc
-${PYSITELIB}/typeguard/__init__.pyo
-${PYSITELIB}/typeguard/importhook.py
-${PYSITELIB}/typeguard/importhook.pyc
-${PYSITELIB}/typeguard/importhook.pyo
+${PYSITELIB}/typeguard/_checkers.py
+${PYSITELIB}/typeguard/_checkers.pyc
+${PYSITELIB}/typeguard/_config.py
+${PYSITELIB}/typeguard/_config.pyc
+${PYSITELIB}/typeguard/_decorators.py
+${PYSITELIB}/typeguard/_decorators.pyc
+${PYSITELIB}/typeguard/_exceptions.py
+${PYSITELIB}/typeguard/_exceptions.pyc
+${PYSITELIB}/typeguard/_functions.py
+${PYSITELIB}/typeguard/_functions.pyc
+${PYSITELIB}/typeguard/_importhook.py
+${PYSITELIB}/typeguard/_importhook.pyc
+${PYSITELIB}/typeguard/_memo.py
+${PYSITELIB}/typeguard/_memo.pyc
+${PYSITELIB}/typeguard/_pytest_plugin.py
+${PYSITELIB}/typeguard/_pytest_plugin.pyc
+${PYSITELIB}/typeguard/_transformer.py
+${PYSITELIB}/typeguard/_transformer.pyc
+${PYSITELIB}/typeguard/_union_transformer.py
+${PYSITELIB}/typeguard/_union_transformer.pyc
+${PYSITELIB}/typeguard/_utils.py
+${PYSITELIB}/typeguard/_utils.pyc
 ${PYSITELIB}/typeguard/py.typed
-${PYSITELIB}/typeguard/pytest_plugin.py
-${PYSITELIB}/typeguard/pytest_plugin.pyc
-${PYSITELIB}/typeguard/pytest_plugin.pyo
Index: pkgsrc/devel/py-typeguard/distinfo
diff -u pkgsrc/devel/py-typeguard/distinfo:1.1 pkgsrc/devel/py-typeguard/distinfo:1.2
--- pkgsrc/devel/py-typeguard/distinfo:1.1      Sun Jan 23 19:45:31 2022
+++ pkgsrc/devel/py-typeguard/distinfo  Mon May  1 09:47:32 2023
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.1 2022/01/23 19:45:31 adam Exp $
+$NetBSD: distinfo,v 1.2 2023/05/01 09:47:32 wiz Exp $
 
-BLAKE2s (typeguard-2.13.3.tar.gz) = c9f5519a55133aba5a963b9d5d005ad8d55ac3be4d210fb1ce1700888ca3f6ab
-SHA512 (typeguard-2.13.3.tar.gz) = d0facef3bfa8b1489c4a011e4ee9b019410fc82bf7d9630d3384013960d06f018f905b1930a1c483876d1e093748dc44e6891420cc618b34a452e8637c9aee56
-Size (typeguard-2.13.3.tar.gz) = 40604 bytes
+BLAKE2s (typeguard-3.0.2.tar.gz) = f4db5f7f203a675995d81bccc1f7be58d4963cc88ba95f905008b75df140cea4
+SHA512 (typeguard-3.0.2.tar.gz) = a8f87494d4962cfa451ab266fb2958867acb677ec07acad0e8ccead16b9f3d59facffbe133de4e7808147caefb2b41c184b19bc82a812d041e90c3c1c1c0667a
+Size (typeguard-3.0.2.tar.gz) = 58171 bytes



Home | Main Index | Thread Index | Old Index