Your message dated Sun, 04 May 2025 10:49:48 +0000
with message-id <e1ubwuq-00fj9v...@fasolo.debian.org>
and subject line Bug#1104654: fixed in litestar 2.15.2-2
has caused the Debian Bug report #1104654,
regarding litestar: FTBFS: E DeprecationWarning: Use of deprecated parameter 
'random'.
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
1104654: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1104654
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: src:litestar
Version: 2.15.2-1
Severity: serious
Tags: ftbfs trixie sid

Dear maintainer:

During a rebuild of all packages in unstable, your package failed to build:

--------------------------------------------------------------------------------
[...]
docs/examples/testing/test_get_session_data_async.py .                   [ 99%]
docs/examples/testing/test_health_check_async.py .                       [ 99%]
docs/examples/testing/test_health_check_sync.py .                        [ 99%]
docs/examples/testing/test_set_session_data.py .                         [ 99%]
docs/examples/testing/test_set_session_data_async.py .                   [ 99%]
docs/examples/testing/test_websocket.py .                                [100%]

=================================== FAILURES ===================================
___________________________ test_create_examples[v1] ___________________________

pydantic_version = 'v1'

    def test_create_examples(pydantic_version: PydanticVersion) -> None:
        lib = pydantic_v1 if pydantic_version == "v1" else pydantic_v2
    
        class Model(lib.BaseModel):  # type: ignore[name-defined, misc]
            foo: str = lib.Field(examples=["32"])
            bar: str
    
        @get("/example")
        async def handler() -> Model:
            return Model(foo="1", bar="2")
    
        app = Litestar(
            [handler],
            openapi_config=OpenAPIConfig(
                title="Test",
                version="0",
                create_examples=True,
            ),
        )
>       schema = app.openapi_schema.to_schema()

tests/unit/test_plugins/test_pydantic/test_openapi.py:584: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
litestar/app.py:674: in openapi_schema
    return self.plugins.get(OpenAPIPlugin).provide_openapi()
litestar/_openapi/plugin.py:94: in provide_openapi
    self._openapi = self._build_openapi()
litestar/_openapi/plugin.py:83: in _build_openapi
    path_item = create_path_item_for_route(context, route)
litestar/_openapi/path_item.py:139: in create_path_item_for_route
    return path_item_factory.create_path_item()
litestar/_openapi/path_item.py:44: in create_path_item
    operation = self.create_operation_for_handler_method(route_handler, 
HttpMethod(http_method))
litestar/_openapi/path_item.py:73: in create_operation_for_handler_method
    responses = create_responses_for_handler(
litestar/_openapi/responses.py:340: in create_responses_for_handler
    return ResponseFactory(context, 
route_handler).create_responses(raises_validation_error=raises_validation_error)
litestar/_openapi/responses.py:91: in create_responses
    str(self.route_handler.status_code): self.create_success_response(),
litestar/_openapi/responses.py:150: in create_success_response
    result = self.schema_creator.for_field_definition(field_def)
litestar/_openapi/schema_generation/schema.py:315: in for_field_definition
    result = self.for_plugin(field_definition, plugin_for_annotation)
litestar/_openapi/schema_generation/schema.py:499: in for_plugin
    schema = plugin.to_openapi_schema(field_definition=field_definition, 
schema_creator=self)
litestar/plugins/pydantic/plugins/schema.py:247: in to_openapi_schema
    return self.for_pydantic_model(field_definition=field_definition, 
schema_creator=schema_creator)
litestar/plugins/pydantic/plugins/schema.py:264: in for_pydantic_model
    return schema_creator.create_component_schema(
litestar/_openapi/schema_generation/schema.py:663: in create_component_schema
    schema.properties = {k: self.for_field_definition(v) for k, v in 
property_fields.items()}
litestar/_openapi/schema_generation/schema.py:345: in for_field_definition
    return self.process_schema_result(field_definition, result) if 
isinstance(result, Schema) else result
litestar/_openapi/schema_generation/schema.py:625: in process_schema_result
    schema.examples = 
get_json_schema_formatted_examples(create_examples_for_field(field))
litestar/_openapi/schema_generation/examples.py:80: in create_examples_for_field
    field_meta = _create_field_meta(replace(field, 
annotation=_normalize_example_value(field.annotation)))
litestar/_openapi/schema_generation/examples.py:62: in _create_field_meta
    return FieldMeta.from_type(
/usr/lib/python3/dist-packages/polyfactory/field_meta.py:132: in from_type
    check_for_deprecated_parameters(
/usr/lib/python3/dist-packages/polyfactory/utils/deprecation.py:141: in 
check_for_deprecated_parameters
    warn_deprecation(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

version = '2.11.0', deprecated_name = 'random', kind = 'parameter'

    def warn_deprecation(
        version: str,
        deprecated_name: str,
        kind: DeprecatedKind,
        *,
        removal_in: str | None = None,
        alternative: str | None = None,
        info: str | None = None,
        pending: bool = False,
    ) -> None:
        """Warn about a call to a (soon to be) deprecated function.
    
        Args:
            version: Polyfactory version where the deprecation will occur.
            deprecated_name: Name of the deprecated function.
            removal_in: Polyfactory version where the deprecated function will 
be removed.
            alternative: Name of a function that should be used instead.
            info: Additional information.
            pending: Use ``PendingDeprecationWarning`` instead of 
``DeprecationWarning``.
            kind: Type of the deprecated thing.
        """
        parts = []
    
        if kind == "import":
            access_type = "Import of"
        elif kind in {"function", "method"}:
            access_type = "Call to"
        else:
            access_type = "Use of"
    
        if pending:
            parts.append(f"{access_type} {kind} awaiting deprecation 
{deprecated_name!r}")
        else:
            parts.append(f"{access_type} deprecated {kind} {deprecated_name!r}")
    
        parts.extend(
            (
                f"Deprecated in polyfactory {version}",
                f"This {kind} will be removed in {removal_in or 'the next major 
version'}",
            )
        )
        if alternative:
            parts.append(f"Use {alternative!r} instead")
    
        if info:
            parts.append(info)
    
        text = ". ".join(parts)
        warning_class = PendingDeprecationWarning if pending else 
DeprecationWarning
    
>       warn(text, warning_class, stacklevel=2)
E       DeprecationWarning: Use of deprecated parameter 'random'. Deprecated in 
polyfactory 2.11.0. This parameter will be removed in the next major version

/usr/lib/python3/dist-packages/polyfactory/utils/deprecation.py:68: 
DeprecationWarning
___________________________ test_create_examples[v2] ___________________________

pydantic_version = 'v2'

    def test_create_examples(pydantic_version: PydanticVersion) -> None:
        lib = pydantic_v1 if pydantic_version == "v1" else pydantic_v2
    
        class Model(lib.BaseModel):  # type: ignore[name-defined, misc]
            foo: str = lib.Field(examples=["32"])
            bar: str
    
        @get("/example")
        async def handler() -> Model:
            return Model(foo="1", bar="2")
    
        app = Litestar(
            [handler],
            openapi_config=OpenAPIConfig(
                title="Test",
                version="0",
                create_examples=True,
            ),
        )
>       schema = app.openapi_schema.to_schema()

tests/unit/test_plugins/test_pydantic/test_openapi.py:584: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
litestar/app.py:674: in openapi_schema
    return self.plugins.get(OpenAPIPlugin).provide_openapi()
litestar/_openapi/plugin.py:94: in provide_openapi
    self._openapi = self._build_openapi()
litestar/_openapi/plugin.py:83: in _build_openapi
    path_item = create_path_item_for_route(context, route)
litestar/_openapi/path_item.py:139: in create_path_item_for_route
    return path_item_factory.create_path_item()
litestar/_openapi/path_item.py:44: in create_path_item
    operation = self.create_operation_for_handler_method(route_handler, 
HttpMethod(http_method))
litestar/_openapi/path_item.py:73: in create_operation_for_handler_method
    responses = create_responses_for_handler(
litestar/_openapi/responses.py:340: in create_responses_for_handler
    return ResponseFactory(context, 
route_handler).create_responses(raises_validation_error=raises_validation_error)
litestar/_openapi/responses.py:91: in create_responses
    str(self.route_handler.status_code): self.create_success_response(),
litestar/_openapi/responses.py:150: in create_success_response
    result = self.schema_creator.for_field_definition(field_def)
litestar/_openapi/schema_generation/schema.py:315: in for_field_definition
    result = self.for_plugin(field_definition, plugin_for_annotation)
litestar/_openapi/schema_generation/schema.py:499: in for_plugin
    schema = plugin.to_openapi_schema(field_definition=field_definition, 
schema_creator=self)
litestar/plugins/pydantic/plugins/schema.py:247: in to_openapi_schema
    return self.for_pydantic_model(field_definition=field_definition, 
schema_creator=schema_creator)
litestar/plugins/pydantic/plugins/schema.py:264: in for_pydantic_model
    return schema_creator.create_component_schema(
litestar/_openapi/schema_generation/schema.py:663: in create_component_schema
    schema.properties = {k: self.for_field_definition(v) for k, v in 
property_fields.items()}
litestar/_openapi/schema_generation/schema.py:345: in for_field_definition
    return self.process_schema_result(field_definition, result) if 
isinstance(result, Schema) else result
litestar/_openapi/schema_generation/schema.py:625: in process_schema_result
    schema.examples = 
get_json_schema_formatted_examples(create_examples_for_field(field))
litestar/_openapi/schema_generation/examples.py:80: in create_examples_for_field
    field_meta = _create_field_meta(replace(field, 
annotation=_normalize_example_value(field.annotation)))
litestar/_openapi/schema_generation/examples.py:62: in _create_field_meta
    return FieldMeta.from_type(
/usr/lib/python3/dist-packages/polyfactory/field_meta.py:132: in from_type
    check_for_deprecated_parameters(
/usr/lib/python3/dist-packages/polyfactory/utils/deprecation.py:141: in 
check_for_deprecated_parameters
    warn_deprecation(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

version = '2.11.0', deprecated_name = 'random', kind = 'parameter'

    def warn_deprecation(
        version: str,
        deprecated_name: str,
        kind: DeprecatedKind,
        *,
        removal_in: str | None = None,
        alternative: str | None = None,
        info: str | None = None,
        pending: bool = False,
    ) -> None:
        """Warn about a call to a (soon to be) deprecated function.
    
        Args:
            version: Polyfactory version where the deprecation will occur.
            deprecated_name: Name of the deprecated function.
            removal_in: Polyfactory version where the deprecated function will 
be removed.
            alternative: Name of a function that should be used instead.
            info: Additional information.
            pending: Use ``PendingDeprecationWarning`` instead of 
``DeprecationWarning``.
            kind: Type of the deprecated thing.
        """
        parts = []
    
        if kind == "import":
            access_type = "Import of"
        elif kind in {"function", "method"}:
            access_type = "Call to"
        else:
            access_type = "Use of"
    
        if pending:
            parts.append(f"{access_type} {kind} awaiting deprecation 
{deprecated_name!r}")
        else:
            parts.append(f"{access_type} deprecated {kind} {deprecated_name!r}")
    
        parts.extend(
            (
                f"Deprecated in polyfactory {version}",
                f"This {kind} will be removed in {removal_in or 'the next major 
version'}",
            )
        )
        if alternative:
            parts.append(f"Use {alternative!r} instead")
    
        if info:
            parts.append(info)
    
        text = ". ".join(parts)
        warning_class = PendingDeprecationWarning if pending else 
DeprecationWarning
    
>       warn(text, warning_class, stacklevel=2)
E       DeprecationWarning: Use of deprecated parameter 'random'. Deprecated in 
polyfactory 2.11.0. This parameter will be removed in the next major version

/usr/lib/python3/dist-packages/polyfactory/utils/deprecation.py:68: 
DeprecationWarning
=============================== warnings summary ===============================
tests/unit/test_concurrency.py::test_trio_uses_limiter
  /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: 
PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, 
family=1, type=1, proto=0>
  
  Traceback (most recent call last):
    File "/usr/lib/python3.13/unittest/mock.py", line 459, in __new__
      instance = _safe_super(NonCallableMock, cls).__new__(new)
                 ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  ResourceWarning: unclosed <socket.socket fd=22, family=1, type=1, proto=0>
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/unit/test_connection/test_base.py::test_connection_base_properties
  /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: 
PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, 
family=1, type=1, proto=0>
  
  Traceback (most recent call last):
    File 
"/<<PKGBUILDDIR>>/.pybuild/cpython3_3.13_litestar/build/litestar/handlers/base.py",
 line 319, in resolve_layered_parameters
      parameter_kwargs.update(getattr(layer, "parameters", {}) or {})
                              ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  ResourceWarning: unclosed <socket.socket fd=16, family=1, type=1, proto=0>
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

tests/unit/test_contrib/test_htmx/test_htmx_request.py::test_triggering_event_bad_json
  /usr/lib/python3/dist-packages/_pytest/unraisableexception.py:85: 
PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, 
family=1, type=1, proto=0>
  
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/anyio/_backends/_asyncio.py", line 
715, in __init__
      self._tasks: set[asyncio.Task] = set()
                                       ~~~^^
  ResourceWarning: unclosed <socket.socket fd=13, family=1, type=1, proto=0>
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED 
tests/unit/test_plugins/test_pydantic/test_openapi.py::test_create_examples[v1]
FAILED 
tests/unit/test_plugins/test_pydantic/test_openapi.py::test_create_examples[v2]
= 2 failed, 4641 passed, 3 skipped, 23 deselected, 1 xfailed, 3 warnings in 
64.02s (0:01:04) =
<sys>:0: ResourceWarning: unclosed database in <sqlite3.Connection object at 
0x7fccec7f9e40>
<sys>:0: ResourceWarning: unclosed database in <sqlite3.Connection object at 
0x7fccf0a60c70>
<sys>:0: ResourceWarning: unclosed database in <sqlite3.Connection object at 
0x7fccee9107c0>
<sys>:0: ResourceWarning: unclosed database in <sqlite3.Connection object at 
0x7fccd016c310>
E: pybuild pybuild:389: test: plugin pyproject failed with:  
[too-long-redacted] rtal and not test_with_stores '
dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.13 
returned exit code 13
make: *** [debian/rules:32: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:

https://people.debian.org/~sanvila/build-logs/202505/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:litestar, so that this is still
visible in the BTS web page for this package.

Thanks.

--- End Message ---
--- Begin Message ---
Source: litestar
Source-Version: 2.15.2-2
Done: Kathara Sasikumar <katharasasikumar...@gmail.com>

We believe that the bug you reported is fixed in the latest version of
litestar, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1104...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Kathara Sasikumar <katharasasikumar...@gmail.com> (supplier of updated litestar 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 04 May 2025 09:56:07 +0000
Source: litestar
Architecture: source
Version: 2.15.2-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Python Team <team+pyt...@tracker.debian.org>
Changed-By: Kathara Sasikumar <katharasasikumar...@gmail.com>
Closes: 1104654
Changes:
 litestar (2.15.2-2) unstable; urgency=medium
 .
   * [81667e1] d/rules: Ignore DeprecationWarnings during tests
     (Closes: #1104654)
Checksums-Sha1:
 eb55cf13caaf5813289941ee025b47ffeb26bee2 4332 litestar_2.15.2-2.dsc
 daf776449b46c0f1dcd07d90aa7c33c12b0cb8e3 8624 litestar_2.15.2-2.debian.tar.xz
 c66a7e766d57678bf7df23960954cd6c7aa9aad7 10913 
litestar_2.15.2-2_amd64.buildinfo
Checksums-Sha256:
 4eddef28ffef7640ef4c0d53a156d53aad2bb6659c3b5f49456fe0e5733d1ede 4332 
litestar_2.15.2-2.dsc
 160fa1ae270a5d3fd209d26cd781ed0cec28facff5bf355b0a6e8e6682256f54 8624 
litestar_2.15.2-2.debian.tar.xz
 55a72ef463a28d8d3d4133805c8dc70481fc01f6d860c1c905596341e0ca225b 10913 
litestar_2.15.2-2_amd64.buildinfo
Files:
 9c64adbe6603fc91714bd9f61533f8de 4332 python optional litestar_2.15.2-2.dsc
 98e14202b5ffbe68159f3e664e0306e8 8624 python optional 
litestar_2.15.2-2.debian.tar.xz
 d1b034adac92d7002273fecf1062acbf 10913 python optional 
litestar_2.15.2-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE/Idcg0vHH7ZUYlCobiW/aGqn1ioFAmgXP5AACgkQbiW/aGqn
1iom/Q/+On4zR6zHduw0riOl/MP0mYGTs6Hk3cDEsaf3kTiYSGhdWu8v+lxAbOxt
sl/Jqcb80EfHR/CjgrNMGWwldOZhlxI5Q3dLGiqT2UkHyUP1H+hkZJKvBM2ABb76
/zjLD76cl6GSOXTQOBu5dfFP2mHfK+Be2jrwExwJvTJodAjYbxtQ+JDW7OPRXmao
IwkGCcONcLz13eRrvsITzWv1NQ8GS7WhqX0kh8c1mVhbo+bwrkkUa+awwEfrvhFd
vgzl9rJwVa/Yk1tOrw4nWKZE1yO9KOu2IA9YQqWOtZUSb+D4SMfF5Hl6794MDExb
iOhiU0Ajown3AAXqo0qdeeGOzcbngmLzo6e5u03/SjdeuLNHr9lt8O3CaE+l/ml0
LXEIeLJyReKTIcZ6gL4rkfByiMkTEf1wbGVAGWu1jt2NeQ0FOhX3Ma4ULhDjmmBb
TwxTywUBotY6T7naem034/jt27hfQS0eAaEbLExXffb5asgkJ2t4N77aMiJLji/5
QzibZD7cAhtbaC6iTSwlq8/l+cwAD8P6+DbAiKst1WzUKwCkHl+TTlbADakW+jtd
zecmQy4mpFGTjBbZt3gNQgHogv244CO93aTy1L+KMs0UUlFJEquF+tQD9xtYYoZM
gKQ+D4shX4jwRgJ1in4BCTyq02uo45/IVW9GfwJ5mEgMhvV/0+E=
=fs/9
-----END PGP SIGNATURE-----

Attachment: pgpGiHXhv_ORl.pgp
Description: PGP signature


--- End Message ---

Reply via email to