[PATCH] hgdemandimport: avoid Python 3.15 errors for heapq and copy
Raphaël Gomès
raphael.gomes at octobus.net
Mon Mar 30 18:32:01 UTC 2026
Merged, with another change on top of it for another module
On 3/28/26 5:13 PM, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <mads at kiilerich.com>
> # Date 1774706053 -3600
> # Sat Mar 28 14:54:13 2026 +0100
> # Branch stable
> # Node ID 4ef356e1dd1f573af87bc4ab5aa3d1a0be925346
> # Parent 1afb8f260d18a38a94e81398a778f9430f103ba8
> hgdemandimport: avoid Python 3.15 errors for heapq and copy
>
> Got:
>
> ImportError: cannot import name 'nlargest' from 'heapq'
>
> The new PEP 810 lazy imports might enable new ways of doing things. In the
> future.
>
> diff --git a/hgdemandimport/__init__.py b/hgdemandimport/__init__.py
> --- a/hgdemandimport/__init__.py
> +++ b/hgdemandimport/__init__.py
> @@ -65,6 +65,8 @@ IGNORES = {
> 'warnings',
> 'threading',
> 'collections.abc',
> + 'heapq',
> + 'copy',
> }
>
> _pypy = '__pypy__' in sys.builtin_module_names
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at lists.mercurial-scm.org
> https://lists.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list