diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/Themosis/Route/RouteServiceProvider.php b/src/Themosis/Route/RouteServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/Themosis/Route/RouteServiceProvider.php +++ b/src/Themosis/Route/RouteServiceProvider.php @@ -2,21 +2,14 @@ namespace Themosis\Route; -use Illuminate\Events\Dispatcher; -use Illuminate\Support\ServiceProvider; +use Illuminate\Routing\RoutingServiceProvider; -class RouteServiceProvider extends ServiceProvider +class RouteServiceProvider extends RoutingServiceProvider { public function register() { - /* - * Register the Events Dispatcher into the container. - */ - $this->app->bind('events', function ($container) { - return new Dispatcher($container); - }); - $this->app->singleton('router', function ($container) { - return new Router($container['events'], $container); + $this->app->singleton('router', function ($app) { + return new Router($app['events'], $app); }); } }
Themosis route service provider extends the illuminate routing provider.
diff --git a/src/Api/Issues.php b/src/Api/Issues.php index <HASH>..<HASH> 100644 --- a/src/Api/Issues.php +++ b/src/Api/Issues.php @@ -97,7 +97,7 @@ class Issues extends AbstractApi * * @return mixed */ - public function reorder($project_id, $issue_iid, array $params) + public function reorder($project_id, int $issue_iid, array $params) { return $this->put($this->getProjectPath($project_id, 'issues/'.$this->encodePath($issue_iid)).'/reorder', $params); }
Added missing scalar type
diff --git a/anyvcs/git.py b/anyvcs/git.py index <HASH>..<HASH> 100644 --- a/anyvcs/git.py +++ b/anyvcs/git.py @@ -146,11 +146,11 @@ class GitRepo(VCSRepo): cmd.append('--no-merges') single = False if revrange is None: - pass + cmd.append('--all') elif isinstance(revrange, tuple): if revrange[0] is None: if revrange[1] is None: - pass + cmd.append('--all') else: cmd.append(revrange[1]) else:
fix bug in GitRepo.log when revrange=None or (None,None)
diff --git a/sacred/initialize.py b/sacred/initialize.py index <HASH>..<HASH> 100755 --- a/sacred/initialize.py +++ b/sacred/initialize.py @@ -240,8 +240,18 @@ def create_scaffolding(experiment, sorted_ingredients): named_configs=experiment.named_configs, config_hooks=experiment.config_hooks, generate_seed=True) - return OrderedDict([(sc.path, sc) for sc in scaffolding.values()]) - + + scaffolding_ret = OrderedDict([ + (sc.path, sc) + for sc in scaffolding.values() + ]) + if len(scaffolding_ret) != len(scaffolding): + raise ValueError( + 'The pathes of the ingredients are not unique. ' + '{}'.format([s.path for s in scaffolding]) + ) + + return scaffolding_ret def gather_ingredients_topological(ingredient): sub_ingredients = defaultdict(int)
create_scaffolding raise exception when pathes aren't unique
diff --git a/spec/wordpress/api_spec.rb b/spec/wordpress/api_spec.rb index <HASH>..<HASH> 100644 --- a/spec/wordpress/api_spec.rb +++ b/spec/wordpress/api_spec.rb @@ -37,7 +37,9 @@ describe Wordpress::API do it "should raise error with invalid parameter" do expect { - obj = client.send(method, *params[:args], :invalid_key => 1) + args = [method, *params[:args]] + args << {:invalid_key => 1} + obj = client.send(*args) }.to raise_error(Wordpress::ArgumentError) end end
Improve the argument format in spec.
diff --git a/core/src/elements/ons-fab.js b/core/src/elements/ons-fab.js index <HASH>..<HASH> 100755 --- a/core/src/elements/ons-fab.js +++ b/core/src/elements/ons-fab.js @@ -72,6 +72,13 @@ export default class FabElement extends BaseElement { */ init() { + // The following statements can be executed before contentReady + // since these do not access the children + { + this.show(); + this.classList.add(defaultClassName); + } + contentReady(this, () => { this._compile(); }); @@ -80,8 +87,6 @@ export default class FabElement extends BaseElement { _compile() { autoStyle.prepare(this); - this.classList.add(defaultClassName); - if (!util.findChild(this, '.fab__icon')) { const content = document.createElement('span'); content.classList.add('fab__icon'); @@ -99,8 +104,6 @@ export default class FabElement extends BaseElement { ModifierUtil.initModifier(this, scheme); this._updatePosition(); - - this.show(); } static get observedAttributes() {
fix(ons-fab): Execute this.show() and some statements before contentReady.
diff --git a/Pdf/Engine/WkHtmlToPdfEngine.php b/Pdf/Engine/WkHtmlToPdfEngine.php index <HASH>..<HASH> 100644 --- a/Pdf/Engine/WkHtmlToPdfEngine.php +++ b/Pdf/Engine/WkHtmlToPdfEngine.php @@ -26,14 +26,6 @@ class WkHtmlToPdfEngine extends AbstractPdfEngine { * @return string raw pdf data */ public function output() { - $binary = $this->config('binary'); - - if ($binary) { - $this->binary = $binary; - } - if (!is_executable($this->binary)) { - throw new CakeException(sprintf('wkhtmltopdf binary is not found or not executable: %s', $this->binary)); - } $content = $this->_exec($this->_getCommand(), $this->_Pdf->html()); if (strpos(mb_strtolower($content['stderr']), 'error')) { @@ -82,6 +74,14 @@ class WkHtmlToPdfEngine extends AbstractPdfEngine { * @return string the command for generating the pdf */ protected function _getCommand() { + $binary = $this->config('binary'); + + if ($binary) { + $this->binary = $binary; + } + if (!is_executable($this->binary)) { + throw new CakeException(sprintf('wkhtmltopdf binary is not found or not executable: %s', $this->binary)); + } $command = $this->binary; $command .= " -q";
move binary setting to _getCommand
diff --git a/widgets/RelTabs.php b/widgets/RelTabs.php index <HASH>..<HASH> 100755 --- a/widgets/RelTabs.php +++ b/widgets/RelTabs.php @@ -58,14 +58,23 @@ class RelTabs extends \dlds\rels\components\Widget { */ protected function renderViews() { - $widget = $this->relViewClass; + if (empty($this->_relViews)) + { + $message = \Yii::t('dlds/rels/widgets', 'RelTabs widget cannot be generated. No related models exist. Please create at least one relation model first.'); + + echo \yii\helpers\Html::tag('div', $message, ['class' => 'alert alert-warning']); + } + else + { + $widget = $this->relViewClass; - echo $widget::widget(array( - 'items' => $this->_relViews, - 'options' => array( - 'collapsible' => true, - ), - )); + echo $widget::widget(array( + 'items' => $this->_relViews, + 'options' => array( + 'collapsible' => true, + ), + )); + } } }
RelTabs updated - added warning when no related model exist
diff --git a/pyocd/commands/commands.py b/pyocd/commands/commands.py index <HASH>..<HASH> 100755 --- a/pyocd/commands/commands.py +++ b/pyocd/commands/commands.py @@ -1561,8 +1561,7 @@ class HelpCommand(CommandBase): } HELP_ADDENDUM = """ -All register names are also available as commands that print the register's value. -Any ADDR or LEN argument will accept a register name. +Any integer argument will accept a register name. Prefix line with $ to execute a Python expression. Prefix line with ! to execute a shell command."""
commands: help: fix addendum regarding register name commands.
diff --git a/sprd/manager/ProductManager.js b/sprd/manager/ProductManager.js index <HASH>..<HASH> 100644 --- a/sprd/manager/ProductManager.js +++ b/sprd/manager/ProductManager.js @@ -5,6 +5,8 @@ define(["sprd/manager/IProductManager", "underscore", "flow", "sprd/util/Product var PREVENT_VALIDATION_OPTIONS = { preventValidation: true }; + // factor * print area height = font size + var INITIAL_FONT_SIZE_SCALE_FACTOR = 0.07; return IProductManager.inherit("sprd.manager.ProductManager", { @@ -569,10 +571,15 @@ define(["sprd/manager/IProductManager", "underscore", "flow", "sprd/util/Product .seq("configuration", function () { var textFlow = TextFlow.initializeFromText(text); + var fontSize = 25; + + if(!printType.isPrintColorColorSpace()){ + fontSize = INITIAL_FONT_SIZE_SCALE_FACTOR* printArea.get('_size.height'); + } (new ApplyStyleToElementOperation(TextRange.createTextRange(0, textFlow.textLength()), textFlow, new Style({ font: font, - fontSize: 25, + fontSize: fontSize, lineHeight: 1.2, printTypeColor: this.vars["printTypeColor"] }), new
DEV-<I> - First Text to big for small product types
diff --git a/sonar-server/src/main/webapp/javascripts/navigator/filters/rule-filters.js b/sonar-server/src/main/webapp/javascripts/navigator/filters/rule-filters.js index <HASH>..<HASH> 100644 --- a/sonar-server/src/main/webapp/javascripts/navigator/filters/rule-filters.js +++ b/sonar-server/src/main/webapp/javascripts/navigator/filters/rule-filters.js @@ -39,6 +39,7 @@ define(['backbone', 'navigator/filters/base-filters', 'navigator/filters/ajax-se that.choices.add(new Backbone.Model({ id: r.rule.key, text: r.rule.name, + category: r.rule.language, checked: true })); });
SONAR-<I> Little change to support rule language after page reload
diff --git a/test/test-suite.js b/test/test-suite.js index <HASH>..<HASH> 100644 --- a/test/test-suite.js +++ b/test/test-suite.js @@ -1264,15 +1264,22 @@ self { JScrewIt = arg || global.JScrewIt; featureSet = Object.create(null); - EMU_FEATURES.forEach( - function (feature) { featureSet[feature] = true; } - ); - JScrewIt.FEATURE_INFOS.AUTO.includes.forEach( - function (feature) { featureSet[feature] = false; } - ); + EMU_FEATURES.forEach(function (feature) { featureSet[feature] = true; }); + initIncludesOf('AUTO'); describeTests(); } + function initIncludesOf(feature) + { + JScrewIt.FEATURE_INFOS[feature].includes.forEach( + function (feature) + { + initIncludesOf(feature); + featureSet[feature] = false; + } + ); + } + function isExpected(expected) { var result =
Minor fix in test-suite.js
diff --git a/index.es6.js b/index.es6.js index <HASH>..<HASH> 100644 --- a/index.es6.js +++ b/index.es6.js @@ -50,11 +50,11 @@ function shim(iter, root) { value: function () { let result = iter.nextNode(); _pointerBeforeReferenceNode = false; - if (result !== null) { - _referenceNode = iter.nextNode(); - return _referenceNode; - } else { + if (result === null) { return null; + } else { + _referenceNode = result; + return _referenceNode; } } }, @@ -63,11 +63,11 @@ function shim(iter, root) { value: function () { let result = iter.previousNode(); _pointerBeforeReferenceNode = true; - if (result !== null) { - _referenceNode = iter.previousNode(); - return _referenceNode; - } else { + if (result === null) { return null; + } else { + _referenceNode = result; + return _referenceNode; } } }
Positive assertions and correct code are good
diff --git a/library/Garp/Model/Helper.php b/library/Garp/Model/Helper.php index <HASH>..<HASH> 100755 --- a/library/Garp/Model/Helper.php +++ b/library/Garp/Model/Helper.php @@ -11,6 +11,11 @@ */ abstract class Garp_Model_Helper extends Garp_Util_ObserverAbstract { /** + * Configuration + */ + protected $_config; + + /** * Class constructor. Loads config. * @param Array $config Configuration values. * @return Void @@ -18,12 +23,13 @@ abstract class Garp_Model_Helper extends Garp_Util_ObserverAbstract { public function __construct($config = array()) { $this->_setup($config); } - - + /** * Setup the behavioral environment * @param Array $config Configuration options * @return Void */ - abstract protected function _setup($config); -} \ No newline at end of file + protected function _setup($config) { + $this->_config = $config; + } +}
Added Dateable behavior for to/from dates with themes.
diff --git a/mod/lesson/locallib.php b/mod/lesson/locallib.php index <HASH>..<HASH> 100644 --- a/mod/lesson/locallib.php +++ b/mod/lesson/locallib.php @@ -2756,7 +2756,7 @@ class lesson extends lesson_base { $result->newpageid = $page->nextpageid; } } else { - $result->newpageid = $lesson->cluster_jump($page->id); + $result->newpageid = $this->cluster_jump($page->id); } } return $result;
MDL-<I> lesson: Replace old var reference by self
diff --git a/lib/lotus/utils/escape.rb b/lib/lotus/utils/escape.rb index <HASH>..<HASH> 100644 --- a/lib/lotus/utils/escape.rb +++ b/lib/lotus/utils/escape.rb @@ -528,9 +528,10 @@ module Lotus # @since 0.4.0 # @api private def self.encode(input) - input.to_s.encode(Encoding::UTF_8) + return '' if input.nil? + input.encode(Encoding::UTF_8) rescue Encoding::UndefinedConversionError - input.to_s.force_encoding(Encoding::UTF_8) + input.dup.force_encoding(Encoding::UTF_8) end # Encode the given UTF-8 char. diff --git a/test/escape_test.rb b/test/escape_test.rb index <HASH>..<HASH> 100644 --- a/test/escape_test.rb +++ b/test/escape_test.rb @@ -105,8 +105,14 @@ describe Lotus::Utils::Escape do it "escapes 'тест'" do skip "There is no ASCII-8BIT encoding" unless Encoding.name_list.include?('ASCII-8BIT') - result = mod.html('тест'.force_encoding('ASCII-8BIT')) + string = 'тест'.force_encoding('ASCII-8BIT') + encoding = string.encoding + + result = mod.html(string) result.must_equal 'тест' + result.encoding.must_equal Encoding::UTF_8 + + string.encoding.must_equal encoding end end
Ensure immutability for encoded strings which failed the conversion Ref #<I>
diff --git a/spec/custom_field_spec.rb b/spec/custom_field_spec.rb index <HASH>..<HASH> 100644 --- a/spec/custom_field_spec.rb +++ b/spec/custom_field_spec.rb @@ -10,7 +10,7 @@ module Trello before do allow(client) .to receive(:get) - .with('customFields/abcdef123456789123456789', {}) + .with('/customFields/abcdef123456789123456789', {}) .and_return custom_fields_payload end @@ -37,7 +37,7 @@ module Trello it 'properly initializes all fields from options-like formatted hash' do custom_field_details = custom_fields_details[1] - custom_field = CustomField.new(details) + custom_field = CustomField.new(custom_field_details) expect(custom_field.id).to eq(custom_field_details[:id]) expect(custom_field.name).to eq(custom_field_details[:name]) expect(custom_field.type).to eq(custom_field_details[:type]) @@ -97,5 +97,15 @@ module Trello expect(CustomField.find('abcdef123456789123456789')).to eq(custom_field) end end + + context "deleting" do + it "deletes the custom field" do + expect(client) + .to receive(:delete) + .with("/customFields/#{custom_field.id}") + + custom_field.delete + end + end end end
Updated custom field creation test and added deletion test
diff --git a/server.js b/server.js index <HASH>..<HASH> 100644 --- a/server.js +++ b/server.js @@ -59,6 +59,8 @@ module.exports = function (opts, onConnection) { wsServer.close() return emitter } + + emitter.address = server.address.bind(server) return emitter }
expose .address from underlying server
diff --git a/lib/rnes/ppu.rb b/lib/rnes/ppu.rb index <HASH>..<HASH> 100644 --- a/lib/rnes/ppu.rb +++ b/lib/rnes/ppu.rb @@ -82,6 +82,8 @@ module Rnes case address when 0x0002 registers.status + when 0x0004 + read_from_sprite_ram(@sprite_ram_address) when 0x0007 read_from_video_ram else @@ -135,7 +137,7 @@ module Rnes when 0x0003 write_sprite_ram_address(value) when 0x0004 - write_to_sprite_ram(value) + write_to_sprite_ram_via_ppu_read(value) when 0x0005 write_to_scroll_registers(value) when 0x0006 @@ -355,7 +357,7 @@ module Rnes end # @param [Integer] value - def write_to_sprite_ram(value) + def write_to_sprite_ram_via_ppu_read(value) @sprite_ram.write(@sprite_ram_address, value) @sprite_ram_address += 1 end
Implement reading OAM data from PPU $<I>
diff --git a/spyderlib/widgets/dicteditorutils.py b/spyderlib/widgets/dicteditorutils.py index <HASH>..<HASH> 100644 --- a/spyderlib/widgets/dicteditorutils.py +++ b/spyderlib/widgets/dicteditorutils.py @@ -186,7 +186,7 @@ def value_to_display(value, truncate=False, trunc_len=80, minmax=False): return '%s Mode: %s' % (address(value), value.mode) if isinstance(value, DataFrame): cols = value.columns - if PY2 and cols: + if PY2 and len(cols) > 0: # Get rid of possible BOM utf-8 data present at the # beginning of a file, which gets attached to the first # column header when headers are present in the first
Variable Explorer: Fix another freeze when creating DataFrames on PY 2 - This is a regression introduced when trying to fix issue #<I>
diff --git a/abilian/services/audit/service.py b/abilian/services/audit/service.py index <HASH>..<HASH> 100644 --- a/abilian/services/audit/service.py +++ b/abilian/services/audit/service.py @@ -48,6 +48,9 @@ class AuditService(Service): Service.start(self) self.register_classes() + def is_auditable(self, model): + return isinstance(model, Entity) + def register_classes(self): state = self.app_state for cls in all_entity_classes(): @@ -132,7 +135,7 @@ class AuditService(Service): transaction.commit() def log_new(self, session, model): - if not isinstance(model, Entity): + if not self.is_auditable(model): return entry = AuditEntry.from_model(model, type=CREATION) @@ -142,18 +145,17 @@ class AuditService(Service): del model.__changes__ def log_updated(self, session, model): - if not (isinstance(model, Entity) + if not (self.is_auditable(model) and hasattr(model, '__changes__')): return entry = AuditEntry.from_model(model, type=UPDATE) entry.changes = model.__changes__ session.add(entry) - del model.__changes__ def log_deleted(self, session, model): - if not isinstance(model, Entity): + if not self.is_auditable(model): return entry = AuditEntry.from_model(model, type=DELETION)
audit: added method to determine if an item is auditable (factorization)
diff --git a/minio/thread_pool.py b/minio/thread_pool.py index <HASH>..<HASH> 100644 --- a/minio/thread_pool.py +++ b/minio/thread_pool.py @@ -45,7 +45,7 @@ class Worker(Thread): """ Continously receive tasks and execute them """ while True: task = self.tasks_queue.get() - if task is None: + if not task: self.tasks_queue.task_done() break # No exception detected in any thread, @@ -61,6 +61,7 @@ class Worker(Thread): # Mark this task as done, whether an exception happened or not self.tasks_queue.task_done() + class ThreadPool: """ Pool of threads consuming tasks from a queue """ @@ -91,4 +92,3 @@ class ThreadPool: if not self.exceptions_queue.empty(): raise self.exceptions_queue.get() return self.results_queue -
fix formatting as per pep8 in thread_pool.py (#<I>)
diff --git a/src/command/KeyBindingManager.js b/src/command/KeyBindingManager.js index <HASH>..<HASH> 100644 --- a/src/command/KeyBindingManager.js +++ b/src/command/KeyBindingManager.js @@ -469,8 +469,11 @@ define(function (require, exports, module) { */ function handleKey(key) { if (_enabled && _keyMap[key]) { - CommandManager.execute(_keyMap[key].commandID); - return true; + // The execute() function returns a promise because some commands are async. + // Generally, commands decide whether they can run or not synchronously, + // and reject immediately, so we can test for that synchronously. + var promise = CommandManager.execute(_keyMap[key].commandID); + return (promise.state() === "rejected") ? false : true; } return false; }
be smarter about key event propagation
diff --git a/diego/lifecycle_test.go b/diego/lifecycle_test.go index <HASH>..<HASH> 100644 --- a/diego/lifecycle_test.go +++ b/diego/lifecycle_test.go @@ -94,4 +94,21 @@ var _ = Describe("Application Lifecycle", func() { describeLifeCycle() }) + + Describe("An existing DEA-based app being migrated to Diego", func() { + BeforeEach(func() { + appName = generator.RandomName() + Eventually(cf.Cf("push", appName, "-p", helpers.NewAssets().Dora), CF_PUSH_TIMEOUT).Should(Exit(0)) + Eventually(cf.Cf("stop", appName), DEFAULT_TIMEOUT).Should(Exit(0)) + Eventually(helpers.CurlingAppRoot(appName)).Should(ContainSubstring("404")) + Eventually(cf.Cf("set-env", appName, "CF_DIEGO_RUN_BETA", "true"), DEFAULT_TIMEOUT).Should(Exit(0)) // CF_DIEGO_RUN_BETA also implies CF_DIEGO_BETA in CC + Eventually(cf.Cf("start", appName), CF_PUSH_TIMEOUT).Should(Exit(0)) + }) + + AfterEach(func() { + Eventually(cf.Cf("delete", appName, "-f"), DEFAULT_TIMEOUT).Should(Exit(0)) + }) + + describeLifeCycle() + }) })
Add test for switching DEA app to diego
diff --git a/packages/cli/utils/PluginsContainer.js b/packages/cli/utils/PluginsContainer.js index <HASH>..<HASH> 100644 --- a/packages/cli/utils/PluginsContainer.js +++ b/packages/cli/utils/PluginsContainer.js @@ -35,6 +35,10 @@ module.exports = class PluginsContainer { return Array.from(plugins); } + findByType(type) { + return Object.values(this.plugins).filter(pl => pl.type === type); + } + register(...args) { assign(...args, this.plugins); }
fix: add missing findByType method
diff --git a/src/entity/Entity.Geometry.js b/src/entity/Entity.Geometry.js index <HASH>..<HASH> 100644 --- a/src/entity/Entity.Geometry.js +++ b/src/entity/Entity.Geometry.js @@ -100,7 +100,7 @@ meta.class("Entity.Geometry", this._updateAnchor(); - if(this.renderer.culling) { + if(this.renderer.culling && this._view.entityBuffer === this.renderer.entities) { this.node = new meta.SparseNode(this); }
Culling is now used only for entities that is on main layer only.
diff --git a/examples/examples.py b/examples/examples.py index <HASH>..<HASH> 100644 --- a/examples/examples.py +++ b/examples/examples.py @@ -11,13 +11,15 @@ from halo.halo import Halo spinner = Halo({'text': 'Such Spin', 'spinner': 'dots'}) - -spinner.start() -time.sleep(2) -spinner.text = 'Much Colors' -spinner.color = 'magenta' -time.sleep(2) -spinner.text = 'Very emojis' -spinner.spinner = {'spinner': 'hearts'} -time.sleep(2) -spinner.stop_and_persist({'symbol': '🦄 '.encode('utf-8'), 'text': 'Wow!'}) +try: + spinner.start() + time.sleep(2) + spinner.text = 'Much Colors' + spinner.color = 'magenta' + time.sleep(2) + spinner.text = 'Very emojis' + spinner.spinner = {'spinner': 'hearts'} + time.sleep(2) + spinner.stop_and_persist({'symbol': '🦄 '.encode('utf-8'), 'text': 'Wow!'}) +except (KeyboardInterrupt, SystemExit): + spinner.stop()
Example: Now handles KeyboardInterrupts too!
diff --git a/bread/__init__.py b/bread/__init__.py index <HASH>..<HASH> 100644 --- a/bread/__init__.py +++ b/bread/__init__.py @@ -1,5 +1,5 @@ __title__ = 'bread' -__version__ = '2.0.0' +__version__ = '2.1.0' __author__ = 'Alex Rasmussen' __license__ = 'MIT' __copyright__ = 'Copyright 2015 Alex Rasmussen' diff --git a/docs/source/conf.py b/docs/source/conf.py index <HASH>..<HASH> 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -48,9 +48,9 @@ copyright = u'2013, Alex Rasmussen' # built documents. # # The short X.Y version. -version = '2.0.0' +version = '2.1.0' # The full version, including alpha/beta/rc tags. -release = '2.0.0' +release = '2.1.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='bread', - version='2.0.0', + version='2.1.0', description='Binary format parsing made easier', url='https://github.com/alexras/bread', author='Alex Rasmussen',
Bumping version to <I>
diff --git a/lib/dml/tests/dml_test.php b/lib/dml/tests/dml_test.php index <HASH>..<HASH> 100644 --- a/lib/dml/tests/dml_test.php +++ b/lib/dml/tests/dml_test.php @@ -4176,6 +4176,7 @@ class dml_testcase extends database_driver_testcase { $t->allow_commit(); $j++; } + $rs2->close(); $this->assertEquals(4, $j); } $rs1->close();
MDL-<I> add missing rs close Thanks Eloy!
diff --git a/framework/i18n/I18N.php b/framework/i18n/I18N.php index <HASH>..<HASH> 100644 --- a/framework/i18n/I18N.php +++ b/framework/i18n/I18N.php @@ -31,18 +31,18 @@ class I18N extends Component * category patterns, and the array values are the corresponding [[MessageSource]] objects or the configurations * for creating the [[MessageSource]] objects. * - * The message category patterns can contain the wildcard '*' at the end to match multiple categories with the same prefix. - * For example, 'app/*' matches both 'app/cat1' and 'app/cat2'. + * The message category patterns can contain the wildcard `*` at the end to match multiple categories with the same prefix. + * For example, `app/*` matches both `app/cat1` and `app/cat2`. * - * The '*' category pattern will match all categories that do not match any other category patterns. + * The `*` category pattern will match all categories that do not match any other category patterns. * * This property may be modified on the fly by extensions who want to have their own message sources * registered under their own namespaces. * - * The category "yii" and "app" are always defined. The former refers to the messages used in the Yii core + * The category `yii` and `app` are always defined. The former refers to the messages used in the Yii core * framework code, while the latter refers to the default message category for custom application code. * By default, both of these categories use [[PhpMessageSource]] and the corresponding message files are - * stored under "@yii/messages" and "@app/messages", respectively. + * stored under `@yii/messages` and `@app/messages`, respectively. * * You may override the configuration of both categories. */
Cosmetic changes in DocBlocks (#<I>) [skip ci]
diff --git a/tensorflow_probability/python/experimental/distribute/sharded.py b/tensorflow_probability/python/experimental/distribute/sharded.py index <HASH>..<HASH> 100644 --- a/tensorflow_probability/python/experimental/distribute/sharded.py +++ b/tensorflow_probability/python/experimental/distribute/sharded.py @@ -126,6 +126,12 @@ class Sharded(distribution_lib.Distribution): return [] return self.distribution._parameter_control_dependencies(is_init=is_init) # pylint: disable=protected-access + def _default_event_space_bijector(self, *args, **kwargs): + # TODO(b/175084455): This should likely be wrapped in a `tfb.Sharded`-like + # construct. + return self.distribution.experimental_default_event_space_bijector( + *args, **kwargs) + _composite_tensor_nonshape_params = ('distribution',)
Plumb-through the default event bijector in tfp_dist.Sharded. PiperOrigin-RevId: <I>
diff --git a/MRS/analysis.py b/MRS/analysis.py index <HASH>..<HASH> 100644 --- a/MRS/analysis.py +++ b/MRS/analysis.py @@ -135,7 +135,7 @@ def coil_combine(data, w_idx=[1,2,3], coil_dim=2, sampling_rate=5000.): bounds = [(None,None), (0,None), (0,None), - (-np.pi/2, np.pi/2), # Keeping it positive! + (-np.pi, np.pi), # Keeping it positive! (None,None), (None, None)]
Not good to enforce positivity for the coil-combination. That kinda makes sense, actually.
diff --git a/Slim/Http/Util.php b/Slim/Http/Util.php index <HASH>..<HASH> 100644 --- a/Slim/Http/Util.php +++ b/Slim/Http/Util.php @@ -174,6 +174,32 @@ class Util } /** + * Serialize Response cookies into raw HTTP header + * @param \Slim\Http\Headers $headers The Response headers + * @param \Slim\Http\Cookies $cookies The Response cookies + * @param array $config The Slim app settings + */ + public static function serializeCookies(\Slim\Http\Headers &$headers, \Slim\Http\Cookies $cookies, array $config) + { + if ($config['cookies.encrypt']) { + foreach ($cookies as $name => $settings) { + $settings['value'] = static::encodeSecureCookie( + $settings['value'], + $settings['expires'], + $config['cookies.secret_key'], + $config['cookies.cipher'], + $config['cookies.cipher_mode'] + ); + static::setCookieHeader($headers, $name, $settings); + } + } else { + foreach ($cookies as $name => $settings) { + static::setCookieHeader($headers, $name, $settings); + } + } + } + + /** * Encode secure cookie value * * This method will create the secure value of an HTTP cookie. The
Add method to Slim\Http\Util to serialize cookies into headers
diff --git a/spotify/sync/sync.py b/spotify/sync/sync.py index <HASH>..<HASH> 100644 --- a/spotify/sync/sync.py +++ b/spotify/sync/sync.py @@ -20,7 +20,7 @@ class SyncExecution(threading.Thread): self.running = True self.in_queue.put(coro) - while True: + while self.running: if self.out_queue.full(): self.running = False value = self.out_queue.get() @@ -30,6 +30,7 @@ class SyncExecution(threading.Thread): def run(self): asyncio.set_event_loop(self._loop) + while True: coro = self.in_queue.get() try:
run_coro execution loop depends on sync execution state
diff --git a/lib/namespace.rb b/lib/namespace.rb index <HASH>..<HASH> 100644 --- a/lib/namespace.rb +++ b/lib/namespace.rb @@ -64,6 +64,14 @@ module Atomy nil end + def top_down(&blk) + yield @name + @using.each do |u| + Atomy::Namespace.get(u).top_down(&blk) + end + nil + end + def self.define_target Thread.current[:atomy_define_in] || get && get.name.to_s
add Namespace#top_down, which recursively yields the names of the namespaces it uses (depth-first)
diff --git a/lib/knapsack_pro/tracker.rb b/lib/knapsack_pro/tracker.rb index <HASH>..<HASH> 100644 --- a/lib/knapsack_pro/tracker.rb +++ b/lib/knapsack_pro/tracker.rb @@ -90,11 +90,7 @@ module KnapsackPro end def now_without_mock_time - if defined?(Timecop) - Time.now_without_mock_time - else - Time.raw_now - end + Process.clock_gettime(Process::CLOCK_MONOTONIC) end end end
Use Process.clock_gettime to measure track execution time
diff --git a/Loader/ComboLoader.php b/Loader/ComboLoader.php index <HASH>..<HASH> 100644 --- a/Loader/ComboLoader.php +++ b/Loader/ComboLoader.php @@ -221,7 +221,7 @@ class ComboLoader implements Loader private function sanitizeFilenames(array $files, $version) { $filesWithoutVersion = array_map(function ($file) use ($version) { - if (preg_match('/\?' . $version . '$/', $file)) { + if (preg_match('/\?' . preg_quote($version, '/') . '$/', $file)) { return substr($file, 0, -(strlen($version) + 1)); }
EZEE-<I>: Supplement for #<I> (#<I>)
diff --git a/pyqode/cobol/widgets/code_edit.py b/pyqode/cobol/widgets/code_edit.py index <HASH>..<HASH> 100644 --- a/pyqode/cobol/widgets/code_edit.py +++ b/pyqode/cobol/widgets/code_edit.py @@ -5,7 +5,7 @@ import mimetypes import os import sys from pyqode.core import api, panels, modes -from pyqode.core.backend import NotConnected +from pyqode.core.backend import NotRunning from pyqode.core.managers import FileManager from pyqode.core.qt import QtCore, QtGui from pyqode.cobol import modes as cobmodes @@ -37,7 +37,7 @@ class CobolCodeEdit(api.CodeEdit): from pyqode.cobol.backend.workers import set_free_format try: self.backend.send_request(set_free_format, self.free_format) - except NotConnected: + except NotRunning: QtCore.QTimer.singleShot(100, self._update_backend_format) @free_format.setter
Use NotRunning instead of NotConnected
diff --git a/JSAT/test/jsat/math/optimization/BFGSTest.java b/JSAT/test/jsat/math/optimization/BFGSTest.java index <HASH>..<HASH> 100644 --- a/JSAT/test/jsat/math/optimization/BFGSTest.java +++ b/JSAT/test/jsat/math/optimization/BFGSTest.java @@ -52,7 +52,7 @@ public class BFGSTest Random rand = new Random(); Vec x0 = new DenseVector(20); for(int i = 0; i < x0.length(); i++) - x0.set(i, rand.nextDouble()); + x0.set(i, rand.nextDouble()+0.5);//make sure we get to the right local optima RosenbrockFunction f = new RosenbrockFunction(); FunctionVec fp = f.getDerivative();
Make same change as already in LBFGS test so that initial guess should lead us to the global minimum instead of the local one
diff --git a/jquery.peity.js b/jquery.peity.js index <HASH>..<HASH> 100644 --- a/jquery.peity.js +++ b/jquery.peity.js @@ -78,7 +78,7 @@ return this.$svg .empty() - .data('peity', this) + .data('_peity', this) .attr({ height: height, width: width
Fix reference to the Peity chart object from its <svg>.
diff --git a/src/de/mrapp/android/validation/AbstractValidateableView.java b/src/de/mrapp/android/validation/AbstractValidateableView.java index <HASH>..<HASH> 100644 --- a/src/de/mrapp/android/validation/AbstractValidateableView.java +++ b/src/de/mrapp/android/validation/AbstractValidateableView.java @@ -733,6 +733,11 @@ public abstract class AbstractValidateableView<ViewType extends View, ValueType> removeAllValidators(Arrays.asList(validators)); } + @Override + public final void removeAllValidators() { + validators.clear(); + } + /** * Returns the helper text, which is shown, when no validation error is * currently shown. diff --git a/src/de/mrapp/android/validation/Validateable.java b/src/de/mrapp/android/validation/Validateable.java index <HASH>..<HASH> 100644 --- a/src/de/mrapp/android/validation/Validateable.java +++ b/src/de/mrapp/android/validation/Validateable.java @@ -109,6 +109,11 @@ public interface Validateable<Type> { void removeAllValidators(Validator<Type>... validators); /** + * Removes all validators. + */ + void removeAllValidators(); + + /** * Validates the current value of the view. * * @return True, if the current value is valid, false otherwise
Added a method, which allows to remove all validators from a view.
diff --git a/actionpack/lib/action_view/template.rb b/actionpack/lib/action_view/template.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_view/template.rb +++ b/actionpack/lib/action_view/template.rb @@ -18,7 +18,7 @@ module ActionView attr_reader :source, :identifier, :handler, :virtual_path, :formats - def self.finalizer_for(method_name) + Finalizer = proc do |method_name| proc do ActionView::CompiledTemplates.module_eval do remove_possible_method method_name @@ -77,7 +77,6 @@ module ActionView private def compile(locals, view) method_name = build_method_name(locals) - return method_name if view.respond_to?(method_name) locals_code = locals.keys.map! { |key| "#{key} = local_assigns[:#{key}];" }.join @@ -106,7 +105,8 @@ module ActionView begin ActionView::CompiledTemplates.module_eval(source, identifier, line) - ObjectSpace.define_finalizer(self, self.class.finalizer_for(method_name)) + ObjectSpace.define_finalizer(self, Finalizer[method_name]) + method_name rescue Exception => e # errors from template code if logger = (view && view.logger)
Use a constant proc to generate ActionView::Template finalizers. For some strange reason, finalizers created via ActionView::Template.finalizer_for cause Template instances to leak on MRI.
diff --git a/pyfolio/utils.py b/pyfolio/utils.py index <HASH>..<HASH> 100644 --- a/pyfolio/utils.py +++ b/pyfolio/utils.py @@ -224,7 +224,7 @@ def load_portfolio_risk_factors(filepath_prefix=None, start=None, end=None): filepath = filepath_prefix # Is cache recent enough? - if pd.to_datetime(getmtime(filepath), unit='s') >= end: + if pd.to_datetime(getmtime(filepath), unit='s', utc=True) >= end: five_factors = pd.read_hdf(filepath, 'df') else: five_factors = get_fama_french()
BUG Make dt comparison tz aware.
diff --git a/resources/lang/id-ID/cachet.php b/resources/lang/id-ID/cachet.php index <HASH>..<HASH> 100644 --- a/resources/lang/id-ID/cachet.php +++ b/resources/lang/id-ID/cachet.php @@ -33,6 +33,7 @@ return [ 'scheduled' => 'Jadwal Pemeliharaan', 'scheduled_at' => ', dijadwalkan pada :timestamp', 'posted' => 'Dikirim: timestamp', + 'posted_at' => 'Posted at :timestamp', 'status' => [ 1 => 'Investigasi', 2 => 'Teridentifikasi',
New translations cachet.php (Indonesian)
diff --git a/tests/test_buku.py b/tests/test_buku.py index <HASH>..<HASH> 100644 --- a/tests/test_buku.py +++ b/tests/test_buku.py @@ -3,6 +3,7 @@ from itertools import product from unittest import mock from urllib.parse import urlparse import json +import logging import os import signal import sys @@ -726,7 +727,7 @@ def test_copy_to_clipboard(platform, params): params, stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) m_popen_retval.communicate.assert_called_once_with(content) else: - m_popen.assert_not_called() + logging.info('popen is called {} on unrecognized platform'.format(m_popen.call_count)) @pytest.mark.parametrize('export_type, exp_res', [
chg: dev: only inform about popen for now
diff --git a/src/System.php b/src/System.php index <HASH>..<HASH> 100644 --- a/src/System.php +++ b/src/System.php @@ -107,7 +107,7 @@ class System require_once('include/utils/layout_utils.php'); $GLOBALS['mod_strings'] = return_module_language($currentLanguage, 'Administration'); $repair = new \RepairAndClear(); - $repair->repairAndClearAll(array('clearAll'), array(translate('LBL_ALL_MODULES')), $executeSql, true); + $repair->repairAndClearAll(array('clearAll'), array(translate('LBL_ALL_MODULES')), $executeSql, true, ''); ob_end_flush(); //remove the js language files @@ -116,12 +116,6 @@ class System } else { \LanguageManager::removeJSLanguageFiles(); } - //remove language cache files - if (!method_exists('LanguageManager', 'clearLanguageCache')) { - $this->getLogger()->warning('No clearLanguageCache method (sugar too old?). Check that it\'s clean.'); - } else { - \LanguageManager::clearLanguageCache(); - } $this->tearDown();
Removed useless call in quick repair + solved the bug with the api cache not cleared
diff --git a/actionpack/lib/action_view/helpers/cache_helper.rb b/actionpack/lib/action_view/helpers/cache_helper.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_view/helpers/cache_helper.rb +++ b/actionpack/lib/action_view/helpers/cache_helper.rb @@ -51,7 +51,9 @@ module ActionView # This dance is needed because Builder can't use capture pos = output_buffer.length yield - fragment = output_buffer.slice!(pos..-1) + safe_output_buffer = output_buffer.to_str + fragment = safe_output_buffer.slice!(pos..-1) + self.output_buffer = ActionView::OutputBuffer.new(safe_output_buffer) controller.write_fragment(name, fragment, options) end end
Fragment caching needs to operate on the pure output, not the safebuffer.
diff --git a/src/main/java/com/coveros/selenified/Selenified.java b/src/main/java/com/coveros/selenified/Selenified.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/coveros/selenified/Selenified.java +++ b/src/main/java/com/coveros/selenified/Selenified.java @@ -566,11 +566,7 @@ public class Selenified { */ private static List<Browser> getBrowserInput() throws InvalidBrowserException { List<Browser> browsers = new ArrayList<>(); - // null input check - if (System.getProperty(BROWSER) == null) { - return browsers; - } - String[] browserInput = System.getProperty(BROWSER).split(","); + String[] browserInput = Property.getBrowser().split(","); for (String singleBrowserInput : browserInput) { browsers.add(new Browser(singleBrowserInput)); }
Fixing issue with Selenified properties
diff --git a/lib/typhoid/queued_request.rb b/lib/typhoid/queued_request.rb index <HASH>..<HASH> 100644 --- a/lib/typhoid/queued_request.rb +++ b/lib/typhoid/queued_request.rb @@ -8,11 +8,11 @@ module Typhoid self.request = Request.new(req.request_uri, req.options) self.klass = req.klass self.target = target - hydra.queue(self.request) + hydra.queue(request) end def on_complete - self.request.on_complete do + request.on_complete do yield self if block_given? end end @@ -22,11 +22,7 @@ module Typhoid end def response - self.request.response - end - - def klass - @klass + request.response end end end
don't use self unless necessary
diff --git a/paxtools-console/src/main/java/org/biopax/paxtools/PaxtoolsMain.java b/paxtools-console/src/main/java/org/biopax/paxtools/PaxtoolsMain.java index <HASH>..<HASH> 100644 --- a/paxtools-console/src/main/java/org/biopax/paxtools/PaxtoolsMain.java +++ b/paxtools-console/src/main/java/org/biopax/paxtools/PaxtoolsMain.java @@ -110,7 +110,8 @@ public class PaxtoolsMain { public static void toGSEA(String[] argv) throws IOException { Model model = io.convertFromOWL(new FileInputStream(argv[1])); - (new GSEAConverter(argv[3], new Boolean(argv[4]))).writeToGSEA(model, new FileOutputStream(argv[2])); + Boolean specCheckEnabled = (argv.length>4) ? new Boolean(argv[4]) : Boolean.FALSE; + (new GSEAConverter(argv[3], specCheckEnabled)).writeToGSEA(model, new FileOutputStream(argv[2])); } public static void getNeighbors(String[] argv) throws IOException
Fix: the lats optional parameter in the toGSEA command was in fact a must have.
diff --git a/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java index <HASH>..<HASH> 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java @@ -1318,4 +1318,19 @@ public abstract class XMPPConnection { public FromMode getFromMode() { return this.fromMode; } + + @Override + protected void finalize() throws Throwable { + try { + // It's usually not a good idea to rely on finalize. But this is the easiest way to + // avoid the "Smack Listener Processor" leaking. The thread(s) of the executor have a + // reference to their ExecutorService which prevents the ExecutorService from being + // gc'ed. It is possible that the XMPPConnection instance is gc'ed while the + // listenerExecutor ExecutorService call not be gc'ed until it got shut down. + listenerExecutor.shutdownNow(); + } + finally { + super.finalize(); + } + } }
Shutdown listenerExecutor to prevent the Thread from leaking listenerExecutor needs to get shutdown once it is no longer required. SMACK-<I>
diff --git a/src/widgets/SidebarMenu.php b/src/widgets/SidebarMenu.php index <HASH>..<HASH> 100644 --- a/src/widgets/SidebarMenu.php +++ b/src/widgets/SidebarMenu.php @@ -19,7 +19,7 @@ class SidebarMenu extends \hiqdev\yii2\menus\widgets\Menu /** * {@inheritdoc} */ - public $linkTemplate = '<a href="{url}">{icon} <span>{label}</span> {arrow}</a>'; + public $linkTemplate = '<a href="{url}" {linkOptions}>{icon} <span>{label}</span> {arrow}</a>'; /** * {@inheritdoc}
added link options attribute to sidebar menu (#9) * added link options attribute to sidebar menu * minor
diff --git a/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java b/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java index <HASH>..<HASH> 100644 --- a/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java +++ b/src/main/java/se/bjurr/gitchangelog/api/GitChangelogApiConstants.java @@ -4,7 +4,7 @@ public final class GitChangelogApiConstants { public static final String ZERO_COMMIT = "0000000000000000000000000000000000000000"; public static final String REF_MASTER = "master"; - public static final boolean DEFAULT_REMOVE_ISSUE = true; + public static final boolean DEFAULT_REMOVE_ISSUE = false; public static final String DEFAULT_TIMEZONE = "UTC"; public static final String DEFAULT_DATEFORMAT = "yyyy-MM-dd HH:mm:ss"; public static final String DEFAULT_IGNORE_COMMITS_REGEXP = "";
fix: not removing issue from message by default
diff --git a/lib/ArangoDBClient/ConnectionOptions.php b/lib/ArangoDBClient/ConnectionOptions.php index <HASH>..<HASH> 100644 --- a/lib/ArangoDBClient/ConnectionOptions.php +++ b/lib/ArangoDBClient/ConnectionOptions.php @@ -375,6 +375,7 @@ class ConnectionOptions implements \ArrayAccess if (isset($this->_values[self::OPTION_HOST]) && !isset($this->_values[self::OPTION_ENDPOINT])) { // upgrade host/port to an endpoint $this->_values[self::OPTION_ENDPOINT] = 'tcp://' . $this->_values[self::OPTION_HOST] . ':' . $this->_values[self::OPTION_PORT]; + unset($this->_values[self::OPTION_HOST]); } }
Fixed issue when multiple calls to validate method triggers "must not specify both host and endpoint" exception
diff --git a/src/server/worker/master.go b/src/server/worker/master.go index <HASH>..<HASH> 100644 --- a/src/server/worker/master.go +++ b/src/server/worker/master.go @@ -868,12 +868,17 @@ func (a *APIServer) receiveSpout(ctx context.Context, logger *taggedLogger) (ret retErr = err } }() + hasFile := false for { fileHeader, err := outTar.Next() if err == io.EOF { fmt.Println("tar EOF") + if !hasFile { + continue + } break } + hasFile = true fmt.Println("next file is", fileHeader.Name) fmt.Println("file size is", fileHeader.Size)
don't make empty commits when spouting
diff --git a/cheetah_lint/flake.py b/cheetah_lint/flake.py index <HASH>..<HASH> 100644 --- a/cheetah_lint/flake.py +++ b/cheetah_lint/flake.py @@ -323,10 +323,18 @@ def check_indentation(cheetah_by_line_no): return tuple(errors) +def check_empty(cheetah_by_line_no): + if not ''.join(cheetah_by_line_no).strip(): + return ((1, 'T005 File is empty'),) + else: + return () + + LINE_CHECKS = ( check_implements, check_extends_cheetah_template, check_indentation, + check_empty, ) diff --git a/tests/flake_test.py b/tests/flake_test.py index <HASH>..<HASH> 100644 --- a/tests/flake_test.py +++ b/tests/flake_test.py @@ -215,7 +215,7 @@ def test_find_bounds_above_and_below(py_line): def test_get_flakes_trivial(): - assert get_flakes('') == () + assert get_flakes('') == ((1, 'T005 File is empty'),) def test_with_extends():
Make the trivial template an error. Resolves Yelp/yelp_cheetah#<I>
diff --git a/test/parser_test.rb b/test/parser_test.rb index <HASH>..<HASH> 100644 --- a/test/parser_test.rb +++ b/test/parser_test.rb @@ -85,6 +85,15 @@ module Haml end end + test "case with indented whens should allow else" do + begin + parse "- foo = 1\n-case foo\n -when 1\n A\n -else\n B" + assert true + rescue SyntaxError + flunk 'case with indented whens should allow else' + end + end + private def parse(haml, options = nil)
Add test for case with indented when clauses Case statements where the subsequent when clauses are indented and which have a trailing else cause a Haml::SyntaxError. Add test to expose this.
diff --git a/spec/simple_matchers.rb b/spec/simple_matchers.rb index <HASH>..<HASH> 100644 --- a/spec/simple_matchers.rb +++ b/spec/simple_matchers.rb @@ -26,3 +26,19 @@ def include_hash(hash) given.merge(hash) == given end end + +def memory_usage + GC.start # Garbage collect + `ps -o rss= -p #{$$}`.strip.to_i +end + +def leak_memory + simple_matcher("leak memory") do |given| + memory_before = memory_usage + given.call + memory_after = memory_usage + result = memory_after > memory_before + puts "#{memory_after} > #{memory_before}" if result + result + end +end
Added simple matcher (currently unused) for observing memory leaks
diff --git a/src/Symfony/Component/Workflow/Tests/RegistryTest.php b/src/Symfony/Component/Workflow/Tests/RegistryTest.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Workflow/Tests/RegistryTest.php +++ b/src/Symfony/Component/Workflow/Tests/RegistryTest.php @@ -35,7 +35,13 @@ class RegistryTest extends TestCase */ public function testAddIsDeprecated() { - $this->registry->add(new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), $this->createSupportStrategy(Subject1::class)); + $registry = new Registry(); + + $registry->add($w = new Workflow(new Definition(array(), array()), $this->getMockBuilder(MarkingStoreInterface::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock(), 'workflow1'), $this->createSupportStrategy(Subject1::class)); + + $workflow = $registry->get(new Subject1()); + $this->assertInstanceOf(Workflow::class, $workflow); + $this->assertSame('workflow1', $workflow->getName()); } public function testGetWithSuccess()
[Workflow] Avoid risky tests
diff --git a/json2html/jsonconv.py b/json2html/jsonconv.py index <HASH>..<HASH> 100644 --- a/json2html/jsonconv.py +++ b/json2html/jsonconv.py @@ -118,7 +118,7 @@ class JSON: for k,v in ordered_json.iteritems(): convertedOutput = convertedOutput + '<tr>' - convertedOutput = convertedOutput + '<th>'+ str(k) +'</th>' + convertedOutput = convertedOutput + '<th>'+ markup(k) +'</th>' if (v == None): v = unicode("")
fix of issue #<I> prevents UnicodeEncodeError when a json-key contains non-ascii characters
diff --git a/src/libs/Cron.php b/src/libs/Cron.php index <HASH>..<HASH> 100644 --- a/src/libs/Cron.php +++ b/src/libs/Cron.php @@ -73,7 +73,10 @@ class Cron ob_start(); - $controllerObj = new $controller( $app ); + $controllerObj = new $controller; + + if (method_exists($controllerObj, 'injectApp')) + $controllerObj->injectApp($this->app); if( !method_exists( $controllerObj, 'cron' ) ) echo "$controller\-\>cron($command) does not exist\n";
use new way to inject app into controllers
diff --git a/lib/harvest/time_entry.rb b/lib/harvest/time_entry.rb index <HASH>..<HASH> 100644 --- a/lib/harvest/time_entry.rb +++ b/lib/harvest/time_entry.rb @@ -17,6 +17,7 @@ module Harvest element :created_at, Time element :updated_at, Time element :user_id, Integer + element :of_user, Integer element :closed, Boolean, :tag => 'is-closed' element :billed, Boolean, :tag => 'is-billed' element :of_user, Integer
Added of_user element to time_entry and added it to the to_xml function
diff --git a/src/Window.js b/src/Window.js index <HASH>..<HASH> 100644 --- a/src/Window.js +++ b/src/Window.js @@ -1438,5 +1438,6 @@ global.onexit = () => { } AudioContext.Destroy(); + nativeWindow.destroyThreadPool(); }; // global.setImmediate = undefined; // need this for the TLS implementation
Call native window destroy thread pool on exit
diff --git a/share/examples/plugins/templates/hooks.py b/share/examples/plugins/templates/hooks.py index <HASH>..<HASH> 100755 --- a/share/examples/plugins/templates/hooks.py +++ b/share/examples/plugins/templates/hooks.py @@ -43,10 +43,10 @@ def post_init(setup_config): # Example 2: initiate observer execution status core_template_observer.ExecutionStatusObserver() - import gtkmvc3_template_observer - # Example 3: gtkmvc3 generale modification observer + import gtkmvc_template_observer + # Example 3: gtkmvc3 general modification observer # initiate observer of root_state model-object which already implements a power full recursive notification pattern - gtkmvc3_template_observer.RootStateModificationObserver() + gtkmvc_template_observer.RootStateModificationObserver() # Example 4: gtkmvc3 meta signal observer - gtkmvc3_template_observer.MetaSignalModificationObserver() + gtkmvc_template_observer.MetaSignalModificationObserver()
fix(plugin template): fix imports those were accidently introduced by a automatic find-replace for gtkmvc
diff --git a/src/main/java/hex/deeplearning/DeepLearning.java b/src/main/java/hex/deeplearning/DeepLearning.java index <HASH>..<HASH> 100644 --- a/src/main/java/hex/deeplearning/DeepLearning.java +++ b/src/main/java/hex/deeplearning/DeepLearning.java @@ -248,6 +248,7 @@ public class DeepLearning extends Job.ValidatedJob { "variable_importances", "force_load_balance", "replicate_training_data", + "shuffle_training_data", "single_node_mode", };
Allow change in whether to shuffle training data after checkpoint restart.
diff --git a/eZ/Bundle/EzPublishDebugBundle/Collector/PersistenceCacheCollector.php b/eZ/Bundle/EzPublishDebugBundle/Collector/PersistenceCacheCollector.php index <HASH>..<HASH> 100644 --- a/eZ/Bundle/EzPublishDebugBundle/Collector/PersistenceCacheCollector.php +++ b/eZ/Bundle/EzPublishDebugBundle/Collector/PersistenceCacheCollector.php @@ -44,7 +44,7 @@ class PersistenceCacheCollector extends DataCollector /** * Returns call count. * - * @deprecaterd since 7.5, use getStats(). + * @deprecated since 7.5, use getStats(). * * @return int */
fixed annotation typo y the persistence cache collector file (#<I>)
diff --git a/alchemyjsonschema/dictify.py b/alchemyjsonschema/dictify.py index <HASH>..<HASH> 100644 --- a/alchemyjsonschema/dictify.py +++ b/alchemyjsonschema/dictify.py @@ -125,12 +125,12 @@ def normalize(ob, schema, convert=normalize_of, getter=dict.get, registry=normal convert = partial(convert, registry=registry) return dictify_properties(ob, schema["properties"], convert=convert, getter=getter) + def prepare(ob, schema, convert=prepare_of, getter=dict.get, registry=prepare_dict): convert = partial(convert, registry=registry) return dictify_properties(ob, schema["properties"], convert=convert, getter=getter) - def dictify_properties(ob, properties, convert, getter, marker=marker): if ob is None: return None @@ -216,10 +216,10 @@ def _objectify(params, name, schema, modellookup): if params is None: return [] if type_ == "array" else None # xxx - if name not in params: - return None - elif type_ == "array": + if type_ == "array": return [_objectify_subobject(e, name, schema["items"], modellookup) for e in params.get(name, [])] + elif name not in params: + return None elif type_ is None: # object sub_params = params.get(name) if sub_params is None:
fix bug on relatipnship list like property
diff --git a/spec/unit/type/file/mode_spec.rb b/spec/unit/type/file/mode_spec.rb index <HASH>..<HASH> 100755 --- a/spec/unit/type/file/mode_spec.rb +++ b/spec/unit/type/file/mode_spec.rb @@ -192,4 +192,29 @@ describe Puppet::Type.type(:file).attrclass(:mode) do (stat.mode & 0777).to_s(8).should == "644" end end + + describe '#sync with a symbolic mode of +X for a file' do + let(:resource_sym) { Puppet::Type.type(:file).new :path => path, :mode => 'g+wX' } + let(:mode_sym) { resource_sym.property(:mode) } + + before { FileUtils.touch(path) } + + it 'does not change executable bit if no executable bit is set' do + Puppet::FileSystem.chmod(0644, path) + + mode_sym.sync + + stat = Puppet::FileSystem.stat(path) + (stat.mode & 0777).to_s(8).should == '664' + end + + it 'does change executable bit if an executable bit is set' do + Puppet::FileSystem.chmod(0744, path) + + mode_sym.sync + + stat = Puppet::FileSystem.stat(path) + (stat.mode & 0777).to_s(8).should == '774' + end + end end
(PUP-<I>) Add example to test for +X mode changes in file types. Adding an example to test applying mode +X to files. For files, a mode change of +X changes the requested executable bit only if there is already an executable bit set in the permissions.
diff --git a/src/Rememberable.php b/src/Rememberable.php index <HASH>..<HASH> 100644 --- a/src/Rememberable.php +++ b/src/Rememberable.php @@ -11,7 +11,11 @@ trait Rememberable protected static function bootRememberable() { if (static::rememberable()) { - static::saving(function (Model $model) { + static::saved(function (Model $model) { + $model->flush(get_class($model).':'.$model->getKey()); + }); + + static::deleted(function (Model $model) { $model->flush(get_class($model).':'.$model->getKey()); }); }
Make rememberable cache flushes trigger on deletes too
diff --git a/test/spec/ol/color.test.js b/test/spec/ol/color.test.js index <HASH>..<HASH> 100644 --- a/test/spec/ol/color.test.js +++ b/test/spec/ol/color.test.js @@ -120,10 +120,6 @@ describe('ol.color', function() { [0, 0, 255, 0.4711]); }); - it.skip('caches parsed values', function() { - // TODO is this untestable with named exports? - }); - it('throws an error on invalid colors', function() { var invalidColors = ['tuesday', '#12345', '#1234567', 'rgb(255.0,0,0)']; var i, ii;
Remove unneeded and already skipped test
diff --git a/twitter_ads/campaign.py b/twitter_ads/campaign.py index <HASH>..<HASH> 100644 --- a/twitter_ads/campaign.py +++ b/twitter_ads/campaign.py @@ -177,6 +177,7 @@ resource_property(LineItem, 'bid_unit') resource_property(LineItem, 'automatically_select_bid', transform=TRANSFORM.BOOL) resource_property(LineItem, 'bid_amount_local_micro') resource_property(LineItem, 'total_budget_amount_local_micro') +resource_property(LineItem, 'bid_type') class Tweet(object):
Add bid_type property to LineItem (#<I>)
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -1,7 +1,7 @@ var nthCheck = require("./"), assert = require("assert"); -var invalid = ["-", "asdf", "2n+-0", "2+0", "- 1n", "-1 n"]; +var invalid = ["-", "- 1n", "-1 n", "2+0", "2n+-0", "an+b", "asdf", "b", "expr", "odd|even|x"]; function parseInvalid(){ invalid.forEach(function(formula){
reordered, added invalid tests
diff --git a/TYPO3.Neos.NodeTypes/Migrations/Code/Version20130911165500.php b/TYPO3.Neos.NodeTypes/Migrations/Code/Version20130911165500.php index <HASH>..<HASH> 100644 --- a/TYPO3.Neos.NodeTypes/Migrations/Code/Version20130911165500.php +++ b/TYPO3.Neos.NodeTypes/Migrations/Code/Version20130911165500.php @@ -59,5 +59,3 @@ class Version20130911165500 extends AbstractMigration { } } - -?> \ No newline at end of file
[TASK] CGL Cleanup This change is purely cosmetic and fixes CGL issues. Change-Id: I<I>dac<I>cd<I>f9cd1c<I>e<I>a<I>e<I>d2fc0c Releases: master, <I> Reviewed-on: <URL>
diff --git a/cdpybio/bedtools.py b/cdpybio/bedtools.py index <HASH>..<HASH> 100644 --- a/cdpybio/bedtools.py +++ b/cdpybio/bedtools.py @@ -1,3 +1,4 @@ +import copy import pandas as pd import pybedtools as pbt @@ -46,6 +47,7 @@ def beds_to_boolean(beds, ref=None, beds_sorted=False, ref_sorted=False, that overlaps each interval in the reference bed file. """ + beds = copy.deepcopy(beds) fns = [] for i,v in enumerate(beds): if type(v) == str: @@ -101,6 +103,7 @@ def combine(beds, beds_sorted=False, postmerge=True): New sorted BedTool with intervals from all input beds. """ + beds = copy.deepcopy(beds) for i,v in enumerate(beds): if type(v) == str: beds[i] = pbt.BedTool(v)
Update Make deepcopy of input bed file list to avoid changing values.
diff --git a/pelix/http/basic.py b/pelix/http/basic.py index <HASH>..<HASH> 100644 --- a/pelix/http/basic.py +++ b/pelix/http/basic.py @@ -636,7 +636,7 @@ class HttpService(object): self._logger = logging.getLogger(self._logger_name) if self._logger_level is None: - self._logger_level = logging.root.level + self._logger.level = logging.INFO else: self._logger.level = int(self._logger_level)
The default level of HTTP logging is now INFO INFO level allows to print component records and errors, but hides the requests records
diff --git a/builtin/logical/database/path_config_connection.go b/builtin/logical/database/path_config_connection.go index <HASH>..<HASH> 100644 --- a/builtin/logical/database/path_config_connection.go +++ b/builtin/logical/database/path_config_connection.go @@ -8,6 +8,7 @@ import ( "strings" "github.com/fatih/structs" + "github.com/hashicorp/errwrap" uuid "github.com/hashicorp/go-uuid" "github.com/hashicorp/vault/sdk/database/dbplugin" "github.com/hashicorp/vault/sdk/framework" @@ -217,7 +218,7 @@ func (b *databaseBackend) connectionDeleteHandler() framework.OperationFunc { err := req.Storage.Delete(ctx, fmt.Sprintf("config/%s", name)) if err != nil { - return nil, errors.New("failed to delete connection configuration") + return nil, errwrap.Wrapf("failed to delete connection configuration: {{err}}", err) } if err := b.ClearConnection(name); err != nil {
Fix issue deleting DB connections on Secondaries (#<I>)
diff --git a/lib/actions/DashDeploy.js b/lib/actions/DashDeploy.js index <HASH>..<HASH> 100644 --- a/lib/actions/DashDeploy.js +++ b/lib/actions/DashDeploy.js @@ -113,7 +113,6 @@ module.exports = function(SPlugin, serverlessPath) { // Flow return BbPromise.try(function() { - SCli.asciiGreeting(); }) .bind(_this) .then(_this._validateAndPrepare) @@ -239,6 +238,9 @@ module.exports = function(SPlugin, serverlessPath) { } } + // Show ASCII + SCli.asciiGreeting(); + // Show select input return _this.cliPromptSelect(_this.componentName + '/' + _this.moduleName + ' - Select the functions and endpoints you wish to deploy', choices, true, 'Deploy') .then(function(items) {
DashDeploy: don't show ASCII if not in correct folder
diff --git a/phy/io/mock/artificial.py b/phy/io/mock/artificial.py index <HASH>..<HASH> 100644 --- a/phy/io/mock/artificial.py +++ b/phy/io/mock/artificial.py @@ -48,6 +48,10 @@ def artificial_spike_times(n_spikes, max_isi=50): return np.cumsum(nr.randint(low=0, high=max_isi, size=n_spikes)) +def artificial_correlograms(n_clusters, n_samples): + return nr.uniform(size=(n_clusters, n_clusters, n_samples)) + + #------------------------------------------------------------------------------ # Artificial Model #------------------------------------------------------------------------------
Added artificial correlograms.
diff --git a/visidata/threads.py b/visidata/threads.py index <HASH>..<HASH> 100644 --- a/visidata/threads.py +++ b/visidata/threads.py @@ -380,6 +380,7 @@ def codestr(code): return code.co_name ThreadsSheet.addCommand('^C', 'cancel-thread', 'cancelThread(cursorRow)', 'abort thread at current row') +ThreadsSheet.addCommand(None, 'add-row', 'fail("cannot add new rows on Threads Sheet")', 'invalid command') ProfileSheet.addCommand('z^S', 'save-profile', 'source.dump_stats(input("save profile to: ", value=name+".prof"))', 'save profile')
[threads] disable add-row on ThreadsSheet #<I>
diff --git a/pyemu/utils/helpers.py b/pyemu/utils/helpers.py index <HASH>..<HASH> 100644 --- a/pyemu/utils/helpers.py +++ b/pyemu/utils/helpers.py @@ -64,7 +64,7 @@ def start_slaves(slave_dir,exe_rel_path,pst_rel_path,num_slaves=None,slave_root= new_slave_dir = os.path.join(slave_root,"slave_{0}".format(i)) if os.path.exists(new_slave_dir): try: - shutil.rmtree(new_slave_dir, onerror=del_rw) + shutil.rmtree(new_slave_dir)#, onerror=del_rw) except Exception as e: raise Exception("unable to remove existing slave dir:" + \ "{0}\n{1}".format(new_slave_dir,str(e)))
bug fix in start_slaves
diff --git a/app/helpers/menu.rb b/app/helpers/menu.rb index <HASH>..<HASH> 100644 --- a/app/helpers/menu.rb +++ b/app/helpers/menu.rb @@ -22,8 +22,8 @@ module Menu end end def render_menu(level) - @menu_items ||=create_menu - render_navigation(:items=>@menu_items, :expand_all=>true, :level => level) + @menu_items ||= create_menu + render_navigation(:items=>Support.deep_copy(@menu_items), :expand_all=>true, :level => level) end def create_menu diff --git a/app/models/support.rb b/app/models/support.rb index <HASH>..<HASH> 100644 --- a/app/models/support.rb +++ b/app/models/support.rb @@ -14,4 +14,10 @@ module Support def Support.deep_copy object Marshal::load(Marshal.dump(object)) end + + def Support.time + a = Time.now + yield + Time.now - a + end end
Added code to fix a menu highlighting issue
diff --git a/app/templates/src/main/java/package/aop/logging/_LoggingAspect.java b/app/templates/src/main/java/package/aop/logging/_LoggingAspect.java index <HASH>..<HASH> 100644 --- a/app/templates/src/main/java/package/aop/logging/_LoggingAspect.java +++ b/app/templates/src/main/java/package/aop/logging/_LoggingAspect.java @@ -33,7 +33,7 @@ public class LoggingAspect { @AfterThrowing(pointcut = "loggingPointcut()", throwing = "e") public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { if (env.acceptsProfiles(Constants.SPRING_PROFILE_DEVELOPMENT)) { - log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(), + log.error("Exception in {}.{}() with cause = {} and exception {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause(), e); } else { log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(),
Correct logging aspect number of params in msg Correct logging aspect number of params in msg
diff --git a/forms/FieldList.php b/forms/FieldList.php index <HASH>..<HASH> 100644 --- a/forms/FieldList.php +++ b/forms/FieldList.php @@ -550,7 +550,12 @@ class FieldList extends ArrayList { public function makeFieldReadonly($field) { $fieldName = ($field instanceof FormField) ? $field->getName() : $field; $srcField = $this->dataFieldByName($fieldName); - $this->replaceField($fieldName, $srcField->performReadonlyTransformation()); + if($srcField) { + $this->replaceField($fieldName, $srcField->performReadonlyTransformation()); + } + else { + user_error("Trying to make field '$fieldName' readonly, but it does not exist in the list",E_USER_WARNING); + } } /**
Have a clear error message Because it's really annoying not knowing which field causes the error
diff --git a/core-bundle/src/Resources/contao/classes/Versions.php b/core-bundle/src/Resources/contao/classes/Versions.php index <HASH>..<HASH> 100644 --- a/core-bundle/src/Resources/contao/classes/Versions.php +++ b/core-bundle/src/Resources/contao/classes/Versions.php @@ -630,7 +630,7 @@ class Versions extends \Controller // Add the "even" and "odd" classes foreach ($arrVersions as $k=>$v) { - $arrVersions[$k]['class'] = (++$intCount%2 == 0) ? 'even' : 'odd'; + $arrVersions[$k]['class'] = (++$intCount % 2 == 0) ? 'even' : 'odd'; try { @@ -646,6 +646,13 @@ class Versions extends \Controller --$intCount; unset($arrVersions[$k]); } + + // Skip deleted files (see #8480) + if ($v['fromTable'] == 'tl_files' && $arrVersions[$k]['deleted']) + { + --$intCount; + unset($arrVersions[$k]); + } } $objTemplate->versions = $arrVersions;
[Core] Do not show version entries of deleted files (see #<I>).
diff --git a/integration/v7/isolated/curl_command_test.go b/integration/v7/isolated/curl_command_test.go index <HASH>..<HASH> 100644 --- a/integration/v7/isolated/curl_command_test.go +++ b/integration/v7/isolated/curl_command_test.go @@ -473,7 +473,13 @@ var _ = Describe("curl command", func() { Expect(session).Should(Say("X-Bar: bar")) Expect(session).Should(Say("X-Foo: foo")) - Expect(session).Should(Say(jsonBody)) + contents := string(session.Out.Contents()) + outputContents := contents[strings.Index(contents, "X-Foo: foo"):] + jsonStartsAt := strings.Index(outputContents, "{") + jsonEndsAt := strings.Index(outputContents[jsonStartsAt:], "}") + + actualJSON := outputContents[jsonStartsAt : jsonStartsAt+jsonEndsAt+1] + Expect(actualJSON).To(MatchJSON(jsonBody)) Expect(session).Should(Say("RESPONSE:"))
curl json output changes requires more complex output validation This change corrisponds to the same change done in <I>a<I>ba<I>e2bbe<I>d<I>c<I>cefa<I>abaaf.
diff --git a/source/rafcon/statemachine/library_manager.py b/source/rafcon/statemachine/library_manager.py index <HASH>..<HASH> 100644 --- a/source/rafcon/statemachine/library_manager.py +++ b/source/rafcon/statemachine/library_manager.py @@ -85,6 +85,8 @@ class LibraryManager(Observable): @staticmethod def _clean_path(path): + path = path.replace('"', '') + path = path.replace("'", '') # Replace ~ with /home/user path = os.path.expanduser(path) # Replace environment variables
Allow library paths to be wrapped in quotations marks
diff --git a/clients/unshaded/src/test/java/tachyon/client/file/options/InStreamOptionsTest.java b/clients/unshaded/src/test/java/tachyon/client/file/options/InStreamOptionsTest.java index <HASH>..<HASH> 100644 --- a/clients/unshaded/src/test/java/tachyon/client/file/options/InStreamOptionsTest.java +++ b/clients/unshaded/src/test/java/tachyon/client/file/options/InStreamOptionsTest.java @@ -51,11 +51,13 @@ public class InStreamOptionsTest { @Test public void modifiedConfTest() { + TachyonConf originalConf = ClientContext.getConf(); TachyonConf conf = new TachyonConf(); conf.set(Constants.USER_FILE_READ_TYPE_DEFAULT, ReadType.NO_CACHE.toString()); Whitebox.setInternalState(ClientContext.class, "sTachyonConf", conf); InStreamOptions options = InStreamOptions.defaults(); Assert.assertEquals(ReadType.NO_CACHE.getTachyonStorageType(), options.getTachyonStorageType()); + Whitebox.setInternalState(ClientContext.class, "sTachyonConf", originalConf); } }
restore conf in instream test.
diff --git a/contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py b/contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py index <HASH>..<HASH> 100644 --- a/contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py +++ b/contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py @@ -32,7 +32,7 @@ class GoDistribution(object): register('--supportdir', advanced=True, default='bin/go', help='Find the go distributions under this dir. Used as part of the path to lookup ' 'the distribution with --binary-util-baseurls and --pants-bootstrapdir') - register('--version', advanced=True, default='1.5.2', + register('--version', advanced=True, default='1.5.3', help='Go distribution version. Used as part of the path to lookup the distribution ' 'with --binary-util-baseurls and --pants-bootstrapdir')
Bump the default Go distribution to <I>. This picks up a security related fix. Release announcement here: <URL>
diff --git a/commands/topics_info.js b/commands/topics_info.js index <HASH>..<HASH> 100644 --- a/commands/topics_info.js +++ b/commands/topics_info.js @@ -38,7 +38,7 @@ function topicInfo (topic) { }, { name: 'Replication Factor', - values: [`${topic.replication_factor} (recommend > 1)`] + values: [`${topic.replication_factor}`] } ] diff --git a/test/commands/topics_info_test.js b/test/commands/topics_info_test.js index <HASH>..<HASH> 100644 --- a/test/commands/topics_info_test.js +++ b/test/commands/topics_info_test.js @@ -62,7 +62,7 @@ describe('kafka:topics:info', () => { Producers: 0 messages/second (0 bytes/second) total Consumers: 0 bytes/second total Partitions: 3 partitions -Replication Factor: 3 (recommend > 1) +Replication Factor: 3 Compaction: Compaction is disabled for topic-1 Retention: 24 hours `))
remove replication factor recommendation (#<I>)
diff --git a/nion/swift/model/DocumentModel.py b/nion/swift/model/DocumentModel.py index <HASH>..<HASH> 100644 --- a/nion/swift/model/DocumentModel.py +++ b/nion/swift/model/DocumentModel.py @@ -1095,6 +1095,10 @@ class DocumentModel(Observable.Observable, ReferenceCounting.ReferenceCounted, P def close(self): # stop computations with self.__computation_queue_lock: + for computation_queue_item in self.__computation_queue: + if computation_queue_item.finish_event: + computation_queue_item.finish_event.set() + computation_queue_item.finish_event = None self.__computation_queue.clear() # close hardware source related stuff
Fix deadlock when closing computation queue at exit.
diff --git a/owslib/iso.py b/owslib/iso.py index <HASH>..<HASH> 100644 --- a/owslib/iso.py +++ b/owslib/iso.py @@ -541,7 +541,7 @@ class SV_ServiceIdentification(object): self.version = None self.fees = None self.bbox = None - self.couplingtype + self.couplingtype = None self.operations = [] self.operateson = [] else: @@ -661,7 +661,7 @@ class EX_Polygon(object): class EX_GeographicBoundingPolygon(object): def __init__(self, md=None): if md is None: - self.is_extent + self.is_extent = None self.polygons = [] else: val = md.find(util.nspath_eval('gmd:extentTypeCode', namespaces))
Added missing initializations (thanks Matej Krejci)
diff --git a/src/Plugin.php b/src/Plugin.php index <HASH>..<HASH> 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -72,6 +72,11 @@ class Plugin extends AbstractPlugin $requestId = uniqid(); $this->logger->debug('[' . $requestId . ']Found url: ' . $url); + if (count($parsedUrl) == 1 && isset($parsedUrl['path'])) { + $url = 'http://' . $parsedUrl['path'] . '/'; + $this->logger->debug('[' . $requestId . ']Corrected url: ' . $url); + } + if ($this->emitUrlEvents($requestId, $url, $event, $queue)) { $this->logger->debug('[' . $requestId . ']Emitting: http.request'); $logger = $this->logger;
Corrected URL when only a hostname is found
diff --git a/src/Handler.php b/src/Handler.php index <HASH>..<HASH> 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -7,6 +7,6 @@ interface Handler public function read($id); public function write($id, $data); public function destroy($id); - public function gc(); + public function gc($maxlifetime); }
for compatibility with phps built-in interface
diff --git a/lib/queue/worker.js b/lib/queue/worker.js index <HASH>..<HASH> 100644 --- a/lib/queue/worker.js +++ b/lib/queue/worker.js @@ -175,6 +175,8 @@ Worker.prototype.getJob = function(fn){ // BLPOP indicates we have a new inactive job to process client.blpop('q:' + self.type + ':jobs', 0, function(err) { + // Set job to a temp value so shutdown() knows to wait + self.job = true; self.zpop('q:jobs:' + self.type + ':inactive', function(err, id){ if (err) return fn(err); if (!id) return fn(); @@ -196,9 +198,6 @@ Worker.prototype.shutdown = function(fn, timeout) { if (!this.running) return fn(); this.running = false; - // Close redis connection (if zpopping, break it) - this.client.end(); - // As soon as we're free, signal that we're done if (!this.job) return fn();
Fix race condition with blpop/zpop flow & shutdown
diff --git a/python/setup.py b/python/setup.py index <HASH>..<HASH> 100644 --- a/python/setup.py +++ b/python/setup.py @@ -35,7 +35,7 @@ if platform == 'darwin': setup( name = 'cm_api', - version = '10.0.0', # Compatible with API v10 (CM 5.4) + version = '11.0.0', # Compatible with API v11 (CM 5.5) packages = find_packages('src', exclude=['cm_api_tests']), package_dir = {'cm_api': 'src/cm_api', 'cm_shell': 'src/cm_shell'}, diff --git a/python/src/cm_api/api_client.py b/python/src/cm_api/api_client.py index <HASH>..<HASH> 100644 --- a/python/src/cm_api/api_client.py +++ b/python/src/cm_api/api_client.py @@ -30,7 +30,7 @@ __docformat__ = "epytext" LOG = logging.getLogger(__name__) API_AUTH_REALM = "Cloudera Manager" -API_CURRENT_VERSION = 10 +API_CURRENT_VERSION = 11 class ApiException(RestException): """
Bump API version to <I> for CM <I>
diff --git a/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ImportJob.java b/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ImportJob.java index <HASH>..<HASH> 100644 --- a/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ImportJob.java +++ b/bigtable-dataflow-parent/bigtable-beam-import/src/main/java/com/google/cloud/bigtable/beam/sequencefiles/ImportJob.java @@ -37,8 +37,8 @@ import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.io.serializer.WritableSerialization; /** - * A job that imports data from Cloud Storage bucket with SequenceFile format into Cloud Bigtable. This job - * can be run directly or as a Dataflow template. + * A job that imports data from Cloud Storage bucket with HBase SequenceFile format into Cloud Bigtable. + * This job can be run directly or as a Dataflow template. * * <p>Execute the following command to run the job directly: *
Mention "HBase" SequenceFile in ImportJob (#<I>)
diff --git a/taggit_selectize/widgets.py b/taggit_selectize/widgets.py index <HASH>..<HASH> 100644 --- a/taggit_selectize/widgets.py +++ b/taggit_selectize/widgets.py @@ -12,7 +12,7 @@ except ImportError: class TagSelectize(forms.TextInput): - def render(self, name, value, attrs=None): + def render(self, name, value, attrs=None, renderer=None): if value is not None and not isinstance(value, six.string_types): value = edit_string_for_tags([o.tag for o in value.select_related("tag")]) html = super(TagSelectize, self).render(name, value, attrs)
Add support for Django <I> Django <I> removed support for Widget.render() methods without the renderer argument.
diff --git a/lib/version.go b/lib/version.go index <HASH>..<HASH> 100644 --- a/lib/version.go +++ b/lib/version.go @@ -16,5 +16,5 @@ package docker2aci import "github.com/appc/spec/schema" -var Version = "0.12.2+git" +var Version = "0.12.3" var AppcVersion = schema.AppContainerVersion
version: bump to <I>
diff --git a/lib/flapjack/gateways/pagerduty.rb b/lib/flapjack/gateways/pagerduty.rb index <HASH>..<HASH> 100644 --- a/lib/flapjack/gateways/pagerduty.rb +++ b/lib/flapjack/gateways/pagerduty.rb @@ -216,7 +216,7 @@ module Flapjack http = EM::HttpRequest.new(url).get(options) begin response = Oj.load(http.response) - rescue Exception + rescue Oj::Error @logger.error("failed to parse json from a post to #{url} ... response headers and body follows...") return nil end
be more specific with json parsing rescue
diff --git a/src/org/zaproxy/zap/view/ScanPanel2.java b/src/org/zaproxy/zap/view/ScanPanel2.java index <HASH>..<HASH> 100644 --- a/src/org/zaproxy/zap/view/ScanPanel2.java +++ b/src/org/zaproxy/zap/view/ScanPanel2.java @@ -545,6 +545,8 @@ public abstract class ScanPanel2<GS extends GenericScanner2, SC extends ScanCont progressModel.removeAllElements(); progressSelect.addItem(selectScanEntry); progressSelect.setSelectedIndex(0); + + clearScansButton.setEnabled(false); } public void sessionScopeChanged(Session session) {
Disable 'clean completed scans' button when resetting the scanner panel Change the method ScanPanel2.reset() to disable clearScansButton, otherwise it would be kept enabled even if there were no scans present in the panel (for example, after creating a new session).