You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/14 08:59:25 UTC

[GitHub] [airflow] potiuk commented on pull request #24425: Preserve original order of providers' connection extra fields in UI

potiuk commented on PR #24425:
URL: https://github.com/apache/airflow/pull/24425#issuecomment-1154908701

   The main idea to keep them sorted is for `airlfow providers command` - in order to get stable behaviour and alphabetic sorrting when they are printed in a command line. I believe wherever possible where human looks at the output list, the list should be sorted, otherwise it makes it extremely difficult to  find what you are looking for if the output is not alphabetically sorted. 
   
   And using OrderedDict in this is case is "intent signalling" - no more, no less. When you are using dict, it's not "obvious" that your intent was to keep the entries is in order of insert. Yeah it's implementation detail in 3.6 and part of specification as of python 3.7 but by using OrderedDict you explicitly tell the reader "yeah - I want to keep it sorted and this was the intention".


-- 
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: commits-unsubscribe@airflow.apache.org

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