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

fix DictReader definition #1475

Merged
merged 1 commit into from Jul 11, 2017

Conversation

Projects
None yet
3 participants
@graingert
Contributor

graingert commented Jul 10, 2017

  • constructable with Iterable
  • supports __next__ on python 3
  • supports next on python 2
fix DictReader definition
* constructable with Iterable
* __iter__ returns another DictReader
* supports `__next__` on python 3
* supports `next` on python 2
@graingert

This comment has been minimized.

Show comment
Hide comment
@graingert

graingert Jul 11, 2017

Contributor

and I've updated the documentation on cpython accordingly: python/cpython#2653

Contributor

graingert commented Jul 11, 2017

and I've updated the documentation on cpython accordingly: python/cpython#2653

@JelleZijlstra JelleZijlstra merged commit 7637549 into python:master Jul 11, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
if sys.version_info >= (3,):
def __next__(self) -> OrderedDict[Any, str]: ...
else:
def next(self) -> OrderedDict[Any, str]: ...

This comment has been minimized.

@graingert

graingert Jul 11, 2017

Contributor

Wondering if these should be regular dicts on python < 3.6

@graingert

graingert Jul 11, 2017

Contributor

Wondering if these should be regular dicts on python < 3.6

@gvanrossum

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum Jul 11, 2017

Member
Member

gvanrossum commented Jul 11, 2017

@JelleZijlstra

This comment has been minimized.

Show comment
Hide comment
@JelleZijlstra

JelleZijlstra Jul 11, 2017

Collaborator

I think so, there was a regression since 0.511 (DictReader could not be instantiated).

Collaborator

JelleZijlstra commented Jul 11, 2017

I think so, there was a regression since 0.511 (DictReader could not be instantiated).

@gvanrossum

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum Jul 11, 2017

Member

Oh, that's serious indeed. IIRC I ran into that too and tried to fix it (8607064) but didn't test it for Python 3. :-( I guess the commit that caused all this (1c84982) was a bit careless about it.

Member

gvanrossum commented Jul 11, 2017

Oh, that's serious indeed. IIRC I ran into that too and tried to fix it (8607064) but didn't test it for Python 3. :-( I guess the commit that caused all this (1c84982) was a bit careless about it.

@JelleZijlstra JelleZijlstra referenced this pull request Jul 11, 2017

Closed

Accidentally abstract classes #1476

25 of 25 tasks complete

@graingert graingert deleted the graingert:patch-2 branch Jul 12, 2017

gvanrossum added a commit that referenced this pull request Jul 18, 2017

fix DictReader definition (#1475)
* constructable with Iterable
* __iter__ returns another DictReader
* supports `__next__` on python 3
* supports `next` on python 2

@JelleZijlstra JelleZijlstra referenced this pull request Jul 19, 2017

Closed

Release mypy 0.521 #3732

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