On 10 June 2016 at 11:00, Neil Schemenauer <n...@python.ca> wrote: > On 6/10/2016 10:49 AM, Nick Coghlan wrote: >> More -3 warnings in Python 2.7 are definitely welcome (since those can >> pick up runtime behaviors that the static analysers miss), and if >> there are things the existing code converters and static analysers >> *could* detect but don't, that's a fruitful avenue for improvement as >> well. > > We are really limited on what can be done with the bytes/string issue > because in Python 2 there is no distinct type for bytes. Also, the standard > library does all sorts of unclean mixing of str and unicode so a warning > would spew a lot of noise. > > Likewise, a warning about comparison behavior (None, default ordering of > types) would also not be useful because there is so much standard library > code that would spew warnings.
Implicitly enabling those warnings universally with -3 might not be an option then, but it may be feasible to have those warnings ignored by default, and allow people to enable them selectively for their own code via the warnings module. Failing that, you may be right that there's value in a permissive Python 3.x variant as an optional compatibility testing tool (I admit I originally thought you were proposing such an environment as a production deployment target for partially migrated code, which I'd be thoroughly against, but as a tool for running a test suite or experimentally migrated instance it would be closer in spirit to the -3 switch and the static analysers - folks can use it if they think it will help them, but they don't need to worry about it if they don't need it themselves) Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com