refactor(bot): drop legacy wordpress module - #38
Merged
Merged
Conversation
app/bot/utils/wordpress.py hasn't been imported by anything since WordPress publishing moved to app/publishers/WordPress — only its own tests referenced it, and the README already flagged it as legacy. It carried a pickle.load of a cookie jar, a swallowed exception and three open TODOs. Also drops WP_COOKIE_FILENAME / WP_COOKIE_PATH from the bot config and .env.example: the publisher reads its own WP_COOKIE_PATH from shared config, so the bot-side pair was dead with the module.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
app/bot/utils/wordpress.pystopped being part of any code path when WordPresspublishing moved into
app/publishers/WordPress/. Nothing inapp/imports it —only its own 23 test files did — and the README has been calling it legacy for a
while. Keeping it around cost us a
pickle.loadof a cookie jar (arbitrary codeexecution on a tampered
cookie.pkl), a swallowed exception, a strayprint,and three open TODOs, all in code that never runs.
Deletes the module and its tests, plus
WP_COOKIE_FILENAME/WP_COOKIE_PATHfrom the bot config and
.env.example— the publisher resolves its ownWP_COOKIE_PATHfrom shared config, so the bot-side pair died with the module.extra="ignore"on the settings model means a leftoverWP_COOKIE_FILENAMEinsomeone's
.envis harmless.Not in scope, worth a follow-up:
lxml,feedparserandfake-useragentarenow unused in
app/bot/pyproject.toml(the WordPress publisher declares its owncopies). Dropping them means regenerating the bot lock file, which is a much
noisier diff than this one. Same for
WP_URL/WP_LOGIN/WP_PASSWORD/WP_APP_PASSWORD, which the bot config still exposes but no bot code reads.