omnidb-server: fix for bug 1053100
От | Bradford Boyle |
---|---|
Тема | omnidb-server: fix for bug 1053100 |
Дата | |
Msg-id | CAOMoQbTE3MUJHZh3HkbwkkGbeEBy37AMAQwZUPr7atvmMZyXMw@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: omnidb-server: fix for bug 1053100
|
Список | pgsql-pkg-debian |
Hi All, I have been looking at Debian bug 1053100 (omnidb-server crashes when creating a new PostgreSQL connection) [1] and I have identified that this is caused by a change in one of OmniDB's Python dependencies. OmniDB configures Django's session serialization format to use Python's `pickle` module instead of the default JSON-based serialization. The class `Session` has a field `v_databases` that is a dictionary tha contains references to objects holding information for the various connections the user has configured. When a connection to a PostgreSQL database is configured, the `Session` object ends up transitively referencing an instance of `PGSpecial` from provided by the Python package `pgspecial`. A recent change in `pgspecial` means that `PGSpecial` objects are no longer serializable with Python's `pickle` module. Reviewing OmniDB's use of `PGSpecial` within its `PostgreSQL` class, it appears to be a "stateless" in that it does not use the `PGSpecial` object in any way that would cause its fields to be change value from when it was constructed. Based on this observation, an approach to fixing the reported bug is to patch OmniDB's `PostgreSQL` class to omit `PGSpecial` during serialization and to recreate it during deserialization. I have a attached a patch that will do this. In my limited local testing, this fixes the bug. If there are no concerns with the proposed patch, I can update the package on s.d.o. It looks like Django 5.x has deprecated `PickleSerializer` [2] so its unlikely that OmniDB will continue working going forward. At the moment, Debian testing still provides Django 4.2 but I do not know if the Debian Python team has plans to update to the newer major version. Independent of the Django major version incompatibility, it looks like the upstream repo for OmniDB has gone inactive and the project is unmaintained [3]. Does it make sense to continue publishing packages of OmniDB for newer releases of Debian and Ubuntu? -- Bradford [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053100 [2]: https://github.com/django/django/pull/15139 [3]: https://github.com/OmniDB/OmniDB
Вложения
В списке pgsql-pkg-debian по дате отправления: