jorisvandenbossche commented on code in PR #14499:
URL: https://github.com/apache/arrow/pull/14499#discussion_r1013122843


##########
python/pyarrow/_fs.pyx:
##########
@@ -78,6 +78,12 @@ cdef CFileType _unwrap_file_type(FileType ty) except *:
     assert 0
 
 
+def _file_type_to_string(ty):
+    # Python 3.11 changed str(IntEnum) to return the string representation
+    # of the integer value: https://github.com/python/cpython/issues/94763
+    return f"{ty.__class__.__name__}.{ty._name_}"

Review Comment:
   Actually, the change is only for `str(..)`, not for the repr. So then I 
suppose the above is fine (just checking `FileInfo.type` interactively will 
still give an informative repr, it's only when printing it that it will now 
return just an int)



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

Reply via email to