liferoad commented on issue #33020: URL: https://github.com/apache/beam/issues/33020#issuecomment-2480873653
More notes: Looks like `__getstate__` exists now with Python 3.12 but not Python 3.10. So for Python 3.12. we stop raising the type error due to this line: https://github.com/apache/beam/blob/4d6dcd57c9f8db9622936249c523b113ca2426dc/sdks/python/apache_beam/coders/coder_impl.py#L503 ``` Python 3.12.7 (main, Oct 11 2024, 17:03:50) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> value = np.int64(1) >>> hasattr(value, "__setstate__") True >>> hasattr(value, "__getstate__") True >>> ``` ``` Python 3.10.7 (main, Oct 11 2024, 17:41:30) [GCC 13.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> value = np.int64(1) >>> hasattr(value, "__getstate__") False >>> hasattr(value, "__setstate__") True >>> ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
