Bug 1712531 - ansible fails to build with Python 3.8
Summary: ansible fails to build with Python 3.8
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
 
Reported: 2019-05-21 17:32 UTC by Miro Hrončok
Modified: 2019-06-10 06:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-10 06:37:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Full log from Copr (625.50 KB, text/plain)
2019-05-21 17:32 UTC, Miro Hrončok
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github ansible ansible pull 56806 0 None None None 2019-05-22 19:35:28 UTC

Description Miro Hrončok 2019-05-21 17:32:11 UTC
Created attachment 1571713 [details]
Full log from Copr

ansible 2.8.0-3.fc31 fails to build with Python 3.8.0a4:

+ make PYTHON=/usr/bin/python3 SPHINXBUILD=sphinx-build-3 webdocs
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
(cd docs/docsite/; CPUS=2 make docs)
make[1]: Entering directory '/builddir/build/BUILD/python3-ansible-2.8.0-3.fc31/docs/docsite'
PYTHONPATH=../../lib ../bin/dump_config.py --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ -d ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../bin/generate_man.py --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
/usr/lib/python3.8/site-packages/pyasn1/type/constraint.py:100: SyntaxWarning: invalid escape sequence \*
  """Create a SingleValueConstraint object.
/usr/lib/python3.8/site-packages/pyasn1/type/constraint.py:141: SyntaxWarning: invalid escape sequence \*
  """Create a ContainedSubtypeConstraint object.
/usr/lib/python3.8/site-packages/pyasn1/type/constraint.py:301: SyntaxWarning: invalid escape sequence \*
  """Create a PermittedAlphabetConstraint object.
/usr/lib/python3.8/site-packages/pyasn1/type/constraint.py:457: SyntaxWarning: invalid escape sequence \*
  """Create a ConstraintsIntersection logic operator object.
/usr/lib/python3.8/site-packages/pyasn1/type/constraint.py:501: SyntaxWarning: invalid escape sequence \*
  """Create a ConstraintsUnion logic operator object.
/usr/lib/python3.8/site-packages/pyasn1/type/namedval.py:15: SyntaxWarning: invalid escape sequence \*
  """Create named values object.
PYTHONPATH=../../lib ../bin/dump_keywords.py --template-dir=../templates --output-dir=rst/reference_appendices/ -d ./keyword_desc.yml
Traceback (most recent call last):
  File "../bin/dump_keywords.py", line 49, in <module>
    for a in oblist[name]:
RuntimeError: dictionary keys changed during iteration
make[1]: Leaving directory '/builddir/build/BUILD/python3-ansible-2.8.0-3.fc31/docs/docsite'
make[1]: *** [Makefile:87: keywords] Error 1
make: *** [Makefile:398: webdocs] Error 2

Full log attached.

https://copr.fedorainfracloud.org/coprs/g/python/python3.8/build/912649/

Comment 1 Miro Hrončok 2019-05-22 19:24:03 UTC
See https://github.com/python/cpython/pull/12596

Comment 2 Miro Hrončok 2019-05-22 19:35:29 UTC
Upstream PR (testing it right now): https://github.com/ansible/ansible/pull/56806

Comment 3 Miro Hrončok 2019-05-22 19:40:52 UTC
Downstream PR (testing it as well, got past the previous error): https://src.fedoraproject.org/rpms/ansible/pull-request/11

Comment 4 Miro Hrončok 2019-05-22 19:47:36 UTC
not enough:

=================================== FAILURES ===================================
__________ TestDellos9Facts.test_dellos9_facts_gather_subset_default ___________
[gw7] linux -- Python 3.8.0 /usr/bin/python3
self = <units.modules.network.dellos9.test_dellos9_facts.TestDellos9Facts testMethod=test_dellos9_facts_gather_subset_default>

    def test_dellos9_facts_gather_subset_default(self):
        set_module_args(dict())
>       result = self.execute_module()

test/units/modules/network/dellos9/test_dellos9_facts.py:69: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/units/modules/network/dellos9/dellos9_module.py:62: in execute_module
    result = self.changed(changed)
test/units/modules/network/dellos9/dellos9_module.py:83: in changed
    self.module.main()
lib/ansible/modules/network/dellos9/dellos9_facts.py:559: in main
    inst.populate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def populate(self):
        super(Interfaces, self).populate()
        self.facts['all_ipv4_addresses'] = list()
        self.facts['all_ipv6_addresses'] = list()
    
        data = self.responses[0]
        interfaces = self.parse_interfaces(data)
    
>       for key in interfaces.keys():
E       RuntimeError: dictionary keys changed during iteration

lib/ansible/modules/network/dellos9/dellos9_facts.py:255: RuntimeError
_________ TestDellos9Facts.test_dellos9_facts_gather_subset_interfaces _________
[gw7] linux -- Python 3.8.0 /usr/bin/python3
self = <units.modules.network.dellos9.test_dellos9_facts.TestDellos9Facts testMethod=test_dellos9_facts_gather_subset_interfaces>

    def test_dellos9_facts_gather_subset_interfaces(self):
        set_module_args({'gather_subset': 'interfaces'})
>       result = self.execute_module()

test/units/modules/network/dellos9/test_dellos9_facts.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/units/modules/network/dellos9/dellos9_module.py:62: in execute_module
    result = self.changed(changed)
test/units/modules/network/dellos9/dellos9_module.py:83: in changed
    self.module.main()
lib/ansible/modules/network/dellos9/dellos9_facts.py:559: in main
    inst.populate()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def populate(self):
        super(Interfaces, self).populate()
        self.facts['all_ipv4_addresses'] = list()
        self.facts['all_ipv6_addresses'] = list()
    
        data = self.responses[0]
        interfaces = self.parse_interfaces(data)
    
>       for key in interfaces.keys():
E       RuntimeError: dictionary keys changed during iteration

lib/ansible/modules/network/dellos9/dellos9_facts.py:255: RuntimeError
=============================== warnings summary ===============================

Comment 5 Miro Hrončok 2019-05-22 20:14:29 UTC
I got it working, amended both PRs.

Comment 6 Miro Hrončok 2019-06-07 18:46:57 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, 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 fix should be pushed on the master branch and no release bump is required.

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.8: https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

This issue needs to be resolved by next week, if other rebuilds of Python 3.8 beta 1 go well. If this is unrealistic for you, let us know how much time you need.

Let us know if we can push a fix.

Comment 7 Kevin Fenzi 2019-06-09 06:13:54 UTC
I am pushing a 2.8.1 update this week/soon... will add this patch to that.

Comment 8 Kevin Fenzi 2019-06-09 13:58:55 UTC
This is pushed to rawhide. Feel free to close it and/or verify it...

Comment 9 Miro Hrončok 2019-06-10 06:37:54 UTC
Thanks.


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