Adds stubs for uWSGI (#10432)

This adds stubs for the uWSGI Python API.

Similarly to GDB the Python API is only accessible within a uWSGI process, some parts of the API also only exist if certain configuration options are enabled. This makes running stubtest a bit of pain.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This commit is contained in:
David Salvisberg
2023-07-24 13:32:52 +02:00
committed by GitHub
parent 7d33060e6a
commit 21cb2cb546
7 changed files with 550 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# Error: is not present in stub
# =============================
# Erlang support is currently broken, so it's better to pretend
# that this decorator doesn't exist
uwsgidecorators.erlang
# This should really only be internal API, so we don't export it
uwsgidecorators.harakiri.real_call
# Error: is inconsistent
# ======================
# This is a limitation of ParamSpec, we can't specify that the
# the ParamSpec does have no keyword arguments, but we need the
# ParamSpec to properly annotate this decorator
uwsgidecorators.thread.__call__

View File

@@ -0,0 +1,12 @@
# Error: is not present at runtime
# =============================
# These functions depend on modules which are not built into
# the MacOS wheel by default, so we just ignore them for now
# we don't want to pretend they don't exist, because people
# could still configure a build with the required modules
# manually, we don't do that for typeshed, since it would
# add a lot of additional complexity to stubtest_third_party
uwsgi.SymbolsImporter
uwsgi.SymbolsZipImporter
uwsgi.ZipImporter
uwsgi.route

View File

@@ -0,0 +1,7 @@
[uwsgi]
master = true
cache2 = name=mycache,items=2
queue = 100
sharedarea = 2
route-run = log:foo
snmp = true