Idea for someone: Run with python warnings in --enable-developer mode

Andrew Bartlett abartlet at
Tue Mar 10 21:21:54 UTC 2020

We got a wake-up-call with "samba fails to build with Python 3.9:
invalid open() mode U"

We need to find a way to run waf and selftest with python warnings
turned on.

It might be as simple as setting an environment variable in autobuild
or .gitlab-ci.yml, but my current gut feeling is to control it in waf
so we can see it during routine pre-commit testing.

I would like, just with our C warnings, for --disable-warnings-as-
errors to work, so we can still build older versions of Samba with
developer features on newer python (which might have deprecated things
we use).

I think we want to set PYTHONWARNINGS=error into the environment and
have waf set on itself
import warnings

Is anyone interested in taking this on?  Of course what follows would
be no doubt a pile of warning fixes, so it may not be a small task.  

Or should we put this up for GSoC?


Andrew Bartlett
Andrew Bartlett
Authentication Developer, Samba Team
Samba Development and Support, Catalyst IT - Expert Open Source

More information about the samba-technical mailing list