Skip to content

Remove explicit empty "" handling in ConfigParser #2047

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

Merged
merged 2 commits into from
Jun 8, 2025

Conversation

EliahKagan
Copy link
Member

@EliahKagan EliahKagan commented Jun 8, 2025

One of the benefits of #2035 is that it automatically handles a quoted empty value, i.e. name = "", correctly. Previously, this was handled as a special case, so that it would work even though other quoted values did not work (#1923). Since #2035, it is not necessary to handle it specially. Accordingly, this PR:

  • Adds a regression test for values represented as "" (4ebe407).
  • Removes the obsolete special-case logic (2f22524).

The ConfigParser has supported this for a long time, but it is now
done redundantly since gitpython-developers#2035. This adds a test for it, both to make
clearer that it is intended to work and to allow verifying that it
continues to hold once the legacy special-casing for it is removed.
@EliahKagan EliahKagan changed the title Remove explicit "" handling in ConfigParser Remove explicit empty "" handling in ConfigParser Jun 8, 2025
Because literal `""` is a special case of `"..."` as parsed
since gitpython-developers#2035.
@EliahKagan EliahKagan marked this pull request as ready for review June 8, 2025 05:00
@EliahKagan EliahKagan merged commit 646dc16 into gitpython-developers:main Jun 8, 2025
27 checks passed
@EliahKagan EliahKagan deleted the quoted-empty branch June 8, 2025 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant