Please find attached a patch for the issue.

On Sat, 28 Dec 2019 09:03:44 +0100 =?ISO-8859-1?Q?J=F6rg_Frings-F=FCrst?=
<debian@jff.email> wrote:
> Source: mongo-cxx-driver-legacy
> Version: 1.1.3-3
> Severity: important
> Usertags: scons_ftbfs
>
>
> Hello,
>
> in the context of the change to Python3 also Scons was revised. With
> the current version 3.1.2-1 from Experimental the changeover is
> finished so far.
>
> However, an error occurred while building your package. The build log
> is attached.
>
> Please check it and fix the error.
>
> CU
> Jörg
>
> --
> New:
> GPG Fingerprint: 63E0 075F C8D4 3ABB 35AB  30EE 09F8 9F3C 8CA1 D25D
> GPG key (long) : 09F89F3C8CA1D25D
> GPG Key        : 8CA1D25D
> CAcert Key S/N : 0E:D4:56
>
> Old pgp Key: BE581B6E (revoked since 2014-12-31).
>
> Jörg Frings-Fürst
> D-54470 Lieser
>
>
> git:      https://jff.email/cgit/
>
> Threema:  SYR8SJXB
> Wire:     @joergfringsfuerst
> Skype:    joergpenguin
> Ring:     jff
> Telegram: @joergfringsfuerst
>
>
> My wish list:
>  - Please send me a picture from the nature at your home.
>
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 mongo-cxx-driver-legacy (1.1.3-3.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Fix FTBS with python3 (Closes: #947569)
Author: Christophe Trophime <christophe.troph...@lncmi.cnrs.fr>
Bug-Debian: https://bugs.debian.org/947569

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2020-03-04

--- mongo-cxx-driver-legacy-1.1.3.orig/SConstruct
+++ mongo-cxx-driver-legacy-1.1.3/SConstruct
@@ -13,7 +13,7 @@ import sys
 import textwrap
 import types
 import urllib
-import urllib2
+#import urllib2
 
 import buildscripts.utils
 import buildscripts.docs
@@ -389,7 +389,7 @@ SConsignFile(str(sconsDataDir.File('scon
 def printLocalInfo():
     import sys, SCons
     print( "scons version: " + SCons.__version__ )
-    print( "python version: " + " ".join( [ `i` for i in sys.version_info ] ) )
+    print( "python version: " + " ".join( [ str(i) for i in sys.version_info ] ) )
 
 printLocalInfo()
 
@@ -931,7 +931,7 @@ if debugBuild:
     env.Append( CPPDEFINES=["MONGO_DEBUG_BUILD"] );
 
 try:
-    umask = os.umask(022)
+    umask = os.umask(0o22)
 except OSError:
     pass
 
@@ -1125,7 +1125,7 @@ def doConfigure(myenv):
         # to make them real errors.
         cloned.Append(CCFLAGS=['-Werror'])
         conf = Configure(cloned, help=False, custom_tests = {
-                'CheckFlag' : lambda(ctx) : CheckFlagTest(ctx, tool, extension, flag)
+                'CheckFlag' : lambda ctx  : CheckFlagTest(ctx, tool, extension, flag)
         })
         available = conf.CheckFlag()
         conf.Finish()
--- mongo-cxx-driver-legacy-1.1.3.orig/site_scons/buildscripts/clang_format.py
+++ mongo-cxx-driver-legacy-1.1.3/site_scons/buildscripts/clang_format.py
@@ -9,7 +9,7 @@ A script that provides:
 """
 from __future__ import print_function, absolute_import
 
-import Queue
+import queue
 import difflib
 import itertools
 import os
--- mongo-cxx-driver-legacy-1.1.3.orig/site_scons/buildscripts/lint.py
+++ mongo-cxx-driver-legacy-1.1.3/site_scons/buildscripts/lint.py
@@ -2,8 +2,8 @@
 import sys
 import codecs
 
-import cpplint
-import utils
+import buildscripts.cpplint
+import buildscripts.utils
 
 
 def run_lint( paths, nudgeOn=False ):
--- mongo-cxx-driver-legacy-1.1.3.orig/src/SConscript.client
+++ mongo-cxx-driver-legacy-1.1.3/src/SConscript.client
@@ -3,7 +3,7 @@
 # This SConscript describes build and install rules for the Mongo C++ driver and associated exmaple
 # programs.
 import buildscripts.git
-import httplib
+import http.client
 import json
 import os
 import re
@@ -415,7 +415,7 @@ if buildShared:
     mongoClientPrefixInstalls.append(mongoClientSharedLibPrefixInstall)
 
 inst = libEnv.InstallAs(['$INSTALL_DIR/include/' + x for x in clientHeaders], clientHeaders)
-libEnv.AddPostAction(inst, Chmod('$TARGET', 0644))
+libEnv.AddPostAction(inst, Chmod('$TARGET', 0o644))
 mongoClientPrefixInstalls.append(inst);
 
 
--- mongo-cxx-driver-legacy-1.1.3.orig/src/mongo/base/generate_error_codes.py
+++ mongo-cxx-driver-legacy-1.1.3/src/mongo/base/generate_error_codes.py
@@ -112,12 +112,14 @@ def has_missing_error_codes(error_codes,
 def generate_header(filename, error_codes, error_classes):
 
     enum_declarations = ',\n            '.join('%s = %s' % ec for ec in error_codes)
-    predicate_declarations = ';\n        '.join(
+    predicate_declarations = ';\n            '.join(
         'static bool is%s(Error err)' % ec[0] for ec in error_classes)
 
-    open(filename, 'wb').write(header_template % dict(
+    header = header_template % dict(
             error_code_enum_declarations=enum_declarations,
-            error_code_class_predicate_declarations=predicate_declarations))
+            error_code_class_predicate_declarations=predicate_declarations)
+
+    open(filename, 'wb').write(header.encode())
 
 def generate_source(filename, error_codes, error_classes):
     symbol_to_string_cases = ';\n        '.join(
@@ -129,11 +131,12 @@ def generate_source(filename, error_code
         'case %s: return %s' % (ec[0], ec[0]) for ec in error_codes)
     predicate_definitions = '\n    '.join(
         generate_error_class_predicate_definition(*ec) for ec in error_classes)
-    open(filename, 'wb').write(source_template % dict(
+    source = source_template % dict(
             symbol_to_string_cases=symbol_to_string_cases,
             string_to_symbol_cases=string_to_symbol_cases,
             int_to_symbol_cases=int_to_symbol_cases,
-            error_code_class_predicate_definitions=predicate_definitions))
+            error_code_class_predicate_definitions=predicate_definitions)
+    open(filename, 'wb').write(source.encode())
 
 def generate_error_class_predicate_definition(class_name, code_names):
     cases = '\n        '.join('case %s:' % c for c in code_names)
--- mongo-cxx-driver-legacy-1.1.3.orig/src/mongo/logger/log_test.cpp
+++ mongo-cxx-driver-legacy-1.1.3/src/mongo/logger/log_test.cpp
@@ -403,7 +403,7 @@ TEST_F(LogTestUnadornedEncoder, MessageE
 
 // Tests pass through of log component:
 //     log macros -> LogStreamBuilder -> MessageEventEphemeral -> MessageEventDetailsEncoder
-TEST_F(LogTestDetailsEncoder, ) {
+TEST_F(LogTestDetailsEncoder, MessageEventDetailsEncoderLogComponent) {
     globalLogDomain()->setMinimumLoggedSeverity(LogSeverity::Log());
 
     // Default log component short name should not appear in detailed log line.

Reply via email to