You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug description
When running the CI tests in the Debian package, I get the following failure with Python 3.12.1:
_____________________________ test_parameter_name ______________________________
def test_parameter_name():
with pytest.raises(RuntimeError):
> class MyTestModel:
gammapy/modeling/models/tests/test_core.py:256:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Parameter(name='wrong-name', value=3.0, factor=3.0, scale=1.0,
unit=Unit(dimensionless), min=nan, max=nan, frozen=False,
id=0xffff8e307aa0)
owner = <class 'gammapy.modeling.models.tests.test_core.test_parameter_name.<locals>.MyTestModel'>
name = 'par'
def __set_name__(self, owner, name):
if not self._name == name:
> raise ValueError(f"Expected parameter name '{name}', got {self._name}")
E ValueError: Expected parameter name 'par', got wrong-name
E Error calling __set_name__ on 'Parameter' instance 'par'
in 'MyTestModel'
gammapy/modeling/parameter.py:165: ValueError
This is a regression, with Python 3.11 and otherwise identical packages, I don't see the failure.
Expected behavior
All tests should pass.
To Reproduce
Run the CI tests with Python 3.12
Other information
This was observed with the Debian package of Gammapy, when trying to rebuild for Python 3.12 support. A Debian bug was filed as #1058047. Full build log f.e. here.
The text was updated successfully, but these errors were encountered:
Gammapy version
Gammapy 1.1, Python 3.12
Bug description
When running the CI tests in the Debian package, I get the following failure with Python 3.12.1:
This is a regression, with Python 3.11 and otherwise identical packages, I don't see the failure.
Expected behavior
All tests should pass.
To Reproduce
Run the CI tests with Python 3.12
Other information
This was observed with the Debian package of Gammapy, when trying to rebuild for Python 3.12 support. A Debian bug was filed as #1058047. Full build log f.e. here.
The text was updated successfully, but these errors were encountered: