Bug 1743898 - python-cartopy fails to build with Python 3.8
Summary: python-cartopy fails to build with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cartopy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Elliott Sales de Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F32FTBFS F32FailsToInstall PYTHON38 1773373 1773377 PYTHON39
TreeView+ depends on / blocked
 
Reported: 2019-08-20 23:17 UTC by Miro Hrončok
Modified: 2020-02-11 01:18 UTC (History)
5 users (show)

Fixed In Version: python-cartopy-0.18.0~b1-1.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-11 01:18:53 UTC
Type: Bug


Attachments (Terms of Use)

Description Miro Hrončok 2019-08-20 23:17:58 UTC
python-cartopy-0.17.0-7.fc32 failed to rebuild with Python 3.8.

See https://koji.fedoraproject.org/koji/buildinfo?buildID=1359116

The error is:

=================================== FAILURES ===================================
_______________________________ test_global_map ________________________________
args = (), kwargs = {}, show = <function show at 0x7fe15be8dca0>
    def new_fn(*args, **kwargs):
        try:
            show = plt.show
            plt.show = lambda *args, **kwargs: None
>           r = fn(*args, **kwargs)
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/test_examples.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/__init__.py:235: in wrapped
    self.run_figure_comparisons(figures, test_name=mod_name)
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/__init__.py:163: in run_figure_comparisons
    self.do_compare(result_path, expected_path, self.tolerance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <cartopy.tests.mpl.test_examples.ExampleImageTesting object at 0x7fe15a6179a0>
result_fname = '/builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_examples/result-global_map.png'
expected_fname = '/builddir/build/BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/baseline_images/mpl/test_examples/global_map.png'
tol = 0
    def do_compare(self, result_fname, expected_fname, tol):
        """
        Runs the comparison of the result file with the expected file.
    
        If an RMS difference greater than ``tol`` is found an assertion
        error is raised with an appropriate message with the paths to
        the files concerned.
    
        """
        if not os.path.exists(expected_fname):
            warnings.warn('Created image in %s' % expected_fname)
            shutil.copy2(result_fname, expected_fname)
    
        err = mcompare.compare_images(expected_fname, result_fname,
                                      tol=tol, in_decorator=True)
    
        if err:
            msg = ('Images were different (RMS: %s).\n%s %s %s\nConsider '
                   'running idiff to inspect these differences.'
                   '' % (err['rms'], err['actual'],
                         err['expected'], err['diff']))
>           assert False, msg
E           AssertionError: Images were different (RMS: 0.18725917868).
E           /builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_examples/result-global_map.png /builddir/build/BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/baseline_images/mpl/test_examples/global_map.png /builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_examples/result-global_map-failed-diff.png
E           Consider running idiff to inspect these differences.
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/__init__.py:197: AssertionError
------------------------------ Captured log call -------------------------------
WARNING  matplotlib.testing:__init__.py:39 Could not set locale to English/United States. Some date-related tests may fail.
____________________________ test_imshow_projected _____________________________
args = (), kwargs = {}, orig_backend = 'agg'
style_context = <function context at 0x7fe160193940>, r = None
fig_managers = [], figures = [<Figure size 640x480 with 1 Axes>]
figure = <Figure size 640x480 with 1 Axes>
    def wrapped(*args, **kwargs):
        orig_backend = plt.get_backend()
        plt.switch_backend('agg')
        mpl_setup()
    
        if pyplot_helpers.Gcf.figs:
            warnings.warn('Figures existed before running the %s %s test.'
                          ' All figures should be closed after they run. '
                          'They will be closed automatically now.' %
                          (mod_name, test_name))
            pyplot_helpers.Gcf.destroy_all()
    
        if MPL_VERSION >= '2':
            style_context = mpl.style.context
        else:
            @contextlib.contextmanager
            def style_context(style, after_reset=False):
                yield
    
        with style_context(self.style):
            r = test_func(*args, **kwargs)
    
            fig_managers = pyplot_helpers.Gcf._activeQue
            figures = [manager.canvas.figure for manager in fig_managers]
    
            try:
>               self.run_figure_comparisons(figures, test_name=mod_name)
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/__init__.py:235: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/__init__.py:163: in run_figure_comparisons
    self.do_compare(result_path, expected_path, self.tolerance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <cartopy.tests.mpl.ImageTesting object at 0x7fe15a63eb80>
result_fname = '/builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_images/result-imshow_regional_projected.png'
expected_fname = '/builddir/build/BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/baseline_images/mpl/test_images/imshow_regional_projected.png'
tol = 0
    def do_compare(self, result_fname, expected_fname, tol):
        """
        Runs the comparison of the result file with the expected file.
    
        If an RMS difference greater than ``tol`` is found an assertion
        error is raised with an appropriate message with the paths to
        the files concerned.
    
        """
        if not os.path.exists(expected_fname):
            warnings.warn('Created image in %s' % expected_fname)
            shutil.copy2(result_fname, expected_fname)
    
        err = mcompare.compare_images(expected_fname, result_fname,
                                      tol=tol, in_decorator=True)
    
        if err:
            msg = ('Images were different (RMS: %s).\n%s %s %s\nConsider '
                   'running idiff to inspect these differences.'
                   '' % (err['rms'], err['actual'],
                         err['expected'], err['diff']))
>           assert False, msg
E           AssertionError: Images were different (RMS: 0.789555518419).
E           /builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_images/result-imshow_regional_projected.png /builddir/build/BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/baseline_images/mpl/test_images/imshow_regional_projected.png /builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_images/result-imshow_regional_projected-failed-diff.png
E           Consider running idiff to inspect these differences.
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/__init__.py:197: AssertionError
------------------------------ Captured log call -------------------------------
WARNING  matplotlib.testing:__init__.py:39 Could not set locale to English/United States. Some date-related tests may fail.
_____________________________ test_background_img ______________________________
args = (), kwargs = {}, orig_backend = 'agg'
style_context = <function context at 0x7fe160193940>, r = None
fig_managers = [], figures = [<Figure size 640x480 with 1 Axes>]
figure = <Figure size 640x480 with 1 Axes>
    def wrapped(*args, **kwargs):
        orig_backend = plt.get_backend()
        plt.switch_backend('agg')
        mpl_setup()
    
        if pyplot_helpers.Gcf.figs:
            warnings.warn('Figures existed before running the %s %s test.'
                          ' All figures should be closed after they run. '
                          'They will be closed automatically now.' %
                          (mod_name, test_name))
            pyplot_helpers.Gcf.destroy_all()
    
        if MPL_VERSION >= '2':
            style_context = mpl.style.context
        else:
            @contextlib.contextmanager
            def style_context(style, after_reset=False):
                yield
    
        with style_context(self.style):
            r = test_func(*args, **kwargs)
    
            fig_managers = pyplot_helpers.Gcf._activeQue
            figures = [manager.canvas.figure for manager in fig_managers]
    
            try:
>               self.run_figure_comparisons(figures, test_name=mod_name)
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/__init__.py:235: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/__init__.py:163: in run_figure_comparisons
    self.do_compare(result_path, expected_path, self.tolerance)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <cartopy.tests.mpl.ImageTesting object at 0x7fe15a63e5e0>
result_fname = '/builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_images/result-imshow_natural_earth_ortho.png'
expected_fname = '/builddir/build/BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/baseline_images/mpl/test_images/imshow_natural_earth_ortho.png'
tol = 0
    def do_compare(self, result_fname, expected_fname, tol):
        """
        Runs the comparison of the result file with the expected file.
    
        If an RMS difference greater than ``tol`` is found an assertion
        error is raised with an appropriate message with the paths to
        the files concerned.
    
        """
        if not os.path.exists(expected_fname):
            warnings.warn('Created image in %s' % expected_fname)
            shutil.copy2(result_fname, expected_fname)
    
        err = mcompare.compare_images(expected_fname, result_fname,
                                      tol=tol, in_decorator=True)
    
        if err:
            msg = ('Images were different (RMS: %s).\n%s %s %s\nConsider '
                   'running idiff to inspect these differences.'
                   '' % (err['rms'], err['actual'],
                         err['expected'], err['diff']))
>           assert False, msg
E           AssertionError: Images were different (RMS: 0.319754680272).
E           /builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_images/result-imshow_natural_earth_ortho.png /builddir/build/BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/baseline_images/mpl/test_images/imshow_natural_earth_ortho.png /builddir/build/BUILD/Cartopy-0.17.0/cartopy_test_output/test_images/result-imshow_natural_earth_ortho-failed-diff.png
E           Consider running idiff to inspect these differences.
../../BUILDROOT/python-cartopy-0.17.0-7.fc32.x86_64/usr/lib64/python3.8/site-packages/cartopy/tests/mpl/__init__.py:197: AssertionError
------------------------------ Captured log call -------------------------------
WARNING  matplotlib.testing:__init__.py:39 Could not set locale to English/United States. Some date-related tests may fail.


This issue is blocking the Python 3.8 rebuilds. If this package won't build with 3.8, it won't be installable, along with all its dependent packages, after the side tag is merged.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well. 


The coordinated rebuild of Python 3.8 has started in the `f32-python` side tag.

If you figure out how to rebuild this package, please don't rebuild it in regular rawhide, but use the side tag instead:

    on branch master:
    $ fedpkg build --target=f32-python

To wait for a build to show up in the side tag, do:

    $ koji wait-repo f32-python --build=<nvr>

Where <nvr> is name-version-release of the source package, e.g. python-foo-1.1-2.fc32.

An updated mock config is posted at: http://copr.fedorainfracloud.org/coprs/g/python/python3.8/

Thanks. Let us know if you need up to date info, or if you have any questions.

Comment 1 Miro Hrončok 2019-08-21 16:35:41 UTC
The f32-python side tag has been merged. In order to rebuild the package, do it in regular rawhide, but please wait until python3-3.8 is tagged:

  $ koji wait-repo f32-build --build python3-3.8.0~b3-3.fc32


If your built already started in f32-python, after it is finished, please tag it to rawhide with:

  $ koji tag-build f32-pending <nvr>

For example:

  $ koji tag-build f32-pending libreoffice-6.3.0.4-3.fc32

Thanks!

(This comment is mass posted to all bugzillas blocking the PYTHON38 tracking bug.)

Comment 2 Miro Hrončok 2019-08-21 17:29:38 UTC
(Python 3.8 has landed in the rawhide buildroot.)

Comment 3 Miro Hrončok 2019-09-16 08:54:28 UTC
This issue is blocking the Python 3.8 rebuilds. If this package won't build with 3.8, it won't be installable, along with all its dependent packages, in Fedora 32.
Furthermore, as it fails to install, its dependent packages will fail to install and/or build as well.

Could you please look into this?

Comment 4 Elliott Sales de Andrade 2019-09-26 05:11:46 UTC
I'll need to work on this upstream. It will take some time since it's Matplotlib 3.1, Python 3.8, and Proj 6 (since that went through without any consultation.)

Comment 5 Petr Viktorin 2019-11-25 15:07:06 UTC
How is it going? Do you need any help?
Did you get a chance to start discussion upstream?

Comment 6 Elliott Sales de Andrade 2019-11-29 00:17:20 UTC
I'm working on it, but there's lots of broken CI to fix first. The plan it to make a release before the end of the year (before dropping upstream support for Python 2).


Note You need to log in before you can comment on or make changes to this bug.