jorisvandenbossche commented on a change in pull request #12026:
URL: https://github.com/apache/arrow/pull/12026#discussion_r781198805



##########
File path: python/pyarrow/compat.pxi
##########
@@ -31,12 +29,8 @@ def encode_file_path(path):
     return encoded_path
 
 
-if sys.version_info >= (3, 7):
-    # Starting with Python 3.7, dicts are guaranteed to be insertion-ordered.
-    ordered_dict = dict
-else:
-    import collections
-    ordered_dict = collections.OrderedDict
+# Starting with Python 3.7, dicts are guaranteed to be insertion-ordered.
+ordered_dict = dict

Review comment:
       > `ordered_dict` has a richer API than `dict`, so theoretically we 
cannot return `dict` instead without breaking compatibility. Not sure that 
matters in practice, though.
   
   Ah, yes indeed. It's currently being used in `Table/RecordBatch.to_pydict` 
and `KeyValueMetadata.to_dict`. 
   Personally, I would maybe just break this at some point
   
   




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