Commit graph

55 commits

Author SHA1 Message Date
Alex Pyrgiotis
ce5adb33fd
Bump poetry dependencies 2024-03-13 21:03:15 +02:00
deeplow
7168a4078a
Bump poetry dependencies 2024-02-13 11:36:09 +00:00
deeplow
3fb797cdd1
Temporarily pin PyMuPDF==1.23.8 in container
PyMuPDF 1.23.9 swapped the new fitz implementation (fitz_new)
with the fitz module. In the new module there are prints in the code
that interfere with our stdout for sending JSON from the container.
Pinning the version seems to have no adverse consequences [1], since
fitz_old hasn't had significant changes and it gives breathing room for
the print-related issue to be tackled in PR [2].

Fixes temporarily #700

[1]: https://github.com/freedomofpress/dangerzone/issues/700#issuecomment-1938357651
[2]: https://github.com/pymupdf/PyMuPDF/pull/3137
2024-02-12 11:37:46 +00:00
Alex Pyrgiotis
d7ee162852
Add support for Python 3.12
Fedora 39 ships with Python 3.12 by default, which Dangerzone previously
did not support due to limitations from the PySide6 package. Now that
the PySide6 package has been updated to 6.6.1, and the limitation has
lifted, we should to reflect this in pyproject.toml.
2024-01-31 17:07:32 +02:00
Alex Pyrgiotis
741c8311ee
Bump python dependencies via poetry lock 2024-01-31 17:07:32 +02:00
deeplow
1cd87f73a8
Bump pymupdf to 1.23.8 2024-01-03 12:58:35 +00:00
deeplow
2b082913a0
Bump pymupdf version 1.23.7
The build was failing due to a missing kernel libraries. Adding the
linux-headers dependency solves the issue.
2024-01-03 12:58:35 +00:00
deeplow
250d8356cd
Hash-verify container pip install & merge build-image
Ensure that when the container image is installing pymupdf (unavailable
in the repos) with verified hashes. To do so, it has the pymupdf
dependency declared in a "container" group in `pyproject.toml`, which
then gets exported into a requirements.txt, which is then used for
hash-verification when building the container.

Because this required modifying the container image build scripts, they
were all merged to avoid duplicate code. This was an overdue change
anyways.
2024-01-03 12:58:35 +00:00
deeplow
a3a64882a3
Add PyMuPDF to dev env in Qubes
Since PyMuPDF is now used in Pixels to PDF we needed to add it to the
qubes development environment.
2024-01-03 12:58:32 +00:00
deeplow
77d5ea5940
Add PyMuPDF in pixels_to_pdf replacing old logic
Adding PyMuPDF essentially make the code much simpler since it can do
everything that we'd need multiple programs for. It also includes
tesseract-OCR integration, which this commit makes use of.
2024-01-03 12:56:33 +00:00
deeplow
612ac061de
Bump python dependencies via poetry lock 2023-12-06 09:59:30 +00:00
dependabot[bot]
6876fa569d
Bump urllib3 from 2.0.6 to 2.0.7
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.0.6 to 2.0.7.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.0.6...2.0.7)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-13 20:40:53 +02:00
deeplow
c4fdebc80d
Update Poetry lock file
Run `poetry lock` and update the existing dependencies again thanks
to a urrlib vulnerability that was announced a bit after our last
dependency bump.
2023-10-03 09:56:30 +01:00
Alex Pyrgiotis
a8ee8cdd4a
Update Poetry lock file
Run `poetry lock` and update the existing dependencies.
2023-10-02 17:58:52 +03:00
deeplow
8b8f2a207c
Remove remains of parallel tests completely
Parallel tests had given us issues in the part [1]. This time, they
weren't playing well with pytest-qt. One hypothesis is that Qt
application components run as singletons and don't play well when there
are two instances.

The symptom we were experiencing was infinite recursion and removing
pytest-xdist solved the issue.

[1]: https://github.com/freedomofpress/dangerzone/issues/217
2023-07-25 15:17:24 +01:00
Alex Pyrgiotis
a478d14025
Update Poetry lock file
Run `poetry lock` and update the existing dependencies.

Closes #480
Closes #482
2023-07-25 15:02:44 +03:00
Alex Pyrgiotis
ca81b4a5f3
Add pytest-qt test dependency 2023-07-24 16:49:31 +03:00
Alex Pyrgiotis
5ae8b871b6
Add UpdaterThread class
Add a new Python module called "updater", which contains the logic for
prompting the user to enable updates, and checking our GitHub releases
for new updates.

This class has some light dependency to Qt functionality, since it needs
to:

* Show a prompt to the user,
* Run update checks asynchronously in a Qt thread,
* Provide the main window with the result of the update check

Refs #189
2023-07-24 14:22:27 +03:00
Alex Pyrgiotis
b102b2bd49
Update Poetry lock file
Run `poetry lock` and allow updating the existing dependencies. This
fixes a CI regression that was introduced by Poetry 1.4.1, which added
stricter Python wheels validation

Fixes #376
2023-03-27 15:15:26 +03:00
Alex Pyrgiotis
16375bfdf9
Use PySide6 in our dev environments
Drop PySide2 from our dependencies (previously used only on Linux
environments) and use PySide6 in all dev environments. The reason is
that PySide2 (from PyPI) does not support Python 3.11, and the variants
that do (Fedora/Debian packages) need to backport fixes from PySide6.

Our original attempt was to build PySide2 wheels for Python 3.11 but
it was not simple, nor maintainable. So, we were left with two options:

1. Install Python 3.10 in dev environments that have Python 3.11 by
   default.
2. Use PySide6 in all of our environments.

In both cases, we break package parity with the user's system, since we
are not testing Dangerzone under the same conditions. However, since
option (2) is forwards-compatible with where we want to move the
project (use Qt6 and PySide6), we chose that one.

Fixes #330
2023-02-07 18:52:09 +02:00
deeplow
81e9ccf30a
Add PySide6 dependency for Windows and MacOS
We're not yet adding them to Linux, since PySide6 is not yet available
in Linux distros' packages, whereas with Linux and macOS our packaging
process includes the shipped binaries.

Fixes #211
2023-01-30 11:42:18 +00:00
deeplow
ab2f9ead9a
Replace PySide2-stubs with types-PySide2
Replace PySide2-stubs with types-PySide2, both of which are projects
that provide PySide2 typing hints, for the following reasons:

1. types-PySide2 is more complete and allows us to ditch some 'type:
   ignore' comments for Mypy.
2. PySide2-stubs also brings PySide2 as a dependency, which cannot be
   installed in MacOS M1 machines.

Refs #177
2023-01-30 11:42:09 +00:00
Alex Pyrgiotis
ea99b1e1dd
Narrow down installed system packages
Narrow down the system packages that we install in dev environments. The
rationale is that we get most of the Python dependencies from Poetry, so
we don't need to install them from the system as well.

The packages that we do need to install are non-Python ones, and this
commit adds some that were missing: make, python3-stdeb. Also, we
explicitly install the base Qt5 libraries, in order to get the graphics
and C++ libraries that we can't get from PyPI.
2023-01-16 18:48:09 +02:00
deeplow
99f23216d6
Fix limited PATH in produced .exe and .msi
Cx-Freeze 6.13.0 limited the PATH of the build executables, making it so
Dangerzone couldn't find Docker through shutil.which().

More information on the issue is available at:
https://github.com/marcelotduarte/cx_Freeze/issues/1674
2022-12-01 14:58:30 +00:00
deeplow
c6a0b59379
Add unit tests to cover archive-related methods
Additionally this adds the pytest-mock dev dependency to be able to mock
certain methods.
2022-11-24 11:16:34 +00:00
Alex Pyrgiotis
43617366a5
Update poetry.lock
Run `poetry update` to update the `poetry.lock` file to the latest
version.
2022-11-07 11:46:41 +02:00
Guthrie McAfee Armstrong
e552411db2
Support Python 3.10
PySide2 5.15.2.1 added support for Python 3.10
2022-10-25 10:23:00 +01:00
deeplow
d5eefeab3d
report non-containerized code coverage 2022-09-13 13:17:22 +01:00
deeplow
9e3d404ed8
make test: add to Makefile & enabled parallel runs
parallel pytest via pytest-xdist
2022-09-13 13:08:01 +01:00
deeplow
4251d824ab
add pytest dep. for testing
The parameterizatin features of pytest over the default unittest
will be useful to reduce test code. Furthermore, pytest is already
used by folks at FPF so there won't be any learning curve if folks
want to work on it.
2022-09-13 13:07:15 +01:00
Guthrie McAfee Armstrong
36d96ccb5c
Add unit tests 2022-09-13 13:06:59 +01:00
deeplow
bc7188eb4d
add dev dependency: PySide2-stubs
Mypy was returning many errors relating to PySide2, which didn't
make much sense. This is apparently because there are missing type
hinting stubs for PySide2.

The temporary solution is to add this devel dependency.

Upstream issue: (remove dep. when solved)
  - https://bugreports.qt.io/browse/PYSIDE-1675
2022-08-22 11:13:29 +01:00
deeplow
93392f8206
add mypy as dev dependency (type checking lint) 2022-08-22 10:30:35 +01:00
deeplow
b73efb30ae
add isort as dev dependency 2022-08-22 10:03:49 +01:00
Guthrie McAfee Armstrong
e63c931800
Remove psutil, termcolor, and wmi dependencies 2022-08-19 15:16:19 +01:00
Guthrie McAfee Armstrong
575c4b2302
Remove macholib dependency (fix #145) 2022-08-19 15:16:16 +01:00
Guthrie McAfee Armstrong
395eba0a74
Remove requests dependency 2022-08-19 15:16:14 +01:00
Guthrie McAfee Armstrong
0b9e91434d
Update poetry.lock 2022-08-19 15:15:00 +01:00
Micah Lee
bc8b9d62b4
Switch Windows package from pyinstaller to cx_freeze 2021-12-13 15:23:45 -08:00
Micah Lee
3e11dc11e0
Switch back to PyInstaller from PyPi 2021-11-29 15:04:20 -08:00
Micah Lee
112291f82a
Remove unused dependencies 2021-11-22 11:37:05 -08:00
Micah Lee
e4c241a0d1
Switch to PySide2 5.15.2 2021-11-17 11:39:26 -08:00
Micah Lee
29a148d211
Successfully set up reverse ssh forward system, allowing the host to run commands on the guest over ssh 2021-07-01 15:32:07 -07:00
Micah Lee
d3d417ee84 Strip ANSI colors from Mac GUI output to preventing crashing, and fix Mac docker path 2021-06-22 13:34:15 -07:00
Micah Lee
918e5fa306
Display banner 2021-06-09 17:31:06 -07:00
Micah Lee
80d1d2e583
Add black as a dev dependency 2021-06-08 15:31:01 -07:00
Micah Lee
a7afe9493b
Update poetry deps 2021-06-08 15:28:28 -07:00
Micah Lee
016de717cb
Update python deps 2020-12-28 15:22:57 -08:00
Micah Lee
ee215a4870
Update macOS instructions for installing python, and fix how DMG gets created 2020-10-29 15:54:12 -07:00
Micah Lee
269cf5b431
Add Windows changes 2020-10-27 11:55:21 -07:00