Skip to content

Fix config generation on Python 3.14 - #143

Open
halfcity789 wants to merge 1 commit into
ticarpi:masterfrom
halfcity789:master
Open

halfcity789 wants to merge 1 commit into
ticarpi:masterfrom
halfcity789:master

Conversation

@halfcity789

Copy link
Copy Markdown

Description

Fix an issue that prevents jwt_tool from generating its initial
configuration file when running with Python 3.14.

Problem

createConfig() uses ConfigParser(allow_no_value=True) and stores
comment-like strings as no-value option names in order to preserve
comments in the generated jwtconf.ini.

Python 3.14's configparser performs stricter validation when writing
configuration files and raises InvalidWriteError when these option
names contain delimiters such as :.

This causes the initial configuration setup to fail with:

configparser.InvalidWriteError:
Cannot write key # To disable the proxy option set this value to: False (no quotes). For Docker installations with a Windows host OS set this to: "host.docker.internal:8080"; contains delimiter :

As a result, an incomplete jwtconf.ini may be left behind, causing
subsequent executions to fail with errors such as:

KeyError: 'argvals'

Testing

Tested with Python 3.14.6.

Verified that jwt_tool can successfully generate jwtconf.ini

This change preserves the existing configuration generation approach
while avoiding the invalid option-name delimiter.

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.

1 participant