You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/07 08:22:16 UTC

[GitHub] [iceberg] Fokko opened a new pull request, #4983: Python: Rename types to type

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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] Fokko commented on pull request #4983: Python: Rename types to type

Posted by GitBox <gi...@apache.org>.
Fokko commented on PR #4983:
URL: https://github.com/apache/iceberg/pull/4983#issuecomment-1151706720

   This is just minor, I'll close this for now


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


[GitHub] [iceberg] Fokko closed pull request #4983: Python: Rename types to type

Posted by GitBox <gi...@apache.org>.
Fokko closed pull request #4983: Python: Rename types to type
URL: https://github.com/apache/iceberg/pull/4983


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org