Bug 2214430 - Build python-openapi for f37
Summary: Build python-openapi for f37
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-openapi-core
Version: 37
Hardware: noarch
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Ben Beasley
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-13 00:57 UTC by rj.layco
Modified: 2023-07-09 00:38 UTC (History)
2 users (show)

Fixed In Version: python-openapi-core-0.17.1-2.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-09 00:38:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description rj.layco 2023-06-13 00:57:40 UTC
Are you able to created a branch release of python-openapi for f37 please

Reproducible: Always

Comment 1 Mattia Verga 2023-06-17 16:08:07 UTC
Unfortunately, this would require quite a few required packages to be properly patched to have them built in f37.
I currently don't have free time to do that and neither to investigate if it is even possible.

I'll leave this ticket open in case I found the time in future, or if @music wants to try.

Comment 2 Ben Beasley 2023-06-17 17:12:07 UTC
I gave it a quick shot locally:

- Build python-pathable for F37 (no changes from Rawhide)
- Build python-jsonschema-spec for F37 (edit patch that allows requests 2.28.2 to also allow 2.28.1)
- Build python-openapi-spec-validator for F37 (branch from b1280cc, packaging version 0.5.4)

At this point, one test failed for python-openapi-spec-validator:

=================================== FAILURES ===================================
__ TestSpecValidatorIterErrors.test_parameter_custom_format_checker_not_found __

self = <test_exceptions.TestSpecValidatorIterErrors object at 0x7fb154db0ed0>
validator_v30 = <Proxy at 0x7fb155152a80 wrapping <openapi_spec_validator.validation.validators.SpecValidator object at 0x7fb1552aae50...sHandler object at 0x7fb155b7d8d0>, 'file': <jsonschema_spec.handlers.urllib.UrllibHandler object at 0x7fb155b7d150>})>

    def test_parameter_custom_format_checker_not_found(self, validator_v30):
        spec = {
            "openapi": "3.0.0",
            "info": {
                "title": "Test Api",
                "version": "0.0.1",
            },  
            "paths": {
                "/test/": {
                    "get": {
                        "responses": {
                            "default": {
                                "description": "default response",
                            },  
                        },  
                        "parameters": [
                            {
                                "name": "param1",
                                "in": "query",
                                "schema": {
                                    "type": "string",
                                    "format": "custom",
                                    "default": "customvalue",
                                },  
                            },  
                        ],  
                    },  
                },  
            },  
        }   

        errors = validator_v30.iter_errors(spec)

        errors_list = list(errors)
>       assert errors_list == []
E       assert [<OpenAPIVali...t not found">] == []
E         Left contains one more item: <OpenAPIValidationError: "Format checker for 'custom' format not found">
E         Full diff:
E         - []
E         + [<OpenAPIValidationError: "Format checker for 'custom' format not found">]
errors     = <generator object SpecValidator.iter_errors at 0x7fb154e75640>
errors_list = [<OpenAPIValidationError: "Format checker for 'custom' format not found">]
self       = <test_exceptions.TestSpecValidatorIterErrors object at 0x7fb154db0ed0>
spec       = {'info': {'title': 'Test Api', 'version': '0.0.1'}, 'openapi': '3.0.0', 'paths': {'/test/': {'get': {'parameters': [{'in': 'query', 'name': 'param1', 'schema': {...}}], 'responses': {'default': {'description': 'default response'}}}}}}
validator_v30 = <Proxy at 0x7fb155152a80 wrapping <openapi_spec_validator.validation.validators.SpecValidator object at 0x7fb1552aae50...sHandler object at 0x7fb155b7d8d0>, 'file': <jsonschema_spec.handlers.urllib.UrllibHandler object at 0x7fb155b7d150>})>

tests/integration/validation/test_exceptions.py:457: AssertionError
- generated xml file: /builddir/build/BUILD/openapi-spec-validator-0.5.4/reports/junit.xml -
=========================== short test summary info ============================
FAILED tests/integration/validation/test_exceptions.py::TestSpecValidatorIterErrors::test_parameter_custom_format_checker_not_found

Unfortunately, these libraries are somewhat tightly coupled, and the assumptions they make about each other are not reliably reflected in dependency versioning.

I tried again:

- Update python-openapi-schema-validator in F37 from 0.4.1 to 0.4.3, which involves a small backward incompatibility (Missing format checker for format no longer raise FormatError).
- Build python-openapi-spec-validator (this time branching from Rawhide, and patching out the tool.poetry.group.docs.dependencies section from pyproject.toml to work with older poetry-core)
- Build python-openapi-core (also branching from Rawhide, and patching out the tool.poetry.group.docs.dependencies section from pyproject.toml to work with older poetry-core)

This worked.

So there is a pretty straightforward path to supporting F37, as long as we accept updating python-openapi-schema-validator, which is a leaf package in F37. Technically, that should require an updates policy exception approved by FESCo (https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#_exceptions) since there is a small breaking change. There might be an alternative path that involves juggling versions until everything agrees, but I’m not interested in searching for it.

Comment 3 rj.layco 2023-06-20 00:47:27 UTC
I have created a ticket to get an exception https://pagure.io/fesco/issue/3015

Comment 4 Ben Beasley 2023-06-30 02:59:43 UTC
I opened side tag f37-build-side-69468 for this. Here’s the plan and status:

- python-pathable is now already in F37 (thanks, Mattia!)
- python-jsonschema-spec: Mattia, please request an F37 branch and build in the side tag: https://src.fedoraproject.org/rpms/python-jsonschema-spec/pull-request/3
- python-openapi-schema-validator: exception approved by FESCo, built in side tag: https://koji.fedoraproject.org/koji/taskinfo?taskID=102762529
- python-openapi-spec-validator: TODO, I should be able to do this as a co-maintainer once python-jsonschema-spec is in the side tag
- python-openapi-core: TODO, I should be able to do this as a co-maintainer once everything else is in the side tag
- Bodhi update: TODO (me)

Comment 5 Mattia Verga 2023-06-30 15:53:05 UTC
(In reply to Ben Beasley from comment #4)
> I opened side tag f37-build-side-69468 for this. Here’s the plan and status:
> 
> - python-pathable is now already in F37 (thanks, Mattia!)
> - python-jsonschema-spec: Mattia, please request an F37 branch and build in
> the side tag:
> https://src.fedoraproject.org/rpms/python-jsonschema-spec/pull-request/3
Done: https://koji.fedoraproject.org/koji/taskinfo?taskID=102781499

> - python-openapi-schema-validator: exception approved by FESCo, built in
> side tag: https://koji.fedoraproject.org/koji/taskinfo?taskID=102762529
> - python-openapi-spec-validator: TODO, I should be able to do this as a
> co-maintainer once python-jsonschema-spec is in the side tag
Branch f37 requested

> - python-openapi-core: TODO, I should be able to do this as a co-maintainer
> once everything else is in the side tag
Branch f37 requested

> - Bodhi update: TODO (me)

Comment 6 Ben Beasley 2023-06-30 16:47:38 UTC
Thanks:

Building python-openapi-spec-validator in the side tag: https://koji.fedoraproject.org/koji/taskinfo?taskID=102782547

Comment 7 Fedora Update System 2023-06-30 22:13:15 UTC
FEDORA-2023-e80302ad43 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-e80302ad43

Comment 8 Fedora Update System 2023-07-01 01:33:25 UTC
FEDORA-2023-e80302ad43 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-e80302ad43 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-e80302ad43

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2023-07-09 00:38:53 UTC
FEDORA-2023-e80302ad43 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


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