Skip to content

Project cleanup#27

Open
ngie-eign wants to merge 7 commits into
markjdb:masterfrom
ngie-eign:cleanup
Open

Project cleanup#27
ngie-eign wants to merge 7 commits into
markjdb:masterfrom
ngie-eign:cleanup

Conversation

@ngie-eign
Copy link
Copy Markdown

  • Add python 3.13/3.14 support.
  • Replace defunct pysqlite3 dependency with sqlite3 dependency.
  • .gitignore: add more paths.
  • Apply ruff fixers:
    • ANN (all)
    • I (all)
    • UP (all)
    • Others (safe only)
  • Fix a potential SQLite3 injection attack.
  • Use non-legacy (native) type hints.
  • Run through ruff format.

ngie-eign added 4 commits May 6, 2026 16:15
Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
pysqlite3 is a defunct project now: redirect others to install the
py-sqlite3 package instead, i.e., the module that's distributed with the
python language distribution.

Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
This ignores a lot more autogenerated paths which should not be checked
in to :master.

Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
- Run `I` and `UP` category fixers and resolve all issues not handled
  via `--unsafe-fixes`.
- Run through the remaining safe fixers under the `ALL` meta-category.

Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
@ngie-eign
Copy link
Copy Markdown
Author

pkg install py311-hatch didn't work on 14.4-RELEASE BTW due to the latest version being out of date/incompatible with the version of virtualenv we distribute on 14.4-RELEASE right now for issues discussed in the 1.16.5 release notes.

ngie-eign added 3 commits May 6, 2026 17:18
Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
- Unpack iterables instead of appending one iterable to another iterable (RUF005).
- Don't assign values via mutable arguments (dicts, lists) in functions.
- Fix a potential SQLite3 injection attack via an f-interpolated string.
- Re-raise exceptions using `raise` when possiible to avoid mangling the
  traceback stack.

Signed-off-by: Enji Cooper <ngie@FreeBSD.org>
Copy link
Copy Markdown
Owner

@markjdb markjdb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't reformat all of the code, it makes history unreadable for no benefit and gives me a bunch of work to do when rebasing local WIP patches. I don't want to take these "chore" patches.

If you want to make the code compliant to some linter or type checker, please at least include a script so that others can easily lint their changes.

Comment thread pyproject.toml
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no way to write "3.11 or later"?

Comment thread src/bricoler/bricoler.py
""")
WHERE tr.result_type = ?
""",
(restype.value,),
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no "attack": restype's value is defined within the code itself, and the user invoking bricoler already has control over the db file. Please don't use such language for benign things.

Comment thread src/bricoler/bricoler.py
"-o",
f"poolname={zfs_pool_name}",
"-o",
f"bootfs={zfs_pool_name}",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this less readable than before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants