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
Running the speXtra tests lead to a large number of warnings:
PendingDeprecationWarning: The 'name plus file extension' property will be moved to .filename in the next minor pre-release, making .datafile deprecated.
However, there seems no clear way to remedy the warning, as the datafile property says to use filename:
@propertydefdatafile(self):
"""Name and extension of the file."""warnings.warn("The 'name plus file extension' property will be moved ""to .filename in the next minor pre-release, making "".datafile deprecated.",
PendingDeprecationWarning, 2)
returnself.basename+self.library.file_extension
but the filename property itself is already deprecated and says to use path:
@propertydeffilename(self):
"""Deprecated feature."""warnings.warn("The .filename property is deprecated and will refer to ""the full name incl. file extension in future versions. ""For the absolute file path, please use .path instead!",
DeprecationWarning, 2)
and path in turn accesses datafile, completing the circle:
@propertydefpath(self) ->Path:
"""Path to the cached file."""
...
returnspextra_database.fetch(f"{self.library.path}/{self.datafile}")
I'm trying to add
filterwarnings = [
"error",
]
to pyproject.toml, and fix some of the deprecation warnings that are raised, but I cannot figure out how to get rid of our own deprecation warning.
The deprecations seem to have been introduced in #10, but I haven't checked whether they were there before that refactoring.
The text was updated successfully, but these errors were encountered:
They were not here before, I put those in. Mostly to see if they pop up anywhere else (i.e. if those properties are called from outside spextra itself, e.g. by some code in ScopeSim). I had to do some major refactoring with these attributes and properties (in #10) because they were inconsistent before, but didn't want to completely break everything existing. My plan was to eventually remove these things, or rather make them do what it says in those warnings, but I forgot to do that in last 10-ish months...
I don't think we had to ignore the warning in the other projects, so maybe it is not called anywhere. But apparently we don't yet run all projects with warning=error, so not sure.
I don't actually recall why I decided to try adding warning=error to speXtra, must have had to do with AstarVienna/ScopeSim_Data#20 .
This doesn't really matter, but it was not directly obvious what the plan actually is. Not that I put too much effort in it, I gave up once I noticed the (current) circular deprecation.
Running the speXtra tests lead to a large number of warnings:
However, there seems no clear way to remedy the warning, as the
datafile
property says to usefilename
:but the
filename
property itself is already deprecated and says to usepath
:and
path
in turn accessesdatafile
, completing the circle:I'm trying to add
to
pyproject.toml
, and fix some of the deprecation warnings that are raised, but I cannot figure out how to get rid of our own deprecation warning.The deprecations seem to have been introduced in #10, but I haven't checked whether they were there before that refactoring.
The text was updated successfully, but these errors were encountered: