Skip to content

TST: not correctly using OrderedDict in test_series_apply #17384

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

Merged
merged 1 commit into from
Aug 31, 2017

Conversation

sylviawhoa
Copy link
Contributor

in Python versions <3.6 this syntax will result in an unordered dict

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

in Python versions <3.6 this syntax will result in an unordered dict
@gfyoung
Copy link
Member

gfyoung commented Aug 30, 2017

@sylviawhoa : Thanks for reporting this! Do you have a code-example or test where this was important? We would like to be able to catch this in the future if it's actually important.

@sinhrks sinhrks added Needs Info Clarification about behavior needed to assess issue Testing pandas testing functions or related to the test suite labels Aug 31, 2017
@sylviawhoa
Copy link
Contributor Author

sylviawhoa commented Aug 31, 2017

@gfyoung @sinhrks If your testing environment uses Python 3.6, this issue would be undetectable because in Python 3.6 all dictionaries are ordered, in which case you wouldn't need OrderedDict() at all. For earlier versions, this test may fail because you are calling OrderedDict() on a dictionary, hence preserving a random order.

I found this issue because I searched my entire repo for instances of OrderedDict({ to find OrderedDict called on a dictionary (since that was a bug I had that caused my tests to fail with 3.5). I have pandas installed in my virtual environment so this came up in the search.

Not sure how important this really is because it's only in a test, but it is an issue.

@jreback jreback added this to the 0.21.0 milestone Aug 31, 2017
@jreback jreback removed the Needs Info Clarification about behavior needed to assess issue label Aug 31, 2017
@jreback jreback changed the title updates OrderedDict bug TST: not correctly using OrderedDict in test_series_apply Aug 31, 2017
@jreback jreback merged commit 764cf2a into pandas-dev:master Aug 31, 2017
@jreback
Copy link
Contributor

jreback commented Aug 31, 2017

thanks, this was a typo.

jowens pushed a commit to jowens/pandas that referenced this pull request Sep 20, 2017
…#17384)

in Python versions <3.6 this syntax will result in an unordered dic
alanbato pushed a commit to alanbato/pandas that referenced this pull request Nov 10, 2017
…#17384)

in Python versions <3.6 this syntax will result in an unordered dic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants