Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Officially Support Python 3.10 #1124

Closed

Description

@dmashine

Hello!
If i run a test with python3 -We error level, i got this Warning:

  File "/usr/local/lib/python3.7/dist-packages/markdown/__init__.py", line 29, in <module>
    from .core import Markdown, markdown, markdownFromFile  # noqa: E402
  File "/usr/local/lib/python3.7/dist-packages/markdown/core.py", line 26, in <module>
    from . import util
  File "/usr/local/lib/python3.7/dist-packages/markdown/util.py", line 87, in <module>
    INSTALLED_EXTENSIONS = metadata.entry_points().get('markdown.extensions', ())
  File "/usr/local/lib/python3.7/dist-packages/importlib_metadata/__init__.py", line 312, in get
    flake8_bypass(self._warn)()
DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.

python version is Python 3.7.3
see changes in metadata.py

Activity

  1. mitya57 commented on Mar 31, 2021

    @mitya57
    Collaborator

    So instead of

    metadata.entry_points().get('markdown.extensions', ())

    We are supposed to use

    metadata.entry_points(group='markdown.extensions')

    The new API is already available in the importlib_metadata backport on PyPI, but it will be included in Python standard library only since version 3.10:
    https://docs.python.org/3.10/library/importlib.metadata.html#entry-points

  2. waylan commented on Mar 31, 2021

    @waylan
    Member

    The new API is already available in the importlib_metadata backport on PyPI, but it will be included in Python standard library only since version 3.10

    Note that we are using the backport for Python 3.6 and 3.7. So we only need to address this for 3.8 and 3.9. I suppose we could just require the backport for those as well. We would need to limit the backport to newer versions only which include support for the change.

    Regardless, we do not yet officially support Python 3.10, and won't until close in time to its final release, so there is no rush. However, a PR is welcome if someone want's to.

  3. added
    bug
    confirmed
    core
    on Mar 31, 2021
  4. johnthagen commented on Nov 15, 2021

    @johnthagen
    Contributor

    This warning just started triggering when we added Python 3.10 to our CI matrix. A new release that fixes this would be appreciated.

    A stacktrace:

      File "/.tox/docker/lib/python3.10/site-packages/rest_framework/compat.py", line 71, in <module>
        import markdown
      File "/.tox/docker/lib/python3.10/site-packages/markdown/__init__.py", line 29, in <module>
        from .core import Markdown, markdown, markdownFromFile  # noqa: E402
      File "/.tox/docker/lib/python3.10/site-packages/markdown/core.py", line 26, in <module>
        from . import util
      File "/.tox/docker/lib/python3.10/site-packages/markdown/util.py", line 87, in <module>
        INSTALLED_EXTENSIONS = metadata.entry_points().get('markdown.extensions', ())
      File "/usr/local/lib/python3.10/importlib/metadata/__init__.py", line 400, in get
        self._warn()
    DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
    
  5. added this to the Version 3.3.5 milestone on Nov 15, 2021
  6. waylan commented on Nov 15, 2021

    @waylan
    Member

    As Python 3.10 was released last month, we should officially add support. I've adding this to the 3.3.5 Milestone so we don't forget about it. Of course, a PR is welcome.

  7. changed the title [-]DeprecationWarning[/-] [+]Officially Support Python 3.10[/+] on Nov 15, 2021
  8. added a commit that references this issue on Nov 16, 2021
    32a7c0b
  9. added a commit that references this issue on Nov 16, 2021
    7919bfd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugconfirmedcore

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions