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

valid email address deemed invalid #3733

Closed
janwijbrand opened this issue Apr 17, 2018 · 14 comments
Closed

valid email address deemed invalid #3733

janwijbrand opened this issue Apr 17, 2018 · 14 comments
Labels
bug 🐛 good first issue This issue is ideal for first-time contributors!

Comments

@janwijbrand
Copy link

janwijbrand commented Apr 17, 2018

When trying to add an additional email address to my account, the email address is rejected. This email address however /is/ valid. The domain for the email address is n--tree.net. I guess the validator trips over the (admittedly uncommon) double dash in it. Hopefully this can be resolved.


Good First Issue: This issue is good for first time contributors. If you've already contributed to Warehouse, work on another issue without this label instead. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our Getting Started Guide. If you are working on this issue and have questions, feel free to ask them here, #pypa-dev on Freenode, or the pypa-dev mailing list.

@di
Copy link
Member

di commented Apr 17, 2018

@janwijbrand Sorry you're having troubles! This seems to be due to one of our dependencies, wtforms, and there isn't really a great way for us to override the behavior.

Would you raise the issue in their tracker instead? https://github.com/wtforms/wtforms/issues. Thanks for the report!

@janwijbrand
Copy link
Author

Thanks @di. I've made the report here: wtforms/wtforms#384.

@davidism
Copy link

davidism commented Apr 18, 2018

It's absolutely possible to change the validator you're using. Although it's sort of futile to try to validate addresses rather than just sending them. I'd recommend removing the validator, or replacing it with a simpler one. I don't really like to keep changing the email regex, since it never seems to end. I also don't really have time to release a new WTForms version any time soon, although it's on my todo list.

@janwijbrand
Copy link
Author

janwijbrand commented Apr 18, 2018

Thanks @davidism for your reply. I hope @di can reopen the issue and followup on your suggestions? The situation is somewhat finicky for me as I really want to update my email address. It is not blocking, but it certainly would be nice. Thanks again.

@di di reopened this Apr 18, 2018
@di
Copy link
Member

di commented Apr 18, 2018

@davidism Seems to me like the user https://pypi.org/user/davidism/ is still an Owner of the project https://pypi.org/project/WTForms/, do you not see this project on login?

@janwijbrand Could you email me at di@python.org from the address you'd like to add?

Ultimately removing the validator entirely is blocked on #3632.

@di
Copy link
Member

di commented Nov 27, 2018

This issue is no longer blocked -- all new emails must be verified before they can be used, so we can remove the wtforms.validators.Email validator and replace it with something much simpler, like wtforms.validators.Regexp(r".+@.+\..+"), which should be good enough to catch most common mistakes.

@di di added the good first issue This issue is ideal for first-time contributors! label Nov 27, 2018
@davidism
Copy link

As a side note, WTForms also moved to using the email_validator library, although I don't think there's going to be a release any time soon. But you might want to look into using it too if you want more thorough validation still.

@robindboer
Copy link
Contributor

With #6013 merged, I think this issue is resolved and can be closed.

@brainwane
Copy link
Contributor

@robindboer Thanks for the fix! Do you have an idea of what you might work on next? If you'd like to keep working on Warehouse and you would like a suggestion, please feel free to comment and ask for one :-)

@robindboer
Copy link
Contributor

@brainwane Would love to continue to work on Warehouse. I was looking for a next issue already but if you have any suggestions, they are welcome. Thanks!

@di di closed this as completed Jun 15, 2019
@brainwane
Copy link
Contributor

@robindboer is #5825 something you would be interested in working on?

@brainwane
Copy link
Contributor

Actually @robindboer looks like some of my colleagues want to take care of that in a particular way. Are you potentially interested in learning some ElasticSearch and working on #4006 or one of our other issues tagged "search"?

@robindboer
Copy link
Contributor

@brainwane thanks for the suggestions. I will look into the issues later today and see if I can pick up any of the issues. I have never worked with ES before but I see that as an opportunity 😄 Thanks!

@brainwane
Copy link
Contributor

Thanks, @robindboer - if you're having any trouble, please do feel free to leave a question on the issue, chat with us in IRC in #pypa-dev on Freenode, or ask a question on the pypa-dev mailing list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 good first issue This issue is ideal for first-time contributors!
Projects
None yet
Development

No branches or pull requests

5 participants