-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: make conftest._cython_table deterministic for Python<3.6 #22157
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
Conversation
Travis failure is unrelated. Was in and message
|
Codecov Report
@@ Coverage Diff @@
## master #22157 +/- ##
=======================================
Coverage 92.08% 92.08%
=======================================
Files 169 169
Lines 50694 50694
=======================================
Hits 46682 46682
Misses 4012 4012
Continue to review full report at Codecov.
|
pandas/conftest.py
Outdated
_cython_table = sorted(((key, value) for key, value in | ||
pd.core.base.SelectionMixin._cython_table.items()), | ||
key=lambda x: x[0].__name__) | ||
# manual sorting as dicts in py<3.6 have random order, which xdist doesn't like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does this fail currently? the exact ordering doesn't matter, only that it is deterministic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m guessing it’s related to this:
https://travis-ci.org/pandas-dev/pandas/jobs/411841573
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was another push after PR
i have never seen this repeat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's solve this entire problem, by just changing _cython_table (and the other _tables) to OrderedDict
hmm, I swear I saw this, but ok, I'll close this PR. If the issue (re-)appears, I can just do a PR then. |
Just saw the reference from #21902. @h-vetinari, can you conform if you saw the same issue in your PR that I'm raporting in #22156? |
Hey @topper-123, i definitely saw this issue at least 2-3 times in the 3.5 Travis build for several PRs. It's real. ;) |
Since I rebased #21902, the Travis info is not (easily) available anymore, but I posted an extract there. It was always the same test (exactly related to this issue), so I'm confident about that. |
I went through the travis log and looked for some of my old failed jobs. Here's some more occurrences (in each case, it was the only fail out of the required travis builds): All these are less than 4 days old, so in particular, after the comment from @jreback:
|
pandas/conftest.py
Outdated
_cython_table = sorted(((key, value) for key, value in | ||
pd.core.base.SelectionMixin._cython_table.items()), | ||
key=lambda x: x[0].__name__) | ||
# manual sorting as dicts in py<3.6 have random order, which xdist doesn't like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's solve this entire problem, by just changing _cython_table (and the other _tables) to OrderedDict
c385c99
to
5b28029
Compare
Ok, I've made |
Is this ok? |
A bit odd this bug first shows up and isn't showing up again. Maybe we saw something else? I'll wait a few days and if this isn't showing again, I can close this PR. |
thanks @topper-123 I like this a lot better |
Closes a bug for Python < 3.6 where xdist gets non-deterministic input because of random dict ordering for Python < 3.6.
See #22156 for details.