From 0ffdae97fd2db9309f73ccdaf653680a5172b0cc Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 27 Jul 2019 18:37:34 +0300 Subject: [PATCH 01/12] Add some debug info to MPL import --- gui/graphFrame.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/graphFrame.py b/gui/graphFrame.py index ee4107968..e0afd6151 100644 --- a/gui/graphFrame.py +++ b/gui/graphFrame.py @@ -36,6 +36,7 @@ from service.fit import Fit pyfalog = Logger(__name__) try: + pyfalog.warning('before mpl import') import matplotlib as mpl mpl_version = int(mpl.__version__[0]) or -1 @@ -44,10 +45,14 @@ try: mplImported = True else: mplImported = False + pyfalog.warning('before patch import') from matplotlib.patches import Patch + pyfalog.warning('before canvas import') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas + pyfalog.warning('before figure import') from matplotlib.figure import Figure + pyfalog.warning('done') graphFrame_enabled = True mplImported = True From 6d2746ad75ca72f68f670b954caccef1606e759b Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 27 Jul 2019 19:02:10 +0300 Subject: [PATCH 02/12] Reraise exception on import --- gui/graphFrame.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/graphFrame.py b/gui/graphFrame.py index e0afd6151..b0de2d293 100644 --- a/gui/graphFrame.py +++ b/gui/graphFrame.py @@ -62,6 +62,7 @@ except ImportError as e: Patch = mpl = Canvas = Figure = None graphFrame_enabled = False mplImported = False + raise except Exception: # We can get exceptions deep within matplotlib. Catch those. See GH #1046 tb = traceback.format_exc() From 077db2ecd617e1f3c39b2cde11a6b882297aa044 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 27 Jul 2019 19:14:31 +0300 Subject: [PATCH 03/12] Add extra dependency to spec files --- dist_assets/mac/pyfa.spec | 1 + dist_assets/win/pyfa.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/dist_assets/mac/pyfa.spec b/dist_assets/mac/pyfa.spec index f7749eec7..7736dad23 100644 --- a/dist_assets/mac/pyfa.spec +++ b/dist_assets/mac/pyfa.spec @@ -30,6 +30,7 @@ added_files = [ import_these = [ 'numpy.core._dtype_ctypes', # https://github.com/pyinstaller/pyinstaller/issues/3982 + 'numpy.random.common', # https://github.com/pyfa-org/Pyfa/issues/1998 'sqlalchemy.ext.baked' # windows build doesn't launch without if when using sqlalchemy 1.3.x ] diff --git a/dist_assets/win/pyfa.spec b/dist_assets/win/pyfa.spec index 0de2c2ebb..11d64e02a 100644 --- a/dist_assets/win/pyfa.spec +++ b/dist_assets/win/pyfa.spec @@ -30,6 +30,7 @@ added_files = [ import_these = [ 'numpy.core._dtype_ctypes', # https://github.com/pyinstaller/pyinstaller/issues/3982 + 'numpy.random.common', # https://github.com/pyfa-org/Pyfa/issues/1998 'sqlalchemy.ext.baked' # windows build doesn't launch without if when using sqlalchemy 1.3.x ] From 81e3edc0414aa507761c79d16d40200946128962 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 27 Jul 2019 19:58:20 +0300 Subject: [PATCH 04/12] Update some components in requirements file --- pyfa.spec | 1 + requirements.txt | 4 ++-- tox.ini | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyfa.spec b/pyfa.spec index 927383eec..38b20ed0c 100644 --- a/pyfa.spec +++ b/pyfa.spec @@ -52,6 +52,7 @@ if os_name == 'Darwin': import_these = [ 'numpy.core._dtype_ctypes', # https://github.com/pyinstaller/pyinstaller/issues/3982 + 'numpy.random.common', # https://github.com/pyfa-org/Pyfa/issues/1998 'sqlalchemy.ext.baked' # windows build doesn't launch without if when using sqlalchemy 1.3.x ] diff --git a/requirements.txt b/requirements.txt index f6676421c..8fcdcf82a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -wxPython == 4.0.4 +wxPython == 4.0.6 logbook >= 1.0.0 -matplotlib >= 2.0.0 +matplotlib >= 3.0.0 python-dateutil requests >= 2.0.0 sqlalchemy >= 1.3.0 diff --git a/tox.ini b/tox.ini index c7490de61..ec41b28b2 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ passenv = CI TRAVIS TRAVIS_* deps = -rrequirements.txt -rrequirements_test.txt -basepython = python3.6 +basepython = python3.7 commands = py.test -vv --cov Pyfa tests2/ [testenv:pep8] From 4f3228388c80f8cbdfe6a987b5b4dd25356e697a Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 27 Jul 2019 20:10:12 +0300 Subject: [PATCH 05/12] Try forcing module which is causing issues --- dist_assets/mac/pyfa.spec | 2 +- dist_assets/win/pyfa.spec | 2 +- pyfa.spec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist_assets/mac/pyfa.spec b/dist_assets/mac/pyfa.spec index 7736dad23..cad2d8bad 100644 --- a/dist_assets/mac/pyfa.spec +++ b/dist_assets/mac/pyfa.spec @@ -30,7 +30,7 @@ added_files = [ import_these = [ 'numpy.core._dtype_ctypes', # https://github.com/pyinstaller/pyinstaller/issues/3982 - 'numpy.random.common', # https://github.com/pyfa-org/Pyfa/issues/1998 + 'numpy.random.mtrand', # https://github.com/pyfa-org/Pyfa/issues/1998 'sqlalchemy.ext.baked' # windows build doesn't launch without if when using sqlalchemy 1.3.x ] diff --git a/dist_assets/win/pyfa.spec b/dist_assets/win/pyfa.spec index 11d64e02a..89d82c306 100644 --- a/dist_assets/win/pyfa.spec +++ b/dist_assets/win/pyfa.spec @@ -30,7 +30,7 @@ added_files = [ import_these = [ 'numpy.core._dtype_ctypes', # https://github.com/pyinstaller/pyinstaller/issues/3982 - 'numpy.random.common', # https://github.com/pyfa-org/Pyfa/issues/1998 + 'numpy.random.mtrand', # https://github.com/pyfa-org/Pyfa/issues/1998 'sqlalchemy.ext.baked' # windows build doesn't launch without if when using sqlalchemy 1.3.x ] diff --git a/pyfa.spec b/pyfa.spec index 38b20ed0c..56f4f4f14 100644 --- a/pyfa.spec +++ b/pyfa.spec @@ -52,7 +52,7 @@ if os_name == 'Darwin': import_these = [ 'numpy.core._dtype_ctypes', # https://github.com/pyinstaller/pyinstaller/issues/3982 - 'numpy.random.common', # https://github.com/pyfa-org/Pyfa/issues/1998 + 'numpy.random.mtrand', # https://github.com/pyfa-org/Pyfa/issues/1998 'sqlalchemy.ext.baked' # windows build doesn't launch without if when using sqlalchemy 1.3.x ] From a1d807bd4501dca1e7a85533ae3efc5be9de611a Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 27 Jul 2019 22:12:01 +0300 Subject: [PATCH 06/12] Remove debugging stuff and try to downgrade matplotlib --- gui/graphFrame.py | 6 ------ requirements.txt | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/gui/graphFrame.py b/gui/graphFrame.py index b0de2d293..ee4107968 100644 --- a/gui/graphFrame.py +++ b/gui/graphFrame.py @@ -36,7 +36,6 @@ from service.fit import Fit pyfalog = Logger(__name__) try: - pyfalog.warning('before mpl import') import matplotlib as mpl mpl_version = int(mpl.__version__[0]) or -1 @@ -45,14 +44,10 @@ try: mplImported = True else: mplImported = False - pyfalog.warning('before patch import') from matplotlib.patches import Patch - pyfalog.warning('before canvas import') from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas - pyfalog.warning('before figure import') from matplotlib.figure import Figure - pyfalog.warning('done') graphFrame_enabled = True mplImported = True @@ -62,7 +57,6 @@ except ImportError as e: Patch = mpl = Canvas = Figure = None graphFrame_enabled = False mplImported = False - raise except Exception: # We can get exceptions deep within matplotlib. Catch those. See GH #1046 tb = traceback.format_exc() diff --git a/requirements.txt b/requirements.txt index 8fcdcf82a..82083ff69 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ wxPython == 4.0.6 logbook >= 1.0.0 -matplotlib >= 3.0.0 +matplotlib == 3.0.3 python-dateutil requests >= 2.0.0 sqlalchemy >= 1.3.0 From e1078ef6dafbd0e51a39eae1699507cd35730e2a Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 27 Jul 2019 22:20:58 +0300 Subject: [PATCH 07/12] Try older MPL version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 82083ff69..c23bcbb61 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ wxPython == 4.0.6 logbook >= 1.0.0 -matplotlib == 3.0.3 +matplotlib == 2.2.4 python-dateutil requests >= 2.0.0 sqlalchemy >= 1.3.0 From d8deb98d7bb2541ac26b200cc632bd09f12dce7e Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Sat, 27 Jul 2019 23:05:14 +0300 Subject: [PATCH 08/12] Remove import of lib which is supposedly not used by older versions of MPL --- dist_assets/mac/pyfa.spec | 1 - dist_assets/win/pyfa.spec | 1 - pyfa.spec | 1 - 3 files changed, 3 deletions(-) diff --git a/dist_assets/mac/pyfa.spec b/dist_assets/mac/pyfa.spec index cad2d8bad..f7749eec7 100644 --- a/dist_assets/mac/pyfa.spec +++ b/dist_assets/mac/pyfa.spec @@ -30,7 +30,6 @@ added_files = [ import_these = [ 'numpy.core._dtype_ctypes', # https://github.com/pyinstaller/pyinstaller/issues/3982 - 'numpy.random.mtrand', # https://github.com/pyfa-org/Pyfa/issues/1998 'sqlalchemy.ext.baked' # windows build doesn't launch without if when using sqlalchemy 1.3.x ] diff --git a/dist_assets/win/pyfa.spec b/dist_assets/win/pyfa.spec index 89d82c306..0de2c2ebb 100644 --- a/dist_assets/win/pyfa.spec +++ b/dist_assets/win/pyfa.spec @@ -30,7 +30,6 @@ added_files = [ import_these = [ 'numpy.core._dtype_ctypes', # https://github.com/pyinstaller/pyinstaller/issues/3982 - 'numpy.random.mtrand', # https://github.com/pyfa-org/Pyfa/issues/1998 'sqlalchemy.ext.baked' # windows build doesn't launch without if when using sqlalchemy 1.3.x ] diff --git a/pyfa.spec b/pyfa.spec index 56f4f4f14..927383eec 100644 --- a/pyfa.spec +++ b/pyfa.spec @@ -52,7 +52,6 @@ if os_name == 'Darwin': import_these = [ 'numpy.core._dtype_ctypes', # https://github.com/pyinstaller/pyinstaller/issues/3982 - 'numpy.random.mtrand', # https://github.com/pyfa-org/Pyfa/issues/1998 'sqlalchemy.ext.baked' # windows build doesn't launch without if when using sqlalchemy 1.3.x ] From 1bb30499c2cfa12642372c8e476049394ade20c4 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 30 Jul 2019 07:59:19 +0300 Subject: [PATCH 09/12] Force MPL version to last known working --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c23bcbb61..82083ff69 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ wxPython == 4.0.6 logbook >= 1.0.0 -matplotlib == 2.2.4 +matplotlib == 3.0.3 python-dateutil requests >= 2.0.0 sqlalchemy >= 1.3.0 From d71cf645649b1614ca9489e1ed9bb591bfb043a0 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 30 Jul 2019 08:11:16 +0300 Subject: [PATCH 10/12] Add last known working numpy version --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 82083ff69..d7031e411 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ wxPython == 4.0.6 logbook >= 1.0.0 matplotlib == 3.0.3 +numpy==1.16.4 python-dateutil requests >= 2.0.0 sqlalchemy >= 1.3.0 From 4d2bb5ba873125f24df7ea89bc16bb0546947e7d Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 30 Jul 2019 08:22:54 +0300 Subject: [PATCH 11/12] Bump version --- version.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.yml b/version.yml index 49b8e2b2b..e04cfaf60 100644 --- a/version.yml +++ b/version.yml @@ -1 +1 @@ -version: v2.9.4 +version: v2.9.6 From fcc8f3c5a78c79819bd1483f0ea166e8f78772e0 Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 30 Jul 2019 08:45:56 +0300 Subject: [PATCH 12/12] Revert python version change used for tox --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index ec41b28b2..c7490de61 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,7 @@ passenv = CI TRAVIS TRAVIS_* deps = -rrequirements.txt -rrequirements_test.txt -basepython = python3.7 +basepython = python3.6 commands = py.test -vv --cov Pyfa tests2/ [testenv:pep8]