summaryrefslogtreecommitdiffhomepage
path: root/src/python (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-12-29Libunit: processing single port message.Max Romanov1-13/+28
This partially reverts the optimisation introduced in 1d84b9e4b459 to avoid an unpredictable block in nxt_unit_process_port_msg(). Under high load, this function may never return control to its caller, and the external event loop (in Node.js and Python asyncio) won't be able to process other scheduled events. To reproduce the issue, two request processing types are needed: 'fast' and 'furious'. The 'fast' one simply returns a small response, while the 'furious' schedules asynchronous calls to external resources. Thus, if Unit is subjected to a large amount of 'fast' requests, the 'furious' request processing freezes until the high load ends. The issue was found by Wu Jian Ping (@wujjpp) during Node.js stream implementation discussion and relates to PR #502 on GitHub.
2020-12-22Python: multiple values in the "path" option.Valentin Bartenev1-27/+76
2020-12-14Python: WSGI environment copying moved out of request processing.Valentin Bartenev1-12/+53
The WSGI environment dictionary contains a number of static items, that are pre-initialized on application start. Then it's copied for each request to be filled with request-related data. Now this dictionary copy operation will be done between processing of requests, which should save some CPU cycles during request processing and thus reduce response latency for non-peak load periods.
2020-11-18Python: improving ASGI http send message processing.Max Romanov1-12/+13
2020-11-18Libunit: closing active requests on quit.Max Romanov3-2/+66
2020-11-10Python: supporting ASGI legacy protocol.Max Romanov4-27/+151
Introducing manual protocol selection for 'universal' apps and frameworks.
2020-11-05Python: fixing some arguments reference counting.Max Romanov1-33/+130
2020-11-05Python: request processing in multiple threads.Max Romanov10-497/+920
This closes #459 issue on GitHub.
2020-11-05Python: introducting macro to simplify minor version check.Max Romanov1-1/+3
2020-10-13Fixed building with Python 3.9.Valentin Bartenev2-2/+3
PyUnicode_GET_SIZE() in deprecated since 3.3 and will be removed in 3.12. In version 3.9 it was explicitly marked by deprecation warning causing compilation error with Unit. PyUnicode_GET_LENGTH() must be used instead.
2020-10-01Python: ASGI server introduced.Max Romanov10-29/+3723
This closes #461 issue on GitHub.
2020-09-18Python: app module callable name configuration.Max Romanov1-5/+8
Now it is possible to specify the name of the application callable using optional parameter 'callable'. Default value is 'application'. This closes #290 issue on GitHub.
2020-09-15Python: changed request headers format in router protocol.Max Romanov1-10/+106
The coming ASGI support requires raw HTTP headers format. Headers grouping and upcase code were moved to WSGI module.
2020-09-14Python: split module initialization from WSGI implementation.Max Romanov3-285/+387
This is required for futher ASGI implementation.
2020-09-14Python: source file moved to 'python' sub-directory.Max Romanov1-0/+1446
No functional changes. Get ready for an increase in file number.