[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-12-03 Thread Miro Hrončok

On 16. 11. 21 1:36, Victor Stinner wrote:

As I wrote previously, the DeprecationWarning warning is only emitted
at runtime since Python 3.10.

Since my PR got 5 approvals, I just merged it:
https://github.com/python/cpython/pull/29521


No mater the number of approvals, this removal does not follow the policy.

--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/RVSMVPGFWCTFDGHKHBZ72NMXXFT2EIIU/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-28 Thread Steve Holden
Speaking as the author of the doc pages, I think I can safely say that
anyone who was smart enough to use asyncore/asychat back in the day (I used
it in "Python Web Programming") is almost certainly smart enough to have
migrated away from them long ago. They were an interesting approach to
asynchronous networking, but I think it's safe to say that world has moved
on in 20 years.

Kind regards,
Steve


On Wed, Nov 17, 2021 at 6:13 AM Kyle Stanley  wrote:

> I think it would be fine to wait just one release, until 3.12. Makes no
> substantial maintenance difference and maybe easier for users with more
> advanced notice, especially for module removal.
>
> I also wonder if maybe we should scale delay between dep -> removal based
> on maintenance burden estimate, rather than 2 versions for all. Module
> removal certainly takes more effort to adjust in code vs simple function
> name change with 1:1 replacement.
>
> --
> --Kyle R. Stanley, Python Core Developer (what is a core dev?
> )
> *Pronouns: they/them **(why is my pronoun here?*
> 
> )
>
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/F52UKISVFFGBNCL2AZ4XVX2KL35O6ZNH/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/I6LJVGXIRNATRNAQG6RFMMPKXDANSBEL/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-16 Thread Kyle Stanley
I think it would be fine to wait just one release, until 3.12. Makes no
substantial maintenance difference and maybe easier for users with more
advanced notice, especially for module removal.

I also wonder if maybe we should scale delay between dep -> removal based
on maintenance burden estimate, rather than 2 versions for all. Module
removal certainly takes more effort to adjust in code vs simple function
name change with 1:1 replacement.

-- 
--Kyle R. Stanley, Python Core Developer (what is a core dev?
)
*Pronouns: they/them **(why is my pronoun here?*

)
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/F52UKISVFFGBNCL2AZ4XVX2KL35O6ZNH/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-16 Thread Victor Stinner
I created https://github.com/python/steering-council/issues/86 to ask
for a SC exception.

Victor

On Tue, Nov 16, 2021 at 8:11 PM Brett Cannon  wrote:
>
>
>
> On Tue, Nov 16, 2021 at 3:05 AM Petr Viktorin  wrote:
>>
>> On 12. 11. 21 13:09, Victor Stinner wrote:
>> >>> It was decided to start deprecating the asyncore, asynchat and smtpd
>> >>> modules in Python 3.6 released in 2016, 5 years ago. Python 3.10 emits
>> >>> DeprecationWarning.
>> >>
>> >> Wait, only Python 3.10?
>> >> According to the policy, the warning should be there for *at least* two
>> >> releases. (That's a minimum, for removing entire modules it might make
>> >> sense to give people even more time.)
>> >
>> > The PEP 387 says "Similarly a feature cannot be removed without notice
>> > between any two consecutive releases."
>> >
>> > It is the case here. The 3 modules are marked as deprecated for 4
>> > releases in the documentation: Python 3.6, 3.7, 3.9 and 3.10. Example:
>> > https://docs.python.org/3.6/library/asyncore.html
>>
>> PEP 387 also contains a detailed process for making incompatible
>> changes, which calls for warnings to appear in at least two releases.
>>
>> Do you think the process section can be ignored? We should remove it
>> from the PEP if that's the case.
>
>
> I don't think it should be ignored and the modules got yanked prematurely. A 
> request can be made to the SC, though, to expedite the removal with only one 
> release raising an exception.



-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/VQQPBASN5WHC4GEX7HLVWF26H6CMSNYV/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-16 Thread Brett Cannon
On Tue, Nov 16, 2021 at 3:05 AM Petr Viktorin  wrote:

> On 12. 11. 21 13:09, Victor Stinner wrote:
> >>> It was decided to start deprecating the asyncore, asynchat and smtpd
> >>> modules in Python 3.6 released in 2016, 5 years ago. Python 3.10 emits
> >>> DeprecationWarning.
> >>
> >> Wait, only Python 3.10?
> >> According to the policy, the warning should be there for *at least* two
> >> releases. (That's a minimum, for removing entire modules it might make
> >> sense to give people even more time.)
> >
> > The PEP 387 says "Similarly a feature cannot be removed without notice
> > between any two consecutive releases."
> >
> > It is the case here. The 3 modules are marked as deprecated for 4
> > releases in the documentation: Python 3.6, 3.7, 3.9 and 3.10. Example:
> > https://docs.python.org/3.6/library/asyncore.html
>
> PEP 387 also contains a detailed process for making incompatible
> changes, which calls for warnings to appear in at least two releases.
>
> Do you think the process section can be ignored? We should remove it
> from the PEP if that's the case.
>

I don't think it should be ignored and the modules got yanked prematurely.
A request can be made to the SC, though, to expedite the removal with only
one release raising an exception.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/WRYNHCXYNBV2CMF6UUB6BLOSVN24HHOI/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-16 Thread Petr Viktorin

On 12. 11. 21 13:09, Victor Stinner wrote:

It was decided to start deprecating the asyncore, asynchat and smtpd
modules in Python 3.6 released in 2016, 5 years ago. Python 3.10 emits
DeprecationWarning.


Wait, only Python 3.10?
According to the policy, the warning should be there for *at least* two
releases. (That's a minimum, for removing entire modules it might make
sense to give people even more time.)


The PEP 387 says "Similarly a feature cannot be removed without notice
between any two consecutive releases."

It is the case here. The 3 modules are marked as deprecated for 4
releases in the documentation: Python 3.6, 3.7, 3.9 and 3.10. Example:
https://docs.python.org/3.6/library/asyncore.html


PEP 387 also contains a detailed process for making incompatible 
changes, which calls for warnings to appear in at least two releases.


Do you think the process section can be ignored? We should remove it 
from the PEP if that's the case.


___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/KF34VL46ZAX6FWEFMXKZASPKF65USOZT/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-15 Thread Victor Stinner
On Tue, Nov 16, 2021 at 1:15 AM Brett Cannon  wrote:
> But have they been raising exceptions for two releases?

As I wrote previously, the DeprecationWarning warning is only emitted
at runtime since Python 3.10.

Since my PR got 5 approvals, I just merged it:
https://github.com/python/cpython/pull/29521

The asyncore, asynchat and smtpd modules are now removed in Python
3.11. You should now use asyncio and aiosmtpd instead.

Note: the binhex module has also been removed in Python 3.11. It
emitted a DeprecationWarning in Python 3.9 and 3.10.

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/LVFBHVNV3INGKVVRONVRIA3Q6JIYXMZM/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-15 Thread Brett Cannon
On Fri, Nov 12, 2021 at 4:16 AM Victor Stinner  wrote:

> > > It was decided to start deprecating the asyncore, asynchat and smtpd
> > > modules in Python 3.6 released in 2016, 5 years ago. Python 3.10 emits
> > > DeprecationWarning.
> >
> > Wait, only Python 3.10?
> > According to the policy, the warning should be there for *at least* two
> > releases. (That's a minimum, for removing entire modules it might make
> > sense to give people even more time.)
>
> The PEP 387 says "Similarly a feature cannot be removed without notice
> between any two consecutive releases."
>
> It is the case here. The 3 modules are marked as deprecated for 4
> releases in the documentation: Python 3.6, 3.7, 3.9 and 3.10. Example:
> https://docs.python.org/3.6/library/asyncore.html
>

But have they been raising exceptions for two releases?
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/6VQPRSUR3XAOKQBGEIT6XA2XST6JDDFT/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-12 Thread Victor Stinner
> > It was decided to start deprecating the asyncore, asynchat and smtpd
> > modules in Python 3.6 released in 2016, 5 years ago. Python 3.10 emits
> > DeprecationWarning.
>
> Wait, only Python 3.10?
> According to the policy, the warning should be there for *at least* two
> releases. (That's a minimum, for removing entire modules it might make
> sense to give people even more time.)

The PEP 387 says "Similarly a feature cannot be removed without notice
between any two consecutive releases."

It is the case here. The 3 modules are marked as deprecated for 4
releases in the documentation: Python 3.6, 3.7, 3.9 and 3.10. Example:
https://docs.python.org/3.6/library/asyncore.html

Victor
-- 
Night gathers, and now my watch begins. It shall not end until my death.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/R5LTSKKEGDDO3TTLLZFDTAKOH3ACBTMV/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-12 Thread Petr Viktorin

On 11. 11. 21 13:31, Victor Stinner wrote:

Hi,

The asyncore module is a very old module of the Python stdlib for
asynchronous programming, usually to handle network sockets
concurrently. It's a common event loop, but its design has many flaws.

The asyncio module was added to Python 3.4 with a well designed
architecture. Twisted developers, who have like 10 to 20 years of
experience in asynchronous programming, helped to design the asyncio
API. By design, asyncio doesn't have flaws which would be really hard
to fix in asyncore and asynchat.

It was decided to start deprecating the asyncore, asynchat and smtpd
modules in Python 3.6 released in 2016, 5 years ago. Python 3.10 emits
DeprecationWarning.


Wait, only Python 3.10?
According to the policy, the warning should be there for *at least* two 
releases. (That's a minimum, for removing entire modules it might make 
sense to give people even more time.)




asynchat and smtpd are implemented with asyncore.
Open issues in asyncore, asynchat and smtpd have been closed as "wont
fix" because these modules are deprecated. These modules are basically
no longer maintained.

I propose to remove asyncore, aynchat and smtpd in Python 3.11 to
reduce the Python maintenance burden, while asyncio remains available
in stdlib and is maintained:

* asyncore and asynchat can be replaced with asyncio
* smtpd can be replaced with aiosmtpd which is based on asyncio:
https://aiosmtpd.readthedocs.io/

If someone wants to continue using asyncore, asynchat or smtpd, it's
trivial to copy Python 3.10 asyncore.py, asynchat.py and smtpd.py to
their project, and maintain these files there. Someone is also free to
continue maintaining these modules as third-party projects on PyPI.

The removal is discussed at:
https://bugs.python.org/issue28533

I wrote a PR to remove the 3 modules:
https://github.com/python/cpython/pull/29521


... in short, the intent is to move the asyncore, asynchat and smtpd
maintenance outside the Pyhon project ;-) (if anyone still use them)


Victor


___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/2Q22LYRMTYRDSCXXLM2DMVTT3VVRQF5B/
Code of Conduct: http://python.org/psf/codeofconduct/


[Python-Dev] Re: Remove asyncore, asynchat and smtpd modules

2021-11-11 Thread Guido van Rossum
Yes please. Long overdue.

On Thu, Nov 11, 2021 at 4:38 AM Victor Stinner  wrote:

> Hi,
>
> The asyncore module is a very old module of the Python stdlib for
> asynchronous programming, usually to handle network sockets
> concurrently. It's a common event loop, but its design has many flaws.
>
> The asyncio module was added to Python 3.4 with a well designed
> architecture. Twisted developers, who have like 10 to 20 years of
> experience in asynchronous programming, helped to design the asyncio
> API. By design, asyncio doesn't have flaws which would be really hard
> to fix in asyncore and asynchat.
>
> It was decided to start deprecating the asyncore, asynchat and smtpd
> modules in Python 3.6 released in 2016, 5 years ago. Python 3.10 emits
> DeprecationWarning. asynchat and smtpd are implemented with asyncore.
> Open issues in asyncore, asynchat and smtpd have been closed as "wont
> fix" because these modules are deprecated. These modules are basically
> no longer maintained.
>
> I propose to remove asyncore, aynchat and smtpd in Python 3.11 to
> reduce the Python maintenance burden, while asyncio remains available
> in stdlib and is maintained:
>
> * asyncore and asynchat can be replaced with asyncio
> * smtpd can be replaced with aiosmtpd which is based on asyncio:
> https://aiosmtpd.readthedocs.io/
>
> If someone wants to continue using asyncore, asynchat or smtpd, it's
> trivial to copy Python 3.10 asyncore.py, asynchat.py and smtpd.py to
> their project, and maintain these files there. Someone is also free to
> continue maintaining these modules as third-party projects on PyPI.
>
> The removal is discussed at:
> https://bugs.python.org/issue28533
>
> I wrote a PR to remove the 3 modules:
> https://github.com/python/cpython/pull/29521
>
>
> ... in short, the intent is to move the asyncore, asynchat and smtpd
> maintenance outside the Pyhon project ;-) (if anyone still use them)
>
>
> Victor
> --
> Night gathers, and now my watch begins. It shall not end until my death.
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/LZOOLX5EKOITW55TW7JQYKLXJUPCAJB4/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
--Guido van Rossum (python.org/~guido)
*Pronouns: he/him **(why is my pronoun here?)*

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/KLIUO6O6XSN7QOVZFQSLQMX5YJMSPMLH/
Code of Conduct: http://python.org/psf/codeofconduct/