Skip to content

Remove Subject index modifier (Python 2 leftover)#184

Merged
davisagli merged 1 commit intomasterfrom
fix/155-remove-dead-code-subject
Mar 27, 2026
Merged

Remove Subject index modifier (Python 2 leftover)#184
davisagli merged 1 commit intomasterfrom
fix/155-remove-dead-code-subject

Conversation

@jensens
Copy link
Copy Markdown
Member

@jensens jensens commented Mar 27, 2026

Summary

  • Remove the Subject IParsedQueryIndexModifier class, its ZCML utility registration, and related tests
  • The modifier was a pure no-op: the utf-8 encoding logic was unreachable dead code below an early return since the Python 3 migration
  • The consumer in parseAndModifyFormquery simply skips indexes with no registered modifier, so removing this changes nothing

Fixes #155

🤖 Generated with Claude Code

The Subject IParsedQueryIndexModifier was a no-op: it returned the
value unchanged since the utf-8 encoding branch was unreachable dead
code after the early return added during the Python 3 migration.

Remove the class, its ZCML registration, and the related tests.

Fixes #155
@mister-roboto
Copy link
Copy Markdown

@jensens thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@jensens
Copy link
Copy Markdown
Member Author

jensens commented Mar 27, 2026

@jenkins-plone-org please run jobs

@davisagli davisagli merged commit c0afea6 into master Mar 27, 2026
12 checks passed
@davisagli davisagli deleted the fix/155-remove-dead-code-subject branch March 27, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If the code below of the return statement isn't needed, let's remove it.

3 participants