The following issues were found
src/third_party/wiredtiger/test/suite/test_alter02.py
29 issues
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import sys, wiredtiger, wttest
from wtscenario import make_scenarios
# test_alter02.py
# Smoke-test the session alter operations.
class test_alter02(wttest.WiredTigerTestCase):
Reported by Pylint.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import sys, wiredtiger, wttest
from wtscenario import make_scenarios
# test_alter02.py
# Smoke-test the session alter operations.
class test_alter02(wttest.WiredTigerTestCase):
Reported by Pylint.
Line: 69
Column: 35
scenarios = make_scenarios(conn_log, types, tables, reopen)
# This test varies the log setting. Override the standard methods.
def setUpConnectionOpen(self, dir):
return None
def setUpSessionOpen(self, conn):
return None
def ConnectionOpen(self):
self.home = '.'
Reported by Pylint.
Line: 69
Column: 5
scenarios = make_scenarios(conn_log, types, tables, reopen)
# This test varies the log setting. Override the standard methods.
def setUpConnectionOpen(self, dir):
return None
def setUpSessionOpen(self, conn):
return None
def ConnectionOpen(self):
self.home = '.'
Reported by Pylint.
Line: 69
Column: 35
scenarios = make_scenarios(conn_log, types, tables, reopen)
# This test varies the log setting. Override the standard methods.
def setUpConnectionOpen(self, dir):
return None
def setUpSessionOpen(self, conn):
return None
def ConnectionOpen(self):
self.home = '.'
Reported by Pylint.
Line: 74
Column: 9
def setUpSessionOpen(self, conn):
return None
def ConnectionOpen(self):
self.home = '.'
conn_params = 'create,log=(archive=false,file_max=100K,%s)' % self.uselog
try:
self.conn = wiredtiger.wiredtiger_open(self.home, conn_params)
Reported by Pylint.
Line: 80
Column: 9
try:
self.conn = wiredtiger.wiredtiger_open(self.home, conn_params)
except wiredtiger.WiredTigerError as e:
print("Failed conn at '%s' with config '%s'" % (dir, conn_params))
self.session = self.conn.open_session()
# Verify the metadata string for this URI and that its setting in the
# metadata file is correct.
Reported by Pylint.
Line: 116
Column: 13
count = 0
while c.next() == 0:
# lsn.file, lsn.offset, opcount
keys = c.get_key()
# txnid, rectype, optype, fileid, logrec_key, logrec_value
values = c.get_value()
if self.value.encode() in values[5]: # logrec_value
count += 1
self.assertFalse(self.value2.encode() in values[5])
Reported by Pylint.
Line: 138
Column: 13
# Set up logging for the connection.
if self.conncreate:
self.uselog = 'enabled=true'
conn_logged = 1
else:
self.uselog = 'enabled=false'
conn_logged = 0
self.ConnectionOpen()
Reported by Pylint.
Line: 141
Column: 13
self.uselog = 'enabled=true'
conn_logged = 1
else:
self.uselog = 'enabled=false'
conn_logged = 0
self.ConnectionOpen()
# Set up logging for the table.
if self.logcreate:
Reported by Pylint.
src/third_party/IntelRDFPMathLib20U1/LIBRARY/src/bid128_noncomp.c
29 issues
Line: 119
CWE codes:
758
if (C1_hi == 0) {
if (C1_lo >= 0x0020000000000000ull) { // x >= 2^53
// split the 64-bit value in two 32-bit halves to avoid rounding errors
tmp1.d = (double) (C1_lo >> 32); // exact conversion
x_nr_bits =
33 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
} else { // if x < 2^53
tmp1.d = (double) C1_lo; // exact conversion
x_nr_bits =
Reported by Cppcheck.
Line: 121
CWE codes:
758
// split the 64-bit value in two 32-bit halves to avoid rounding errors
tmp1.d = (double) (C1_lo >> 32); // exact conversion
x_nr_bits =
33 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
} else { // if x < 2^53
tmp1.d = (double) C1_lo; // exact conversion
x_nr_bits =
1 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
}
Reported by Cppcheck.
Line: 125
CWE codes:
758
} else { // if x < 2^53
tmp1.d = (double) C1_lo; // exact conversion
x_nr_bits =
1 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
}
} else { // C1_hi != 0 => nr. bits = 64 + nr_bits (C1_hi)
tmp1.d = (double) C1_hi; // exact conversion
x_nr_bits =
65 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
Reported by Cppcheck.
Line: 130
CWE codes:
758
} else { // C1_hi != 0 => nr. bits = 64 + nr_bits (C1_hi)
tmp1.d = (double) C1_hi; // exact conversion
x_nr_bits =
65 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
}
q = bid_nr_digits[x_nr_bits - 1].digits;
if (q == 0) {
q = bid_nr_digits[x_nr_bits - 1].digits1;
if (C1_hi > bid_nr_digits[x_nr_bits - 1].threshold_hi ||
Reported by Cppcheck.
Line: 140
CWE codes:
758
C1_lo >= bid_nr_digits[x_nr_bits - 1].threshold_lo))
q++;
}
exp = (int) (x_exp >> 49) - 6176;
// test for subnormal values of x
if (exp + q <= -6143) {
res = 0;
BID_RETURN (res);
} else {
Reported by Cppcheck.
Line: 199
CWE codes:
758
if (C1_hi == 0) {
if (C1_lo >= 0x0020000000000000ull) { // x >= 2^53
// split the 64-bit value in two 32-bit halves to avoid rounding errors
tmp1.d = (double) (C1_lo >> 32); // exact conversion
x_nr_bits =
33 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
} else { // if x < 2^53
tmp1.d = (double) C1_lo; // exact conversion
x_nr_bits =
Reported by Cppcheck.
Line: 201
CWE codes:
758
// split the 64-bit value in two 32-bit halves to avoid rounding errors
tmp1.d = (double) (C1_lo >> 32); // exact conversion
x_nr_bits =
33 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
} else { // if x < 2^53
tmp1.d = (double) C1_lo; // exact conversion
x_nr_bits =
1 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
}
Reported by Cppcheck.
Line: 205
CWE codes:
758
} else { // if x < 2^53
tmp1.d = (double) C1_lo; // exact conversion
x_nr_bits =
1 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
}
} else { // C1_hi != 0 => nr. bits = 64 + nr_bits (C1_hi)
tmp1.d = (double) C1_hi; // exact conversion
x_nr_bits =
65 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
Reported by Cppcheck.
Line: 210
CWE codes:
758
} else { // C1_hi != 0 => nr. bits = 64 + nr_bits (C1_hi)
tmp1.d = (double) C1_hi; // exact conversion
x_nr_bits =
65 + ((((unsigned int) (tmp1.ui64 >> 52)) & 0x7ff) - 0x3ff);
}
q = bid_nr_digits[x_nr_bits - 1].digits;
if (q == 0) {
q = bid_nr_digits[x_nr_bits - 1].digits1;
if (C1_hi > bid_nr_digits[x_nr_bits - 1].threshold_hi ||
Reported by Cppcheck.
Line: 220
CWE codes:
758
C1_lo >= bid_nr_digits[x_nr_bits - 1].threshold_lo))
q++;
}
exp = (int) (x_exp >> 49) - 6176;
// test for subnormal values of x
if (exp + q <= -6143) {
res = 1;
} else {
res = 0;
Reported by Cppcheck.
src/third_party/variant-1.4.0/support/vs.py
29 issues
Line: 51
Column: 31
os.chdir('..')
pprint.pprint(result)
exit(any(status != 0 for d in result.itervalues() for status in d.itervalues()))
Reported by Pylint.
Line: 1
Column: 1
# MPark.Variant
#
# Copyright Michael Park, 2015-2017
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
import os
import pprint
Reported by Pylint.
Line: 10
Suggestion:
https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess
import os
import pprint
import subprocess
result = {}
std_flags = os.getenv('STDFLAGS')
for std_flag in std_flags.split() if std_flags is not None else ['']:
Reported by Bandit.
Line: 16
Column: 1
std_flags = os.getenv('STDFLAGS')
for std_flag in std_flags.split() if std_flags is not None else ['']:
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
config = '{}-{}'.format(filter(str.isalnum, std_flag), exceptions)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
Reported by Pylint.
Line: 17
Column: 1
std_flags = os.getenv('STDFLAGS')
for std_flag in std_flags.split() if std_flags is not None else ['']:
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
config = '{}-{}'.format(filter(str.isalnum, std_flag), exceptions)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = {
Reported by Pylint.
Line: 18
Column: 1
for std_flag in std_flags.split() if std_flags is not None else ['']:
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
config = '{}-{}'.format(filter(str.isalnum, std_flag), exceptions)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = {
'Configure': None,
Reported by Pylint.
Line: 18
Column: 5
for std_flag in std_flags.split() if std_flags is not None else ['']:
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
config = '{}-{}'.format(filter(str.isalnum, std_flag), exceptions)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = {
'Configure': None,
Reported by Pylint.
Line: 19
Column: 1
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
config = '{}-{}'.format(filter(str.isalnum, std_flag), exceptions)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = {
'Configure': None,
'Build-Debug': None,
Reported by Pylint.
Line: 19
Column: 5
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
config = '{}-{}'.format(filter(str.isalnum, std_flag), exceptions)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = {
'Configure': None,
'Build-Debug': None,
Reported by Pylint.
Line: 20
Column: 1
for exceptions in ['OFF', 'ON']:
config = '{}-{}'.format(filter(str.isalnum, std_flag), exceptions)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = {
'Configure': None,
'Build-Debug': None,
'Build-Release': None,
Reported by Pylint.
src/third_party/wiredtiger/test/suite/test_cursor_compare.py
29 issues
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
from wtdataset import SimpleDataSet, ComplexDataSet, ComplexLSMDataSet
from wtscenario import filter_scenarios, make_scenarios
# Test cursor comparisons.
class test_cursor_comparison(wttest.WiredTigerTestCase):
Reported by Pylint.
Line: 1
Column: 1
#!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
Reported by Pylint.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger, wttest
from wtdataset import SimpleDataSet, ComplexDataSet, ComplexLSMDataSet
from wtscenario import filter_scenarios, make_scenarios
# Test cursor comparisons.
class test_cursor_comparison(wttest.WiredTigerTestCase):
Reported by Pylint.
Line: 34
Column: 1
from wtscenario import filter_scenarios, make_scenarios
# Test cursor comparisons.
class test_cursor_comparison(wttest.WiredTigerTestCase):
name = 'test_compare'
types = [
('file', dict(type='file:', lsm=False, dataset=SimpleDataSet)),
('lsm', dict(type='table:', lsm=True, dataset=ComplexLSMDataSet)),
Reported by Pylint.
Line: 34
Column: 1
from wtscenario import filter_scenarios, make_scenarios
# Test cursor comparisons.
class test_cursor_comparison(wttest.WiredTigerTestCase):
name = 'test_compare'
types = [
('file', dict(type='file:', lsm=False, dataset=SimpleDataSet)),
('lsm', dict(type='table:', lsm=True, dataset=ComplexLSMDataSet)),
Reported by Pylint.
Line: 51
Column: 5
scenarios = filter_scenarios(make_scenarios(types, keyfmt),
lambda name, d: not (d['lsm'] and d['keyfmt'] == 'r'))
def test_cursor_comparison(self):
uri = self.type + 'compare'
uriX = self.type + 'compareX'
# Build the object.
ds = self.dataset(self, uri, 100, key_format=self.keyfmt)
Reported by Pylint.
Line: 51
Column: 5
scenarios = filter_scenarios(make_scenarios(types, keyfmt),
lambda name, d: not (d['lsm'] and d['keyfmt'] == 'r'))
def test_cursor_comparison(self):
uri = self.type + 'compare'
uriX = self.type + 'compareX'
# Build the object.
ds = self.dataset(self, uri, 100, key_format=self.keyfmt)
Reported by Pylint.
Line: 53
Column: 9
def test_cursor_comparison(self):
uri = self.type + 'compare'
uriX = self.type + 'compareX'
# Build the object.
ds = self.dataset(self, uri, 100, key_format=self.keyfmt)
dsX = self.dataset(self, uriX, 100, key_format=self.keyfmt)
ds.populate()
Reported by Pylint.
Line: 56
Column: 9
uriX = self.type + 'compareX'
# Build the object.
ds = self.dataset(self, uri, 100, key_format=self.keyfmt)
dsX = self.dataset(self, uriX, 100, key_format=self.keyfmt)
ds.populate()
dsX.populate()
if self.type == 'file:':
ix0_0 = None
Reported by Pylint.
Line: 57
Column: 9
# Build the object.
ds = self.dataset(self, uri, 100, key_format=self.keyfmt)
dsX = self.dataset(self, uriX, 100, key_format=self.keyfmt)
ds.populate()
dsX.populate()
if self.type == 'file:':
ix0_0 = None
ix0_1 = None
Reported by Pylint.
src/third_party/boost/boost/asio/impl/read.hpp
29 issues
Line: 67
Column: 13
CWE codes:
120
20
template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
typename constraint<
is_mutable_buffer_sequence<MutableBufferSequence>::value
>::type)
{
Reported by FlawFinder.
Line: 79
Column: 20
CWE codes:
120
20
}
template <typename SyncReadStream, typename MutableBufferSequence>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
typename constraint<
is_mutable_buffer_sequence<MutableBufferSequence>::value
>::type)
{
boost::system::error_code ec;
Reported by FlawFinder.
Line: 85
Column: 35
CWE codes:
120
20
>::type)
{
boost::system::error_code ec;
std::size_t bytes_transferred = read(s, buffers, transfer_all(), ec);
boost::asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
template <typename SyncReadStream, typename MutableBufferSequence>
Reported by FlawFinder.
Line: 91
Column: 20
CWE codes:
120
20
}
template <typename SyncReadStream, typename MutableBufferSequence>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
boost::system::error_code& ec,
typename constraint<
is_mutable_buffer_sequence<MutableBufferSequence>::value
>::type)
{
Reported by FlawFinder.
Line: 97
Column: 10
CWE codes:
120
20
is_mutable_buffer_sequence<MutableBufferSequence>::value
>::type)
{
return read(s, buffers, transfer_all(), ec);
}
template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
Reported by FlawFinder.
Line: 102
Column: 20
CWE codes:
120
20
template <typename SyncReadStream, typename MutableBufferSequence,
typename CompletionCondition>
inline std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
CompletionCondition completion_condition,
typename constraint<
is_mutable_buffer_sequence<MutableBufferSequence>::value
>::type)
{
Reported by FlawFinder.
Line: 109
Column: 35
CWE codes:
120
20
>::type)
{
boost::system::error_code ec;
std::size_t bytes_transferred = read(s, buffers,
BOOST_ASIO_MOVE_CAST(CompletionCondition)(completion_condition), ec);
boost::asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
Reported by FlawFinder.
Line: 119
Column: 13
CWE codes:
120
20
template <typename SyncReadStream, typename DynamicBuffer_v1,
typename CompletionCondition>
std::size_t read(SyncReadStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
CompletionCondition completion_condition, boost::system::error_code& ec,
typename constraint<
is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
>::type,
Reported by FlawFinder.
Line: 154
Column: 20
CWE codes:
120
20
}
template <typename SyncReadStream, typename DynamicBuffer_v1>
inline std::size_t read(SyncReadStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
typename constraint<
is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
>::type,
typename constraint<
Reported by FlawFinder.
Line: 164
Column: 35
CWE codes:
120
20
>::type)
{
boost::system::error_code ec;
std::size_t bytes_transferred = read(s,
BOOST_ASIO_MOVE_CAST(DynamicBuffer_v1)(buffers), transfer_all(), ec);
boost::asio::detail::throw_error(ec, "read");
return bytes_transferred;
}
Reported by FlawFinder.
src/third_party/variant-1.4.0/support/ninja.py
29 issues
Line: 46
Column: 31
os.chdir('..')
pprint.pprint(result)
exit(any(status != 0 for d in result.itervalues() for status in d.itervalues()))
Reported by Pylint.
Line: 1
Column: 1
# MPark.Variant
#
# Copyright Michael Park, 2015-2017
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
import os
import pprint
Reported by Pylint.
Line: 10
Suggestion:
https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess
import os
import pprint
import subprocess
result = {}
std_flags = os.getenv('STDFLAGS')
for std_flag in std_flags.split() if std_flags is not None else ['']:
Reported by Bandit.
Line: 16
Column: 1
std_flags = os.getenv('STDFLAGS')
for std_flag in std_flags.split() if std_flags is not None else ['']:
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
for build_type in ['Debug', 'Release']:
config = '{}-{}-{}'.format(
filter(str.isalnum, std_flag), exceptions, build_type)
build_dir = 'build-{}'.format(config)
Reported by Pylint.
Line: 17
Column: 1
std_flags = os.getenv('STDFLAGS')
for std_flag in std_flags.split() if std_flags is not None else ['']:
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
for build_type in ['Debug', 'Release']:
config = '{}-{}-{}'.format(
filter(str.isalnum, std_flag), exceptions, build_type)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
Reported by Pylint.
Line: 18
Column: 1
for std_flag in std_flags.split() if std_flags is not None else ['']:
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
for build_type in ['Debug', 'Release']:
config = '{}-{}-{}'.format(
filter(str.isalnum, std_flag), exceptions, build_type)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
Reported by Pylint.
Line: 19
Column: 1
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
for build_type in ['Debug', 'Release']:
config = '{}-{}-{}'.format(
filter(str.isalnum, std_flag), exceptions, build_type)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = { 'Configure': None, 'Build': None, 'Test': None }
Reported by Pylint.
Line: 19
Column: 7
os.environ['CXXFLAGS'] = std_flag
for exceptions in ['OFF', 'ON']:
for build_type in ['Debug', 'Release']:
config = '{}-{}-{}'.format(
filter(str.isalnum, std_flag), exceptions, build_type)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = { 'Configure': None, 'Build': None, 'Test': None }
Reported by Pylint.
Line: 21
Column: 1
for build_type in ['Debug', 'Release']:
config = '{}-{}-{}'.format(
filter(str.isalnum, std_flag), exceptions, build_type)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = { 'Configure': None, 'Build': None, 'Test': None }
tests = os.environ['TESTS'].split()
Reported by Pylint.
Line: 21
Column: 7
for build_type in ['Debug', 'Release']:
config = '{}-{}-{}'.format(
filter(str.isalnum, std_flag), exceptions, build_type)
build_dir = 'build-{}'.format(config)
os.mkdir(build_dir)
os.chdir(build_dir)
result[config] = { 'Configure': None, 'Build': None, 'Test': None }
tests = os.environ['TESTS'].split()
Reported by Pylint.
src/third_party/wiredtiger/test/suite/test_timestamp11.py
29 issues
Line: 34
Column: 1
#
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios
class test_timestamp11(wttest.WiredTigerTestCase, suite_subprocess):
session_config = 'isolation=snapshot'
Reported by Pylint.
Line: 34
Column: 1
#
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios
class test_timestamp11(wttest.WiredTigerTestCase, suite_subprocess):
session_config = 'isolation=snapshot'
Reported by Pylint.
Line: 98
Column: 9
c = self.session.open_cursor(uri)
self.session.begin_transaction()
self.assertEquals(c[key], 'value2')
self.assertEquals(c[key2], 'valueNOTS')
self.session.commit_transaction()
c.close()
c = self.session.open_cursor(uri)
Reported by Pylint.
Line: 99
Column: 9
c = self.session.open_cursor(uri)
self.session.begin_transaction()
self.assertEquals(c[key], 'value2')
self.assertEquals(c[key2], 'valueNOTS')
self.session.commit_transaction()
c.close()
c = self.session.open_cursor(uri)
self.session.begin_transaction('read_timestamp=' + stable_ts)
Reported by Pylint.
Line: 105
Column: 9
c = self.session.open_cursor(uri)
self.session.begin_transaction('read_timestamp=' + stable_ts)
self.assertEquals(c[key], 'value2')
self.assertEquals(c[key2], 'valueNOTS')
self.session.commit_transaction()
c.close()
#
Reported by Pylint.
Line: 106
Column: 9
c = self.session.open_cursor(uri)
self.session.begin_transaction('read_timestamp=' + stable_ts)
self.assertEquals(c[key], 'value2')
self.assertEquals(c[key2], 'valueNOTS')
self.session.commit_transaction()
c.close()
#
# Repeat but swapping the keys using or not using timestamps.
Reported by Pylint.
Line: 132
Column: 9
# Without a timestamp. We should see the latest value for each.
c = self.session.open_cursor(uri)
self.session.begin_transaction()
self.assertEquals(c[key], 'valueNOTS')
self.assertEquals(c[key2], 'value5')
self.session.commit_transaction()
c.close()
# With timestamp 2. Both non-timestamped values override the original
Reported by Pylint.
Line: 133
Column: 9
c = self.session.open_cursor(uri)
self.session.begin_transaction()
self.assertEquals(c[key], 'valueNOTS')
self.assertEquals(c[key2], 'value5')
self.session.commit_transaction()
c.close()
# With timestamp 2. Both non-timestamped values override the original
# value at timestamp 2.
Reported by Pylint.
Line: 141
Column: 9
# value at timestamp 2.
c = self.session.open_cursor(uri)
self.session.begin_transaction('read_timestamp=' + stable_ts)
self.assertEquals(c[key], 'valueNOTS')
self.assertEquals(c[key2], 'valueNOTS')
self.session.commit_transaction()
c.close()
# With timestamp 5. We rolled back the first one and never re-inserted
Reported by Pylint.
Line: 142
Column: 9
c = self.session.open_cursor(uri)
self.session.begin_transaction('read_timestamp=' + stable_ts)
self.assertEquals(c[key], 'valueNOTS')
self.assertEquals(c[key2], 'valueNOTS')
self.session.commit_transaction()
c.close()
# With timestamp 5. We rolled back the first one and never re-inserted
# one at that timestamp and inserted without a timestamp. For the second
Reported by Pylint.
src/third_party/wiredtiger/test/suite/test_backup14.py
29 issues
Line: 129
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b605_start_process_with_a_shell.html
table_list = 'tablelist.txt'
# Assert if the dropped table (table:main) exists in the incremental folder.
self.runWt(['-R', '-h', self.home, 'list'], outfilename=table_list)
ret = os.system("grep " + self.uri + " " + table_list)
self.assertNotEqual(ret, 0, self.uri + " dropped, but table exists in " + self.home)
self.setup_directories(self.home_incr, self.home_full)
#
# This function will create previously dropped table uri (table:main) and add different content to
Reported by Bandit.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger
import os, shutil
from wtbackup import backup_base
from wtdataset import simple_key
from wtscenario import make_scenarios
import glob
Reported by Pylint.
Line: 195
Column: 5
self.insert_bulk_data()
if __name__ == '__main__':
wttest.run()
Reported by Pylint.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger
import os, shutil
from wtbackup import backup_base
from wtdataset import simple_key
from wtscenario import make_scenarios
import glob
Reported by Pylint.
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
import wiredtiger
import os, shutil
from wtbackup import backup_base
from wtdataset import simple_key
from wtscenario import make_scenarios
import glob
Reported by Pylint.
Line: 32
Column: 1
import wiredtiger
import os, shutil
from wtbackup import backup_base
from wtdataset import simple_key
from wtscenario import make_scenarios
import glob
# test_backup14.py
# Test cursor backup with a block-based incremental cursor.
Reported by Pylint.
Line: 33
Column: 1
import os, shutil
from wtbackup import backup_base
from wtdataset import simple_key
from wtscenario import make_scenarios
import glob
# test_backup14.py
# Test cursor backup with a block-based incremental cursor.
class test_backup14(backup_base):
Reported by Pylint.
Line: 34
Column: 1
from wtbackup import backup_base
from wtdataset import simple_key
from wtscenario import make_scenarios
import glob
# test_backup14.py
# Test cursor backup with a block-based incremental cursor.
class test_backup14(backup_base):
conn_config='cache_size=1G,log=(enabled,file_max=100K)'
Reported by Pylint.
Line: 74
Column: 17
num = j + (i * self.nops)
key = self.bigkey + str(num)
c.set_key(key)
self.assertEquals(c.remove(), 0)
c.close()
# Increase the counter so that later backups have unique ids.
self.bkup_id += 1
#
Reported by Pylint.
Line: 173
Column: 9
def test_backup14(self):
os.mkdir(self.bkp_home)
self.home = self.bkp_home
self.session.create(self.uri, "key_format=S,value_format=S")
self.setup_directories(self.home_incr, self.home_full)
self.pr('*** Add data, checkpoint, take backups and validate ***')
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Platform/__init__.py
29 issues
Line: 69
Column: 18
"""
osname = os.name
if osname == 'java':
osname = os._osType
if osname == 'posix':
if sys.platform == 'cygwin':
return 'cygwin'
elif sys.platform.find('irix') != -1:
return 'irix'
Reported by Pylint.
Line: 109
Column: 32
except ImportError:
try:
import zipimport
importer = zipimport.zipimporter( sys.modules['SCons.Platform'].__path__[0] )
mod = importer.load_module(full_name)
except ImportError:
raise SCons.Errors.UserError("No platform named '%s'" % name)
setattr(SCons.Platform, name, mod)
return sys.modules[full_name]
Reported by Pylint.
Line: 69
Column: 18
"""
osname = os.name
if osname == 'java':
osname = os._osType
if osname == 'posix':
if sys.platform == 'cygwin':
return 'cygwin'
elif sys.platform.find('irix') != -1:
return 'irix'
Reported by Pylint.
Line: 101
Suggestion:
https://bandit.readthedocs.io/en/latest/blacklists/blacklist_calls.html#b307-eval
full_name = 'SCons.Platform.' + name
if full_name not in sys.modules:
if os.name == 'java':
eval(full_name)
else:
try:
# the specific platform module is a relative import
mod = importlib.import_module("." + name, __name__)
except ImportError:
Reported by Bandit.
Line: 101
Column: 13
full_name = 'SCons.Platform.' + name
if full_name not in sys.modules:
if os.name == 'java':
eval(full_name)
else:
try:
# the specific platform module is a relative import
mod = importlib.import_module("." + name, __name__)
except ImportError:
Reported by Pylint.
Line: 112
Column: 21
importer = zipimport.zipimporter( sys.modules['SCons.Platform'].__path__[0] )
mod = importer.load_module(full_name)
except ImportError:
raise SCons.Errors.UserError("No platform named '%s'" % name)
setattr(SCons.Platform, name, mod)
return sys.modules[full_name]
def DefaultToolList(platform, env):
Reported by Pylint.
Line: 233
Column: 3
os.write(fd, bytearray(join_char.join(args) + "\n",'utf-8'))
os.close(fd)
# XXX Using the SCons.Action.print_actions value directly
# like this is bogus, but expedient. This class should
# really be rewritten as an Action that defines the
# __call__() and strfunction() methods and lets the
# normal action-execution logic handle whether or not to
# print/execute the action. The problem, though, is all
Reported by Pylint.
Line: 279
Column: 22
# use the default action cmd line print if user did not supply one
if not print_func:
action = SCons.Action._ActionAction()
action.print_cmd_line(cmdstr, target, source, env)
else:
print_func(cmdstr, target, source, env)
Reported by Pylint.
Line: 46
Column: 1
#
from __future__ import print_function
__revision__ = "src/engine/SCons/Platform/__init__.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import SCons.compat
import importlib
import os
Reported by Pylint.
Line: 50
Column: 1
import SCons.compat
import importlib
import os
import sys
import tempfile
import SCons.Errors
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/MSCommon/sdk.py
29 issues
Line: 36
Column: 1
import SCons.Errors
import SCons.Util
from . import common
debug = common.debug
# SDK Checks. This is of course a mess as everything else on MS platforms. Here
# is what we do to detect the SDK:
Reported by Pylint.
Line: 78
Column: 32
debug('find_sdk_dir(): can not read registry')
return None
hkey = self.HKEY_FMT % self.hkey_data
debug('find_sdk_dir(): checking registry:{}'.format(hkey))
try:
sdk_dir = common.read_reg(hkey)
except SCons.Util.WinError as e:
Reported by Pylint.
Line: 78
Column: 16
debug('find_sdk_dir(): can not read registry')
return None
hkey = self.HKEY_FMT % self.hkey_data
debug('find_sdk_dir(): checking registry:{}'.format(hkey))
try:
sdk_dir = common.read_reg(hkey)
except SCons.Util.WinError as e:
Reported by Pylint.
Line: 93
Column: 37
debug('find_sdk_dir(): {} not on file system'.format(sdk_dir))
return None
ftc = os.path.join(sdk_dir, self.sanity_check_file)
if not os.path.exists(ftc):
debug("find_sdk_dir(): sanity check {} not found".format(ftc))
return None
return sdk_dir
Reported by Pylint.
Line: 124
Column: 14
debug("get_sdk_vc_script():arch_string:%s host_arch:%s target_arch:%s"%(arch_string,
host_arch,
target_arch))
file=self.vc_setup_scripts.get(arch_string,None)
debug("get_sdk_vc_script():file:%s"%file)
return file
class WindowsSDK(SDKDefinition):
"""
Reported by Pylint.
Line: 144
Column: 26
HKEY_FMT = r'Software\Microsoft\MicrosoftSDK\InstalledSDKS\%s\Install Dir'
def __init__(self, *args, **kw):
SDKDefinition.__init__(self, *args, **kw)
self.hkey_data = self.uuid
#
# The list of VC initialization scripts installed by the SDK
# These should be tried if the vcvarsall.bat TARGET_ARCH fails
preSDK61VCSetupScripts = { 'x86' : r'bin\vcvars32.bat',
Reported by Pylint.
Line: 375
Column: 9
debug('mssdk_setup_env thinks msvs_version is None')
return
msvs_version = env.subst(msvs_version)
from . import vs
msvs = vs.get_vs_by_version(msvs_version)
debug('mssdk_setup_env:msvs is :%s'%msvs)
if not msvs:
debug('mssdk_setup_env: no VS version detected, bailingout:%s'%msvs)
return
Reported by Pylint.
Line: 83
Column: 9
try:
sdk_dir = common.read_reg(hkey)
except SCons.Util.WinError as e:
debug('find_sdk_dir(): no SDK registry key {}'.format(repr(hkey)))
return None
debug('find_sdk_dir(): Trying SDK Dir: {}'.format(sdk_dir))
Reported by Pylint.
Line: 106
Column: 13
return self._sdk_dir
except AttributeError:
sdk_dir = self.find_sdk_dir()
self._sdk_dir = sdk_dir
return sdk_dir
def get_sdk_vc_script(self,host_arch, target_arch):
""" Return the script to initialize the VC compiler installed by SDK
"""
Reported by Pylint.
Line: 287
Column: 5
InstalledSDKMap = None
def get_installed_sdks():
global InstalledSDKList
global InstalledSDKMap
debug('get_installed_sdks()')
if InstalledSDKList is None:
InstalledSDKList = []
InstalledSDKMap = {}
Reported by Pylint.