Bug 2175194 - python-uri-templates fails to build with Python 3.12: AttributeError: 'VariablesTests' object has no attribute 'assertEquals'
Summary: python-uri-templates fails to build with Python 3.12: AttributeError: 'Variab...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: python-uri-templates
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.12 2220547
TreeView+ depends on / blocked
 
Reported: 2023-03-03 14:09 UTC by Tomáš Hrnčiar
Modified: 2023-09-26 10:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-26 10:00:54 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2023-03-03 14:09:03 UTC
python-uri-templates fails to build with Python 3.12.0a5.

=================================== FAILURES ===================================
_____________________ VariablesTests.test_explode_modifier _____________________

self = <variables_test.VariablesTests testMethod=test_explode_modifier>

    def test_explode_modifier(self):
        template = 'http://example.com{/x*,y*}/page{/z*}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:63: AttributeError
_________________________ VariablesTests.test_fragment _________________________

self = <variables_test.VariablesTests testMethod=test_fragment>

    def test_fragment(self):
        template = 'http://example.com/{#x,y},{#z}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:28: AttributeError
__________________________ VariablesTests.test_label ___________________________

self = <variables_test.VariablesTests testMethod=test_label>

    def test_label(self):
        template = 'http://{.x,y,z}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:33: AttributeError
__________________ VariablesTests.test_mixed_expansion_types ___________________

self = <variables_test.VariablesTests testMethod=test_mixed_expansion_types>

    def test_mixed_expansion_types(self):
        template = 'http://{a,b}.com{;c,d}{/e,f}/page{?g,h}{&i,j}{#k,l}'
        vars = uritemplate.variables(template)
        expected_vars = set('abcdefghijkl')
>       self.assertEquals(vars, expected_vars)
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:69: AttributeError
__________________ VariablesTests.test_overlapping_expansion ___________________

self = <variables_test.VariablesTests testMethod=test_overlapping_expansion>

    def test_overlapping_expansion(self):
        template = 'http://{a,b}.com{;a,b}{/a,b}/page{?a,b}{&a,b}{#a,b}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['a', 'b']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:74: AttributeError
________________________ VariablesTests.test_parameter _________________________

self = <variables_test.VariablesTests testMethod=test_parameter>

    def test_parameter(self):
        template = 'http://example.com{;x,y}{;z}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:43: AttributeError
__________________ VariablesTests.test_partially_overlapping ___________________

self = <variables_test.VariablesTests testMethod=test_partially_overlapping>

    def test_partially_overlapping(self):
        template = 'http://{.a,b}{/b,c}/{c,d}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['a', 'b', 'c', 'd']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:79: AttributeError
_______________________ VariablesTests.test_path_segment _______________________

self = <variables_test.VariablesTests testMethod=test_path_segment>

    def test_path_segment(self):
        template = 'http://example.com{/x,y}/w{/z}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:38: AttributeError
_____________________ VariablesTests.test_prefix_modifier ______________________

self = <variables_test.VariablesTests testMethod=test_prefix_modifier>

    def test_prefix_modifier(self):
        template = 'http://example.com{/x:5,y:7}{/z:2}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:58: AttributeError
__________________________ VariablesTests.test_query ___________________________

self = <variables_test.VariablesTests testMethod=test_query>

    def test_query(self):
        template = 'http://example.com{?x,y,z}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:48: AttributeError
____________________ VariablesTests.test_query_continuation ____________________

self = <variables_test.VariablesTests testMethod=test_query_continuation>

    def test_query_continuation(self):
        template = 'http://example.com?a=1&b=2{&x,y}&r=13{&z}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:53: AttributeError
_________________________ VariablesTests.test_reserved _________________________

self = <variables_test.VariablesTests testMethod=test_reserved>

    def test_reserved(self):
        template = 'http://example.com/{+x,y}/{+z}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:23: AttributeError
__________________________ VariablesTests.test_simple __________________________

self = <variables_test.VariablesTests testMethod=test_simple>

    def test_simple(self):
        template = 'http://example.com/{x,y}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:13: AttributeError
_________________________ VariablesTests.test_simple2 __________________________

self = <variables_test.VariablesTests testMethod=test_simple2>

    def test_simple2(self):
        template = 'http://example.com/{x,y}/{z}'
        vars = uritemplate.variables(template)
>       self.assertEquals(vars, set(['x', 'y', 'z']))
E       AttributeError: 'VariablesTests' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?

test/variables_test.py:18: AttributeError
=========================== short test summary info ============================
FAILED test/variables_test.py::VariablesTests::test_explode_modifier - Attrib...
FAILED test/variables_test.py::VariablesTests::test_fragment - AttributeError...
FAILED test/variables_test.py::VariablesTests::test_label - AttributeError: '...
FAILED test/variables_test.py::VariablesTests::test_mixed_expansion_types - A...
FAILED test/variables_test.py::VariablesTests::test_overlapping_expansion - A...
FAILED test/variables_test.py::VariablesTests::test_parameter - AttributeErro...
FAILED test/variables_test.py::VariablesTests::test_partially_overlapping - A...
FAILED test/variables_test.py::VariablesTests::test_path_segment - AttributeE...
FAILED test/variables_test.py::VariablesTests::test_prefix_modifier - Attribu...
FAILED test/variables_test.py::VariablesTests::test_query - AttributeError: '...
FAILED test/variables_test.py::VariablesTests::test_query_continuation - Attr...
FAILED test/variables_test.py::VariablesTests::test_reserved - AttributeError...
FAILED test/variables_test.py::VariablesTests::test_simple - AttributeError: ...
FAILED test/variables_test.py::VariablesTests::test_simple2 - AttributeError:...
============================== 14 failed in 0.09s ==============================

Removed many old deprecated unittest features:

    - A number of TestCase method aliases:

    | Deprecated alias      |  Method Name           | Deprecated in |
    +-----------------------|------------------------|---------------+
    | failUnless            | assertTrue()           |      3.1      |
    | failIf                | assertFalse()          |      3.1      |
    | failUnlessEqual       | assertEqual()          |      3.1      |
    | failIfEqual           | assertNotEqual()       |      3.1      |
    | failUnlessAlmostEqual | assertAlmostEqual()    |      3.1      |
    | failIfAlmostEqual     | assertNotAlmostEqual() |      3.1      |
    | failUnlessRaises      | assertRaises()         |      3.1      |
    | assert_               | assertTrue()           |      3.2      |
    | assertEquals          | assertEqual()          |      3.2      |
    | assertNotEquals       | assertNotEqual()       |      3.2      |
    | assertAlmostEquals    | assertAlmostEqual()    |      3.2      |
    | assertNotAlmostEquals | assertNotAlmostEqual() |      3.2      |
    | assertRegexpMatches   | assertRegex()          |      3.2      |
    | assertRaisesRegexp    | assertRaisesRegex()    |      3.2      |
    | assertNotRegexpMatches| assertNotRegex()       |      3.5      |
    +-----------------------|------------------------|---------------+

    You can use https://github.com/isidentical/teyit to automatically modernise your unit tests.

    - Undocumented and broken TestCase method assertDictContainsSubset (deprecated in Python 3.2).

    - Undocumented TestLoader.loadTestsFromModule parameter use_load_tests (deprecated and ignored since Python 3.2).

    - An alias of the TextTestResult class: _TextTestResult (deprecated in Python
3.2).

(Contributed by Serhiy Storchaka in bpo-45162.)
https://bugs.python.org/issue?@action=redirect&bpo=45162



https://docs.python.org/3.12/whatsnew/3.12.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.12/fedora-rawhide-x86_64/05577353-python-uri-templates/

For all our attempts to build python-uri-templates with Python 3.12, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/package/python-uri-templates/

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.12:
https://copr.fedorainfracloud.org/coprs/g/python/python3.12/

Let us know here if you have any questions.

Python 3.12 is planned to be included in Fedora 39. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.12.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Fedora Release Engineering 2023-08-16 07:10:47 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 2 Fedora Admin user for bugzilla script actions 2023-09-05 00:52:54 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 3 Miro Hrončok 2023-09-26 10:00:54 UTC
Automation has figured out the package is retired in Fedora 39.

If you like it to be unretired, please open a ticket at https://pagure.io/releng/new_issue?template=package_unretirement


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