From c37e330efd35af20cdba267ff4a82d3df4d19efb Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Fri, 27 Jan 2023 10:02:59 -0500 Subject: [PATCH 1/6] Add charset_normalizer.md__mypyc to hidden imports Fixes: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/3966 Overrides: https://github.com/tahoe-lafs/tahoe-lafs/pull/1248 Ref.: https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/534 --- pyinstaller.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/pyinstaller.spec b/pyinstaller.spec index eece50757..01b1ac4ac 100644 --- a/pyinstaller.spec +++ b/pyinstaller.spec @@ -36,6 +36,7 @@ hidden_imports = [ 'allmydata.stats', 'base64', 'cffi', + 'charset_normalizer.md__mypyc', 'collections', 'commands', 'Crypto', From 87dad9bd2bf96eedfd671e17fe003932358d7157 Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Fri, 27 Jan 2023 10:07:50 -0500 Subject: [PATCH 2/6] Remove "charset_normalizer < 3" constraint --- setup.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/setup.py b/setup.py index f867e901d..1974145cb 100644 --- a/setup.py +++ b/setup.py @@ -147,13 +147,6 @@ install_requires = [ # for pid-file support "psutil", "filelock", - - # treq needs requests, requests needs charset_normalizer, - # charset_normalizer breaks PyInstaller - # (https://github.com/Ousret/charset_normalizer/issues/253). So work around - # this by using a lower version number. Once upstream issue is fixed, or - # requests drops charset_normalizer, this can go away. - "charset_normalizer < 3", ] setup_requires = [ From a292f52de1aa44e34e9b72ab57d4ac608b6b5da3 Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Fri, 27 Jan 2023 11:47:50 -0500 Subject: [PATCH 3/6] Try debugging CI/ubuntu-20.04 integration tests.. Does restoring the "charset_normalizer < 3" pin make the tests pass? --- setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.py b/setup.py index 1974145cb..f867e901d 100644 --- a/setup.py +++ b/setup.py @@ -147,6 +147,13 @@ install_requires = [ # for pid-file support "psutil", "filelock", + + # treq needs requests, requests needs charset_normalizer, + # charset_normalizer breaks PyInstaller + # (https://github.com/Ousret/charset_normalizer/issues/253). So work around + # this by using a lower version number. Once upstream issue is fixed, or + # requests drops charset_normalizer, this can go away. + "charset_normalizer < 3", ] setup_requires = [ From e046627d3178846bdc581ce5f38de07f52f0cdca Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Fri, 27 Jan 2023 11:59:24 -0500 Subject: [PATCH 4/6] Try debugging CI/ubuntu-20.04 integration tests... Does removing the `charset_normalizer.md__mypyc` hidden import make the tests pass? --- pyinstaller.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/pyinstaller.spec b/pyinstaller.spec index 01b1ac4ac..eece50757 100644 --- a/pyinstaller.spec +++ b/pyinstaller.spec @@ -36,7 +36,6 @@ hidden_imports = [ 'allmydata.stats', 'base64', 'cffi', - 'charset_normalizer.md__mypyc', 'collections', 'commands', 'Crypto', From 15c7916e0812e6baa2a931cd54b18f3382a8456e Mon Sep 17 00:00:00 2001 From: Chris Wood Date: Fri, 27 Jan 2023 12:46:30 -0500 Subject: [PATCH 5/6] Revert previous two commits (e046627, a292f52) --- pyinstaller.spec | 1 + setup.py | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/pyinstaller.spec b/pyinstaller.spec index eece50757..01b1ac4ac 100644 --- a/pyinstaller.spec +++ b/pyinstaller.spec @@ -36,6 +36,7 @@ hidden_imports = [ 'allmydata.stats', 'base64', 'cffi', + 'charset_normalizer.md__mypyc', 'collections', 'commands', 'Crypto', diff --git a/setup.py b/setup.py index f867e901d..1974145cb 100644 --- a/setup.py +++ b/setup.py @@ -147,13 +147,6 @@ install_requires = [ # for pid-file support "psutil", "filelock", - - # treq needs requests, requests needs charset_normalizer, - # charset_normalizer breaks PyInstaller - # (https://github.com/Ousret/charset_normalizer/issues/253). So work around - # this by using a lower version number. Once upstream issue is fixed, or - # requests drops charset_normalizer, this can go away. - "charset_normalizer < 3", ] setup_requires = [ From cad81c9bdda0ad5d1bfe066d0ae8fccdcb851615 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Sat, 28 Jan 2023 16:21:45 -0500 Subject: [PATCH 6/6] Twiddle the news fragment to pass codechecks --- newsfragments/3966.bugfix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newsfragments/3966.bugfix b/newsfragments/3966.bugfix index ead94c47c..384dcf797 100644 --- a/newsfragments/3966.bugfix +++ b/newsfragments/3966.bugfix @@ -1 +1 @@ -Fix incompatibility with newer versions of the transitive charset_normalizer dependency when using PyInstaller. \ No newline at end of file +Fix incompatibility with transitive dependency charset_normalizer >= 3 when using PyInstaller.