diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/studio/websetup.py b/studio/websetup.py index <HASH>..<HASH> 100644 --- a/studio/websetup.py +++ b/studio/websetup.py @@ -117,14 +117,6 @@ def setup_app(command, conf, vars): admin.groups.append(admin_gp) meta.Session.add(admin) - # Create user enduser - enduser = model.User() - enduser.name = 'Enduser' - enduser.login = 'enduser' - enduser.password = 'password' - enduser.groups.append(enduser_gp) - meta.Session.add(enduser) - mfdir = config['mapfiles_dir'] if not os.path.exists(mfdir): os.makedirs(mfdir, 0755)
remove the enduser account created during setup-app
diff --git a/jupyterlab_widgets/setup.py b/jupyterlab_widgets/setup.py index <HASH>..<HASH> 100644 --- a/jupyterlab_widgets/setup.py +++ b/jupyterlab_widgets/setup.py @@ -205,7 +205,7 @@ setup_args = dict( 'jupyterlab_widgets/static/jupyterlab_widgets.bundle.js', 'jupyterlab_widgets/static/jupyterlab_widgets.bundle.js.manifest', 'jupyterlab_widgets/static/jupyterlab_widgets.bundle.css' - ]), + ])], zip_safe=False, include_package_data = True, ) @@ -220,7 +220,7 @@ if 'setuptools' in sys.modules: setuptools_args = {} install_requires = setuptools_args['install_requires'] = [ - 'notebook>=4.2.0', + 'jupyterlab>=0.8.0' ] extras_require = setuptools_args['extras_require'] = {
Fix python package for jlab
diff --git a/admin.go b/admin.go index <HASH>..<HASH> 100644 --- a/admin.go +++ b/admin.go @@ -311,13 +311,18 @@ type adminHandler struct { // ServeHTTP is the external entry point for API requests. // It will only be called once per request. func (h adminHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - Log().Named("admin.api").Info("received request", + log := Log().Named("admin.api").With( zap.String("method", r.Method), zap.String("host", r.Host), zap.String("uri", r.RequestURI), zap.String("remote_addr", r.RemoteAddr), zap.Reflect("headers", r.Header), ) + if r.RequestURI == "/metrics" { + log.Debug("received request") + } else { + log.Info("received request") + } h.serveHTTP(w, r) }
admin: lower log level to Debug for /metrics requests (#<I>) * admin: lower log level to Debug for /metrics requests
diff --git a/lib/ndr_support/version.rb b/lib/ndr_support/version.rb index <HASH>..<HASH> 100644 --- a/lib/ndr_support/version.rb +++ b/lib/ndr_support/version.rb @@ -3,5 +3,5 @@ # This defines the NdrSupport version. If you change it, rebuild and commit the gem. # Use "rake build" to build the gem, see rake -T for all bundler rake tasks. module NdrSupport - VERSION = '5.3.1' + VERSION = '5.3.2' end
# bump to <I> with various ruby support fixes
diff --git a/lib/support/har/index.js b/lib/support/har/index.js index <HASH>..<HASH> 100644 --- a/lib/support/har/index.js +++ b/lib/support/har/index.js @@ -56,6 +56,20 @@ function addTimingsToHAR(harPage, visualMetricsData, timings, cpu) { // only add first paint if we don't have visual metrics harPageTimings._firstPaint = timings.firstPaint; } + + if (timings && timings.largestContentfulPaint) { + harPageTimings._largestContentfulPaint = + timings.largestContentfulPaint.renderTime; + } + if ( + timings && + timings.paintTiming && + timings.paintTiming['first-contentful-paint'] + ) { + harPageTimings._firstContentfulPaint = + timings.paintTiming['first-contentful-paint']; + } + if (timings && timings.pageTimings) { harPageTimings._domInteractiveTime = timings.pageTimings.domInteractiveTime; harPageTimings._domContentLoadedTime =
Include LCP and FCP in the HAR timings (#<I>)
diff --git a/findbugs/src/java/edu/umd/cs/findbugs/detect/FindNullDeref.java b/findbugs/src/java/edu/umd/cs/findbugs/detect/FindNullDeref.java index <HASH>..<HASH> 100644 --- a/findbugs/src/java/edu/umd/cs/findbugs/detect/FindNullDeref.java +++ b/findbugs/src/java/edu/umd/cs/findbugs/detect/FindNullDeref.java @@ -1009,7 +1009,7 @@ public class FindNullDeref implements Detector, if (createdDeadCode) System.out.println("createdDeadCode"); } - + if (priority > LOW_PRIORITY) return; BugAnnotation variableAnnotation = null; try { // Get the value number
if priority not even LOW, don't bother creating bug instance git-svn-id: <URL>
diff --git a/config_unix.go b/config_unix.go index <HASH>..<HASH> 100644 --- a/config_unix.go +++ b/config_unix.go @@ -1,4 +1,5 @@ // +build darwin freebsd linux netbsd openbsd + package peco import (
I think a newline was necessary
diff --git a/runcommands/run.py b/runcommands/run.py index <HASH>..<HASH> 100644 --- a/runcommands/run.py +++ b/runcommands/run.py @@ -40,14 +40,18 @@ class Run(Command): '(higher precedence than keyword args)' ) = None, # Special globals (for command line convenience) - env: arg(help='Will be added to globals') = None, - version: arg(help='Will be added to globals') = None, - echo: arg(type=bool, help='Will be added to globals') = None, + env: arg(help='env will be added to globals if specified') = None, + version: arg(help='version will be added to globals if specified') = None, + echo: arg( + type=bool, + help='echo=True will be added to globals', + inverse_help='echo=False will be added to globals' + ) = None, # Environment variables environ: arg( type=dict, help='Additional environment variables; ' - 'added just before commands are run', + 'added just before commands are run' ) = None, # Meta info: arg(help='Show info and exit') = False,
Tweak run command arg help for env, version, and echo
diff --git a/test/test_helper.rb b/test/test_helper.rb index <HASH>..<HASH> 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -8,6 +8,7 @@ require "active_support/notifications" ENV["RACK_ENV"] = "test" +# for reloadable synonyms ENV["ES_PATH"] ||= "#{ENV["HOME"]}/elasticsearch/#{ENV["ELASTICSEARCH_VERSION"]}" if ENV["TRAVIS"] $logger = ActiveSupport::Logger.new(ENV["VERBOSE"] ? STDOUT : nil)
Added comment [skip ci]
diff --git a/lib/closure_tree/model.rb b/lib/closure_tree/model.rb index <HASH>..<HASH> 100644 --- a/lib/closure_tree/model.rb +++ b/lib/closure_tree/model.rb @@ -48,7 +48,7 @@ module ClosureTree scope :without, lambda { |instance| if instance.new_record? - scoped + all else where(["#{_ct.quoted_table_name}.#{_ct.base_class.primary_key} != ?", instance.id]) end diff --git a/spec/tag_spec.rb b/spec/tag_spec.rb index <HASH>..<HASH> 100644 --- a/spec/tag_spec.rb +++ b/spec/tag_spec.rb @@ -4,7 +4,7 @@ shared_examples_for "Tag (1)" do it "has correct accessible_attributes" do Tag.accessible_attributes.to_a.should =~ %w(parent name) - end + end unless ActiveRecord::VERSION::MAJOR == 4 describe "empty db" do
down to <I> failures
diff --git a/Command/EventSourcingCommandHandlerTrait.php b/Command/EventSourcingCommandHandlerTrait.php index <HASH>..<HASH> 100644 --- a/Command/EventSourcingCommandHandlerTrait.php +++ b/Command/EventSourcingCommandHandlerTrait.php @@ -19,10 +19,6 @@ trait EventSourcingCommandHandlerTrait $event = $this->getDomainEvent($command); $handler = $this->getDomainEventHandler($command); - if (!$handler instanceof DomainEventHandlerInterface) { - throw new \LogicException(sprintf('Object "%s" is unable to handle domain event "%s". Did you forgot to implement DomainEventHandlerInterface?', \get_class($handler), \get_class($event))); - } - if ($handler->handleEvent($event) && null !== $onHandled) { $onHandled($handler); }
SA fixes (#<I>)
diff --git a/pingouin/regression.py b/pingouin/regression.py index <HASH>..<HASH> 100644 --- a/pingouin/regression.py +++ b/pingouin/regression.py @@ -627,10 +627,10 @@ def logistic_regression(X, y, coef_only=False, alpha=0.05, .. caution:: This function is a wrapper around the :py:class:`sklearn.linear_model.LogisticRegression` class. However, Pingouin internally disables the L2 regularization and changes the - default solver in order to get results that are similar to R and + default solver to 'newton-cg' to obtain results that are similar to R and statsmodels. - The logistic regression assumes that the log-odds (the logarithm of the + Logistic regression assumes that the log-odds (the logarithm of the odds) for the value labeled "1" in the response variable is a linear combination of the predictor variables. The log-odds are given by the `logit <https://en.wikipedia.org/wiki/Logit>`_ function,
DOCS add how Logistic Regression is modified to match R and statsmodels The docs didn't say how the scikit-learn default solver was changed. Inquiring minds would have to go to the source code. I added the default solver.
diff --git a/superset/assets/cypress/integration/explore/control.test.js b/superset/assets/cypress/integration/explore/control.test.js index <HASH>..<HASH> 100644 --- a/superset/assets/cypress/integration/explore/control.test.js +++ b/superset/assets/cypress/integration/explore/control.test.js @@ -61,7 +61,7 @@ describe('AdhocMetrics', () => { }); }); - it('Clear metric and set custom sql adhoc metric', () => { + xit('Clear metric and set custom sql adhoc metric', () => { const metric = 'SUM(num)/COUNT(DISTINCT name)'; cy.visitChartByName('Num Births Trend');
This control test is flaky and affecting travis runs, turning it off for now (#<I>)
diff --git a/lib/ezutils/classes/ezextension.php b/lib/ezutils/classes/ezextension.php index <HASH>..<HASH> 100644 --- a/lib/ezutils/classes/ezextension.php +++ b/lib/ezutils/classes/ezextension.php @@ -245,7 +245,7 @@ class eZExtension $hasExtensions = true; } if ( $hasExtensions ) - $siteINI->loadCache(); + $siteINI->load(); } /**
Switch to using ->load() instead of ->loadCache() directly (should have been protected)
diff --git a/src/main/java/zmq/TcpConnecter.java b/src/main/java/zmq/TcpConnecter.java index <HASH>..<HASH> 100644 --- a/src/main/java/zmq/TcpConnecter.java +++ b/src/main/java/zmq/TcpConnecter.java @@ -235,7 +235,13 @@ public class TcpConnecter extends Own implements IPollEvents { // resolve address again to take into account other addresses // besides the failing one (e.g. multiple dns entries). - address.resolve(); + try { + address.resolve(); + } catch ( Exception ignored ) { + // This will fail if the network goes away and the + // address cannot be resolved for some reason. Try + // not to fail as the event loop will quit + } socket.event_connect_retried(address.toString(), rc_ivl); timer_started = true; @@ -278,7 +284,12 @@ public class TcpConnecter extends Own implements IPollEvents { Utils.unblock_socket(handle); // Connect to the remote peer. - boolean rc = handle.connect(addr.resolved().address()); + boolean rc = false; + try { + rc = handle.connect(addr.resolved().address()); + } catch ( Exception e ) { + throw new IOException(e.getMessage(), e); + } return rc;
Sometimes hostname resolution will fail. Make sure that, if it does, we don't break the ioloop.
diff --git a/components/markdown/code.js b/components/markdown/code.js index <HASH>..<HASH> 100644 --- a/components/markdown/code.js +++ b/components/markdown/code.js @@ -6,7 +6,7 @@ import Code from '../code/code'; const MarkdownCode = ({value, language, inline}) => ( <Code language={language} - code={value} + code={value || ''} inline={inline} /> ); diff --git a/components/markdown/markdown.test.js b/components/markdown/markdown.test.js index <HASH>..<HASH> 100644 --- a/components/markdown/markdown.test.js +++ b/components/markdown/markdown.test.js @@ -48,4 +48,13 @@ describe('Markdown', () => { }); wrapper.should.have.descendants(Code); }); + + it('should convert not finished code block to empty ring Code', () => { + const wrapper = mountMarkdown({ + source: ` + \`\`\` + ` + }); + wrapper.should.have.descendants(Code); + }); });
RG-<I> Support empty value for markdown Code to be usable as preview for editor
diff --git a/src/main/java/zmq/Mailbox.java b/src/main/java/zmq/Mailbox.java index <HASH>..<HASH> 100644 --- a/src/main/java/zmq/Mailbox.java +++ b/src/main/java/zmq/Mailbox.java @@ -95,6 +95,9 @@ public final class Mailbox implements Closeable // Receive the signal. signaler.recv(); + if (errno.get() == ZError.EINTR) { + return null; + } // Switch into active state. active = true;
in zmq.Mailbox, a call to Signaler.recv could set errno to EINTR This was not checked, cpipe.read will return null, active will be set. I'm not sure that is a an expected state, and the assert make my tests fails.
diff --git a/spec/feed_spec.rb b/spec/feed_spec.rb index <HASH>..<HASH> 100644 --- a/spec/feed_spec.rb +++ b/spec/feed_spec.rb @@ -17,7 +17,7 @@ describe Stream::Feed do expect { Stream::Feed.new(nil, "feed-slug", "user_id", "") }.to raise_error Stream::StreamInputData end - it "should refuse feed_slug with underscores" do - expect { Stream::Feed.new(nil, "feed_slug", "user_id", "") }.to raise_error Stream::StreamInputData + it "should not refuse feed_slug with underscores" do + expect { Stream::Feed.new(nil, "feed_slug", "user_id", "") }.to_not raise_error Stream::StreamInputData end end
Fix spec for underscore support for feed slugs
diff --git a/src/Presentation/Console/Command/InitCommand.php b/src/Presentation/Console/Command/InitCommand.php index <HASH>..<HASH> 100644 --- a/src/Presentation/Console/Command/InitCommand.php +++ b/src/Presentation/Console/Command/InitCommand.php @@ -42,7 +42,9 @@ class InitCommand extends AbstractCommand implements CommandInterface protected function execute(InputInterface $input, OutputInterface $output) { $io = new Style($input, $output); - $io->caution('This operation should not be executed in a production environment!'); + if (getenv('APP_ENV') === 'prod') { + $io->caution('This operation should not be executed in a production environment!'); + } $relVersion = $input->getArgument('rel_version') ?? null;
caution message must be displayed only on prod environment
diff --git a/scripts/multibuild/mb/command.py b/scripts/multibuild/mb/command.py index <HASH>..<HASH> 100644 --- a/scripts/multibuild/mb/command.py +++ b/scripts/multibuild/mb/command.py @@ -19,7 +19,8 @@ def build(testfile, indy_url, delay, vagrant_dir): with open(testfile) as f: build_config = yaml.safe_load(f) - vagrant_dir = mb.vagrant.find_vagrant_dir(vagrant_dir) + if vagrant_dir is not None: + vagrant_dir = mb.vagrant.find_vagrant_dir(vagrant_dir) if delay is None: delay = 0
allow script to work without vagrant
diff --git a/lib/cmis.js b/lib/cmis.js index <HASH>..<HASH> 100644 --- a/lib/cmis.js +++ b/lib/cmis.js @@ -88,6 +88,17 @@ }; /** + * sets character set used for non file fields in posted + * multipart/form-data resource + * @param {string} characterSet + * @return {CmisSession} + */ + session.setCharacterSet = function (characterSet) { + _characterSet = characterSet; + return session; + }; + + /** * Connects to a cmis server and retrieves repositories, * token or credentils must already be set * @@ -1280,6 +1291,7 @@ var _token = null; var _username = null; var _password = null; + var _characterSet; var _afterlogin; var _proxyUrl = null; @@ -1325,6 +1337,12 @@ var _postMultipart = function(url, options, content, mimeTypeExtension, filename) { var req = _http('POST', url); + if (_characterSet !== undefined && options.length > 0){ + // IN HTML5, the character set to use for non-file fields can + // be specified in a multipart by using a __charset__ field. + // https://dev.w3.org/html5/spec-preview/attributes-common-to-form-controls.html#attr-fe-name-charset + req.field('_charset_', _characterSet); + } filename = filename || 'undefined'; for (var k in options) { if (options[k] == 'cmis:name') {
Allow to specify the charset used for non-file fields posted int multipart/form-data If you post a file with properties to update into the same multipart/form-data, you must be able to specify the charset used for your non-file fields to avoid a wrong decoding by the server. The HTML specs specifies the use of a pseudo field '_charset_' to do it (<URL>;)
diff --git a/tests/unit-tests/Database/MultiDatabaseTest.php b/tests/unit-tests/Database/MultiDatabaseTest.php index <HASH>..<HASH> 100644 --- a/tests/unit-tests/Database/MultiDatabaseTest.php +++ b/tests/unit-tests/Database/MultiDatabaseTest.php @@ -41,8 +41,9 @@ class MultiDatabaseTest extends Test $this->website->managed_by_database_connection = 'mysql2'; - $this->assertTrue($this->websites->create($this->website)); + $this->websites->create($this->website); + $this->assertTrue($this->website->exists); $this->assertEquals('mysql2', $this->website->managed_by_database_connection); // make sure the Website model still uses the regular system name.
assert checking response of method is not valid
diff --git a/main.go b/main.go index <HASH>..<HASH> 100644 --- a/main.go +++ b/main.go @@ -114,11 +114,11 @@ func flush(postMetrics [][]DDMetric) { // // TODO Is this the right type? // NewPostMetric("veneur.stats.metrics_posted", float32(totalCount+1), "", "counter", *Interval), // ) - postJSON, _ := json.MarshalIndent(map[string][]DDMetric{ + postJSON, _ := json.Marshal(map[string][]DDMetric{ "series": finalMetrics, - }, "", " ") + }) - fmt.Println(string(postJSON)) + log.Println(string(postJSON)) resp, err := http.Post(fmt.Sprintf("%s/api/v1/series?api_key=%s", *APIURL, *Key), "application/json", bytes.NewBuffer(postJSON)) if err != nil { @@ -131,7 +131,7 @@ func flush(postMetrics [][]DDMetric) { if err != nil { log.Printf("Error reading response body: %q", err) } - fmt.Printf("Response: %q", body) + log.Printf("Response: %q", body) } else { log.Println("Nothing to flush.") }
Stop being so printy, don't indent JSON
diff --git a/test/default-level-test.js b/test/default-level-test.js index <HASH>..<HASH> 100644 --- a/test/default-level-test.js +++ b/test/default-level-test.js @@ -26,25 +26,22 @@ define(['test/test-helpers'], function(testHelpers) { it("new level is always set", function(log) { log.setDefaultLevel("trace"); expect(log).toBeAtLevel("trace"); - expect(log.getLevel()).toBe(log.levels.TRACE); }); it("level is not persisted", function(log) { log.setDefaultLevel("debug"); expect("debug").not.toBeTheStoredLevel(); - expect(log.getLevel()).toBe(log.levels.DEBUG); }); }); - + describe("If a level is saved", function () { beforeEach(function () { testHelpers.setStoredLevel("trace"); }); - + it("saved level is not modified", function (log) { log.setDefaultLevel("debug"); expect(log).toBeAtLevel("trace"); - expect(log.getLevel()).toBe(log.levels.TRACE); }); }); @@ -57,7 +54,6 @@ define(['test/test-helpers'], function(testHelpers) { log.setDefaultLevel("debug"); expect(log).toBeAtLevel("debug"); expect("debug").not.toBeTheStoredLevel(); - expect(log.getLevel()).toBe(log.levels.DEBUG); }); }); });
Tests for new things shouldn't be sprinkled into existing tests
diff --git a/core/interpreter/src/main/java/org/overture/interpreter/assistant/pattern/PPatternAssistantInterpreter.java b/core/interpreter/src/main/java/org/overture/interpreter/assistant/pattern/PPatternAssistantInterpreter.java index <HASH>..<HASH> 100644 --- a/core/interpreter/src/main/java/org/overture/interpreter/assistant/pattern/PPatternAssistantInterpreter.java +++ b/core/interpreter/src/main/java/org/overture/interpreter/assistant/pattern/PPatternAssistantInterpreter.java @@ -28,7 +28,7 @@ public class PPatternAssistantInterpreter extends PPatternAssistantTC /** A value for getLength meaning "any length" */ public static int ANY = -1; - public static NameValuePairList getNamedValues(PPattern p, Value expval, + public NameValuePairList getNamedValues(PPattern p, Value expval, Context ctxt) throws AnalysisException { List<AIdentifierPattern> ids = af.createPPatternAssistant().findIdentifiers(p);
restore and remove static keywords again because of problems in the ide.
diff --git a/autofit/optimize/non_linear/multi_nest.py b/autofit/optimize/non_linear/multi_nest.py index <HASH>..<HASH> 100644 --- a/autofit/optimize/non_linear/multi_nest.py +++ b/autofit/optimize/non_linear/multi_nest.py @@ -142,7 +142,15 @@ class MultiNest(NonLinearOptimizer): # noinspection PyUnusedLocal def prior(cube, ndim, nparams): - return model.physical_vector_from_hypercube_vector(hypercube_vector=cube) + + # NEVER EVER REFACTOR THIS LINE! + + phys_cube = model.physical_vector_from_hypercube_vector(hypercube_vector=cube) + + for i in range(len(phys_cube)): + cube[i] = phys_cube[i] + + return cube fitness_function = MultiNest.Fitness( self,
Fixed major bug with howw the unit cube was converted to a physical cube in multinest
diff --git a/src/Storage/Query/SearchWeighter.php b/src/Storage/Query/SearchWeighter.php index <HASH>..<HASH> 100644 --- a/src/Storage/Query/SearchWeighter.php +++ b/src/Storage/Query/SearchWeighter.php @@ -113,11 +113,19 @@ class SearchWeighter foreach ($this->getContentFields() as $field => $weightings) { $textualContent = $result->{$field}; + + // This is to handle taxonomies that need to be converted from an array + // into a string of words. + if (is_array($textualContent)) { + $textualContent = implode(" ", $textualContent); + } + $textualContent = strip_tags($textualContent); $textualContent = preg_replace('/[^\w\s]/', '', $textualContent); $textualContent = mb_strtolower($textualContent); $corpus[$field] = $textualContent; } + $dictionary = []; $count = array();
convert taxonomy arrays to a string to perform text search
diff --git a/lib/api_auth.js b/lib/api_auth.js index <HASH>..<HASH> 100644 --- a/lib/api_auth.js +++ b/lib/api_auth.js @@ -145,7 +145,6 @@ api.verifySignature = function(req, sig, account, callback) var query = (sig.query).split("&").sort().filter(function(x) { return x != "" && x.indexOf(api.signatureHeaderName) != 0 }).join("&"); switch (sig.version) { case -1: - if (sig.secret == secret) return callback(sig); if (!this.bcrypt) this.bcrypt = require('bcrypt'); this.bcrypt.compare(sig.secret, secret, function(err, rc) { if (!rc) logger.debug("verifySignature:", 'failed', sig, account);
revert cleartext pw check
diff --git a/lib/dynflow/executors/parallel/core.rb b/lib/dynflow/executors/parallel/core.rb index <HASH>..<HASH> 100644 --- a/lib/dynflow/executors/parallel/core.rb +++ b/lib/dynflow/executors/parallel/core.rb @@ -66,6 +66,7 @@ module Dynflow Terminate.(~any) >-> future do logger.info 'shutting down Core ...' @termination_future = future + try_to_terminate end end @@ -114,7 +115,7 @@ module Dynflow def continue_manager(manager, next_work) if manager.done? loose_manager_and_set_future manager.execution_plan.id - terminate! if terminating? && @execution_plan_managers.empty? + try_to_terminate else feed_pool next_work end @@ -146,6 +147,10 @@ module Dynflow @termination_future.set true super() end + + def try_to_terminate + terminate! if terminating? && @execution_plan_managers.empty? + end end end end diff --git a/test/executor_test.rb b/test/executor_test.rb index <HASH>..<HASH> 100644 --- a/test/executor_test.rb +++ b/test/executor_test.rb @@ -582,6 +582,11 @@ module Dynflow $slow_actions_done.must_equal 1 end + it 'it terminates when no work' do + terminated = world.executor.terminate! + terminated.wait + end + end end end
Fix termination when no work is being executed
diff --git a/src/system/modules/metamodels/GeneralCallbackMetaModel.php b/src/system/modules/metamodels/GeneralCallbackMetaModel.php index <HASH>..<HASH> 100644 --- a/src/system/modules/metamodels/GeneralCallbackMetaModel.php +++ b/src/system/modules/metamodels/GeneralCallbackMetaModel.php @@ -86,8 +86,7 @@ class GeneralCallbackMetaModel extends GeneralCallbackDefault { $objTemplate = new MetaModelTemplate($objView->get('template')); } else { - // fallback to default. - $objTemplate = new MetaModelTemplate('be_metamodel_full'); + return 'No rendersetting defined.'; } if ($objMetaModel->hasVariants() && !$objNativeItem->isVariantBase())
show error if no rendersettings defined for backend, as discussed with David Maack.
diff --git a/greenhouse/io/sockets.py b/greenhouse/io/sockets.py index <HASH>..<HASH> 100644 --- a/greenhouse/io/sockets.py +++ b/greenhouse/io/sockets.py @@ -96,14 +96,15 @@ class _InnerSocket(object): raise socket.error(*error.args) raise - yield - try: - poller.unregister(self, counter) - except EnvironmentError, error: - if error.args and error.args[0] in errno.errorcode: - raise socket.error(*error.args) - raise + yield + finally: + try: + poller.unregister(self, counter) + except EnvironmentError, error: + if error.args and error.args[0] in errno.errorcode: + raise socket.error(*error.args) + raise def accept(self): with self._registered('re'):
ensure basically that the __exit__ gets run in socket registration context managers
diff --git a/library/CMService/Newrelic.php b/library/CMService/Newrelic.php index <HASH>..<HASH> 100644 --- a/library/CMService/Newrelic.php +++ b/library/CMService/Newrelic.php @@ -47,6 +47,24 @@ class CMService_Newrelic extends CM_Class_Abstract { } /** + * @param string $name + * @param Closure $closure + * @return mixed + * @throws Exception + */ + public function runAsTransaction($name, Closure $closure) { + $this->startTransaction($name); + try { + $returnValue = $closure(); + $this->endTransaction(); + return $returnValue; + } catch (Exception $ex) { + $this->endTransaction(); + throw $ex; + } + } + + /** * @param string $name */ public function setNameTransaction($name) {
Introduce Newrelic's runAsTransaction
diff --git a/widgetsnbextension/src/widget_output.js b/widgetsnbextension/src/widget_output.js index <HASH>..<HASH> 100644 --- a/widgetsnbextension/src/widget_output.js +++ b/widgetsnbextension/src/widget_output.js @@ -66,7 +66,7 @@ var OutputView = widgets.DOMWidgetView.extend({ }, render: function(){ - let renderOutput = (outputArea) => { + var renderOutput = function(outputArea) { this.output_area = new outputArea.OutputArea({ selector: this.el, config: this.options.cell.config, @@ -95,7 +95,7 @@ var OutputView = widgets.DOMWidgetView.extend({ requirejs(["notebook/js/outputarea"], renderOutput) } else { // Notebook 5.x - requirejs(["notebook"], (notebookApp) => { + requirejs(["notebook"], function(notebookApp) { var outputArea = notebookApp["notebook/js/outputarea"]; renderOutput(outputArea); });
remove more of ES<I>/ES6 features
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -156,10 +156,13 @@ class kmsSecretsPlugin { vars.populateService(this.options); const moduleConfig = inited.custom['serverless-kms-secrets'] || {}; + + const stage = this.options.stage || inited.provider.stage; + const region = this.options.region || inited.provider.region; const configFile = moduleConfig.secretsFile - || `kms-secrets.${inited.provider.stage}.${inited.provider.region}.yml`; + || `kms-secrets.${stage}.${region}.yml`; myModule.serverless.cli.log(`Decrypting secrets from ${configFile}`); readFile(configFile) @@ -167,7 +170,7 @@ class kmsSecretsPlugin { const names = this.options.name ? [this.options.name] : Object.keys(secrets); names.forEach((varName) => { if (secrets[varName]) { - AWS.config.update({ region: inited.provider.region }); + AWS.config.update({ region }); const kms = new AWS.KMS(); kms.decrypt({ CiphertextBlob: Buffer(secrets[varName], 'base64'), // eslint-disable-line new-cap
Fix cli options not working with decrypt. For example, calling sls decrypt with -s prod didn't have any effect and decryption was performed using dev stage. This fixes it.
diff --git a/visidata/cmdlog.py b/visidata/cmdlog.py index <HASH>..<HASH> 100644 --- a/visidata/cmdlog.py +++ b/visidata/cmdlog.py @@ -190,7 +190,7 @@ class _CommandLog: comment = vd.currentReplayRow.comment if vd.currentReplayRow else cmd.helpstr vd.activeCommand = self.newRow(sheet=sheetname, - col=str(colname), + col=colname, row=str(rowname), keystrokes=keystrokes, input=args,
[cmdlog] type col indices int, and col names str since 6e<I>, the type of the *col* attribute matters. If replaying, and *col* is an `int`, the CmdLog will index by position. If *col* is a `str` it will index by column name. Closes #<I>
diff --git a/Kwc/Shop/Cart/Detail/Trl/Component.php b/Kwc/Shop/Cart/Detail/Trl/Component.php index <HASH>..<HASH> 100644 --- a/Kwc/Shop/Cart/Detail/Trl/Component.php +++ b/Kwc/Shop/Cart/Detail/Trl/Component.php @@ -1,6 +1,20 @@ <?php class Kwc_Shop_Cart_Detail_Trl_Component extends Kwc_Abstract_Composite_Trl_Component { + public static function getSettings($masterComponentClass) + { + $ret = parent::getSettings($masterComponentClass); + $ret['flags']['processInput'] = true; + return $ret; + } + + public function preProcessInput($data) + { + if (isset($data[$this->getData()->componentId.'-delete'])) { + $this->getData()->chained->row->delete(); + } + } + public function getTemplateVars() { $ret = parent::getTemplateVars();
shop trl: fix deleting products from cart
diff --git a/src/django_ftpserver/models.py b/src/django_ftpserver/models.py index <HASH>..<HASH> 100644 --- a/src/django_ftpserver/models.py +++ b/src/django_ftpserver/models.py @@ -19,7 +19,7 @@ class FTPUserGroup(models.Model): _("Home directory"), max_length=1024, null=True, blank=True) def __str__(self): - return "{}".format(self.name) + return u"{0}".format(self.name) class Meta: verbose_name = _("FTP user group") @@ -44,7 +44,7 @@ class FTPUserAccount(models.Model): user = self.user except ObjectDoesNotExist: user = None - return "{}".format(user) + return u"{0}".format(user) def get_username(self): try:
Update models.py python <I>-<I> and django <I> same problems solved.
diff --git a/src/main/java/stormpot/QSlot.java b/src/main/java/stormpot/QSlot.java index <HASH>..<HASH> 100644 --- a/src/main/java/stormpot/QSlot.java +++ b/src/main/java/stormpot/QSlot.java @@ -15,7 +15,6 @@ */ package stormpot; -import java.util.Random; import java.util.concurrent.BlockingQueue; import java.util.concurrent.atomic.AtomicBoolean; @@ -60,11 +59,10 @@ class QSlot<T extends Poolable> implements Slot, SlotInfo<T> { } // XorShift PRNG with a 2^128-1 period. - private static final Random rng = new Random(); - private int x = rng.nextInt(); - private int y = rng.nextInt(); - private int z = rng.nextInt(); - private int w = 1343246171; + int x = System.identityHashCode(this); + int y = 938745813; + int z = 452465366; + int w = 1343246171; @Override public int randomInt() {
Initialise the PRNG in the same way in both BSlot and QSlot
diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index <HASH>..<HASH> 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -372,6 +372,7 @@ def _fill_fixtures_impl(function: "Function") -> None: fi = fm.getfixtureinfo(function.parent, function.obj, None) function._fixtureinfo = fi request = function._request = FixtureRequest(function, _ispytest=True) + fm.session._setupstate.prepare(function) request._fillfixtures() # Prune out funcargs for jstests. newfuncargs = {}
fixtures: make sure to properly setup stack for _fill_fixtures_impl This code is weird, dead, deprecated and will be removed in pytest 7, but for now some tests execute it, so fix it up in preparation for some changes.
diff --git a/lib/escher/auth.rb b/lib/escher/auth.rb index <HASH>..<HASH> 100644 --- a/lib/escher/auth.rb +++ b/lib/escher/auth.rb @@ -38,6 +38,8 @@ module Escher begin authenticate(*args) return true + rescue EscherError + return false rescue return false end
SECURITY-<I>: Specification of the caught exception
diff --git a/printer.go b/printer.go index <HASH>..<HASH> 100644 --- a/printer.go +++ b/printer.go @@ -205,6 +205,7 @@ func (p *printer) printSlice() { if p.value.Kind() == reflect.Slice { if p.visited[p.value.Pointer()] { + // Stop travarsing cyclic reference p.printf("%s{...}", p.typeString()) return }
Add a comment about cyclic reference
diff --git a/commerce-frontend-impl/src/main/java/com/liferay/commerce/frontend/internal/account/model/Account.java b/commerce-frontend-impl/src/main/java/com/liferay/commerce/frontend/internal/account/model/Account.java index <HASH>..<HASH> 100644 --- a/commerce-frontend-impl/src/main/java/com/liferay/commerce/frontend/internal/account/model/Account.java +++ b/commerce-frontend-impl/src/main/java/com/liferay/commerce/frontend/internal/account/model/Account.java @@ -14,8 +14,6 @@ package com.liferay.commerce.frontend.internal.account.model; -import com.liferay.portal.kernel.util.HtmlUtil; - /** * @author Alessio Antonio Rendina */ @@ -42,7 +40,7 @@ public class Account { } public String getName() { - return HtmlUtil.escape(_name); + return _name; } public boolean getSuccess() {
COMMERCE-<I> Don't escape already escaped field
diff --git a/src/de/lmu/ifi/dbs/elki/algorithm/AbstractAlgorithm.java b/src/de/lmu/ifi/dbs/elki/algorithm/AbstractAlgorithm.java index <HASH>..<HASH> 100644 --- a/src/de/lmu/ifi/dbs/elki/algorithm/AbstractAlgorithm.java +++ b/src/de/lmu/ifi/dbs/elki/algorithm/AbstractAlgorithm.java @@ -17,7 +17,8 @@ import de.lmu.ifi.dbs.elki.utilities.optionhandling.ParameterException; * <p/> * <p>This class serves also as a model of implementing an algorithm within this framework. * Any Algorithm that makes use of these flags may extend this class. Beware to make - * correct use of parameter settings via optionHandler as commented with + * correct use of parameter settings via the facilities provided within + * {@link AbstractParameterizable} as commented with * constructor and methods.</p> * * @author Arthur Zimek
replaced link to optionhandler with link to abstract parameterizable
diff --git a/src/main/org/codehaus/groovy/ant/Groovyc.java b/src/main/org/codehaus/groovy/ant/Groovyc.java index <HASH>..<HASH> 100644 --- a/src/main/org/codehaus/groovy/ant/Groovyc.java +++ b/src/main/org/codehaus/groovy/ant/Groovyc.java @@ -36,6 +36,7 @@ import java.io.StringWriter; import java.nio.charset.Charset; import java.util.HashMap; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.Map;
missing import added (the conflict editor swallowed it) git-svn-id: <URL>
diff --git a/core/codegen/vdm2jml/src/main/java/org/overture/codegen/vdm2jml/NamedTypeInvDepCalculator.java b/core/codegen/vdm2jml/src/main/java/org/overture/codegen/vdm2jml/NamedTypeInvDepCalculator.java index <HASH>..<HASH> 100644 --- a/core/codegen/vdm2jml/src/main/java/org/overture/codegen/vdm2jml/NamedTypeInvDepCalculator.java +++ b/core/codegen/vdm2jml/src/main/java/org/overture/codegen/vdm2jml/NamedTypeInvDepCalculator.java @@ -157,7 +157,7 @@ public class NamedTypeInvDepCalculator extends DepthFirstAnalysisAdaptor // Say we are visiting a union type that is optional, e.g. //T = [S | nat]; // Then we mark the previous type, e.g T as optional - if(previous != null) + if(optional && previous != null) { previous.makeOptional(); }
Fix for the named type invariant dependency calcutor. A union type was by accident always mark as an optional type
diff --git a/arrayToObject.js b/arrayToObject.js index <HASH>..<HASH> 100644 --- a/arrayToObject.js +++ b/arrayToObject.js @@ -1,5 +1,5 @@ module.exports = function(arr) { var obj = {} - for (var i=0; i<arr.length; i++) { obj[arr[i]] = i } + for (var i=0; i<arr.length; i++) { obj[arr[i]] = true } return obj } \ No newline at end of file
arrayToObject needs to be truthy for all objects
diff --git a/tests/test_dataloader.py b/tests/test_dataloader.py index <HASH>..<HASH> 100644 --- a/tests/test_dataloader.py +++ b/tests/test_dataloader.py @@ -136,6 +136,7 @@ class TestUnion(unittest.TestCase): loader.basiccast = True assert type(loader.load(1, Optional[Union[int, float]])) == int assert type(loader.load(1.0, Optional[Union[int, float]])) == float + assert loader.load(None, Optional[str]) is None class TestNamedTuple(unittest.TestCase):
Test case for the bug I want to fix
diff --git a/dikicli/core.py b/dikicli/core.py index <HASH>..<HASH> 100644 --- a/dikicli/core.py +++ b/dikicli/core.py @@ -351,10 +351,11 @@ def _create_html_file_content(translations): content.append("".join(mng)) content.append('<div class="examples">') for e in m.examples: - content.append( - "<p><span>{ex}</span><br><span>{tr}</span></p>" - "".format(ex=e[0], tr=e[1]) - ) + exmpl = "<p><span>{ex}</span>".format(ex=e[0]) + if e[1]: + exmpl += "<br><span>{tr}</span>".format(tr=e[1]) + exmpl += "</p>" + content.append(exmpl) content.append("</div>") # end `examples` content.append("</div>") # end `meaning` content.append("</ol>") @@ -620,6 +621,6 @@ def wrap_text(translations, linewrap=0): for e in m.examples: result.append("") result.append(wrap(e[0], findent=eindent, sindent=eindent)) - if e[1]: + if len(e) == 2: result.append(wrap(e[1], findent=eindent, sindent=eindent + 1)) return "\n".join(result)
Fix handling of examples in pol-eng translation
diff --git a/plugins/kernel_v2/config/vm.rb b/plugins/kernel_v2/config/vm.rb index <HASH>..<HASH> 100644 --- a/plugins/kernel_v2/config/vm.rb +++ b/plugins/kernel_v2/config/vm.rb @@ -755,7 +755,12 @@ module VagrantPlugins @allow_fstab_modification = true if @allow_fstab_modification == UNSET_VALUE end - if !box && !clone && !machine.provider_options[:box_optional] + # HACK(phinze): We cannot honor box_optional in gogo yet so we are + # temporarily hacking in a workaround which explicitly looks for docker + # instead of the option itself. Once plugin metadata is implemented + # this conditional should be reverted to the commented line below + # if !box && !clone && !machine.provider_options[:box_optional] + if !box && !clone && machine.provider_name != :docker errors << I18n.t("vagrant.config.vm.box_missing") end
Temporary workaround to let Docker provider work Comment has the details, but this should hopefully be short lived
diff --git a/library/CM/Clockwork/Storage/FileSystem.php b/library/CM/Clockwork/Storage/FileSystem.php index <HASH>..<HASH> 100644 --- a/library/CM/Clockwork/Storage/FileSystem.php +++ b/library/CM/Clockwork/Storage/FileSystem.php @@ -8,7 +8,7 @@ class CM_Clockwork_Storage_FileSystem extends CM_Clockwork_Storage_Abstract impl $data = []; $file = $this->_getStorageFile(); if ($file->exists()) { - $values = CM_Params::jsonDecode($file->read(), true); + $values = (array) CM_Params::jsonDecode($file->read(), true); $data = \Functional\map($values, function ($timeStamp) { return new DateTime('@' . $timeStamp); });
Ensure loaded value in clockwork persistence layer is array
diff --git a/package.js b/package.js index <HASH>..<HASH> 100644 --- a/package.js +++ b/package.js @@ -34,7 +34,7 @@ pkg.devDependencies = { mightyiam: '^1.1.6', standard: '*', 'auto-package': '^1.0.0', - 'license-generator': '^2.1.0', + 'license-generator': '^0.0.13', policystat: '^1.3.0' } pkg.dependencies = {
package.js: fix license-generator version
diff --git a/salt/config.py b/salt/config.py index <HASH>..<HASH> 100644 --- a/salt/config.py +++ b/salt/config.py @@ -2905,7 +2905,7 @@ def apply_minion_config(overrides=None, return opts -def master_config(path, env_var='SALT_MASTER_CONFIG', defaults=None): +def master_config(path, env_var='SALT_MASTER_CONFIG', defaults=None, exit_on_config_errors=False): ''' Reads in the master configuration file and sets up default options @@ -2932,8 +2932,8 @@ def master_config(path, env_var='SALT_MASTER_CONFIG', defaults=None): defaults['default_include']) include = overrides.get('include', []) - overrides.update(include_config(default_include, path, verbose=False)) - overrides.update(include_config(include, path, verbose=True)) + overrides.update(include_config(default_include, path, verbose=False), exit_on_config_errors=exit_on_config_errors) + overrides.update(include_config(include, path, verbose=True), exit_on_config_errors=exit_on_config_errors) opts = apply_master_config(overrides, defaults) _validate_opts(opts) # If 'nodegroups:' is uncommented in the master config file, and there are
Add option to master config reader on ignoring system exit for wrong configuration
diff --git a/aeron-driver/src/main/java/io/aeron/driver/media/SendChannelEndpoint.java b/aeron-driver/src/main/java/io/aeron/driver/media/SendChannelEndpoint.java index <HASH>..<HASH> 100644 --- a/aeron-driver/src/main/java/io/aeron/driver/media/SendChannelEndpoint.java +++ b/aeron-driver/src/main/java/io/aeron/driver/media/SendChannelEndpoint.java @@ -475,12 +475,15 @@ public class SendChannelEndpoint extends UdpChannelTransport { final int length = buffer.remaining(); - if (length > DataHeaderFlyweight.HEADER_LENGTH) + if (length >= DataHeaderFlyweight.HEADER_LENGTH) { bufferForTimestamping.wrap(buffer, buffer.position(), length); - if (DataHeaderFlyweight.HDR_TYPE_DATA == - (bufferForTimestamping.getShort(DataHeaderFlyweight.TYPE_FIELD_OFFSET, LITTLE_ENDIAN) & 0xFFFF)) + final int type = + bufferForTimestamping.getShort(DataHeaderFlyweight.TYPE_FIELD_OFFSET, LITTLE_ENDIAN) & 0xFFFF; + + if (DataHeaderFlyweight.HDR_TYPE_DATA == type && + !DataHeaderFlyweight.isHeartbeat(bufferForTimestamping, length)) { final int offset = udpChannel.channelSendTimestampOffset();
[Java] Allow for timestamping data frames with zero length payload that are not heartbeats. PR #<I>.
diff --git a/js/h5p.js b/js/h5p.js index <HASH>..<HASH> 100644 --- a/js/h5p.js +++ b/js/h5p.js @@ -1994,7 +1994,6 @@ H5P.createTitle = function (rawTitle, maxLength) { // since events may be fired on initialization. if (H5P.isFramed && H5P.externalEmbed === false) { H5P.externalDispatcher.on('*', function (event) { - console.log("external dispatcher got event, relaying it", event); window.parent.H5P.externalDispatcher.trigger.call(this, event); }); }
Removed debug HFP-<I>
diff --git a/pyqode/core/modes/filewatcher.py b/pyqode/core/modes/filewatcher.py index <HASH>..<HASH> 100644 --- a/pyqode/core/modes/filewatcher.py +++ b/pyqode/core/modes/filewatcher.py @@ -60,6 +60,7 @@ class FileWatcherMode(Mode, QtCore.QObject): self.editor.new_text_set.connect(self._update_mtime) self.editor.new_text_set.connect(self._timer.start) self.editor.text_saving.connect(self._cancel_next_change) + self.editor.text_saved.connect(self._update_mtime) self.editor.text_saved.connect(self._restart_monitoring) self.editor.focused_in.connect(self._check_for_pending) else: @@ -148,7 +149,7 @@ class FileWatcherMode(Mode, QtCore.QObject): # See OpenCobolIDE/OpenCobolIDE#97 Cache().set_cursor_position( self.editor.file.path, - TextHelper(self.editor).cursor_position()) + self.editor.textCursor().position()) self.editor.file.open(self.editor.file.path) self.file_reloaded.emit()
Fix filewatcher notification when saving big files
diff --git a/EventListener/LimitEventListener.php b/EventListener/LimitEventListener.php index <HASH>..<HASH> 100644 --- a/EventListener/LimitEventListener.php +++ b/EventListener/LimitEventListener.php @@ -40,12 +40,14 @@ class LimitEventListener $table = $event->getTable(); if ($table->getRequest()->query->getInt('limit') === -1) { - $table->getQueryBuilder()->setMaxResults(-1); + $table->setLimit(-1); + $table->getQueryBuilder()->setMaxResults(null); $table->getQueryBuilder()->setFirstResult(0); return; } - $table->getQueryBuilder()->setMaxResults($table->getRequest()->query->getInt('limit', 25)); + $table->setLimit($table->getRequest()->query->getInt('limit', 25)); + $table->getQueryBuilder()->setMaxResults($table->getLimit()); $table->getQueryBuilder()->setFirstResult(($table->getCurrentPage() - 1) * $table->getLimit()); }
fix(limit): fixing a problem limiting bug
diff --git a/eventsourcing/domain.py b/eventsourcing/domain.py index <HASH>..<HASH> 100644 --- a/eventsourcing/domain.py +++ b/eventsourcing/domain.py @@ -402,7 +402,7 @@ def event( or isinstance(arg, type) and issubclass(arg, AggregateEvent) ): - event_spec = cast(EventSpecType, arg) + event_spec = arg def create_command_method_decorator( decorated_obj: DecoratedObjType, @@ -418,7 +418,7 @@ def event( else: if hasattr(arg, "__name__"): - item = f"'{arg.__name__}'" # type: ignore + item = f"'{arg.__name__}'" else: item = f"{arg}" raise TypeError(f"{item} is not a str, event class, function, or property")
Fixed mypy issues (redundant cast, and unused ignore).
diff --git a/lib-dempsyimpl/src/main/java/com/nokia/dempsy/Dempsy.java b/lib-dempsyimpl/src/main/java/com/nokia/dempsy/Dempsy.java index <HASH>..<HASH> 100644 --- a/lib-dempsyimpl/src/main/java/com/nokia/dempsy/Dempsy.java +++ b/lib-dempsyimpl/src/main/java/com/nokia/dempsy/Dempsy.java @@ -308,12 +308,6 @@ public class Dempsy } private DempsyException failedStart = null; - public class ClusterStart implements Runnable - { - private Cluster cluster; - private ClusterStart(Cluster cluster) { this.cluster = cluster; } - public void run() { try { cluster.start(); } catch(DempsyException e) { failedStart = e; } } - } /** *
[cosmetic] Minor change to remove unused class.
diff --git a/mod/assign/submission/onlinetext/locallib.php b/mod/assign/submission/onlinetext/locallib.php index <HASH>..<HASH> 100644 --- a/mod/assign/submission/onlinetext/locallib.php +++ b/mod/assign/submission/onlinetext/locallib.php @@ -137,7 +137,7 @@ class assign_submission_onlinetext extends assign_submission_plugin { $eventdata->itemid = $submission->id; $eventdata->courseid = $this->assignment->get_course()->id; $eventdata->userid = $USER->id; - $eventdata->content = trim(format_text($onlinetextsubmission->onlinetext, $onlinetextsubmission->onlineformat, array('context'=>$this->assignment->get_context()))); + $eventdata->content = trim(format_text($data->onlinetext, $data->onlinetext_editor['format'], array('context'=>$this->assignment->get_context()))); if ($files) { $eventdata->pathnamehashes = array_keys($files); }
MDL-<I>: Plagiarism API - use correct vars in event trigger
diff --git a/auth/ldap/lib.php b/auth/ldap/lib.php index <HASH>..<HASH> 100644 --- a/auth/ldap/lib.php +++ b/auth/ldap/lib.php @@ -1063,7 +1063,7 @@ function auth_ldap_getdefaults(){ 'rfc2307' => 'member', 'rfc2307bis' => 'member', 'samba' => 'member', - 'ad' => 'member', //is this right? + 'ad' => 'memberOf', 'default' => 'member' ); $default['ldap_memberattribute_isdn'] = array(
Merged from MOODLE_<I>_STABLE - Updated the definition of member for AD - thanks to Inaki for the tip!
diff --git a/spec/rubocop/cop/commissioner_spec.rb b/spec/rubocop/cop/commissioner_spec.rb index <HASH>..<HASH> 100644 --- a/spec/rubocop/cop/commissioner_spec.rb +++ b/spec/rubocop/cop/commissioner_spec.rb @@ -24,7 +24,7 @@ describe RuboCop::Cop::Commissioner do it 'returns all offenses except the ones of the cop' do cops = [] cops << double('cop A', offenses: %w(foo), excluded_file?: false) - cops << double('cop B', offenses: %w(bar), excluded_file?: true) + cops << double('cop B', excluded_file?: true) cops << double('cop C', offenses: %w(baz), excluded_file?: false) cops.each(&:as_null_object) diff --git a/spec/rubocop/formatter/worst_offenders_formatter_spec.rb b/spec/rubocop/formatter/worst_offenders_formatter_spec.rb index <HASH>..<HASH> 100644 --- a/spec/rubocop/formatter/worst_offenders_formatter_spec.rb +++ b/spec/rubocop/formatter/worst_offenders_formatter_spec.rb @@ -17,7 +17,7 @@ module RuboCop describe '#finished' do context 'when there are many offenses' do - let(:offense) { double('offense', cop_name: 'SomeCop') } + let(:offense) { double('offense') } before do formatter.started(files)
Remove unused doubled methods (#<I>) These methods can be safely removed from their test doubles without breaking the test case.
diff --git a/py/_test/pluginmanager.py b/py/_test/pluginmanager.py index <HASH>..<HASH> 100644 --- a/py/_test/pluginmanager.py +++ b/py/_test/pluginmanager.py @@ -259,6 +259,8 @@ class MultiCall: return kwargs def varnames(func): + if not inspect.isfunction(func) and not inspect.ismethod(func): + func = getattr(func, '__call__', func) ismethod = inspect.ismethod(func) rawcode = py.code.getrawcode(func) try: diff --git a/testing/test_pluginmanager.py b/testing/test_pluginmanager.py index <HASH>..<HASH> 100644 --- a/testing/test_pluginmanager.py +++ b/testing/test_pluginmanager.py @@ -340,8 +340,12 @@ def test_varnames(): class A: def f(self, y): pass + class B(object): + def __call__(self, z): + pass assert varnames(f) == ("x",) assert varnames(A().f) == ('y',) + assert varnames(B()) == ('z',) class TestMultiCall: def test_uses_copy_of_methods(self):
patch from flub to allow callable objects as hook implementations --HG-- branch : trunk
diff --git a/peer.go b/peer.go index <HASH>..<HASH> 100644 --- a/peer.go +++ b/peer.go @@ -674,6 +674,8 @@ func (p *peer) handleGetDataMsg(msg *btcwire.MsgGetData) { err = p.pushTxMsg(&iv.Hash, c, waitChan) case btcwire.InvTypeBlock: err = p.pushBlockMsg(&iv.Hash, c, waitChan) + case btcwire.InvTypeFilteredBlock: // unhandled + continue default: peerLog.Warnf("Unknown type in inventory request %d", iv.Type)
Do not log warning for filtered block inv types. ok @davecgh
diff --git a/shorty/shorty.go b/shorty/shorty.go index <HASH>..<HASH> 100644 --- a/shorty/shorty.go +++ b/shorty/shorty.go @@ -326,10 +326,15 @@ func (this *shortyImpl) FindAppOpen(app UrlScheme, sourceContext UUID) (appOpen defer c.Close() key := fmt.Sprintf("%s:*:%s:*", app, sourceContext) - reply, err := redis.Bytes(c.Do("GET", this.settings.RedisPrefix+"app-open:"+key)) - found = err == nil && reply != nil - if err == nil { - err = json.Unmarshal(reply, appOpen) + reply, err := redis.Strings(c.Do("KEYS", this.settings.RedisPrefix+"app-open:"+key)) + + found = err == nil && len(reply) > 0 + if found { + // Do a get on the first hit + value, err := redis.Bytes(c.Do("GET", reply[0])) + if err == nil { + err = json.Unmarshal(value, appOpen) + } } return }
Fix find app-open query to use redis KEYS
diff --git a/store/tikv/mock-tikv/rpc.go b/store/tikv/mock-tikv/rpc.go index <HASH>..<HASH> 100644 --- a/store/tikv/mock-tikv/rpc.go +++ b/store/tikv/mock-tikv/rpc.go @@ -191,11 +191,7 @@ func (h *rpcHandler) checkRequest(ctx *kvrpcpb.Context, size int) *errorpb.Error if err := h.checkRequestContext(ctx); err != nil { return err } - - if err := h.checkRequestSize(size); err != nil { - return err - } - return nil + return h.checkRequestSize(size) } func (h *rpcHandler) checkKeyInRegion(key []byte) bool {
mock-tikv: fix golint (#<I>) golint has updated to check redundant `if`.
diff --git a/instana/agent.py b/instana/agent.py index <HASH>..<HASH> 100644 --- a/instana/agent.py +++ b/instana/agent.py @@ -135,5 +135,10 @@ class Agent(object): def set_port(self, port): self.port = port - def set_from(self, from_): - self.from_ = From(**json.loads(from_)) + def set_from(self, json_string): + if type(json_string) is bytes: + raw_json = json_string.decode("UTF-8") + else: + raw_json = json_string + + self.from_ = From(**json.loads(raw_json))
Add validation & decoding for received json
diff --git a/src/main/java/com/cloudant/client/api/DbDesign.java b/src/main/java/com/cloudant/client/api/DbDesign.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/cloudant/client/api/DbDesign.java +++ b/src/main/java/com/cloudant/client/api/DbDesign.java @@ -17,14 +17,11 @@ import org.lightcouch.CouchDatabase; import org.lightcouch.CouchDatabaseBase; import org.lightcouch.CouchDbClient; import org.lightcouch.CouchDbDesign; +import org.lightcouch.DesignDocument.MapReduce; //import org.lightcouch.DesignDocument; import org.lightcouch.Response; -import org.lightcouch.DesignDocument.MapReduce; -import org.lightcouch.internal.GsonHelper; import com.cloudant.client.api.model.DesignDocument; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonObject;
DbDesign fix for single Gson object
diff --git a/master/buildbot/test/unit/test_steps_master.py b/master/buildbot/test/unit/test_steps_master.py index <HASH>..<HASH> 100644 --- a/master/buildbot/test/unit/test_steps_master.py +++ b/master/buildbot/test/unit/test_steps_master.py @@ -13,6 +13,7 @@ # # Copyright Buildbot Team Members +import os import sys import mock from twisted.python import runtime @@ -25,9 +26,17 @@ from buildbot.steps import master class TestMasterShellCommand(steps.BuildStepMixin, unittest.TestCase): def setUp(self): + if runtime.platformType == 'win32': + self.comspec = os.environ.get('COMPSPEC') + os.environ['COMSPEC'] = r'C:\WINDOWS\system32\cmd.exe' return self.setUpBuildStep() def tearDown(self): + if runtime.platformType == 'win32': + if self.comspec: + os.environ['COMSPEC'] = self.comspec + else: + del os.environ['COMSPEC'] return self.tearDownBuildStep() def patchSpawnProcess(self, exp_cmd, exp_argv, exp_path, exp_usePTY,
Do not assume the value of COMSPEC in tests
diff --git a/toytree/__init__.py b/toytree/__init__.py index <HASH>..<HASH> 100644 --- a/toytree/__init__.py +++ b/toytree/__init__.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -__version__ = "1.2.0" +__version__ = "2.0.0" __author__ = "Deren Eaton" from .Toytree import ToyTree as tree
version bump for upcoming v2
diff --git a/src/main/java/com/j256/ormlite/dao/BaseDaoImpl.java b/src/main/java/com/j256/ormlite/dao/BaseDaoImpl.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/j256/ormlite/dao/BaseDaoImpl.java +++ b/src/main/java/com/j256/ormlite/dao/BaseDaoImpl.java @@ -669,6 +669,7 @@ public abstract class BaseDaoImpl<T, ID> implements Dao<T, ID> { } public <FT> ForeignCollection<FT> getEmptyForeignCollection(String fieldName) throws SQLException { + checkForInitialized(); for (FieldType fieldType : tableInfo.getFieldTypes()) { if (fieldType.getDbColumnName().equals(fieldName)) { return fieldType.buildForeignCollection(null, true);
Added missing check for init.
diff --git a/contrib/externs/chrome_extensions.js b/contrib/externs/chrome_extensions.js index <HASH>..<HASH> 100644 --- a/contrib/externs/chrome_extensions.js +++ b/contrib/externs/chrome_extensions.js @@ -537,6 +537,19 @@ chrome.experimental.rlz.recordProductEvent = function(product, accessPoint, chrome.experimental.rlz.clearProductState = function(product, accessPoints) {}; /** + * @param {string} product + * @param {Array.<string>} accessPoints + * @param {string} signature + * @param {string} brand + * @param {string} id + * @param {string} lang + * @param {boolean} excludeMachineId + */ +chrome.experimental.rlz.sendFinancialPing = function(product, accessPoints, + signature, brand, id, lang, + excludeMachineId) {}; + +/** * @param {string} accessPoint * @param {function(string): void} callback */
Change on <I>/<I>/<I> <I>:<I>:<I> by rogerta Adding chrome.experimental.rlz.sendFinancialPing API call to externs to match change made to chrome in <URL> Revision created by MOE tool push_codebase. MOE_MIGRATION=<I> git-svn-id: <URL>
diff --git a/lib/utils/read-sources.js b/lib/utils/read-sources.js index <HASH>..<HASH> 100644 --- a/lib/utils/read-sources.js +++ b/lib/utils/read-sources.js @@ -29,6 +29,8 @@ var REMOTE_RESOURCE_PATTERN = /^(https?:)?\/\//; function readSources(input, context, callback) { if (typeof input == 'string') { return fromString(input, context, {}, callback); + } else if (Buffer.isBuffer(input)) { + return fromString(input.toString(), context, {}, callback); } else if (typeof input == 'object') { return fromHash(input, context, {}, callback); }
Restores accepting `Buffer` as input.
diff --git a/Slim/Http/Response.php b/Slim/Http/Response.php index <HASH>..<HASH> 100644 --- a/Slim/Http/Response.php +++ b/Slim/Http/Response.php @@ -134,7 +134,7 @@ class Response implements \ArrayAccess, \Countable, \IteratorAggregate { $this->setStatus($status); $this->headers = new \Slim\Http\Headers(array('Content-Type' => 'text/html')); - $this->headers->add($headers); + $this->headers->replace($headers); $this->cookies = new \Slim\Http\Cookies(); $this->write($body); } diff --git a/tests/Helper/SetTest.php b/tests/Helper/SetTest.php index <HASH>..<HASH> 100644 --- a/tests/Helper/SetTest.php +++ b/tests/Helper/SetTest.php @@ -61,7 +61,7 @@ class SetTest extends PHPUnit_Framework_TestCase public function testAdd() { - $this->bag->add(array( + $this->bag->replace(array( 'abc' => '123', 'foo' => 'bar' ));
Fix loose ends caused by change from Set::add to Set::replace
diff --git a/src/Element/Identify.php b/src/Element/Identify.php index <HASH>..<HASH> 100644 --- a/src/Element/Identify.php +++ b/src/Element/Identify.php @@ -4,23 +4,33 @@ namespace Monolyth\Formulaic\Element; trait Identify { + /** + * Add a prefix to this element. + * + * @param string $prefix + */ public function prefix(string $prefix) { array_unshift($this->prefix, $prefix); } - public function name() + /** + * Returns the name of the current element. + * + * @return string + */ + public function name() : string { - return isset($this->attributes['name']) ? - $this->attributes['name'] : - null; + return $this->attributes['name']; } - public function id() + /** + * Returns the ID generated for the element. + * + * @return string + */ + public function id() : string { - if (!($name = $this->name())) { - return null; - } $id = $name; if ($this->prefix) { $id = implode('-', $this->prefix)."-$id";
docblocks and type hints
diff --git a/cirq/contrib/routing/device.py b/cirq/contrib/routing/device.py index <HASH>..<HASH> 100644 --- a/cirq/contrib/routing/device.py +++ b/cirq/contrib/routing/device.py @@ -59,6 +59,9 @@ def nx_qubit_layout(graph: nx.Graph) \ >>> import cirq.contrib.routing as ccr >>> import networkx as nx + >>> import matplotlib.pyplot as plt + >>> # Clear plot state to prevent issues with pyplot dimensionality. + >>> plt.clf() >>> g = ccr.xmon_device_to_graph(cirq.google.Foxtail) >>> pos = ccr.nx_qubit_layout(g) >>> nx.draw_networkx(g, pos=pos)
Doctest fix. (#<I>) Adds the fix prescribed in #<I>.
diff --git a/wallace/models.py b/wallace/models.py index <HASH>..<HASH> 100644 --- a/wallace/models.py +++ b/wallace/models.py @@ -83,12 +83,14 @@ class Node(Base): @property def successors2(self): outgoing_vectors = Vector.query.filter_by(origin=self).all() - return [v.destination for v in outgoing_vectors] + return [v.destination for v in outgoing_vectors + if isinstance(v.destination, Agent)] @property def predecessors2(self): incoming_vectors = Vector.query.filter_by(destination=self).all() - return [v.origin for v in incoming_vectors] + return [v.origin for v in incoming_vectors + if isinstance(v.origin, Agent)] def __repr__(self): return "Node-{}-{}".format(self.uuid[:6], self.type)
predecessors2 should return only Agents
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -21,6 +21,6 @@ setup( license="MIT License", packages=["webtul"], # packages = find_packages(), - install_requires=["python>3"], + install_requires=["python>=3"], platforms=["any"], ) diff --git a/webtul/__init__.py b/webtul/__init__.py index <HASH>..<HASH> 100644 --- a/webtul/__init__.py +++ b/webtul/__init__.py @@ -9,15 +9,15 @@ __all__ = ['struct'] __version__ = '1.01' -import aescbc -import dal -import geo -import img -import jsonx -import path -import rsa -import stringx -import struct +from . import aescbc +from . import dal +from . import geo +from . import img +from . import jsonx +from . import path +from . import rsa +from . import stringx +from . import struct if __name__ == "__main__":
Add, work with python 3.
diff --git a/mod/forum/lib.php b/mod/forum/lib.php index <HASH>..<HASH> 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -1255,7 +1255,7 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC", $umtable = ''; } else { $umfields = ', um.firstname AS umfirstname, um.lastname AS umlastname'; - $umtable = ' LEFT JOIN user um on (d.usermodified = um.id)'; + $umtable = ' LEFT JOIN '.$CFG->prefix.'user um on (d.usermodified = um.id)'; } return get_records_sql("SELECT $postdata, d.name, d.timemodified, d.usermodified, d.groupid,
Corrected an SQL statement that used 'user' instead of $CFG->prefix.'user'. Note - this is a left join of a table that is already inner joined in the same statement. There may be other problems here.
diff --git a/lib/muack/spy.rb b/lib/muack/spy.rb index <HASH>..<HASH> 100644 --- a/lib/muack/spy.rb +++ b/lib/muack/spy.rb @@ -5,12 +5,12 @@ module Muack class Spy < Mock def initialize stub super(stub.object) - @secret = stub.__mock_disps.values.flatten # steal disps + @stub = stub end # used for Muack::Session#verify def __mock_verify - @secret.each do |defi| + @stub.__mock_disps.values.flatten.each do |defi| __mock_dispatch(defi.msg, defi.args) if __mock_defis.key?(defi.msg) end super # simulate dispatching before passing to mock to verify diff --git a/test/test_stub.rb b/test/test_stub.rb index <HASH>..<HASH> 100644 --- a/test/test_stub.rb +++ b/test/test_stub.rb @@ -62,6 +62,14 @@ describe Muack::Stub do 2.times{ spy(Obj).say } end + should 'work with call spy and call spy' do + stub(Obj).say{} + 2.times do + Obj.say.should.eq nil + spy(Obj).say + end + end + should 'verify spy arguments' do stub(Obj).say(1){|a|a} Obj.say(1).should.eq 1
delay the time we steal the secret, so that spy and stub are synced
diff --git a/app/helpers/worthwhile/attribute_helper.rb b/app/helpers/worthwhile/attribute_helper.rb index <HASH>..<HASH> 100644 --- a/app/helpers/worthwhile/attribute_helper.rb +++ b/app/helpers/worthwhile/attribute_helper.rb @@ -50,7 +50,7 @@ module Worthwhile dom_label_class, link_title = "label-danger", "Private" if hash[Hydra.config.permissions.read.group].present? if hash[Hydra.config.permissions.read.group].include?('public') - if hash[Hydra.config.permissions.embargo_release_date].present? + if hash[Hydra.config.permissions.embargo.release_date].present? dom_label_class, link_title = 'label-warning', 'Open Access with Embargo' else dom_label_class, link_title = 'label-success', 'Open Access'
Use the not deprecated form of the embargo release_date from the hydra config
diff --git a/client/src/app.js b/client/src/app.js index <HASH>..<HASH> 100644 --- a/client/src/app.js +++ b/client/src/app.js @@ -417,7 +417,7 @@ _kiwi.global = { } // Set any random numbers if needed - defaults.nick = defaults.nick.replace('?', Math.floor(Math.random() * 100000).toString()); + defaults.nick = defaults.nick.replace(/\?/g, Math.floor(Math.random() * 100000).toString()); if (getQueryVariable('encoding')) defaults.encoding = getQueryVariable('encoding');
Replacing multiple ? in the nick with a random number
diff --git a/lib/cronofy/version.rb b/lib/cronofy/version.rb index <HASH>..<HASH> 100644 --- a/lib/cronofy/version.rb +++ b/lib/cronofy/version.rb @@ -1,3 +1,3 @@ module Cronofy - VERSION = "0.5.0".freeze + VERSION = "0.5.1".freeze end
Bumped version to <I>
diff --git a/netpyne/batch.py b/netpyne/batch.py index <HASH>..<HASH> 100644 --- a/netpyne/batch.py +++ b/netpyne/batch.py @@ -63,7 +63,7 @@ class Batch(object): #encoder.FLOAT_REPR = lambda o: format(o, '.12g') print('Saving batch to %s ... ' % (filename)) with open(filename, 'w') as fileObj: - json.dump(tupleToStr(dataSave), fileObj, indent=4, sort_keys=True) + json.dump(dataSave, fileObj, indent=4, sort_keys=True) def setCfgNestedParam(self, paramLabel, paramVal):
Added option to set initial cfg in batch sims - debugged
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -280,7 +280,7 @@ exports.getInitWidgetsCode = function(widgetsContext) { } code += '$markoWidgets("' + ids + '");'; - return; + return code; }; @@ -324,4 +324,4 @@ exports.defineRenderer = require('./defineRenderer'); // registerWidget is a no-op on the server. // Fixes https://github.com/marko-js/marko-widgets/issues/111 -exports.registerWidget = function() {}; \ No newline at end of file +exports.registerWidget = function() {};
actually return code from getInitWidgetsCode
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -47,7 +47,6 @@ module.exports = function (settings = {}) { let baseConfig = [ coreConfig, settings.esnext ? esnextConfig : es5Config, - settings.esnext ? babelConfig(coreConfig) : {}, settings.esnext ? constConfig : {}, importConfig, promiseConfig, @@ -92,6 +91,10 @@ module.exports = function (settings = {}) { settings.eslint ].reduce(mergeConfigs); + if (settings.esnext) { + baseConfig = mergeConfigs(baseConfig, babelConfig(baseConfig)); + } + function isNotInExtensions (extension) { return neutrinoExtensions.indexOf(extension) < 0; }
Fix custom settings that override babel
diff --git a/lxd/api_cluster.go b/lxd/api_cluster.go index <HASH>..<HASH> 100644 --- a/lxd/api_cluster.go +++ b/lxd/api_cluster.go @@ -274,13 +274,13 @@ func clusterPutJoin(d *Daemon, req api.ClusterPut) Response { return err } - // If node-specific configuration values are provided, it means - // the user wants to also initialize storage pools and - // networks. - if len(req.MemberConfig) > 0 { + // If the ServerAddress field is set it means that we're using + // the new join API introduced with the 'clustering_join' + // extension. + if req.ServerAddress != "" { // Connect to ourselves to initialize storage pools and // networks using the API. - d, err := lxd.ConnectLXDUnix("", nil) + d, err := lxd.ConnectLXDUnix(d.UnixSocket(), nil) if err != nil { return errors.Wrap(err, "Failed to connect to local LXD") }
Allow for MemberConfig to be empty even when using the new join API
diff --git a/command/service/update.go b/command/service/update.go index <HASH>..<HASH> 100644 --- a/command/service/update.go +++ b/command/service/update.go @@ -37,6 +37,7 @@ func newUpdateCommand(dockerCli *command.DockerCli) *cobra.Command { flags.String("image", "", "Service image tag") flags.String("args", "", "Service command args") flags.Bool("rollback", false, "Rollback to previous specification") + flags.Bool("force", false, "Force update even if no changes require it") addServiceFlags(cmd, opts) flags.Var(newListOptsVar(), flagEnvRemove, "Remove an environment variable") @@ -257,6 +258,15 @@ func updateService(flags *pflag.FlagSet, spec *swarm.ServiceSpec) error { return err } + force, err := flags.GetBool("force") + if err != nil { + return err + } + + if force { + spec.TaskTemplate.ForceUpdate++ + } + return nil }
Add force option to service update Currently, there's no way to restart the tasks of a service without making an actual change to the service. This leads to us giving awkward workarounds as in <URL>
diff --git a/_codegen/main.go b/_codegen/main.go index <HASH>..<HASH> 100644 --- a/_codegen/main.go +++ b/_codegen/main.go @@ -1,5 +1,5 @@ // This program reads all assertion functions from the assert package and -// automatically generates the corersponding requires and forwarded assertions +// automatically generates the corresponding requires and forwarded assertions package main @@ -139,7 +139,7 @@ func analyzeCode(scope *types.Scope, docs *doc.Package) (imports.Importer, []tes if !ok { continue } - // Check function signatuer has at least two arguments + // Check function signature has at least two arguments sig := fn.Type().(*types.Signature) if sig.Params().Len() < 2 { continue @@ -163,7 +163,7 @@ func analyzeCode(scope *types.Scope, docs *doc.Package) (imports.Importer, []tes return importer, funcs, nil } -// parsePackageSource returns the types scope and the package documentation from the pa +// parsePackageSource returns the types scope and the package documentation from the package func parsePackageSource(pkg string) (*types.Scope, *doc.Package, error) { pd, err := build.Import(pkg, ".", 0) if err != nil {
Fix typos in comments in _codegen/main.go
diff --git a/test/bootstrap.php b/test/bootstrap.php index <HASH>..<HASH> 100644 --- a/test/bootstrap.php +++ b/test/bootstrap.php @@ -1,7 +1,5 @@ <?php -use Typhoon\Typhoon; - require __DIR__.'/../vendor/autoload.php'; Eloquent\Asplode\Asplode::instance()->install();
Removed reference to Typhoon.
diff --git a/ui/build/build.types.js b/ui/build/build.types.js index <HASH>..<HASH> 100644 --- a/ui/build/build.types.js +++ b/ui/build/build.types.js @@ -202,7 +202,7 @@ function writeIndexDTS (apis) { const extendsVue = (content.type === 'component' || content.type === 'mixin') const typeValue = `${extendsVue ? `VueConstructor<${typeName}>` : typeName}` // Add Type to the appropriate section of types - const propTypeDef = `${typeName}: ${typeValue}` + const propTypeDef = `${typeName}?: ${typeValue}` if (content.type === 'component') { write(components, propTypeDef) } @@ -293,7 +293,7 @@ function writeIndexDTS (apis) { quasarTypeContents.forEach(line => write(contents, line)) - writeLine(contents, `export const Quasar: PluginObject<QuasarPluginOptions>`) + writeLine(contents, `export const Quasar: PluginObject<Partial<QuasarPluginOptions>>`) writeLine(contents) writeLine(contents, `import './vue'`)
Change Quasar Plugin options to support only passing some options. (#<I>)
diff --git a/packages/babylon/src/parser/util.js b/packages/babylon/src/parser/util.js index <HASH>..<HASH> 100644 --- a/packages/babylon/src/parser/util.js +++ b/packages/babylon/src/parser/util.js @@ -69,7 +69,7 @@ pp.isLineTerminator = function () { // pretend that there is a semicolon at this position. pp.semicolon = function () { - if (!this.eat(tt.semi) && !this.canInsertSemicolon()) this.unexpected(); + if (!this.isLineTerminator()) this.unexpected(); }; // Expect a token of a given type. If found, consume it, otherwise,
simplify Parser::semicolon method
diff --git a/jupytext/formats.py b/jupytext/formats.py index <HASH>..<HASH> 100644 --- a/jupytext/formats.py +++ b/jupytext/formats.py @@ -83,7 +83,7 @@ JUPYTEXT_FORMATS = ( # Version 1.1 on 2019-03-24 - jupytext v1.1.0 : Markdown regions and cell metadata # Version 1.2 on 2019-09-21 - jupytext v1.3.0 : Raw regions are now encoded with HTML comments (#321) # and by default, cell metadata use the key=value representation (#347) - # Version 1.3 on 2021-01-24 - jupytext v1.9.2 : Code cells may start with more than three backticks (#712) + # Version 1.3 on 2021-01-24 - jupytext v1.10.0 : Code cells may start with more than three backticks (#712) current_version_number="1.3", min_readable_version_number="1.0", ),
The next release will be Jupytext <I>
diff --git a/remi/server.py b/remi/server.py index <HASH>..<HASH> 100644 --- a/remi/server.py +++ b/remi/server.py @@ -561,10 +561,10 @@ ws.onerror = function(evt){ self.send_response(404) return - for k,v in headers.iteritems(): - self.send_header(k, v) + for k in headers.keys(): + self.send_header(k, headers[k]) self.end_headers() - self.wfile.write(encodeIfPyGT3(content)) + self.wfile.write(content) class ThreadedHTTPServer(socketserver.ThreadingMixIn, HTTPServer):
Fixed compatibility issues with python3.x.
diff --git a/lib/doorkeeper/models/concerns/scopes.rb b/lib/doorkeeper/models/concerns/scopes.rb index <HASH>..<HASH> 100644 --- a/lib/doorkeeper/models/concerns/scopes.rb +++ b/lib/doorkeeper/models/concerns/scopes.rb @@ -4,7 +4,7 @@ module Doorkeeper module Models module Scopes def scopes - OAuth::Scopes.from_string(self[:scopes]) + OAuth::Scopes.from_string(scopes_string) end def scopes_string
Use scopes_string internally This allows you to override `scopes_string` if you want to set default scopes for a particular type of model (eg. for a `Doorkeeper::Application`). Without this patch you'd need to override `scopes_string` and `scopes`.
diff --git a/tests/unit/py2/nupic/math/sparse_matrix_test.py b/tests/unit/py2/nupic/math/sparse_matrix_test.py index <HASH>..<HASH> 100755 --- a/tests/unit/py2/nupic/math/sparse_matrix_test.py +++ b/tests/unit/py2/nupic/math/sparse_matrix_test.py @@ -2482,7 +2482,7 @@ class SparseMatrixTest(unittest.TestCase): error('matrix_entropy, cols, with smoothing != 1') - #--------------------------------------------------------------------------------- + @unittest.skip("Doesn't play nicely with py.test.") def test_LogSumApprox(self): print 'Testing LogSumApprox'
Skip the failing test method that doesn't seem to work with py.test.
diff --git a/build.js b/build.js index <HASH>..<HASH> 100644 --- a/build.js +++ b/build.js @@ -1,3 +1,4 @@ +"use strict"; var stealTools = require("steal-tools"); stealTools.export({ diff --git a/can-stache-ast.js b/can-stache-ast.js index <HASH>..<HASH> 100644 --- a/can-stache-ast.js +++ b/can-stache-ast.js @@ -1,3 +1,4 @@ +"use strict"; var controls = require("./controls"); var parser = require('can-view-parser'); diff --git a/controls.js b/controls.js index <HASH>..<HASH> 100644 --- a/controls.js +++ b/controls.js @@ -1,3 +1,4 @@ +"use strict"; var mustacheLineBreakRegExp = /(?:(^|\r?\n)(\s*)(\{\{([\s\S]*)\}\}\}?)([^\S\n\r]*)($|\r?\n))|(\{\{([\s\S]*)\}\}\}?)/g, mustacheWhitespaceRegExp = /(\s*)(\{\{\{?)(-?)([\s\S]*?)(-?)(\}\}\}?)(\s*)/g;
Adds use strict. Fixes canjs/canjs#<I>
diff --git a/leancloud/push.py b/leancloud/push.py index <HASH>..<HASH> 100644 --- a/leancloud/push.py +++ b/leancloud/push.py @@ -8,6 +8,7 @@ import arrow import dateutil.tz as tz from leancloud.object_ import Object +from leancloud.errors import LeanCloudError from leancloud import client @@ -27,6 +28,9 @@ class Notification(Object): self._update_data(response.json()) + def save(self): + raise LeanCloudError(code=1, error='Notification does not support modify') + def send(data, channels=None, push_time=None, expiration_time=None, expiration_interval=None, where=None, cql=None): """ 发送推送消息。返回结果为此条推送对应的 _Notification 表中的对象,但是如果需要使用其中的数据,需要调用 fetch() 方法将数据同步至本地。 diff --git a/tests/test_push.py b/tests/test_push.py index <HASH>..<HASH> 100644 --- a/tests/test_push.py +++ b/tests/test_push.py @@ -44,3 +44,10 @@ def test_basic_push(): # type: () -> None notification = push.send(data, where=query, push_time=datetime.now()) notification.fetch() assert(notification.id) + + try: + notification.save() + except leancloud.LeanCloudError as e: + assert e.code == 1 + else: + raise Exception()
fix: disable leancloud.Notification#save (#<I>)
diff --git a/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPusher.java b/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPusher.java index <HASH>..<HASH> 100644 --- a/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPusher.java +++ b/extensions/hdfs-storage/src/main/java/io/druid/storage/hdfs/HdfsDataSegmentPusher.java @@ -64,7 +64,7 @@ public class HdfsDataSegmentPusher implements DataSegmentPusher @Override public String getPathForHadoop(String dataSource) { - return new Path(config.getStorageDirectory(), dataSource).toUri().toString(); + return new Path(config.getStorageDirectory()).toUri().toString(); } @Override
on HDFS store segments in "dataSource/interval/.." and not in "dataSource/dataSource/interval.."
diff --git a/lib/squirm/core.rb b/lib/squirm/core.rb index <HASH>..<HASH> 100644 --- a/lib/squirm/core.rb +++ b/lib/squirm/core.rb @@ -74,7 +74,7 @@ module Squirm # connection is given, then one will be checked out from the pool for use # inside the block, and then checked back in when the method returns. def use(conn = nil) - conn_given = conn != nil + conn_given = !!conn conn = conn_given ? conn : @pool.checkout begin yield Thread.current[:squirm_connection] = conn diff --git a/spec/core_spec.rb b/spec/core_spec.rb index <HASH>..<HASH> 100644 --- a/spec/core_spec.rb +++ b/spec/core_spec.rb @@ -53,6 +53,13 @@ describe Squirm do end assert_nil Thread.current[:squirm_connection] end + + it "should use connection if given as an argument" do + mock = Object.new + Squirm.use(mock) do |conn| + assert mock == conn + end + end end describe "#exec" do
Add test for passing connection to `use`.
diff --git a/tests/Cookie/CookieTest.php b/tests/Cookie/CookieTest.php index <HASH>..<HASH> 100755 --- a/tests/Cookie/CookieTest.php +++ b/tests/Cookie/CookieTest.php @@ -118,6 +118,22 @@ class CookieTest extends TestCase $this->assertFalse($cookieJar->hasQueued('foo', '/wrongPath')); } + public function testQueueForget() + { + $cookieJar = $this->getCreator(); + $this->assertCount(0, $cookieJar->getQueuedCookies()); + + $cookieJar->queueForget('foobar', '/path', '/domain'); + + $cookie = $cookieJar->queued('foobar'); + $this->assertEquals('foobar', $cookie->getName()); + $this->assertEquals(null, $cookie->getValue()); + $this->assertEquals('/path', $cookie->getPath()); + $this->assertEquals('/domain', $cookie->getDomain()); + $this->assertTrue($cookie->getExpiresTime() < time()); + $this->assertCount(1, $cookieJar->getQueuedCookies()); + } + public function testUnqueue() { $cookie = $this->getCreator();
Add tests for `queueForget()` method