Skip to content

Check structured dtypes separately for byteorder preservation - #11545

Merged
mhvk merged 2 commits into
astropy:mainfrom
dhomeier:table-tests-nonnative-mixins
Apr 13, 2021
Merged

mhvk merged 2 commits into
astropy:mainfrom
dhomeier:table-tests-nonnative-mixins

Conversation

@dhomeier

@dhomeier dhomeier commented Apr 13, 2021 •

Copy link
Copy Markdown
Contributor

Description

Alternative take to fixing #11339. Added both a little- and a big-endian version of ndarray in MIXIN_COLS so these issues might be spotted earlier.
As the s390 tests for #11543 failed already on collection for a bunch of unrelated reasons (possibly due to an importlib_metadata update?), this may take a while to validate.

EDIT: Fix #11339

@saimn

saimn commented Apr 13, 2021

Copy link
Copy Markdown
Contributor

Please rebase to fix the importlib_metadata issue.

@dhomeier
dhomeier force-pushed the table-tests-nonnative-mixins branch from 58a46ef to 4e852d8 Compare April 13, 2021 11:08

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, much better and makes a lot of sense to just test bigendian on little endian as well.

@mhvk mhvk added this to the v4.0.6 milestone Apr 13, 2021
@saimn saimn added the Extra CI Run cron CI as part of PR label Apr 13, 2021
@pllim pllim added the zzz 💤 merge-when-ci-passes Do not use: We have auto-merge option now. label Apr 13, 2021
@pllim

pllim commented Apr 13, 2021

Copy link
Copy Markdown
Member

The cron will take a while, but I assure you they will complete at some point. 😅

@dhomeier

dhomeier commented Apr 13, 2021 •

Copy link
Copy Markdown
Contributor Author

Thanks for getting the weekly cron started; I had no idea how to set that off.
Yes; and I thought it was slow when it was on for 80 minutes last night without actually running any tests!

I could still change the else case to original = m.info.dtype.newbyteorder('='); I don't remember why I originally picked original = m.info.dtype.name, but for any dtypes it understands it should be functionally equivalent.

@mhvk

mhvk commented Apr 13, 2021

Copy link
Copy Markdown
Contributor

If it works with original = m.info.dtype.newbyteorder('='), I think it would be better; otherwise we're only checking that the dtype remains a void with the right length.

@mhvk

mhvk commented Apr 13, 2021

Copy link
Copy Markdown
Contributor

Oops, of course void now doesn't go to that branch any more. The only advantage of newbyteorder is then that it is a bit more explicit.

@dhomeier

Copy link
Copy Markdown
Contributor Author

Oops, of course void now doesn't go to that branch any more. The only advantage of newbyteorder is then that it is a bit more explicit.

Yes; I thought there were some corner cases were i4 and <i4 for some reason did not evaluate equal (on a LE machine), or perhaps some of the Int types... but since your PR passed on all other CIs that seems to be just as valid.

@dhomeier

Copy link
Copy Markdown
Contributor Author

Oops, do we need another run of Weekly CI?

@pllim

pllim commented Apr 13, 2021

Copy link
Copy Markdown
Member

do we need another run of Weekly CI?

Yes, given that this patch fixes something that we only see in one of the "exotic" archs.

@dhomeier

Copy link
Copy Markdown
Contributor Author

Yes, given that this patch fixes something that we only see in one of the "exotic" archs.

With the extra big-endian version of ndarray it should show up on the other archs now, too; but again, I might have selected dtype.name because there were even more exotic phenomena popping up.

@pllim

pllim commented Apr 13, 2021 •

Copy link
Copy Markdown
Member

There is no harm to wait for the full report anyway, just in case. You can check again when you wake up tomorrow. 😉

@dhomeier

Copy link
Copy Markdown
Contributor Author

It is not that late here, especially not for me – but judging from the runtime this seemed a relatively scarce resource. 😝

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

s390x job is green again! 👏 The other failures are unrelated.

I'll let you decide when/if to merge given #11545 (comment) . Thanks!

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Even better with this combination! Will merge now that the tests passed.

@mhvk
mhvk merged commit c86202e into astropy:main Apr 13, 2021
@dhomeier

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing!

@dhomeier
dhomeier deleted the table-tests-nonnative-mixins branch April 13, 2021 21:50
astrofrog pushed a commit that referenced this pull request Aug 16, 2021
Check structured dtypes separately for byteorder preservation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Extra CI Run cron CI as part of PR no-changelog-entry-needed table testing zzz 💤 merge-when-ci-passes Do not use: We have auto-merge option now.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST: test_info_preserved_pickle_copy_init failed on s390x with TypeError: data type 'void40' not understood

4 participants