question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

io.fits tests fail on appveyor/windows as memmap behaviour has changed

See original GitHub issue

I’m not completely sure when this became a problem, and suspect it is related to a numpy update, but recent appveyor builds (e.g., https://ci.appveyor.com/project/Astropy/astropy/build/1.0.6535/job/y82p08ealenwojtl) at a spot for which there is a specific comment that it is a horrible hack:

            if sys.platform.startswith('win'):
                # On Windows, all the original data mmaps were closed above.
                # However, it's possible that the user still has references to
                # the old data which would no longer work (possibly even cause
                # a segfault if they try to access it).  This replaces the
                # buffers used by the original arrays with the buffers of mmap
                # arrays created from the new file.  This seems to work, but
                # it's a flaming hack and carries no guarantees that it won't
                # lead to odd behavior in practice.  Better to just not keep
                # references to data from files that had to be resized upon
                # flushing (on Windows--again, this is no problem on Linux).
                for idx, mmap, arr in mmaps:
                    if mmap is not None:
>                       arr.data = self[idx].data.data
E                       DeprecationWarning: Assigning the 'data' attribute is an inherently unsafe operation and will be removed in the future.
astropy\io\fits\hdu\hdulist.py:1342: DeprecationWarning
 2 failed, 11580 passed, 200 skipped, 79 xfailed, 1 xpassed in 417.46 seconds =

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:15 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
mhvkcommented, Sep 14, 2019

#9228 failed, i.e., we still need the work-around for windows: any memory maps need to be closed before resizing the file.

0reactions
mattipcommented, Sep 14, 2019

I think a user having a reference to hdu is not as much of a problem, as then getting data might well do the right thing.

That was my intention

Read more comments on GitHub >

github_iconTop Results From Across the Web

Assignment to `data` deprecation · Issue #8628 · numpy/numpy ...
In 1.12 writing to ndarray.data was deprecated. ... io.fits tests fail on appveyor/windows as memmap behaviour has changed astropy/astropy#5797.
Read more >
Shared Memory Provider, error: 0 - No process is on the other ...
The code itself runs locally just fine, it automatically creates the DB if it doesn't exist and runs a bunch of integration tests....
Read more >
1. fio - Flexible I/O tester rev. 3.32 - FIO's documentation!
He got tired of writing specific test applications to simulate a given workload, and found that the existing I/O benchmark/test tools out there...
Read more >
SciPy 1.1.0 Release Notes — SciPy v1.9.3 Manual
It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a number of deprecations and API changes...
Read more >
PyInstaller Documentation - Read the Docs
PyInstaller is tested against Windows, MacOS X, and Linux. However, it is not ... W and an option to change warning behavior: W...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found