From aa767bad4b6e0ad6e9ea98e271e6cc2c3425f08e Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 4 Apr 2024 12:23:59 +0100 Subject: [PATCH 001/156] Added contributor statistics and names --- docs/whatsnew/6.1.rst | 96 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 80 insertions(+), 16 deletions(-) diff --git a/docs/whatsnew/6.1.rst b/docs/whatsnew/6.1.rst index 3c6979bc0a4d..4ed8624b9d60 100644 --- a/docs/whatsnew/6.1.rst +++ b/docs/whatsnew/6.1.rst @@ -12,24 +12,32 @@ the 6.0 release. In particular, this release includes: -* Upgraded the minimum required version of Python to 3.10 +* :ref:`whatsnew-6.1-minimum-python` +* :ref:`whatsnew-6.1-angular-separations` +* :ref:`whatsnew-6.1-ascii-default-int-columns-as-int64` +* :ref:`whatsnew-6.1-copy-semantics` +* :ref:`whatsnew-6.1-cosmology-dataclass` -In addition to these major changes, Astropy v6.1 includes a large number of +In addition to these major changes, Astropy 6.1 includes a large number of smaller improvements and bug fixes, which are described in the :ref:`changelog`. By the numbers: -* X issues have been closed since v6.0 -* X pull requests have been merged since v6.0 -* X distinct people have contributed code +* 723 commits have been added since 6.0 +* 172 issues have been closed since 6.0 +* 276 pull requests have been merged since 6.0 +* 51 people have contributed since 6.0 +* 14 of which are new contributors +.. _whatsnew-6.1-minimum-python: -Minimum Python Version -====================== +Updated minimum Python version to 3.10 +====================================== The minimum required version of Python has been upgraded to 3.10. This is in line with the `NumPy deprecation policy `_. +.. _whatsnew-6.1-angular-separations: Order-dependent angular separations now come with warnings ========================================================== @@ -107,8 +115,8 @@ as string columns. The new default behavior is consistent with ``numpy`` v2 and .. _whatsnew-6.1-copy-semantics: -Copy semantics -============== +Changes to semantics of ``copy=`` keyword arguments +=================================================== Public APIs that expose a ``copy`` argument and that previously set ``False`` as a default value now use ``None`` instead if ``numpy`` v2 or newer is installed. @@ -133,12 +141,10 @@ as follow COPY_IF_NEEDED = False if np.__version__.startswith("1.") else None +.. _whatsnew-6.1-cosmology-dataclass: -Updates to `~astropy.cosmology` -=============================== - -|Cosmology| as a :func:`~dataclasses.dataclass` ------------------------------------------------ +|Cosmology| is now a :func:`~dataclasses.dataclass` +=================================================== The :class:`~astropy.cosmology.Cosmology` class is now a :func:`~dataclasses.dataclass`. This means that the :mod:`dataclasses` machinery @@ -163,9 +169,67 @@ using :func:`~dataclasses.make_dataclass`:: >>> [f.name for f in fields(NewC)] ['name', 'meta', 'newfield'] - Full change log =============== -To see a detailed list of all changes in version v6.0, including changes in +To see a detailed list of all changes in version 6.1, including changes in API, please see the :ref:`changelog`. + +Contributors to the 6.1 release +=============================== + +The people who have contributed to the code for this release are: + +.. hlist:: + :columns: 4 + + - Adam Ginsburg + - Albert Y. Shih + - Chiara Marmo + - Clément Robert + - Derek Homeier + - Eduardo Olinto * + - Eero Vaher + - Felipe Gameleira * + - Gordon Gibb * + - Hans Moritz Günther + - Henry Schreiner * + - Hélvio Peixoto + - James Davies + - Jero Bado + - Jo Bovy + - Kyle Conroy + - Larry Bradley + - Leo Singer + - Manodeep Sinha + - Manon Marchand + - Marcello Nascif + - Mark Taylor + - Marten van Kerkwijk + - Matteo Bachetti + - Maximilian Linhoff + - Michiel De Wilde * + - Mihai Cara + - Mridul Seth * + - Nathaniel Starkman + - Nick Murphy + - Ole Streicher + - Pey Lian Lim + - Piyush Sharma * + - Porter Averett * + - Prajwel Joseph + - Robert Queenin * + - Sam Holt * + - Sam Lee + - Sam Van Kooten + - Shaheer Ahmad * + - Simon Conseil + - Stephen Bailey * + - Stuart Littlefair + - Tanvi Pooranmal Meena * + - Thomas Robitaille + - Tom Aldcroft + - William Jamieson + - omahs * + +Where a * indicates that this release contains their first contribution to astropy. From e227c46b5a8f82cc26f3e3fc6b6ac6f88f4dc6b5 Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Thu, 4 Apr 2024 16:04:19 +0200 Subject: [PATCH 002/156] Fix bullet point list --- docs/whatsnew/6.1.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/whatsnew/6.1.rst b/docs/whatsnew/6.1.rst index 4ed8624b9d60..98feeedfe55f 100644 --- a/docs/whatsnew/6.1.rst +++ b/docs/whatsnew/6.1.rst @@ -125,6 +125,7 @@ with ``copy=False`` now indicating that a copy should never be made, while ``copy=None`` is used for the previous meaning of "avoid a copy if possible". This includes: + - ``astropy.units.Quantity`` - ``astropy.utils.Masked`` - ``astropy.table.Column`` From 15adb91851e8216de63bffefac213b3d7580fa3c Mon Sep 17 00:00:00 2001 From: "Lumberbot (aka Jack)" <39504233+meeseeksmachine@users.noreply.github.com> Date: Fri, 12 Apr 2024 03:57:40 +0200 Subject: [PATCH 003/156] Backport PR #16272 on branch v6.1.x (Updated list of contributors and .mailmap file) (#16281) * Backport PR #16272: Updated list of contributors and .mailmap file * Undo 7.0 what's new in backport branch --------- Co-authored-by: Simon Conseil Co-authored-by: P. L. Lim <2090236+pllim@users.noreply.github.com> --- .mailmap | 4 ++++ docs/credits.rst | 14 ++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.mailmap b/.mailmap index 4b4937a1d276..d0bc09cea7db 100644 --- a/.mailmap +++ b/.mailmap @@ -105,6 +105,7 @@ Dylan Gregersen Edward Gomez Ed Slavich Ed Slavich Edward Slavich +Eduardo Olinto <90293761+olintoeduardo@users.noreply.github.com> Eero Vaher Elijah Bernstein-Cooper Emily Deibert @@ -137,6 +138,7 @@ Hans Moritz Günther Harry Ferguson Henrik Norman Henrik Norman +Henry Schreiner Hélvio Peixoto Himanshu Pathak Humna Awan @@ -222,6 +224,7 @@ Mangala Gowri Krishnamoorthy Manon Marchand Marten van Kerkwijk Marten van Kerkwijk Marten H. van Kerkwijk +Marten van Kerkwijk Marten Henric van Kerkwijk Matt Davis Matteo Bachetti Matthew Craig @@ -264,6 +267,7 @@ Pauline Barmby Perry Greenfield P. L. Lim <2090236+pllim@users.noreply.github.com> P. L. Lim <2090236+pllim@users.noreply.github.com> +Prajwel Joseph Pratik Patel Pritish Chakraborty Ricardo Fonseca diff --git a/docs/credits.rst b/docs/credits.rst index 84725977e03e..62f9ee22d640 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -139,6 +139,7 @@ Core Package Contributors * E\. Rykoff * E.C. Herenz * Ed Slavich +* Eduardo Olinto * Edward Betts * Edward Slavich * Eero Vaher @@ -157,6 +158,7 @@ Core Package Contributors * Even Rouault * Evert Rol * Felipe Cybis Pereira +* Felipe Gameleira * Felix Yan * fockez * Francesc Vilardell @@ -175,6 +177,7 @@ Core Package Contributors * Gerrit Schellenberger * Giang Nguyen * Giorgio Calderone +* Gordon Gibb * Graham Kanarek * Grant Jenks * Gregory Dubois-Felsmann @@ -186,6 +189,7 @@ Core Package Contributors * Hans Moritz Günther * Harry Ferguson * Heinz-Alexander Fuetterer +* Henry Schreiner * Helen Sherwood-Taylor * Hélvio Peixoto * Himanshu Pathak @@ -340,6 +344,7 @@ Core Package Contributors * Michele Costa * Michele Mastropietro * Michele Peresano +* Michiel De Wilde * Miguel de Val-Borro * Mihai Cara * Mike Alexandersen @@ -350,6 +355,7 @@ Core Package Contributors * Moataz Hisham * Mohan Agrawal * Molly Peeples +* Mridul Seth * Mubin Manasia * mzhengxi * Nabil Freij @@ -373,6 +379,7 @@ Core Package Contributors * odidev * Ole Streicher * Orion Poplawski +* omahs * orionlee * Param Patidar * Parikshit Sakurikar @@ -389,6 +396,8 @@ Core Package Contributors * Peter Teuben * Peter Yoachim * Pey Lian Lim +* Piyush Sharma +* Porter Averett * Prajwel Joseph * Prasanth Nair * Pratik Patel @@ -410,6 +419,7 @@ Core Package Contributors * Roban Hultman Kramer * Robel Geda * Robert Cross +* Robert Queenin * Rocio Kiman * Rohan Rajpal * Rohit Kapoor @@ -422,6 +432,7 @@ Core Package Contributors * Ryan Cooke * Ryan Fox * Sadie Bartholomew +* Sam Holt * Sam Van Kooten * Sam Verstocken * Samruddhi Khandale @@ -442,6 +453,7 @@ Core Package Contributors * Semyeong Oh * Serge Montagnac * Sergio Pascual +* Shaheer Ahmad * Shailesh Ahuja * Shankar Kulumani * Shantanu Srivastava @@ -462,6 +474,7 @@ Core Package Contributors * srirajshukla * Stefan Becker * Stefan Nelson +* Stephen Bailey * Stephen Portillo * Steve Crawford * Steve Guest @@ -475,6 +488,7 @@ Core Package Contributors * T\. Carl Beery * T\. E\. Pickering * Tanuj Rastogi +* Tanvi Pooranmal Meena * Thais Borges * Thomas J. Fan * Thomas Erben From 2d44633e7144f417ebe836146bf47ba232faeff4 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Thu, 11 Apr 2024 21:36:03 -0400 Subject: [PATCH 004/156] Backport PR #16280: Remove an erroneous special case from `search_around_3d()` Cherry picked from commit 9dff11652b4d27641f951ce305f7b6eb924fd270 --- astropy/coordinates/matching.py | 9 ---- astropy/coordinates/tests/test_matching.py | 56 +++++++++++++++++++--- docs/changes/coordinates/16280.bugfix.rst | 5 ++ 3 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 docs/changes/coordinates/16280.bugfix.rst diff --git a/astropy/coordinates/matching.py b/astropy/coordinates/matching.py index 585f2cb28f9e..42b4bea55bfe 100644 --- a/astropy/coordinates/matching.py +++ b/astropy/coordinates/matching.py @@ -263,15 +263,6 @@ def search_around_3d(coords1, coords2, distlimit, storekdtree="kdtree_3d"): " a scalar coordinate." ) - if len(coords1) == 0 or len(coords2) == 0: - # Empty array input: return empty match - return ( - np.array([], dtype=int), - np.array([], dtype=int), - Angle([], u.deg), - u.Quantity([], coords1.distance.unit), - ) - kdt2 = _get_cartesian_kdtree(coords2, storekdtree) cunit = coords2.cartesian.x.unit diff --git a/astropy/coordinates/tests/test_matching.py b/astropy/coordinates/tests/test_matching.py index 91b6731a6cc3..155c7c2ee552 100644 --- a/astropy/coordinates/tests/test_matching.py +++ b/astropy/coordinates/tests/test_matching.py @@ -5,7 +5,13 @@ from numpy import testing as npt from astropy import units as u -from astropy.coordinates import matching +from astropy.coordinates import ( + ICRS, + SkyCoord, + matching, + search_around_3d, + search_around_sky, +) from astropy.tests.helper import assert_quantity_allclose as assert_allclose from astropy.utils.compat.optional_deps import HAS_SCIPY @@ -15,6 +21,9 @@ Note that this requires scipy. """ +if not HAS_SCIPY: + pytest.skip("Coordinate matching requires scipy", allow_module_level=True) + @pytest.mark.skipif(not HAS_SCIPY, reason="Requires scipy.") def test_matching_function(): @@ -155,7 +164,6 @@ def test_matching_method(): @pytest.mark.skipif(not HAS_SCIPY, reason="Requires scipy") def test_search_around(): - from astropy.coordinates import ICRS, SkyCoord from astropy.coordinates.matching import search_around_3d, search_around_sky coo1 = ICRS([4, 2.1] * u.degree, [0, 0] * u.degree, distance=[1, 5] * u.kpc) @@ -230,13 +238,47 @@ def test_search_around(): assert d2d.unit == u.deg assert d3d.unit == u.kpc + +@pytest.mark.parametrize( + "sources,catalog", + [ + pytest.param( + ICRS([1] * u.deg, [0] * u.deg), + ICRS([1] * u.deg, [0] * u.deg), + id="both_with_data", + ), + pytest.param( + ICRS(ra=[] * u.deg, dec=[] * u.deg), + ICRS([1] * u.deg, [0] * u.deg), + id="empty_sources", + ), + pytest.param( + ICRS([1] * u.deg, [0] * u.deg), + ICRS(ra=[] * u.deg, dec=[] * u.deg), + id="empty_catalog", + ), + pytest.param( + ICRS(ra=[] * u.deg, dec=[] * u.deg), + ICRS(ra=[] * u.deg, dec=[] * u.deg), + id="both_empty", + ), + ], +) +def test_search_around_3d_no_dist_input(sources, catalog): + # Regression test for #16280: UnitConversionError was not raised if at + # least one of the coords was empty. + with pytest.raises( + u.UnitConversionError, + match=r"^'pc' \(length\) and '' \(dimensionless\) are not convertible$", + ): + search_around_3d(sources, catalog, 1 * u.pc) + + +def test_search_around_sky_no_dist_input(): # Test that input without distance units results in a # 'dimensionless_unscaled' unit - cempty = SkyCoord(ra=[], dec=[], unit=u.deg) - idx1, idx2, d2d, d3d = search_around_3d(cempty, cempty[:], 1 * u.m) - assert d2d.unit == u.deg - assert d3d.unit == u.dimensionless_unscaled - idx1, idx2, d2d, d3d = search_around_sky(cempty, cempty[:], 1 * u.m) + empty_sc = SkyCoord([], [], unit=u.deg) + idx1, idx2, d2d, d3d = search_around_sky(empty_sc, empty_sc[:], 1 * u.deg) assert d2d.unit == u.deg assert d3d.unit == u.dimensionless_unscaled diff --git a/docs/changes/coordinates/16280.bugfix.rst b/docs/changes/coordinates/16280.bugfix.rst new file mode 100644 index 000000000000..c1198e2e17ca --- /dev/null +++ b/docs/changes/coordinates/16280.bugfix.rst @@ -0,0 +1,5 @@ +``search_around_3d()`` now always raises a ``UnitConversionError`` if the units +of the distances in ``coord1`` and ``coord2`` and the unit of ``distlimit`` do +not agree. +Previously the error was not raised if at least one of the coordinates was +empty. From bad07db1071e14703bee44b5dc05683198d78b3d Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Mon, 15 Apr 2024 15:44:55 +0100 Subject: [PATCH 005/156] Backport PR #15626: Handle UCD1 'custom:' prefix in wcsaxes --- .../wcsaxes/tests/test_wcsapi.py | 20 +++++++++++++++++++ astropy/visualization/wcsaxes/wcsapi.py | 2 ++ docs/changes/visualization/15626.bugfix.rst | 1 + 3 files changed, 23 insertions(+) create mode 100644 docs/changes/visualization/15626.bugfix.rst diff --git a/astropy/visualization/wcsaxes/tests/test_wcsapi.py b/astropy/visualization/wcsaxes/tests/test_wcsapi.py index b3f11b674e7e..42ac93cef641 100644 --- a/astropy/visualization/wcsaxes/tests/test_wcsapi.py +++ b/astropy/visualization/wcsaxes/tests/test_wcsapi.py @@ -23,6 +23,7 @@ ) from astropy.wcs import WCS from astropy.wcs.wcsapi import BaseLowLevelWCS, SlicedLowLevelWCS +from astropy.wcs.wcsapi.fitswcs import custom_ctype_to_ucd_mapping @pytest.fixture @@ -233,6 +234,25 @@ def test_coord_type_from_ctype(cube_wcs): assert coord_meta["format_unit"] == [u.hourangle, u.deg] assert coord_meta["wrap"] == [None, None] + wcs = WCS(naxis=2) + wcs.wcs.ctype = ["HHLN-TAN", "HHLT-TAN"] + wcs.wcs.crpix = [256.0] * 2 + wcs.wcs.cdelt = [-0.05] * 2 + wcs.wcs.crval = [50.0] * 2 + wcs.wcs.set() + + custom_mapping = { + "HHLN": "custom:pos.custom.lon", + "HHLT": "custom:pos.custom.lat", + } + with custom_ctype_to_ucd_mapping(custom_mapping): + _, coord_meta = transform_coord_meta_from_wcs(wcs, RectangularFrame) + + # Ensure these custom types get mapped to longitude and latitude + assert coord_meta["type"] == ["longitude", "latitude"] + assert coord_meta["format_unit"] == [u.deg, u.deg] + assert coord_meta["wrap"] == [None, None] + wcs = WCS(naxis=2) wcs.wcs.ctype = ["spam", "spam"] wcs.wcs.crpix = [256.0] * 2 diff --git a/astropy/visualization/wcsaxes/wcsapi.py b/astropy/visualization/wcsaxes/wcsapi.py index a136e35ef327..1772b778068a 100644 --- a/astropy/visualization/wcsaxes/wcsapi.py +++ b/astropy/visualization/wcsaxes/wcsapi.py @@ -61,6 +61,8 @@ def transform_coord_meta_from_wcs(wcs, frame_class, slices=None): if axis_type is not None: axis_type_split = axis_type.split(".") + if len(axis_type_split): + axis_type_split[0] = axis_type_split[0].replace("custom:", "") if "pos.helioprojective.lon" in axis_type: coord_wrap = 180.0 * u.deg diff --git a/docs/changes/visualization/15626.bugfix.rst b/docs/changes/visualization/15626.bugfix.rst new file mode 100644 index 000000000000..13e60582560d --- /dev/null +++ b/docs/changes/visualization/15626.bugfix.rst @@ -0,0 +1 @@ +``WCSAxes`` will correctly set certain defaults when ``wcs.world_axis_physical_types`` contains ``custom:`` prefixes. From 87dc6efd95e02f3311a39e79368c2a36d32509a8 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Wed, 17 Apr 2024 11:45:28 -0400 Subject: [PATCH 006/156] Backport PR #16299: BUG: fix compatibility with numpy 2.1 in Masked.nonzero --- astropy/utils/masked/core.py | 2 +- .../utils/masked/tests/test_function_helpers.py | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/astropy/utils/masked/core.py b/astropy/utils/masked/core.py index ccf62f52452c..70da59fae8bc 100644 --- a/astropy/utils/masked/core.py +++ b/astropy/utils/masked/core.py @@ -1070,7 +1070,7 @@ def nonzero(self): not_masked = ~self.mask[unmasked_nonzero] return tuple(u[not_masked] for u in unmasked_nonzero) else: - return unmasked_nonzero if not self.mask else np.nonzero(0) + return unmasked_nonzero if not self.mask else np.nonzero([0]) def compress(self, condition, axis=None, out=None): if out is not None: diff --git a/astropy/utils/masked/tests/test_function_helpers.py b/astropy/utils/masked/tests/test_function_helpers.py index 3d797ffb3999..0a8d007368ea 100644 --- a/astropy/utils/masked/tests/test_function_helpers.py +++ b/astropy/utils/masked/tests/test_function_helpers.py @@ -26,6 +26,7 @@ NUMPY_LT_1_24, NUMPY_LT_1_25, NUMPY_LT_2_0, + NUMPY_LT_2_1, ) from astropy.utils.masked import Masked, MaskedNDArray from astropy.utils.masked.function_helpers import ( @@ -179,14 +180,24 @@ def test_lexsort(self): def test_nonzero(self): self.check(np.nonzero, fill_value=0.0) + @pytest.mark.skipif( + not NUMPY_LT_2_1, reason="support for 0d arrays was removed in numpy 2.1" + ) @pytest.mark.filterwarnings("ignore:Calling nonzero on 0d arrays is deprecated") - def test_nonzero_0d(self): + def test_nonzero_0d_np_lt_2_1(self): res1 = Masked(1, mask=False).nonzero() assert len(res1) == 1 - assert_array_equal(res1[0], np.ones(()).nonzero()[0]) + assert_array_equal(res1[0], 0) res2 = Masked(1, mask=True).nonzero() assert len(res2) == 1 - assert_array_equal(res2[0], np.zeros(()).nonzero()[0]) + assert_array_equal(res2[0], 0) + + @pytest.mark.skipif( + NUMPY_LT_2_1, reason="support for 0d arrays was removed in numpy 2.1" + ) + def test_nonzero_0d_np_ge_2_1(self): + with pytest.raises(ValueError): + Masked(1, mask=False).nonzero() def test_argwhere(self): self.check(np.argwhere, fill_value=0.0) From 1beedcb0f7b0e25e8f93eab211dbb6423510d9b3 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Wed, 17 Apr 2024 18:52:36 -0400 Subject: [PATCH 007/156] Backport PR #16304: DOC: Compatibility with Sphinx 7.3.5 --- docs/conf.py | 5 +++++ docs/io/unified.rst | 9 ++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 302878dbdf43..c4be6239d58c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -298,6 +298,7 @@ # resolve. nitpicky = True +show_warning_types = True # See docs/nitpick-exceptions file for the actual listing. nitpick_ignore = [] for line in open("nitpick-exceptions"): @@ -306,6 +307,10 @@ dtype, target = line.split(None, 1) nitpick_ignore.append((dtype, target.strip())) +suppress_warnings = [ + "config.cache", # our rebuild is okay +] + # -- Options for the Sphinx gallery ------------------------------------------- try: diff --git a/docs/io/unified.rst b/docs/io/unified.rst index 5bd46fed26ad..6f5e12372783 100644 --- a/docs/io/unified.rst +++ b/docs/io/unified.rst @@ -1091,12 +1091,11 @@ the following functions / methods: .. csv-table:: :header: "Format name", "Data Description", "Reader", "Writer" :widths: 25, 25, 25, 25 - :delim: ; - ``pandas.csv``;`CSV `__;`read_csv() `_;`to_csv() `_ - ``pandas.json``;`JSON `__;`read_json() `_;`to_json() `_ - ``pandas.html``;`HTML `__;`read_html() `_;`to_html() `_ - ``pandas.fwf``;Fixed Width;`read_fwf() `_; + ``pandas.csv``,`CSV `__,`read_csv() `_,`to_csv() `_ + ``pandas.json``,`JSON `__,`read_json() `_,`to_json() `_ + ``pandas.html``,`HTML `__,`read_html() `_,`to_html() `_ + ``pandas.fwf``,Fixed Width,`read_fwf() `_, **Notes**: From 606de6e786c0933ab2d75c786e33f83cc5a618c5 Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Thu, 18 Apr 2024 12:55:36 -0400 Subject: [PATCH 008/156] Backport PR #16300: DOC: Make What's New more discoverable --- docs/index.rst | 2 +- docs/whatsnew/index.rst | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index d8f3adcca464..5848fd730f89 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -103,7 +103,7 @@ processing, and data analysis. Project Details ^^^^^^^^^^^^^^^ - More details about the project (changelog and what's new pages). + What's new in the latest release, changelog, and other project details. +++ diff --git a/docs/whatsnew/index.rst b/docs/whatsnew/index.rst index b8568bd42a0b..92e2c3a4e752 100644 --- a/docs/whatsnew/index.rst +++ b/docs/whatsnew/index.rst @@ -1,6 +1,8 @@ -********************* -Major Release History -********************* +.. _astropy_whats_new_index: + +********** +What's New +********** Examples in these documents are frozen in time to respect the status of the API at the time of the release they are describing. Please refer to the From 0e94483914840807b4457da05cb469f8c3e2f447 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Thu, 18 Apr 2024 14:51:34 -0400 Subject: [PATCH 009/156] Backport PR #16296: remove dependency matrix from `asv.ci.conf.json` --- .github/workflows/ci_benchmark.yml | 4 +++- asv.ci.conf.json | 11 ++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci_benchmark.yml b/.github/workflows/ci_benchmark.yml index 1ccccfeef743..6b59f4ce3671 100644 --- a/.github/workflows/ci_benchmark.yml +++ b/.github/workflows/ci_benchmark.yml @@ -101,4 +101,6 @@ jobs: if: always() with: name: asv-benchmark-results - path: benchmarks.log + path: | + results/ + benchmarks.log diff --git a/asv.ci.conf.json b/asv.ci.conf.json index 079b73716386..1cd5ed4cc3f7 100644 --- a/asv.ci.conf.json +++ b/asv.ci.conf.json @@ -3,19 +3,12 @@ "project": "astropy", "project_url": "http://www.astropy.org/", "repo": ".", - "build_command": [ - "python -m build --wheel -o {build_cache_dir} {build_dir}" + "install_command": [ + "pip install . matplotlib scipy" ], "branches": ["main"], "show_commit_url": "http://github.com/astropy/astropy/commit/", "pythons": ["3.11"], - "matrix": { - "Cython": [], - "build": [], - "packaging": [], - "scipy": [], - "matplotlib": [] - }, "environment_type": "virtualenv", "benchmark_dir": "astropy-benchmarks/benchmarks" } From b7c7689de44c5fd8117b094ebe3fff2f3e2812c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Moritz=20G=C3=BCnther?= Date: Mon, 22 Apr 2024 11:39:56 -0400 Subject: [PATCH 010/156] Merge pull request #16315 from Max1mus7/dataTables-update Update old dataTables version (1.10.12 -> 1.10.25) --- .../jquery/data/css/jquery.dataTables.css | 47 +- .../jquery/data/js/jquery.dataTables.js | 1143 +++++++++-------- .../jquery/data/js/jquery.dataTables.min.js | 346 ++--- docs/changes/table/16315.bugfix.rst | 2 + 4 files changed, 834 insertions(+), 704 deletions(-) create mode 100644 docs/changes/table/16315.bugfix.rst diff --git a/astropy/extern/jquery/data/css/jquery.dataTables.css b/astropy/extern/jquery/data/css/jquery.dataTables.css index 151b858735b5..2d7711f945e1 100644 --- a/astropy/extern/jquery/data/css/jquery.dataTables.css +++ b/astropy/extern/jquery/data/css/jquery.dataTables.css @@ -1,7 +1,7 @@ /* * Table styles */ -table.dataTable { + table.dataTable { width: 100%; margin: 0 auto; clear: both; @@ -34,15 +34,11 @@ table.dataTable tfoot td { } table.dataTable thead .sorting, table.dataTable thead .sorting_asc, -table.dataTable thead .sorting_desc { - cursor: pointer; - *cursor: hand; -} -table.dataTable thead .sorting, -table.dataTable thead .sorting_asc, table.dataTable thead .sorting_desc, table.dataTable thead .sorting_asc_disabled, table.dataTable thead .sorting_desc_disabled { + cursor: pointer; + *cursor: hand; background-repeat: no-repeat; background-position: center right; } @@ -50,10 +46,10 @@ table.dataTable thead .sorting { background-image: url("../images/sort_both.png"); } table.dataTable thead .sorting_asc { - background-image: url("../images/sort_asc.png"); + background-image: url("../images/sort_asc.png") !important; } table.dataTable thead .sorting_desc { - background-image: url("../images/sort_desc.png"); + background-image: url("../images/sort_desc.png") !important; } table.dataTable thead .sorting_asc_disabled { background-image: url("../images/sort_asc_disabled.png"); @@ -179,7 +175,7 @@ table.dataTable.nowrap th, table.dataTable.nowrap td { } table.dataTable.compact thead th, table.dataTable.compact thead td { - padding: 4px 17px 4px 4px; + padding: 4px 17px; } table.dataTable.compact tfoot th, table.dataTable.compact tfoot td { @@ -264,7 +260,6 @@ table.dataTable tbody td.dt-body-nowrap { table.dataTable, table.dataTable th, table.dataTable td { - -webkit-box-sizing: content-box; box-sizing: content-box; } @@ -280,12 +275,23 @@ table.dataTable td { .dataTables_wrapper .dataTables_length { float: left; } +.dataTables_wrapper .dataTables_length select { + border: 1px solid #aaa; + border-radius: 3px; + padding: 5px; + background-color: transparent; + padding: 4px; +} .dataTables_wrapper .dataTables_filter { float: right; text-align: right; } .dataTables_wrapper .dataTables_filter input { - margin-left: 0.5em; + border: 1px solid #aaa; + border-radius: 3px; + padding: 5px; + background-color: transparent; + margin-left: 3px; } .dataTables_wrapper .dataTables_info { clear: both; @@ -405,11 +411,12 @@ table.dataTable td { *margin-top: -1px; -webkit-overflow-scrolling: touch; } -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td { +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td { vertical-align: middle; } -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th > div.dataTables_sizing, -.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td > div.dataTables_sizing { +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing, +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing, +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing { height: 0; overflow: hidden; margin: 0 !important; @@ -418,8 +425,8 @@ table.dataTable td { .dataTables_wrapper.no-footer .dataTables_scrollBody { border-bottom: 1px solid #111; } -.dataTables_wrapper.no-footer div.dataTables_scrollHead table, -.dataTables_wrapper.no-footer div.dataTables_scrollBody table { +.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable, +.dataTables_wrapper.no-footer div.dataTables_scrollBody > table { border-bottom: none; } .dataTables_wrapper:after { @@ -432,7 +439,7 @@ table.dataTable td { @media screen and (max-width: 767px) { .dataTables_wrapper .dataTables_info, - .dataTables_wrapper .dataTables_paginate { +.dataTables_wrapper .dataTables_paginate { float: none; text-align: center; } @@ -442,11 +449,11 @@ table.dataTable td { } @media screen and (max-width: 640px) { .dataTables_wrapper .dataTables_length, - .dataTables_wrapper .dataTables_filter { +.dataTables_wrapper .dataTables_filter { float: none; text-align: center; } .dataTables_wrapper .dataTables_filter { margin-top: 0.5em; } -} +} \ No newline at end of file diff --git a/astropy/extern/jquery/data/js/jquery.dataTables.js b/astropy/extern/jquery/data/js/jquery.dataTables.js index 5b032aeec272..a7e3d30fe2c1 100644 --- a/astropy/extern/jquery/data/js/jquery.dataTables.js +++ b/astropy/extern/jquery/data/js/jquery.dataTables.js @@ -1,15 +1,15 @@ -/*! DataTables 1.10.12 - * ©2008-2015 SpryMedia Ltd - datatables.net/license +/*! DataTables 1.10.25 + * ©2008-2021 SpryMedia Ltd - datatables.net/license */ /** * @summary DataTables * @description Paginate, search and order HTML tables - * @version 1.10.12 + * @version 1.10.25 * @file jquery.dataTables.js - * @author SpryMedia Ltd (www.sprymedia.co.uk) - * @contact www.sprymedia.co.uk/contact - * @copyright Copyright 2008-2015 SpryMedia Ltd. + * @author SpryMedia Ltd + * @contact www.datatables.net + * @copyright Copyright 2008-2021 SpryMedia Ltd. * * This source file is free software, available under the following license: * MIT license - http://datatables.net/license @@ -251,7 +251,7 @@ var api = this.api( true ); /* Check if we want to add multiple rows or not */ - var rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ? + var rows = Array.isArray(data) && ( Array.isArray(data[0]) || $.isPlainObject(data[0]) ) ? api.rows.add( data ) : api.row.add( data ); @@ -279,7 +279,7 @@ * "bPaginate": false * } ); * - * $(window).bind('resize', function () { + * $(window).on('resize', function () { * oTable.fnAdjustColumnSizing(); * } ); * } ); @@ -898,7 +898,7 @@ _fnCamelToHungarian( defaults.column, defaults.column, true ); /* Setting up the initialisation object */ - _fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ) ); + _fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ), true ); @@ -909,8 +909,11 @@ var s = allSettings[i]; /* Base check on table node */ - if ( s.nTable == this || s.nTHead.parentNode == this || (s.nTFoot && s.nTFoot.parentNode == this) ) - { + if ( + s.nTable == this || + (s.nTHead && s.nTHead.parentNode == this) || + (s.nTFoot && s.nTFoot.parentNode == this) + ) { var bRetrieve = oInit.bRetrieve !== undefined ? oInit.bRetrieve : defaults.bRetrieve; var bDestroy = oInit.bDestroy !== undefined ? oInit.bDestroy : defaults.bDestroy; @@ -967,16 +970,12 @@ // Backwards compatibility, before we apply all the defaults _fnCompatOpts( oInit ); - - if ( oInit.oLanguage ) - { - _fnLanguageCompat( oInit.oLanguage ); - } + _fnLanguageCompat( oInit.oLanguage ); // If the length menu is given, but the init display length is not, use the length menu if ( oInit.aLengthMenu && ! oInit.iDisplayLength ) { - oInit.iDisplayLength = $.isArray( oInit.aLengthMenu[0] ) ? + oInit.iDisplayLength = Array.isArray( oInit.aLengthMenu[0] ) ? oInit.aLengthMenu[0][0] : oInit.aLengthMenu[0]; } @@ -1023,8 +1022,7 @@ [ "iCookieDuration", "iStateDuration" ], // backwards compat [ "oSearch", "oPreviousSearch" ], [ "aoSearchCols", "aoPreSearchCols" ], - [ "iDisplayLength", "_iDisplayLength" ], - [ "bJQueryUI", "bJUI" ] + [ "iDisplayLength", "_iDisplayLength" ] ] ); _fnMap( oSettings.oScroll, oInit, [ [ "sScrollX", "sX" ], @@ -1054,31 +1052,7 @@ var oClasses = oSettings.oClasses; - // @todo Remove in 1.11 - if ( oInit.bJQueryUI ) - { - /* Use the JUI classes object for display. You could clone the oStdClasses object if - * you want to have multiple tables with multiple independent classes - */ - $.extend( oClasses, DataTable.ext.oJUIClasses, oInit.oClasses ); - - if ( oInit.sDom === defaults.sDom && defaults.sDom === "lfrtip" ) - { - /* Set the DOM to use a layout suitable for jQuery UI's theming */ - oSettings.sDom = '<"H"lfr>t<"F"ip>'; - } - - if ( ! oSettings.renderer ) { - oSettings.renderer = 'jqueryui'; - } - else if ( $.isPlainObject( oSettings.renderer ) && ! oSettings.renderer.header ) { - oSettings.renderer.header = 'jqueryui'; - } - } - else - { - $.extend( oClasses, DataTable.ext.classes, oInit.oClasses ); - } + $.extend( oClasses, DataTable.ext.classes, oInit.oClasses ); $this.addClass( oClasses.sTable ); @@ -1092,7 +1066,7 @@ if ( oInit.iDeferLoading !== null ) { oSettings.bDeferLoading = true; - var tmp = $.isArray( oInit.iDeferLoading ); + var tmp = Array.isArray( oInit.iDeferLoading ); oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading; oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading; } @@ -1101,7 +1075,7 @@ var oLanguage = oSettings.oLanguage; $.extend( true, oLanguage, oInit.oLanguage ); - if ( oLanguage.sUrl !== "" ) + if ( oLanguage.sUrl ) { /* Get the language definitions from a file - because this Ajax call makes the language * get async to the remainder of this function we use bInitHandedOff to indicate that @@ -1114,6 +1088,8 @@ _fnLanguageCompat( json ); _fnCamelToHungarian( defaults.oLanguage, json ); $.extend( true, oLanguage, json ); + + _fnCallbackFire( oSettings, null, 'i18n', [oSettings]); _fnInitialise( oSettings ); }, error: function () { @@ -1123,6 +1099,9 @@ } ); bInitHandedOff = true; } + else { + _fnCallbackFire( oSettings, null, 'i18n', [oSettings]); + } /* * Stripes @@ -1213,131 +1192,125 @@ } var features = oSettings.oFeatures; + var loadedInit = function () { + /* + * Sorting + * @todo For modularisation (1.11) this needs to do into a sort start up handler + */ - /* Must be done after everything which can be overridden by the state saving! */ - if ( oInit.bStateSave ) - { - features.bStateSave = true; - _fnLoadState( oSettings, oInit ); - _fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' ); - } + // If aaSorting is not defined, then we use the first indicator in asSorting + // in case that has been altered, so the default sort reflects that option + if ( oInit.aaSorting === undefined ) { + var sorting = oSettings.aaSorting; + for ( i=0, iLen=sorting.length ; i').appendTo($this); } - }, 'sc' ); + oSettings.nTHead = thead[0]; + var tbody = $this.children('tbody'); + if ( tbody.length === 0 ) { + tbody = $('').insertAfter(thead); + } + oSettings.nTBody = tbody[0]; - /* - * Final init - * Cache the header, body and footer as required, creating them if needed - */ + var tfoot = $this.children('tfoot'); + if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") ) { + // If we are a scrolling table, and no footer has been given, then we need to create + // a tfoot element for the caption element to be appended to + tfoot = $('').appendTo($this); + } - // Work around for Webkit bug 83867 - store the caption-side before removing from doc - var captions = $this.children('caption').each( function () { - this._captionSide = $this.css('caption-side'); - } ); + if ( tfoot.length === 0 || tfoot.children().length === 0 ) { + $this.addClass( oClasses.sNoFooter ); + } + else if ( tfoot.length > 0 ) { + oSettings.nTFoot = tfoot[0]; + _fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot ); + } - var thead = $this.children('thead'); - if ( thead.length === 0 ) - { - thead = $('').appendTo(this); - } - oSettings.nTHead = thead[0]; + /* Check if there is data passing into the constructor */ + if ( oInit.aaData ) { + for ( i=0 ; i').appendTo(this); - } - oSettings.nTBody = tbody[0]; + /* Copy the data index array */ + oSettings.aiDisplay = oSettings.aiDisplayMaster.slice(); - var tfoot = $this.children('tfoot'); - if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") ) - { - // If we are a scrolling table, and no footer has been given, then we need to create - // a tfoot element for the caption element to be appended to - tfoot = $('').appendTo(this); - } + /* Initialisation complete - table can be drawn */ + oSettings.bInitialised = true; - if ( tfoot.length === 0 || tfoot.children().length === 0 ) { - $this.addClass( oClasses.sNoFooter ); - } - else if ( tfoot.length > 0 ) { - oSettings.nTFoot = tfoot[0]; - _fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot ); - } + /* Check if we need to initialise the table (it might not have been handed off to the + * language processor) + */ + if ( bInitHandedOff === false ) { + _fnInitialise( oSettings ); + } + }; - /* Check if there is data passing into the constructor */ - if ( oInit.aaData ) + /* Must be done after everything which can be overridden by the state saving! */ + if ( oInit.bStateSave ) { - for ( i=0 ; i/g; - var _re_date_start = /^[\w\+\-]/; - var _re_date_end = /[\w\+\-]$/; + + // This is not strict ISO8601 - Date.parse() is quite lax, although + // implementations differ between browsers. + var _re_date = /^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/; // Escape regular expression special characters var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' ); @@ -1383,8 +1358,10 @@ // - fr - Swiss Franc // - kr - Swedish krona, Norwegian krone and Danish krone // - \u2009 is thin space and \u202F is narrow no-break space, both used in many + // - Ƀ - Bitcoin + // - Ξ - Ethereum // standards as thousands separators. - var _re_formatted_numeric = /[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi; + var _re_formatted_numeric = /['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi; var _empty = function ( d ) { @@ -1544,6 +1521,35 @@ }; + /** + * Determine if all values in the array are unique. This means we can short + * cut the _unique method at the cost of a single loop. A sorted array is used + * to easily check the values. + * + * @param {array} src Source array + * @return {boolean} true if all unique, false otherwise + * @ignore + */ + var _areAllUnique = function ( src ) { + if ( src.length < 2 ) { + return true; + } + + var sorted = src.slice().sort(); + var last = sorted[0]; + + for ( var i=1, ien=sorted.length ; itr').attr('role', 'row'); + $(thead).children('tr').attr('role', 'row'); /* Deal with the footer - add classes if required */ - $(thead).find('>tr>th, >tr>td').addClass( classes.sHeaderTH ); - $(tfoot).find('>tr>th, >tr>td').addClass( classes.sFooterTH ); + $(thead).children('tr').children('th, td').addClass( classes.sHeaderTH ); + $(tfoot).children('tr').children('th, td').addClass( classes.sFooterTH ); // Cache the footer cells. Note that we only take the cells from the first // row in the footer. If there is more than one row the user wants to @@ -3359,9 +3415,10 @@ /** * Insert the required TR nodes into the table for display * @param {object} oSettings dataTables settings object + * @param ajaxComplete true after ajax call to complete rendering * @memberof DataTable#oApi */ - function _fnDraw( oSettings ) + function _fnDraw( oSettings, ajaxComplete ) { /* Provide a pre-callback function which can be used to cancel the draw is false is returned */ var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] ); @@ -3410,8 +3467,9 @@ { oSettings.iDraw++; } - else if ( !oSettings.bDestroying && !_fnAjaxUpdate( oSettings ) ) + else if ( !oSettings.bDestroying && !ajaxComplete) { + _fnAjaxUpdate( oSettings ); return; } @@ -3446,7 +3504,7 @@ // iRowCount and j are not currently documented. Are they at all // useful? _fnCallbackFire( oSettings, 'aoRowCallback', null, - [nRow, aoData._aData, iRowCount, j] ); + [nRow, aoData._aData, iRowCount, j, iDataIndex] ); anRows.push( nRow ); iRowCount++; @@ -3815,7 +3873,7 @@ // Convert to object based for 1.10+ if using the old array scheme which can // come from server-side processing or serverParams - if ( data && $.isArray(data) ) { + if ( data && Array.isArray(data) ) { var tmp = {}; var rbracket = /(.*?)\[\]$/; @@ -3850,12 +3908,12 @@ { ajaxData = ajax.data; - var newData = $.isFunction( ajaxData ) ? + var newData = typeof ajaxData === 'function' ? ajaxData( data, oSettings ) : // fn can manipulate data or return ajaxData; // an object object or array to merge // If the function returned something, use that alone - data = $.isFunction( ajaxData ) && newData ? + data = typeof ajaxData === 'function' && newData ? newData : $.extend( true, data, newData ); @@ -3919,7 +3977,7 @@ url: ajax || oSettings.sAjaxSource } ) ); } - else if ( $.isFunction( ajax ) ) + else if ( typeof ajax === 'function' ) { // Is a function - let the caller define what needs to be done oSettings.jqXHR = ajax.call( instance, data, callback, oSettings ); @@ -3943,21 +4001,16 @@ */ function _fnAjaxUpdate( settings ) { - if ( settings.bAjaxDataGet ) { - settings.iDraw++; - _fnProcessingDisplay( settings, true ); - - _fnBuildAjax( - settings, - _fnAjaxParameters( settings ), - function(json) { - _fnAjaxUpdateDraw( settings, json ); - } - ); + settings.iDraw++; + _fnProcessingDisplay( settings, true ); - return false; - } - return true; + _fnBuildAjax( + settings, + _fnAjaxParameters( settings ), + function(json) { + _fnAjaxUpdateDraw( settings, json ); + } + ); } @@ -4093,7 +4146,7 @@ var recordsTotal = compat( 'iTotalRecords', 'recordsTotal' ); var recordsFiltered = compat( 'iTotalDisplayRecords', 'recordsFiltered' ); - if ( draw ) { + if ( draw !== undefined ) { // Protect against out of sequence returns if ( draw*1 < settings.iDraw ) { return; @@ -4110,14 +4163,12 @@ } settings.aiDisplay = settings.aiDisplayMaster.slice(); - settings.bAjaxDataGet = false; - _fnDraw( settings ); + _fnDraw( settings, true ); if ( ! settings._bInitComplete ) { _fnInitComplete( settings, json ); } - settings.bAjaxDataGet = true; _fnProcessingDisplay( settings, false ); } @@ -4202,13 +4253,21 @@ var jqFilter = $('input', filter) .val( previousSearch.sSearch ) .attr( 'placeholder', language.sSearchPlaceholder ) - .bind( + .on( 'keyup.DT search.DT input.DT paste.DT cut.DT', searchDelay ? _fnThrottle( searchFn, searchDelay ) : searchFn ) - .bind( 'keypress.DT', function(e) { + .on( 'mouseup', function(e) { + // Edge fix! Edge 17 does not trigger anything other than mouse events when clicking + // on the clear icon (Edge bug 17584515). This is safe in other browsers as `searchFn` + // checks the value to see if it has changed. In other browsers it won't have. + setTimeout( function () { + searchFn.call(jqFilter[0]); + }, 10); + } ) + .on( 'keypress.DT', function(e) { /* Prevent form submission */ if ( e.keyCode == 13 ) { return false; @@ -4338,16 +4397,19 @@ } var data; + var out = []; var display = settings.aiDisplay; var rpSearch = _fnFilterCreateSearch( searchStr, regex, smart, caseInsensitive ); - for ( var i=display.length-1 ; i>=0 ; i-- ) { + for ( var i=0 ; i input.length || input.indexOf(prevSearch) !== 0 || settings.bSorted // On resort, the display master needs to be @@ -4395,11 +4459,13 @@ // Search the display array display = settings.aiDisplay; - for ( i=display.length-1 ; i>=0 ; i-- ) { - if ( ! rpSearch.test( settings.aoData[ display[i] ]._sFilterRow ) ) { - display.splice( i, 1 ); + for ( i=0 ; i