Fokko opened a new pull request, #4983:
URL: https://github.com/apache/iceberg/pull/4983

   Types gives issues with Python 3.8:
   ```
   ➜  python git:(master) docker run -t -i -v `pwd`:/iceberg/ python:3.8 bash
   root@48b6ad67cb0f:/# cd /iceberg/
   root@48b6ad67cb0f:/iceberg# pip3 install -qq -e .
   root@48b6ad67cb0f:/iceberg# python3 src/iceberg/types.py
   Traceback (most recent call last):
     File "src/iceberg/types.py", line 32, in <module>
       from dataclasses import dataclass, field
     File "/usr/local/lib/python3.8/dataclasses.py", line 1, in <module>
       import re
     File "/usr/local/lib/python3.8/re.py", line 124, in <module>
       import enum
     File "/usr/local/lib/python3.8/enum.py", line 2, in <module>
       from types import MappingProxyType, DynamicClassAttribute
     File "/iceberg/src/iceberg/types.py", line 32, in <module>
       from dataclasses import dataclass, field
   ImportError: cannot import name 'dataclass' from partially initialized 
module 'dataclasses' (most likely due to a circular import) 
(/usr/local/lib/python3.8/dataclasses.py)
   ```
   
   My suggestion is to rename it to `type`:
   
   ```
   root@48b6ad67cb0f:/iceberg# python3
   Python 3.8.13 (default, May 11 2022, 11:00:52)
   [GCC 10.2.1 20210110] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> # Types is a buildin lib
   >>> import types
   >>> # Type is still free
   >>> import type
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   ModuleNotFoundError: No module named 'type'
   ```
   
   This aligns nicely with `schema`. WDYT?


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to