Skip to content

Make HTML transformation dependencies optional#190

Merged
lavr merged 2 commits intomasterfrom
feature/optional-html-deps-v2
Mar 31, 2026
Merged

Make HTML transformation dependencies optional#190
lavr merged 2 commits intomasterfrom
feature/optional-html-deps-v2

Conversation

@lavr
Copy link
Copy Markdown
Owner

@lavr lavr commented Mar 31, 2026

Summary

  • Move heavy dependencies (lxml, cssutils, premailer, chardet, requests) from install_requires to extras_require['html']
  • Make requests import lazy in utils.py so import emails works without it
  • Base install (pip install emails) only requires python-dateutil
  • Full install: pip install emails[html]
  • Document the optional install in README and docs/install.rst

Supersedes #189.

lavr added 2 commits March 31, 2026 03:29
pip install emails        - lightweight, only message building and sending
pip install emails[html]  - full install with HTML transformer (lxml, cssutils,
                            premailer, chardet, requests)

Move heavy dependencies (lxml, cssutils, premailer, chardet, requests) from
install_requires to extras_require['html']. Make requests import lazy in
utils.py so that `import emails` works without it.
@lavr lavr merged commit 960b265 into master Mar 31, 2026
7 checks passed
@lavr lavr deleted the feature/optional-html-deps-v2 branch April 2, 2026 17:39
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