question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What to do with tuf/exceptions before 1.0.0?

See original GitHub issue

Description of issue or feature request:

Currently, we are using tuf/exceptions.py to store client and repository exceptions both for the new and old implementation. After we drop the old code we will have to keep the exceptions from tuf/exceptions.py or move them to somewhere else. Some of the options I and @jku come up with are the following:

  1. create a new exceptions file in tuf/api/exceptions.py storing all exceptions needed from the client, metadata API, and future repository code (see #17256). Then when the old code is dropped the tuf/exceptons.py will be removed as well.
  2. keep tuf/exceptions.py and just remove the old exceptions.py after we remove the old code. This will require linting the file and changing the docstrinsg (see https://github.com/theupdateframework/python-tuf/pull/1721)
  3. create new exceptions files: one in tuf/api/ with repository side and metadata API exceptions and one in tuf/ngclient/ where we will store the exceptions for the ngclient. Remove tuf/exceptions.py together with the rest of the old code.

Option 1 or 2 seem easier to change with less code, but option 3 will provide better encapsulation

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lukpuehcommented, Dec 15, 2021

I think it is more important to figure out which (custom or built-in) exceptions we raise where (see #1131, #1312, #967) than where we define custom exceptions.

0reactions
MVrachevcommented, Jan 20, 2022

We have decided in #1725 that we would place the new exception file in tuf/api/exceptions.py, so this issue is solved.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Version 1.0 release strategy #1645 - GitHub
Pull Requests to fix bugs in the last release prior to 1.0.0 will be considered, ... What to do with tuf/exceptions before 1.0.0?...
Read more >
What to use as an initial version? [closed] - Stack Overflow
Version 1.0.0 defines the public API. The way in which the version number is incremented after this release is dependent on this public...
Read more >
What is the significance of reaching major version 1.0.0?
Read the documentation before making assumptions. ... If the project is using Semantic Versioning, then a 1.0.0 release means that the ...
Read more >
Java Edition 1.0.0 - Minecraft Wiki - Fandom
This version adds brewing, enchanting, the End, hardcore mode, breeding and more. It is the last version of Minecraft Markus Persson developed before...
Read more >
BadgeApp - CII Best Practices badge
Projects that follow the best practices below can voluntarily self-certify and show that they've achieved an Open Source Security Foundation (OpenSSF) best ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found