Commit graph

77 commits

Author SHA1 Message Date
dependabot[bot]
104ce4a0de
build(deps-dev): bump hatchling
Bumps the build-and-release-dependencies group with 1 update: [hatchling](https://github.com/pypa/hatch).


Updates `hatchling` from 1.28.0 to 1.29.0
- [Release notes](https://github.com/pypa/hatch/releases)
- [Commits](https://github.com/pypa/hatch/compare/hatchling-v1.28.0...hatchling-v1.29.0)

---
updated-dependencies:
- dependency-name: hatchling
  dependency-version: 1.29.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: build-and-release-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-02 23:15:01 +00:00
Jussi Kukkonen
8513f46c2b Bump minimum Python version to 3.10
We could just stop testing with 3.9... but I think this will lead to
unintentionally breaking 3.9 anyway sooner or later.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2026-01-08 13:08:47 +02:00
dependabot[bot]
89bc8bb1c1
build(deps-dev): bump hatchling
Bumps the build-and-release-dependencies group with 1 update: [hatchling](https://github.com/pypa/hatch).


Updates `hatchling` from 1.27.0 to 1.28.0
- [Release notes](https://github.com/pypa/hatch/releases)
- [Commits](https://github.com/pypa/hatch/compare/hatchling-v1.27.0...hatchling-v1.28.0)

---
updated-dependencies:
- dependency-name: hatchling
  dependency-version: 1.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: build-and-release-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-05 21:01:22 +00:00
Jussi Kukkonen
ee50fea0c6 annotation fixes
* Start linting securesystemslib calls
  (this requires new securesystemslib)
* Fix various issues that suddenly popup

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2025-04-22 10:53:54 +03:00
Jussi Kukkonen
5a2a4f7927 build: Remove workaround for hatchling upgrades
Apparently Dependabot now supports upgrading build-system.requires: we
don't need the workarounds anymore.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2025-02-21 10:05:18 +02:00
Jussi Kukkonen
72bb243e0b
Merge pull request #2797 from jku/unignore-linter-rule
pyproject: Unignore ISC001
2025-02-20 08:52:01 +00:00
Jussi Kukkonen
73273813f3
Merge pull request #2773 from jku/no-requests
More porting from  requests to urllib3
2025-02-20 08:51:42 +00:00
Jussi Kukkonen
390f79ce55 pyproject: Unignore ISC001
This is no longer incompatible with ruff formatter.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2025-02-19 15:34:27 +02:00
pakagronglb
94639360ec Enable FA (future annotations) linting ruleset
Signed-off-by: pakagronglb <pakagronglebel@gmail.com>
2025-02-19 19:44:05 +07:00
Jussi Kukkonen
6ddc0838a2 Move fetchers around to make them public
RequestsFetcher should still be public (even if deprecated).

* We don't want to import RequestsFetcher in __init__
  (because that requires importing requests)
* but we do want RequestsFetcher to be importable publicly

Move both fetchers out of _internal: that was never the right place for
them anyway: they are public modules.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2025-02-14 17:42:45 +02:00
Jussi Kukkonen
140abd34dc Update requirements: drop requests
This also removes RequestsFetcher from tuf.ngclient.__init__.py:
Otherwise we can't drop the requests dependency.

This means RequestsFetcher is not currently public.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2025-02-14 17:42:43 +02:00
Kairo Araujo
554a04eed9
Merge pull request #2785 from jku/update-project-metadata
pyproject: Update license metadata
2025-02-14 16:23:33 +01:00
Jussi Kukkonen
e0908f5df2 pyproject: Update license metadata
PEP-639 (https://peps.python.org/pep-0639/) cleans up the license
documentation mess. Do what it suggests.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2025-02-11 14:38:47 +02:00
NicholasTanz
86cc7ad3ee clarify urllib3 as requirement in pyproject.toml and add back in requestsFetcher as option.
Signed-off-by: NicholasTanz <nicholastanzillo@gmail.com>
2025-01-30 21:29:08 -05:00
Jussi Kukkonen
4548f38d8d pyproject: Coverage: Use branch coverage
This was in use in tests/.coveragerc: previously. Enable in
pyproject config too.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-12-11 11:55:11 +02:00
Jussi Kukkonen
31bb232ca3 tests: Remove various unneeded coverage workarounds
Tests now run from root dir so various coverage complications
can be removed.

Also remove the duplicate .coveragerc and rely on pyproject.toml

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-12-11 10:11:55 +02:00
Jussi Kukkonen
58bf56f81e pyproject: Remove dev-mode-dirs
This was only needed because tests needed changing to tests/ dir:
this is no longer the case.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-12-11 10:11:55 +02:00
Jussi Kukkonen
4f32a13ab0 pyproject: Don't require Python 3.9 quite yet
We're still compatible with 3.8: let's not force 3.9 yet.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-11-29 16:31:45 +02:00
Jussi Kukkonen
d89c8e673f coverage config: Add some excludes
This makes the results more useful

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-11-29 13:28:56 +02:00
Jussi Kukkonen
0b351efc6f pyproject: Remove deprecated ruff rules
These are no longer part of the ruleset

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-11-29 11:53:35 +02:00
NicholasTanz
5c71f4f062 update python annotations
Signed-off-by: NicholasTanz <nicholastanzillo@gmail.com>
2024-11-03 23:21:23 -05:00
Jussi Kukkonen
bd18823b13
Python upgrade: Stop testing 3.8, start testing 3.13 (#2721)
We don't strictly require 3.9 yet but likely should soon as the
container annotation features are nice.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-10-25 13:30:03 +03:00
Jussi Kukkonen
0b85ed570d Add a conformance test workflow
* The conformance test suite is likely to still change quite a bit so
  the workflow is not enabled on PRs yet
* The actual conformance client is copied from the tuf-conformance project
* This is mostly a test to see how things should work out, and a
  demonstration of how the tuf-conformance project should be used

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-07-10 16:15:36 +03:00
Jussi Kukkonen
419bfe34ec linting: Enable all Ruff rulesets by default
The goal here is to have ruff enable new rulesets when new releases are
made without us having to o anything: we can then decide if we disable
or not.

* Enable a couple more rulesets (ERA, INP, T )
* Add a few individual ignores to tests and examples
* Default to enable all, disable the rulesets we don't want

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-07 15:39:53 +03:00
Jussi Kukkonen
80882dbe7d lint: Enable flake8-annotations
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-06 09:19:19 +03:00
Jussi Kukkonen
dc5194e9e9 lint: Enable flake8-self
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-06 09:19:19 +03:00
Jussi Kukkonen
9a61be1bf4 lint: Enable flake8-executable
* Remove exectuable flag from a couple of files
* Half of the test files have a shebang (but are
  still not executable): remove the shebang

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-06 09:19:19 +03:00
Jussi Kukkonen
d6c1a22be1 lint: Enable flake8-unused-arguments
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-06 09:19:19 +03:00
Jussi Kukkonen
4244632a2f lint: Enable pygrep-hooks
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-06 09:19:19 +03:00
Jussi Kukkonen
460424a620 lint: Enable flake8-raise
I'm not sure I agree with not using the parens in
   raise SomeError
but being consistent is definitely better than not being consistent.

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-06 09:19:19 +03:00
Jussi Kukkonen
7e52190bf0 lint: Enable flake8-pyi
"object" is slightly more informative than "Any" as annotation

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-06 09:19:19 +03:00
Jussi Kukkonen
981788bca2 lint: Enable flake8-pie
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-06 09:19:19 +03:00
Jussi Kukkonen
a7b832b88f Use securesystemslib 1.0.0
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-05-02 14:05:41 +03:00
E3E
52601e2bd8 add RUF and BLE rulesets; ignore some broad exceptions (BLE001) and RUF012
Signed-off-by: E3E <ntanzill@purdue.edu>
2024-04-21 01:37:40 -04:00
Lukas Puehringer
bc3ebd8e1e Constrain securesystemslib dependency to <0.32.0
There are several breaking changes coming up in securesystemslib on its
way to 1.0.

To not disrupt tuf users this patch constrains securesystemslib to not
update the current minor version..

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2024-04-03 17:46:57 +02:00
Jussi Kukkonen
009e1ddbf4 lint: Enable more ruff ulesets
Minor fixes were needed, the only possibly interesting one is
the one in RequestsFetcher (use "yield from").

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-04-02 11:02:48 +03:00
Jussi Kukkonen
1512653995 linter: Enable more rules
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-03-19 16:30:52 +02:00
Jussi Kukkonen
d95cff9a70 lint: Enable flake8-bugbear and flake8-datetimez
Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-03-08 15:02:45 +02:00
Jussi Kukkonen
009566aa23 lint: Start using ruff ruleset "flake8-bandit"
* Remove bandit
* Add ruff ruleset "flake8-bandit"
* verify_release is now checked by bandit
  * Avoid some asserts as suggested
  * ignore a subprocess.run lint: it seems dumb
* ignore all bandit rules for tests and examples (just like before)

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-02-23 18:27:29 +02:00
Jussi Kukkonen
56b362ab78 lint: Enable pycodestyle in tests
Only leave E501 (line-too-long) disabled: There is a lot of embedded
test data that is not formatted according to the rules.

Fixes #2568

Signed-off-by: Jussi Kukkonen <jkukkonen@google.com>
2024-02-21 22:08:43 +02:00
E3E
f156e21537 remove pylint and suppressed inline errors from pylint
Signed-off-by: E3E <ntanzill@purdue.edu>
2024-02-20 22:57:53 -05:00
E3E
da38b473bd add pylint ruleset to ruff
Signed-off-by: E3E <ntanzill@purdue.edu>
2024-02-20 16:04:06 -05:00
E3E
73842c97b8 reformat docstrings and supress small errors inline
Signed-off-by: E3E <ntanzill@purdue.edu>
2024-02-20 15:19:33 -05:00
E3E
206c9424f1 Add to linting Configuration:
- adpot changes in dependabot.yml and remove --diff from ruff check.
- select pydocstyle, isort, pyflakes, pep8-naming, pycodestyle for ruff and ignore some small issues / add inline comments.
- adjust docstring length to 80 in various files

Signed-off-by: E3E <ntanzill@purdue.edu>
2024-02-20 00:34:47 -05:00
E3E
4a53013548 use correct ruff command and add ignore unused imports
Signed-off-by: E3E <ntanzill@purdue.edu>
2024-02-18 00:17:33 -05:00
E3E
e379507e63 replace black and isort for ruff. I still haven't replaced ruff with pylint
Signed-off-by: E3E <ntanzill@purdue.edu>
2024-02-16 23:56:08 -05:00
Lukas Puehringer
dd9b5e0da2 build: add workaround to auto-update build system
Dependabot does not support `build-system.requires`. To get
reproducibility and auto-updates, we pin the version in a regular
requirements file and use it as constraint during build.

fixes: #2529
upstream issue: dependabot/dependabot-core#8465
h/t @jku

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2023-12-13 12:32:00 +01:00
Lukas Puehringer
7c5f5d2517 build: Upgrade hatchling to 1.20.0
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2023-12-13 09:49:15 +01:00
Lukas Puehringer
00be49b6b5 build: Upgrade hatchling to 1.19.1
Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2023-12-12 11:20:09 +01:00
Jussi Kukkonen
e989c14ee9
Merge pull request #2518 from NicholasTanz/enable_python3.12
build: Enable python 3.12
2023-12-04 09:02:09 +01:00