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
The following block of code will always raise ImportError if you have the latest version of webcolors installed, meaning that the contextlib.suppress block will always exit immediately, and these functions will never be defined; the block is now essentially dead code:
This is because webcolors made the CSS21_NAMES_TO_HEX constant private in webcolors==24.6.0 (released on June 6), so the statement from webcolors import CSS21_NAMES_TO_HEX now always raises ImportError. The diff between the latest version of webcolors and the release before it can be seen here: ubernostrum/webcolors@1.13...24.6.0.
Obviously third parties should not be relying on any functions in the internal _format module, so this isn't a complaint! But we spotted this in typeshed's CI, and thought you might like to know.
The text was updated successfully, but these errors were encountered:
Bumps the pin to the newer version, where validating these seems to now
require a function call.
Really we should have a better strategy in CI for ensuring we run all
the format tests we intend to run, but this should happen really really
rarely.
Closes: ##1268
(This issue isn't a complaint, just an FYI!)
The following block of code will always raise
ImportError
if you have the latest version ofwebcolors
installed, meaning that thecontextlib.suppress
block will always exit immediately, and these functions will never be defined; the block is now essentially dead code:jsonschema/jsonschema/_format.py
Lines 415 to 429 in 0024b58
This is because
webcolors
made theCSS21_NAMES_TO_HEX
constant private inwebcolors==24.6.0
(released on June 6), so the statementfrom webcolors import CSS21_NAMES_TO_HEX
now always raisesImportError
. The diff between the latest version ofwebcolors
and the release before it can be seen here: ubernostrum/webcolors@1.13...24.6.0.Obviously third parties should not be relying on any functions in the internal
_format
module, so this isn't a complaint! But we spotted this in typeshed's CI, and thought you might like to know.The text was updated successfully, but these errors were encountered: