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
{{ message }}
Repository navigation
DeprecationWarning: Testing an XML element's truth value will raise an exception in future versions #1355
last_child=self.lastChild(sibling)
indent=0>whilelast_child:
EDeprecationWarning: Testinganelement's truth value will raise an exception in future versions. Use specific 'len(elem)' or 'elemisnotNone' testinstead.
__pypackages__/3.12/lib/markdown/extensions/admonition.py:79: DeprecationWarning
diff --git a/markdown/extensions/admonition.py b/markdown/extensions/admonition.py
index 6d395f3..ce8492f 100644
--- a/markdown/extensions/admonition.py+++ b/markdown/extensions/admonition.py@@ -78,14 +78,14 @@ class AdmonitionProcessor(BlockProcessor):
indent = 0
while last_child is not None:
if (
- sibling and block.startswith(' ' * self.tab_length * 2) and- last_child and last_child.tag in ('ul', 'ol', 'dl')+ sibling is not None and block.startswith(' ' * self.tab_length * 2) and+ last_child is not None and last_child.tag in ('ul', 'ol', 'dl')
):
# The expectation is that we'll find an `<li>` or `<dt>`.
# We should get its last child as well.
sibling = self.lastChild(last_child)
- last_child = self.lastChild(sibling) if sibling else None+ last_child = self.lastChild(sibling) if sibling is not None else None
# Context has been lost at this point, so we must adjust the
# text's indentation level so it will be evaluated correctly
But we are also getting:
Traceback (most recent call last): File "/Users/facelessuser/Code/github/markdown/tests/test_meta.py", line 20, in test__version__IsValid import packaging.versionModuleNotFoundError: No module named 'packaging'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/Users/facelessuser/Code/github/markdown/tests/test_meta.py", line 22, in test__version__IsValid from pkg_resources.extern import packagingModuleNotFoundError: No module named 'pkg_resources'
easy_install, pkg_resources, setuptools and distutils are no longer provided by default in environments created with venv or bootstrapped with ensurepip, since they are part of the setuptools package. For projects relying on these at runtime, the setuptools project should be declared as a dependency and installed separately (typically, using pip).
It seems packaging should be added as a test dependency.
As a fallback maybe we can use importlib.resources instead of pkg_resource.
Activity
facelessuser commentedon Jul 17, 2023
I may pull the latest and run the tests on 3.12 and fix related issues. I'll assign this to me for now.
facelessuser commentedon Jul 17, 2023
We do have some issues which I've fixed locally:
But we are also getting:
I'll have to dig into that issue separately.
pawamoy commentedon Jul 17, 2023
https://docs.python.org/3.12/whatsnew/3.12.html#removed:
It seems
packagingshould be added as a test dependency.As a fallback maybe we can use
importlib.resourcesinstead ofpkg_resource.facelessuser commentedon Jul 17, 2023
I've created the separate issue here: #1357 for the packaging issue.