** Description changed:

- The jc package for Noble currently fails to build from source or fails
- its internal test suite during package verification because of a
- behavior change backported into Python 3.12's standard library
- (ipaddress module), specifically test_ip_address_ipv6_6to4.
+ [ Impact ]
  
- [Steps to Reproduce]
+ The jc package for Noble currently fails to build from source or fails its
+ internal test suite because of a behavior change backported into Python 3.12's
+ standard library (ipaddress module) for 6to4 addresses [0].
+ 
+ The fix backports two upstream commits [1][2] to evaluate the test output
+ flexibly against both old-style and new-style variants. This SRU is needed to
+ fix unit tests for the original bug (LP: #2153146).
+ 
+ [ Test Plan ]
+ 
  1. On an Ubuntu Noble system, fetch the source code and run the test suite:
     $ pull-lp-source jc noble
     $ cd jc-1.25.1/
     $ pytest3
  
  2. Observe the failure trace:
  AssertionError: {'ver[768 chars]te': True, 'is_global': False, 
'is_link_local'[1797 chars]10'}} != {'ver[768 chars]te': False, 'is_global': 
True, 'is_link_local'[1797 chars]10'}}
  tests/test_ip_address.py:102: AssertionError
  
- [Proposed Fix]
- Backport the upstream fix implemented in newer versions of jc. The fix 
modifies 'tests/test_ip_address.py' to evaluate the output against both 
"old-style" and "new-style" 6to4 address outputs using a try/except block. As 
long as the system's underlying Python interpreter returns one of the valid 
formats, the test will pass cleanly. The upstream fix consists of two commits 
[1] [2] that need to be backported.
+ [ Where Problems Could Occur ]
  
- This issue will be fixed concurrently alongside LP: #2153146 in a single
- consolidated SRU upload.
+ The fix modifies the test suite framework logic via a try/except handler to
+ dynamically pass whether the system's underlying Python interpreter presents
+ the legacy or modernized IPv6 structural schema block. If the new test logic 
is
+ flawed, it might fail to catch a real IPv6 regression during future package
+ updates or builds.
  
+ [ Other Info ]
+ 
+ The fix for this bug will be bundled with the fix for LP: #2153146 into a
+ single package upload. The debdiff will be uploaded and attached to the main
+ bug report.
+ 
+ Since the change was introduced in Python 3.13 and backported to 3.12, Jammy 
is
+ not affected by this bug as it ships with Python 3.10.
+ 
+ Packages in Questing and later releases already have the fix.
+ 
+ [0] - 
https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Address.is_private
  [1] - 
https://github.com/kellyjonbrazil/jc/commit/9eb4df34b190c57d020b70153ef3faa8984c02ca
  [2] - 
https://github.com/kellyjonbrazil/jc/commit/5c855e40c6cb9432b630cdf22f20ccf3285b24d7

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2153428

Title:
  test_ip_address_ipv6_6to4 fails due to Python 3.12 ipaddress module
  behavior change

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/jc/+bug/2153428/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to