Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1706085 - python-behave FTBFS with Python 3.8
Summary: python-behave FTBFS with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-behave
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Petr Schindler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F32FTBFS F32FailsToInstall PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-05-03 14:02 UTC by Miro Hrončok
Modified: 2019-09-20 08:53 UTC (History)
3 users (show)

Fixed In Version: python-behave-1.2.6-5.fc32
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-20 08:53:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full log from Copr (239.77 KB, text/plain)
2019-05-03 14:02 UTC, Miro Hrončok
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github behave behave issues 755 0 None None None 2019-06-07 12:52:34 UTC

Description Miro Hrončok 2019-05-03 14:02:10 UTC
Created attachment 1562466 [details]
Full log from Copr

python-behave 1.2.6-3.fc31 fails to build with Python 3.8:

==================================== ERRORS ====================================
_ ERROR at setup of TestCaptureController.test_capturing__retrieve_captured_several_times _

    @pytest.fixture
    def capture_controller():
        """Provides a capture_controller that is already setup and automatically
        performs a teardown afterwards.
        """
        capture_controller = create_capture_controller()
>       setup_capture_controller(capture_controller)

tests/unit/test_capture.py:42: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/unit/test_capture.py:30: in setup_capture_controller
    capture_controller.setup_capture(context)
behave/capture.py:147: in setup_capture
    self.log_capture = LoggingCapture(self.config)
behave/log_capture.py:74: in __init__
    formatter = logging.Formatter(log_format, datefmt)
/usr/lib64/python3.8/logging/__init__.py:589: in __init__
    self._style.validate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <logging.PercentStyle object at 0x7f4183bed4f0>

    def validate(self):
        """Validate the input format, ensure it matches the correct style"""
>       if not self.validation_pattern.search(self._fmt):
E       TypeError: expected string or bytes-like object

/usr/lib64/python3.8/logging/__init__.py:441: TypeError
_ ERROR at setup of TestCaptureController.test_capturing__with_several_start_stop_cycles _

    @pytest.fixture
    def capture_controller():
        """Provides a capture_controller that is already setup and automatically
        performs a teardown afterwards.
        """
        capture_controller = create_capture_controller()
>       setup_capture_controller(capture_controller)

tests/unit/test_capture.py:42: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/unit/test_capture.py:30: in setup_capture_controller
    capture_controller.setup_capture(context)
behave/capture.py:147: in setup_capture
    self.log_capture = LoggingCapture(self.config)
behave/log_capture.py:74: in __init__
    formatter = logging.Formatter(log_format, datefmt)
/usr/lib64/python3.8/logging/__init__.py:589: in __init__
    self._style.validate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <logging.PercentStyle object at 0x7f4183bee460>

    def validate(self):
        """Validate the input format, ensure it matches the correct style"""
>       if not self.validation_pattern.search(self._fmt):
E       TypeError: expected string or bytes-like object

/usr/lib64/python3.8/logging/__init__.py:441: TypeError
_______ ERROR at setup of TestCaptureController.test_make_capture_report _______

    @pytest.fixture
    def capture_controller():
        """Provides a capture_controller that is already setup and automatically
        performs a teardown afterwards.
        """
        capture_controller = create_capture_controller()
>       setup_capture_controller(capture_controller)

tests/unit/test_capture.py:42: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/unit/test_capture.py:30: in setup_capture_controller
    capture_controller.setup_capture(context)
behave/capture.py:147: in setup_capture
    self.log_capture = LoggingCapture(self.config)
behave/log_capture.py:74: in __init__
    formatter = logging.Formatter(log_format, datefmt)
/usr/lib64/python3.8/logging/__init__.py:589: in __init__
    self._style.validate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <logging.PercentStyle object at 0x7f4183e67790>

    def validate(self):
        """Validate the input format, ensure it matches the correct style"""
>       if not self.validation_pattern.search(self._fmt):
E       TypeError: expected string or bytes-like object

/usr/lib64/python3.8/logging/__init__.py:441: TypeError
=================================== FAILURES ===================================
____________ TestRunWithPaths.test_loads_hooks_and_step_definitions ____________

self = <test.test_runner.TestRunWithPaths testMethod=test_loads_hooks_and_step_definitions>

    def test_loads_hooks_and_step_definitions(self):
        self.feature_locations.return_value = []
>       self.runner.run_with_paths()

test/test_runner.py:678: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
behave/runner.py:824: in run_with_paths
    return self.run_model()
behave/runner.py:613: in run_model
    self.setup_capture()
behave/runner.py:590: in setup_capture
    self.capture_controller.setup_capture(self.context)
behave/capture.py:147: in setup_capture
    self.log_capture = LoggingCapture(self.config)
behave/log_capture.py:74: in __init__
    formatter = logging.Formatter(log_format, datefmt)
/usr/lib64/python3.8/logging/__init__.py:589: in __init__
    self._style.validate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <logging.PercentStyle object at 0x7f41845426d0>

    def validate(self):
        """Validate the input format, ensure it matches the correct style"""
>       if not self.validation_pattern.search(self._fmt):
E       TypeError: expected string or bytes-like object

/usr/lib64/python3.8/logging/__init__.py:441: TypeError
____ TestRunWithPaths.test_parses_feature_files_and_appends_to_feature_list ____

self = <test.test_runner.TestRunWithPaths testMethod=test_parses_feature_files_and_appends_to_feature_list>
abspath = <MagicMock name='abspath' id='139919363202400'>
parse_file = <MagicMock name='parse_file' id='139919363602656'>

    @patch("behave.parser.parse_file")
    @patch("os.path.abspath")
    def test_parses_feature_files_and_appends_to_feature_list(self, abspath,
                                                              parse_file):
        feature_locations = ["one", "two", "three"]
        feature = Mock()
        feature.tags = []
        feature.__iter__ = Mock(return_value=iter([]))
        feature.run.return_value = False
        self.runner.feature_locations.return_value = feature_locations
        abspath.side_effect = lambda x: x.upper()
        self.config.lang = "fritz"
        self.config.format = ["plain"]
        self.config.outputs = [StreamOpener(stream=sys.stdout)]
        self.config.output.encoding = None
        self.config.exclude = lambda s: False
        self.config.junit = False
        self.config.summary = False
        parse_file.return_value = feature
    
>       self.runner.run_with_paths()

test/test_runner.py:717: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
behave/runner.py:824: in run_with_paths
    return self.run_model()
behave/runner.py:613: in run_model
    self.setup_capture()
behave/runner.py:590: in setup_capture
    self.capture_controller.setup_capture(self.context)
behave/capture.py:147: in setup_capture
    self.log_capture = LoggingCapture(self.config)
behave/log_capture.py:74: in __init__
    formatter = logging.Formatter(log_format, datefmt)
/usr/lib64/python3.8/logging/__init__.py:589: in __init__
    self._style.validate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <logging.PercentStyle object at 0x7f41846057f0>

    def validate(self):
        """Validate the input format, ensure it matches the correct style"""
>       if not self.validation_pattern.search(self._fmt):
E       TypeError: expected string or bytes-like object

/usr/lib64/python3.8/logging/__init__.py:441: TypeError
__________ TestRunWithPaths.test_runs_before_all_and_after_all_hooks ___________

self = <test.test_runner.TestRunWithPaths testMethod=test_runs_before_all_and_after_all_hooks>

    def test_runs_before_all_and_after_all_hooks(self):
        # Make runner.feature_locations() and runner.run_hook() the same mock so
        # we can make sure things happen in the right order.
        self.runner.feature_locations = self.run_hook
        self.runner.feature_locations.return_value = []
        self.runner.context = Mock()
>       self.runner.run_with_paths()

test/test_runner.py:689: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
behave/runner.py:824: in run_with_paths
    return self.run_model()
behave/runner.py:613: in run_model
    self.setup_capture()
behave/runner.py:590: in setup_capture
    self.capture_controller.setup_capture(self.context)
behave/capture.py:147: in setup_capture
    self.log_capture = LoggingCapture(self.config)
behave/log_capture.py:74: in __init__
    formatter = logging.Formatter(log_format, datefmt)
/usr/lib64/python3.8/logging/__init__.py:589: in __init__
    self._style.validate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <logging.PercentStyle object at 0x7f4183bea9d0>

    def validate(self):
        """Validate the input format, ensure it matches the correct style"""
>       if not self.validation_pattern.search(self._fmt):
E       TypeError: expected string or bytes-like object

/usr/lib64/python3.8/logging/__init__.py:441: TypeError
______________________ TestCaptureController.test_basics _______________________

self = <tests.unit.test_capture.TestCaptureController object at 0x7f418424b940>

    def test_basics(self):
        capture_controller = create_capture_controller()
        context = Mock()
        context.aborted = False
        context.config = capture_controller.config
    
>       capture_controller.setup_capture(context)

tests/unit/test_capture.py:226: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
behave/capture.py:147: in setup_capture
    self.log_capture = LoggingCapture(self.config)
behave/log_capture.py:74: in __init__
    formatter = logging.Formatter(log_format, datefmt)
/usr/lib64/python3.8/logging/__init__.py:589: in __init__
    self._style.validate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <logging.PercentStyle object at 0x7f418424b160>

    def validate(self):
        """Validate the input format, ensure it matches the correct style"""
>       if not self.validation_pattern.search(self._fmt):
E       TypeError: expected string or bytes-like object

/usr/lib64/python3.8/logging/__init__.py:441: TypeError

Comment 1 Miro Hrončok 2019-06-07 12:52:34 UTC
Upstream report: https://github.com/behave/behave/issues/755

Comment 2 Miro Hrončok 2019-07-10 10:41:32 UTC
Fix merged upstream. Will backport soon.

Comment 3 Miro Hrončok 2019-08-07 10:55:28 UTC
Actually, I don't have time to maintain this. Orphaned the package.

Comment 4 Ben Cotton 2019-08-13 16:49:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 5 Miro Hrončok 2019-08-14 22:24:29 UTC
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/

Note that it will take a while before the essential packages are rebuilt, so don't expect all your dependencies to be available right away.

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



PS this message is mass posted to all the bugs that block the PYTHON38 bug. If this is also a Fedora 31 FTBFS bug and you manage to fix it, you can do a f31 build as usual:

    on branch f31:
    $ fedpkg build

Comment 6 Miro Hrončok 2019-08-21 16:35:14 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 7 Miro Hrončok 2019-08-21 17:29:18 UTC
(Python 3.8 has landed in the rawhide buildroot.)

Comment 8 Miro Hrončok 2019-09-20 08:53:53 UTC
Thanks, Petr!


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