Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-33800: Fix default argument for parameter dict_type of ConfigParser/RawConfigParser #7494

Merged
merged 4 commits into from
Jun 8, 2018

Conversation

andresdelfino
Copy link
Contributor

@andresdelfino andresdelfino commented Jun 7, 2018

@@ -901,9 +901,6 @@ ConfigParser Objects
converter gets its own corresponding :meth:`get*()` method on the parser
object and section proxies.

.. versionchanged:: 3.1
The default *dict_type* is :class:`collections.OrderedDict`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not remove historical notes.

@@ -917,6 +914,8 @@ ConfigParser Objects
providing consistent behavior across the parser: non-string
keys and values are implicitly converted to strings.

.. versionchanged:: 3.7
The default *dict_type* is :class:`dict`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion to avoid puzzlement: :class:`dict`, which is now ordered.

@andresdelfino
Copy link
Contributor Author

I agree!

Thanks for the review Éric :)

@@ -915,7 +918,8 @@ ConfigParser Objects
keys and values are implicitly converted to strings.

.. versionchanged:: 3.7
The default *dict_type* is :class:`dict`.
The default *dict_type* is :class:`dict`, since it now guarantees
insertion order.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds a little funny to me. What do you think of preserves or keeps rather than guarantees?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like preserves too :)

Items present in *vars* no longer appear in the result. The previous
behaviour mixed actual parser options with variables provided for
interpolation.
.. versionchanged:: 3.8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you are addressing another problem here, one that is only in master. With this change, it won't be possible to auto backport this fix to 3.7. Suggest you include this in another PR if necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly. I'll update the PR.

@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@andresdelfino
Copy link
Contributor Author

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@ned-deily: please review the changes made to this pull request.

@ned-deily ned-deily merged commit 3b0b90c into python:master Jun 8, 2018
@miss-islington
Copy link
Contributor

Thanks @andresdelfino for the PR, and @ned-deily for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-7542 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 8, 2018
…er/RawConfigParser (pythonGH-7494)

(cherry picked from commit 3b0b90c)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
ned-deily pushed a commit that referenced this pull request Jun 8, 2018
…er/RawConfigParser (GH-7494) (GH-7542)

(cherry picked from commit 3b0b90c)

Co-authored-by: Andrés Delfino <adelfino@gmail.com>
@andresdelfino andresdelfino deleted the configparser-arguments branch June 8, 2018 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants