io.fits tests fail on appveyor/windows as memmap behaviour has changed
See original GitHub issueI’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:
- Created 7 years ago
- Comments:15 (13 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
#9228 failed, i.e., we still need the work-around for windows: any memory maps need to be closed before resizing the file.
That was my intention