diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/flask_unchained/bundles/admin/model_admin.py b/flask_unchained/bundles/admin/model_admin.py index <HASH>..<HASH> 100644 --- a/flask_unchained/bundles/admin/model_admin.py +++ b/flask_unchained/bundles/admin/model_admin.py @@ -217,7 +217,7 @@ class ModelAdmin(AdminSecurityMixin, _BaseModelAdmin, metaclass=ModelAdminMetacl if attr in EXTEND_BASE_CLASS_DICT_ATTRIBUTES and isinstance(value, dict): base_value = getattr(ModelAdmin, attr) if isinstance(base_value, dict): - value.update(base_value) + base_value.update(value) elif attr in EXTEND_BASE_CLASS_LIST_ATTRIBUTES and isinstance(value, (list, tuple)): base_value = getattr(ModelAdmin, attr) if isinstance(base_value, (list, tuple)):
fix bug in admin with extending dict-based attributes
diff --git a/src/actions/index.js b/src/actions/index.js index <HASH>..<HASH> 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -267,12 +267,12 @@ export function reverse() { }); } + dispatch(reverseInputs(origin, destination)); + if (origin.geometry && destination.geometry) { const query = buildDirectionsQuery(o, d, waypoints); return dispatch(fetchDirections(query, profile)); } - - dispatch(reverseInputs(origin, destination)); }; }
Move dispatch on reverse before condition is returned
diff --git a/modules/system/twig/SecurityPolicy.php b/modules/system/twig/SecurityPolicy.php index <HASH>..<HASH> 100644 --- a/modules/system/twig/SecurityPolicy.php +++ b/modules/system/twig/SecurityPolicy.php @@ -18,10 +18,18 @@ final class SecurityPolicy implements SecurityPolicyInterface * @var array List of forbidden methods. */ protected $blockedMethods = [ + // \October\Rain\Extension\ExtendableTrait 'addDynamicMethod', 'addDynamicProperty', + + // \October\Rain\Support\Traits\Emitter 'bindEvent', 'bindEventOnce', + + // Eloquent & Halcyon data modification + 'insert', + 'update', + 'delete', ]; /**
Further improvements to the Twig SecurityPolicy
diff --git a/src/core/IncomingDataPoints.java b/src/core/IncomingDataPoints.java index <HASH>..<HASH> 100644 --- a/src/core/IncomingDataPoints.java +++ b/src/core/IncomingDataPoints.java @@ -177,7 +177,7 @@ final class IncomingDataPoints implements WritableDataPoints { throw new IllegalArgumentException("New timestamp=" + timestamp + " is less than previous=" + last_ts + " when trying to add value=" + value + " to " + this); - } else if (timestamp - base_time > Const.MAX_TIMESPAN) { + } else if (timestamp - base_time >= Const.MAX_TIMESPAN) { // Need to start a new row as we've exceeded Const.MAX_TIMESPAN. // We force the starting timestamp to be on a MAX_TIMESPAN boundary // so that all TSDs create rows with the same base time. Otherwise @@ -236,7 +236,7 @@ final class IncomingDataPoints implements WritableDataPoints { // We can't have more than 1 value per second, so MAX_TIMESPAN values. final int new_size = Math.min(size * 2, Const.MAX_TIMESPAN); if (new_size == size) { - throw new AssertionError("Can't grow " + this + " larger."); + throw new AssertionError("Can't grow " + this + " larger than " + size); } values = Arrays.copyOf(values, new_size); qualifiers = Arrays.copyOf(qualifiers, new_size);
Fix an off-by-one in a comparison when adding new data points. This was causing the following error: AssertionError: Can't grow IncomingDataPoints(...) larger. When trying to add another data point exactly <I> seconds into an existing row. Bug reported by Michael Glaesemann. Change-Id: I<I>b<I>f<I>a1f<I>ab<I>f7e<I>f<I>e4
diff --git a/scapy.py b/scapy.py index <HASH>..<HASH> 100755 --- a/scapy.py +++ b/scapy.py @@ -21,6 +21,9 @@ # # $Log: scapy.py,v $ +# Revision 1.0.4.5 2006/04/02 13:12:10 pbi +# - added __mul__() and __rmul__() operators to handle multiplication with an int +# # Revision 1.0.4.4 2006/03/27 13:32:50 pbi # - added missing fileno() to PcapReader and PcapWriter # @@ -1373,7 +1376,7 @@ from __future__ import generators -RCSID="$Id: scapy.py,v 1.0.4.4 2006/03/27 13:32:50 pbi Exp $" +RCSID="$Id: scapy.py,v 1.0.4.5 2006/04/02 13:12:10 pbi Exp $" VERSION = RCSID.split()[2]+"beta" @@ -4591,6 +4594,14 @@ class Packet(Gen): return Raw(load=other)/self else: raise TypeError + def __mul__(self, other): + if type(other) is int: + return [self]*other + else: + raise TypeError + def __rmul__(self,other): + return self.__mul__(other) + def __len__(self): return len(self.__str__()) def do_build(self):
- added __mul__() and __rmul__() operators to handle multiplication with an int
diff --git a/test/bot.js b/test/bot.js index <HASH>..<HASH> 100644 --- a/test/bot.js +++ b/test/bot.js @@ -50,8 +50,9 @@ client `); }); -client.setProvider(sqlite.open(path.join(__dirname, 'database.sqlite3')).then(db => new commando.SQLiteProvider(db))) - .catch(console.error); +client.setProvider( + sqlite.open(path.join(__dirname, 'database.sqlite3')).then(db => new commando.SQLiteProvider(db)) +).catch(console.error); client.registry .registerGroup('math', 'Math')
Teensy weensy change for clarity
diff --git a/src/PeskyCMF/Config/peskycmf.routes.php b/src/PeskyCMF/Config/peskycmf.routes.php index <HASH>..<HASH> 100644 --- a/src/PeskyCMF/Config/peskycmf.routes.php +++ b/src/PeskyCMF/Config/peskycmf.routes.php @@ -309,6 +309,10 @@ Route::group( Route::get('{table_name}/{id}/action/{action}', [ 'as' => $routeNamePrefix . 'cmf_api_item_custom_action', 'uses' => $apiControllerClass . '@performActionForItem', + 'fallback' => [ + 'route' => $routeNamePrefix . 'cmf_items_table', + 'use_params' => true + ] ]); Route::get('{table_name}/{id}', [
Fixed missing fallback for cmf_api_item_custom_action route
diff --git a/sprd/manager/ProductManager.js b/sprd/manager/ProductManager.js index <HASH>..<HASH> 100644 --- a/sprd/manager/ProductManager.js +++ b/sprd/manager/ProductManager.js @@ -1098,7 +1098,10 @@ define(["sprd/manager/IProductManager", "underscore", "flow", "sprd/util/Product var desiredRatio = options.respectTransform ? this.getConfigurationCenterAsRatio(configuration) : this.getVectorAsRatio(defaultCenter, printArea); boundingBox = configuration._getBoundingBox(null, null, null, null, desiredScale); var desiredOffset = this.centerAtPoint(this.getRatioAsPoint(desiredRatio, printArea), boundingBox); - offset.set("x", desiredOffset.x); + offset.set({ + x: desiredOffset.x, + y: defaultBox.y + }); var minimumDesignScale;
Configurations are moved to y offset of defaultBox. No centering based on scale in this direction.
diff --git a/cherrypy/wsgiserver/__init__.py b/cherrypy/wsgiserver/__init__.py index <HASH>..<HASH> 100644 --- a/cherrypy/wsgiserver/__init__.py +++ b/cherrypy/wsgiserver/__init__.py @@ -345,6 +345,7 @@ class HTTPRequest(object): self.simple_response(400, "Malformed Request-Line") return + environ["REQUEST_URI"] = path environ["REQUEST_METHOD"] = method # path may be an abs_path (including "http://host.domain.tld"); @@ -398,10 +399,6 @@ class HTTPRequest(object): environ["SERVER_PROTOCOL"] = req_protocol self.response_protocol = "HTTP/%s.%s" % min(rp, sp) - # If the Request-URI was an absoluteURI, use its location atom. - if location: - environ["SERVER_NAME"] = location - # then all the http headers try: self.read_headers()
Buh. SERVER_NAME shouldn't change based on client behaviors. Also added WSGI environ['REQUEST_URI'] so apps can know when absolute URI's were used, etc.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( 'gooey.languages', 'gooey.mockapplications', ], - url='http://pypi.python.org/pypi/TowelStuff/', + url='http://pypi.python.org/pypi/Gooey/', license='LICENSE.txt', description='Turn (almost) any command line program into a full GUI application with one line', long_description=open('README.md').read()
Fixed setup.py again (I think)
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -80,6 +80,45 @@ describe('utily -> fs', function() }); }); + //Test isDir method + describe('-> isDir method', function() + { + //Folder that exists + it('should return that the folder path is a directory', function(done) + { + return utily.fs.isDir(__dirname, function(error, exists) + { + assert.equal(null, error); + assert.equal(true, exists); + done(); + }); + }); + + //Path is a file + it('should return that the file path is not a directory', function(done) + { + var file = path.join(__dirname, 'test.js'); + return utily.fs.isDir(file, function(error, exists) + { + assert.equal(null, error); + assert.equal(false, exists); + done(); + }); + }); + + //Path does not exists + it('should return that the fake path is not a directory', function(done) + { + var fake = path.join(__dirname, './fake/path'); + return utily.fs.isDir(fake, function(error, exists) + { + assert.equal(null, error); + assert.equal(false, exists); + done(); + }); + }) + }); + //Test mkdir method describe('-> mkdir method', function() {
test/test.js: added fs.isDir tests
diff --git a/programs/thellier_gui.py b/programs/thellier_gui.py index <HASH>..<HASH> 100755 --- a/programs/thellier_gui.py +++ b/programs/thellier_gui.py @@ -429,7 +429,8 @@ DESCRIPTION # try to read redo file if one exists if os.path.exists(os.path.join(self.WD, 'thellier_GUI.redo')): self.read_redo_file(os.path.join(self.WD, 'thellier_GUI.redo')) - self.update_selection() + if self.s: + self.update_selection() def get_DIR(self, WD=None): @@ -1594,7 +1595,8 @@ else: index += 1 self.s = self.specimens[index] self.specimens_box.SetStringSelection(self.s) - self.update_selection() + if self.s: + self.update_selection() #----------------------------------------------------------------------
in thellier gui only update selection when self.s is not null
diff --git a/lib/bibliothecary/parsers/nuget.rb b/lib/bibliothecary/parsers/nuget.rb index <HASH>..<HASH> 100644 --- a/lib/bibliothecary/parsers/nuget.rb +++ b/lib/bibliothecary/parsers/nuget.rb @@ -59,7 +59,8 @@ module Bibliothecary frameworks[framework] = deps.map do |name, details| { name: name, - # I think 'resolved' should always be set though + # 'resolved' has been set in all examples so far + # so fallback to requested is pure paranoia requirement: details.fetch('resolved', details.fetch('requested', '*')), type: 'runtime' }
Improve comment about 'resolved' in packages.lock.json
diff --git a/src/Contracts/Classifier.php b/src/Contracts/Classifier.php index <HASH>..<HASH> 100644 --- a/src/Contracts/Classifier.php +++ b/src/Contracts/Classifier.php @@ -28,4 +28,11 @@ interface Classifier * @return bool */ public function countsTowardsApplicationCode(): bool; + + /** + * Determine if the lines of code of the component should count towards + * the total number of lines of code of the test suite. + * @return bool + */ + public function countsTowardsTests(): bool; }
Add countsTowardsTests to Classifier
diff --git a/lib/active_scaffold/data_structures/column.rb b/lib/active_scaffold/data_structures/column.rb index <HASH>..<HASH> 100644 --- a/lib/active_scaffold/data_structures/column.rb +++ b/lib/active_scaffold/data_structures/column.rb @@ -350,7 +350,7 @@ module ActiveScaffold::DataStructures self.css_class = '' self.required = active_record_class.validators_on(self.name).any? do |val| !val.options[:if] && !val.options[:unless] && (ActiveModel::Validations::PresenceValidator === val || - (ActiveModel::Validations::InclusionValidator === val && !val.options[:allow_nil] && !val.options[:allow_blank]) + (ActiveModel::Validations::InclusionValidator === val && !val.options[:allow_nil] && !val.options[:allow_blank] && !(@form_ui == :checkbox && [[true, false], [false, true]].include?(val.send(:delimiter)))) ) end self.sort = true
Fixes not null boolean columns When a boolean field is validated with inclusion [true, false] or [false, true] it should not be marked as required. refs #<I>
diff --git a/visidata/plugins.py b/visidata/plugins.py index <HASH>..<HASH> 100644 --- a/visidata/plugins.py +++ b/visidata/plugins.py @@ -23,6 +23,8 @@ def _plugin_import(plugin): return "import " + _plugin_import_name(plugin) def _plugin_import_name(plugin): + if 'git+' in plugin.url: + return plugin.name return "plugins."+plugin.name def _plugin_in_import_list(plugin): @@ -166,7 +168,8 @@ class PluginsSheet(JsonLinesSheet): r = re.compile(r'^{}\W'.format(_plugin_import(plugin))) new.writelines(line for line in old.readlines() if not r.match(line)) - os.unlink(_plugin_path(plugin)) + if os.path.exists(_plugin_path(plugin)): + os.unlink(_plugin_path(plugin)) sys.modules.pop(_plugin_import_name(plugin)) importlib.invalidate_caches() vd.warning('{0} plugin uninstalled'.format(plugin['name']))
[plugins-] handle import and remove for git+ plugins, which are installed to pip local
diff --git a/lib/xcode-installer/release-manager.rb b/lib/xcode-installer/release-manager.rb index <HASH>..<HASH> 100644 --- a/lib/xcode-installer/release-manager.rb +++ b/lib/xcode-installer/release-manager.rb @@ -32,8 +32,15 @@ module XcodeInstaller os_version = os_version.match(/\d+\.\d+/)[0] list.each { |release| - if release['version'].to_s == version && release['os_version'].to_s == os_version - return release + if release['version'].to_s == version + if release['interface_type'] == 'gui' + # gui releases aren't limited by OS + return release + elsif release['interface_type'] == 'cli' && release['os_version'].to_s == os_version + return release + else + puts "Unknown interface type #{release['interface_type']}" + end end } end
Don't limit gui releases by os_version
diff --git a/engineio/client.py b/engineio/client.py index <HASH>..<HASH> 100644 --- a/engineio/client.py +++ b/engineio/client.py @@ -528,7 +528,7 @@ class Client(object): self.logger.info( 'PONG response has not been received, aborting') if self.ws: - self.ws.shutdown() + self.ws.close(timeout=0) self.queue.put(None) break self.pong_received = False diff --git a/tests/common/test_client.py b/tests/common/test_client.py index <HASH>..<HASH> 100644 --- a/tests/common/test_client.py +++ b/tests/common/test_client.py @@ -839,7 +839,7 @@ class TestClient(unittest.TestCase): c._ping_loop() self.assertEqual(c.state, 'connected') c.queue.put.assert_called_once_with(None) - c.ws.shutdown.assert_called_once_with() + c.ws.close.assert_called_once_with(timeout=0) def test_read_loop_polling_disconnected(self): c = client.Client()
Missing timeout when closing websocket connection (Fixes #<I>)
diff --git a/populous/generators/autoincrement.py b/populous/generators/autoincrement.py index <HASH>..<HASH> 100644 --- a/populous/generators/autoincrement.py +++ b/populous/generators/autoincrement.py @@ -13,19 +13,12 @@ class AutoIncrement(Generator): @property def start(self): if self._start is None: - self._start = self._get_start() + backend = self.blueprint.backend + value = backend.get_max_existing_value(self.item, self.field_name) + self._start = value + 1 if value is not None else 1 return self._start - def _get_start(self): - backend = self.blueprint.backend - - if not backend: - return 0 - - value = backend.get_max_existing_value(self.item, self.field_name) - return value + 1 if value is not None else 0 - def generate(self): for i in count(self.start): yield i
AutoIncrement: Start at 1, like most dbs
diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py index <HASH>..<HASH> 100644 --- a/tests/test_interfaces.py +++ b/tests/test_interfaces.py @@ -31,8 +31,8 @@ class TestInterfaces(unittest.TestCase): continue self.assertEqual( - inspect.getargspec(base_func), - inspect.getargspec(getattr(subclass, name)), + inspect.signature(base_func), + inspect.signature(getattr(subclass, name)), "%s.%s has a different signature" % (subclass.__name__, name) )
use inspect.signature(), since getargspec is deprecated
diff --git a/packages/channels/botpress-channel-web/src/api.js b/packages/channels/botpress-channel-web/src/api.js index <HASH>..<HASH> 100755 --- a/packages/channels/botpress-channel-web/src/api.js +++ b/packages/channels/botpress-channel-web/src/api.js @@ -16,6 +16,7 @@ import users from './users' const ERR_USER_ID_REQ = '`userId` is required and must be valid' const ERR_MSG_TYPE = '`type` is required and must be valid' const ERR_CONV_ID_REQ = '`conversationId` is required and must be valid' +const VALID_USER_ID_RE = /^[a-z0-9-_]+$/i module.exports = async (bp, config) => { const diskStorage = multer.diskStorage({ @@ -209,9 +210,7 @@ module.exports = async (bp, config) => { }) }) - function validateUserId(userId) { - return /^[a-z0-9-_]+$/i.test(userId) - } + const validateUserId = userId => VALID_USER_ID_RE.test(userId) async function sendNewMessage(userId, conversationId, payload) { if (!payload.text || !_.isString(payload.text) || payload.text.length > 360) {
fix(channel-web): extract frequently used regex
diff --git a/src/Reader.php b/src/Reader.php index <HASH>..<HASH> 100644 --- a/src/Reader.php +++ b/src/Reader.php @@ -10,6 +10,7 @@ namespace cebe\openapi; use cebe\openapi\exceptions\IOException; use cebe\openapi\exceptions\TypeErrorException; use cebe\openapi\exceptions\UnresolvableReferenceException; +use cebe\openapi\json\InvalidJsonPointerSyntaxException; use cebe\openapi\json\JsonPointer; use cebe\openapi\spec\OpenApi; use Symfony\Component\Yaml\Yaml; @@ -69,6 +70,7 @@ class Reader * @throws TypeErrorException in case invalid spec data is supplied. * @throws UnresolvableReferenceException in case references could not be resolved. * @throws IOException when the file is not readable. + * @throws InvalidJsonPointerSyntaxException in case an invalid JSON pointer string is passed to the spec references. */ public static function readFromJsonFile(string $fileName, string $baseType = OpenApi::class, $resolveReferences = true): SpecObjectInterface {
Add exception in readFromJsonFile The InvalidJsonPointerSyntaxException can be thrown in readFromJsonFile, users need to know it in order to catch it.
diff --git a/reana_commons/version.py b/reana_commons/version.py index <HASH>..<HASH> 100755 --- a/reana_commons/version.py +++ b/reana_commons/version.py @@ -14,4 +14,4 @@ and parsed by ``setup.py``. from __future__ import absolute_import, print_function -__version__ = "0.5.0.dev20190212" +__version__ = "0.5.0.dev20190213"
release: <I>.de<I>
diff --git a/angr/call_stack.py b/angr/call_stack.py index <HASH>..<HASH> 100644 --- a/angr/call_stack.py +++ b/angr/call_stack.py @@ -46,7 +46,7 @@ class CallFrame(object): # Try to convert the ret_addr to an integer try: if self.ret_addr.symbolic: - l.warning('CallStack does not support symbolic return addresses for performance concerns.') + l.debug('CallStack does not support symbolic return addresses for performance concerns.') self.ret_addr = None else: self.ret_addr = state.se.any_int(self.ret_addr)
CallStack: change the warning to debug to avoid excessive warning messages when running CFGFast on MIPS<I> binaries.
diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php index <HASH>..<HASH> 100644 --- a/plugins/Goals/API.php +++ b/plugins/Goals/API.php @@ -496,7 +496,7 @@ class API extends \Piwik\Plugin\API 'idGoal' => $idGoal, 'columns' => $columns, 'showAllGoalSpecificMetrics' => $showAllGoalSpecificMetrics, - 'format_metrics' => Common::getRequestVar('format_metrics', 'bc'), + 'format_metrics' => !empty($compare) ? 0 : Common::getRequestVar('format_metrics', 'bc'), ), $default = []); Archiver::$ARCHIVE_DEPENDENT = true; $tableSegmented->filter('Piwik\Plugins\Goals\DataTable\Filter\AppendNameToColumnNames',
Fix possible notice when comparing goal data (#<I>) happened as some metrics might have been formatted twice
diff --git a/lib/svg.js b/lib/svg.js index <HASH>..<HASH> 100644 --- a/lib/svg.js +++ b/lib/svg.js @@ -100,7 +100,7 @@ function load(str) { }); // Add IDs, they are equal to glyph index in array - var id = 1; + var id = 0; _.forEach(font.glyphs, function (glyph) { glyph.id = id++; });
Fixes in glyphs IDs.
diff --git a/spec/rollbar/delay/shoryuken_spec.rb b/spec/rollbar/delay/shoryuken_spec.rb index <HASH>..<HASH> 100644 --- a/spec/rollbar/delay/shoryuken_spec.rb +++ b/spec/rollbar/delay/shoryuken_spec.rb @@ -1,7 +1,16 @@ require 'spec_helper' -require 'rollbar/delay/shoryuken' -describe Rollbar::Delay::Shoryuken do +begin + require 'rollbar/delay/shoryuken' +rescue LoadError + module Rollbar + module Delay + class Shoryuken; end + end + end +end + +describe Rollbar::Delay::Shoryuken, :if => RUBY_VERSION != '1.8.7' && RUBY_VERSION != '1.9.2' do describe '.call' do let(:payload) do { :key => 'value' }
Omit shoryuken specs for unsupported ruby versions
diff --git a/pods/datasets.py b/pods/datasets.py index <HASH>..<HASH> 100644 --- a/pods/datasets.py +++ b/pods/datasets.py @@ -559,7 +559,7 @@ def pmlr(volumes='all', data_set='pmlr', refresh_data=False): file = entry['yaml'].split('/')[-1] proto, url = entry['yaml'].split('//') file = os.path.basename(url) - dir = os.path.dirname(url) + dir = '/'.join(url.split('/')[1:]) urln = proto + '//' + url.split('/')[0] data_resources[data_name_full]['files'].append([file]) data_resources[data_name_full]['dirs'].append([dir])
Fix bug from pmlr_volumes
diff --git a/torchvision/models/squeezenet.py b/torchvision/models/squeezenet.py index <HASH>..<HASH> 100644 --- a/torchvision/models/squeezenet.py +++ b/torchvision/models/squeezenet.py @@ -7,8 +7,8 @@ from typing import Any __all__ = ['SqueezeNet', 'squeezenet1_0', 'squeezenet1_1'] model_urls = { - 'squeezenet1_0': 'https://download.pytorch.org/models/squeezenet1_0-a815701f.pth', - 'squeezenet1_1': 'https://download.pytorch.org/models/squeezenet1_1-f364aa15.pth', + 'squeezenet1_0': 'https://download.pytorch.org/models/squeezenet1_0-b66bff10.pth', + 'squeezenet1_1': 'https://download.pytorch.org/models/squeezenet1_1-b8a52dc0.pth', }
update squeezenet urls (#<I>)
diff --git a/entry.go b/entry.go index <HASH>..<HASH> 100644 --- a/entry.go +++ b/entry.go @@ -13,12 +13,17 @@ import ( var bufferPool *sync.Pool +// regex for validation is external, to reduce compilation overhead +var matchesLogrus *regexp.Regexp + func init() { bufferPool = &sync.Pool{ New: func() interface{} { return new(bytes.Buffer) }, } + + matchesLogrus, _ = regexp.Compile("logrus.*") } // Defines the key when adding errors using WithError. @@ -51,11 +56,13 @@ type Entry struct { } func NewEntry(logger *Logger) *Entry { - return &Entry{ + entry := &Entry{ Logger: logger, // Default is three fields, plus one optional. Give a little extra room. Data: make(Fields, 6), } + + return entry } // Returns the string representation from the reader and ultimately the @@ -96,11 +103,6 @@ func getCaller() (method string) { // Restrict the lookback to 25 frames - if it's further than that, report UNKNOWN pcs := make([]uintptr, 25) - matchesLogrus, err := regexp.Compile("logrus.*") - if err != nil { - return "CALLER_LOOKUP_FAILED" - } - // the first non-logrus caller is at least three frames away depth := runtime.Callers(3, pcs) for i := 0; i < depth; i++ {
push compilation even higher, to reduce to one call
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -384,7 +384,12 @@ class JanusAdapter { configureSubscriberSdp(originalSdp) { if (!isH264VideoSupported) { - return originalSdp; + if (navigator.userAgent.indexOf("HeadlessChrome") !== -1) { + // HeadlessChrome (e.g. puppeteer) doesn't support webrtc video streams, so we remove those lines from the SDP. + return originalSdp.replace(/m=video[^]*m=/, "m="); + } else { + return originalSdp; + } } // TODO: Hack to get video working on Chrome for Android. https://groups.google.com/forum/#!topic/mozilla.dev.media/Ye29vuMTpo8
workaround headless chrome webrtc video support
diff --git a/local_settings/base.py b/local_settings/base.py index <HASH>..<HASH> 100644 --- a/local_settings/base.py +++ b/local_settings/base.py @@ -79,10 +79,7 @@ class Base(ColorPrinter): self.section = section def _make_parser(self, *args, **kwargs): - kwargs.setdefault('interpolation', ExtendedInterpolation()) - parser = ConfigParser(*args, **kwargs) - parser.optionxform = lambda option: option - return parser + return LocalSettingsConfigParser(*args, **kwargs) def _parse_setting(self, v): """Parse the string ``v`` and return the parsed value. @@ -101,3 +98,13 @@ class Base(ColorPrinter): except ValueError: raise ValueError('Could not parse `{0}` as JSON'.format(v)) return v + + +class LocalSettingsConfigParser(ConfigParser): + + def __init__(self, *args, interpolation=ExtendedInterpolation(), **kwargs): + kwargs['interpolation'] = interpolation + super().__init__(*args, **kwargs) + + def optionxform(self, option): + return option
Add subclass of ConfigParser Currently, this doesn't do any customization beyond what we were doing before, but this is A) a better way to override defaults and B) more- easily extensible.
diff --git a/go/vt/tabletserver/queryctl.go b/go/vt/tabletserver/queryctl.go index <HASH>..<HASH> 100644 --- a/go/vt/tabletserver/queryctl.go +++ b/go/vt/tabletserver/queryctl.go @@ -241,10 +241,3 @@ func InitQueryService() { TxLogger.ServeLogs(*txLogHandler, buildFmter(TxLogger)) RegisterQueryService() } - -// QueryRules from custom rules -const CustomQueryRules string = "CUSTOM_QUERY_RULES" - -func init() { - QueryRuleSources.RegisterQueryRuleSource(CustomQueryRules) -}
custom rule support resturctured
diff --git a/email/views/structure/header.php b/email/views/structure/header.php index <HASH>..<HASH> 100644 --- a/email/views/structure/header.php +++ b/email/views/structure/header.php @@ -250,7 +250,8 @@ <div class="padder"> <?php - if (nailsEnvironment('not', 'PRODUCTION')) { + + if (\Nails\Environment::not('PRODUCTION')) { ?> <div id="non-production-environment">
Tidying up, removing deprecated function calls
diff --git a/pale/endpoint.py b/pale/endpoint.py index <HASH>..<HASH> 100644 --- a/pale/endpoint.py +++ b/pale/endpoint.py @@ -188,13 +188,23 @@ class Endpoint(object): * * ``_after_response_handler`` - The `_after_response_handlers` are sepcified by the Endpoint + The `_after_response_handlers` are specified by the Endpoint definition, and enable manipulation of the response object before it is returned to the client, but after the response is rendered. Because these are instancemethods, they may share instance data from `self` specified in the endpoint's `_handle` method. + ``_finalize_content`` + The `_finalize_content` method is overridden by the Endpoint and is called + after the response is rendered into a serializable result. + + This method is called with two arguments, the context and the rendered content, + and expected to return updated rendered content. + + For in-place modification of dicts, this method will still be expected + to return the given argument. + ``_allow_cors`` This value is set to enable CORs for a given endpoint. @@ -383,6 +393,14 @@ class Endpoint(object): rendered_content = self._returns._render_serializable( unrendered_content, context) + try: + if hasattr(self, '_finalize_content'): + rendered_content = self._finalize_content(context, rendered_content) + except: + logging.exception("Failed to complete %s._finalize_content", + self.__class__.__name__) + raise + # now build the response if rendered_content is None and \ isinstance(self._returns, NoContentResource):
Implements _finalize_content response handler.
diff --git a/server/requirements/requirements.php b/server/requirements/requirements.php index <HASH>..<HASH> 100644 --- a/server/requirements/requirements.php +++ b/server/requirements/requirements.php @@ -6,10 +6,10 @@ /** @var RequirementsChecker $this */ $requirements = array( array( - 'name' => 'PHP 7.0+', + 'name' => 'PHP 7.2.5+', 'mandatory' => true, - 'condition' => version_compare(PHP_VERSION, '7.0.0', '>='), - 'memo' => 'PHP 7.0 or higher is required.', + 'condition' => PHP_VERSION_ID >= 70205, + 'memo' => 'PHP 7.2.5 or later is required.', ), );
Bump PHP requirement to <I> for Craft <I>
diff --git a/main/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java b/main/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java index <HASH>..<HASH> 100644 --- a/main/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java +++ b/main/src/main/java/tachyon/web/WebInterfaceBrowseServlet.java @@ -221,6 +221,10 @@ public class WebInterfaceBrowseServlet extends HttpServlet { request.setAttribute("invalidPathError", "Error: Invalid Path " + ipe.getLocalizedMessage()); getServletContext().getRequestDispatcher("/browse.jsp").forward(request, response); return; + } catch (IOException ie) { + request.setAttribute("invalidPathError", "Error: File Not Existed " + ie.getMessage()); + getServletContext().getRequestDispatcher("/browse.jsp").forward(request, response); + return; } List<UiFileInfo> fileInfos = new ArrayList<UiFileInfo>(filesInfo.size());
fix UI: display file may crash due to IOException
diff --git a/lib/neo4j/active_node/query/query_proxy_methods.rb b/lib/neo4j/active_node/query/query_proxy_methods.rb index <HASH>..<HASH> 100644 --- a/lib/neo4j/active_node/query/query_proxy_methods.rb +++ b/lib/neo4j/active_node/query/query_proxy_methods.rb @@ -110,10 +110,9 @@ module Neo4j end def exists_query_start(origin, condition, target) - case - when condition.class == Fixnum + if condition.class == Fixnum self.where("ID(#{target}) = {exists_condition}").params(exists_condition: condition) - when condition.class == Hash + elsif condition.class == Hash self.where(condition.keys.first => condition.values.first) else self
if is cheaper than case, switch in query_proxy_methods
diff --git a/luigi/server.py b/luigi/server.py index <HASH>..<HASH> 100644 --- a/luigi/server.py +++ b/luigi/server.py @@ -123,7 +123,7 @@ def app(api): (r'/history/by_id/(.*?)', ByIdHandler, {'api': api}), (r'/history/by_params/(.*?)', ByParamsHandler, {'api': api}) ] - api_app = tornado.web.Application(handlers, gzip=True) + api_app = tornado.web.Application(handlers) return api_app
Disabling gzip compressions since it breaks the browser Change-Id: Ia2c1a<I>ab6df<I>ece5a<I>c<I>aa<I>b4 Reviewed-on: <URL>
diff --git a/src/Core42/Permission/Rbac/AuthorizationService.php b/src/Core42/Permission/Rbac/AuthorizationService.php index <HASH>..<HASH> 100644 --- a/src/Core42/Permission/Rbac/AuthorizationService.php +++ b/src/Core42/Permission/Rbac/AuthorizationService.php @@ -123,6 +123,14 @@ class AuthorizationService } /** + * @return Role\RoleInterface[]|\string[] + */ + public function getAllRoles() + { + return $this->identityRoleProvider->getRoles(); + } + + /** * Get the identity roles from the current identity, applying some more logic * * @return RoleInterface[] diff --git a/src/Core42/Permission/Rbac/Identity/IdentityRoleProviderInterface.php b/src/Core42/Permission/Rbac/Identity/IdentityRoleProviderInterface.php index <HASH>..<HASH> 100644 --- a/src/Core42/Permission/Rbac/Identity/IdentityRoleProviderInterface.php +++ b/src/Core42/Permission/Rbac/Identity/IdentityRoleProviderInterface.php @@ -9,10 +9,12 @@ namespace Core42\Permission\Rbac\Identity; +use Core42\Permission\Rbac\Role\RoleInterface; + interface IdentityRoleProviderInterface { /** - * @return string[]|\Rbac\Role\RoleInterface[] + * @return string[]|RoleInterface[] */ public function getRoles(); }
added getAllRoles for authorizationservice
diff --git a/DataColumn.php b/DataColumn.php index <HASH>..<HASH> 100644 --- a/DataColumn.php +++ b/DataColumn.php @@ -18,7 +18,7 @@ class DataColumn extends \yii\grid\DataColumn protected function renderDataCellContent($model, $key, $index) { $content = parent::renderDataCellContent($model, $key, $index); - return Html::a($content,$this->getViewUrl($model),['class' => 'btn-block']); + return Html::a($content,$this->getViewUrl($model),['class' => 'btn-block','data-pjax' => 0]); } protected function getViewUrl($model)
Bugfix for incorrectly triggering pjax refreshes when target page also has a grid table
diff --git a/openid/server/server.py b/openid/server/server.py index <HASH>..<HASH> 100644 --- a/openid/server/server.py +++ b/openid/server/server.py @@ -493,7 +493,8 @@ class CheckIDRequest(OpenIDRequest): @ivar trust_root: "Are you Frank?" asks the checkid request. "Who wants to know?" C{trust_root}, that's who. This URL identifies the party making the request, and the user will use that to make her decision - about what answer she trusts them to have. + about what answer she trusts them to have. Referred to as "realm" in + OpenID 2.0. @type trust_root: str @ivar return_to: The URL to send the user agent back to to reply to this
[project @ server.server.CheckIDRequest: mention that trust_root AKA realm in the docstring.]
diff --git a/src/Kunstmaan/AdminBundle/Controller/SettingsController.php b/src/Kunstmaan/AdminBundle/Controller/SettingsController.php index <HASH>..<HASH> 100644 --- a/src/Kunstmaan/AdminBundle/Controller/SettingsController.php +++ b/src/Kunstmaan/AdminBundle/Controller/SettingsController.php @@ -42,12 +42,21 @@ class SettingsController extends BaseSettingsController $versionChecker = $this->container->get('kunstmaan_admin.versionchecker'); if (!$versionChecker->isEnabled()) { - return; + return array('data' => null); + } + + $data = null; + try { + $data = $versionChecker->check(); + } catch (\Exception $e) { + $this->container->get('logger')->error( + $e->getMessage(), + array('exception' => $e) + ); } return array( - 'data' => $versionChecker->check() + 'data' => $data ); } - -} \ No newline at end of file +}
Do not crash if version checker throws exception
diff --git a/src/Storage/Field/Type/FieldTypeBase.php b/src/Storage/Field/Type/FieldTypeBase.php index <HASH>..<HASH> 100644 --- a/src/Storage/Field/Type/FieldTypeBase.php +++ b/src/Storage/Field/Type/FieldTypeBase.php @@ -77,9 +77,9 @@ abstract class FieldTypeBase implements FieldTypeInterface $type = $this->getStorageType(); - if (null != $value) { + if (null !== $value) { $value = $type->convertToDatabaseValue($value, $this->getPlatform()); - } else { + } elseif (isset($this->mapping['default'])) { $value = $this->mapping['default']; } $qb->setValue($key, ':' . $key);
fix the persist to handle non-contenttype fields without default mappings
diff --git a/remi/gui.py b/remi/gui.py index <HASH>..<HASH> 100644 --- a/remi/gui.py +++ b/remi/gui.py @@ -3986,7 +3986,7 @@ class FileUploader(Container): def savepath(self, value): self._savepath = value - def __init__(self, savepath='./', multiple_selection_allowed=False, accepted_files='*.*' *args, **kwargs): + def __init__(self, savepath='./', multiple_selection_allowed=False, accepted_files='*.*', *args, **kwargs): super(FileUploader, self).__init__(*args, **kwargs) self._savepath = savepath self._multiple_selection_allowed = multiple_selection_allowed
Added missing comma in function declaration
diff --git a/salt/cloud/clouds/ec2.py b/salt/cloud/clouds/ec2.py index <HASH>..<HASH> 100644 --- a/salt/cloud/clouds/ec2.py +++ b/salt/cloud/clouds/ec2.py @@ -1818,7 +1818,9 @@ def request_instance(vm_=None, call=None): if userdata is not None: try: - params[spot_prefix + 'UserData'] = base64.b64encode(userdata) + params[spot_prefix + 'UserData'] = base64.b64encode( + salt.utils.stringutils.to_bytes(userdata) + ) except Exception as exc: log.exception('Failed to encode userdata: %s', exc)
Make sure we pass userdata as bytes to base<I> encoder
diff --git a/kafka/conn.py b/kafka/conn.py index <HASH>..<HASH> 100644 --- a/kafka/conn.py +++ b/kafka/conn.py @@ -354,7 +354,7 @@ class BrokerConnection(object): next_lookup = self._next_afi_sockaddr() if not next_lookup: self.close(Errors.KafkaConnectionError('DNS failure')) - return + return self.state else: log.debug('%s: creating new socket', self) self._sock_afi, self._sock_addr = next_lookup @@ -409,6 +409,7 @@ class BrokerConnection(object): ' Disconnecting.', self, ret) errstr = errno.errorcode.get(ret, 'UNKNOWN') self.close(Errors.KafkaConnectionError('{} {}'.format(ret, errstr))) + return self.state # Needs retry else: @@ -443,6 +444,7 @@ class BrokerConnection(object): if time.time() > request_timeout + self.last_attempt: log.error('Connection attempt to %s timed out', self) self.close(Errors.KafkaConnectionError('timeout')) + return self.state return self.state
Return connection state explicitly after close in connect() (#<I>)
diff --git a/honeybadger/__init__.py b/honeybadger/__init__.py index <HASH>..<HASH> 100644 --- a/honeybadger/__init__.py +++ b/honeybadger/__init__.py @@ -14,4 +14,4 @@ from .version import __version__ __all__ = ['honeybadger', '__version__'] honeybadger = Honeybadger() -sys.excepthook = honeybadger.exception_hook +honeybadger.wrap_excepthook(sys.excepthook) diff --git a/honeybadger/core.py b/honeybadger/core.py index <HASH>..<HASH> 100644 --- a/honeybadger/core.py +++ b/honeybadger/core.py @@ -1,5 +1,6 @@ from contextlib import contextmanager import threading +import sys from .connection import send_notice from .payload import create_payload @@ -19,8 +20,13 @@ class Honeybadger(object): def request(self, request): self.thread_local.request = request + def wrap_excepthook(self, func): + self.existing_except_hook = func + sys.excepthook = self.exception_hook + def exception_hook(self, type, value, exc_traceback): self._send_notice(value, exc_traceback, context=self._context) + self.existing_except_hook(type, value, exc_traceback) def notify(self, exception=None, error_class=None, error_message=None, context={}): if exception is None:
added wrap_excepthook method which wraps allowing us to play nice with other libraries that might use that hook - fixes #<I>
diff --git a/Kwc/Menu/EditableItems/Model.php b/Kwc/Menu/EditableItems/Model.php index <HASH>..<HASH> 100644 --- a/Kwc/Menu/EditableItems/Model.php +++ b/Kwc/Menu/EditableItems/Model.php @@ -37,12 +37,17 @@ class Kwc_Menu_EditableItems_Model extends Kwf_Model_Abstract ) { $childPagesComponentSelect[Kwf_Component_Select::IGNORE_VISIBLE] = true; } - $childPages = Kwf_Component_Data_Root::getInstance() + $component = Kwf_Component_Data_Root::getInstance() ->getComponentById($whereEquals['parent_component_id'], array( Kwf_Component_Select::IGNORE_VISIBLE => true - )) - ->getPageOrRoot() - ->getChildPages($childPagesComponentSelect); + )); + while ($component) { + $component = $component->parent; + if ($component->isPage) break; + if (!$component->parent) break; + if (Kwc_Abstract::getFlag($component->componentClass, 'menuCategory')) break; + } + $childPages = $component->getChildPages($childPagesComponentSelect); foreach ($childPages as $childPage) { if (is_numeric($childPage->dbId)) { $id = $childPage->dbId;
Menu_EditableItems: getPageOrRoot didn't give category-component but is necessary for menu
diff --git a/siphon/simplewebservice/igra2.py b/siphon/simplewebservice/igra2.py index <HASH>..<HASH> 100644 --- a/siphon/simplewebservice/igra2.py +++ b/siphon/simplewebservice/igra2.py @@ -178,7 +178,10 @@ class IGRAUpperAir: def _cdec(power=1): """Make a function to convert string 'value*10^power' to float.""" def _cdec_power(val): - return float(val) / 10**power + if val in ['-9999','-8888','-99999']: + return np.nan + else: + return float(val) / 10**power return _cdec_power def _cflag(val):
corrected bug where na_values were bypassed
diff --git a/lib/restful_resource/base.rb b/lib/restful_resource/base.rb index <HASH>..<HASH> 100644 --- a/lib/restful_resource/base.rb +++ b/lib/restful_resource/base.rb @@ -68,6 +68,19 @@ module RestfulResource @action_prefix = action_prefix.to_s end + def self.fetch_all!(conditions={}) + Enumerator.new do |y| + next_page = 1 + begin + resources = self.where(conditions.merge(page: next_page)) + resources.each do |resource| + y << resource + end + next_page = resources.next_page + end while(!next_page.nil?) + end + end + protected def self.http @http || superclass.http diff --git a/lib/restful_resource/version.rb b/lib/restful_resource/version.rb index <HASH>..<HASH> 100644 --- a/lib/restful_resource/version.rb +++ b/lib/restful_resource/version.rb @@ -1,3 +1,3 @@ module RestfulResource - VERSION = '0.9.4' + VERSION = '0.9.5' end
Method fetch_all! that retrieves all data using multiple requests
diff --git a/tests/test_metadata.py b/tests/test_metadata.py index <HASH>..<HASH> 100644 --- a/tests/test_metadata.py +++ b/tests/test_metadata.py @@ -2,6 +2,7 @@ import re from datetime import datetime, timedelta, timezone import os from pathlib import Path +import sys import xml.etree.ElementTree as ET import pytest @@ -412,6 +413,8 @@ def test_no_x_xmpmeta(trivial): ], ) def test_degenerate_xml(trivial, xml): + if xml == b'' and sys.version_info[0:2] <= (3, 5): + pytest.skip(msg="fails on macOS/Python 3.5; unknown cause") trivial.Root.Metadata = trivial.make_stream(xml) with trivial.open_metadata() as xmp: xmp['pdfaid:part'] = '2'
Skip one of the degenerate xml tests For Python <I>, naturally.
diff --git a/src/PanelGroup.js b/src/PanelGroup.js index <HASH>..<HASH> 100644 --- a/src/PanelGroup.js +++ b/src/PanelGroup.js @@ -1,3 +1,5 @@ +/* eslint react/prop-types: [1, {ignore: ["children", "className", "bsStyle"]}]*/ +/* BootstrapMixin contains `bsStyle` type validation */ import React, { cloneElement } from 'react'; import classNames from 'classnames'; @@ -9,6 +11,7 @@ const PanelGroup = React.createClass({ propTypes: { collapsable: React.PropTypes.bool, + accordion: React.PropTypes.bool, activeKey: React.PropTypes.any, defaultActiveKey: React.PropTypes.any, onSelect: React.PropTypes.func
Define type for `accordion` property in PanelGroup.js and disable superfluous warning for `bsStyle`. BootstrapMixin contains type validation for it.
diff --git a/uri.js b/uri.js index <HASH>..<HASH> 100644 --- a/uri.js +++ b/uri.js @@ -82,7 +82,7 @@ function parseUri(uri, callbacks){ return callbacks.ifError("too many question marks"); var address = decodeURIComponent(arrParts[0]); var query_string = arrParts[1]; - if (!ValidationUtils.isValidAddress(address) && !ValidationUtils.isValidEmail(address) && !address.match(/^(steem\/|reddit\/|@)/i)) + if (!ValidationUtils.isValidAddress(address) && !ValidationUtils.isValidEmail(address) && !address.match(/^(steem\/|reddit\/|@).{3,}/i) && !address.match(/^\+\d{9,14}$/)) return callbacks.ifError("address "+address+" is invalid"); objRequest.type = "address"; objRequest.address = address;
more accurate username checks, add phone number
diff --git a/tests/oauth2/rfc6749/endpoints/test_error_responses.py b/tests/oauth2/rfc6749/endpoints/test_error_responses.py index <HASH>..<HASH> 100644 --- a/tests/oauth2/rfc6749/endpoints/test_error_responses.py +++ b/tests/oauth2/rfc6749/endpoints/test_error_responses.py @@ -237,7 +237,6 @@ class ErrorResponseTest(TestCase): def test_access_denied(self): self.validator.authenticate_client.side_effect = self.set_client - self.validator.confirm_redirect_uri.return_value = False token_uri = 'https://i.b/token' # Authorization code grant _, body, _ = self.web.create_token_response(token_uri,
confirm_r. is called after auth_client
diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index <HASH>..<HASH> 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -100,7 +100,6 @@ class TestVNCDoToolClient(object): image.histogram.return_value = [1, 2, 3] result = cli._expectCompare(image, 5) assert result == cli - assert cli.deferred is None def test_expectCompareExactSuccess(self): cli = self.client @@ -110,8 +109,6 @@ class TestVNCDoToolClient(object): image.histogram.return_value = [2, 2, 2] result = cli._expectCompare(image, 0) assert result == cli - assert cli.deferred is None - def test_expectCompareFails(self): cli = self.client @@ -176,10 +173,12 @@ class TestVNCDoToolClient(object): def test_commitUpdate(self): rects = mock.Mock() - self.client.deferred = mock.Mock() + self.deferred = mock.Mock() + self.client.deferred = self.deferred self.client.commitUpdate(rects) - self.client.deferred.callback.assert_called_once_with(self.client.screen) + self.deferred.callback.assert_called_once_with(self.client.screen) + def test_vncRequestPassword_prompt(self): cli = self.client
test_client: update for client bugfixes
diff --git a/lib/yard/cli/yardoc.rb b/lib/yard/cli/yardoc.rb index <HASH>..<HASH> 100644 --- a/lib/yard/cli/yardoc.rb +++ b/lib/yard/cli/yardoc.rb @@ -220,8 +220,10 @@ module YARD @has_markup = false if defined?(::Encoding) && ::Encoding.respond_to?(:default_external=) - ::Encoding.default_external = 'utf-8' - ::Encoding.default_internal = 'utf-8' + utf8 = ::Encoding.find('utf-8') + + ::Encoding.default_external = utf8 unless ::Encoding.default_external == utf8 + ::Encoding.default_internal = utf8 unless ::Encoding.default_internal == utf8 end end
Avoid repeated "warning: setting Encoding.default_internal/external" Instead of always setting the internal/external encoding to utf8, only change it when it wasn't already utf8.
diff --git a/test/features/pagecontent/access_checks.js b/test/features/pagecontent/access_checks.js index <HASH>..<HASH> 100644 --- a/test/features/pagecontent/access_checks.js +++ b/test/features/pagecontent/access_checks.js @@ -78,17 +78,25 @@ describe('Access checks', function() { api = setUpNockResponse(api, deletedPageTitle, deletedPageOlderRevision); api = setUpNockResponse(api, deletedPageTitle, deletedPageRevision); + // Need to supply no-cache header to make the summary update synchronous + // to avoid races on mocks. Can remove when switched to change propagation return preq.get({ uri: server.config.bucketURL + '/html/' + encodeURIComponent(deletedPageTitle) - + '/' + deletedPageOlderRevision + + '/' + deletedPageOlderRevision, + headers: { + 'cache-control': 'no-cache' + } }) .then(function(res) { assert.deepEqual(res.status, 200); return preq.get({ uri: server.config.bucketURL + '/html/' + encodeURIComponent(deletedPageTitle) - + '/' + deletedPageRevision + + '/' + deletedPageRevision, + headers: { + 'cache-control': 'no-cache' + } }); }) .then(function (res) {
Modified test to make it more stable
diff --git a/python/thunder/regression/regression.py b/python/thunder/regression/regression.py index <HASH>..<HASH> 100755 --- a/python/thunder/regression/regression.py +++ b/python/thunder/regression/regression.py @@ -25,7 +25,7 @@ if not os.path.exists(outputDir) : os.makedirs(outputDir) # parse data lines = sc.textFile(dataFile) -data = parse(lines, "dff").cache() +data = parse(lines, "sub").cache() # create model model = regressionModel(modelFile,mode) diff --git a/python/thunder/util/dataio.py b/python/thunder/util/dataio.py index <HASH>..<HASH> 100644 --- a/python/thunder/util/dataio.py +++ b/python/thunder/util/dataio.py @@ -13,6 +13,8 @@ def parse(data, filter="raw", inds=None) : if filter == "dff" : # convert to dff meanVal = mean(ts) ts = (ts - meanVal) / (meanVal + 0.1) + if filter == "sub" : # convert to dff + ts = (ts - mean(ts)) if inds is not None : if inds == "xyz" : return ((int(vec[0]),int(vec[1]),int(vec[2])),ts)
Added option for mean subtraction preprocessing
diff --git a/lib/dirty.js b/lib/dirty.js index <HASH>..<HASH> 100644 --- a/lib/dirty.js +++ b/lib/dirty.js @@ -57,7 +57,7 @@ Dirty.prototype.load = function() { buffer = '', offset = 0, read = function() { - self.file.read(10).addCallback(function(chunk) { + self.file.read(16*1024).addCallback(function(chunk) { if (!chunk) { return promise.emitSuccess(); }
Changed load read chunk size to something more sensible
diff --git a/imagemounter/__init__.py b/imagemounter/__init__.py index <HASH>..<HASH> 100644 --- a/imagemounter/__init__.py +++ b/imagemounter/__init__.py @@ -1,8 +1,8 @@ from __future__ import print_function from __future__ import unicode_literals -__ALL__ = ['Volume', 'Disk', 'ImageParser'] -__version__ = '2.0.0b3' +__ALL__ = ['Volume', 'Disk', 'ImageParser', 'Unmounter'] +__version__ = '2.0.0' BLOCK_SIZE = 512 VOLUME_SYSTEM_TYPES = ('detect', 'dos', 'bsd', 'sun', 'mac', 'gpt', 'dbfiller')
Think I am about ready for a <I> release. No backwards incompatible changes anymore I hope
diff --git a/src/LayoutNodeManager.js b/src/LayoutNodeManager.js index <HASH>..<HASH> 100644 --- a/src/LayoutNodeManager.js +++ b/src/LayoutNodeManager.js @@ -497,9 +497,16 @@ define(function(require, exports, module) { return undefined; } - // Arrays are not supported here + // Return array if (renderNode instanceof Array) { - return undefined; + var result = []; + for (var i = 0 ; i < renderNode.length; i++) { + result.push({ + renderNode: renderNode[i], + arrayElement: true + }); + } + return result; } // Create context node
Fixed getting arrays from context due to recent changes
diff --git a/tests/Reform/Tests/Validation/Rule/RuleTest.php b/tests/Reform/Tests/Validation/Rule/RuleTest.php index <HASH>..<HASH> 100644 --- a/tests/Reform/Tests/Validation/Rule/RuleTest.php +++ b/tests/Reform/Tests/Validation/Rule/RuleTest.php @@ -21,13 +21,13 @@ abstract class RuleTest extends \PHPUnit_Framework_TestCase /** * @dataProvider dataProvider() */ - public function testRule($email, $pass) + public function testRule($value, $pass) { $result = $this->getMock('Reform\Validation\Result'); if ($pass) { - $this->assertTrue($this->rule->validate($result, 'email_address', $email)); + $this->assertTrue($this->rule->validate($result, 'value', $value)); } else { - $this->assertFalse($this->rule->validate($result, 'email_address', $email)); + $this->assertFalse($this->rule->validate($result, 'value', $value)); } }
Cleanup RuleTest to use more generic variables.
diff --git a/query/src/test/java/org/infinispan/query/config/MultipleCachesTest.java b/query/src/test/java/org/infinispan/query/config/MultipleCachesTest.java index <HASH>..<HASH> 100644 --- a/query/src/test/java/org/infinispan/query/config/MultipleCachesTest.java +++ b/query/src/test/java/org/infinispan/query/config/MultipleCachesTest.java @@ -98,7 +98,7 @@ public class MultipleCachesTest extends SingleCacheManagerTest { SearchManager queryFactory = Search.getSearchManager(indexedCache); SearchFactoryImplementor searchImpl = (SearchFactoryImplementor) queryFactory.getSearchFactory(); - IndexManager[] indexManagers = searchImpl.getIndexBindingForEntity(Person.class).getIndexManagers(); + IndexManager[] indexManagers = searchImpl.getIndexBinding(Person.class).getIndexManagers(); assert indexManagers != null && indexManagers.length == 1; DirectoryBasedIndexManager directory = (DirectoryBasedIndexManager)indexManagers[0]; DirectoryProvider directoryProvider = directory.getDirectoryProvider();
ISPN-<I> Additional API changes of Hibernate Search5
diff --git a/linshareapi/user/shares.py b/linshareapi/user/shares.py index <HASH>..<HASH> 100644 --- a/linshareapi/user/shares.py +++ b/linshareapi/user/shares.py @@ -98,13 +98,17 @@ class Shares2(Shares): def get_rbu(self): rbu = ResourceBuilder("shares") rbu.add_field('secured', e_type=bool) + rbu.add_field('enableUSDA', e_type=bool, arg='enable_USDA') + rbu.add_field('forceAnonymousSharing', e_type=bool) + rbu.add_field('creationAcknowledgement', e_type=bool, arg='sharing_acknowledgement') rbu.add_field('expirationDate') rbu.add_field('subject') rbu.add_field('message') # [document uuids,] rbu.add_field('documents', required=True) # [GenericUserDto,] - rbu.add_field('recipients',required=True) + rbu.add_field('recipients', required=True) + rbu.add_field('mailingListUuid', arg='contact_list') return rbu def get_rbu_user(self):
Add missing fields to Shares2 api
diff --git a/lib/ronin/network/udp/proxy.rb b/lib/ronin/network/udp/proxy.rb index <HASH>..<HASH> 100644 --- a/lib/ronin/network/udp/proxy.rb +++ b/lib/ronin/network/udp/proxy.rb @@ -73,13 +73,13 @@ module Ronin readable, writtable, errors = IO.select(sockets,nil,sockets) (errors & server_connections).each do |server_socket| - client_socket = client_for(server_socket) + client_socket = client_connection_for(server_socket) close_connection(client_socket,server_socket) end (readable & server_connections).each do |server_socket| - client_socket = client_for(server_socket) + client_socket = client_connection_for(server_socket) data, addrinfo = recv(server_socket) server_data(client_socket,server_socket,data)
Renamed client_for to client_connection_for.
diff --git a/fbchat_archive_parser/time.py b/fbchat_archive_parser/time.py index <HASH>..<HASH> 100644 --- a/fbchat_archive_parser/time.py +++ b/fbchat_archive_parser/time.py @@ -20,6 +20,7 @@ FACEBOOK_TIMESTAMP_FORMATS = [ ("de_de", "dddd, D. MMMM YYYY [um] HH:mm"), # German (Germany) ("nb_no", "D. MMMM YYYY kl. HH:mm"), # Norwegian (Bokmål) ("es_es", "dddd, D [de] MMMM [de] YYYY [a las?] H:mm"), # Spanish (General) + ("sl_si", "D. MMMM YYYY [ob] H:mm"), # Slovenian ] # Generate a mapping of all timezones to their offsets.
Added slovenian-style timestamp
diff --git a/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/VariantAnnotation.java b/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/VariantAnnotation.java index <HASH>..<HASH> 100644 --- a/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/VariantAnnotation.java +++ b/biodata-models/src/main/java/org/opencb/biodata/models/variant/annotation/VariantAnnotation.java @@ -293,7 +293,7 @@ public class VariantAnnotation { public ProteinSubstitutionScores getProteinSubstitutionScores() { // TODO: broken compatibility with VariantPolyphenSIFTAnnotator - return new ProteinSubstitutionScores(); + return null; } // public List<Score> getProteinSubstitutionScores() { @@ -306,7 +306,7 @@ public class VariantAnnotation { public RegulatoryEffect getRegulatoryEffect() { // TODO: broken compatibility with VariantEffectConverter - return new RegulatoryEffect(); + return null; } // public RegulatoryEffect getRegulatoryEffect() {
feature/<I>.x: small changes at VariantAnnotation to ensure compatibility with OpenCGA annotation client
diff --git a/synapse/lib/lmdbslab.py b/synapse/lib/lmdbslab.py index <HASH>..<HASH> 100644 --- a/synapse/lib/lmdbslab.py +++ b/synapse/lib/lmdbslab.py @@ -587,7 +587,7 @@ class Slab(s_base.Base): COMMIT_PERIOD = float(os.environ.get('SYN_SLAB_COMMIT_PERIOD', '0.2')) # warn if commit takes too long - WARN_COMMIT_TIME_MS = int(float(os.environ.get('SYN_SLAB_COMMIT_WARN', '5.0')) * 1000) + WARN_COMMIT_TIME_MS = int(float(os.environ.get('SYN_SLAB_COMMIT_WARN', '1.0')) * 1000) DEFAULT_MAPSIZE = s_const.gibibyte DEFAULT_GROWSIZE = None
Change SYN_SLAB_COMMIT_WARN from <I> to <I> (SYN-<I>) (#<I>)
diff --git a/openquake/engine/export/core.py b/openquake/engine/export/core.py index <HASH>..<HASH> 100644 --- a/openquake/engine/export/core.py +++ b/openquake/engine/export/core.py @@ -52,6 +52,7 @@ def export_from_datastore(output_key, calc_id, datadir, target): :param datadir: directory containing the datastore :param target: directory, temporary when called from the engine server """ + makedirs(target) ds_key, fmt = output_key dstore = datastore.read(calc_id, datadir=datadir) dstore.export_dir = target
Added a forgotten call to makedirs
diff --git a/beaver/transports/base_transport.py b/beaver/transports/base_transport.py index <HASH>..<HASH> 100644 --- a/beaver/transports/base_transport.py +++ b/beaver/transports/base_transport.py @@ -116,6 +116,7 @@ class BaseTransport(object): def format(self, filename, line, timestamp, **kwargs): """Returns a formatted log line""" + line = unicode(line.encode("utf-8")[:32766], "utf-8", errors="ignore") formatter = self._beaver_config.get_field('format', filename) if formatter not in self._formatters: formatter = self._default_formatter
Ensure log lines confirm to utf-8 standard We've come across cases when certain characters break Beaver transmitting log lines. This PR ensures all log lines correctly conform to UTF-8 when they're formatted for transmission.
diff --git a/lib/mqtt/client.rb b/lib/mqtt/client.rb index <HASH>..<HASH> 100644 --- a/lib/mqtt/client.rb +++ b/lib/mqtt/client.rb @@ -287,8 +287,11 @@ class MQTT::Client # If a block is given, then yield and disconnect if block_given? - yield(self) - disconnect + begin + yield(self) + ensure + disconnect + end end end diff --git a/spec/mqtt_client_spec.rb b/spec/mqtt_client_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mqtt_client_spec.rb +++ b/spec/mqtt_client_spec.rb @@ -282,9 +282,19 @@ describe MQTT::Client do ) end - it "should disconnect after connecting, if a block is given" do - expect(client).to receive(:disconnect).once - client.connect('myclient') { nil } + context "if a block is given" do + it "should disconnect after connecting" do + expect(client).to receive(:disconnect).once + client.connect('myclient') { nil } + end + + it "should disconnect even if the block raises an exception" do + expect(client).to receive(:disconnect).once + begin + client.connect('myclient') { raise StandardError } + rescue StandardError + end + end end it "should not disconnect after connecting, if no block is given" do
put "disconnect" inside an "ensure" block Also includes a spec for this behavior. This will cause the client to disconnect even in cases where the connect block raises an exception.
diff --git a/spec/javascripts/ui_spec.js b/spec/javascripts/ui_spec.js index <HASH>..<HASH> 100644 --- a/spec/javascripts/ui_spec.js +++ b/spec/javascripts/ui_spec.js @@ -57,4 +57,20 @@ describe("UI testing", function() { expect(parseFloat(latEl.val())).toBe(40.73); expect(parseFloat(lngEl.val())).toBe(-73.92); }); + + it("Checks scale listener output the correct scale of the boxes", function() { + var fixture = loadFixtures('index.html'); + + blurredLocation.setZoomByPrecision(2); + var scale = blurredLocation.getDistanceMetrics() + + expect(scale).toBe(1.57); + + blurredLocation.setZoomByPrecision(3); + + var scale = blurredLocation.getDistanceMetrics() + expect(scale).toBe(0.15); + }); + + });
Test added for blurry-distance metrics (#<I>) * tweaks * Test added
diff --git a/salt/beacons/diskusage.py b/salt/beacons/diskusage.py index <HASH>..<HASH> 100644 --- a/salt/beacons/diskusage.py +++ b/salt/beacons/diskusage.py @@ -12,9 +12,6 @@ from __future__ import absolute_import import logging import re -# Import Salt libs -import salt.utils - # Import Third Party Libs try: import psutil
removing unused import to make lint happy
diff --git a/src/commands/dev/index.js b/src/commands/dev/index.js index <HASH>..<HASH> 100644 --- a/src/commands/dev/index.js +++ b/src/commands/dev/index.js @@ -154,8 +154,8 @@ function startDevServer(settings, log) { env: { ...settings.env, FORCE_COLOR: 'true' }, stdio: settings.stdio || 'inherit' }) - if (ps.stdout) ps.stdout.on('data', settings.onStdout || (() => {})) - if (ps.stderr) ps.stderr.on('data', settings.onStderr || (() => {})) + if (ps.stdout) ps.stdout.on('data', settings.onStdout || ((buff) => process.stdout.write(buff.toString('utf8')))) + if (ps.stderr) ps.stderr.on('data', settings.onStderr || ((buff) => process.stderr.write(buff.toString('utf8')))) ps.on('close', code => process.exit(code)) ps.on('SIGINT', process.exit) ps.on('SIGTERM', process.exit)
Dev stdio: Provide a fallback for piping
diff --git a/test/unit/test_action.rb b/test/unit/test_action.rb index <HASH>..<HASH> 100644 --- a/test/unit/test_action.rb +++ b/test/unit/test_action.rb @@ -9,7 +9,7 @@ end class ActionTest < Test::Unit::TestCase - context "A CloudCrowd Job" do + context "A CloudCrowd::Action" do setup do @store = CloudCrowd::AssetStore.new @@ -41,13 +41,18 @@ class ActionTest < Test::Unit::TestCase end should "be able to count the number of words in this file" do - assert @action.process == 195 + assert @action.process == 212 + end + + should "raise an exception when backticks fail" do + def @action.process; `utter failure 2>&1`; end + assert_raise(CloudCrowd::Error::CommandFailed) { @action.process } end end - context "A CloudCrowd Job without URL input" do + context "A CloudCrowd::Action without URL input" do setup do @store = CloudCrowd::AssetStore.new
adding a test that ensures that failed attempts to shell out in an Action raise an exception (which in turns marks the WorkUnit as failed)
diff --git a/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java b/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java index <HASH>..<HASH> 100644 --- a/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java +++ b/library/src/com/sothree/slidinguppanel/SlidingUpPanelLayout.java @@ -174,7 +174,7 @@ public class SlidingUpPanelLayout extends ViewGroup { /** * If the current slide state is DRAGGING, this will store the last non dragging state */ - private PanelState mLastNotDraggingSlideState = null; + private PanelState mLastNotDraggingSlideState = DEFAULT_SLIDE_STATE; /** * How far the panel is offset from its expanded position.
Have a default state for mLastNotDraggingSlideState mLastNotDraggingSlideState is used to store the saved instance state for the activity, therefore if null will cause the parcel serialization to fail with a NPE Fixes #<I>.
diff --git a/github/PullRequest.py b/github/PullRequest.py index <HASH>..<HASH> 100644 --- a/github/PullRequest.py +++ b/github/PullRequest.py @@ -474,16 +474,21 @@ class PullRequest(github.GithubObject.CompletableGithubObject): """ return self.get_review_comments() - def get_review_comments(self): + def get_review_comments(self, since=github.GithubObject.NotSet): """ :calls: `GET /repos/:owner/:repo/pulls/:number/comments <http://developer.github.com/v3/pulls/comments>`_ + :param since: datetime.datetime format YYYY-MM-DDTHH:MM:SSZ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.PullRequestComment.PullRequestComment` """ + assert since is github.GithubObject.NotSet or isinstance(since, datetime.datetime), since + url_parameters = dict() + if since is not github.GithubObject.NotSet: + url_parameters["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ") return github.PaginatedList.PaginatedList( github.PullRequestComment.PullRequestComment, self._requester, self.url + "/comments", - None + url_parameters ) def get_commits(self):
adding since to PR review comments get (#<I>)
diff --git a/lib/Redis.php b/lib/Redis.php index <HASH>..<HASH> 100644 --- a/lib/Redis.php +++ b/lib/Redis.php @@ -140,7 +140,13 @@ class Redis { } $this->readWatcher = $this->reactor->onReadable($this->socket, function () { - $this->onRead(); + $read = fread($this->socket, 8192); + + if ($read != "") { + $this->parser->append($read); + } elseif (!is_resource($this->socket) || @feof($this->socket)) { + $this->close(true); + } }); $this->writeWatcher = $this->reactor->onWritable($this->socket, function (Reactor $reactor, $watcherId) { @@ -153,16 +159,6 @@ class Redis { return $this->connectPromisor->promise(); } - private function onRead () { - $read = fread($this->socket, 8192); - - if ($read != "") { - $this->parser->append($read); - } elseif (!is_resource($this->socket) || @feof($this->socket)) { - $this->close(true); - } - } - private function onResponse ($result) { if ($this->mode === self::MODE_DEFAULT) { $promisor = array_shift($this->promisors);
inlined onRead code saves a method call per read
diff --git a/src/CoandaCMS/Coanda/Pages/Renderer/PageRenderer.php b/src/CoandaCMS/Coanda/Pages/Renderer/PageRenderer.php index <HASH>..<HASH> 100644 --- a/src/CoandaCMS/Coanda/Pages/Renderer/PageRenderer.php +++ b/src/CoandaCMS/Coanda/Pages/Renderer/PageRenderer.php @@ -44,14 +44,22 @@ class PageRenderer { private $view; /** + * @var \Illuminate\Foundation\Application + */ + private $app; + + /** * @param PageStaticCacher $cacher * @param PageManager $manager + * @param \Illuminate\View\Factory $view + * @param \Illuminate\Foundation\Application $app */ - public function __construct(PageStaticCacher $cacher, PageManager $manager, \Illuminate\View\Factory $view) + public function __construct(PageStaticCacher $cacher, PageManager $manager, \Illuminate\View\Factory $view, \Illuminate\Foundation\Application $app) { $this->cacher = $cacher; $this->manager = $manager; $this->view = $view; + $this->app = $app; } /** @@ -232,7 +240,7 @@ class PageRenderer { { if ($this->page->is_trashed || !$this->page->is_visible || $this->page->is_hidden) { - App::abort('404'); + $this->app->abort('404'); } }
Fixed reference to App. Injected the app instance instead and used that.
diff --git a/GestureHandler.js b/GestureHandler.js index <HASH>..<HASH> 100644 --- a/GestureHandler.js +++ b/GestureHandler.js @@ -660,17 +660,20 @@ function createNativeWrapper(Component, config = {}) { _refHandler = node => { // bind native component's methods - for (let methodName in node) { - const method = node[methodName]; - if ( - !methodName.startsWith('_') && // private methods - !methodName.startsWith('component') && // lifecycle methods - !NATIVE_WRAPPER_BIND_BLACKLIST.has(methodName) && // other - typeof method === 'function' && - this[methodName] === undefined - ) { - this[methodName] = method; + let source = node; + while (source != null) { + for (let methodName of Object.getOwnPropertyNames(source)) { + if ( + !methodName.startsWith('_') && // private methods + !methodName.startsWith('component') && // lifecycle methods + !NATIVE_WRAPPER_BIND_BLACKLIST.has(methodName) && // other + typeof source[methodName] === 'function' && + this[methodName] === undefined + ) { + this[methodName] = source[methodName].bind(node); + } } + source = Object.getPrototypeOf(source); } };
Copy classes methods properly in _refHandler (#<I>) I noticed some methods missing from the gesture handler wrapped components since updating RN to latest master. It happens because a lot of core components were changed to use classes instead of React.createClass and the logic to copy methods did not handle classes properly. This fixes it by looping through the prototype and using Object. getOwnPropertyNames to get methods instead of for ... in. This way it handles classes and regular objects properly.
diff --git a/php/HtmlSnippet.php b/php/HtmlSnippet.php index <HASH>..<HASH> 100644 --- a/php/HtmlSnippet.php +++ b/php/HtmlSnippet.php @@ -22,6 +22,9 @@ class HtmlSnippet { * @param string $content HTML snippet */ public function __construct( $content ) { + if ( !is_string( $content ) ) { + throw new Exception( 'Content passed to HtmlSnippet must be a string' ); + } $this->content = $content; }
HtmlSnippet: Throw exception if given non-string content Otherwise we will end up with a PHP fatal error somewhere later when we try to stringify the HtmlSnippet object. An exception when constructing it is easier to debug. Change-Id: Id6e0d<I>a<I>b8f<I>e6ae<I>bb<I>d0e<I>fbc
diff --git a/spec/definition_spec.rb b/spec/definition_spec.rb index <HASH>..<HASH> 100644 --- a/spec/definition_spec.rb +++ b/spec/definition_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/spec_helper.rb' +require 'spec/spec_helper' class RoxmlObject include ROXML diff --git a/spec/roxml_spec.rb b/spec/roxml_spec.rb index <HASH>..<HASH> 100644 --- a/spec/roxml_spec.rb +++ b/spec/roxml_spec.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/spec_helper.rb' +require 'spec/spec_helper' describe ROXML, "#from_xml" do describe "from_xml call", :shared => true do diff --git a/spec/shared_specs.rb b/spec/shared_specs.rb index <HASH>..<HASH> 100644 --- a/spec/shared_specs.rb +++ b/spec/shared_specs.rb @@ -1,4 +1,4 @@ -require File.dirname(__FILE__) + '/spec_helper.rb' +require 'spec/spec_helper' describe "freezable xml reference", :shared => true do describe "with :frozen option" do
Banish File.dirname from specs
diff --git a/rapidoid-model/src/main/java/org/rapidoid/model/Model.java b/rapidoid-model/src/main/java/org/rapidoid/model/Model.java index <HASH>..<HASH> 100644 --- a/rapidoid-model/src/main/java/org/rapidoid/model/Model.java +++ b/rapidoid-model/src/main/java/org/rapidoid/model/Model.java @@ -97,7 +97,8 @@ public class Model { if (propertyNames.length == 0) { for (Prop prop : props.values()) { - if (!prop.getName().equalsIgnoreCase("id")) { + if (!prop.getName().equalsIgnoreCase("id") && !prop.getName().equalsIgnoreCase("version") + && !prop.isReadOnly()) { pr.add(new BeanProperty(prop.getName(), prop.getType())); } }
Fixed filter for read-only properties.
diff --git a/common/src/js/core/scripts/selenium-api.js b/common/src/js/core/scripts/selenium-api.js index <HASH>..<HASH> 100644 --- a/common/src/js/core/scripts/selenium-api.js +++ b/common/src/js/core/scripts/selenium-api.js @@ -950,7 +950,7 @@ Selenium.prototype.doOpen = function(url, ignoreResponseCode) { * @param ignoreResponseCode (optional) turn off ajax head request functionality * */ - if (ignoreResponseCode == null) { + if (ignoreResponseCode == null || ignoreResponseCode.length == 0) { this.browserbot.ignoreResponseCode = true; } else if (ignoreResponseCode.toLowerCase() == "true") { this.browserbot.ignoreResponseCode = true;
AdamGoucher - really fixing the ignoring of the extra check on 'open' if there is nothing being passed in. i still think that this needs to be changed at some point to invert the logic so that rather than setting something to ignore that something should be set to turn on r<I>
diff --git a/src/test/java/com/buschmais/jqassistant/plugin/yaml/impl/scanner/YAMLFileScannerPluginIT.java b/src/test/java/com/buschmais/jqassistant/plugin/yaml/impl/scanner/YAMLFileScannerPluginIT.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/buschmais/jqassistant/plugin/yaml/impl/scanner/YAMLFileScannerPluginIT.java +++ b/src/test/java/com/buschmais/jqassistant/plugin/yaml/impl/scanner/YAMLFileScannerPluginIT.java @@ -350,6 +350,7 @@ public class YAMLFileScannerPluginIT extends AbstractPluginIT { // {"/probes/yamlspec/1.1/sec-2.1-example-2.4-sequence-of-mappings.yaml"}, } + @Ignore("Test cannot succeed because of the wrong implementation of the YAML scanner.") @Test public void scanSequenceOfSequencesYAML() { File yamlFile = new File(getClassesDirectory(YAMLFileScannerPluginValidFileSetIT.class),
Disabled YAMLFileScannerPluginIT#scanSequenceOfSequencesYAML. The YAML plugin is actually brocken and I consider a total rewrite.
diff --git a/pr-tagger.js b/pr-tagger.js index <HASH>..<HASH> 100755 --- a/pr-tagger.js +++ b/pr-tagger.js @@ -50,8 +50,18 @@ if (!semverRegex().test(program.tag)) { logger.error('Tag not semver compliant: %s', program.tag) process.exit(1) } -if (tags.indexOf(program.tag) === -1) { + +const toTagIndex = tags.indexOf(program.tag) +if (toTagIndex === -1) { logger.error('Tag not found in repository: %s', program.tag) process.exit(1) } +const toTag = program.tag +const fromTag = tags[toTagIndex + 1] + +const gitLogCmd = `git log ${fromTag}..${toTag} --format='%s' --grep='^Merge pull request #[0-9]\\+ from '` +logger.debug('Command: %s', gitLogCmd) + +const commits = exec(gitLogCmd).toString().trimRight() +logger.debug('Commits: %s', commits)
Get commits with a PR merge The PR merge is detected based on the text that GitHub adds to the commit by default
diff --git a/src/main/java/de/thetaphi/forbiddenapis/CliMain.java b/src/main/java/de/thetaphi/forbiddenapis/CliMain.java index <HASH>..<HASH> 100644 --- a/src/main/java/de/thetaphi/forbiddenapis/CliMain.java +++ b/src/main/java/de/thetaphi/forbiddenapis/CliMain.java @@ -54,7 +54,7 @@ public final class CliMain { public static final int EXIT_UNSUPPORTED_JDK = 3; public static final int EXIT_ERR_OTHER = 4; - @SuppressWarnings("static-access") + @SuppressWarnings({"static-access","static"}) public CliMain(String... args) throws ExitException { final OptionGroup required = new OptionGroup(); required.setRequired(true);
Also suppress warnings in Java 7, not only Eclipse
diff --git a/mike/app_version.py b/mike/app_version.py index <HASH>..<HASH> 100644 --- a/mike/app_version.py +++ b/mike/app_version.py @@ -1 +1 @@ -version = '0.1.1' +version = '0.2.0.dev0'
Update version to <I>.dev0
diff --git a/src/FeatureResolve.php b/src/FeatureResolve.php index <HASH>..<HASH> 100644 --- a/src/FeatureResolve.php +++ b/src/FeatureResolve.php @@ -1,7 +1,39 @@ <?php +namespace KawaiiGherkin; -class FeatureResolve +use Symfony\Component\Finder\Finder; + +final class FeatureResolve { + /** + * @var string + */ + private $directoryOrFile; + + /** + * @param string $directoryOrFile + */ + public function __construct($directoryOrFile) + { + $this->directoryOrFile = $directoryOrFile; + } + + private function getDirectory() + { + return is_dir($this->directoryOrFile) ? $this->directoryOrFile : dirname($this->directoryOrFile); + } + + private function getFeatureMatch() + { + return is_dir($this->directoryOrFile) ? '*.feature' : basename($this->directoryOrFile); + } + public function __invoke() + { + return Finder::create() + ->files() + ->in($this->getDirectory()) + ->name($this->getFeatureMatch()); + } }
Added class to solve feature file/directory
diff --git a/test/test_action.py b/test/test_action.py index <HASH>..<HASH> 100755 --- a/test/test_action.py +++ b/test/test_action.py @@ -111,6 +111,7 @@ class TestAction(ShinkenTest): self.wait_finished(a) self.assertEqual(a.output, 'TITI=est en vacance') + def test_environment_variables(self): class ActionWithoutPerfData(Action): @@ -253,6 +254,23 @@ class TestAction(ShinkenTest): + def test_execve_fail_with_utf8(self): + if os.name == 'nt': + return + + a = Action() + a.timeout = 10 + a.env = {} # :fixme: this sould be pre-set in Action.__init__() + + a.command = u"/bin/echo Wiadomo\u015b\u0107" + + a.execute() + self.wait_finished(a) + #print a.output + self.assertEqual(a.output.decode('utf8'), u"Wiadomo\u015b\u0107") + + + if __name__ == '__main__': import sys
Add : a test case about the #<I> . Cannot reproduce on <I>, maybe <I> or below will fail.
diff --git a/test/org/mockitousage/constructor/CreatingMocksWithConstructorTest.java b/test/org/mockitousage/constructor/CreatingMocksWithConstructorTest.java index <HASH>..<HASH> 100644 --- a/test/org/mockitousage/constructor/CreatingMocksWithConstructorTest.java +++ b/test/org/mockitousage/constructor/CreatingMocksWithConstructorTest.java @@ -79,14 +79,11 @@ public class CreatingMocksWithConstructorTest extends TestBase { } @Test - @Ignore //TODO SF - public void prevents_mocking_interfaces_with_constructor() { - try { - //when - mock(IMethods.class, withSettings().useConstructor()); - //then - fail(); - } catch (MockitoException e) {} + public void mocking_interfaces_with_constructor() { + //at the moment this is allowed however we can be more strict if needed + //there is not much sense in creating a spy of an interface + mock(IMethods.class, withSettings().useConstructor()); + spy(IMethods.class); } @Test
Documented current behavior via a test Issue #<I>
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,8 +15,6 @@ import sys import os -import sphinx_rtd_theme - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -121,7 +119,7 @@ html_theme = "sphinx_rtd_theme" #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # "<project> v<release> documentation".
Get rid of import of sphinx_rtd_them in conf.py
diff --git a/pkg/registry/etcd/etcd.go b/pkg/registry/etcd/etcd.go index <HASH>..<HASH> 100644 --- a/pkg/registry/etcd/etcd.go +++ b/pkg/registry/etcd/etcd.go @@ -347,7 +347,17 @@ func (r *Registry) WatchControllers(ctx api.Context, label, field labels.Selecto } match := label.Matches(labels.Set(controller.Labels)) if match { - pods, _ := r.ListPods(ctx, labels.Set(controller.Spec.Selector).AsSelector()) + pods, err := r.ListPods(ctx, labels.Set(controller.Spec.Selector).AsSelector()) + if err != nil { + glog.Warningf("Error listing pods: %v", err) + // No object that's useable so drop it on the floor + return false + } + if pods == nil { + glog.Warningf("Pods list is nil. This should never happen...") + // No object that's useable so drop it on the floor + return false + } controller.Status.Replicas = len(pods.Items) } return match
Add some extra checking around a call to list pods.
diff --git a/lib/librarian/source/git.rb b/lib/librarian/source/git.rb index <HASH>..<HASH> 100644 --- a/lib/librarian/source/git.rb +++ b/lib/librarian/source/git.rb @@ -124,9 +124,8 @@ module Librarian def cache_key @cache_key ||= begin uri_part = uri - path_part = "/#{path}" if path ref_part = "##{ref}" - key_source = [uri_part, path_part, ref_part].join + key_source = [uri_part, ref_part].join Digest::MD5.hexdigest(key_source)[0..15] end end
Improve caching: same git repo/ref and different path = single cached copy.
diff --git a/Zara4/API/Client.php b/Zara4/API/Client.php index <HASH>..<HASH> 100644 --- a/Zara4/API/Client.php +++ b/Zara4/API/Client.php @@ -67,6 +67,16 @@ class Client { /** + * Get the access token + * + * @return AccessToken|Communication\AccessToken\ReissuableAccessToken|null + */ + public function accessToken() { + return $this->accessToken; + } + + + /** * @param Request $imageProcessingRequest * @return array */
Add ability to read access token from client
diff --git a/src/components/Avatar/Avatar.react.js b/src/components/Avatar/Avatar.react.js index <HASH>..<HASH> 100644 --- a/src/components/Avatar/Avatar.react.js +++ b/src/components/Avatar/Avatar.react.js @@ -5,7 +5,11 @@ import { Icon } from "../"; import cn from "classnames"; import AvatarList from "./AvatarList.react"; +import type { MouseEvents, PointerEvents } from "../../"; + export type Props = {| + ...MouseEvents, + ...PointerEvents, +children?: React.Node, +className?: string, /** @@ -45,6 +49,11 @@ function Avatar({ placeholder, icon, color = "", + onClick, + onMouseEnter, + onMouseLeave, + onPointerEnter, + onPointerLeave, }: Props): React.Node { const classes = cn( { @@ -68,6 +77,11 @@ function Avatar({ ) : style } + onClick={onClick} + onMouseEnter={onMouseEnter} + onMouseLeave={onMouseLeave} + onPointerEnter={onPointerEnter} + onPointerLeave={onPointerLeave} > {icon && <Icon name={icon} />} {status && <span className={`avatar-status bg-${status}`} />}
feat(Avatar): Add mouse and pointer event props
diff --git a/openstack_dashboard/dashboards/admin/info/tables.py b/openstack_dashboard/dashboards/admin/info/tables.py index <HASH>..<HASH> 100644 --- a/openstack_dashboard/dashboards/admin/info/tables.py +++ b/openstack_dashboard/dashboards/admin/info/tables.py @@ -21,6 +21,10 @@ class QuotaFilterAction(tables.FilterAction): def get_quota_name(quota): + if quota.name == "cores": + return _('VCPUs') + if quota.name == "floating_ips": + return _('Floating IPs') return quota.name.replace("_", " ").title()
Quotas names fixed Cores->VCPUs, Floating Ips->Floating IPs Change-Id: I<I>adc<I>fc3aa0dc<I>f6d<I>e<I>ac0c<I> Fixes: bug #<I>
diff --git a/nif_neuron.py b/nif_neuron.py index <HASH>..<HASH> 100755 --- a/nif_neuron.py +++ b/nif_neuron.py @@ -114,7 +114,7 @@ def make_mutually_disjoint(graph, members): def type_check(tup, types): return all([type(t) is ty for t, ty in zip(tup, types)]) -def add_types(graph, phenotypes): +def add_types(graph, phenotypes): # TODO missing expression phenotypes! """ Add disjoint union classes so that it is possible to see the invariants associated with individual phenotypes """
need to have expression covered in add_types as well
diff --git a/openquake/calculators/ucerf_base.py b/openquake/calculators/ucerf_base.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/ucerf_base.py +++ b/openquake/calculators/ucerf_base.py @@ -271,13 +271,6 @@ class UCERFSource(BaseSeismicSource): plane = hdf5[trace + "/RupturePlanes"][:].astype("float64") yield trace, plane - @property - def weight(self): - """ - Weight of the source, equal to the number of ruptures contained - """ - return self.num_ruptures - def get_background_sids(self, src_filter): """ We can apply the filtering of the background sites as a pre-processing
Fixed weight [skip hazardlib]