<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/test/unit/applications/lang/python.py, branch 1.31.1-1</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>Tests: get rid of classes in test files.</title>
<updated>2023-06-14T17:20:09+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2023-06-14T17:20:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=c183bd8749a19477390f8cb77efe5f6d223f0905'/>
<id>c183bd8749a19477390f8cb77efe5f6d223f0905</id>
<content type='text'>
Class usage came from the unittest framework and it was always redundant
after migration to the pytest.  This commit removes classes from files
containing tests to make them more readable and understandable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Class usage came from the unittest framework and it was always redundant
after migration to the pytest.  This commit removes classes from files
containing tests to make them more readable and understandable.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: switched to using f-strings.</title>
<updated>2023-02-21T17:21:29+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2023-02-21T17:21:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=7934dcabbc3c2b585e8d3f8fcee7020ba26f1687'/>
<id>7934dcabbc3c2b585e8d3f8fcee7020ba26f1687</id>
<content type='text'>
Previously, it was necessary to support older versions of Python for
compatibility.  F-strings were released in Python 3.6.  Python 3.5 was
marked as unsupported by the end of 2020, so now it's possible to start
using f-strings safely for better readability and performance.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, it was necessary to support older versions of Python for
compatibility.  F-strings were released in Python 3.6.  Python 3.5 was
marked as unsupported by the end of 2020, so now it's possible to start
using f-strings safely for better readability and performance.
</pre>
</div>
</content>
</entry>
<entry>
<title>Python: Added "prefix" to configuration.</title>
<updated>2022-12-14T10:30:30+00:00</updated>
<author>
<name>OutOfFocus4</name>
<email>jeff.iadarola@gmail.com</email>
</author>
<published>2021-11-14T15:47:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=6dae517ebd20baa2066541e703d6aa594326dd69'/>
<id>6dae517ebd20baa2066541e703d6aa594326dd69</id>
<content type='text'>
This patch gives users the option to set a `"prefix"` attribute
for Python applications, either at the top level or for specific
`"target"`s. If the attribute is present, the value of `"prefix"`
must be a string beginning with `"/"`. If the value of the `"prefix"`
attribute is longer than 1 character and ends in `"/"`, the
trailing `"/"` is stripped.

The purpose of the `"prefix"` attribute is to set the `SCRIPT_NAME`
context value for WSGI applications and the `root_path` context
value for ASGI applications, allowing applications to properly route
requests regardless of the path that the server uses to expose the
application.

The context value is only set if the request's URL path begins with
the value of the `"prefix"` attribute. In all other cases, the
`SCRIPT_NAME` or `root_path` values are not set. In addition, for
WSGI applications, the value of `"prefix"` will be stripped from
the beginning of the request's URL path before it is sent to the
application.

Reviewed-by: Andrei Zeliankou &lt;zelenkov@nginx.com&gt;
Reviewed-by: Artem Konev &lt;artem.konev@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch gives users the option to set a `"prefix"` attribute
for Python applications, either at the top level or for specific
`"target"`s. If the attribute is present, the value of `"prefix"`
must be a string beginning with `"/"`. If the value of the `"prefix"`
attribute is longer than 1 character and ends in `"/"`, the
trailing `"/"` is stripped.

The purpose of the `"prefix"` attribute is to set the `SCRIPT_NAME`
context value for WSGI applications and the `root_path` context
value for ASGI applications, allowing applications to properly route
requests regardless of the path that the server uses to expose the
application.

The context value is only set if the request's URL path begins with
the value of the `"prefix"` attribute. In all other cases, the
`SCRIPT_NAME` or `root_path` values are not set. In addition, for
WSGI applications, the value of `"prefix"` will be stripped from
the beginning of the request's URL path before it is sent to the
application.

Reviewed-by: Andrei Zeliankou &lt;zelenkov@nginx.com&gt;
Reviewed-by: Artem Konev &lt;artem.konev@nginx.com&gt;
Signed-off-by: Alejandro Colomar &lt;alx@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: removed unused imports.</title>
<updated>2021-11-02T17:53:28+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2021-11-02T17:53:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=c27d0fe7bd9b56ee20f01124d72800ded7ccca9c'/>
<id>c27d0fe7bd9b56ee20f01124d72800ded7ccca9c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Application restart introduced.</title>
<updated>2021-07-29T16:50:39+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2021-07-29T16:50:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=fa9fb29be221e0393562831a9e3bcba416652f60'/>
<id>fa9fb29be221e0393562831a9e3bcba416652f60</id>
<content type='text'>
When processing a restart request, the router sends a QUIT message to all
existing processes of the application.  Then, a new shared application port is
created to ensure that new requests won't be handled by the old processes of
the application.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When processing a restart request, the router sends a QUIT message to all
existing processes of the application.  Then, a new shared application port is
created to ensure that new requests won't be handled by the old processes of
the application.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: Python targets.</title>
<updated>2021-05-20T13:03:12+00:00</updated>
<author>
<name>Oisin Canty</name>
<email>o.canty@f5.com</email>
</author>
<published>2021-05-20T13:03:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=e50bb120e2a2dfad55d28724133656264ef13dc8'/>
<id>e50bb120e2a2dfad55d28724133656264ef13dc8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: options moved to the separate class.</title>
<updated>2020-12-06T16:01:59+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2020-12-06T16:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=07789a23e9c513dba87b020fae2989a57955e8a6'/>
<id>07789a23e9c513dba87b020fae2989a57955e8a6</id>
<content type='text'>
This change is necessary to separate the logic
and prevent possible circular dependency.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change is necessary to separate the logic
and prevent possible circular dependency.
</pre>
</div>
</content>
</entry>
<entry>
<title>Python: supporting ASGI legacy protocol.</title>
<updated>2020-11-10T19:27:08+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2020-11-10T19:27:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=5fd2933d2e54a7b5781698a670abf89b1031db44'/>
<id>5fd2933d2e54a7b5781698a670abf89b1031db44</id>
<content type='text'>
Introducing manual protocol selection for 'universal' apps and frameworks.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introducing manual protocol selection for 'universal' apps and frameworks.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: supporting instant app parameters in load().</title>
<updated>2020-11-10T19:27:08+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2020-11-10T19:27:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=a8a9d80f8dcff98a99c74a923a2a37b9e3e177eb'/>
<id>a8a9d80f8dcff98a99c74a923a2a37b9e3e177eb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: improving get_application_type() and fixing its name.</title>
<updated>2020-10-27T21:01:46+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2020-10-27T21:01:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=6a00bab41e2ebffe5f61f6fb9641162624db41d1'/>
<id>6a00bab41e2ebffe5f61f6fb9641162624db41d1</id>
<content type='text'>
This patch also enables multiversion tests running for Java.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch also enables multiversion tests running for Java.
</pre>
</div>
</content>
</entry>
</feed>
