Skip to content

Added an email request for sending checks to ЮKassa#101

Open
Amezhenko wants to merge 11 commits into
snoups:devfrom
Amezhenko:feat
Open

Added an email request for sending checks to ЮKassa#101
Amezhenko wants to merge 11 commits into
snoups:devfrom
Amezhenko:feat

Conversation

@Amezhenko

Copy link
Copy Markdown

No description provided.

Comment thread pyproject.toml Outdated
"msgspec~=0.19.0",
"cryptography>=46.0.3",
"qrcode[pil]>=8.2",
"email-validator>=2.3.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Стоит ли тянуть зависимость ради одной регулярки?

@Amezhenko Amezhenko Apr 16, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Сначала сделал как раз регуляркой. А потом подумал, что у готовой библиотеке возможностей больше, вплоть до проверку на существование почты. Выглядит перспективней. Плюс регулярку универсальную составить довольно сложно. Есть неплохая статья по этому поводу.

Если считаете лишним, уберу. Дайте знать только.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Статья присланная вами затрагивает очень редкие корнеркейсы описанные в стандарте rfc, 99.9% пользователей используют классические почты username@mail.ru или user.name@mail.ru или username+tag@mail.ru ну их комбинации.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Убрал библиотеку и заменил на регулярку.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Зависимость от email-validator уже есть от remnapy - который зависит от pydantic[email]. Его легко найти в uv.lock файле. Так что зависимость все равно используется.

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.

4 participants