diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/install/class/ReadDirLoadModule.php b/install/class/ReadDirLoadModule.php index <HASH>..<HASH> 100755 --- a/install/class/ReadDirLoadModule.php +++ b/install/class/ReadDirLoadModule.php @@ -4,16 +4,19 @@ namespace BFW\Install; class ReadDirLoadModule extends ReadDirectory { + /** + * {@inheritdoc} + */ protected function fileAction($fileName, $pathToFile) { $parentAction = parent::fileAction($fileName, $pathToFile); - if ($parentAction !== '') { + if ($parentAction !== null) { return $parentAction; } - if (file_exists($pathToFile.'/bfwModulesInfos.json')) { - $this->itemList[] = $pathToFile; + if ($fileName === 'bfwModulesInfos.json') { + $this->list[] = $pathToFile; return 'break'; }
ReadDirLoadModule : Update docblock and fix on action and check file name
diff --git a/worker/setup.py b/worker/setup.py index <HASH>..<HASH> 100755 --- a/worker/setup.py +++ b/worker/setup.py @@ -125,15 +125,27 @@ else: 'twisted >= 8.0.0', 'future', ] + + # Unit test hard dependencies. + test_deps = [ + 'mock', + ] + + setup_args['tests_require'] = test_deps + setup_args['extras_require'] = { 'test': [ - 'mock', 'pep8', 'pylint==1.1.0', 'pyflakes', - ], + ] + test_deps, } + if '--help-commands' in sys.argv or 'trial' in sys.argv or 'test' in sys.argv: + setup_args['setup_requires'] = [ + 'setuptools_trial', + ] + if os.getenv('NO_INSTALL_REQS'): setup_args['install_requires'] = None setup_args['extras_require'] = None
set proper tests_require in worker
diff --git a/openquake/commonlib/readinput.py b/openquake/commonlib/readinput.py index <HASH>..<HASH> 100644 --- a/openquake/commonlib/readinput.py +++ b/openquake/commonlib/readinput.py @@ -214,7 +214,9 @@ def get_mesh(oqparam): elif 'site_model' in oqparam.inputs: coords = [(param.lon, param.lat, param.depth) for param in get_site_model(oqparam)] - return geo.Mesh.from_coords(coords, from_site_model=True) + mesh = geo.Mesh.from_coords(coords, from_site_model=True) + mesh.from_site_model = True + return mesh def get_site_model(oqparam): @@ -249,7 +251,7 @@ def get_site_collection(oqparam, mesh=None, site_model_params=None): return if oqparam.inputs.get('site_model'): sitecol = [] - if mesh.from_site_model: + if getattr(mesh, 'from_site_model', False): for param in get_site_model(oqparam): pt = geo.Point(param.lon, param.lat) sitecol.append(site.Site(
Changed management of mesh.from_site_model
diff --git a/txzmq/test/test_reactor_shutdown.py b/txzmq/test/test_reactor_shutdown.py index <HASH>..<HASH> 100644 --- a/txzmq/test/test_reactor_shutdown.py +++ b/txzmq/test/test_reactor_shutdown.py @@ -3,8 +3,6 @@ Tests for L{txzmq.factory} automatic shutdown. The _z_ infix is used to have this test a last-called one. """ -from twisted.trial import unittest - from txzmq.factory import ZmqFactory from twisted.internet.test.reactormixins import ReactorBuilder
Fixes for pyflakes
diff --git a/src/main/java/org/dita/dost/util/Constants.java b/src/main/java/org/dita/dost/util/Constants.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/dita/dost/util/Constants.java +++ b/src/main/java/org/dita/dost/util/Constants.java @@ -556,6 +556,7 @@ public final class Constants { public static final DitaClass TOPIC_FN = new DitaClass("- topic/fn "); public static final DitaClass TOPIC_FOREIGN = new DitaClass("- topic/foreign "); public static final DitaClass TOPIC_IMAGE = new DitaClass("- topic/image "); + public static final DitaClass TOPIC_INCLUDE = new DitaClass("- topic/include "); public static final DitaClass TOPIC_INDEX_BASE = new DitaClass("- topic/index-base "); public static final DitaClass TOPIC_INDEXTERM = new DitaClass("- topic/indexterm "); public static final DitaClass TOPIC_INDEXTERMREF = new DitaClass("- topic/indextermref ");
Add DITA <I> include class
diff --git a/lib/fudge/tasks/composite_task.rb b/lib/fudge/tasks/composite_task.rb index <HASH>..<HASH> 100644 --- a/lib/fudge/tasks/composite_task.rb +++ b/lib/fudge/tasks/composite_task.rb @@ -25,13 +25,24 @@ module Fudge end def output_message(t) - args_text = join_arguments(t) + message = [] + message << running_coloured + message << task_name_coloured(t) + message << args_coloured(t) + puts message.join(' ') + end + + def running_coloured + "Running task".foreground(:blue) + end + + def task_name_coloured(t) + t.class.name.to_s.foreground(:yellow).bright + end - puts [ - "Running task".foreground(:blue), - t.class.name.to_s.foreground(:yellow).bright, - args_text.foreground(:yellow).bright - ].join(' ') + def args_coloured(t) + args_text = join_arguments(t) + args_text.foreground(:yellow).bright end end end
tidied up composite task
diff --git a/wagtailmenus/templatetags/menu_tags.py b/wagtailmenus/templatetags/menu_tags.py index <HASH>..<HASH> 100644 --- a/wagtailmenus/templatetags/menu_tags.py +++ b/wagtailmenus/templatetags/menu_tags.py @@ -530,14 +530,9 @@ def prime_menu_items( allow_repeating_parents and use_specific and has_children_in_menu ): - if type(page) is Page: - page = page.specific if getattr(page, 'repeat_in_subnav', False): active_class = ACTIVE_ANCESTOR_CLASS - elif( - page.depth >= SECTION_ROOT_DEPTH and - page.pk in current_page_ancestor_ids - ): + elif page.pk in current_page_ancestor_ids: active_class = ACTIVE_ANCESTOR_CLASS setattr(item, 'active_class', active_class)
Don't include ids for pages above SECTION_ROOT_DEPTH in ancestor IDs, eliminating the need to check page depth in prime_menu_items
diff --git a/.eslintrc.js b/.eslintrc.js index <HASH>..<HASH> 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,6 +9,10 @@ module.exports = { env: { browser: true, node: true, + + // babel's transform-runtime converts references to ES6 globals such as + // Promise and Map to core-js polyfills, so we can use ES6 globals. + es6: true, }, extends: ["eslint:recommended", "google"], rules: {
Add es6 to eslint environments
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ setup( long_description=open('README.md').read(), author = u'Juan Pedro Fisanotti', author_email = 'fisadev@gmail.com', - url='', + url='http://github.com/fisadev/simpleai', packages=['simpleai', 'simpleai.tests'], license='LICENSE.txt', classifiers = [
Url filled on setup.py
diff --git a/dcos/nodeutil/util.go b/dcos/nodeutil/util.go index <HASH>..<HASH> 100644 --- a/dcos/nodeutil/util.go +++ b/dcos/nodeutil/util.go @@ -355,17 +355,9 @@ func (d *dcosInfo) MesosID(ctx context.Context) (string, error) { return "", ErrNodeInfo{fmt.Sprintf("Local node's IP %s not found in mesos state response %+v", localIP, state)} } -// ClusterID returns a UUID of a specific cluster. +// ClusterID returns a UUID of a specific cluster. The file containing the UUID +// is available on every node at d.clusterIDLocation. func (d *dcosInfo) ClusterID() (string, error) { - role, err := d.Role() - if err != nil { - return "", err - } - - if role != dcos.RoleMaster { - return "", ErrNodeInfo{"cluster ID info supported on master nodes only. Current node's role " + role} - } - d.Lock() defer d.Unlock()
(fix) dc/os cluster id is available on all nodes Prior to this commit, the dcos-go nodeutil only returned a cluster ID for master nodes. In fact, this UUID file is present on all nodes in the cluster. This commit removes the check for the master role.
diff --git a/textx/textx.py b/textx/textx.py index <HASH>..<HASH> 100644 --- a/textx/textx.py +++ b/textx/textx.py @@ -550,7 +550,8 @@ def str_match_SA(parser, node, children): match = parser.keyword_regex.match(to_match) if match and match.span() == (0, len(to_match)): regex_match = RegExMatch(r'{}\b'.format(to_match), - ignore_case=parser.ignore_case) + ignore_case=parser.ignore_case, + str_repr=to_match) regex_match.compile() return regex_match else:
Better reporting of expected matches for keyword-like matches.
diff --git a/TYPO3.Flow/Classes/TYPO3/Flow/Persistence/Doctrine/PersistenceManager.php b/TYPO3.Flow/Classes/TYPO3/Flow/Persistence/Doctrine/PersistenceManager.php index <HASH>..<HASH> 100644 --- a/TYPO3.Flow/Classes/TYPO3/Flow/Persistence/Doctrine/PersistenceManager.php +++ b/TYPO3.Flow/Classes/TYPO3/Flow/Persistence/Doctrine/PersistenceManager.php @@ -162,7 +162,7 @@ class PersistenceManager extends AbstractPersistenceManager try { $this->entityManager->flush(); - } catch (\Exception $exception) { + } catch (\Doctrine\DBAL\DBALException $exception) { $this->systemLogger->logException($exception); /** @var Connection $connection */ $connection = $this->entityManager->getConnection();
TASK: Adjust exception being caught to DBALException
diff --git a/host.go b/host.go index <HASH>..<HASH> 100644 --- a/host.go +++ b/host.go @@ -3,6 +3,7 @@ package host import ( "context" + connmgr "github.com/libp2p/go-libp2p-connmgr" inet "github.com/libp2p/go-libp2p-net" peer "github.com/libp2p/go-libp2p-peer" pstore "github.com/libp2p/go-libp2p-peerstore" @@ -61,4 +62,7 @@ type Host interface { // Close shuts down the host, its Network, and services. Close() error + + // ConnManager returns this hosts connection manager + ConnManager() connmgr.ConnManager }
WIP: add ConnManager interface method
diff --git a/src/Model.php b/src/Model.php index <HASH>..<HASH> 100644 --- a/src/Model.php +++ b/src/Model.php @@ -367,6 +367,9 @@ abstract class Model implements \JsonSerializable { $this->changes = []; $this->data = null; + foreach ($this->foreign as $model) { + $model->reset(); + } } /**
Fix reseted Model with Foreigns Foreigns where kept intact, and where accesible even when the corresponding column was set to null.
diff --git a/src/Console/Application.php b/src/Console/Application.php index <HASH>..<HASH> 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -17,7 +17,7 @@ class Application extends BaseApplication /** * @var string */ - const VERSION = '0.7.9'; + const VERSION = '0.7.10'; /** * @var bool */
Update version number to <I>
diff --git a/conda_manager/api/conda_api.py b/conda_manager/api/conda_api.py index <HASH>..<HASH> 100644 --- a/conda_manager/api/conda_api.py +++ b/conda_manager/api/conda_api.py @@ -14,6 +14,7 @@ import platform import re import sys import yaml +import time # Third party imports from qtpy.QtCore import QByteArray, QObject, QProcess, QTimer, Signal @@ -107,10 +108,10 @@ class ProcessWorker(QObject): self._timer = QTimer() self._process = QProcess() - self._timer.setInterval(50) + self._timer.setInterval(150) self._timer.timeout.connect(self._communicate) - self._process.finished.connect(self._communicate) + # self._process.finished.connect(self._communicate) self._process.readyReadStandardOutput.connect(self._partial) def _partial(self):
Enforce <I>ms delay when starting conda qprocess
diff --git a/lib/Profile.php b/lib/Profile.php index <HASH>..<HASH> 100644 --- a/lib/Profile.php +++ b/lib/Profile.php @@ -33,9 +33,9 @@ class Profile { $data = array( 'elapsed' => $elapsed(), - 'memory before' => $memory_before, - 'memory after' => $memory_after, - 'memory peak' => $memory_peak, + 'memory_before' => $memory_before, + 'memory_after' => $memory_after, + 'memory_peak' => $memory_peak, 'marks' => $marks );
We don't want spaces in the arrays we are creating for the profile information. Figured it was best to just fix it at the source.
diff --git a/lib/hocon/version.rb b/lib/hocon/version.rb index <HASH>..<HASH> 100644 --- a/lib/hocon/version.rb +++ b/lib/hocon/version.rb @@ -1,5 +1,5 @@ module Hocon module Version - STRING = '1.2.1' + STRING = '1.2.2.SNAPSHOT' end end
(MAINT) Update version for release
diff --git a/tests/downscaling/conftest.py b/tests/downscaling/conftest.py index <HASH>..<HASH> 100644 --- a/tests/downscaling/conftest.py +++ b/tests/downscaling/conftest.py @@ -62,3 +62,27 @@ def qds_month(): coords={"quantile": [0, 0.3, 5.0, 7, 1], "month": range(1, 13)}, attrs={"group": "time.month", "window": 1}, ) + + +@pytest.fixture +def obs_sim_fut_tuto(): + def _obs_sim_fut_tuto(fut_offset=3, delta=0.1, smth_win=3, trend=True): + ds = xr.tutorial.open_dataset("air_temperature") + obs = ds.air.resample(time="D").mean() + sim = obs.rolling(time=smth_win, min_periods=1).mean() + delta + fut_time = sim.time + np.timedelta64(730 + fut_offset * 365, "D").astype( + "<m8[ns]" + ) + fut = sim + ( + 0 + if not trend + else xr.DataArray( + np.linspace(0, 2, num=sim.time.size), + dims=("time",), + coords={"time": sim.time}, + ) + ) + fut["time"] = fut_time + return obs, sim, fut + + return _obs_sim_fut_tuto
New simple fixture to get obs, sim, fut from xr tuto
diff --git a/addScript.js b/addScript.js index <HASH>..<HASH> 100644 --- a/addScript.js +++ b/addScript.js @@ -3,15 +3,25 @@ Author Tobias Koppers @sokra */ module.exports = function(src) { + function log(error) { + (typeof console !== "undefined") + && (console.error || console.log)("[Script Loader]", error); + } + + // Check for IE =< 8 + function isIE() { + return typeof attachEvent !== "undefined" && typeof addEventListener === "undefined"; + } + try { - if (typeof eval !== "undefined") { - eval.call(null, src); - } else if (typeof execScript !== "undefined") { + if (typeof execScript !== "undefined" && isIE()) { execScript(src); + } else if (typeof eval !== "undefined") { + eval.call(null, src); } else { - console.error("[Script Loader] EvalError: No eval function available"); + log("EvalError: No eval function available"); } } catch (error) { - console.error("[Script Loader] ", error.message); + log(error); } }
fix: IE =< 8 incompatibility regression (#<I>)
diff --git a/hack/preload-images/generate.go b/hack/preload-images/generate.go index <HASH>..<HASH> 100644 --- a/hack/preload-images/generate.go +++ b/hack/preload-images/generate.go @@ -87,7 +87,7 @@ func generateTarball(kubernetesVersion, containerRuntime, tarballFilename string kcfg := config.KubernetesConfig{ KubernetesVersion: kubernetesVersion, } - runner := command.NewKICRunner(profile, driver.OCIBinary) + runner := command.NewKICRunner(profile, driver.OCIPrefix, driver.OCIBinary) sm := sysinit.New(runner) if err := bsutil.TransferBinaries(kcfg, runner, sm); err != nil {
Fix hack binary, as pointed out by golangci-lint
diff --git a/ontrack-delivery/publish.py b/ontrack-delivery/publish.py index <HASH>..<HASH> 100755 --- a/ontrack-delivery/publish.py +++ b/ontrack-delivery/publish.py @@ -77,7 +77,7 @@ def github_publish(options): print "[publish] Release ID is %d" % releaseid # Attach artifacts to the release github.uploadGithubArtifact(options, releaseid, 'ontrack-ui.jar', 'application/zip', - "%s/ontrack-ui/build/libs/ontrack-ui-%s.jar" % (options.dir, options.release)) + "ontrack-ui/build/libs/ontrack-ui-%s.jar" % options.release) # Gets the change log since last release changeLog = ontrack.getChangeLog(options.ontrack_url, 'master', 'RELEASE') # Attach change log to the release
Release: Not using the `dir` option any longer (current directory is fine)
diff --git a/lib/race.js b/lib/race.js index <HASH>..<HASH> 100644 --- a/lib/race.js +++ b/lib/race.js @@ -4,7 +4,7 @@ import once from './internal/once'; /** * Runs the `tasks` array of functions in parallel, without waiting until the - * previous function has completed. Once any of the `tasks` completed or pass an + * previous function has completed. Once any of the `tasks` complete or pass an * error to its callback, the main `callback` is immediately called. It's * equivalent to `Promise.race()`. *
fix second minor typo in race docs
diff --git a/framework/db/Connection.php b/framework/db/Connection.php index <HASH>..<HASH> 100644 --- a/framework/db/Connection.php +++ b/framework/db/Connection.php @@ -571,8 +571,12 @@ class Connection extends Component } elseif (($pos = strpos($this->dsn, ':')) !== false) { $driver = strtolower(substr($this->dsn, 0, $pos)); } - if (isset($driver) && ($driver === 'mssql' || $driver === 'dblib' || $driver === 'sqlsrv')) { - $pdoClass = 'yii\db\mssql\PDO'; + if (isset($driver)) { + if ($driver === 'mssql' || $driver === 'dblib') { + $pdoClass = 'yii\db\mssql\PDO'; + } else if ($driver === 'sqlsrv'){ + $pdoClass = 'yii\db\mssql\SqlsrvPDO'; + } } }
Fixed #<I>: changed sqlsrv pdo class selection
diff --git a/sys/reaper/reaper_unix.go b/sys/reaper/reaper_unix.go index <HASH>..<HASH> 100644 --- a/sys/reaper/reaper_unix.go +++ b/sys/reaper/reaper_unix.go @@ -31,7 +31,7 @@ import ( // ErrNoSuchProcess is returned when the process no longer exists var ErrNoSuchProcess = errors.New("no such process") -const bufferSize = 2048 +const bufferSize = 32 type subscriber struct { sync.Mutex
Change bufferSize back to <I> Shim use non-blocking send now, there is no need to set bufferSize to <I>, it's a waste.
diff --git a/subliminal/services/__init__.py b/subliminal/services/__init__.py index <HASH>..<HASH> 100644 --- a/subliminal/services/__init__.py +++ b/subliminal/services/__init__.py @@ -83,9 +83,11 @@ class ServiceBase(object): def query(self, *args): """Make the actual query""" + pass def list(self, video, languages): """List subtitles""" + pass def download(self, subtitle): """Download a subtitle"""
Add pass to some ServiceBase methods
diff --git a/resources/lang/sv-SE/cachet.php b/resources/lang/sv-SE/cachet.php index <HASH>..<HASH> 100644 --- a/resources/lang/sv-SE/cachet.php +++ b/resources/lang/sv-SE/cachet.php @@ -53,7 +53,7 @@ return [ // Service Status 'service' => [ - 'good' => '[0,1] Systemet fungerar |[2,Inf] Alla system fungerar', + 'good' => '[0,1]System operational|[2,*]All systems are operational', 'bad' => '[0,1] Systemet har för närvarande problem|[2,Inf] Vissa system har problem', 'major' => '[0,1] Stora störningar på tjänsten [2,Inf] Stora störningar på vissa system', ],
New translations cachet.php (Swedish)
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -from distutils.core import setup +from setuptools import setup from codado import _version
switch to setuptools.setup() so wheels will build
diff --git a/src/Analyzer/ModelAnalyzer.php b/src/Analyzer/ModelAnalyzer.php index <HASH>..<HASH> 100644 --- a/src/Analyzer/ModelAnalyzer.php +++ b/src/Analyzer/ModelAnalyzer.php @@ -15,7 +15,9 @@ use Czim\CmsModels\Support\Enums\RelationType; use Exception; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; +use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\Eloquent\Relations\MorphTo; +use Illuminate\Database\Eloquent\Relations\MorphToMany; use Illuminate\Database\Eloquent\Relations\Relation; use LimitIterator; use phpDocumentor\Reflection\DocBlockFactory;
Fixed missing imports for modelanalyzer relation types
diff --git a/js/core/telemetryV3Interface.js b/js/core/telemetryV3Interface.js index <HASH>..<HASH> 100644 --- a/js/core/telemetryV3Interface.js +++ b/js/core/telemetryV3Interface.js @@ -128,12 +128,9 @@ var Telemetry = (function() { this.telemetry.assess = function(data, options) { instance.updateValues(options); assessEvent = instance.getEvent('ASSESS', data); - // This code will replace current version with the new version number, if present in the data. - if (data.item && data.item.eventVer) { - assessEvent.ver = data.item.eventVer; - delete assessEvent.edata.item.eventVer; - } - instance._dispatch(assessEvent); + // This code will replace current version with the new version number, if present in options. + if (options && options.eventVer) assessEvent.ver = options.eventVer; + instance._dispatch(assessEvent); } /**
Issue #SB-<I> fix: Default assess event version will be overridden
diff --git a/src/timepicker/timepicker.js b/src/timepicker/timepicker.js index <HASH>..<HASH> 100644 --- a/src/timepicker/timepicker.js +++ b/src/timepicker/timepicker.js @@ -27,6 +27,7 @@ export class MdTimePicker { twelvehour: this.twelveHour }; $(this.element).pickatime(options); + this.element.value = this.value; } detached() {
fix(md-timepicker): Set value if assigned before the attach
diff --git a/src/App.php b/src/App.php index <HASH>..<HASH> 100644 --- a/src/App.php +++ b/src/App.php @@ -440,10 +440,13 @@ class App extends \samson\cms\App // form relative path to the image $dir = quotemeta(__SAMSON_BASE__); - if ($dir == '/') { - return substr($path, 1); - } else { - return preg_replace('/' . addcslashes($dir, '/') . '/', '', $path); + // TODO: WTF? Why do we need this, need comments!!! + if (strpos($path, 'http://') === false) { + if ($dir == '/') { + return substr($path, 1); + } else { + return preg_replace('/' . addcslashes($dir, '/') . '/', '', $path); + } } } }
Temporary fixed bug with removing first character from image path loigc based on __SAMSON_BASE @omaximus check it!
diff --git a/aioboto3/s3/inject.py b/aioboto3/s3/inject.py index <HASH>..<HASH> 100644 --- a/aioboto3/s3/inject.py +++ b/aioboto3/s3/inject.py @@ -190,14 +190,15 @@ async def upload_fileobj(self, Fileobj: BinaryIO, Bucket: str, Key: str, ExtraAr # Success, add the result to the finished_parts, increment the sent_bytes finished_parts.append({'ETag': resp['ETag'], 'PartNumber': part_args['PartNumber']}) - sent_bytes += len(part_args['Body']) + current_bytes = len(part_args['Body']) + sent_bytes += current_bytes uploaded_parts += 1 logger.debug('Uploaded part to S3') # Call the callback, if it blocks then not good :/ if Callback: try: - Callback(sent_bytes) + Callback(current_bytes) except: # noqa: E722 pass
Changed callback to use current bytes rather than cumulative bytes
diff --git a/src/Controller/Base.php b/src/Controller/Base.php index <HASH>..<HASH> 100644 --- a/src/Controller/Base.php +++ b/src/Controller/Base.php @@ -143,7 +143,6 @@ abstract class Base extends BaseMiddle $oAsset->load('admin.min.js', 'nails/module-admin'); $oAsset->load('nails.admin.min.js', 'NAILS'); $oAsset->load('nails.forms.min.js', 'NAILS'); - $oAsset->load('nails.api.min.js', 'NAILS'); // Component assets foreach (Components::available() as $oComponent) { @@ -186,11 +185,7 @@ abstract class Base extends BaseMiddle $aJs = [ // @todo (Pablo - 2019-12-05) - Remove these items (move into module-admin/admin.js as components) - 'var _nails_admin,_nails_api, _nails_forms;', - - 'if (typeof(NAILS_API) === "function"){', - '_nails_api = new NAILS_API();', - '}', + 'var _nails_admin, _nails_forms;', 'if (typeof(NAILS_Admin) === "function"){', '_nails_admin = new NAILS_Admin();',
Removes outdated Nails API JS lib
diff --git a/pex/pex_bootstrapper.py b/pex/pex_bootstrapper.py index <HASH>..<HASH> 100644 --- a/pex/pex_bootstrapper.py +++ b/pex/pex_bootstrapper.py @@ -156,6 +156,13 @@ def bootstrap_pex(entry_point): pex.PEX(entry_point).execute() +# NB: This helper is used by third party libs - namely https://github.com/wickman/lambdex. +# TODO(John Sirois): Kill once https://github.com/wickman/lambdex/issues/5 is resolved. +def is_compressed(entry_point): + from .pex_info import PexInfo + return os.path.exists(entry_point) and not os.path.exists(os.path.join(entry_point, PexInfo.PATH)) + + def bootstrap_pex_env(entry_point): """Bootstrap the current runtime environment using a given pex.""" pex_info = _bootstrap(entry_point)
Restore `pex.pex_bootstrapper.is_compressed` API. (#<I>) This was eliminated in #<I> since it was (locally) unused but it turns out it was used over in lambdex. The long term fix allowing safe removal of the API is tracked by: <URL>
diff --git a/mr/awsome/config.py b/mr/awsome/config.py index <HASH>..<HASH> 100644 --- a/mr/awsome/config.py +++ b/mr/awsome/config.py @@ -1,6 +1,7 @@ from mr.awsome.common import Hooks from ConfigParser import RawConfigParser import os +import warnings class BaseMassager(object): @@ -89,15 +90,19 @@ class Config(dict): 'plain': { 'module': 'mr.awsome.plain'}} if 'instance' in self: + warnings.warn("The 'instance' section type is deprecated, use 'ec2-instance' instead.") self['ec2-instance'] = self['instance'] del self['instance'] if 'securitygroup' in self: + warnings.warn("The 'securitygroup' section type is deprecated, use 'ec2-securitygroup' instead.") self['ec2-securitygroup'] = self['securitygroup'] del self['securitygroup'] if 'server' in self: + warnings.warn("The 'server' section type is deprecated, use 'plain-instance' instead.") self['plain-instance'] = self['server'] del self['server'] if 'global' in self and 'aws' in self['global']: + warnings.warn("The 'aws' section type is deprecated, define an 'ec2-master' instead.") self.setdefault('ec2-master', {}) self['ec2-master']['default'] = self['global']['aws'] del self['global']['aws']
Warn about deprecated section names.
diff --git a/contrib/ovirt/test_scenarios/bootstrap.py b/contrib/ovirt/test_scenarios/bootstrap.py index <HASH>..<HASH> 100644 --- a/contrib/ovirt/test_scenarios/bootstrap.py +++ b/contrib/ovirt/test_scenarios/bootstrap.py @@ -172,14 +172,14 @@ def add_iscsi_storage_domain(prefix): api = prefix.virt_env.engine_vm().get_api() # Find LUN GUIDs - ret = prefix.virt_env.get_vm('storage-iscsi').ssh( + ret, out, _ = prefix.virt_env.get_vm('storage-iscsi').ssh( ['multipath', '-ll'], ) - nt.assert_equals(ret.code, 0) + nt.assert_equals(ret, 0) lun_guids = [ line.split()[0] - for line in ret.out.split('\n') + for line in out.split('\n') if line.find('LIO-ORG') != -1 ]
Revert ssh ret changes until ssh methods are done Change-Id: I<I>fc<I>a<I>bac3d<I>b<I>c<I>f3f<I>afadec
diff --git a/closure/goog/fx/dragger.js b/closure/goog/fx/dragger.js index <HASH>..<HASH> 100644 --- a/closure/goog/fx/dragger.js +++ b/closure/goog/fx/dragger.js @@ -469,7 +469,7 @@ goog.fx.Dragger.prototype.setupDragHandlers = function() { this.eventHandler_.listen( doc, [goog.events.EventType.TOUCHMOVE, goog.events.EventType.MOUSEMOVE], - this.handleMove_, useCapture); + this.handleMove_, {capture: useCapture, passive: false}); this.eventHandler_.listen( doc, [goog.events.EventType.TOUCHEND, goog.events.EventType.MOUSEUP], this.endDrag, useCapture);
Closure: Dragger: Make touchmove listener cancellable to prevent Chrome from panning. See <URL>
diff --git a/hererocks.py b/hererocks.py index <HASH>..<HASH> 100755 --- a/hererocks.py +++ b/hererocks.py @@ -1173,7 +1173,6 @@ def main(argv=None): bat_h.write(b"set exitcode=%errorlevel%\r\n") bat_h.write(b"if %exitcode% equ 0 (\r\n") - bat_h.write(b" endlocal\r\n") bat_h.write(b" {}\r\n".format(recursive_call)) bat_h.write(b") else (\r\n") @@ -1181,7 +1180,6 @@ def main(argv=None): bat_h.write(b' type "{}"\r\n'.format(setup_output_name)) bat_h.write(b" echo Error: got exitcode %exitcode% from command {}\r\n".format(vs_setup_cmd)) - bat_h.write(b" endlocal\r\n") bat_h.write(b" exit /b 1\r\n") bat_h.write(b")\r\n") bat_h.close()
Don't run endlocal before recursive call
diff --git a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ClientUpgradeCodec.java b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ClientUpgradeCodec.java index <HASH>..<HASH> 100644 --- a/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ClientUpgradeCodec.java +++ b/codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ClientUpgradeCodec.java @@ -111,7 +111,6 @@ public class Http2ClientUpgradeCodec implements HttpClientUpgradeHandler.Upgrade } @Override - public CharSequence protocol() { return HTTP_UPGRADE_PROTOCOL_NAME; }
Remove unnecessary line in Http2ClientUpgradeCodec (#<I>) Motivation: To clean up code. Modification: Remove unnecessary line. Result: There's no functional change.
diff --git a/src/main/java/com/rabbitmq/http/client/domain/AbstractPagination.java b/src/main/java/com/rabbitmq/http/client/domain/AbstractPagination.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/rabbitmq/http/client/domain/AbstractPagination.java +++ b/src/main/java/com/rabbitmq/http/client/domain/AbstractPagination.java @@ -40,6 +40,7 @@ public abstract class AbstractPagination { itemCount = totalItems; totalCount = totalItems; pageCount = 1; + page = 1; pageSize = totalItems; filteredCount = totalItems; }
Initialize AbstractPagination with page 1 when initialized directly from an array
diff --git a/spring-vaadin/src/main/java/org/vaadin/spring/servlet/SpringAwareUIProvider.java b/spring-vaadin/src/main/java/org/vaadin/spring/servlet/SpringAwareUIProvider.java index <HASH>..<HASH> 100644 --- a/spring-vaadin/src/main/java/org/vaadin/spring/servlet/SpringAwareUIProvider.java +++ b/spring-vaadin/src/main/java/org/vaadin/spring/servlet/SpringAwareUIProvider.java @@ -53,7 +53,7 @@ public class SpringAwareUIProvider extends UIProvider { Class<?> beanType = webApplicationContext.getType(uiBeanName); if (UI.class.isAssignableFrom(beanType)) { logger.info(String.format("Found Vaadin UI [%s]", beanType.getCanonicalName())); - final String path = beanType.getAnnotation(VaadinUI.class).path(); + final String path = webApplicationContext.findAnnotationOnBean(uiBeanName, VaadinUI.class).path(); Class<? extends UI> existingBeanType = pathToUIMap.get(path); if (existingBeanType != null) { throw new IllegalStateException(String.format("[%s] is already mapped to the path [%s]", existingBeanType.getCanonicalName(), path));
Now using the application context to ask for annotations
diff --git a/DependencyInjection/MonologExtension.php b/DependencyInjection/MonologExtension.php index <HASH>..<HASH> 100644 --- a/DependencyInjection/MonologExtension.php +++ b/DependencyInjection/MonologExtension.php @@ -125,7 +125,7 @@ class MonologExtension extends Extension $handler['level'], $handler['bubble'], )); - $definition->addTag('kernel.listener', array('event' => 'onCoreResponse')); + $definition->addTag('kernel.listener', array('event' => 'core.response', 'method' => 'onCoreResponse')); break; case 'rotating_file':
[EventDispatcher] Allow registration of arbitrary callbacks This in effect removes the direct link between event name and the method name on the handler. Any callback can be given as a handler and the event name becomes an arbitrary string. Allowing for easier namespacing (see next commit)
diff --git a/app/Module/BatchUpdate/BatchUpdateBasePlugin.php b/app/Module/BatchUpdate/BatchUpdateBasePlugin.php index <HASH>..<HASH> 100644 --- a/app/Module/BatchUpdate/BatchUpdateBasePlugin.php +++ b/app/Module/BatchUpdate/BatchUpdateBasePlugin.php @@ -148,7 +148,7 @@ class BatchUpdateBasePlugin { public static function createEditLinks($gedrec, GedcomRecord $record) { return preg_replace( "/@([^#@\n]+)@/m", - '<a href="'. e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) .'">@\\1@</a>', + '<a href="' . e(route('edit-raw-record', ['ged' => $record->getTree()->getName(), 'xref' => $record->getXref()])) . '">@\\1@</a>', $gedrec ); }
Scrutinizer Auto-Fixes (#<I>) This commit consists of patches automatically generated for this project on <URL>
diff --git a/cbamf/interpolation.py b/cbamf/interpolation.py index <HASH>..<HASH> 100644 --- a/cbamf/interpolation.py +++ b/cbamf/interpolation.py @@ -146,8 +146,7 @@ class ChebyshevInterpolation1D(object): Evaluates an individual Chebyshev polynomial `k` in coordinate space with proper transformation given the window """ - weights = np.zeros(k+1) - weights[k] = 1. + weights = np.diag(np.ones(k+1))[k] return np.polynomial.chebyshev.chebval(self._x2c(x), weights) def __call__(self, x):
quicker way to get chebval for a single poly
diff --git a/astroid/inference.py b/astroid/inference.py index <HASH>..<HASH> 100644 --- a/astroid/inference.py +++ b/astroid/inference.py @@ -307,6 +307,8 @@ def infer_attribute(self, context=None): except exceptions._NonDeducibleTypeHierarchy: # Can't determine anything useful. pass + elif not context: + context = contextmod.InferenceContext() try: context.boundnode = owner
Don't crash upon invalid contex on attr. inference (#<I>)
diff --git a/plugin/hosts/hostsfile_test.go b/plugin/hosts/hostsfile_test.go index <HASH>..<HASH> 100644 --- a/plugin/hosts/hostsfile_test.go +++ b/plugin/hosts/hostsfile_test.go @@ -45,16 +45,13 @@ var ( singlelinehosts = `127.0.0.2 odin` ipv4hosts = `# See https://tools.ietf.org/html/rfc1123. # - # The literal IPv4 address parser in the net package is a relaxed - # one. It may accept a literal IPv4 address in dotted-decimal notation - # with leading zeros such as "001.2.003.4". # internet address and host name 127.0.0.1 localhost # inline comment separated by tab - 127.000.000.002 localhost # inline comment separated by space + 127.0.0.2 localhost # inline comment separated by space # internet address, host name and aliases - 127.000.000.003 localhost localhost.localdomain` + 127.0.0.3 localhost localhost.localdomain` ipv6hosts = `# See https://tools.ietf.org/html/rfc5952, https://tools.ietf.org/html/rfc4007. # internet address and host name
The IPv4 parser no longer accepts leading zeros (#<I>)
diff --git a/src/extensions/filter-control/utils.js b/src/extensions/filter-control/utils.js index <HASH>..<HASH> 100644 --- a/src/extensions/filter-control/utils.js +++ b/src/extensions/filter-control/utils.js @@ -359,7 +359,10 @@ export function createControls (that, header) { $.each(that.columns, (_, column) => { html = [] - if (!column.visible) { + if ( + !column.visible && + !(that.options.filterControlContainer && $(`.bootstrap-table-filter-control-${column.field}`).length >= 1) + ) { return }
Allow filtering of not visible columns if filterControlContainer is used (#<I>)
diff --git a/src/OoGlee/Domain/Providers/LaravelServiceProvider.php b/src/OoGlee/Domain/Providers/LaravelServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/OoGlee/Domain/Providers/LaravelServiceProvider.php +++ b/src/OoGlee/Domain/Providers/LaravelServiceProvider.php @@ -120,14 +120,6 @@ abstract class LaravelServiceProvider extends ServiceProvider { { if (isLaravel5()) { - // Bind the returned class to the namespace packageConfigClass - $this->app->bind($this->packageConfigClass, function($app) - { - $configNameSpace = 'vendor.'.$this->packageVendor.'.'.$this->packageName.'.'; - // Register the corresponding config for package - return new $this->packageConfigClass($app['config'], $configNameSpace); - }); - $this->app->bindShared($this->packageName.'.config', function($app) { $configNameSpace = 'vendor.'.$this->packageVendor.'.'.$this->packageName.'.';
fix: Enable dynamic config class resolution
diff --git a/scripts/create_index.js b/scripts/create_index.js index <HASH>..<HASH> 100644 --- a/scripts/create_index.js +++ b/scripts/create_index.js @@ -1,7 +1,7 @@ const child_process = require('child_process'); const config = require('pelias-config').generate(); const es = require('elasticsearch'); -const SUPPORTED_ES_VERSIONS = '>=6.8.5 || >=7.5.1'; +const SUPPORTED_ES_VERSIONS = '>=6.5.4 || >=7.4.2'; const cli = require('./cli'); const schema = require('../schema');
Add flexibility regarding older minor ES versions In order to allow people using reasonably new, but not the newest, releases on each of our supported Elasticsearch major versions, this lowers the version requirements sightly. We may continue to update these versions over time either for increased flexibility or to reflect features required by Pelias. <URL>
diff --git a/tests/__init__.py b/tests/__init__.py index <HASH>..<HASH> 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -11,6 +11,7 @@ try: except ImportError: from io import StringIO import subprocess +import sys from tempfile import NamedTemporaryFile import unittest @@ -25,7 +26,10 @@ import utility @contextmanager def stdout_guard(): - stdout = io.BytesIO() + if isinstance(sys.stdout, io.TextIOWrapper): + stdout = io.StringIO() + else: + stdout = io.BytesIO() with patch('sys.stdout', stdout): yield if stdout.getvalue() != '': @@ -128,7 +132,10 @@ setup_test_logging.__test__ = False @contextmanager def parse_error(test_case): - stderr = io.BytesIO() + if isinstance(sys.stdout, io.TextIOWrapper): + stderr = io.StringIO() + else: + stderr = io.BytesIO() with test_case.assertRaises(SystemExit): with patch('sys.stderr', stderr): yield stderr
Use StringIO or BytesIO as stdin/stderr replacement as needed.
diff --git a/src/_pytest/junitxml.py b/src/_pytest/junitxml.py index <HASH>..<HASH> 100644 --- a/src/_pytest/junitxml.py +++ b/src/_pytest/junitxml.py @@ -410,7 +410,7 @@ def pytest_addoption(parser): "Write captured log messages to JUnit report: " "one of no|system-out|system-err", default="no", - ) # choices=['no', 'stdout', 'stderr']) + ) parser.addini( "junit_log_passing_tests", "Capture log information for passing tests to JUnit report: ",
Remove incorrect choices comment (#<I>)
diff --git a/benchexec/container.py b/benchexec/container.py index <HASH>..<HASH> 100644 --- a/benchexec/container.py +++ b/benchexec/container.py @@ -231,9 +231,10 @@ def get_mount_points(): (this avoids encoding problems with mount points with problematic characters). """ def decode_path(path): - # replace tab and space escapes with actual characters - # (according to man 5 fstab, only these are escaped) - return path.replace(br"\011", b"\011").replace(br"\040", b"\040") + # Replace tab, space, newline, and backslash escapes with actual characters. + # According to man 5 fstab, only tab and space escaped, but Linux escapes more: + # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/proc_namespace.c?id=12a54b150fb5b6c2f3da932dc0e665355f8a5a48#n85 + return path.replace(br"\011", b"\011").replace(br"\040", b"\040").replace(br"\012", b"\012").replace(br"\134", b"\134") with open("/proc/self/mounts", "rb") as mounts: # The format of this file is the same as of /etc/fstab (cf. man 5 fstab)
unescape more charcters in /proc/self/mounts
diff --git a/src/utils.js b/src/utils.js index <HASH>..<HASH> 100644 --- a/src/utils.js +++ b/src/utils.js @@ -398,7 +398,8 @@ export function firefoxStrictMinVersion(manifestJson) { if ( manifestJson.applications && manifestJson.applications.gecko && - manifestJson.applications.gecko.strict_min_version + manifestJson.applications.gecko.strict_min_version && + typeof manifestJson.applications.gecko.strict_min_version === 'string' ) { return parseInt( manifestJson.applications.gecko.strict_min_version.split('.')[0], diff --git a/tests/unit/test.utils.js b/tests/unit/test.utils.js index <HASH>..<HASH> 100644 --- a/tests/unit/test.utils.js +++ b/tests/unit/test.utils.js @@ -512,6 +512,14 @@ describe('firefoxStrictMinVersion', () => { }) ).toEqual(60); }); + + it('should return null when value is not a string', () => { + expect( + firefoxStrictMinVersion({ + applications: { gecko: { strict_min_version: 12.3 } }, + }) + ).toEqual(null); + }); }); describe('basicCompatVersionComparison', () => {
Prevent error when strict_min_version is not a string value (#<I>)
diff --git a/test/cli.js b/test/cli.js index <HASH>..<HASH> 100644 --- a/test/cli.js +++ b/test/cli.js @@ -6,7 +6,10 @@ var expect = require('code').expect; var Chalk = require('chalk'); var CLI = require('../lib/cli'); var Commands = require('../lib/commands'); -var fullHelp = Object.keys(Commands).map(function (command) { +var Pkg = require('../package.json'); + +var header = Chalk.bold('requireSafe(+)') + ' v' + Pkg.version + '\n\n'; +var fullHelp = header + Object.keys(Commands).map(function (command) { return [ ' ' + Chalk.bold(command),
adds the version # to the help header cause it's useful
diff --git a/java/client/src/main/java/com/youtube/vitess/client/cursor/CursorWithError.java b/java/client/src/main/java/com/youtube/vitess/client/cursor/CursorWithError.java index <HASH>..<HASH> 100644 --- a/java/client/src/main/java/com/youtube/vitess/client/cursor/CursorWithError.java +++ b/java/client/src/main/java/com/youtube/vitess/client/cursor/CursorWithError.java @@ -12,8 +12,8 @@ public class CursorWithError { private final Vtrpc.RPCError error; public CursorWithError(Query.ResultWithError resultWithError) { - if (null == resultWithError.getError() || Vtrpc.ErrorCode.SUCCESS == resultWithError - .getError().getCode()) { + if (!resultWithError.hasError() || + Vtrpc.ErrorCode.SUCCESS == resultWithError.getError().getCode()) { this.cursor = new SimpleCursor(resultWithError.getResult()); this.error = null; } else {
Fixing a java error. Was picked up by our internal java compiler: a proto returned value cannot be null.
diff --git a/tests/test_process.py b/tests/test_process.py index <HASH>..<HASH> 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -158,7 +158,7 @@ class ProcessTestCase(unittest.TestCase): cfg = {"noprealloc": True, "smallfiles": True, "oplogSize": 10} config_path = process.write_config(cfg) self.tmp_files.append(config_path) - result = process.mprocess(bin_path, config_path, port=port, timeout=60) + result = process.mprocess(bin_path, config_path, port=port, timeout=300) self.assertTrue(isinstance(result, tuple)) pid, host = result self.assertTrue(isinstance(pid, int))
Update tests/test_process.py
diff --git a/enrol/ldap/db/install.php b/enrol/ldap/db/install.php index <HASH>..<HASH> 100644 --- a/enrol/ldap/db/install.php +++ b/enrol/ldap/db/install.php @@ -96,5 +96,7 @@ function xmldb_enrol_ldap_install() { } // Remove a setting that's never been used at all - unset_config('enrol_ldap_user_memberfield'); + if (isset($CFG->enrol_ldap_user_memberfield)) { + unset_config('enrol_ldap_user_memberfield'); + } }
enrol/ldap: MDL-<I> don't use $CFG->enrol_ldap_user_memberfield if it's not defined
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/binary/type-serializers.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/binary/type-serializers.js index <HASH>..<HASH> 100644 --- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/binary/type-serializers.js +++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/structure/io/binary/type-serializers.js @@ -169,7 +169,7 @@ class UuidSerializer { const uuid_str = String(item) .replace(/^urn:uuid:/, '') - .replaceAll(/[{}-]/g, ''); + .replace(/[{}-]/g, ''); const bufs = []; if (fullyQualifiedFormat)
Switch from String.replaceAll to String.replace for support of older JS/node
diff --git a/inspire_dojson/hep/rules/bd0xx.py b/inspire_dojson/hep/rules/bd0xx.py index <HASH>..<HASH> 100644 --- a/inspire_dojson/hep/rules/bd0xx.py +++ b/inspire_dojson/hep/rules/bd0xx.py @@ -103,20 +103,13 @@ def dois(self, key, value): def _get_material(value): MATERIAL_MAP = { - 'addendum': 'addendum', 'ebook': 'publication', - 'editorial note': 'editorial note', - 'erratum': 'erratum', - 'preprint': 'preprint', - 'publication': 'publication', - 'reprint': 'reprint', - 'translation': 'translation', } q_value = force_single_element(value.get('q', '')) normalized_q_value = q_value.lower() - return MATERIAL_MAP.get(normalized_q_value) + return MATERIAL_MAP.get(normalized_q_value, normalized_q_value) def _is_doi(id_, type_): return (not type_ or type_.upper() == 'DOI') and is_doi(id_)
hep: allow more materials in dois
diff --git a/lib/models.js b/lib/models.js index <HASH>..<HASH> 100644 --- a/lib/models.js +++ b/lib/models.js @@ -45,10 +45,10 @@ Models.prototype.run = function(model_id, data, params) { let batches = []; if (this.ml.settings.auto_batch) { - for (let ii=0; ii < data.length; ii+=ml.settings.batch_size) { + for (let ii=0; ii < data.length; ii+=this.ml.settings.batch_size) { // keep all the params except the data list, which will get overloaded let batch = cloneDeep(params); - batch.data = data.slice(ii, ii+ml.settings.batch_size); + batch.data = data.slice(ii, ii+this.ml.settings.batch_size); batches.push(batch) } } else {
Solves "ReferenceError: ml is not defined" #7
diff --git a/src/server/pps/server/worker_rc.go b/src/server/pps/server/worker_rc.go index <HASH>..<HASH> 100644 --- a/src/server/pps/server/worker_rc.go +++ b/src/server/pps/server/worker_rc.go @@ -279,7 +279,7 @@ func (a *apiServer) getWorkerOptions(pipelineName string, rcName string, Name: client.PPSWorkerVolume, MountPath: client.PPSScratchSpace, }) - if resourceRequests != nil && resourceRequests.NvidiaGPU() != nil && !resourceRequests.NvidiaGPU().IsZero() { + if resourceLimits != nil && resourceLimits.NvidiaGPU() != nil && !resourceLimits.NvidiaGPU().IsZero() { volumes = append(volumes, api.Volume{ Name: "root-lib", VolumeSource: api.VolumeSource{
No, use limits on GPU k8s <I> now requires gpu limits to be set
diff --git a/testing/test_pdb.py b/testing/test_pdb.py index <HASH>..<HASH> 100644 --- a/testing/test_pdb.py +++ b/testing/test_pdb.py @@ -853,7 +853,7 @@ class TestDebuggingBreakpoints: Test that supports breakpoint global marks on Python 3.7+ and not on CPython 3.5, 2.7 """ - if sys.version_info.major == 3 and sys.version_info.minor >= 7: + if sys.version_info >= (3, 7): assert SUPPORTS_BREAKPOINT_BUILTIN is True if sys.version_info.major == 3 and sys.version_info.minor == 5: assert SUPPORTS_BREAKPOINT_BUILTIN is False
Fix for Python 4: replace unsafe PY3 with PY2
diff --git a/superset/security.py b/superset/security.py index <HASH>..<HASH> 100644 --- a/superset/security.py +++ b/superset/security.py @@ -37,6 +37,10 @@ ADMIN_ONLY_VIEW_MENUS = { 'RoleModelView', 'Security', 'UserDBModelView', + 'UserLDAPModelView', + 'UserOAuthModelView', + 'UserOIDModelView', + 'UserRemoteUserModelView', } ALPHA_ONLY_VIEW_MENUS = {
[security] Adding all derived FAB UserModelView views to admin only (#<I>)
diff --git a/ara/clients/offline.py b/ara/clients/offline.py index <HASH>..<HASH> 100644 --- a/ara/clients/offline.py +++ b/ara/clients/offline.py @@ -46,11 +46,18 @@ class AraOfflineClient(object): def _request(self, method, endpoint, **kwargs): func = getattr(self.client, method) - response = func( - endpoint, - json.dumps(kwargs), - content_type='application/json' - ) + # TODO: Is there a better way than doing this if/else ? + if kwargs: + response = func( + endpoint, + json.dumps(kwargs), + content_type='application/json' + ) + else: + response = func( + endpoint, + content_type='application/json' + ) self.log.debug('HTTP {status}: {method} on {endpoint}'.format( status=response.status_code,
Don't pass kwargs to the client if there isn't any This resolves an issue where doing a request (i.e, GET) without kwargs would fail. Change-Id: Iac5be<I>bd1a<I>c0ac0dbca<I>e<I>bebe
diff --git a/dexmaker/src/test/java/com/google/dexmaker/stock/ProxyBuilderTest.java b/dexmaker/src/test/java/com/google/dexmaker/stock/ProxyBuilderTest.java index <HASH>..<HASH> 100644 --- a/dexmaker/src/test/java/com/google/dexmaker/stock/ProxyBuilderTest.java +++ b/dexmaker/src/test/java/com/google/dexmaker/stock/ProxyBuilderTest.java @@ -128,7 +128,7 @@ public class ProxyBuilderTest extends TestCase { try { proxy.getClass().getDeclaredMethod("result"); fail(); - } catch (NoSuchMethodException e) { + } catch (NoSuchMethodException expected) { } @@ -148,14 +148,14 @@ public class ProxyBuilderTest extends TestCase { try { proxy.getClass().getDeclaredMethod("result"); fail(); - } catch (NoSuchMethodException e) { + } catch (NoSuchMethodException expected) { } try { proxy.result(); fail(); - } catch (AssertionFailedError e) { + } catch (AssertionFailedError expected) { } }
-Gave some expected exceptions in ProxyBuilderTest more descriptive variable names.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -3,9 +3,12 @@ __author__ = 'ahmetdal' from setuptools import setup, find_packages try: - long_description = open('README.md').read() -except IOError: - long_description = '' + from pypandoc import convert + + read_md = lambda f: convert(f, 'rst') +except ImportError: + print("warning: pypandoc module not found, could not convert Markdown to RST") + read_md = lambda f: open(f, 'r').read() setup( name='django-river', @@ -15,7 +18,7 @@ setup( packages=find_packages(), url='https://github.com/javrasya/django-river.git', description='Django Workflow Library', - long_description=long_description, + long_description=read_md('README.md'), dependency_links=[ "https://bitbucket.org/ahmetdal/river.io-python/tarball/master/#egg=0.0.1" ],
rst conversion of README.md file is added for PyPI page.
diff --git a/Generator/YMLFile.php b/Generator/YMLFile.php index <HASH>..<HASH> 100644 --- a/Generator/YMLFile.php +++ b/Generator/YMLFile.php @@ -21,7 +21,7 @@ class YMLFile extends File { parent::mergeComponentData($additional_component_data); // The hacky yaml_inline_level property may not be an array! - if (is_array($this->component_data['yaml_inline_level'])) { + if (isset($this->component_data['yaml_inline_level']) && is_array($this->component_data['yaml_inline_level'])) { $this->component_data['yaml_inline_level'] = reset($this->component_data['yaml_inline_level']); } }
Fixed bug with YML generator expecting property to be set.
diff --git a/core/src/main/java/org/bitcoinj/script/Script.java b/core/src/main/java/org/bitcoinj/script/Script.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/bitcoinj/script/Script.java +++ b/core/src/main/java/org/bitcoinj/script/Script.java @@ -101,7 +101,7 @@ public class Script { public Script(byte[] programBytes) throws ScriptException { program = programBytes; parse(programBytes); - creationTimeSeconds = Utils.currentTimeSeconds(); + creationTimeSeconds = 0; } public Script(byte[] programBytes, long creationTimeSeconds) throws ScriptException {
Script: don't query the clock when parsing a script. This actually shows up in Android performance profiles.
diff --git a/api/models/task.go b/api/models/task.go index <HASH>..<HASH> 100644 --- a/api/models/task.go +++ b/api/models/task.go @@ -52,7 +52,7 @@ type Task struct { Read Only: true */ - AppName string `json:"route_name,omitempty"` + AppName string `json:"app_name,omitempty"` Path string `json:"path"` diff --git a/api/server/runner.go b/api/server/runner.go index <HASH>..<HASH> 100644 --- a/api/server/runner.go +++ b/api/server/runner.go @@ -73,7 +73,7 @@ func handleRequest(c *gin.Context, enqueue models.Enqueue) { } // if still no appName, we gotta exit if appName == "" { - log.WithError(err).Error(models.ErrAppsNotFound) + log.WithError(err).Error("Invalid app, blank") c.JSON(http.StatusBadRequest, simpleError(models.ErrAppsNotFound)) return }
Updated route_name in json to app_name.
diff --git a/rootpy/io/pickler.py b/rootpy/io/pickler.py index <HASH>..<HASH> 100644 --- a/rootpy/io/pickler.py +++ b/rootpy/io/pickler.py @@ -293,7 +293,8 @@ class Unpickler(pickle.Unpickler): return obj def persistent_load(self, pid): - pid = pid.decode('utf-8') + if sys.version_info[0] >= 3: + pid = pid.decode('utf-8') log.debug("unpickler reading {0}".format(pid)) if self.__use_proxy: obj = ROOT_Proxy(self.__file, pid)
fix broken pickler test due to py2 compat string handling
diff --git a/lib/weblib.php b/lib/weblib.php index <HASH>..<HASH> 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -717,6 +717,10 @@ function highlight($needle, $haystack, $case=0, /// this function after performing any conversions to HTML. /// Function found here: http://forums.devshed.com/t67822/scdaa2d1c3d4bacb4671d075ad41f0854.html + if (empty($needle)) { + return $haystack; + } + $list_of_words = eregi_replace("[^-a-zA-Z0-9&']", " ", $needle); $list_array = explode(" ", $list_of_words); for ($i=0; $i<sizeof($list_array); $i++) {
Prevent funny-looking text when trying to highlight a null string
diff --git a/mysql/toolkit/connector.py b/mysql/toolkit/connector.py index <HASH>..<HASH> 100644 --- a/mysql/toolkit/connector.py +++ b/mysql/toolkit/connector.py @@ -68,8 +68,10 @@ class Connector: """Execute a single SQL query without returning a result.""" self._cursor.execute(command) self._commit() + return True def executemany(self, command): """Execute multiple SQL queries without returning a result.""" self._cursor.executemany(command) self._commit() + return True
Added return statements for conditional validation
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -17,9 +17,13 @@ module.exports = function(config) { debug('initializing "%s", from "%s"', __filename, module.parent.id); this.use(utils.cwd()); - this.use(utils.vfs()); this.use(utils.pipeline()); + // if templates need to be rendered, register assemble-fs before this plugin + if (typeof this.src !== 'function') { + this.use(utils.vfs()); + } + this.define('process', function(files, options) { debug('running base-files-process', files);
only add `base-fs` if src doesn't exist
diff --git a/rpc/server.go b/rpc/server.go index <HASH>..<HASH> 100644 --- a/rpc/server.go +++ b/rpc/server.go @@ -145,7 +145,7 @@ func (s *Server) serveRequest(ctx context.Context, codec ServerCodec, singleShot defer cancel() // if the codec supports notification include a notifier that callbacks can use - // to send notification to clients. It is thight to the codec/connection. If the + // to send notification to clients. It is tied to the codec/connection. If the // connection is closed the notifier will stop and cancels all active subscriptions. if options&OptionSubscriptions == OptionSubscriptions { ctx = context.WithValue(ctx, notifierKey{}, newNotifier(codec))
rpc: fix a comment typo (#<I>)
diff --git a/tests/test4.py b/tests/test4.py index <HASH>..<HASH> 100644 --- a/tests/test4.py +++ b/tests/test4.py @@ -37,6 +37,7 @@ class TestStrategy(bt.Strategy): btindicators.MovingAverageSimple(self.datas[0], period=30) btindicators.MovingAverageSimple(self.datas[0], period=50) self.ind = btindicators.StochasticSlow(self.datas[0]) + btindicators.MACDHisto(self.datas[0]) # self.ind = btindicators.RSI(self.datas[0]) pass else:
test4.py slightly changed - Added MACD to the current indicators
diff --git a/salt/modules/zpool.py b/salt/modules/zpool.py index <HASH>..<HASH> 100644 --- a/salt/modules/zpool.py +++ b/salt/modules/zpool.py @@ -238,9 +238,9 @@ def create(pool_name, *vdevs, **kwargs): ret[vdev] = '{0} not present on filesystem'.format(vdev) return ret mode = os.stat(vdev).st_mode - if not stat.S_ISBLK(mode) and not stat.S_ISREG(mode): - # Not a block device or file vdev so error and return - ret[vdev] = '{0} is not a block device or a file vdev'.format(vdev) + if not stat.S_ISBLK(mode) and not stat.S_ISREG(mode) and not stat.S_ISCHR(mode): + # Not a block device, file vdev, or character special device so error and return + ret[vdev] = '{0} is not a block device, a file vdev, or character special device'.format(vdev) return ret dlist.append(vdev)
Allow zpool.create on character devices Fixes #<I>
diff --git a/inc/template.php b/inc/template.php index <HASH>..<HASH> 100644 --- a/inc/template.php +++ b/inc/template.php @@ -181,10 +181,10 @@ function hybrid_get_content_template() { $templates = apply_filters( 'hybrid_content_template_hierarchy', $templates ); // Locate the template. - $template = locate_template( $templates ); + $template = apply_filters( 'hybrid_content_template', locate_template( $templates ), $templates ); // If template is found, include it. - if ( apply_filters( 'hybrid_content_template', $template, $templates ) ) + if ( $template ) include( $template ); } @@ -219,10 +219,10 @@ function hybrid_get_embed_template() { $templates = apply_filters( 'hybrid_embed_template_hierarchy', $templates ); // Locate the template. - $template = locate_template( $templates ); + $template = apply_filters( 'hybrid_embed_template', locate_template( $templates ), $templates ); // If template is found, include it. - if ( apply_filters( 'hybrid_embed_template', $template, $templates ) ) + if ( $template ) include( $template ); }
Bring fix from the <I> branch where the `hybrid_content_template` hook worked. This commit also applies the same fix to `hybrid_embed_template`. See original commit: <URL>
diff --git a/geopy/geocoders/googlev3.py b/geopy/geocoders/googlev3.py index <HASH>..<HASH> 100644 --- a/geopy/geocoders/googlev3.py +++ b/geopy/geocoders/googlev3.py @@ -58,7 +58,7 @@ class GoogleV3(Geocoder): # pylint: disable=R0902 .. versionadded:: 0.98.2 :param string domain: Should be the localized Google Maps domain to - connect to. The default is 'maps.google.com', but if you're + connect to. The default is 'maps.googleapis.com', but if you're geocoding address in the UK (for example), you may want to set it to 'maps.google.co.uk' to properly bias results.
Fix GoogleV3 outdated default domain in docs
diff --git a/ocelot-processor/src/main/java/org/ocelotds/processors/AbstractDataServiceVisitor.java b/ocelot-processor/src/main/java/org/ocelotds/processors/AbstractDataServiceVisitor.java index <HASH>..<HASH> 100644 --- a/ocelot-processor/src/main/java/org/ocelotds/processors/AbstractDataServiceVisitor.java +++ b/ocelot-processor/src/main/java/org/ocelotds/processors/AbstractDataServiceVisitor.java @@ -10,6 +10,7 @@ import java.io.Writer; import java.util.ArrayList; import java.util.Collection; import java.util.List; +import java.util.Locale; import javax.annotation.processing.Messager; import javax.annotation.processing.ProcessingEnvironment; import javax.lang.model.element.AnnotationMirror; @@ -100,7 +101,7 @@ public abstract class AbstractDataServiceVisitor implements ElementVisitor<Strin * @return */ String getJsInstancename(String classname) { - return classname.substring(0, 1).toLowerCase()+classname.substring(1); + return classname.substring(0, 1).toLowerCase(Locale.US)+classname.substring(1); } /**
add locale to toLowerCase
diff --git a/analytical/tests/test_tag_uservoice.py b/analytical/tests/test_tag_uservoice.py index <HASH>..<HASH> 100644 --- a/analytical/tests/test_tag_uservoice.py +++ b/analytical/tests/test_tag_uservoice.py @@ -40,14 +40,7 @@ class UserVoiceTagTestCase(TagTestCase): @override_settings(USERVOICE_WIDGET_KEY='') def test_empty_key(self): - r = UserVoiceNode().render(Context()) - self.assertEqual(r, "") - - @override_settings(USERVOICE_WIDGET_KEY='') - def test_overridden_empty_key(self): - vars = {'uservoice_widget_key': 'bcdefghijklmnopqrstu'} - r = UserVoiceNode().render(Context(vars)) - self.assertIn("widget.uservoice.com/bcdefghijklmnopqrstu.js", r) + self.assertRaises(AnalyticalException, UserVoiceNode) def test_overridden_key(self): vars = {'uservoice_widget_key': 'defghijklmnopqrstuvw'}
Fix uservoice tests Rewrite test_empty_key in the same way as in the other modules. Delete test_overridden_empty_key, because the Node (In this case, the UserVoiceNode) should not be created if there is no configuration initially.
diff --git a/spyderlib/utils/dochelpers.py b/spyderlib/utils/dochelpers.py index <HASH>..<HASH> 100644 --- a/spyderlib/utils/dochelpers.py +++ b/spyderlib/utils/dochelpers.py @@ -159,7 +159,7 @@ def isdefined(obj, force_import=False, namespace=None): return False import __builtin__ if base not in __builtin__.__dict__ and base not in namespace: - if force_import: + if force_import and base != 'setup': try: module = __import__(base, globals(), namespace) if base not in globals(): @@ -171,7 +171,7 @@ def isdefined(obj, force_import=False, namespace=None): return False for attr in attr_list: if not hasattr(eval(base, namespace), attr): - if force_import: + if force_import and base != 'setup': try: __import__(base+'.'+attr, globals(), namespace) except ImportError:
Object inspector/bugfix (workaround) -- utils.dochelpers.isdefined (force_import=True): do not import module if it's a setup module (may crash the introspection thread)
diff --git a/src/ReadModel/MultilingualJsonLDProjectorTrait.php b/src/ReadModel/MultilingualJsonLDProjectorTrait.php index <HASH>..<HASH> 100644 --- a/src/ReadModel/MultilingualJsonLDProjectorTrait.php +++ b/src/ReadModel/MultilingualJsonLDProjectorTrait.php @@ -16,4 +16,17 @@ trait MultilingualJsonLDProjectorTrait $jsonLd->mainLanguage = $language->getCode(); return $jsonLd; } + + /** + * @param \stdClass $jsonLd + * @return Language + */ + protected function getMainLanguage(\stdClass $jsonLd) + { + if (isset($jsonLd->mainLanguage)) { + return new Language($jsonLd->mainLanguage); + } else { + return new Language('nl'); + } + } }
III-<I>: Add method to read mainLanguage from JSON-LD in projectors
diff --git a/decidim-dev/lib/decidim/dev/test/rspec_support/vcr.rb b/decidim-dev/lib/decidim/dev/test/rspec_support/vcr.rb index <HASH>..<HASH> 100644 --- a/decidim-dev/lib/decidim/dev/test/rspec_support/vcr.rb +++ b/decidim-dev/lib/decidim/dev/test/rspec_support/vcr.rb @@ -8,6 +8,10 @@ VCR.configure do |config| config.hook_into :webmock config.configure_rspec_metadata! config.ignore_request do |request| - URI(request.uri).port != URI(Decidim::Elections.bulletin_board.server).port + if defined?(Decidim::Elections) + URI(request.uri).port != URI(Decidim::Elections.bulletin_board.server).port + else + true + end end end
Fix name error when no elections (#<I>) * fix: NameError - uninitialized constant Decidim::Elections * Linters
diff --git a/precise/__init__.py b/precise/__init__.py index <HASH>..<HASH> 100644 --- a/precise/__init__.py +++ b/precise/__init__.py @@ -1 +1 @@ -__version__ = '0.2.0' +__version__ = '0.3.0'
Increment version to <I>
diff --git a/acceptancetests/assess_upgrade_series.py b/acceptancetests/assess_upgrade_series.py index <HASH>..<HASH> 100755 --- a/acceptancetests/assess_upgrade_series.py +++ b/acceptancetests/assess_upgrade_series.py @@ -41,15 +41,15 @@ def assess_juju_upgrade_series(client, args): def upgrade_series_prepare(client, machine, series, **flags): - args = (machine, series) + args = (machine, 'prepare', series) if flags['agree']: - args += ('--agree',) - client.juju('upgrade-series prepare', args) + args += ('-y',) + client.juju('upgrade-series', args) def upgrade_series_complete(client, machine): - args = (machine) - client.juju('upgrade-series complete', args) + args = (machine, 'complete') + client.juju('upgrade-series', args) def do_release_upgrade(client, machine):
Modifies upgrade-series acceptance test to accomodate new command order and --yes flag.
diff --git a/dygraph-layout.js b/dygraph-layout.js index <HASH>..<HASH> 100644 --- a/dygraph-layout.js +++ b/dygraph-layout.js @@ -211,6 +211,10 @@ DygraphLayout.prototype._evaluateLineCharts = function() { // on chrome+linux, they are 6 times more expensive than iterating through the // points and drawing the lines. The brunt of the cost comes from allocating // the |point| structures. + var boundaryIdStart = 0; + if (this.dygraph_.boundaryIds_.length > 0) { + boundaryIdStart = this.dygraph_.boundaryIds_[this.dygraph_.boundaryIds_.length-1][0] + } for (var setIdx = 0; setIdx < this.datasets.length; setIdx++) { var dataset = this.datasets[setIdx]; var setName = this.setNames[setIdx]; @@ -243,7 +247,7 @@ DygraphLayout.prototype._evaluateLineCharts = function() { xval: xValue, yval: yValue, name: setName, // TODO(danvk): is this really necessary? - idx: j + this.dygraph_.boundaryIds_[setIdx][0] + idx: j + boundaryIdStart }; }
Bugfix: avoid exception when one series is hidden
diff --git a/system/Validation/Rules.php b/system/Validation/Rules.php index <HASH>..<HASH> 100644 --- a/system/Validation/Rules.php +++ b/system/Validation/Rules.php @@ -304,9 +304,9 @@ class Rules // If the field is present we can safely assume that // the field is here, no matter whether the corresponding // search field is present or not. - $present = $this->required($data[$str] ?? null); + $present = $this->required($str ?? ''); - if ($present === true) + if ($present) { return true; } @@ -326,8 +326,8 @@ class Rules // Remove any keys with empty values since, that means they // weren't truly there, as far as this is concerned. - $requiredFields = array_filter($requiredFields, function ($item) use ($data) { - return empty($data[$item]); + $requiredFields = array_filter($requiredFields, function ($item) use ($data, $str) { + return ! empty($data[$item]); }); return empty($requiredFields);
Fix required_with rule bug. <I>
diff --git a/lxd/project/limits.go b/lxd/project/limits.go index <HASH>..<HASH> 100644 --- a/lxd/project/limits.go +++ b/lxd/project/limits.go @@ -357,7 +357,12 @@ func getInstanceLimits(instance db.Instance, keys []string) (map[string]int64, e } var aggregateLimitConfigValueParsers = map[string]func(string) (int64, error){ - "limits.memory": units.ParseByteSizeString, + "limits.memory": func(value string) (int64, error) { + if strings.HasSuffix(value, "%") { + return -1, fmt.Errorf("Value can't be a percentage") + } + return units.ParseByteSizeString(value) + }, "limits.processes": func(value string) (int64, error) { limit, err := strconv.Atoi(value) if err != nil {
lxd/project: Don't allow percentage values for limits.memory
diff --git a/source/server.js b/source/server.js index <HASH>..<HASH> 100644 --- a/source/server.js +++ b/source/server.js @@ -338,9 +338,9 @@ app.get('/api/fs/listDirectories', ensureAuthenticated, function(req, res) { }); async.filter(absolutePaths, function(absolutePath, callback) { fs.stat(absolutePath, function(err, stat) { - callback(!err && stat && stat.isDirectory()); + callback(null, !err && stat && stat.isDirectory()); }); - }, function(filteredFiles) { + }, function(err, filteredFiles) { res.json(filteredFiles); }); }
fix callback arguments for async.filter so directory autocomplete works again this was a breaking change in the async library <I> <URL>
diff --git a/src/Model/CustomPostType/Query.php b/src/Model/CustomPostType/Query.php index <HASH>..<HASH> 100644 --- a/src/Model/CustomPostType/Query.php +++ b/src/Model/CustomPostType/Query.php @@ -136,12 +136,12 @@ class Query $offset = (int)get_query_var('paged', 1); $this->limit($postsPerPage); - $this->offset($offset + 1); + $this->offset($offset); if ($count > $postsPerPage) { $config += array( 'mid-size' => 1, - 'current' => $offset, + 'current' => $offset === 0 ? 1 : $offset, 'total' => ceil($count / $postsPerPage), 'prev_next' => true, 'prev_text' => __('Previous', 'strata'),
offset were being confused in between WPs and Stratas
diff --git a/EventListener/TargetWebspaceListener.php b/EventListener/TargetWebspaceListener.php index <HASH>..<HASH> 100644 --- a/EventListener/TargetWebspaceListener.php +++ b/EventListener/TargetWebspaceListener.php @@ -59,7 +59,7 @@ class TargetWebspaceListener $webspaceKey = $this->requestAnalyzer->getWebspace()->getKey(); if ($document->getMainWebspace() === $webspaceKey - || in_array($webspaceKey, $document->getAdditionalWebspaces()) + || ($document->getAdditionalWebspaces() && in_array($webspaceKey, $document->getAdditionalWebspaces())) ) { return $webspaceKey; }
Fixed PHP warning in TargetWebspaceListene (#<I>)
diff --git a/source/org/jasig/portal/layout/ALFolder.java b/source/org/jasig/portal/layout/ALFolder.java index <HASH>..<HASH> 100644 --- a/source/org/jasig/portal/layout/ALFolder.java +++ b/source/org/jasig/portal/layout/ALFolder.java @@ -78,12 +78,11 @@ public class ALFolder extends ALNode { } - /** - * Gets the node type - * @return a node type - */ - public String getNodeType() { - return "folder"; + /* + * @see org.jasig.portal.layout.ALNode#getNodeType() + */ + public int getNodeType() { + return FOLDER_TYPE; } public static ALFolder createLostFolder() { @@ -99,4 +98,9 @@ public class ALFolder extends ALNode { return lostFolder; } + /* + * Constant indicating the type of ALNode + */ + public static final int FOLDER_TYPE = 2; + }
Added missing FOLDER_TYPE constant Updated getNode method to sync with ALNode - it now returns an int. git-svn-id: <URL>
diff --git a/pyemma/coordinates/clustering/kmeans.py b/pyemma/coordinates/clustering/kmeans.py index <HASH>..<HASH> 100644 --- a/pyemma/coordinates/clustering/kmeans.py +++ b/pyemma/coordinates/clustering/kmeans.py @@ -64,7 +64,7 @@ class KmeansClustering(AbstractClustering, ProgressReporter): tolerance : float stop iteration when the relative change in the cost function - ..1: C(S) = \sum_{i=1}^{k} \sum_{\mathbf x \in S_i} \left\| \mathbf x - \boldsymbol\mu_i \right\|^2 + .. math:: C(S) = \sum_{i=1}^{k} \sum_{\mathbf x \in S_i} \left\| \mathbf x - \boldsymbol\mu_i \right\|^2 is smaller than tolerance. metric : str
[kmeans] fix math rendering of cost function (#<I>)
diff --git a/src/L.Realtime.js b/src/L.Realtime.js index <HASH>..<HASH> 100644 --- a/src/L.Realtime.js +++ b/src/L.Realtime.js @@ -30,7 +30,7 @@ L.Realtime = L.GeoJSON.extend({ this._src = src; } else { this._src = L.bind(function(responseHandler, errorHandler) { - if ( typeof this._url !== 'undefined') { + if ( this._url !== undefined) { src.url = this._url; } var reqOptions = this.options.cache ? src : this._bustCache(src);
In "initialize" a more clean _url if condition. change typeof this._url !== 'undefined' to this._url !== undefined within "initialize".
diff --git a/lntest/itest/lnd_test.go b/lntest/itest/lnd_test.go index <HASH>..<HASH> 100644 --- a/lntest/itest/lnd_test.go +++ b/lntest/itest/lnd_test.go @@ -13405,7 +13405,11 @@ func testChanRestoreScenario(t *harnessTest, net *lntest.NetworkHarness, if err != nil { t.Fatalf("unable to create new node: %v", err) } - defer shutdownAndAssert(net, t, dave) + // Defer to a closure instead of to shutdownAndAssert due to the value + // of 'dave' changing throughout the test. + defer func() { + shutdownAndAssert(net, t, dave) + }() carol, err := net.NewNode("carol", nil) if err != nil { t.Fatalf("unable to make new node: %v", err)
itest: Shutdown final Dave node in testChanRestore This changes the defer function in the test for channel backups to correctly close over the 'dave' variable. Without this closure, the shutdownAndAssert call would attempt to shutdown the original (non-restored) dave instead of the most recently created (restored) dave, causing a leak of a node during tests.
diff --git a/pabot/pabot.py b/pabot/pabot.py index <HASH>..<HASH> 100755 --- a/pabot/pabot.py +++ b/pabot/pabot.py @@ -1036,7 +1036,7 @@ def store_suite_names(hashes, suite_names): # type: (Hashes, List[ExecutionItem] assert(all(isinstance(s, ExecutionItem) for s in suite_names)) suite_lines = [s.line() for s in suite_names] _write("Storing .pabotsuitenames file") - with open(".pabotsuitenames", "w") as suitenamesfile: + with open(".pabotsuitenames", "w", encoding="utf-8") as suitenamesfile: suitenamesfile.write("datasources:"+hashes.dirs+'\n') suitenamesfile.write("commandlineoptions:"+hashes.cmd+'\n') suitenamesfile.write("suitesfrom:"+hashes.suitesfrom+'\n')
ensure .pabotsuitenames utf-8 encoding
diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index <HASH>..<HASH> 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -780,7 +780,7 @@ class LeftAndMain extends Controller implements PermissionProvider public function afterHandleRequest() { - if ($this->response->isError()) { + if ($this->response->isError() && !$this->request->isAjax()) { $this->init(); $errorCode = $this->response->getStatusCode(); $errorType = $this->response->getStatusDescription(); @@ -2035,7 +2035,7 @@ class LeftAndMain extends Controller implements PermissionProvider */ public function getHttpErrorMessage(): string { - return $this->httpErrorMessage; + return $this->httpErrorMessage ?? ''; } /**
FIX Don't override ajax errors or use uninitialised property
diff --git a/ryu/controller/network.py b/ryu/controller/network.py index <HASH>..<HASH> 100644 --- a/ryu/controller/network.py +++ b/ryu/controller/network.py @@ -368,7 +368,12 @@ class Network(app_manager.RyuApp): old_mac_address = self._get_old_mac(network_id, dpid, port_no) self.dpids.remove_port(dpid, port_no) - self.networks.remove(network_id, dpid, port_no) + try: + self.networks.remove(network_id, dpid, port_no) + except NetworkNotFound: + # port deletion can be called after network deletion + # due to Openstack auto deletion port.(dhcp/router port) + pass if old_mac_address is not None: self.mac_addresses.remove_port(network_id, dpid, port_no, old_mac_address)
network.py: exception in Networks.remove_port() Neutron plugin can call remove_port after network deletion for automatic delete port like router/dhcp port. So ignore NetworkNotFound exception.
diff --git a/asl/interface/webservice/performers/resource.py b/asl/interface/webservice/performers/resource.py index <HASH>..<HASH> 100644 --- a/asl/interface/webservice/performers/resource.py +++ b/asl/interface/webservice/performers/resource.py @@ -24,6 +24,7 @@ def perform_resource(path): resource_task = get_resource_task(resource) if resource_task == None: raise ImportError("No resource named {0}.".format(resource)) + app.logger.debug("Fetched resource named {0} with data\n{1}.".format(resource, request.data)) data = request.json rv = resource_task(params=params, args=args_to_dict(request.args), data=data)
Improved logging of the resource request. We can not reserve already reserved surprise. #<I>