<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/test/python, branch 1.34.2-1</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>tests: Add tests for python application factories</title>
<updated>2024-07-02T18:13:14+00:00</updated>
<author>
<name>Gourav</name>
<email>gouravkandoria1500@gmail.com</email>
</author>
<published>2024-06-26T06:37:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d67d350142d4ef9a9cdbfc2bb4a6b2d8f261deb1'/>
<id>d67d350142d4ef9a9cdbfc2bb4a6b2d8f261deb1</id>
<content type='text'>
Add the following tests cases:

1. When "factory" key is used inside the "targets" option.
2. When "factory" key is used at the root level of python application
   config.
3. When factory returns invalid callable or When factory is invalid
   callable

Link: &lt;https://github.com/nginx/unit/pull/1336&gt;
[ Commit subject &amp; message formatting tweaks - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the following tests cases:

1. When "factory" key is used inside the "targets" option.
2. When "factory" key is used at the root level of python application
   config.
3. When factory returns invalid callable or When factory is invalid
   callable

Link: &lt;https://github.com/nginx/unit/pull/1336&gt;
[ Commit subject &amp; message formatting tweaks - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Python: bytearray body support for ASGI module.</title>
<updated>2024-02-21T14:06:43+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2024-01-26T14:58:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=697a58506235e89af1c8cc3cafc92b3d85a3467d'/>
<id>697a58506235e89af1c8cc3cafc92b3d85a3467d</id>
<content type='text'>
@filiphanes requested support for bytearray
and memoryview in the request body here:
&lt;https://github.com/nginx/unit/issues/648&gt;

This patch implements bytearray body support only.
Memoryview body still need to be implemented.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
@filiphanes requested support for bytearray
and memoryview in the request body here:
&lt;https://github.com/nginx/unit/issues/648&gt;

This patch implements bytearray body support only.
Memoryview body still need to be implemented.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: pathlib used where appropriate</title>
<updated>2024-01-15T15:48:58+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2024-01-15T15:48:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=5a8337933df1cf3aba967d86549e236dd9173386'/>
<id>5a8337933df1cf3aba967d86549e236dd9173386</id>
<content type='text'>
Also fixed various pylint errors and style issues.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also fixed various pylint errors and style issues.
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: added tests for response header variables.</title>
<updated>2023-07-11T14:51:53+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2023-07-11T14:51:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=2ad03caf327ce1e88b4d45112cf75480bb12a436'/>
<id>2ad03caf327ce1e88b4d45112cf75480bb12a436</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>Tests: added Python tests with encoding.</title>
<updated>2023-02-21T15:35:38+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2023-02-21T15:35:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=fcabbf09d85397e244f6486d6eca25e2366b61cd'/>
<id>fcabbf09d85397e244f6486d6eca25e2366b61cd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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: minor fixes.</title>
<updated>2022-09-07T00:11:04+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-09-07T00:11:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=c65e04682e85cc708b534863ae8f4e069ccccf64'/>
<id>c65e04682e85cc708b534863ae8f4e069ccccf64</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: forwarded header replacement tests.</title>
<updated>2022-06-20T09:19:35+00:00</updated>
<author>
<name>Zhidao HONG</name>
<email>z.hong@f5.com</email>
</author>
<published>2022-06-20T09:19:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=045c05e4686a1fbfec58072df8d564697ebd8300'/>
<id>045c05e4686a1fbfec58072df8d564697ebd8300</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: style.</title>
<updated>2022-04-11T20:05:14+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2022-04-11T20:05:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=0f725346603f4de4473d12da502104b188ac02a4'/>
<id>0f725346603f4de4473d12da502104b188ac02a4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
