diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/dummyserver.js b/dummyserver.js index <HASH>..<HASH> 100644 --- a/dummyserver.js +++ b/dummyserver.js @@ -275,7 +275,11 @@ var listen = function (req, res) { output(200, hello, false, 'text/plain; charset=UTF-8'); }, 1000); } else { - fs.realpath(__dirname + req.url.substr(req.proxyPath.length), function(err, path) { + var url = req.url.substr(req.proxyPath.length); + if(url.lastIndexOf('?') >= 0) { + url = url.substr(0, url.lastIndexOf('?')); + } + fs.realpath(__dirname + url, function(err, path) { if(err || path.substr(0, __dirname.length) !== __dirname) { return output(404, null, false); }
dummyserver.js: static file serving: drop query string from filename
diff --git a/library/src/com/twotoasters/jazzylistview/JazzyListView.java b/library/src/com/twotoasters/jazzylistview/JazzyListView.java index <HASH>..<HASH> 100644 --- a/library/src/com/twotoasters/jazzylistview/JazzyListView.java +++ b/library/src/com/twotoasters/jazzylistview/JazzyListView.java @@ -64,8 +64,10 @@ public class JazzyListView extends ListView implements OnScrollListener { String strEffect = null; try { strEffect = a.getString(R.styleable.JazzyListView_effect); + if(strEffect != null) { TransitionEffect effect = TransitionEffect.valueOf(strEffect); setTransitionEffect(effect); + } } catch (IllegalArgumentException e) { Log.w(TAG, "Invalid jazzy list view transition effect: " + strEffect); }
Fix NPE if effect is not defined in the XML
diff --git a/spec/slack-ruby-bot/hooks/message_spec.rb b/spec/slack-ruby-bot/hooks/message_spec.rb index <HASH>..<HASH> 100644 --- a/spec/slack-ruby-bot/hooks/message_spec.rb +++ b/spec/slack-ruby-bot/hooks/message_spec.rb @@ -5,10 +5,12 @@ describe SlackRubyBot::Hooks::Message do describe '#call' do it 'doesn\'t raise an error when message is a frozen string' do - message_hook.call( - SlackRubyBot::Client.new, - Hashie::Mash.new(text: 'message') - ) + expect do + message_hook.call( + SlackRubyBot::Client.new, + Hashie::Mash.new(text: 'message'.freeze) # rubocop:disable Style/RedundantFreeze + ) + end.to_not raise_error end end
Freeze string as expected by spec.
diff --git a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb index <HASH>..<HASH> 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb @@ -1,4 +1,5 @@ require 'active_record/connection_adapters/sqlite_adapter' +require 'sqlite3' module ActiveRecord class Base @@ -20,10 +21,6 @@ module ActiveRecord raise ArgumentError, 'adapter name should be "sqlite3"' end - unless self.class.const_defined?(:SQLite3) - require_library_or_gem(config[:adapter]) - end - db = SQLite3::Database.new( config[:database], :results_as_hash => true
just require sqlite3 when the database adapter is required
diff --git a/admin/maintenance.php b/admin/maintenance.php index <HASH>..<HASH> 100644 --- a/admin/maintenance.php +++ b/admin/maintenance.php @@ -12,6 +12,11 @@ error('You need to be admin to use this page'); } + //Check folder exists + if (! make_upload_directory(SITEID)) { // Site folder + error("Could not create site folder. The site administrator needs to fix the file permissions"); + } + $filename = $CFG->dataroot.'/1/maintenance.html'; if ($form = data_submitted()) {
Now SITEID folder is created if it doesn't exist. Bug <I> (<URL>)
diff --git a/pandas/tests/test_nanops.py b/pandas/tests/test_nanops.py index <HASH>..<HASH> 100644 --- a/pandas/tests/test_nanops.py +++ b/pandas/tests/test_nanops.py @@ -237,10 +237,20 @@ class TestnanopsDataFrame(tm.TestCase): self.arr_utf.astype('O')] if allow_date: - self.check_fun(testfunc, targfunc, 'arr_date', **kwargs) - self.check_fun(testfunc, targfunc, 'arr_tdelta', **kwargs) - objs += [self.arr_date.astype('O'), - self.arr_tdelta.astype('O')] + try: + targfunc(self.arr_date) + except TypeError: + pass + else: + self.check_fun(testfunc, targfunc, 'arr_date', **kwargs) + objs += [self.arr_date.astype('O')] + try: + targfunc(self.arr_tdelta) + except TypeError: + pass + else: + self.check_fun(testfunc, targfunc, 'arr_tdelta', **kwargs) + objs += [self.arr_tdelta.astype('O')] if allow_obj: self.arr_obj = np.vstack(objs)
should fix issue #<I>, test_nanargmin fails with datetime<I> objects
diff --git a/src/bindings/dom.js b/src/bindings/dom.js index <HASH>..<HASH> 100644 --- a/src/bindings/dom.js +++ b/src/bindings/dom.js @@ -282,17 +282,15 @@ export default class LocalizationObserver { } translateRootContent(root) { - markStart(); - const anonChildren = document.getAnonymousNodes ? document.getAnonymousNodes(root) : null; if (!anonChildren) { - return this.translateFragment(root).then(markEnd); + return this.translateFragment(root); } return Promise.all( [root, ...anonChildren].map(node => this.translateFragment(node)) - ).then(markEnd); + ); } translateMutations(mutations) { @@ -409,16 +407,3 @@ export default class LocalizationObserver { ]; } } - -function markStart() { - performance.mark('l20n: start translateRootContent'); -} - -function markEnd() { - performance.mark('l20n: end translateRootContent'); - performance.measure( - 'l20n: translateRootContent', - 'l20n: start translateRootContent', - 'l20n: end translateRootContent' - ); -}
Bug <I> - Remove performance.marks from the bindings and l<I>n-perf-monitor from browser.xul. r=stas
diff --git a/src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasView.java b/src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasView.java index <HASH>..<HASH> 100644 --- a/src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasView.java +++ b/src-gwt/org/opencms/ade/sitemap/client/alias/CmsAliasView.java @@ -195,7 +195,7 @@ public class CmsAliasView extends Composite { m_countLabel.setText(message); } }); - setWidth("1150px"); //$NON-NLS-1$ + setWidth("100%"); //$NON-NLS-1$ } /**
Fixed broken layout in alias editor dialog.
diff --git a/provision/juju/queue_test.go b/provision/juju/queue_test.go index <HASH>..<HASH> 100644 --- a/provision/juju/queue_test.go +++ b/provision/juju/queue_test.go @@ -75,7 +75,9 @@ func (s *ELBSuite) TestHandleMessageWithUnits(c *C) { c.Assert(instances, HasLen, 2) ids := []string{instances[0].InstanceId, instances[1].InstanceId} sort.Strings(ids) - c.Assert(ids, DeepEquals, []string{id1, id2}) + want := []string{id1, id2} + sort.Strings(want) + c.Assert(ids, DeepEquals, want) c.Assert(commandmocker.Ran(tmpdir), Equals, true) }
provision/juju: make test more reliable String sorting, i-<I> < i-9 :-)
diff --git a/tests/LoaderTest.php b/tests/LoaderTest.php index <HASH>..<HASH> 100644 --- a/tests/LoaderTest.php +++ b/tests/LoaderTest.php @@ -32,8 +32,6 @@ namespace Dwoo\Tests $tpl = new TemplateString('{loaderTest}'); $tpl->forceCompilation(); $this->assertEquals('Moo', $this->dwoo->get($tpl, array(), $this->compiler)); - - $tpl = new TemplateString('{blockTest}moo{/blockTest}'); } public function testPluginLoadBlock()
Remove leftover line in LoaderTest.php (cherry picked from commit bc<I>bdc)
diff --git a/public/absync.js b/public/absync.js index <HASH>..<HASH> 100644 --- a/public/absync.js +++ b/public/absync.js @@ -114,12 +114,11 @@ //noinspection JSUnusedGlobalSymbols /** * Register the service factory. - * @param {angular.IRootScopeService|Object} $rootScope * @returns {AbsyncService} * @ngInject */ - AbsyncProvider.prototype.$get = function AbsyncProvider$$get( $rootScope ) { - return new AbsyncService( this, $rootScope ); + AbsyncProvider.prototype.$get = function AbsyncProvider$$get() { + return new AbsyncService( this ); };
[TASK] Remove $rootScope from $get
diff --git a/internal/version_autogenerated.go b/internal/version_autogenerated.go index <HASH>..<HASH> 100755 --- a/internal/version_autogenerated.go +++ b/internal/version_autogenerated.go @@ -4,5 +4,5 @@ package internal const ( // Version is the current version of the plaid-go library - Version = "2.6.0" + Version = "2.7.0" )
<I> (#<I>)
diff --git a/jest.config.js b/jest.config.js index <HASH>..<HASH> 100644 --- a/jest.config.js +++ b/jest.config.js @@ -26,5 +26,6 @@ module.exports = { '<rootDir>/src/**/*.{js,jsx,ts,tsx}', '!**/demos/**', '!**/tests/**', + '!**/.umi/**', ], }
chore: update coverage config to exclude `.umi` (#<I>)
diff --git a/src/Collector.php b/src/Collector.php index <HASH>..<HASH> 100644 --- a/src/Collector.php +++ b/src/Collector.php @@ -163,7 +163,12 @@ class Collector $group = []; foreach ($mutants as $mutant) { - $group[] = $mutant->toArray(); + $mutantData = $mutant->toArray(); + + $stderr = explode(PHP_EOL, $mutantData['stderr'], 2); + $mutantData['stderr'] = $stderr[0]; + + $group[] = $mutantData; } return $group;
Remove stacktrace from stderr in errored results
diff --git a/lib/markaby/builder.rb b/lib/markaby/builder.rb index <HASH>..<HASH> 100644 --- a/lib/markaby/builder.rb +++ b/lib/markaby/builder.rb @@ -106,9 +106,6 @@ module Markaby alias_method :<<, :text alias_method :concat, :text - # Emulate ERB to satisfy helpers like <tt>form_for</tt>. - def _erbout; self end - # Captures the HTML code built inside the +block+. This is done by creating a new # stream for the builder object, running the block and passing back its stream as a string. #
* lib/markaby/builder.rb: remove _erbout method - it's in rails.rb
diff --git a/lib/fog/storage/models/aws/file.rb b/lib/fog/storage/models/aws/file.rb index <HASH>..<HASH> 100644 --- a/lib/fog/storage/models/aws/file.rb +++ b/lib/fog/storage/models/aws/file.rb @@ -118,6 +118,7 @@ module Fog data = connection.put_object(directory.key, key, body, options) data.headers.delete('Content-Length') + data.headers['ETag'].gsub!('"','') merge_attributes(data.headers) self.content_length = connection.get_body_size(body) true
[aws|storage] Remove etag quotes for File#save
diff --git a/lang/en/admin.php b/lang/en/admin.php index <HASH>..<HASH> 100644 --- a/lang/en/admin.php +++ b/lang/en/admin.php @@ -383,7 +383,7 @@ $string['country'] = 'Default country'; $string['coursecontact'] = 'Course contacts'; $string['coursecontact_desc'] = 'This setting allows you to control who appears on the course description. Users need to have at least one of these roles in a course to be shown on the course description for that course.'; $string['coursecontactduplicates'] = 'Display all course contact roles'; -$string['coursecontactduplicates_desc'] = 'If enabled, users with more than one of the selected course contact roles will be shown with each of their roles in the course description. Otherwise, only the role which is listed highest in \'Define roles\' in the Site administration will be shown.'; +$string['coursecontactduplicates_desc'] = 'If enabled, users with more than one of the selected course contact roles will be displayed in the course description with each of their roles. Otherwise, they will be displayed with only one role (whichever is listed highest in \'Define roles\' in the Site administration).'; $string['coursegraceperiodafter'] = 'Grace period for past courses'; $string['coursegraceperiodbefore'] = 'Grace period for future courses'; $string['courselistshortnames'] = 'Display extended course names';
MDL-<I> course: Refine strings
diff --git a/internal/graphicsdriver/metal/view.go b/internal/graphicsdriver/metal/view.go index <HASH>..<HASH> 100644 --- a/internal/graphicsdriver/metal/view.go +++ b/internal/graphicsdriver/metal/view.go @@ -44,9 +44,6 @@ func (v *view) getMTLDevice() mtl.Device { } func (v *view) setDisplaySyncEnabled(enabled bool) { - // TODO: Now SetVsyncEnabled is called only from the main thread, and d.t.Run is not available since - // recursive function call via Run is forbidden. - // Fix this to use d.t.Run to avoid confusion. v.ml.SetDisplaySyncEnabled(enabled) }
graphicsdriver/metal: Remove an old comment Updates #<I>
diff --git a/lib/webrat/core/locators/link_locator.rb b/lib/webrat/core/locators/link_locator.rb index <HASH>..<HASH> 100644 --- a/lib/webrat/core/locators/link_locator.rb +++ b/lib/webrat/core/locators/link_locator.rb @@ -45,10 +45,14 @@ module Webrat end def replace_nbsp(str) - if str.respond_to?(:force_encoding) - str.force_encoding('UTF-8').gsub(/\xc2\xa0/u, ' ') + if str.respond_to?(:valid_encoding?) + if str.valid_encoding? + str.gsub(/\xc2\xa0/u, ' ') + else + str.force_encoding('UTF-8').gsub(/\xc2\xa0/u, ' ') + end else - str.gsub("\xc2\xa0", ' ') + str.gsub(/\xc2\xa0/u, ' ') end end
Fix replacing of &nbsp;, aka &#<I>; so it works on <I>
diff --git a/src/Models/Model.php b/src/Models/Model.php index <HASH>..<HASH> 100644 --- a/src/Models/Model.php +++ b/src/Models/Model.php @@ -125,6 +125,9 @@ class Model return $value; } + /** + * @return string + */ public function toJson() { return json_encode($this->toArray()); diff --git a/src/Resources/QueriableResource.php b/src/Resources/QueriableResource.php index <HASH>..<HASH> 100644 --- a/src/Resources/QueriableResource.php +++ b/src/Resources/QueriableResource.php @@ -76,8 +76,8 @@ class QueriableResource extends JsonResource implements QueriableResourceInterfa */ protected function transform(stdClass $data, $className = null) { - $data = !empty($className) ? $data : $this->getFirstProperty($data); $name = !empty($className) ? $className : $this->getFirstPropertyName($data); + $data = !empty($className) ? $data : $this->getFirstProperty($data); $class = '\\Pokemon\\Models\\' . ucfirst(Inflector::singularize($name)); if (class_exists($class)) { /** @var Model $model */
Fixed a bug wine querying a card or set by identifier
diff --git a/src/Config.php b/src/Config.php index <HASH>..<HASH> 100644 --- a/src/Config.php +++ b/src/Config.php @@ -658,7 +658,7 @@ class Config // Make indexed arrays into associative for select fields // e.g.: [ 'yes', 'no' ] => { 'yes': 'yes', 'no': 'no' } - if ($field['type'] === 'select' && isset($field['values']) && is_array($field['values']) && Arr::isIndexedArray($field['values'])) { + if ($field['type'] === 'select' && isset($field['values']) && Arr::isIndexed($field['values'])) { $field['values'] = array_combine($field['values'], $field['values']); }
Replaced a usage of isIndexedArray with isIndexed
diff --git a/lib/statsd.js b/lib/statsd.js index <HASH>..<HASH> 100644 --- a/lib/statsd.js +++ b/lib/statsd.js @@ -389,7 +389,7 @@ Client.prototype.close = function (callback) { console.log('hot-shots could not clear out messages in flight but closing anyways'); this.messagesInFlight = 0; } - if (this.messagesInFlight <= 10000) { + if (this.messagesInFlight <= 0) { clearInterval(waitForMessages); this._close(callback); }
Oops, take out debugging change
diff --git a/lib/compiler.js b/lib/compiler.js index <HASH>..<HASH> 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -179,7 +179,7 @@ class HtmlWebpackChildCompiler { */ function extractHelperFilesFromCompilation (mainCompilation, childCompilation, filename, childEntryChunks) { const helperAssetNames = childEntryChunks.map((entryChunk, index) => { - return mainCompilation.mainTemplate.hooks.assetPath.call(filename, { + return mainCompilation.mainTemplate.getAssetPath(filename, { hash: childCompilation.hash, chunk: entryChunk, name: `HtmlWebpackPlugin_${index}` @@ -261,7 +261,7 @@ function compileTemplate (templatePath, outputFilename, mainCompilation) { if (!compiledTemplates[templatePath]) console.log(Object.keys(compiledTemplates), templatePath); const compiledTemplate = compiledTemplates[templatePath]; // Replace [hash] placeholders in filename - const outputName = mainCompilation.mainTemplate.hooks.assetPath.call(outputFilename, { + const outputName = mainCompilation.mainTemplate.getAssetPath(outputFilename, { hash: compiledTemplate.hash, chunk: compiledTemplate.entry });
refactor: Use getAssetPath instead of calling the hook directly
diff --git a/tacl/constants.py b/tacl/constants.py index <HASH>..<HASH> 100644 --- a/tacl/constants.py +++ b/tacl/constants.py @@ -284,9 +284,9 @@ HIGHLIGHT_TEMPLATE = '''<!DOCTYPE html> var n = 10; var xr = 0; var xg = 0; - var xb = 0; - var yr = 0; - var yg = 128; + var xb = 255; + var yr = 255; + var yg = 0; var yb = 0; var max = $("input").length;
Changed colour scheme for highlighting to hopefully be clearer.
diff --git a/src/Resque/Redis.php b/src/Resque/Redis.php index <HASH>..<HASH> 100644 --- a/src/Resque/Redis.php +++ b/src/Resque/Redis.php @@ -223,7 +223,7 @@ class Redis } // create Predis client - $this->redis = new Predis\Client($params, $options); + $this->initializePredisClient($params, $options); // setup namespace if (!empty($config['namespace'])) { @@ -237,6 +237,17 @@ class Redis } /** + * initialize the redis member with a predis client. + * isolated call for testability + * @param array $config predis config parameters + * @param array $options predis optional parameters + * @return null + */ + private function initializePredisClient($config, $options) { + $this->redis = new Predis\Client($config, $options); + } + + /** * Set Redis namespace * * @param string $namespace New namespace
Externalize foreign object construction fro testability
diff --git a/aioboto3/s3/inject.py b/aioboto3/s3/inject.py index <HASH>..<HASH> 100644 --- a/aioboto3/s3/inject.py +++ b/aioboto3/s3/inject.py @@ -77,6 +77,8 @@ async def download_fileobj(self, Bucket, Key, Fileobj, ExtraArgs=None, """ try: + if ExtraArgs is None: + ExtraArgs = {} resp = await self.get_object(Bucket=Bucket, Key=Key, **ExtraArgs) except ClientError as err: if err.response['Error']['Code'] == 'NoSuchKey':
[noref] Default ExtraArgs to {} if None before expanding
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -35,7 +35,7 @@ function expose () { Object.defineProperty(window.choo, 'debug', debug(state, emitter, app, localEmitter)) - window.choo.log = log(state, emitter, app, localEmitter) + log(state, emitter, app, localEmitter) window.choo.copy = copy window.choo.routes = Object.keys(getAllRoutes(app.router.router))
Fix bug: log works on the global directly. (#<I>)
diff --git a/src/main/java/net/dv8tion/jda/core/JDA.java b/src/main/java/net/dv8tion/jda/core/JDA.java index <HASH>..<HASH> 100644 --- a/src/main/java/net/dv8tion/jda/core/JDA.java +++ b/src/main/java/net/dv8tion/jda/core/JDA.java @@ -149,8 +149,8 @@ public interface JDA * The time in milliseconds that discord took to respond to our last heartbeat * <br>This roughly represents the WebSocket ping of this session * - * <p>{@link net.dv8tion.jda.core.requests.RestAction RestAction} request times do not - * correlate to this value! + * <p><b>{@link net.dv8tion.jda.core.requests.RestAction RestAction} request times do not + * correlate to this value!</b> * * @return time in milliseconds between heartbeat and the heartbeat ack response */
Bolded jdoc for getPing warning about its lack of relation to RestAction
diff --git a/src/lib/runner.js b/src/lib/runner.js index <HASH>..<HASH> 100644 --- a/src/lib/runner.js +++ b/src/lib/runner.js @@ -265,7 +265,7 @@ export default { }, notifyRunningSpec (specFile) { - channel.emit('running:spec', specFile) + channel.emit('spec:changed', specFile) }, focusTests () {
rename to spec:changed event
diff --git a/src/nls/de/strings.js b/src/nls/de/strings.js index <HASH>..<HASH> 100644 --- a/src/nls/de/strings.js +++ b/src/nls/de/strings.js @@ -288,7 +288,7 @@ define({ "ABOUT_TEXT_LINE3" : "Hinweise, Bestimmungen und Bedingungen, die sich auf Drittanbieter-Software beziehen, finden sich unter <a class=\"clickable-link\" data-href=\"http://www.adobe.com/go/thirdparty/\">http://www.adobe.com/go/thirdparty/</a> und sind hier durch Bezugnahme eingeschlossen.", "ABOUT_TEXT_LINE4" : "Dokumentation und Quellcode unter <a class=\"clickable-link\" data-href=\"https://github.com/adobe/brackets/\">https://github.com/adobe/brackets/</a>", "ABOUT_TEXT_LINE5" : "Gemacht mit \u2764 und JavaScript von:", - "ABOUT_TEXT_LINE6" : "Vielen Leuten (aber wir haben gerade Probleme, diese Daten zu laden).", + "ABOUT_TEXT_LINE6" : "…vielen Leuten (…leider haben wir aber gerade Probleme, diese Daten zu laden).", "UPDATE_NOTIFICATION_TOOLTIP" : "Eine neue Version von {APP_NAME} ist verfügbar! Für Details hier klicken.", "UPDATE_AVAILABLE_TITLE" : "Update verfügbar", "UPDATE_MESSAGE" : "Hallo! Eine neue Version von {APP_NAME} ist verfügbar. Hier einige der neuen Funktionen:",
Apply suggestion by @pthiess for ABOUT_TEXT_LINE6 in 'de' locale
diff --git a/lib/gem/release/version.rb b/lib/gem/release/version.rb index <HASH>..<HASH> 100644 --- a/lib/gem/release/version.rb +++ b/lib/gem/release/version.rb @@ -1,5 +1,5 @@ module Gem module Release - VERSION = '2.0.0.dev.4' + VERSION = '2.0.0.dev.5' end end
Bump to <I>.de<I>
diff --git a/sysfs/net_class.go b/sysfs/net_class.go index <HASH>..<HASH> 100644 --- a/sysfs/net_class.go +++ b/sysfs/net_class.go @@ -80,7 +80,7 @@ func (fs FS) NewNetClass() (NetClass, error) { netClass := NetClass{} for _, deviceDir := range devices { - if !deviceDir.IsDir() { + if deviceDir.Mode().IsRegular() { continue } interfaceClass, err := netClass.parseNetClassIface(path + "/" + deviceDir.Name())
sysfs/nettclass: Ignore regular files only Symlinks are acceptable. Resolves #<I>.
diff --git a/flink-python/setup.py b/flink-python/setup.py index <HASH>..<HASH> 100644 --- a/flink-python/setup.py +++ b/flink-python/setup.py @@ -224,7 +224,7 @@ run sdist. author_email='dev@flink.apache.org', python_requires='>=3.5', install_requires=['py4j==0.10.8.1', 'python-dateutil==2.8.0', 'apache-beam==2.19.0', - 'cloudpickle==1.2.2'], + 'cloudpickle==1.2.2', 'avro-python3>=1.8.1,<=1.9.1'], tests_require=['pytest==4.4.1'], description='Apache Flink Python API', long_description=long_description,
[FLINK-<I>][python] Limit the version of avro-python3 This closes #<I>.
diff --git a/tests/run_command.py b/tests/run_command.py index <HASH>..<HASH> 100644 --- a/tests/run_command.py +++ b/tests/run_command.py @@ -1,5 +1,6 @@ import os import subprocess +import sys from trashcli import base_dir @@ -17,7 +18,7 @@ def run_command(cwd, command, args=None, input='', env=None): if args == None: args = [] command_full_path = os.path.join(base_dir, command) - process = subprocess.Popen(["python", command_full_path] + args, + process = subprocess.Popen([sys.executable, command_full_path] + args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
Now integration tests should run also on Debian system where the only available Python executable is python3
diff --git a/symbionts/pressbooks-latex/pb-latex-admin.php b/symbionts/pressbooks-latex/pb-latex-admin.php index <HASH>..<HASH> 100644 --- a/symbionts/pressbooks-latex/pb-latex-admin.php +++ b/symbionts/pressbooks-latex/pb-latex-admin.php @@ -18,7 +18,9 @@ class PBLatexAdmin extends PBLatex { // since we're activating at the network level, this needs to be called in the constructor $this->addOptions(); - add_action( 'admin_menu', array( &$this, 'adminMenu' ) ); + if ( \Pressbooks\Book::isBook() ) { + add_action( 'admin_menu', [ &$this, 'adminMenu' ] ); + } } function adminMenu() {
PB Latex settings should only appear in books (fixes #<I>) (#<I>)
diff --git a/python/ray/services.py b/python/ray/services.py index <HASH>..<HASH> 100644 --- a/python/ray/services.py +++ b/python/ray/services.py @@ -1563,7 +1563,7 @@ def start_raylet_monitor(redis_address, "--config_list={}".format(config_str), ] if redis_password: - command += [redis_password] + command += ["--redis_password={}".format(redis_password)] process_info = start_ray_process( command, ray_constants.PROCESS_TYPE_RAYLET_MONITOR,
Fix issue when starting `raylet_monitor` (#<I>)
diff --git a/src/org/ddogleg/struct/DogLinkedList.java b/src/org/ddogleg/struct/DogLinkedList.java index <HASH>..<HASH> 100644 --- a/src/org/ddogleg/struct/DogLinkedList.java +++ b/src/org/ddogleg/struct/DogLinkedList.java @@ -33,14 +33,14 @@ import java.util.Objects; */ public class DogLinkedList<T> { // first element in the list - @Nullable Element<T> first; + protected @Nullable Element<T> first; // last element in the list - @Nullable Element<T> last; + protected @Nullable Element<T> last; // total number of elements in the list - int size; + protected int size; // recycled elements. It is assumed that all elements inside of here have all parameters set to null already - final ArrayDeque<Element<T>> available = new ArrayDeque<>(); + protected final ArrayDeque<Element<T>> available = new ArrayDeque<>(); /** * Puts the linked list back into its initial state. Elements are saved for later use.
DogLinkedList - Changed fields from package protected to protected
diff --git a/py2pack/__init__.py b/py2pack/__init__.py index <HASH>..<HASH> 100644 --- a/py2pack/__init__.py +++ b/py2pack/__init__.py @@ -1,5 +1,5 @@ __doc__ = 'Generate distribution packages from Python packages on PyPI' __author__ = 'Sascha Peilicke <saschpe@gmx.de>' -__version__ = '0.2.4' +__version__ = '0.2.5' from py2pack import list, search, fetch, generate, main
Bump the version number to '<I>'.
diff --git a/src/ossos-pipeline/ossos/gui/models/workload.py b/src/ossos-pipeline/ossos/gui/models/workload.py index <HASH>..<HASH> 100644 --- a/src/ossos-pipeline/ossos/gui/models/workload.py +++ b/src/ossos-pipeline/ossos/gui/models/workload.py @@ -1,5 +1,6 @@ from glob import glob import re +from astropy import units __author__ = "David Rusk <drusk@uvic.ca>" @@ -16,7 +17,8 @@ from .exceptions import (NoAvailableWorkException, SourceNotNamedException) from ..progress import FileLockedException -from ...astrom import StreamingAstromWriter, Source +from ...astrom import StreamingAstromWriter, Source, SourceReading +from ...mpc import Observation from ...orbfit import Orbfit @@ -396,6 +398,10 @@ class TracksWorkUnit(WorkUnit): return self.builder.build_workunit(mpc_filename) def save(self): + """ + Update the SouceReading information for the currently recorded observations and then flush those to a file. + @return: mpc_filename of the resulting save. + """ self.get_writer().flush() mpc_filename = self.output_context.get_full_path(self.get_writer().get_filename()) self.get_writer().close()
added a return type to a method so other parts of the code can check that they are getting the kind of variable they want. PyEphem will catch bad return type matching, but only if the comments of the method give some hints.
diff --git a/src/com/jfoenix/controls/JFXDialog.java b/src/com/jfoenix/controls/JFXDialog.java index <HASH>..<HASH> 100644 --- a/src/com/jfoenix/controls/JFXDialog.java +++ b/src/com/jfoenix/controls/JFXDialog.java @@ -57,7 +57,8 @@ import com.jfoenix.transitions.CachedTransition; /** * @author Shadi Shaheen - * + * note that for JFXDialog to work properly the root node should + * be of type {@link StackPane} */ @DefaultProperty(value="content") public class JFXDialog extends StackPane {
Note that JFXDialog requires the root to be stack pane to work properly
diff --git a/src/org/openscience/cdk/renderer/MoleculeViewer2D.java b/src/org/openscience/cdk/renderer/MoleculeViewer2D.java index <HASH>..<HASH> 100644 --- a/src/org/openscience/cdk/renderer/MoleculeViewer2D.java +++ b/src/org/openscience/cdk/renderer/MoleculeViewer2D.java @@ -174,7 +174,7 @@ public class MoleculeViewer2D extends JPanel implements CDKChangeListener { StructureDiagramGenerator sdg = new StructureDiagramGenerator(); MoleculeViewer2D mv = new MoleculeViewer2D(); - mv.getFrame().setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + mv.getFrame().setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); Renderer2DModel r2dm = mv.getRenderer2DModel(); r2dm.setDrawNumbers(true);
Tried to fix exit method - didn't work git-svn-id: <URL>
diff --git a/lib/term_buffer.js b/lib/term_buffer.js index <HASH>..<HASH> 100644 --- a/lib/term_buffer.js +++ b/lib/term_buffer.js @@ -505,6 +505,13 @@ TermBuffer.prototype.scroll = function(dir, lines) { } }; +TermBuffer.prototype.write = function(write, encoding) { + if(this._writer === undefined) { + console.warn("TermBuffer.write is deprecated. Use TermWriter.write insted!"); + this._writer = new (require("./term_writer.js"))(this); + } + return this._writer.write.apply(this._writer, arguments); +} // Generates a diff between this.term and OtherTerm // if this diff is applied to this.term it results in the same as OtherTerm
Add compatibility write function to TermBuffer
diff --git a/modules/core/src/main/java/org/torquebox/core/pool/SharedPool.java b/modules/core/src/main/java/org/torquebox/core/pool/SharedPool.java index <HASH>..<HASH> 100644 --- a/modules/core/src/main/java/org/torquebox/core/pool/SharedPool.java +++ b/modules/core/src/main/java/org/torquebox/core/pool/SharedPool.java @@ -20,9 +20,9 @@ package org.torquebox.core.pool; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.WeakHashMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.atomic.AtomicInteger; @@ -290,7 +290,7 @@ public class SharedPool<T> implements Pool<T> { /** The previous shared instances. */ private List<T> previousInstances = new ArrayList<T>(); - private Map<T, AtomicInteger> instanceCounts = new HashMap<T, AtomicInteger>(); + private Map<T, AtomicInteger> instanceCounts = new WeakHashMap<T, AtomicInteger>(); /** Optional factory to create the initial instance. */ private InstanceFactory<T> factory;
Remove another potential runtime memory leak from zero-downtime implementation (TORQUE-<I>)
diff --git a/src/js/player.js b/src/js/player.js index <HASH>..<HASH> 100644 --- a/src/js/player.js +++ b/src/js/player.js @@ -906,8 +906,11 @@ class MediaElementPlayer { // Fixing an Android stock browser bug, where "seeked" isn't fired correctly after // ending the video and jumping to the beginning setTimeout(() => { - t.container.querySelector(`.${t.options.classPrefix}overlay-loading`) - .parentNode.style.display = 'none'; + const loadingElement = t.container + .querySelector(`.${t.options.classPrefix}overlay-loading`); + if (loadingElement && loadingElement.parentNode) { + loadingElement.parentNode.style.display = 'none'; + } }, 20); } catch (exp) { console.log(exp); @@ -1906,7 +1909,7 @@ class MediaElementPlayer { node.style.display = ''; t.container.parentNode.insertBefore(node, t.container); t.node.remove(); - + // Add children if (t.mediaFiles) { for (let i = 0, total = t.mediaFiles.length; i < total; i++) {
Remove loading overlay only if it exists instead of failing
diff --git a/Task/Mysql/DbFindReplace.php b/Task/Mysql/DbFindReplace.php index <HASH>..<HASH> 100644 --- a/Task/Mysql/DbFindReplace.php +++ b/Task/Mysql/DbFindReplace.php @@ -8,7 +8,7 @@ class DbFindReplace extends \Qobo\Robo\AbstractCmdTask * {@inheritdoc} */ protected $data = [ - 'cmd' => './vendor/interconnectit/search-replace-db/srdb.cli.php -h %%HOST%% %%PORT%% -u %%USER%% -p %%PASS%% -n %%DB%% -s %%SEARCH%% -r %%REPLACE%%', + 'cmd' => './vendor/bin/srdb.cli.php -h %%HOST%% %%PORT%% -u %%USER%% -p %%PASS%% -n %%DB%% -s %%SEARCH%% -r %%REPLACE%%', 'path' => ['./'], 'host' => 'localhost', 'user' => 'root',
Updated phake-builder (task #<I>) * Updated phake-builder to v4 as it fixes find-replace issues * Adjusted DbFindReplace task to utilize vendor/bin for mysql find-replace instead of direct path to the script in vendor
diff --git a/src/expressHelpers.js b/src/expressHelpers.js index <HASH>..<HASH> 100644 --- a/src/expressHelpers.js +++ b/src/expressHelpers.js @@ -4,24 +4,17 @@ import {context} from './context' import {createChannel} from './messaging' import onHeaders from 'on-headers' -const appToChan = new WeakMap() const middlewares = new WeakMap() +const channel = createChannel() + export function register(app, verb, pattern, reqHandler) { - if (!appToChan.has(app)) { - appToChan.set(app, createChannel()) - } - const reqChannel = appToChan.get(app) app[verb](pattern, (req, res, next) => { - reqChannel.put([req, res, next, reqHandler]) + channel.put([req, res, next, reqHandler]) }) } -export function* runApp(app) { - if (!appToChan.has(app)) { - throw new Error('you should register at least one handler before running') - } - const channel = appToChan.get(app) +export function* runApp() { while (true) { const [req, res, next, reqHandler] = yield channel.take()
Change expressHelpers API: one runApp run is needed There is now a single channel shared by all registered handlers, runApp listens to this channel
diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py index <HASH>..<HASH> 100644 --- a/OpenSSL/test/test_ssl.py +++ b/OpenSSL/test/test_ssl.py @@ -1340,24 +1340,7 @@ class MemoryBIOTests(TestCase, _LoopbackMixin): code, as no memory BIO is involved here). Even though this isn't a memory BIO test, it's convenient to have it here. """ - (server, client) = socket_pair() - - # Let the encryption begin... - client_conn = self._client(client) - server_conn = self._server(server) - - # Establish the connection - established = False - while not established: - established = True # assume the best - for ssl in client_conn, server_conn: - try: - # Generally a recv() or send() could also work instead - # of do_handshake(), and we would stop on the first - # non-exception. - ssl.do_handshake() - except WantReadError: - established = False + server_conn, client_conn = self._loopback() important_message = b("Help me Obi Wan Kenobi, you're my only hope.") client_conn.send(important_message)
Switch to the loopback setup helper in test_socketConnect, incidentally converting the connections to blocking, which avoids the OS X recv error.
diff --git a/pnc_cli/bpmbuildconfigurations.py b/pnc_cli/bpmbuildconfigurations.py index <HASH>..<HASH> 100644 --- a/pnc_cli/bpmbuildconfigurations.py +++ b/pnc_cli/bpmbuildconfigurations.py @@ -49,8 +49,10 @@ def create_build_configuration_process(repository, revision, **kwargs): if not kwargs.get("generic_parameters"): kwargs["generic_parameters"] = {} - kwargs["project"] = projects_api.get_specific(kwargs.get("project_id")).content - kwargs["environment"] = envs_api.get_specific(kwargs.get("build_environment_id")).content + if not kwargs.get("project"): + kwargs["project"] = projects_api.get_specific(kwargs.get("project_id")).content + if not kwargs.get("environment"): + kwargs["environment"] = envs_api.get_specific(kwargs.get("build_environment_id")).content build_configuration = create_build_conf_object(scm_revision=revision, **kwargs) repo_creation = swagger_client.RepositoryCreationUrlAutoRest()
fix: get fields by id in BPM BC create only when needed
diff --git a/contrib/backporting/set-labels.py b/contrib/backporting/set-labels.py index <HASH>..<HASH> 100755 --- a/contrib/backporting/set-labels.py +++ b/contrib/backporting/set-labels.py @@ -11,7 +11,11 @@ import argparse import os import sys -from github import Github +try: + from github import Github +except ImportError: + print("pygithub not found you can install it by running 'pip3 install --user PyGithub'") + sys.exit(-1) parser = argparse.ArgumentParser() parser.add_argument('pr_number', type=int)
contrib/backporting: print helper message how to install missing library Fixes: 8ae<I>d<I>be1b ("Add label script for backporting")
diff --git a/core/DataTable/Renderer/Csv.php b/core/DataTable/Renderer/Csv.php index <HASH>..<HASH> 100644 --- a/core/DataTable/Renderer/Csv.php +++ b/core/DataTable/Renderer/Csv.php @@ -239,6 +239,8 @@ class Csv extends Renderer $value = $this->formatFormulas($value); + $value = str_replace(["\t"], ' ', $value); + if (is_string($value) && (strpos($value, '"') !== false || strpos($value, $this->separator) !== false)
Improve the sanitization of request parameters (#<I>) * Improve the sanitization of request parameters by replacing tab characters with spaces * Adjust scope of value sanitization * Fix commented line mistake
diff --git a/lib/mumble-ruby/user.rb b/lib/mumble-ruby/user.rb index <HASH>..<HASH> 100644 --- a/lib/mumble-ruby/user.rb +++ b/lib/mumble-ruby/user.rb @@ -12,6 +12,13 @@ module Mumble attribute :self_mute attribute :self_deaf + def initialize(client, data) + super(client, data) + if channel_id.nil? + self.update({"channel_id" => 0}) + end + end + def current_channel client.channels[channel_id] end
Set channel_id to 0 for users in root channel
diff --git a/src/Mapper.php b/src/Mapper.php index <HASH>..<HASH> 100644 --- a/src/Mapper.php +++ b/src/Mapper.php @@ -39,6 +39,16 @@ class Mapper } /** + * Getter for all properties + * @param string $name name of property to retrieve + * @return mixed value of property + */ + public function __get($name) + { + return $this->$name; + } + + /** * Add models namespace to type, if it is not null * @param string $type type name * @return string type name prepended with models namespace if it is not null diff --git a/test/MapperTest.php b/test/MapperTest.php index <HASH>..<HASH> 100644 --- a/test/MapperTest.php +++ b/test/MapperTest.php @@ -84,6 +84,11 @@ class MapperTest extends AbstractTestCase $this->assertNull($user); } + public function testMagicGet() + { + $this->assertInstanceOf('MongoDB', $this->mapper->mongodb); + } + public function testFetchObjects() { $users = $this->mapper->fetchObjects('users', 'User', ['type' => User::TYPE_ADMIN]);
Add __get method to Mapper class to allow getting object properties
diff --git a/spec/main-spec.js b/spec/main-spec.js index <HASH>..<HASH> 100644 --- a/spec/main-spec.js +++ b/spec/main-spec.js @@ -8,6 +8,8 @@ import { fixtureFilename } from './utils'; describe('Atom Grammar Test Jasmine', () => { + beforeEach(() => atom.config.set('core.useTreeSitterParsers', false)); + describe('C Syntax Assertions', () => { beforeEach(() => waitsForPromise(() => atom.packages.activatePackage('language-c'))); grammarTest(fixtureFilename('C/syntax_test_c_example.c'));
Disable tree-sitter for tests atom-grammar-test doesn't currently work with tree-sitter since they don't expose tokens in `tokenizeLine` <URL>
diff --git a/lib/plucky/query.rb b/lib/plucky/query.rb index <HASH>..<HASH> 100644 --- a/lib/plucky/query.rb +++ b/lib/plucky/query.rb @@ -14,7 +14,7 @@ module Plucky attr_reader :criteria, :options, :collection def_delegator :criteria, :simple? def_delegator :options, :fields? - def_delegators :to_a, :each, :include? + def_delegators :to_a, :include? def initialize(collection, opts={}) @collection, @options, @criteria = collection, OptionsHash.new, CriteriaHash.new @@ -84,6 +84,10 @@ module Plucky clone.update(opts).reverse.find_one end + def each + find_each.each { |doc| yield(doc) } + end + def remove(opts={}) query = clone.update(opts) query.collection.remove(query.criteria.to_hash) @@ -157,7 +161,7 @@ module Plucky alias :exist? :exists? def to_a - all + find_each.to_a end def [](key)
Optimize each and to_a to use find_each instead of all. all loads every doc into memory, find_each creates a cursor and loads as you keep reqeusting.
diff --git a/src/fa/passwords.php b/src/fa/passwords.php index <HASH>..<HASH> 100644 --- a/src/fa/passwords.php +++ b/src/fa/passwords.php @@ -17,4 +17,5 @@ return [ 'sent' => 'لینک بازگردانی گذرواژه به ایمیل شما ارسال شد.', 'token' => 'مشخصه‌ی بازگردانی گذرواژه معتبر نیست.', 'user' => 'ما کاربری با این نشانی ایمیل نداریم!', + 'throttled' => 'پیش از تلاش مجدد کمی صبر کنید.', ];
Update passwords.php Add new vars for <I>.
diff --git a/lib/nodes/ObjectExpression.js b/lib/nodes/ObjectExpression.js index <HASH>..<HASH> 100644 --- a/lib/nodes/ObjectExpression.js +++ b/lib/nodes/ObjectExpression.js @@ -55,7 +55,7 @@ var ObjectExpression = module.exports = Base.extend({ // As we don't keep reference to the parent, just update properties so the object stay // the same reference. - delete this.node.property; + delete this.node.properties; delete this.node.type; this.node.TEMP = false; _.extend(this.node, val);
ObjectExpressions have a 'properties' not 'property' property
diff --git a/src/attributes.js b/src/attributes.js index <HASH>..<HASH> 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -12,9 +12,31 @@ export class AttributesCustomAttribute { } valueChanged() { - Object.keys(this.value).forEach(attribute => { + Object.keys(normalizeAtttibutes(this.value)).forEach(attribute => { this.element.setAttribute(attribute, this.value[attribute]); }); } } + +/** + * @param {object|string|string[]} value + * @returns {object} where all the values are strings or boolean + */ +function normalizeAtttibutes(value, result = {}) { + if (typeof this.value === 'string') { + result[this.value] = true; + + return result; + } + + if (Array.isArray(this.value)) { + this.value.forEach(v => { + result = normalizeAtttibutes(v, result); + }); + + return result; + } + + return result; +}
feat(attributes): normalize attributes to an object One can now pass a string, array of strings or an object with string or boolean values to the attributes form-element property.
diff --git a/lib/laser/types/types.rb b/lib/laser/types/types.rb index <HASH>..<HASH> 100644 --- a/lib/laser/types/types.rb +++ b/lib/laser/types/types.rb @@ -57,7 +57,7 @@ module Laser def possible_classes case variance - when :invariant then SexpAnalysis::ClassRegistry[class_name] + when :invariant then [SexpAnalysis::ClassRegistry[class_name]] when :covariant then SexpAnalysis::ClassRegistry[class_name].subset when :contravariant then SexpAnalysis::ClassRegistry[class_name].superset end
Whoops: invariants need to return a singleton list, not just the matching class.
diff --git a/core/src/main/java/org/xillium/core/conf/TextResource.java b/core/src/main/java/org/xillium/core/conf/TextResource.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/org/xillium/core/conf/TextResource.java +++ b/core/src/main/java/org/xillium/core/conf/TextResource.java @@ -6,7 +6,7 @@ package org.xillium.core.conf; */ public class TextResource { public final String name; - public String text; + public String text = ""; // an empty string can go into map, null can't public TextResource(String n) { name = n;
TextResource fixed to allow empty strings
diff --git a/test/akismet_test.rb b/test/akismet_test.rb index <HASH>..<HASH> 100644 --- a/test/akismet_test.rb +++ b/test/akismet_test.rb @@ -1,6 +1,6 @@ require 'test_helper' -class AkismetTest < Test +class AkismetTest < Minitest::Test def setup Akismet.api_key = API_KEY diff --git a/test/client_test.rb b/test/client_test.rb index <HASH>..<HASH> 100644 --- a/test/client_test.rb +++ b/test/client_test.rb @@ -1,7 +1,7 @@ require 'test_helper' require 'date' -class ClientTest < Test +class ClientTest < Minitest::Test APP_URL = 'http://example.com' APP_NAME = 'Akismet tests' 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 @@ -3,4 +3,3 @@ require 'akismet' API_KEY = ENV['AKISMET_API_KEY'] || raise("Set the AKISMET_API_KEY environment variable to an API key obtained from akismet.com") -Test = defined?(Minitest::Test) ? Minitest::Test : MiniTest::Unit::TestCase
Always use Minitest::Test
diff --git a/pkg/api/types.go b/pkg/api/types.go index <HASH>..<HASH> 100644 --- a/pkg/api/types.go +++ b/pkg/api/types.go @@ -1375,7 +1375,7 @@ type NodeAddress struct { } // NodeResources is an object for conveying resource information about a node. -// see http://docs.k8s.io/resources.md for more details. +// see http://docs.k8s.io/design/resources.md for more details. type NodeResources struct { // Capacity represents the available resources of a node Capacity ResourceList `json:"capacity,omitempty"`
update the links in pkg/api/types.go
diff --git a/ores/about.py b/ores/about.py index <HASH>..<HASH> 100644 --- a/ores/about.py +++ b/ores/about.py @@ -1,5 +1,5 @@ __name__ = "ores" -__version__ = "0.9.1" +__version__ = "1.0.0" __author__ = "Aaron Halfaker" __author_email__ = "ahalfaker@wikimedia.org" __description__ = "A webserver for hosting scorer models."
Increments version to <I>
diff --git a/client/modules/crm/src/views/dashlets/activities.js b/client/modules/crm/src/views/dashlets/activities.js index <HASH>..<HASH> 100644 --- a/client/modules/crm/src/views/dashlets/activities.js +++ b/client/modules/crm/src/views/dashlets/activities.js @@ -129,7 +129,7 @@ Espo.define('crm:views/dashlets/activities', ['views/dashlets/abstract/base', 'm this.collection = new MultiCollection(); this.collection.seeds = this.seeds; this.collection.url = 'Activities/action/listUpcoming'; - this.collection.maxSize = this.getConfig().get('recordsPerPageSmall') || 5; + this.collection.maxSize = this.getOption('displayRecords') || this.getConfig().get('recordsPerPageSmall') || 5; this.collection.data.entityTypeList = this.scopeList; this.listenToOnce(this.collection, 'sync', function () {
Activities Dashlet: fix Display Records option (#<I>)
diff --git a/tests/tabix_test.py b/tests/tabix_test.py index <HASH>..<HASH> 100644 --- a/tests/tabix_test.py +++ b/tests/tabix_test.py @@ -78,6 +78,15 @@ class TestIndexing(unittest.TestCase): pysam.tabix_index(self.tmpfilename, preset="gff") self.assertTrue(checkBinaryEqual(self.tmpfilename + ".tbi", self.filename_idx)) + def test_indexing_to_custom_location_works(self): + '''test indexing a file with a non-default location.''' + + index_path = get_temp_filename(suffix='custom.tbi') + pysam.tabix_index(self.tmpfilename, preset="gff", index=index_path, force=True) + self.assertTrue(checkBinaryEqual(index_path, self.filename_idx)) + os.unlink(index_path) + + def test_indexing_with_explict_columns_works(self): '''test indexing via preset.''' @@ -101,7 +110,8 @@ class TestIndexing(unittest.TestCase): def tearDown(self): os.unlink(self.tmpfilename) - os.unlink(self.tmpfilename + ".tbi") + if os.path.exists(self.tmpfilename + ".tbi"): + os.unlink(self.tmpfilename + ".tbi") class TestCompression(unittest.TestCase):
Add test for indexing tabix file to custom location
diff --git a/src/main/java/org/jgroups/protocols/kubernetes/KUBE_PING.java b/src/main/java/org/jgroups/protocols/kubernetes/KUBE_PING.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jgroups/protocols/kubernetes/KUBE_PING.java +++ b/src/main/java/org/jgroups/protocols/kubernetes/KUBE_PING.java @@ -193,11 +193,6 @@ public class KUBE_PING extends Discovery { || System.getenv(property_name) != null; } - @Override public void destroy() { - client=null; - super.destroy(); - } - private PhysicalAddress getCurrentPhysicalAddress(Address addr) { return (PhysicalAddress)down(new Event(Event.GET_PHYSICAL_ADDRESS, addr)); }
Resolves #<I>: Occasional NPE on shutdown: remove unnecessary nulling of fields in Protocol.destroy()
diff --git a/okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DohProviders.java b/okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DohProviders.java index <HASH>..<HASH> 100644 --- a/okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DohProviders.java +++ b/okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DohProviders.java @@ -106,8 +106,8 @@ public class DohProviders { if (!workingOnly) { //result.add(buildCleanBrowsing(client)); // timeouts result.add(buildCryptoSx(client)); // 521 - server down - result.add(buildChantra(client)); // 400 } + result.add(buildChantra(client)); return result; }
Enable chantra for DNS over HTTPS testing
diff --git a/client/server/pages/index.js b/client/server/pages/index.js index <HASH>..<HASH> 100644 --- a/client/server/pages/index.js +++ b/client/server/pages/index.js @@ -631,7 +631,8 @@ export default function pages() { app.get( '/plans', function ( req, res, next ) { if ( ! req.context.isLoggedIn ) { - const queryFor = req.query && req.query.for; + const queryFor = req.query?.for; + if ( queryFor && 'jetpack' === queryFor ) { res.redirect( 'https://wordpress.com/wp-login.php?redirect_to=https%3A%2F%2Fwordpress.com%2Fplans' @@ -639,9 +640,9 @@ export default function pages() { } else if ( ! config.isEnabled( 'jetpack-cloud/connect' ) ) { res.redirect( 'https://wordpress.com/pricing' ); } - } else { - next(); } + + next(); } ); }
Fix `/plans` route not rendering in Jetpack cloud (#<I>)
diff --git a/src/main/java/org/junit/Assert.java b/src/main/java/org/junit/Assert.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/junit/Assert.java +++ b/src/main/java/org/junit/Assert.java @@ -127,13 +127,10 @@ public class Assert { } private static boolean equalsRegardingNull(Object expected, Object actual) { - if (expected == null && actual == null) - return true; - if (expected != null && isEquals(expected, actual)) - return true; + if (expected == null) + return actual == null; - return false; - + return isEquals(expected, actual); } private static boolean isEquals(Object expected, Object actual) {
Simplifying isEqualsRegardingNull.
diff --git a/lib/discordrb/data/channel.rb b/lib/discordrb/data/channel.rb index <HASH>..<HASH> 100644 --- a/lib/discordrb/data/channel.rb +++ b/lib/discordrb/data/channel.rb @@ -785,7 +785,7 @@ module Discordrb end def update_channel_data(new_data) - new_nsfw = new_data[:nsfw].is_a?(TrueClass) || new_data[:nsfw].is_a?(FalseClass) ? new_nsfw : @nsfw + new_nsfw = new_data[:nsfw].is_a?(TrueClass) || new_data[:nsfw].is_a?(FalseClass) ? new_data[:nsfw] : @nsfw # send permission_overwrite only when explicitly set overwrites = new_data[:permission_overwrites] ? new_data[:permission_overwrites].map { |_, v| v.to_hash } : nil response = JSON.parse(API::Channel.update(@bot.token, @id,
Fix nsfw value not being passed to API call (#<I>)
diff --git a/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java b/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java index <HASH>..<HASH> 100644 --- a/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java +++ b/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ServiceObjectFactory.java @@ -96,17 +96,17 @@ public class ServiceObjectFactory implements ObjectFactory UnifiedServiceRefMetaData serviceRef = unmarshallServiceRef(ref); Bus bus; + //Reset bus before constructing Service + BusFactory.setThreadDefaultBus(null); URL cxfConfig = getCXFConfiguration(serviceRef.getVfsRoot()); if (cxfConfig != null) { SpringBusFactory busFactory = new SpringBusFactory(); bus = busFactory.createBus(cxfConfig); - BusFactory.setDefaultBus(bus); + BusFactory.setThreadDefaultBus(bus); } else { - //Reset bus before constructing Service - BusFactory.setThreadDefaultBus(null); bus = BusFactory.getThreadDefaultBus(); }
[JBWS-<I>] Setting new bus read from configuration to thread local only, do not change the BusFactory static default bus
diff --git a/client/lib/wpcom-undocumented/lib/undocumented.js b/client/lib/wpcom-undocumented/lib/undocumented.js index <HASH>..<HASH> 100644 --- a/client/lib/wpcom-undocumented/lib/undocumented.js +++ b/client/lib/wpcom-undocumented/lib/undocumented.js @@ -2352,6 +2352,34 @@ Undocumented.prototype.transferStatus = function( siteId, transferId ) { }; /** + * Update the poster for a video. + * + * @param {string} videoId ID of the video + * @param {object} data The POST data + * @param {Function} fn Function to invoke when request is complete + * @returns {Promise} A promise that resolves when the request is complete + */ +Undocumented.prototype.updateVideoPoster = function( videoId, data, fn ) { + debug( '/videos/:video_id/poster' ); + + const params = { + path: `/videos/${ videoId }/poster`, + }; + + if ( 'file' in data ) { + params.formData = [ + [ 'poster', data.file ] + ]; + } + + if ( 'at_time' in data ) { + params.body = data; + } + + return this.wpcom.req.post( params, fn ); +}; + +/** * Expose `Undocumented` module */ module.exports = Undocumented;
Add undocumented endpoint for updating video poster
diff --git a/audio/ulaw/ulaw.go b/audio/ulaw/ulaw.go index <HASH>..<HASH> 100644 --- a/audio/ulaw/ulaw.go +++ b/audio/ulaw/ulaw.go @@ -19,8 +19,12 @@ func WriteFileWavFromUlaw(filename string, ulawBytes []byte) error { if err != nil { return err } + defer f.Close() _, err = WriteWavFromUlaw(f, ulawBytes) - return err + if err != nil { + return err + } + return f.Sync() } func WriteWavFromUlaw(w io.Writer, ulawBytes []byte) (n int, err error) {
enhance: audio/ulaw: update file close
diff --git a/smashrun/client.py b/smashrun/client.py index <HASH>..<HASH> 100644 --- a/smashrun/client.py +++ b/smashrun/client.py @@ -223,7 +223,7 @@ class Smashrun(object): return r def _iter(self, url, count, cls=None, **kwargs): - page = 0 + page = None if count is None else 0 while True: kwargs.update(count=count, page=page) r = self.session.get(url, params=kwargs) @@ -236,6 +236,8 @@ class Smashrun(object): yield cls(d) else: yield d + if page is None: + return page += 1 def _build_url(self, *args, **kwargs):
Add the ability to fetch all activities without paging
diff --git a/news-bundle/contao/classes/News.php b/news-bundle/contao/classes/News.php index <HASH>..<HASH> 100644 --- a/news-bundle/contao/classes/News.php +++ b/news-bundle/contao/classes/News.php @@ -279,6 +279,12 @@ class News extends \Frontend continue; } + // The target page is exempt from the sitemap (see #6418) + if ($blnIsSitemap && $objParent->sitemap == 'map_never') + { + continue; + } + if ($objParent->domain != '') { $domain = (\Environment::get('ssl') ? 'https://' : 'http://') . $objParent->domain . TL_PATH . '/';
[News] Do not add news and event URLs to the sitemap if the target page is exempt from the sitemap (see #<I>)
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -20,8 +20,12 @@ const checkResponse = async response => { const isOK = !response.headers.has('x-status-code') || parseInt(response.headers.get('x-status-code'), 10) < 300; - if (response.ok && isOK) return response.json(); - throw await response.json(); + if (response.headers.get('content-type').indexOf('application/json') > -1) { + if (response.ok && isOK) return response.json(); + throw await response.json(); + } + if (response.ok && isOK) return response.text(); + throw await response.text(); }; const doFetch = (
Only parse JSON if response declares it to be JSON If it's not JSON, return the body text.
diff --git a/spyder/plugins/plots/widgets/figurebrowser.py b/spyder/plugins/plots/widgets/figurebrowser.py index <HASH>..<HASH> 100644 --- a/spyder/plugins/plots/widgets/figurebrowser.py +++ b/spyder/plugins/plots/widgets/figurebrowser.py @@ -212,7 +212,8 @@ class FigureBrowser(QWidget, SpyderWidgetMixin): The available splitter width. """ min_sb_width = self.thumbnails_sb._min_scrollbar_width - self.splitter.setSizes([base_width - min_sb_width, min_sb_width]) + if base_width - min_sb_width > 0: + self.splitter.setSizes([base_width - min_sb_width, min_sb_width]) def show_fig_outline_in_viewer(self, state): """Draw a frame around the figure viewer if state is True."""
Prevent setting negative sizes in the plots pane
diff --git a/src/PHPCoverFish/CoverFishScanCommand.php b/src/PHPCoverFish/CoverFishScanCommand.php index <HASH>..<HASH> 100644 --- a/src/PHPCoverFish/CoverFishScanCommand.php +++ b/src/PHPCoverFish/CoverFishScanCommand.php @@ -196,11 +196,15 @@ class CoverFishScanCommand extends Command ); try { - $scanner = new CoverFishScanner($cliOptions, $outOptions); + + $scanner = new CoverFishScanner($cliOptions, $outOptions, $output); $scanner->analysePHPUnitFiles(); + } catch (CoverFishFailExit $e) { - die(CoverFishFailExit::RETURN_CODE_SCAN_FAIL); + return CoverFishFailExit::RETURN_CODE_SCAN_FAIL; } + + return 0; } /**
fix problem in exit code behaviour during scan fails and introduce output interface usage as standard out
diff --git a/src/DeepCopy/DeepCopy.php b/src/DeepCopy/DeepCopy.php index <HASH>..<HASH> 100644 --- a/src/DeepCopy/DeepCopy.php +++ b/src/DeepCopy/DeepCopy.php @@ -140,8 +140,8 @@ class DeepCopy return $var; } - // PHP 8.1 Enum - if (function_exists('enum_exists') && enum_exists($var::class)) { + // Enum + if (PHP_VERSION_ID >= 80100 && enum_exists($var::class)) { return $var; }
enum_exists may have been manually declared on lower PHP versions, use strict PHP version check
diff --git a/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php b/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php +++ b/src/Symfony/Component/Routing/Loader/AnnotationDirectoryLoader.php @@ -38,7 +38,12 @@ class AnnotationDirectoryLoader extends AnnotationFileLoader $collection = new RouteCollection(); $collection->addResource(new DirectoryResource($dir, '/\.php$/')); - foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY) as $file) { + $files = iterator_to_array(new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY)); + usort($files, function (\SplFileInfo $a, \SplFileInfo $b) { + return (string) $a > (string) $b ? 1 : -1; + }); + + foreach ($files as $file) { if (!$file->isFile() || '.php' !== substr($file->getFilename(), -4)) { continue; }
[Routing] made AnnotationDirectoryLoader deterministic (closes #<I>)
diff --git a/test/test_builder.py b/test/test_builder.py index <HASH>..<HASH> 100644 --- a/test/test_builder.py +++ b/test/test_builder.py @@ -31,7 +31,7 @@ class TestMethods(base.SchemaBuilderTestCase): def test_to_json(self): self.assertEqual( self.builder.to_json(), - '{"$schema": "%builder"}' % SchemaBuilder.DEFAULT_URI) + '{"$schema": "%s"}' % SchemaBuilder.DEFAULT_URI) def test_add_schema_with_uri_default(self): test_uri = 'TEST_URI'
oops, I renamed one thing I shouldn't have
diff --git a/pymouse/x11.py b/pymouse/x11.py index <HASH>..<HASH> 100644 --- a/pymouse/x11.py +++ b/pymouse/x11.py @@ -133,6 +133,7 @@ class PyMouseEvent(PyMouseEventMeta): self.stop() def stop(self): + self.state = False self.display.flush() self.display.record_disable_context(self.ctx) self.display.ungrab_pointer(X.CurrentTime)
X<I> now properly toggles the state off in PyKeyboardEvent with stop()
diff --git a/sample.go b/sample.go index <HASH>..<HASH> 100644 --- a/sample.go +++ b/sample.go @@ -1,5 +1,17 @@ package zipkintracer +import ( + "github.com/openzipkin/zipkin-go" +) + // Sampler functions return if a Zipkin span should be sampled, based on its // traceID. type Sampler func(id uint64) bool + +var ( + NeverSample = zipkin.NeverSample + AlwaysSample = zipkin.AlwaysSample + NewModuloSampler = zipkin.NewModuloSampler + NewBoundarySampler = zipkin.NewBoundarySampler + NewCountingSampler = zipkin.NewCountingSampler +)
feat: adds support for samplers.
diff --git a/_config.php b/_config.php index <HASH>..<HASH> 100644 --- a/_config.php +++ b/_config.php @@ -15,4 +15,5 @@ if(!class_exists("GridField")) { Object::add_extension("FormField", "BootstrapFormField"); Object::add_extension("TextField", "BootstrapTextField"); Object::add_extension("OptionsetField", "BootstrapOptionsetField"); -Object::add_extension("FormAction","BootstrapFormAction"); \ No newline at end of file +Object::add_extension("FormAction","BootstrapFormAction"); +Object::add_extension("TextareaField", "BootstrapTextField");
Added decorator to TextareaField
diff --git a/src/NGrams/Statistic.php b/src/NGrams/Statistic.php index <HASH>..<HASH> 100644 --- a/src/NGrams/Statistic.php +++ b/src/NGrams/Statistic.php @@ -127,6 +127,21 @@ class Statistic } /** + * Calculate the T-score + * @param array $ngram Array of ngrams with frequencies + * @return float Return the calculated value + */ + public function tscore(array $ngram) : float + { + $var = $this->setStatVariables($ngram); + + $term1 = $var['jointFrequency'] - (($var['leftFrequency'] * $var['rightFrequency'])/$this->totalBigrams); + $term2 = sqrt(($var['jointFrequency'])); + + return ( $term1 / $term2 ); + } + + /** * Calculate the Pointwise mutual information * @param int $n * @param int $m
Added T-score measure Added T-score measure.
diff --git a/lib/right_chimp/objects/ChimpObjects.rb b/lib/right_chimp/objects/ChimpObjects.rb index <HASH>..<HASH> 100644 --- a/lib/right_chimp/objects/ChimpObjects.rb +++ b/lib/right_chimp/objects/ChimpObjects.rb @@ -51,7 +51,7 @@ module Chimp @client = RightApi::Client.new(:email => creds[:user], :password => creds[:pass], :account_id => creds[:account], :api_url => creds[:api_url], - :timeout => nil) + :timeout => nil, :enable_retry => true ) rescue puts "##############################################################################" puts "Error: "
OPS-<I> Now right_api_client has retry enabled
diff --git a/src/scout_apm/commands.py b/src/scout_apm/commands.py index <HASH>..<HASH> 100644 --- a/src/scout_apm/commands.py +++ b/src/scout_apm/commands.py @@ -128,7 +128,7 @@ class BatchCommand: def message(self): messages = list(map(lambda cmd: cmd.message(), self.commands)) - return {'BatchCommand': messages} + return {'BatchCommand': {'commands': messages}} @classmethod def from_tracked_request(cls, request):
Fix structure mismatch in BatchCommand
diff --git a/src/BankBillet/Controller.php b/src/BankBillet/Controller.php index <HASH>..<HASH> 100644 --- a/src/BankBillet/Controller.php +++ b/src/BankBillet/Controller.php @@ -43,7 +43,8 @@ class Controller $bank = $title->assignment->bank; - $view_class = __NAMESPACE__ . '\\Views\\' . $bank->view; + $view_class = __NAMESPACE__ . '\\Views\\' + . BankInterchange\Utils::toPascalCase($bank->name); $this->view = new $view_class($title, $data, $logos); }
Update BankBillet Controller Use bank name in PascalCase to select the billet view
diff --git a/host/daq/readout_utils.py b/host/daq/readout_utils.py index <HASH>..<HASH> 100644 --- a/host/daq/readout_utils.py +++ b/host/daq/readout_utils.py @@ -34,6 +34,9 @@ def interpret_pixel_data(data, dc, pixel_array, invert=True): address_split = np.array_split(address, np.where(np.diff(address.astype(np.int32)) < 0)[0] + 1) value_split = np.array_split(value, np.where(np.diff(address.astype(np.int32)) < 0)[0] + 1) + if len(address_split) > 5: + raise NotImplementedError('Only the data from one double column can be interpreted at once!') + mask = np.empty_like(pixel_array.data) # BUG in numpy: pixel_array is de-masked if not .data is used mask[:] = len(address_split)
ENH: sanity check added
diff --git a/snekchek/format.py b/snekchek/format.py index <HASH>..<HASH> 100644 --- a/snekchek/format.py +++ b/snekchek/format.py @@ -10,5 +10,10 @@ def vulture_format(data): def pylint_format(data): + last_path = "" for row in data: + if row['path'] != last_path: + print(f"File: {row['path']}") + last_path = row['path'] + print(f"{row['message-id'][0]}:{row['line']:>3}, {row['column']:>2}: {row['message']} ({row['symbol']})")
Add file to pylint output
diff --git a/examples/example_01_connectivity.py b/examples/example_01_connectivity.py index <HASH>..<HASH> 100644 --- a/examples/example_01_connectivity.py +++ b/examples/example_01_connectivity.py @@ -49,7 +49,7 @@ We simply choose a VAR model order of 30, and reduction to 4 components (that's api = scot.SCoT(30, reducedim=4, locations=locs) """ -Perform MVARICA +Perform MVARICA and plot the components """ api.setData(data) @@ -60,11 +60,8 @@ api.plotComponents() """ Connectivity Analysis -We will extract the full frequency directed transfer function (ffDTF) from the +Extract the full frequency directed transfer function (ffDTF) from the activations of each class and plot them with matplotlib. - -We define a function "topo" that multiplot2 calls to draws scalp projections -of the components. """ api.setData(data, classes)
Improled comments a bit Former-commit-id: <I>b<I>fe2f6a<I>de<I>fac<I>ca2c<I>f9ff<I>
diff --git a/autocompletefile.go b/autocompletefile.go index <HASH>..<HASH> 100644 --- a/autocompletefile.go +++ b/autocompletefile.go @@ -81,24 +81,12 @@ func (self *AutoCompleteFile) processDecl(decl ast.Decl) { return } - methodof := MethodOf(decl) - if methodof != "" { - decl, ok := self.decls[methodof] - if ok { - decl.AddChild(d) - } else { - decl = NewDecl(methodof, DECL_METHODS_STUB, self.scope) - self.decls[methodof] = decl - decl.AddChild(d) - } - } else { - // the declaration itself has a scope which follows it's definition - // and it's false for type declarations - if d.Class != DECL_TYPE { - self.scope = NewScope(self.scope) - } - self.scope.addNamedDecl(d) + // the declaration itself has a scope which follows it's definition + // and it's false for type declarations + if d.Class != DECL_TYPE { + self.scope = NewScope(self.scope) } + self.scope.addNamedDecl(d) }) }
Remove method variant from local declarations processing. Because it's invalid anyway.
diff --git a/lib/model/person.js b/lib/model/person.js index <HASH>..<HASH> 100644 --- a/lib/model/person.js +++ b/lib/model/person.js @@ -36,7 +36,8 @@ Person.schema = ActivityObject.subSchema(["attachments", ["followers", "following", "favorites", - "lists"]); + "lists"], + ["image.url"]); Person.pkey = function() { return "id";
Person has an index on image.url
diff --git a/spec/swag_dev/project/tools_provider_spec.rb b/spec/swag_dev/project/tools_provider_spec.rb index <HASH>..<HASH> 100644 --- a/spec/swag_dev/project/tools_provider_spec.rb +++ b/spec/swag_dev/project/tools_provider_spec.rb @@ -10,6 +10,7 @@ describe SwagDev::Project::ToolsProvider, :tools_provider do it { expect(subject).to respond_to(:get).with(1).arguments } it { expect(subject).to respond_to(:fetch).with(1).arguments } it { expect(subject).to respond_to('[]').with(1).arguments } + it { expect(subject).to respond_to('[]=').with(2).arguments } it { expect(subject).to respond_to('member?').with(1).arguments } it { expect(subject).to respond_to('merge!').with(1).arguments } end
tools_provider (spec) example added
diff --git a/application/Config/Database.php b/application/Config/Database.php index <HASH>..<HASH> 100644 --- a/application/Config/Database.php +++ b/application/Config/Database.php @@ -1,5 +1,6 @@ <?php namespace Config; +use CodeIgniter\CLI\CLI; use phpDocumentor\Reflection\DocBlock\Tag\VarTag; /** @@ -107,6 +108,9 @@ class Database extends \CodeIgniter\Database\Config } } } + + CLI::write('ENV='.ENVIRONMENT); + CLI::write('GROUP='.$group); } //--------------------------------------------------------------------
Add some logging just to determine what Travis is doing
diff --git a/lib/sbsm/request.rb b/lib/sbsm/request.rb index <HASH>..<HASH> 100644 --- a/lib/sbsm/request.rb +++ b/lib/sbsm/request.rb @@ -80,7 +80,7 @@ module SBSM 'session_path' => '/', } if(is_crawler?) - sid = [ENV['DEFAULT_FLAVOR'], @cgi.user_agent].join('-') + sid = [ENV['DEFAULT_FLAVOR'], @cgi.params['language'], @cgi.user_agent].join('-') args.store('session_id', sid) end @session = CGI::Session.new(@cgi, args)
Keep crawler-sessions for different languages separate.
diff --git a/lib/config.js b/lib/config.js index <HASH>..<HASH> 100644 --- a/lib/config.js +++ b/lib/config.js @@ -132,9 +132,11 @@ config.reload = function (){ } config.debug_configuration_file_reload = function (){ + config.status = "loading"; var debug_config = path.join(__dirname, this.debug_service.path); this.lookup = JSON.parse(fs.readFileSync(debug_config)).functionList; this.refreshLookupSet(); + config.status = "done"; } config.debug_configuration_service_reload = function () {
Fix interval reloading from file source
diff --git a/src/js/mep-player.js b/src/js/mep-player.js index <HASH>..<HASH> 100644 --- a/src/js/mep-player.js +++ b/src/js/mep-player.js @@ -287,7 +287,7 @@ t.container = $('<span class="mejs-offscreen">' + videoPlayerTitle + '</span>'+ '<div id="' + t.id + '" class="mejs-container ' + (mejs.MediaFeatures.svg ? 'svg' : 'no-svg') + - '" tabindex="0" role="application" aria-label=' + videoPlayerTitle + '">'+ + '" tabindex="0" role="application" aria-label="' + videoPlayerTitle + '">'+ '<div class="mejs-inner">'+ '<div class="mejs-mediaelement"></div>'+ '<div class="mejs-layers"></div>'+
Pull #<I>, Fixing a missing quote mark - Accessibility slider control
diff --git a/kafka_utils/kafka_consumer_manager/commands/offsets_for_timestamp.py b/kafka_utils/kafka_consumer_manager/commands/offsets_for_timestamp.py index <HASH>..<HASH> 100644 --- a/kafka_utils/kafka_consumer_manager/commands/offsets_for_timestamp.py +++ b/kafka_utils/kafka_consumer_manager/commands/offsets_for_timestamp.py @@ -83,6 +83,19 @@ class OffsetsForTimestamp(OffsetManagerBase): @classmethod def print_offsets(cls, partition_to_offset, orig_timestamp): + milliseconds_thresold = 999999999999 + if orig_timestamp < milliseconds_thresold: + date = datetime.fromtimestamp( + orig_timestamp / 1000.0, + tz=pytz.timezone("US/Pacific"), + ).strftime("%Y-%m-%d %H:%M:%S %Z") + print( + "WARNING: Supplied timestamp {timestamp} corresponds to {datetime}, " + "remember that timestamp parameter needs to be in milliseconds.".format( + timestamp=orig_timestamp, + datetime=date + ) + ) topics = {} for tp, offset_timestamp in six.iteritems(partition_to_offset): if tp.topic not in topics:
Add warning if timestamp argument in offsets_for_timestamp is in seconds
diff --git a/src/JMS/Serializer/Twig/SerializerExtension.php b/src/JMS/Serializer/Twig/SerializerExtension.php index <HASH>..<HASH> 100644 --- a/src/JMS/Serializer/Twig/SerializerExtension.php +++ b/src/JMS/Serializer/Twig/SerializerExtension.php @@ -50,7 +50,7 @@ class SerializerExtension extends \Twig_Extension public function getFunctions() { return array( - new \Twig_SimpleFunction('serialization_context', '\JMS\Serializer\SerializationContext::createContext'), + new \Twig_SimpleFunction('serialization_context', '\JMS\Serializer\SerializationContext::create'), ); }
Fix the method name for the serialization context factory
diff --git a/tests.py b/tests.py index <HASH>..<HASH> 100644 --- a/tests.py +++ b/tests.py @@ -18,11 +18,9 @@ Options: # erik@a8.nl (04-03-15) # license: GNU-GPL2 -import os -import unittest +from unittester import run_unit_test from arguments import Arguments -from pyprofiler import start_profile, end_profile -from consoleprinter import console + def raises_error(*args, **kwds): """ @@ -46,7 +44,6 @@ class ArgumentTest(unittest.TestCase): """ self.arguments = Arguments(__doc__) - def test_assert_raises(self): """ test_assert_raises
appinstance Thursday <I> March <I> (week:9 day:<I>), <I>:<I>:<I>