changeset 49543:5f22c92dcf3d stable

demandimport: convert ignored modules from bytes -> str in extensions The default list of ignored modules are str, and test for bypassing the lazy import is `module.__name__ in ignores`, so these were effectively NOT ignored. Most of these date back to the grand byteification in 687b865b95ad, with some subsequent additions that followed the existing example. I have no idea if these modules in fact need to bypass lazy importing, but at least it follows the intent of the code.
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 02 Nov 2022 14:23:09 -0400
parents fc719967efd0
children 1994842955db
files hgext/convert/bzr.py hgext/highlight/highlight.py
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/bzr.py	Wed Oct 26 18:46:56 2022 +0200
+++ b/hgext/convert/bzr.py	Wed Nov 02 14:23:09 2022 -0400
@@ -23,9 +23,9 @@
 # these do not work with demandimport, blacklist
 demandimport.IGNORES.update(
     [
-        b'breezy.transactions',
-        b'breezy.urlutils',
-        b'ElementPath',
+        'breezy.transactions',
+        'breezy.urlutils',
+        'ElementPath',
     ]
 )
 
--- a/hgext/highlight/highlight.py	Wed Oct 26 18:46:56 2022 +0200
+++ b/hgext/highlight/highlight.py	Wed Nov 02 14:23:09 2022 -0400
@@ -11,7 +11,7 @@
 
 from mercurial import demandimport
 
-demandimport.IGNORES.update([b'pkgutil', b'pkg_resources', b'__main__'])
+demandimport.IGNORES.update(['pkgutil', 'pkg_resources', '__main__'])
 
 from mercurial import (
     encoding,