dwt / fluent

Python wrapper for stdlib (and other) objects to give them a fluent interface.
ISC License
60 stars 2 forks source link

python 3.12 import fails #14

Open pichwo opened 4 months ago

pichwo commented 4 months ago

============================================================= (python environment governed via pyenv : here : use globally installed 3.12

$ pip show fluentpy Name: fluentpy Version: 2.1.1 Summary: Python wrapper for stdlib (and your) objects to give them a fluent interface. Home-page: https://github.com/dwt/fluent Author: Martin Häcker Author-email: mhaecker@mac.com License: ISC Location: /usr/local/lib/python3.12/site-packages Requires: Required-by:

$ python Python 3.12.3 (main, Apr 17 2024, 00:00:00) [GCC 13.2.1 20240316 (Red Hat 13.2.1-7)] on linux Type "help", "copyright", "credits" or "license" for more information.

import fluentpy as _ Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.12/site-packages/fluentpy/init.py", line 36, in import fluentpy.wrapper File "/usr/local/lib/python3.12/site-packages/fluentpy/wrapper.py", line 112, in class Wrapper(object): File "/usr/local/lib/python3.12/site-packages/fluentpy/wrapper.py", line 303, in Wrapper type = wrapped(type) ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/fluentpy/wrapper.py", line 71, in wrapped @functools.wraps(wrapped_function) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.12/functools.py", line 56, in update_wrapper setattr(wrapper, attr, value) TypeError: __type_params__ must be set to a tuple

============================================================= (python environment governed via pyenv : here : use locally installed 3.11)

$ pip show fluentpy Name: fluentpy Version: 2.1.1 Summary: Python wrapper for stdlib (and your) objects to give them a fluent interface. Home-page: https://github.com/dwt/fluent Author: Martin Häcker Author-email: mhaecker@mac.com License: ISC Location: /home/rotten/.pyenv/versions/3.11.3/lib/python3.11/site-packages Requires: Required-by:

$ python Python 3.11.3 (main, Apr 30 2024, 19:38:50) [GCC 13.2.1 20240316 (Red Hat 13.2.1-7)] on linux Type "help", "copyright", "credits" or "license" for more information.

import fluentpy as _

============================================================= what to do ? in need of any further information ?

thx w.

dwt commented 3 months ago

Oh my, that is indeed reproducible. Thanks a lot for the report.

From first look, it seems that I'm using functools.wraps() incorrectly, but I don't get it yet, as it seems that I'm doing the basic thing of just handing in a simple function. ¿¿¿

I'll have to look into that more deeply.

dwt commented 3 months ago

Looks like this is a cpython issue and needs to be fixed there. Feel free to also monitor their bug!