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

Tidy up and remove dependencies #169

Merged
merged 7 commits into from
Jan 15, 2025
Merged

Tidy up and remove dependencies #169

merged 7 commits into from
Jan 15, 2025

Conversation

pjrobertson
Copy link
Collaborator

@pjrobertson pjrobertson commented Jan 14, 2025

This removes certain dependencies, seen as unnecessary or unused.

Removed dependencies

  • argparse: built into python by default on>=3.2, we only support python3.10+ so don't need the separate (outdated) package. Ref: https://pypi.org/project/argparse/#description
  • minify_html: incompatible with python3.13+, although a fix has been merged, it hasn't been released yet. We'll do away with minifying the html as a nice to have
  • tiktok-downloader: currently broken (the --snaptik option seems to work, but getting '--info' doens't seem to work) - also removes a lot of other things like flask, aiohttp etc.
  • toml it was unused. If we need a toml parser we can use tomli - what's used by pytest, autopep8 etc.

Other dependencies not removed:

  • asn1crypto - used by timestamping_enricher but hasn't been updated in 2 years. A possible replacement is asn1
  • webtrix crawler - part of a bigger refactor/rewrite. As discussed, can we remove this for something more lightweight?
  • tqdm - used by the telethon archier to show progress
  • tsp_client - as mentioned elsewhere, it has issues with the latest pyopenssl, and throws warnings on higher versions of python. Currently works, and the dev seems (fairly) responsive. An alternative is rfc3161-client

Argparse is installed by default on python>=3.2, we only support python3.10+
Ref: https://pypi.org/project/argparse/#description
Savings were 5K (~15KB vs ~20KB) for the generated .html file, but minify_html is currently not compatible with python3.13+
TODO: switch to using youtube-dlp
(pytest etc. use tomli, which is instlled)
@pjrobertson pjrobertson changed the title [WIP] Tidy up and remove dependencies Tidy up and remove dependencies Jan 14, 2025
Copy link
Collaborator

@erinhmclark erinhmclark left a comment

Choose a reason for hiding this comment

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

Looks good! I added a comment to clean up the tiktok_downloader references at some point, but it as is it still seems to fail as expected and default to a backup.

@pjrobertson pjrobertson merged commit 05e0c9d into main Jan 15, 2025
4 checks passed
@pjrobertson pjrobertson deleted the remove_dependencies branch January 15, 2025 16:23
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.

2 participants