You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When generating a server stub using python-fastapi, the requirements.txt file includes outdated dependencies:
PyYAML==5.4.1
httptools>=0.1.2
Attempting to install these packages with Python 3.12 (or versions below) results in installation errors due to compatibility issues with the specified versions.
Error for PyYaml:
Collecting PyYAML==5.4.1 (from -r requirements.txt (line 26))
Using cached PyYAML-5.4.1.tar.gz (175 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [54 lines of output]
...
AttributeError: cython_sources
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
Error for httptools:
Building wheels for collected packages: httptools
Building wheel for httptools (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for httptools (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
...
httptools/parser/parser.c:212:12: fatal error: 'longintrepr.h' file not found
#include "longintrepr.h"
^~~~~~~~~~~~~~~
1 error generated.
error: command'/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for httptools
Failed to build httptools
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (httptools)
openapi-generator version
Tested with the latest master version of openapi-generator as of 24/09/2024, and the issue still exists.
OpenAPI declaration file content or url
openapi: 3.0.0info:
title: mailversion: 1.0.0description: A sample API to illustrate OpenAPI conceptsservers:
- url: https://localhost:3000/paths:
"/user":
get:
responses:
'200':
description: Successfully returned a usercontent:
application/json:
schema:
type: stringdescription: Returns a user
Bug Report Checklist
Description
When generating a server stub using python-fastapi, the requirements.txt file includes outdated dependencies:
Attempting to install these packages with Python 3.12 (or versions below) results in installation errors due to compatibility issues with the specified versions.
Error for PyYaml:
Error for httptools:
openapi-generator version
Tested with the latest master version of openapi-generator as of 24/09/2024, and the issue still exists.
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
This is where the failure hits, if you update the versions it will pass.
Related issues/PRs
PR created: 19666
Suggest a fix
Update the requirements.mustache template to include the following versions
The text was updated successfully, but these errors were encountered: