When compiling and generating RPM files I have noticed the following in the build logs: + /usr/lib/rpm/check-buildroot + /usr/lib/rpm/redhat/brp-compress + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip + /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump + /usr/lib/rpm/brp-python-bytecompile /usr/bin/python Bytecompiling .py files below /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6 using /usr/bin/python2.6 Compiling /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6/site-packages/samba/emulate/traffic.py ... SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/samba/emulate/traffic.py', 82, 27, 'SKIPPED_PROTOCOLS = {"smb", "smb2", "browser", "smb_netlogon"}\n')) Compiling /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6/site-packages/samba/graph.py ... SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/samba/graph.py', 91, 43, " if len(c) > 1 or c == {'*'}:\n")) Compiling /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6/site-packages/samba/tests/dns.py ... SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/samba/tests/dns.py', 1184, 55, ' return {zone_prop_ids[p.id].lower(): p.data for p in props}\n')) Compiling /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6/site-packages/samba/tests/emulate/traffic.py ... SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/samba/tests/emulate/traffic.py', 83, 34, ' ngrams = {k: sorted(v) for k, v in model.ngrams.items()}\n')) Compiling /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6/site-packages/samba/emulate/traffic.py ... SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/samba/emulate/traffic.py', 82, 27, 'SKIPPED_PROTOCOLS = {"smb", "smb2", "browser", "smb_netlogon"}\n')) Compiling /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6/site-packages/samba/graph.py ... SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/samba/graph.py', 91, 43, " if len(c) > 1 or c == {'*'}:\n")) Compiling /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6/site-packages/samba/tests/dns.py ... SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/samba/tests/dns.py', 1184, 55, ' return {zone_prop_ids[p.id].lower(): p.data for p in props}\n')) Compiling /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6/site-packages/samba/tests/emulate/traffic.py ... SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/samba/tests/emulate/traffic.py', 83, 34, ' ngrams = {k: sorted(v) for k, v in model.ngrams.items()}\n')) Bytecompiling .py files below /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib/debug/usr/lib64/python2.6 using /usr/bin/python2.6
Thanks. The 2.6 incompatibilities in samba/emulate/traffic.py are sort of deliberate, because that code is not run as part of Samba and we have focussed on 3.x compatibility in writing it. I would say WONTFIX on those ones, and their tests. The 4.9 patch attached to https://bugzilla.samba.org/show_bug.cgi?id=13837 will fix the samba/graph.py one. (on the list I erroneously said the patch was in the latest 4.9 -- actually it will be in the *next* 4.9). I think that leaves this one: Compiling /builddir/build/BUILDROOT/samba-4.9.5-1.el6.x86_64/usr/lib64/python2.6/site-packages/samba/tests/dns.py ... SyntaxError: ('invalid syntax', ('/usr/lib64/python2.6/site-packages/samba/tests/dns.py', 1184, 55, ' return {zone_prop_ids[p.id].lower(): p.data for p in props}\n')) and the ones in bug 13882 and bug 13837.
Created attachment 15047 [details] patch for dns test in python 2.6 Note, there may also be python 2.6 incompatibilities that don't manifest as syntax errors. For example the bug 13837 patches convert a use of collections.Counter to collections.defaultdict, because Counter wasn't around in 2.6. This is not a problem until runtime when the symbol needs to be resolved.
I think this needs to go in 4.9 and 4.10.
(In reply to Douglas Bagnall from comment #3) and not in master, I should have said.
(In reply to Douglas Bagnall from comment #4) Pushed to autobuild-v4-{10,9}-test.
(In reply to Karolin Seeger from comment #5) Pushed to both branches. Closing out bug report. Thanks!