Paul Moore wrote:
On Tue, 6 Aug 2019 at 17:39, Matt Billenstein matt@vazor.com wrote:
On Mon, Aug 05, 2019 at 04:22:50AM -0000, raymond.hettinger@gmail.com wrote: This once seemed like a reasonable and innocuous idea to me; however, I've been using the 3.8 beta heavily for a month and no longer think it is a good idea. The warning crops up frequently, often due to third-party packages (such as docutils and bottle) that users can't easily do anything about. Perhaps those packages could be flagged now via pylint and problems raised with the respective package maintainers before the actual 3.8 release? Checking the top 100 or top 1000 packages on PyPI? I don't see issues reported in the bug trackers for docutils and
bottle. Maybe as a start, someone could raise issues there? And any other projects Raymond encountered issues with? If nothing else, it's polite to give these projects a warning now that they should be stricter about how they use escape sequences, because the core devs intend to deprecate and ultimately remove the current permissive behaviour. That's what the 3.8 betas are for, after all. If the feedback from bug reports like this is that projects consider it an unacceptable burden to change, then maybe we would then rethink the timescales of the deprecation, or even whether we should do it at all. If they just release a quick fix, maybe we're worrying over the wrong thing here?
I think this is a good example of how the community is not running tests with warnings on and making sure that their code is warnings-free. This warning has existed for at least one full release and fixing it doesn't require some crazy work-around for backwards compatibility, and so this tells me people are simply either ignoring the warnings or they are not aware of them. If it's the case that people are choosing to ignore warnings then that's on them and there's not much we can do there. But my suspicion is it's the latter case of people simply not thinking about running with warnings on and making sure to check for them. For instance, are people running their CI with warnings turned on? How about making sure to check the output of their CI to make sure there are no warnings? Or even better, how many people are running CI with warnings turned into exceptions? My guess is all of this is rather low because people are probably just doing `pytest` without thinking of turning on warnings as exceptions to trigger a CI failure and are only looking for CI passing versus checking its output. Quick, how many pytest users here know what CLI arg to pass to pytest to have it turn warnings into exceptions? The answer is `-W` with the same type of argument as `python` takes and I had to look that up myself. So this seems to show a communication issue. In this specific instance I'm torn because this isn't a new thing and maybe we need to shock people into starting to care about warnings? Or maybe we should make a concerted effort in this beta cycle to get people to really test their code by telling them they probably have a warning hiding in their code that they don't know about and if we don't see better uptake we hold off on a release with the SyntaxWarning and make a **really** big push for people to run their tests under Python 3.8 with warnings flipped on in some fashion and we don't back down in 3.9?