Re: Checking if email is valid

2023-11-04 Thread Simon Connah via Python-list
> 

> On 11/3/2023 6:51 AM, Jon Ribbens via Python-list wrote:
> 

> > On 2023-11-03, Chris Angelico ros...@gmail.com wrote:
> > 

> > > On Fri, 3 Nov 2023 at 12:21, AVI GROSS via Python-list
> > > python-list@python.org wrote:
> > > 

> > > > My guess is that a first test of an email address might be to see if
> > > > a decent module of that kind fills out the object to your
> > > > satisfaction. You can then perhaps test parts of the object, rather
> > > > than everything at once, to see if it is obviously invalid. As an
> > > > example, what does u...@alpha...com with what seems to be lots of
> > > > meaningless periods, get parsed into?
> > > 

> > > What do you mean by "obviously invalid"? Have you read the RFC?
> > 

> > What do you mean by 'What do you mean by "obviously invalid"?'
> > Have you read the RFC?
> 

> 

> About reading the RFC, there's this ... but read the comments too ...
> 

> https://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx/
> 

> 


Wow. I'm half tempted to make a weird email address to see how many websites 
get it wrong.

Thank you for the link.

Simon.

signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Checking if email is valid

2023-11-04 Thread Simon Connah via Python-list
> 

> 

> On 2023-11-02, Simon Connah simon.n.con...@protonmail.com wrote:
> 

> > Valid as in conforms to the standard. Although having looked at the
> > standard that might be more difficult than originally planned.
> 

> 

> Yes. Almost nobody actually implements "the standard" as in RFC 2822
> section 3.4.1 (which can contain, for example, non-printable control
> characters, and comments), nor is it particularly clear that they
> should. So while checking against "the spec" might sound right, it's
> highly unlikely that it's what you actually want. Would you really
> want to allow:
> 

> (jam today) "chris @ \"home\""@ (Chris's host.)public.example
> 

> for example? And would you be able to do anything with it if you did?

As I said in another post it would be interesting to see what broke when you 
tried to use an esoteric email address in the wild. Maybe when I'm bored :D.

Simon.

signature.asc
Description: OpenPGP digital signature
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Checking if email is valid

2023-11-04 Thread Michael Torrie via Python-list
On 11/4/23 02:51, Simon Connah via Python-list wrote:
> Wow. I'm half tempted to make a weird email address to see how many websites 
> get it wrong.
> 
> Thank you for the link.

Nearly all websites seem to reject simple correct email addresses such
as myemail+sometext@example.domain.  I like to use this kind of email
address when I can to help me filter out the inevitable spam that comes
from companies selling off my address even after claiming they won't.

So I suspect that nearly all websites are going to reject other kinds of
weird email addresses you can create that are actually correct.

-- 
https://mail.python.org/mailman/listinfo/python-list


RE: Python-list Digest, Vol 242, Issue 3

2023-11-04 Thread bart.kuijer via Python-list
I don 't understand the meaning of this mailĀ Verzonden vanaf mijn Galaxy
 Oorspronkelijk bericht Van: python-list-requ...@python.org 
Datum: 04-11-23  17:01  (GMT+01:00) Aan: python-list@python.org Onderwerp: 
Python-list Digest, Vol 242, Issue 3 Send Python-list mailing list submissions 
topython-list@python.orgTo subscribe or unsubscribe via the World Wide 
Web, visit https://mail.python.org/mailman/listinfo/python-listor, via email, 
send a message with subject or body 'help' to
python-list-request@python.orgYou can reach the person managing the list at 
python-list-owner@python.orgWhen replying, please edit your Subject line so it 
is more specificthan "Re: Contents of Python-list digest..."
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pip/pip3 confusion and keeping up to date

2023-11-04 Thread Karsten Hilbert via Python-list
Am Thu, Nov 02, 2023 at 04:07:33PM -0600 schrieb Mats Wichmann via Python-list:

> >So they now have only python3 and there is no python executable in
> >PATH.
>
> FWIW, for this you install the little stub package python-is-python3. 
> Especially if you
> want to keep a python2 installation around - "python" will still be python3 
> in this
> case.

Since you seem knowledgeable in this area: Do you know of a
resource for learning the *canonical* way of packaging a
Python application for installation via apt which

- needs some packages available via apt
- needs some packages only available via pip
- needs some packages newer than what is available via apt

?

Thanks,
Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pip/pip3 confusion and keeping up to date

2023-11-04 Thread Jon Ribbens via Python-list
On 2023-11-03, Karsten Hilbert  wrote:
> Am Thu, Nov 02, 2023 at 09:35:43PM - schrieb Jon Ribbens via Python-list:
>
> Regardless of ...
>
>> Because pip barely plays well by itself, let alone with other package
>> managers at the same time.
>
> ... being true ...
>
>> > I do only install a few things using pip.
>>
>> Are they not available in your system's package manager?
>
> ... this clearly often answers to "no" for applications of
> any complexity.
>
> Is there a suggested proper path to deal with that (Debian is
> of interest to me here) ?

Yes, as previously mentioned, use virtual environments.

These days they don't even need to be "activated". For package 'foo'
for example you could create /usr/local/lib/foo, under which you would
create a virtual environment and install the 'foo' package inside it,
and then you could do:

ln -s /usr/local/lib/foo/env/bin/foo /usr/local/bin/foo

and then you could just type 'foo' to run it.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Checking if email is valid

2023-11-04 Thread Grant Edwards via Python-list
On 2023-11-04, Michael Torrie via Python-list  wrote:
> On 11/4/23 02:51, Simon Connah via Python-list wrote:
>
>> Wow. I'm half tempted to make a weird email address to see how many
>> websites get it wrong.

In my experience, they don't have to be very weird at all.

>> Thank you for the link.
>
> Nearly all websites seem to reject simple correct email addresses
> such as myemail+sometext@example.domain.  I like to use this kind of
> email address when I can to help me filter out the inevitable spam
> that comes from companies selling off my address even after claiming
> they won't.

I've always suspected that's intentional. They refuse those sorts of
e-mail addresses because they know that's what they are used for. If
they allowed "plus suffixed" e-mail addresses, then all the crap they
want to send to you would go into /dev/null where it belongs -- and we
can't have that!

> So I suspect that nearly all websites are going to reject other
> kinds of weird email addresses you can create that are actually
> correct.

Definitely. Syntactic e-mail address "validation" is one of the most
useless and widely broken things on the Interwebs.  People who do
anything other than require an '@' (and optionally make you enter the
same @-containing string twice) are deluding themselves.

--
Grant
-- 
https://mail.python.org/mailman/listinfo/python-list