Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-unyt for openSUSE:Factory checked in at 2023-05-31 21:54:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-unyt (Old) and /work/SRC/openSUSE:Factory/.python-unyt.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-unyt" Wed May 31 21:54:46 2023 rev:4 rq:1089953 version:2.9.5 Changes: -------- --- /work/SRC/openSUSE:Factory/python-unyt/python-unyt.changes 2023-02-08 17:20:55.394128736 +0100 +++ /work/SRC/openSUSE:Factory/.python-unyt.new.1533/python-unyt.changes 2023-05-31 21:54:52.461139058 +0200 @@ -1,0 +2,9 @@ +Wed May 31 08:21:34 UTC 2023 - Dirk Müller <dmuel...@suse.com> + +- update to 2.9.5: + * Fix a regression where arrays elements with dtype ``'int8'`` + would not compare to floats as intended. + * Raise an error in case an array element is assigned to a new + value with incompatible units. + +------------------------------------------------------------------- Old: ---- unyt-2.9.4.tar.gz New: ---- unyt-2.9.5.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-unyt.spec ++++++ --- /var/tmp/diff_new_pack.KY2ftD/_old 2023-05-31 21:54:53.053142557 +0200 +++ /var/tmp/diff_new_pack.KY2ftD/_new 2023-05-31 21:54:53.057142581 +0200 @@ -16,10 +16,9 @@ # -%define skip_python2 1 -%define skip_python36 1 +%{?sle15_python_module_pythons} Name: python-unyt -Version: 2.9.4 +Version: 2.9.5 Release: 0 Summary: A package for handling numpy arrays with units License: BSD-3-Clause ++++++ unyt-2.9.4.tar.gz -> unyt-2.9.5.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/HISTORY.rst new/unyt-2.9.5/HISTORY.rst --- old/unyt-2.9.4/HISTORY.rst 2023-02-06 22:37:10.000000000 +0100 +++ new/unyt-2.9.5/HISTORY.rst 2023-02-23 23:23:22.000000000 +0100 @@ -2,12 +2,26 @@ History ======= +2.9.5 (2023-02-22) +------------------ + +* Fix a regression where arrays elements with dtype ``'int8'`` would not compare to floats + as intended. See `PR #371 <https://github.com/yt-project/unyt/pull/371>`_. Thank you to + Clément Robert (@neutrinoceros on GitHub) and Nathan Goldbaum (@ngoldbaum on GitHub) for + the contribution. + +* Raise an error in case an array element is assigned to a new value with incompatible + units. See `PR #375 <https://github.com/yt-project/unyt/pull/375>`_ and `PR #376 + <https://github.com/yt-project/unyt/pull/376>`_. Thank you to Nathan Goldbaum + (@ngoldbaum on GitHub) for the contribution. + + 2.9.4 (2023-02-06) ------------------ * Make ``unyt_quantity.from_string`` parse ints. See `PR #278 <https://github.com/yt-project/unyt/pull/278>`_. - Thank you to Nahan Goldbaum (@ngoldbaum on GitHub) for the contribution. + Thank you to Nathan Goldbaum (@ngoldbaum on GitHub) for the contribution. * TST: migrate from tox-pyenv to tox-gh-actions #344 See `PR #344 <https://github.com/yt-project/unyt/pull/344>`_. Thank you to Clément Robert (@neutrinoceros on GitHub) for the contribution. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/PKG-INFO new/unyt-2.9.5/PKG-INFO --- old/unyt-2.9.4/PKG-INFO 2023-02-06 22:37:52.538785200 +0100 +++ new/unyt-2.9.5/PKG-INFO 2023-02-23 23:25:32.358159000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: unyt -Version: 2.9.4 +Version: 2.9.5 Summary: A package for handling numpy arrays with units Home-page: https://github.com/yt-project/unyt Author: The yt project @@ -127,12 +127,26 @@ History ======= +2.9.5 (2023-02-22) +------------------ + +* Fix a regression where arrays elements with dtype ``'int8'`` would not compare to floats + as intended. See `PR #371 <https://github.com/yt-project/unyt/pull/371>`_. Thank you to + Clément Robert (@neutrinoceros on GitHub) and Nathan Goldbaum (@ngoldbaum on GitHub) for + the contribution. + +* Raise an error in case an array element is assigned to a new value with incompatible + units. See `PR #375 <https://github.com/yt-project/unyt/pull/375>`_ and `PR #376 + <https://github.com/yt-project/unyt/pull/376>`_. Thank you to Nathan Goldbaum + (@ngoldbaum on GitHub) for the contribution. + + 2.9.4 (2023-02-06) ------------------ * Make ``unyt_quantity.from_string`` parse ints. See `PR #278 <https://github.com/yt-project/unyt/pull/278>`_. - Thank you to Nahan Goldbaum (@ngoldbaum on GitHub) for the contribution. + Thank you to Nathan Goldbaum (@ngoldbaum on GitHub) for the contribution. * TST: migrate from tox-pyenv to tox-gh-actions #344 See `PR #344 <https://github.com/yt-project/unyt/pull/344>`_. Thank you to Clément Robert (@neutrinoceros on GitHub) for the contribution. Binary files old/unyt-2.9.4/docs/_build/html/_images/mpl_fig1.png and new/unyt-2.9.5/docs/_build/html/_images/mpl_fig1.png differ Binary files old/unyt-2.9.4/docs/_build/html/_images/mpl_fig2.png and new/unyt-2.9.5/docs/_build/html/_images/mpl_fig2.png differ Binary files old/unyt-2.9.4/docs/_build/html/_images/mpl_fig3.png and new/unyt-2.9.5/docs/_build/html/_images/mpl_fig3.png differ Binary files old/unyt-2.9.4/docs/_build/html/_images/mpl_fig4.png and new/unyt-2.9.5/docs/_build/html/_images/mpl_fig4.png differ Binary files old/unyt-2.9.4/docs/_build/html/_images/mpl_fig5.png and new/unyt-2.9.5/docs/_build/html/_images/mpl_fig5.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/file.png and new/unyt-2.9.5/docs/_build/html/_static/file.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/minus.png and new/unyt-2.9.5/docs/_build/html/_static/minus.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/mpl_fig1.png and new/unyt-2.9.5/docs/_build/html/_static/mpl_fig1.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/mpl_fig2.png and new/unyt-2.9.5/docs/_build/html/_static/mpl_fig2.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/mpl_fig3.png and new/unyt-2.9.5/docs/_build/html/_static/mpl_fig3.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/mpl_fig4.png and new/unyt-2.9.5/docs/_build/html/_static/mpl_fig4.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/mpl_fig5.png and new/unyt-2.9.5/docs/_build/html/_static/mpl_fig5.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/plus.png and new/unyt-2.9.5/docs/_build/html/_static/plus.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/yt_icon.png and new/unyt-2.9.5/docs/_build/html/_static/yt_icon.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/yt_logo.png and new/unyt-2.9.5/docs/_build/html/_static/yt_logo.png differ Binary files old/unyt-2.9.4/docs/_build/html/_static/yt_logo_small.png and new/unyt-2.9.5/docs/_build/html/_static/yt_logo_small.png differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.array.rst new/unyt-2.9.5/docs/modules/unyt.array.rst --- old/unyt-2.9.4/docs/modules/unyt.array.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.array.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.array module -================= - -.. automodule:: unyt.array - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.dimensions.rst new/unyt-2.9.5/docs/modules/unyt.dimensions.rst --- old/unyt-2.9.4/docs/modules/unyt.dimensions.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.dimensions.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.dimensions module -====================== - -.. automodule:: unyt.dimensions - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.equivalencies.rst new/unyt-2.9.5/docs/modules/unyt.equivalencies.rst --- old/unyt-2.9.4/docs/modules/unyt.equivalencies.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.equivalencies.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.equivalencies module -========================= - -.. automodule:: unyt.equivalencies - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.exceptions.rst new/unyt-2.9.5/docs/modules/unyt.exceptions.rst --- old/unyt-2.9.4/docs/modules/unyt.exceptions.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.exceptions.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.exceptions module -====================== - -.. automodule:: unyt.exceptions - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.mpl_interface.rst new/unyt-2.9.5/docs/modules/unyt.mpl_interface.rst --- old/unyt-2.9.4/docs/modules/unyt.mpl_interface.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.mpl_interface.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.mpl\_interface module -========================== - -.. automodule:: unyt.mpl_interface - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.physical_constants.rst new/unyt-2.9.5/docs/modules/unyt.physical_constants.rst --- old/unyt-2.9.4/docs/modules/unyt.physical_constants.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.physical_constants.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.physical\_constants module -=============================== - -.. automodule:: unyt.physical_constants - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.rst new/unyt-2.9.5/docs/modules/unyt.rst --- old/unyt-2.9.4/docs/modules/unyt.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ -unyt package -============ - -.. automodule:: unyt - :members: - :undoc-members: - :show-inheritance: - -Submodules ----------- - -.. toctree:: - :maxdepth: 0 - - unyt.array - unyt.dimensions - unyt.equivalencies - unyt.exceptions - unyt.mpl_interface - unyt.physical_constants - unyt.testing - unyt.unit_object - unyt.unit_registry - unyt.unit_symbols - unyt.unit_systems diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.testing.rst new/unyt-2.9.5/docs/modules/unyt.testing.rst --- old/unyt-2.9.4/docs/modules/unyt.testing.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.testing.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.testing module -=================== - -.. automodule:: unyt.testing - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.unit_object.rst new/unyt-2.9.5/docs/modules/unyt.unit_object.rst --- old/unyt-2.9.4/docs/modules/unyt.unit_object.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.unit_object.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.unit\_object module -======================== - -.. automodule:: unyt.unit_object - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.unit_registry.rst new/unyt-2.9.5/docs/modules/unyt.unit_registry.rst --- old/unyt-2.9.4/docs/modules/unyt.unit_registry.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.unit_registry.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.unit\_registry module -========================== - -.. automodule:: unyt.unit_registry - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.unit_symbols.rst new/unyt-2.9.5/docs/modules/unyt.unit_symbols.rst --- old/unyt-2.9.4/docs/modules/unyt.unit_symbols.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.unit_symbols.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.unit\_symbols module -========================= - -.. automodule:: unyt.unit_symbols - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/docs/modules/unyt.unit_systems.rst new/unyt-2.9.5/docs/modules/unyt.unit_systems.rst --- old/unyt-2.9.4/docs/modules/unyt.unit_systems.rst 2023-02-06 22:26:21.000000000 +0100 +++ new/unyt-2.9.5/docs/modules/unyt.unit_systems.rst 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -unyt.unit\_systems module -========================= - -.. automodule:: unyt.unit_systems - :members: - :undoc-members: - :show-inheritance: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/unyt/_version.py new/unyt-2.9.5/unyt/_version.py --- old/unyt-2.9.4/unyt/_version.py 2023-02-06 22:37:52.540202000 +0100 +++ new/unyt-2.9.5/unyt/_version.py 2023-02-23 23:25:32.360292400 +0100 @@ -8,11 +8,11 @@ version_json = ''' { - "date": "2023-02-06T22:36:53+0100", + "date": "2023-02-23T13:50:41-0700", "dirty": false, "error": null, - "full-revisionid": "cdf3d78ee4a29c312f570051795eec2aaf758e92", - "version": "v2.9.4" + "full-revisionid": "d625b71d7e2266f1ff35293804dfb69577e1552f", + "version": "v2.9.5" } ''' # END VERSION_JSON diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/unyt/array.py new/unyt-2.9.5/unyt/array.py --- old/unyt-2.9.4/unyt/array.py 2023-02-06 22:20:43.000000000 +0100 +++ new/unyt-2.9.5/unyt/array.py 2023-02-23 23:23:22.000000000 +0100 @@ -141,7 +141,14 @@ NULL_UNIT = Unit() POWER_MAPPING = {multiply: lambda x: x, divide: lambda x: 2 - x} -DISALLOWED_DTYPES = ("S", "U", "a", "O", "M", "m", "b") +DISALLOWED_DTYPES = ( + "S", # bytestring + "a", # bytestring + "U", # (unicode) bytes + "O", # Python object + "M", # datetime + "m", # timedelta +) __doctest_requires__ = { ("unyt_array.from_pint", "unyt_array.to_pint"): ["pint"], @@ -1721,6 +1728,12 @@ pass return ret + def __setitem__(self, item, value): + if hasattr(value, "units"): + if value.units != self.units and value.units != NULL_UNIT: + value = value.to(self.units) + super().__setitem__(item, value) + def __pow__(self, p, mod=None, /): """ Power function, over-rides the ufunc as diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/unyt/tests/test_unyt_array.py new/unyt-2.9.5/unyt/tests/test_unyt_array.py --- old/unyt-2.9.4/unyt/tests/test_unyt_array.py 2023-02-06 22:20:43.000000000 +0100 +++ new/unyt-2.9.5/unyt/tests/test_unyt_array.py 2023-02-23 23:23:22.000000000 +0100 @@ -2739,3 +2739,28 @@ a = 1 * cm assert not (a == "hello") assert a != "hello" + + +def test_int8_comparison(): + # see regression https://github.com/yt-project/unyt/issues/369 + a = unyt_array(np.zeros(5, dtype=np.int8)) + assert all(e == 0 for e in a) + + +def test_setitem(): + # see https://github.com/yt-project/unyt/issues/373 + a = [1, 2, 3] * cm + a[1] = 2 * m + assert a[1].value == 200 + assert a[1].units == cm + + with pytest.raises(UnitConversionError): + a[1] = 2 * g + + a[1] = 2 + assert a[1].value == 2 + assert a[1].units == cm + + a[1] = unyt_quantity(2) + assert a[1].value == 2 + assert a[1].units == cm diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/unyt.egg-info/PKG-INFO new/unyt-2.9.5/unyt.egg-info/PKG-INFO --- old/unyt-2.9.4/unyt.egg-info/PKG-INFO 2023-02-06 22:37:51.000000000 +0100 +++ new/unyt-2.9.5/unyt.egg-info/PKG-INFO 2023-02-23 23:25:31.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: unyt -Version: 2.9.4 +Version: 2.9.5 Summary: A package for handling numpy arrays with units Home-page: https://github.com/yt-project/unyt Author: The yt project @@ -127,12 +127,26 @@ History ======= +2.9.5 (2023-02-22) +------------------ + +* Fix a regression where arrays elements with dtype ``'int8'`` would not compare to floats + as intended. See `PR #371 <https://github.com/yt-project/unyt/pull/371>`_. Thank you to + Clément Robert (@neutrinoceros on GitHub) and Nathan Goldbaum (@ngoldbaum on GitHub) for + the contribution. + +* Raise an error in case an array element is assigned to a new value with incompatible + units. See `PR #375 <https://github.com/yt-project/unyt/pull/375>`_ and `PR #376 + <https://github.com/yt-project/unyt/pull/376>`_. Thank you to Nathan Goldbaum + (@ngoldbaum on GitHub) for the contribution. + + 2.9.4 (2023-02-06) ------------------ * Make ``unyt_quantity.from_string`` parse ints. See `PR #278 <https://github.com/yt-project/unyt/pull/278>`_. - Thank you to Nahan Goldbaum (@ngoldbaum on GitHub) for the contribution. + Thank you to Nathan Goldbaum (@ngoldbaum on GitHub) for the contribution. * TST: migrate from tox-pyenv to tox-gh-actions #344 See `PR #344 <https://github.com/yt-project/unyt/pull/344>`_. Thank you to Clément Robert (@neutrinoceros on GitHub) for the contribution. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/unyt-2.9.4/unyt.egg-info/SOURCES.txt new/unyt-2.9.5/unyt.egg-info/SOURCES.txt --- old/unyt-2.9.4/unyt.egg-info/SOURCES.txt 2023-02-06 22:37:52.000000000 +0100 +++ new/unyt-2.9.5/unyt.egg-info/SOURCES.txt 2023-02-23 23:25:32.000000000 +0100 @@ -35,22 +35,6 @@ docs/requirements.txt docs/unit_listing.rst docs/usage.rst -docs/_build/html/_images/mpl_fig1.png -docs/_build/html/_images/mpl_fig2.png -docs/_build/html/_images/mpl_fig3.png -docs/_build/html/_images/mpl_fig4.png -docs/_build/html/_images/mpl_fig5.png -docs/_build/html/_static/file.png -docs/_build/html/_static/minus.png -docs/_build/html/_static/mpl_fig1.png -docs/_build/html/_static/mpl_fig2.png -docs/_build/html/_static/mpl_fig3.png -docs/_build/html/_static/mpl_fig4.png -docs/_build/html/_static/mpl_fig5.png -docs/_build/html/_static/plus.png -docs/_build/html/_static/yt_icon.png -docs/_build/html/_static/yt_logo.png -docs/_build/html/_static/yt_logo_small.png docs/_static/mpl_fig1.png docs/_static/mpl_fig2.png docs/_static/mpl_fig3.png @@ -60,18 +44,6 @@ docs/_static/yt_logo.png docs/_static/yt_logo_small.png docs/extensions/show_all_units.py -docs/modules/unyt.array.rst -docs/modules/unyt.dimensions.rst -docs/modules/unyt.equivalencies.rst -docs/modules/unyt.exceptions.rst -docs/modules/unyt.mpl_interface.rst -docs/modules/unyt.physical_constants.rst -docs/modules/unyt.rst -docs/modules/unyt.testing.rst -docs/modules/unyt.unit_object.rst -docs/modules/unyt.unit_registry.rst -docs/modules/unyt.unit_symbols.rst -docs/modules/unyt.unit_systems.rst paper/apply.png paper/benchmark_plot.py paper/binary_different_units.png