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

Use OrderedDict for raw per-module options to preserve section order #3678

Merged
merged 3 commits into from Jul 11, 2017

Conversation

Projects
None yet
3 participants
@gvanrossum
Member

gvanrossum commented Jul 7, 2017

Fixes #3675.

Note that the problem only occurs on Python 3.5 and earlier, since in Python 3.6 the standard dict type preserves order. Also note that this relies on ConfigParser preserving order -- which it does (it uses OrderedDict for everything by default).

@ilinum

ilinum approved these changes Jul 7, 2017

Looks good -- just one small comment.

Show outdated Hide outdated mypy/options.py
@gvanrossum

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum Jul 7, 2017

Member
Member

gvanrossum commented Jul 7, 2017

@ddfisher

This LGTM, with one slight nit. Feel free to merge after fixing the nit. If you disagree with the nit, go ahead and merge too -- I don't feel particularly strongly about it.

Show outdated Hide outdated mypy/options.py
@gvanrossum

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum Jul 11, 2017

Member

Agreed, pushed a fix. Will merge myself once tests pass.

Member

gvanrossum commented Jul 11, 2017

Agreed, pushed a fix. Will merge myself once tests pass.

@gvanrossum gvanrossum merged commit e03f41d into python:master Jul 11, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gvanrossum gvanrossum deleted the gvanrossum:section-ordering branch Jul 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment