Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

added python 3.12 to CI#9157

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
auvipy merged 6 commits intoencode:masterfromauvipy:py312
Feb 20, 2024
Merged

added python 3.12 to CI#9157

auvipy merged 6 commits intoencode:masterfromauvipy:py312
Feb 20, 2024

Conversation

@auvipy
Copy link
Collaborator

@auvipyauvipy commentedNov 5, 2023
edited
Loading

related#9181

joaodaher reacted with eyes emoji
@MarkoM-dot
Copy link
Contributor

MarkoM-dot commentedNov 26, 2023
edited
Loading

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'

@MarkoM-dot
Copy link
Contributor

I have submitted a pr here:#9167

Hope this helps!

auvipy reacted with heart emoji

@auvipy
Copy link
CollaboratorAuthor

=========================== short test summary info ============================
ERROR tests/test_fields.py - ValueError: not enough values to unpack (expecte...
ERROR tests/schemas/test_coreapi.py - ValueError: not enough values to unpack...
ERROR tests/schemas/test_openapi.py - ValueError: not enough values to unpack...
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
======================== 2 warnings, 3 errors in 9.72s =========================

@kiendang
Copy link
Contributor

=========================== short test summary info ============================ ERROR tests/test_fields.py - ValueError: not enough values to unpack (expecte... ERROR tests/schemas/test_coreapi.py - ValueError: not enough values to unpack... ERROR tests/schemas/test_openapi.py - ValueError: not enough values to unpack... !!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!! ======================== 2 warnings, 3 errors in 9.72s =========================

@auvipy#9180 should fix this.

@auvipy
Copy link
CollaboratorAuthor

OK let me check

@kiendang
Copy link
Contributor

This part in#9180 needs to be changed though. The issue is with djangomain, not 5.0.

ifdjango.VERSION>= (5,0):

@kiendang
Copy link
Contributor

This part in#9180 needs to be changed though. The issue is with djangomain, not 5.0.

ifdjango.VERSION>= (5,0):

This is now rectified in the PR (if django.VERSION >= (5, 1)...).

@lovelydinosaur
Copy link
Contributor

ready for review?

Comment on lines 59 to 62
[testenv:py311-djangomain]
ignore_outcome = true
[testenv:py312-djangomain]
ignore_outcome = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
[testenv:py311-djangomain]
ignore_outcome = true
[testenv:py312-djangomain]
ignore_outcome = true
[testenv:py311-djangomain]
ignore_outcome = true
[testenv:py312-djangomain]
ignore_outcome = true

@lovelydinosaurlovelydinosaur mentioned this pull requestJan 4, 2024
@kiendang
Copy link
Contributor

@auvipy Tests for 3.12 should pass now if you merge withmaster.

@math-a3kmath-a3k mentioned this pull requestJan 20, 2024
@math-a3k
Copy link
Contributor

@auvipy you can cherry-pick the last two commits in#9230 which fixes the pre-commit error and enables coreapi tests for python 3.12 - after rebasing with master it should all be working as expected (not considering djangomain)

@auvipyauvipy marked this pull request as ready for reviewFebruary 20, 2024 13:06
@auvipyauvipy merged commit336e7ad intoencode:masterFeb 20, 2024
@auvipyauvipy deleted the py312 branchFebruary 20, 2024 13:12
@auvipy
Copy link
CollaboratorAuthor

thanks Rodrigo

@auvipyauvipy added this to the3.15 milestoneFeb 20, 2024
@math-a3k
Copy link
Contributor

🙏

@auvipy
Copy link
CollaboratorAuthor

🙏

just wanted to make sure you also get some credit

@lovelydinosaurlovelydinosaur mentioned this pull requestJun 14, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@lovelydinosaurlovelydinosaurlovelydinosaur left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

3.15

Development

Successfully merging this pull request may close these issues.

5 participants

@auvipy@MarkoM-dot@kiendang@lovelydinosaur@math-a3k

[8]ページ先頭

©2009-2025 Movatter.jp