I am running python3.12 and get the same error as your 3.12 ci see sample. /home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/coreapi/utils.py:5: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import pkg_resources/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/coreapi/codecs/download.py:5: DeprecationWarning: 'cgi' is deprecated and slated for removal in Python 3.13 import cgiINTERNALERROR> Traceback (most recent call last):INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/_pytest/main.py", line 267, in wrap_sessionINTERNALERROR> config._do_configure()INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/_pytest/config/__init__.py", line 1053, in _do_configureINTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/pluggy/_hooks.py", line 514, in call_historicINTERNALERROR> res = self._hookexec(self.name, self._hookimpls, kwargs, False)INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexecINTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/pluggy/_callers.py", line 113, in _multicallINTERNALERROR> raise exception.with_traceback(exception.__traceback__)INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicallINTERNALERROR> res = hook_impl.function(*args)INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/tests/conftest.py", line 95, in pytest_configureINTERNALERROR> django.setup()INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/django/__init__.py", line 24, in setupINTERNALERROR> apps.populate(settings.INSTALLED_APPS)INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/django/apps/registry.py", line 91, in populateINTERNALERROR> app_config = AppConfig.create(entry)INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/django/apps/config.py", line 193, in createINTERNALERROR> import_module(entry)INTERNALERROR> File "/usr/lib64/python3.12/importlib/__init__.py", line 90, in import_moduleINTERNALERROR> return _bootstrap._gcd_import(name[level:], package, level)INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^INTERNALERROR> File "<frozen importlib._bootstrap>", line 1381, in _gcd_importINTERNALERROR> File "<frozen importlib._bootstrap>", line 1354, in _find_and_loadINTERNALERROR> File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlockedINTERNALERROR> File "<frozen importlib._bootstrap>", line 929, in _load_unlockedINTERNALERROR> File "<frozen importlib._bootstrap_external>", line 994, in exec_moduleINTERNALERROR> File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removedINTERNALERROR> File "/home/markom-dot/research/django-rest-framework/tests/importable/__init__.py", line 6, in <module>INTERNALERROR> from rest_framework import compat, serializers # noqaINTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/rest_framework/compat.py", line 64, in <module>INTERNALERROR> import markdownINTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/markdown/__init__.py", line 29, in <module>INTERNALERROR> from .core import Markdown, markdown, markdownFromFile # noqa: E402INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^INTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/markdown/core.py", line 26, in <module>INTERNALERROR> from . import utilINTERNALERROR> File "/home/markom-dot/research/django-rest-framework/.venv/lib64/python3.12/site-packages/markdown/util.py", line 86, in <module>INTERNALERROR> INSTALLED_EXTENSIONS = metadata.entry_points().get('markdown.extensions', ())INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^INTERNALERROR> AttributeError: 'EntryPoints' object has no attribute 'get'
Insidecompat.py I've the following workaround. I just catch the AttributeError since Markdown is optional and not needed. I can successfully run tests by executing./runtests.py. except (ImportError,AttributeError):apply_markdown=Nonemarkdown=None However, flake8 fails and I cannot commit this code of course. Here is the traceback: flake8...................................................................Failed- hook id: flake8- exit code: 1Traceback (most recent call last): File "/home/markom-dot/.cache/pre-commit/repoyalztujj/py_env-python3/bin/flake8", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/markom-dot/.cache/pre-commit/repoyalztujj/py_env-python3/lib/python3.12/site-packages/flake8/main/cli.py", line 22, in main app.run(argv) File "/home/markom-dot/.cache/pre-commit/repoyalztujj/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 363, in run self._run(argv) File "/home/markom-dot/.cache/pre-commit/repoyalztujj/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 350, in _run self.initialize(argv) File "/home/markom-dot/.cache/pre-commit/repoyalztujj/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 330, in initialize self.find_plugins(config_finder) File "/home/markom-dot/.cache/pre-commit/repoyalztujj/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 153, in find_plugins self.check_plugins = plugin_manager.Checkers(local_plugins.extension) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/markom-dot/.cache/pre-commit/repoyalztujj/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 356, in __init__ self.manager = PluginManager( ^^^^^^^^^^^^^^ File "/home/markom-dot/.cache/pre-commit/repoyalztujj/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 238, in __init__ self._load_entrypoint_plugins() File "/home/markom-dot/.cache/pre-commit/repoyalztujj/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 254, in _load_entrypoint_plugins eps = importlib_metadata.entry_points().get(self.namespace, ()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AttributeError: 'EntryPoints' object has no attribute 'get'
|
Uh oh!
There was an error while loading.Please reload this page.
related#9181