GrahamDumpleton / wrapt

A Python module for decorators, wrappers and monkey patching.
BSD 2-Clause "Simplified" License
2.03k stars 231 forks source link

Publish cp312 wheel #247

Closed ThiefMaster closed 10 months ago

ThiefMaster commented 11 months ago

Currently you get the pure-python py3 wheel w/o the C extension when installing on Python 3.12, you have to force --no-binary to build from source and get the C extension.

Please publish a cp312 wheel with the C extension built for 3.12

GrahamDumpleton commented 11 months ago

Can you test with pre-release version 1.16.0rc1.

https://pypi.org/project/wrapt/1.16.0rc1/

For changes in 1.16.0 in case anything affects you see:

https://github.com/GrahamDumpleton/wrapt/blob/develop/docs/changes.rst

ThiefMaster commented 11 months ago

Thanks! I'm not using wrapt directly myself (it's a transitive dependencies of my application coming in via flask-limiter->limits->deprecated and I simply opened issues for packages where I noticed binary files but no cp312 wheel being available yet).

However, it seems to be fine:

[adrian@eluvian:/tmp/deprecated:master *%]> git diff
diff --git a/tests/test.py b/tests/test.py
index 3d5aa21..8de46d5 100644
--- a/tests/test.py
+++ b/tests/test.py
@@ -1,6 +1,5 @@
 # coding: utf-8
-import pkg_resources
-
+from packaging.version import Version
 import deprecated

@@ -13,7 +12,7 @@ def test_deprecated_has_docstring():
 def test_deprecated_has_version():
     # The deprecated package must have a valid version number
     assert deprecated.__version__ is not None
-    version = pkg_resources.parse_version(deprecated.__version__)
+    version = Version(deprecated.__version__)

     # .. note::
     #
diff --git a/tox.ini b/tox.ini
index 52f9290..856a7ce 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,7 +11,7 @@
 # - /usr/local/bin/pypy3 -> /opt/pypy3.6-v7.3.0-osx64/bin/pypy3
 envlist =
     py{37,38,39,310}-wrapt{1.10,1.11,1.12,1.13,1.14}
-    py{311,312}-wrapt{1.14}
+    py{311,312}-wrapt{1.14,1.16}
     pypy3
     docs

@@ -25,6 +25,7 @@ deps =
     wrapt1.12: wrapt ~= 1.12.0
     wrapt1.13: wrapt ~= 1.13.0
     wrapt1.14: wrapt ~= 1.14.0
+    wrapt1.16: wrapt ~= 1.16.0rc1
     coverage

 [testenv:docs]

[adrian@eluvian:/tmp/deprecated:master *%]> tox -e py312-wrapt1.16
.pkg: _optional_hooks> python /tmp/deprecated/.venv/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /tmp/deprecated/.venv/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /tmp/deprecated/.venv/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: prepare_metadata_for_build_wheel> python /tmp/deprecated/.venv/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /tmp/deprecated/.venv/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
py312-wrapt1.16: install_package> python -I -m pip install --force-reinstall --no-deps /tmp/deprecated/.tox/.tmp/package/5/Deprecated-1.2.14.tar.gz
py312-wrapt1.16: commands[0]> pytest --cov-report term-missing --cov=deprecated tests/
==================================================================================================================================================== test session starts ====================================================================================================================================================
platform linux -- Python 3.12.0, pytest-7.4.2, pluggy-1.3.0
cachedir: .tox/py312-wrapt1.16/.pytest_cache
rootdir: /tmp/deprecated
configfile: setup.cfg
plugins: cov-4.1.0
collected 178 items

tests/test.py ..                                                                                                                                                                                                                                                                                                      [  1%]
tests/test_deprecated.py ................................................                                                                                                                                                                                                                                             [ 28%]
tests/test_deprecated_class.py .......                                                                                                                                                                                                                                                                                [ 32%]
tests/test_deprecated_metaclass.py ....                                                                                                                                                                                                                                                                               [ 34%]
tests/test_sphinx.py ..............................................................................................                                                                                                                                                                                                   [ 87%]
tests/test_sphinx_adapter.py ............                                                                                                                                                                                                                                                                             [ 93%]
tests/test_sphinx_class.py .......                                                                                                                                                                                                                                                                                    [ 97%]
tests/test_sphinx_metaclass.py ....                                                                                                                                                                                                                                                                                   [100%]

===================================================================================================================================================== warnings summary ======================================================================================================================================================
tests/test_deprecated_class.py::test_simple_class_deprecation_with_args
  /tmp/deprecated/tests/test_deprecated_class.py:148: DeprecationWarning: Call to deprecated class MyClass. (kwargs class)
    MyClass(5)

tests/test_sphinx_class.py::test_isinstance_deprecated
  /tmp/deprecated/tests/test_sphinx_class.py:134: DeprecationWarning: Call to deprecated class DeprecatedChildCls. (some reason) -- Deprecated since version Y.Z.
    instance = DeprecatedChildCls()

tests/test_sphinx_class.py::test_isinstance_deprecated
  /tmp/deprecated/deprecated/classic.py:184: DeprecationWarning: Call to deprecated class DeprecatedCls. (some reason) -- Deprecated since version X.Y.
    return old_new1(cls, *args, **kwargs)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

---------- coverage: platform linux, python 3.12.0-final-0 -----------
Name                     Stmts   Miss  Cover   Missing
------------------------------------------------------
deprecated/__init__.py       6      0   100%
deprecated/classic.py       78      6    92%   25-30, 204
deprecated/sphinx.py        50      1    98%   97
------------------------------------------------------
TOTAL                      134      7    95%

============================================================================================================================================== 178 passed, 3 warnings in 0.44s ==============================================================================================================================================
.pkg: _exit> python /tmp/deprecated/.venv/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  py312-wrapt1.16: OK (3.23=setup[2.54]+cmd[0.69] seconds)
  congratulations :) (3.28 seconds)
jenshnielsen commented 10 months ago

1.16.0rc1 has been working fine for us https://github.com/QCoDeS/Qcodes/pull/5408 making CI pass. We would love to see a full release of 1.16.0. Do you have an ETA for when you are planning that?

GrahamDumpleton commented 10 months ago

Can you retest anything you are able with:

and let me know if all is good.

jenshnielsen commented 10 months ago

@GrahamDumpleton I can confirm that everything still looks good for me with 1.16.0rc2

GrahamDumpleton commented 10 months ago

Version 1.16.0 has now been released.