On Tue, Aug 6, 2019 at 10:06 AM Neil Schemenauer <nas-python@arctrix.com> wrote:

Making it an error so soon would be mistake, IMHO.  That will break
currently working code for small benefit.  When Python was a young
language with a few thousand users, it was easier to make these
kinds of changes.  Now, we should be much more conservative and give
people a long time and a lot of warning.  Ideally, we should provide
tools to fix code if possible.

Could PyPI and pip gain the ability to warn and even fix these
issues?  Having a warning from pip at install time could be better
than a warning at import time.  If linting was built into PyPI, we
could even do a census to see how many packages would be affected by
turning it into an error.

PyPI could warn on or reject packages at upload time when they contain these kinds code compileall -> pyc time of issues.  that'd force the issue to be in front of the package owners rather than anyone else.

Similarly, automation could proactively scan existing pypi packages claiming py3 compatibility for the issue and reach out to owners.

But the issue becomes one of versions: we shouldn't be complaining about older versions of packages to the package owners.  yet people are free to list old versions or < constraints in their own packages requirements regardless of what python version they're running on.

-gps
 

On 2019-08-05, raymond.hettinger@gmail.com wrote:
> P.S. In the world of C compilers, I suspect that if the relatively
> new compiler warnings were treated as errors, the breakage would
> be widespread. Presumably that's why they haven't gone down this
> road.

The comparision with C compilers is relevant.  C and C++ represent a
fairly extreme position on not breaking working code.   E.g. K & R
style functional declarations were supported for decades.  I don't
think we need to go quite that far but also one or two releases is
not enough time.

Regards,

  Neil
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@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/V2EDFDJGXRIDMKJU3FKIWC2NDLMUZA2Y/