Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade python requirement to 3.9 #47

Merged
merged 3 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion man/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def main():
# Set a fixed number of columns to avoid output discrepancies between
# invocation at the shell vs via CI tooling. This only affects how the
# manpage is written to disk, not how it renders at the terminal.
os.environ["COLUMNS"] = "80"
os.environ["COLUMNS"] = "200"
Copy link
Member

@bbannier bbannier Dec 3, 2024

Choose a reason for hiding this comment

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

Cursed, but required since argparse_manpage starts adding line breaks with python-3.13 without this 🙈.


# Change the program name so the parsers report zeek-client, not build.py.
sys.argv[0] = "zeek-client"
Expand Down
3 changes: 1 addition & 2 deletions man/zeek-client.1
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ Cluster configuration file, "\-" for stdin
.SS \fBzeek\-client get\-config\fR
Retrieve staged or deployed cluster configuration.

usage: zeek\-client get\-config [\-h] [\-\-filename FILE] [\-\-as\-json]
[\-\-deployed | \-\-staged]
usage: zeek\-client get\-config [\-h] [\-\-filename FILE] [\-\-as\-json] [\-\-deployed | \-\-staged]

options:
.RS 7
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies = [
"argparse>=1.4.0",
]
readme = "README.md"
requires-python = ">= 3.8"
requires-python = ">= 3.9"
license = {text = "3-clause BSD License"}

classifiers = [
Expand Down
14 changes: 9 additions & 5 deletions zeekclient/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,11 +392,15 @@ def cmd_get_config(args):

config = Configuration.from_brokertype(res.data)

with open(
args.filename,
"w",
encoding="utf-8",
) if args.filename and args.filename != "-" else STDOUT as hdl:
with (
open(
args.filename,
"w",
encoding="utf-8",
)
if args.filename and args.filename != "-"
else STDOUT as hdl
):
if args.as_json:
hdl.write(json_dumps(config.to_json_data()) + "\n")
else:
Expand Down
Loading