Previously pinned urllib3 to v1.x. This is not needed though.
The incompatibility of v2.x is with poetry itself, but not aurweb.
Signed-off-by: moson-mo <mo-son@mailbox.org>
we copy static files used by PHP and Python versions into /static
preparation work for the removal of the PHP version
Signed-off-by: moson-mo <mo-son@mailbox.org>
The "install" module (v0.6.0) which is being used by poetry 1.4.0
has problems installing certain packages.
Disable the modern installer for now, until things are fixed.
https://github.com/python-poetry/poetry/issues/7572
Signed-off-by: moson-mo <mo-son@mailbox.org>
TUs and Devs can delete and merge packages directly.
Currently the comments they enter, don't end up in the ML notification.
Include the comment in the notifications for direct deletion / merge
Signed-off-by: moson-mo <mo-son@mailbox.org>
middleware must be added before startup:
fixes: "RuntimeError: Cannot add middleware after an application has started"
https://fastapi.tiangolo.com/release-notes/#0910
Signed-off-by: moson-mo <mo-son@mailbox.org>
Currently, in the sharness test suites, we use double-quotes
for string literals in SQL statements passed to sqlite3.
With sqlite version 3.41 the usage of double-quotes for string literals
is deactivated by default:
We'll need to switch to single-quotes in our tests.
Ref: Section 6.f. at https://www.sqlite.org/releaselog/3_41_0.html
Signed-off-by: moson-mo <mo-son@mailbox.org>
Data for packages that do not have a "Last Packager"
(e.g. because the user account was deleted)
should still be available from the /rpc and metadata archives.
Signed-off-by: moson-mo <mo-son@mailbox.org>
With the removal of the "setup-repo" command this script becomes obsolete,
because it is not possible to reserve a repo anymore.
Hence we don't need cleanup.
We've also seen issues in case the last packager's user account is removed,
leading to the deletion of a Package.
Let's deactivate this for now.
Issue report: #425
Signed-off-by: moson-mo <mo-son@mailbox.org>
Bump hooks with "pre-commit autoupdate".
There is an issue with the latest poetry version and the "isort" hook module
https://github.com/PyCQA/isort/issues/2077
Signed-off-by: moson-mo <mo-son@mailbox.org>
When running aurweb with hot-reloading, the CPU consumption is quite high.
This is because it is using "StatReload" for detecting modified files.
(which seems to be rather inefficient)
When "watchfiles" is installed it'll automatically usees that instead and
CPU load goes down to 1%.
watchfiles uses filesystem events for detecting changes and is way more efficient.
Signed-off-by: moson-mo <mo-son@mailbox.org>
Fixes errors that might occur when loading the package details page.
Problem:
We are querying a list of "Required by" packages.
This list is loaded with all details for a "PackageDependency" record.
Now we also have a reference to some attributes from the
related package (PackageDependency.Package.xxx)
This will effectively trigger the ORM to run another query (lazyload),
to fetch the missing Package data (for each PackageDependency record).
At that point it might have happened that a referenced package
got deleted / updated so that we can't retrieve this data anymore and
our dep.Package object is "None"
Fix:
We can force our query to include Package data right away.
Thus we can avoid running a separate query (per "required by"...)
As a side-effect we get better performance.
Signed-off-by: moson-mo <mo-son@mailbox.org>
When we edit a comment we can enable notifications (if not yet enabled).
We should also do this when the comment text is not changed.
Signed-off-by: moson-mo <mo-son@mailbox.org>
Currently, the "Enable notifications" checkbox
is only shown when editing a comment.
We should also show it when a new comment is about to be added.
Signed-off-by: moson-mo <mo-son@mailbox.org>