diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/Kwc/Paragraphs/Trl/Generator.php b/Kwc/Paragraphs/Trl/Generator.php index <HASH>..<HASH> 100644 --- a/Kwc/Paragraphs/Trl/Generator.php +++ b/Kwc/Paragraphs/Trl/Generator.php @@ -12,17 +12,4 @@ class Kwc_Paragraphs_Trl_Generator extends Kwc_Chained_Trl_Generator } return $ret; } - - protected function _formatConfig($parentData, $row) - { - $ret = parent::_formatConfig($parentData, $row); - $id = $parentData->dbId.$this->getIdSeparator().$this->_getIdFromRow($row); - $ret['row'] = $this->_getRow($id); - if (!$ret['row']) { - $m = Kwc_Abstract::createChildModel($this->_class); - $ret['row'] = $m->createRow(); - $ret['row']->component_id = $id; - } - return $ret; - } }
Paragraphs Trl: don't add row to data - it's not used or required - it breaks serializing the data
diff --git a/www/src/py_dict.js b/www/src/py_dict.js index <HASH>..<HASH> 100644 --- a/www/src/py_dict.js +++ b/www/src/py_dict.js @@ -96,7 +96,7 @@ $iterator_wrapper = function(items,klass){ return items.next() //return items[counter++] }, - //__repr__:function(){return "<"+klass.__name__+" object>"}, + __repr__:function(){return "<"+klass.__name__+" object>"}, //counter:0 } res.__str__ = res.toString = res.__repr__ diff --git a/www/src/py_int.js b/www/src/py_int.js index <HASH>..<HASH> 100644 --- a/www/src/py_int.js +++ b/www/src/py_int.js @@ -271,6 +271,9 @@ $IntDict.bit_length = function(self){ return s.length // len('100101') --> 6 } +$IntDict.numerator = function(self){return self} +$IntDict.denominator = function(self){return int(1)} + // code for operands & | ^ << >> var $op_func = function(self,other){ if(isinstance(other,int)) return self-other
add numerator and denominator to int
diff --git a/pool_test.go b/pool_test.go index <HASH>..<HASH> 100644 --- a/pool_test.go +++ b/pool_test.go @@ -47,10 +47,12 @@ func TestPool_Get(t *testing.T) { } for i := 0; i < (InitialCap - 1); i++ { - _, err := testPool.Get() - if err != nil { - t.Errorf("Get error: %s", err) - } + go func() { + _, err := testPool.Get() + if err != nil { + t.Errorf("Get error: %s", err) + } + }() } if testPool.UsedCapacity() != 0 {
test: run get's concurrently
diff --git a/wordcloud/wordcloud.py b/wordcloud/wordcloud.py index <HASH>..<HASH> 100644 --- a/wordcloud/wordcloud.py +++ b/wordcloud/wordcloud.py @@ -9,8 +9,10 @@ from __future__ import division import warnings from random import Random +import io import os import re +import base64 import sys import colorsys import matplotlib @@ -729,7 +731,7 @@ class WordCloud(object): def to_html(self): raise NotImplementedError("FIXME!!!") - def to_svg(self): + def to_svg(self, embed_image=False): """Export to SVG. Returns @@ -797,6 +799,21 @@ class WordCloud(object): '</rect>' .format(self.background_color) ) + + # Embed image, useful for debug purpose + if embed_image: + image = self.to_image() + data = io.BytesIO() + image.save(data, format='JPEG') + data = base64.b64encode(data.getbuffer()).decode('ascii') + result.append( + '<image' + ' width="100%"' + ' height="100%"' + ' href="data:image/jpg;base64,{}"' + '/>' + .format(data) + ) # For each word in layout for (word, count), font_size, (y, x), orientation, color in self.layout_:
Add option to embed image in SVG, useful for debug
diff --git a/cmd/gb-vendor/main.go b/cmd/gb-vendor/main.go index <HASH>..<HASH> 100644 --- a/cmd/gb-vendor/main.go +++ b/cmd/gb-vendor/main.go @@ -79,7 +79,7 @@ func main() { } if err := command.Run(ctx, args); err != nil { - gb.Fatalf("command %q failed: %v", args[0], err) + gb.Fatalf("command %q failed: %v", command.Name, err) } return }
Fix a panic with the gb vendor command
diff --git a/api/policies/ModelPolicy.js b/api/policies/ModelPolicy.js index <HASH>..<HASH> 100644 --- a/api/policies/ModelPolicy.js +++ b/api/policies/ModelPolicy.js @@ -26,12 +26,7 @@ module.exports = function ModelPolicy (req, res, next) { if (!_.isObject(model)) { req.options.unknownModel = true; - if (!sails.config.permissions.allowUnknownModelDefinition) { - return next(new Error('Model definition not found: '+ req.options.modelIdentity)); - } - else { - model = sails.models[req.options.modelIdentity]; - } + model = sails.models[req.options.modelIdentity]; } req.model = model; diff --git a/config/permissions.js b/config/permissions.js index <HASH>..<HASH> 100644 --- a/config/permissions.js +++ b/config/permissions.js @@ -9,7 +9,5 @@ module.exports.permissions = { afterEvents: [ 'hook:auth:initialized' - ], - - allowUnknownModelDefinitions: false + ] };
allowing unknown models isn't really a feature after all
diff --git a/src/main/java/com/googlecode/lanterna/terminal/ansi/StreamBasedTerminal.java b/src/main/java/com/googlecode/lanterna/terminal/ansi/StreamBasedTerminal.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/googlecode/lanterna/terminal/ansi/StreamBasedTerminal.java +++ b/src/main/java/com/googlecode/lanterna/terminal/ansi/StreamBasedTerminal.java @@ -159,6 +159,9 @@ public abstract class StreamBasedTerminal extends AbstractTerminal { long startTime = System.currentTimeMillis(); TerminalSize newTerminalSize = terminalSizeReportQueue.poll(); while(newTerminalSize == null) { + if(System.currentTimeMillis() - startTime > 2000) { + throw new IllegalStateException("Terminal didn't send any position report for 2 seconds, please file a bug with a reproduce!"); + } KeyStroke keyStroke = readInput(false, false); if(keyStroke != null) { keyQueue.add(keyStroke);
Like before, let's put a time limit here so we don't keep spinning forever if no position report shows up
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -58,6 +58,7 @@ CONFIG = { options: { server_selection_timeout: 0.5, max_pool_size: 3, + wait_queue_timeout: 5, heartbeat_frequency: 180, user: MONGOID_ROOT_USER.name, password: MONGOID_ROOT_USER.password,
increase wait_queue_timeout in tests
diff --git a/lib/pwwka/configuration.rb b/lib/pwwka/configuration.rb index <HASH>..<HASH> 100755 --- a/lib/pwwka/configuration.rb +++ b/lib/pwwka/configuration.rb @@ -9,6 +9,7 @@ module Pwwka attr_accessor :delayed_exchange_name attr_accessor :logger attr_accessor :options + attr_accessor :send_message_resque_backoff_strategy def initialize @rabbit_mq_host = nil @@ -16,6 +17,9 @@ module Pwwka @delayed_exchange_name = "pwwka.delayed.#{Pwwka.environment}" @logger = MonoLogger.new(STDOUT) @options = {} + @send_message_resque_backoff_strategy = [5, #intermittent glitch? + 60, # quick interruption + 600, 600, 600] # longer-term outage? end
Add configuration for resque backoff strategy.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -6,18 +6,13 @@ var Q = require('q'), Generator = Parent.inherit(); Generator.prototype.createData = function() { - var q = Q.defer(); - connection.connect(this.config) + return connection.connect(this.config) .then(function() { return tables.get(); }) .then(function(tables) { - q.resolve(tables); - }) - .fail(function(error) { - q.reject(error); + return tables; }); - return q.promise; }; Generator.prototype.explain = function() {
refactoring of createData promise
diff --git a/Transport/Rpc/RpcClient.php b/Transport/Rpc/RpcClient.php index <HASH>..<HASH> 100644 --- a/Transport/Rpc/RpcClient.php +++ b/Transport/Rpc/RpcClient.php @@ -13,6 +13,7 @@ use Ramsey\Uuid\Uuid; class RpcClient implements QueueProducerInterface { private $connectionManager; + private $connection; private $channel; private $fromName; private $queueName; @@ -25,6 +26,7 @@ class RpcClient implements QueueProducerInterface $this->queueName = $queueName; $this->fromName = $fromName; $this->connectionManager = $manager; + $this->connection = $this->connectionManager->getConnection(); } /** @@ -44,12 +46,10 @@ class RpcClient implements QueueProducerInterface */ public function refreshChannel() { - $connection = $this->connectionManager->getConnection(); - - if (!$connection->isConnected()) { - $connection->reconnect(); + if (! $this->connection->isConnected()) { + $this->connection->reconnect(); } - $this->channel = $connection->channel(); + $this->channel = $this->connection->channel(); return $this->channel; }
fix segmentation fault caused by RpcClient after many interactions
diff --git a/src/js/Dividers/Divider.js b/src/js/Dividers/Divider.js index <HASH>..<HASH> 100644 --- a/src/js/Dividers/Divider.js +++ b/src/js/Dividers/Divider.js @@ -34,6 +34,10 @@ export default class Divider extends Component { render() { const { className, inset, vertical, ...props } = this.props; + // When in a list + delete props.expanderIconChildren; + delete props.expanderIconClassName; + const dividerProps = { role: 'divider', className: classnames('md-divider', className, { inset, vertical }),
Updated Divider for when it is in a list/card to remove more props
diff --git a/node-netpbm.js b/node-netpbm.js index <HASH>..<HASH> 100644 --- a/node-netpbm.js +++ b/node-netpbm.js @@ -158,6 +158,7 @@ module.exports.convert = function(fileIn, fileOut, options, callback) return; } + var scaler, fitter; if (options.alpha) { scaler = 'pamscale '; fitter = '-xyfit ';
Declare variables so they don't end up globals `scaler` and `fitter` variables were never declared.
diff --git a/webserver/src/main/java/fi/iki/elonen/SimpleWebServer.java b/webserver/src/main/java/fi/iki/elonen/SimpleWebServer.java index <HASH>..<HASH> 100644 --- a/webserver/src/main/java/fi/iki/elonen/SimpleWebServer.java +++ b/webserver/src/main/java/fi/iki/elonen/SimpleWebServer.java @@ -279,7 +279,7 @@ public class SimpleWebServer extends NanoHTTPD { private String findIndexFileInDirectory(File directory) { for (String fileName : SimpleWebServer.INDEX_FILE_NAMES) { File indexFile = new File(directory, fileName); - if (indexFile.exists()) { + if (indexFile.isFile()) { return fileName; } }
Fix webserver serving folder named like index file If there was a directory named like an index file (e.g. "index.html"), other index files registered later (e.g. "index.htm") were ignored and the directory was served instead (or an index file in the directory). This was fixed by now checking if the index file is not a directory.
diff --git a/devices.js b/devices.js index <HASH>..<HASH> 100755 --- a/devices.js +++ b/devices.js @@ -15162,6 +15162,21 @@ const devices = [ fromZigbee: [fz.on_off, fz.silvercrest_smart_led_string], exposes: [e.light_brightness_colorhs()], }, + + // LightSolutions + { + zigbeeModel: ['91-947'], + model: '200403V2-B', + vendor: 'LightSolutions', + description: 'Mini dimmer 200W', + extend: generic.light_onoff_brightness, + meta: {configureKey: 1}, + configure: async (device, coordinatorEndpoint) => { + const endpoint = device.getEndpoint(1); + await bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']); + await configureReporting.onOff(endpoint); + }, + }, ];
Added support for LightSolutions '<I>-<I>' (#<I>) * Update devices.js * Update devices.js * Update devices.js * Update devices.js
diff --git a/pkg/minikube/extract/extract.go b/pkg/minikube/extract/extract.go index <HASH>..<HASH> 100644 --- a/pkg/minikube/extract/extract.go +++ b/pkg/minikube/extract/extract.go @@ -53,7 +53,7 @@ var exclude = []string{ } // ErrMapFile is a constant to refer to the err_map file, which contains the Advice strings. -const ErrMapFile string = "pkg/minikube/problem/err_map.go" +const ErrMapFile string = "pkg/minikube/reason/known_issues.go" // state is a struct that represent the current state of the extraction process type state struct {
fix make extract > err_map.go is not gone, it was just renamed in a recent refactor: > <URL> /home/lizj/workspace/k8s/minikube/cmd/extract/extract.go:<I> <I>x1b4 exit status 2 Makefile:<I>: recipe for target 'extract' failed make: *** [extract] Error 1 Fixes #<I>
diff --git a/Swat/SwatOption.php b/Swat/SwatOption.php index <HASH>..<HASH> 100644 --- a/Swat/SwatOption.php +++ b/Swat/SwatOption.php @@ -37,7 +37,7 @@ class SwatOption extends SwatObject public $value = null; // }}} - // {{{ public function __construct( + // {{{ public function __construct() /** * Creates a flydown option
Fix folding. svn commit r<I>
diff --git a/tests/test_mock_pin.py b/tests/test_mock_pin.py index <HASH>..<HASH> 100644 --- a/tests/test_mock_pin.py +++ b/tests/test_mock_pin.py @@ -24,8 +24,9 @@ def test_mock_pin_init(): assert MockPin(2).number == 2 def test_mock_pin_frequency_unsupported(): + pin = MockPin(3) + pin.frequency = None with pytest.raises(PinPWMUnsupported): - pin = MockPin(3) pin.frequency = 100 def test_mock_pin_frequency_supported():
Small change to test_mock_pin_frequency_unsupported
diff --git a/packages/react-server/core/renderMiddleware.js b/packages/react-server/core/renderMiddleware.js index <HASH>..<HASH> 100644 --- a/packages/react-server/core/renderMiddleware.js +++ b/packages/react-server/core/renderMiddleware.js @@ -63,9 +63,6 @@ module.exports = function(server, routes) { initResponseCompletePromise(res); - // Just to keep an eye out for leaks. - logger.gauge("requestLocalStorageNamespaces", RequestLocalStorage.getCountNamespaces()); - // monkey-patch `res.write` so that we don't try to write to the stream if it's // already closed var origWrite = res.write;
Kill the requestLocalStorageNamespaces gauge This isn't something that needs to be logged per request. The module is exported, so users can track this themselves if necessary.
diff --git a/lib/constants.rb b/lib/constants.rb index <HASH>..<HASH> 100644 --- a/lib/constants.rb +++ b/lib/constants.rb @@ -19,7 +19,7 @@ module Riml SPECIAL_VARIABLE_PREFIXES = %w(& @ $) BUILTIN_COMMANDS = - %w(echo echon echomsg echoerr echohl execute sleep throw) + %w(echo echon echomsg echoerr echohl execute exec sleep throw) RIML_COMMANDS = %w(riml_source riml_include) VIML_COMMANDS =
allow `exec` to be used as abbreviaton for `execute` NOTE: this is the ONLY supported abbreviation
diff --git a/structr-ui/src/main/resources/structr/js/websocket.js b/structr-ui/src/main/resources/structr/js/websocket.js index <HASH>..<HASH> 100644 --- a/structr-ui/src/main/resources/structr/js/websocket.js +++ b/structr-ui/src/main/resources/structr/js/websocket.js @@ -40,7 +40,11 @@ function wsConnect() { try { - ws = undefined; + if (ws) { + ws.close(); + ws.length = 0; + } + localStorage.removeItem(userKey); var isEnc = (window.location.protocol === 'https:'); @@ -444,7 +448,10 @@ function wsConnect() { } catch (exception) { log('Error in connect(): ' + exception); - ws.close(); + if (ws) { + ws.close(); + ws.length = 0; + } } }
Fixed very annoying bug which caused unlimited WS connections to be triggered in FF when restarting the backend multiple times and not reloading the UI.
diff --git a/lib/icomoon-phantomjs.js b/lib/icomoon-phantomjs.js index <HASH>..<HASH> 100644 --- a/lib/icomoon-phantomjs.js +++ b/lib/icomoon-phantomjs.js @@ -42,9 +42,17 @@ casper.then(function () { this.click('#saveFont'); }); -// Wait for the link to no longer be disabled +// Wait for a redirect request +var downloadLink; casper.waitFor(function () { - console.log(this.getCurrentUrl()); + casper.on('navigation.requested', function (url) { + downloadLink = url; + }); + return downloadLink; +}); + +casper.then(function () { + console.log('link:', downloadLink); }); // TODO: [node only] Extract variables (if specified)
Successfully walking through icomoon submission process
diff --git a/mavproxy.py b/mavproxy.py index <HASH>..<HASH> 100755 --- a/mavproxy.py +++ b/mavproxy.py @@ -1192,7 +1192,7 @@ def master_callback(m, master): 'NAV_CONTROLLER_OUTPUT' ]: return - if mtype == 'HEARTBEAT': + if mtype == 'HEARTBEAT' and m.get_srcSystem() != 255: if (mpstate.status.target_system != m.get_srcSystem() or mpstate.status.target_component != m.get_srcComponent()): mpstate.status.target_system = m.get_srcSystem()
don't use GCS messages to update armed state
diff --git a/lib/jrubyfx/fxml_controller.rb b/lib/jrubyfx/fxml_controller.rb index <HASH>..<HASH> 100644 --- a/lib/jrubyfx/fxml_controller.rb +++ b/lib/jrubyfx/fxml_controller.rb @@ -24,6 +24,15 @@ class JRubyFX::Controller java_import 'java.net.URL' java_import 'javafx.fxml.FXMLLoader' + @@default_settings = { + width: -1, + height: -1, + fill: Color::WHITE, + depth_buffer: false, + relative_to: nil, + initialized: nil, + } + # Controllers usually need access to the stage. attr_accessor :stage, :scene @@ -51,14 +60,7 @@ class JRubyFX::Controller def self.new filename, stage, settings={} # Inherit from default settings - settings = { - width: -1, - height: -1, - fill: Color::WHITE, - depth_buffer: false, - relative_to: nil, - initialized: nil, - }.merge settings + settings = @@default_settings.merge settings # Magic self-java-ifying new call. (Creates a Java instance from our ruby) self.become_java!
move new's default settings to a class variable
diff --git a/src/main/java/org/fit/cssbox/layout/TableBodyBox.java b/src/main/java/org/fit/cssbox/layout/TableBodyBox.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/fit/cssbox/layout/TableBodyBox.java +++ b/src/main/java/org/fit/cssbox/layout/TableBodyBox.java @@ -399,6 +399,12 @@ public class TableBodyBox extends BlockBox //the background is drawn in the individual cells } + @Override + protected void loadPadding(CSSDecoder dec, int contw) + { + padding = new LengthSet(); //padding does not apply to table body boxes + } + //==================================================================================== /**
Padding does not apply to table row groups
diff --git a/salt/modules/file.py b/salt/modules/file.py index <HASH>..<HASH> 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -1801,7 +1801,7 @@ def get_managed( protos = ['salt', 'http', 'ftp'] if salt._compat.urlparse(source_hash).scheme in protos: # The source_hash is a file on a server - hash_fn = __salt__['cp.cache_file'](source_hash) + hash_fn = __salt__['cp.cache_file'](source_hash, saltenv) if not hash_fn: return '', {}, 'Source hash file {0} not found'.format( source_hash)
Reference the current salt environment. Thanks @hvnsweeting!
diff --git a/intranet/apps/dashboard/views.py b/intranet/apps/dashboard/views.py index <HASH>..<HASH> 100644 --- a/intranet/apps/dashboard/views.py +++ b/intranet/apps/dashboard/views.py @@ -9,7 +9,7 @@ logger = logging.getLogger(__name__) @login_required def dashboard_view(request): - """Process and show the dashboard.""" + """Process and show the dashboard.""" announcements = Announcement.objects.order_by("-updated").all()[:10] context = {"user": request.user, diff --git a/intranet/apps/files/views.py b/intranet/apps/files/views.py index <HASH>..<HASH> 100644 --- a/intranet/apps/files/views.py +++ b/intranet/apps/files/views.py @@ -7,7 +7,7 @@ logger = logging.getLogger(__name__) @login_required def files_view(request): - """The main filecenter view.""" + """The main filecenter view.""" context = {"user": request.user, "page": "files" }
Remove rogue tab from files view
diff --git a/estnltk/syntax/syntax_preprocessing.py b/estnltk/syntax/syntax_preprocessing.py index <HASH>..<HASH> 100644 --- a/estnltk/syntax/syntax_preprocessing.py +++ b/estnltk/syntax/syntax_preprocessing.py @@ -72,9 +72,6 @@ class Cg3Exporter(): line = ' "+0" Y nominal ' # '!~~~' if line == ' "" Z ': line = ' //_Z_ //' # '<<' - # FinV on siin arvatavasti ebakorrektne ja tekkis cap märgendi tõttu - if morph_extended.form == 'aux neg': - line = re.sub('ei" L0(.*) V aux neg cap ','ei" L0\\1 V aux neg cap <FinV> ', line) # 'Astun-ei' if morph_extended.partofspeech == 'H': line = re.sub(' L0 H $',' L0 H ', line) morph_lines.append(line)
removed hack for the lines that contain 'ei" L0(.*) V aux neg cap '
diff --git a/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php b/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php index <HASH>..<HASH> 100644 --- a/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php +++ b/eZ/Publish/Core/Persistence/Legacy/Content/Handler.php @@ -438,7 +438,7 @@ class Handler implements BaseContentHandler /** * Copy Content with Fields and Versions from $contentId in $version. * - * Copies all fields from $contentId in $version (or all versions if false) + * Copies all fields from $contentId in $versionNo (or all versions if null) * to a new object which is returned. Version numbers are maintained. * * @todo Should relations be copied? Which ones?
Fixed: wrong variable reference in phpdoc
diff --git a/test/host/HostHttpServer.test.js b/test/host/HostHttpServer.test.js index <HASH>..<HASH> 100644 --- a/test/host/HostHttpServer.test.js +++ b/test/host/HostHttpServer.test.js @@ -71,7 +71,8 @@ test('HostHttpServer.handle authorized', function (t) { // Function for creating a JWT let jwt = function () { return jsonwebtoken.sign({}, s.key, { - jwtid: crypto.randomBytes(64).toString('base64'), + algorithm: 'HS256', + jwtid: crypto.randomBytes(8).toString('base64'), expiresIn: 3600 }) }
Reduce length of jwi to reduced size of token; force HS<I>
diff --git a/hererocks.py b/hererocks.py index <HASH>..<HASH> 100755 --- a/hererocks.py +++ b/hererocks.py @@ -527,11 +527,11 @@ class Program(object): archive_name = os.path.join(opts.downloads, self.get_file_name()) if opts.downloads and os.path.exists(archive_name): - print("Fetching {} (cached)".format(self.title)) + print("Fetching {}{} (cached)".format(self.title, self.version_suffix)) else: for base_url in self.downloads: url = self.get_download_url(base_url) - print("Fetching {} from {}".format(self.title, url)) + print("Fetching {}{} from {}".format(self.title, self.version_suffix, url)) try: download(url, archive_name)
Show version suffix in fetching stage Used version is not always obvious when version is specified as `latest`, show it as early as possible.
diff --git a/PBB_Core.py b/PBB_Core.py index <HASH>..<HASH> 100755 --- a/PBB_Core.py +++ b/PBB_Core.py @@ -39,6 +39,7 @@ class WDItemEngine(object): wd_item_id = '' item_names = '' + domain = '' autoadd_references = False normalize = True @@ -54,6 +55,7 @@ class WDItemEngine(object): """ self.wd_item_id = wd_item_id self.item_names = item_name + self.domain = domain self.autoadd_references = False self.normalize = normalize @@ -95,7 +97,16 @@ class WDItemEngine(object): print(e) def get_property_list(self): + """ + extract the properties which belong to the domain of the WD item + :return: a list of property strings is being returned + """ + property_list = [] for x in wd_property_store.wd_properties: + if self.domain in x['domain']: + property_list.append(x.key) + + return(property_list) def getItemsByProperty(self, wdproperty):
added property loading from wd_property_store
diff --git a/lan.go b/lan.go index <HASH>..<HASH> 100644 --- a/lan.go +++ b/lan.go @@ -23,7 +23,7 @@ type LanProperties struct { Name string `json:"name,omitempty"` Public bool `json:"public,omitempty"` IPFailover *[]IPFailover `json:"ipFailover,omitempty"` - PCC string `json:"pcc,omitmepty"` + PCC string `json:"pcc,omitempty"` } // LanEntities object
Updates: LAN pcc property
diff --git a/src/Store/Store.php b/src/Store/Store.php index <HASH>..<HASH> 100644 --- a/src/Store/Store.php +++ b/src/Store/Store.php @@ -392,7 +392,7 @@ class Store $identifiers = $collection->getIdentifiers(); if (empty($identifiers)) { // Nothing to query. - return $collection; + return []; } if ($collection instanceof InverseCollection) { $records = $this->retrieveInverseRecords($collection->getOwner()->getType(), $collection->getType(), $collection->getIdentifiers(), $collection->getQueryField());
Fix bug loadCollection was not returning array The `loadCollection` method must return an array of Models. If the collection was empty, the code was previously returning the passed collection, and not returning an array.
diff --git a/classes/ezjscserverfunctionsnode.php b/classes/ezjscserverfunctionsnode.php index <HASH>..<HASH> 100644 --- a/classes/ezjscserverfunctionsnode.php +++ b/classes/ezjscserverfunctionsnode.php @@ -51,6 +51,7 @@ class ezjscServerFunctionsNode extends ezjscServerFunctions $offset = isset( $args[2] ) ? $args[2] : 0; $sort = isset( $args[3] ) ? self::sortMap( $args[3] ) : 'published'; $order = isset( $args[4] ) ? $args[4] : false; + $objectNameFilter = isset( $args[5] ) ? $args[5] : ''; if ( !$parentNodeID ) { @@ -68,6 +69,7 @@ class ezjscServerFunctionsNode extends ezjscServerFunctions 'Offset' => $offset, 'SortBy' => array( array( $sort, $order ) ), 'DepthOperator' => 'eq', + 'ObjectNameFilter' => $objectNameFilter, 'AsObject' => true ); // fetch nodes and total node count
Fixed #<I>: AlphabeticalFilter is not working in admin2
diff --git a/producer/kafka.go b/producer/kafka.go index <HASH>..<HASH> 100644 --- a/producer/kafka.go +++ b/producer/kafka.go @@ -325,7 +325,7 @@ func (prod *Kafka) pollResults() { for _, topic := range prod.topic { sent := atomic.SwapInt64(&topic.sent, 0) duration := time.Since(prod.lastMetricUpdate) - sentPerSec := float64(sent)/duration.Seconds() + 0.5 + sentPerSec := float64(sent) / duration.Seconds() rttSum := atomic.SwapInt64(&topic.rttSum, 0) delivered := atomic.SwapInt64(&topic.delivered, 0)
[fix] Rounding error in producer.Kafka perSecond metrics
diff --git a/lib/dm-core/adapters/postgres_adapter.rb b/lib/dm-core/adapters/postgres_adapter.rb index <HASH>..<HASH> 100644 --- a/lib/dm-core/adapters/postgres_adapter.rb +++ b/lib/dm-core/adapters/postgres_adapter.rb @@ -80,15 +80,6 @@ module DataMapper end # TODO: move to dm-more/dm-migrations - def property_schema_statement(schema) - if schema[:serial?] - "#{quote_column_name(schema[:name])} SERIAL" - else - super - end - end - - # TODO: move to dm-more/dm-migrations def property_schema_hash(repository, property) schema = super @@ -102,6 +93,10 @@ module DataMapper schema.delete(:scale) end + if schema[:serial?] + schema[:primitive] = 'SERIAL' + end + schema end end # module SQL
Further simplify SERIAL column creation for PostgreSQL * Allows other column properties like NOT NULL to be added when applicable
diff --git a/app/actions.go b/app/actions.go index <HASH>..<HASH> 100644 --- a/app/actions.go +++ b/app/actions.go @@ -507,3 +507,14 @@ var ProvisionerDeploy = action.Action{ }, MinParams: 3, } + +// Increment is an actions that increments the deploy number. +var IncrementDeploy = action.Action{ + Name: "increment-deploy", + Forward: func(ctx action.FWContext) (action.Result, error) { + return nil, nil + }, + Backward: func(ctx action.BWContext) { + }, + MinParams: 3, +} diff --git a/app/actions_test.go b/app/actions_test.go index <HASH>..<HASH> 100644 --- a/app/actions_test.go +++ b/app/actions_test.go @@ -1173,3 +1173,7 @@ func (s *S) TestProvisionerDeployParams(c *gocheck.C) { _, err = ProvisionerDeploy.Forward(ctx) c.Assert(err.Error(), gocheck.Equals, "First parameter must be a *App.") } + +func (s *S) TestIncrementDeployName(c *gocheck.C) { + c.Assert(IncrementDeploy.Name, gocheck.Equals, "increment-deploy") +}
app: added increment deploy action. related to #<I>.
diff --git a/Classes/Lightwerk/SurfRunner/Package.php b/Classes/Lightwerk/SurfRunner/Package.php index <HASH>..<HASH> 100644 --- a/Classes/Lightwerk/SurfRunner/Package.php +++ b/Classes/Lightwerk/SurfRunner/Package.php @@ -26,15 +26,13 @@ class Package extends BasePackage { public function boot(Bootstrap $bootstrap) { $dispatcher = $bootstrap->getSignalSlotDispatcher(); - if (!$bootstrap->getContext()->isProduction()) { - $dispatcher->connect( - 'Lightwerk\SurfRunner\Service\DeploymentService', 'deploymentStarted', - 'Lightwerk\SurfRunner\Notification\HitChatNotifier', 'deploymentStarted' - ); - $dispatcher->connect( - 'Lightwerk\SurfRunner\Service\DeploymentService', 'deploymentFinished', - 'Lightwerk\SurfRunner\Notification\HitChatNotifier', 'deploymentFinished' - ); - } + $dispatcher->connect( + 'Lightwerk\SurfRunner\Service\DeploymentService', 'deploymentStarted', + 'Lightwerk\SurfRunner\Notification\HitChatNotifier', 'deploymentStarted' + ); + $dispatcher->connect( + 'Lightwerk\SurfRunner\Service\DeploymentService', 'deploymentFinished', + 'Lightwerk\SurfRunner\Notification\HitChatNotifier', 'deploymentFinished' + ); } }
[TASK] Enables notifications in production context
diff --git a/jradius-authenticator/src/main/java/org/jasig/cas/adaptors/radius/RadiusProtocol.java b/jradius-authenticator/src/main/java/org/jasig/cas/adaptors/radius/RadiusProtocol.java index <HASH>..<HASH> 100644 --- a/jradius-authenticator/src/main/java/org/jasig/cas/adaptors/radius/RadiusProtocol.java +++ b/jradius-authenticator/src/main/java/org/jasig/cas/adaptors/radius/RadiusProtocol.java @@ -30,7 +30,7 @@ public enum RadiusProtocol { EAP_MSCHAPv2("eap-mschapv2"), EAP_TLS("eap-tls"), EAP_TTLS_PAP("eap-ttls:innerProtocol=pap"), - EAP_TTLS_MD5("eap-ttls:innerProtocol=eap-md5"), + EAP_TTLS_EAP_MD5("eap-ttls:innerProtocol=eap-md5"), EAP_TTLS_EAP_MSCHAPv2("eap-ttls:innerProtocol=eap-mschapv2"), MSCHAPv1("mschapv1"), MSCHAPv2("mschapv2"),
Back-merged updated RadiusProtocol from CAS <I>.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -101,12 +101,12 @@ class AgentSDK extends EventEmitter { // todo monitor the socket, return this.sp.send(userProfileReq.getType(), userProfileReq.getRequest()); } - compose(convid) { + compose(convId) { let composeEventReq = new ComposeEvent({convId: convId}); return this.sp.send(composeEventReq.getType(), composeEventReq.getRequest()); } - active(convid) { + active(convId) { let activeEventReq = new ActiveEvent({convId: convId}); return this.sp.send(activeEventReq.getType(), activeEventReq.getRequest()); }
support compose and active chat states via the api
diff --git a/src/Elements/Html.php b/src/Elements/Html.php index <HASH>..<HASH> 100644 --- a/src/Elements/Html.php +++ b/src/Elements/Html.php @@ -37,8 +37,17 @@ class Html extends Element public function display() { return sprintf( - '<tr><td></td><td colspan="2">%s</td></tr>', - $this->content + '<tr %s><td><div title="%s">%s</div></td><td>%s</td></tr>', + $this->renderFieldAttributes(), + $this->getAttribute('name'), + $this->label, + $this->displayValue() ); } + + + public function displayValue() + { + return $this->content; + } }
fix(HTML): apply field attributes
diff --git a/app/models/fluentd/agent/common.rb b/app/models/fluentd/agent/common.rb index <HASH>..<HASH> 100644 --- a/app/models/fluentd/agent/common.rb +++ b/app/models/fluentd/agent/common.rb @@ -20,7 +20,7 @@ class Fluentd attr_reader :extra_options def self.included(base) - base.include Fluentd::Agent::ProcessOperation + base.send(:include, Fluentd::Agent::ProcessOperation) end # define these methods on each Agent class
Use #send for private method on <I>
diff --git a/platform/android/device.js b/platform/android/device.js index <HASH>..<HASH> 100644 --- a/platform/android/device.js +++ b/platform/android/device.js @@ -3,6 +3,7 @@ var Device = function(ui) { ui.deviceId = device.uuid ui.modelName = device.model ui.firmware = device.version + ui.runtime = 'cordova' } ui._context.document.on('deviceready', onDeviceReady);
set runtime field to 'cordova' for cordova
diff --git a/check_manifest.py b/check_manifest.py index <HASH>..<HASH> 100755 --- a/check_manifest.py +++ b/check_manifest.py @@ -433,7 +433,7 @@ def check_manifest(source_tree='.', create=False, update=False): info_begin("building an sdist") with cd(tempsourcedir): with mkdtemp('-sdist') as tempdir: - run(['python', 'setup.py', 'sdist', '-d', tempdir]) + run([sys.executable, 'setup.py', 'sdist', '-d', tempdir]) sdist_filename = get_one_file_in(tempdir) info_continue(": %s" % os.path.basename(sdist_filename)) sdist_files = sorted(strip_sdist_extras(strip_toplevel_name(
Use the same Python interpreter to run setup.py Fixes #<I>, hopefully.
diff --git a/src/Symfony/Component/Cache/Traits/RedisTrait.php b/src/Symfony/Component/Cache/Traits/RedisTrait.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Component/Cache/Traits/RedisTrait.php +++ b/src/Symfony/Component/Cache/Traits/RedisTrait.php @@ -156,7 +156,7 @@ trait RedisTrait $initializer = function ($redis) use ($connect, $params, $dsn, $auth, $hosts) { try { - @$redis->{$connect}($hosts[0]['host'], $hosts[0]['port'], $params['timeout'], (string) $params['persistent_id'], $params['retry_interval']); + @$redis->{$connect}($hosts[0]['host'] ?? $hosts[0]['path'], $hosts[0]['port'] ?? null, $params['timeout'], (string) $params['persistent_id'], $params['retry_interval']); } catch (\RedisException $e) { throw new InvalidArgumentException(sprintf('Redis connection failed (%s): %s', $e->getMessage(), $dsn)); }
[Cache] fix connecting using socket with phpredis
diff --git a/doc2dash/parsers/sphinx/parser.py b/doc2dash/parsers/sphinx/parser.py index <HASH>..<HASH> 100644 --- a/doc2dash/parsers/sphinx/parser.py +++ b/doc2dash/parsers/sphinx/parser.py @@ -91,8 +91,8 @@ def _get_type(text): _IN_MODULE = '_in_module' TYPE_MAPPING = [ - (re.compile(r'(.*)\(\S+ method\)$'), types.METHOD), - (re.compile(r'(.*)\(.*function\)$'), types.FUNCTION), + (re.compile(r'([^ (]*)(?:\(\))? ?\(\S+ method\)$'), types.METHOD), + (re.compile(r'([^ (]*)(?:\(\))? ?\(.*function\)$'), types.FUNCTION), (re.compile(r'(.*)\(\S+ attribute\)$'), types.ATTRIBUTE), (re.compile(r'(.*)\(\S+ member\)$'), types.ATTRIBUTE), (re.compile(r'(.*)\(class in \S+\)$'), types.CLASS),
Don't collect () as part of func and method names Complying with dash's default style.
diff --git a/salt/crypt.py b/salt/crypt.py index <HASH>..<HASH> 100644 --- a/salt/crypt.py +++ b/salt/crypt.py @@ -11,6 +11,7 @@ import hmac import tempfile import random import hashlib +import time import string import cPickle as pickle # Import Cryptography libs
Add time to imports on crypt
diff --git a/stacker/actions/build.py b/stacker/actions/build.py index <HASH>..<HASH> 100644 --- a/stacker/actions/build.py +++ b/stacker/actions/build.py @@ -83,7 +83,6 @@ def should_ensure_cfn_bucket(outline, dump): bool: If access to CF bucket is needed, return True. """ - print "OUTLINE: %s, DUMP: %s" % (outline, dump) return not outline and not dump
Remove leftover print debug statement (#<I>)
diff --git a/lib/dirty_associations.rb b/lib/dirty_associations.rb index <HASH>..<HASH> 100644 --- a/lib/dirty_associations.rb +++ b/lib/dirty_associations.rb @@ -9,22 +9,23 @@ module DirtyAssociations module ClassMethods ## - # Creates methods that allows an association named +field+ to be monitored. + # Creates methods that allows an +association+ to be monitored. # - # The +field+ parameter should be a string or symbol representing the name of an association. - def monitor_association_changes(field) - [field, "#{field.to_s.singularize}_ids"].each do |name| + # The +association+ parameter should be a string or symbol representing the name of an association. + def monitor_association_changes(association) + ids = "#{association.to_s.singularize}_ids" + [association, ids].each do |name| define_method "#{name}=" do |value| - attribute_will_change!(field) # TODO: should probably use the singluar_field_ids name to match how belongs_to relations are handled and because it makes more sense given what's being tracked + attribute_will_change!(ids) super(value) end define_method "#{name}_changed?" do - changed.include?(field) + changed.include?(ids) end define_method "#{name}_previously_changed?" do - previous_changes.keys.include?(field.to_s) + previous_changes.keys.include?(ids) end end end
Register changes to association_ids attribute instead of the association name.
diff --git a/spec/schema.rb b/spec/schema.rb index <HASH>..<HASH> 100644 --- a/spec/schema.rb +++ b/spec/schema.rb @@ -1,6 +1,6 @@ ActiveRecord::Schema.define(:version => 0) do - %w{gates readers writers transients simples thieves}.each do |table_name| + %w{gates readers writers transients simples thieves i18n_test_models}.each do |table_name| create_table table_name, :force => true end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,10 +5,6 @@ require 'aasm' require 'rspec' require 'rspec/autorun' -RSpec.configure do |config| - -end - def load_schema config = YAML::load(IO.read(File.dirname(__FILE__) + '/database.yml')) ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/debug.log")
fixed tests after I<I>n integration
diff --git a/datatableview/helpers.py b/datatableview/helpers.py index <HASH>..<HASH> 100644 --- a/datatableview/helpers.py +++ b/datatableview/helpers.py @@ -62,7 +62,7 @@ def link_to_model(instance, text=None, *args, **kwargs): return """<a href="{}">{}</a>""".format(instance.get_absolute_url(), text) @keyed_helper -def make_boolean_checkmark(value, false_value=""): +def make_boolean_checkmark(value, false_value="", *args, **kwargs): if value: return "&#10004;" return false_value \ No newline at end of file
Added *args and **kwargs to helper signature
diff --git a/tests/test_profiling.py b/tests/test_profiling.py index <HASH>..<HASH> 100644 --- a/tests/test_profiling.py +++ b/tests/test_profiling.py @@ -40,7 +40,7 @@ class TestProfiling(GPflowTestCase): m = self.prepare() s = gpflow.settings.get_settings() s.profiling.dump_timeline = True - s.profiling.output_directory = os.path.dirname(__file__) + s.profiling.output_directory = '/tmp/' s.profiling.output_file_name = 'test_trace_autoflow' with gpflow.settings.temp_settings(s):
Change temporary file directory for profiling tests.
diff --git a/services/meta/client.go b/services/meta/client.go index <HASH>..<HASH> 100644 --- a/services/meta/client.go +++ b/services/meta/client.go @@ -120,7 +120,7 @@ func (c *Client) Databases() ([]DatabaseInfo, error) { if c.data.Databases == nil { return []DatabaseInfo{}, nil } - return c.data.CloneDatabases(), nil + return c.data.Databases, nil } // CreateDatabase creates a database.
don't clone database infos in client
diff --git a/jax/lax/lax_parallel.py b/jax/lax/lax_parallel.py index <HASH>..<HASH> 100644 --- a/jax/lax/lax_parallel.py +++ b/jax/lax/lax_parallel.py @@ -353,7 +353,7 @@ def _defreducer(prim, collective_prim): parallel.papply_primitive_rules[prim] = partial(_reducer_papply, prim, collective_prim) -def _identity_papply(prim, argnum, name, vals, axes, **params): +def _identity_papply(prim, argnum, name, size, vals, axes, **params): return prim.bind(*vals, **params), axes[argnum] def _defidentity(prim, argnum=0):
fix `_identity_papply` to accept axis size
diff --git a/lib/weblib.php b/lib/weblib.php index <HASH>..<HASH> 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -543,7 +543,7 @@ function link_to_popup_window ($url, $name='popup', $linkname='click here', $url = substr($url, strlen($CFG->wwwroot)); } - $link = '<a title="'. s($title) .'" href="'. $CFG->wwwroot . $url .'" '. + $link = '<a title="'. s(strip_tags($title)) .'" href="'. $CFG->wwwroot . $url .'" '. "onclick=\"this.target='$name'; return openpopup('$url', '$name', '$options', $fullscreen);\">$linkname</a>"; if ($return) { return $link; @@ -4876,7 +4876,7 @@ function helpbutton ($page, $title='', $module='moodle', $image=true, $linktext= if ($imagetext) { $linkobject .= $imagetext; } else { - $linkobject .= '<img class="iconhelp" alt="'.$tooltip.'" src="'. + $linkobject .= '<img class="iconhelp" alt="'.s(strip_tags($tooltip)).'" src="'. $CFG->pixpath .'/help.gif" />'; } } else {
MDL-<I> Double quotes and tags in helpable item breaks XHTML strict; merged from MOODLE_<I>_STABLE
diff --git a/lib/ggem/version.rb b/lib/ggem/version.rb index <HASH>..<HASH> 100644 --- a/lib/ggem/version.rb +++ b/lib/ggem/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module GGem - VERSION = "1.10.5" + VERSION = "1.10.6" end
version to <I> * 9e<I> - update to work with Ruby 3+ #<I>
diff --git a/tests/core/test_templating.py b/tests/core/test_templating.py index <HASH>..<HASH> 100644 --- a/tests/core/test_templating.py +++ b/tests/core/test_templating.py @@ -4,6 +4,8 @@ import shutil import tempfile import unittest import jinja2 +import pwd +import grp import mock from charmhelpers.core import templating @@ -64,7 +66,10 @@ class TestTemplating(unittest.TestCase): fn1 = os.path.join(tmpdir, 'test.conf') try: context = {'nginx_port': 80} - templating.render('test.conf', fn1, context, templates_dir=TEMPLATES_DIR) + templating.render('test.conf', fn1, context, + owner=pwd.getpwuid(os.getuid()).pw_name, + group=grp.getgrgid(os.getgid()).gr_name, + templates_dir=TEMPLATES_DIR) with open(fn1) as f: contents = f.read()
[niedbalski, r=freyes] Fixes regression on tests introduced LP Bug: #<I>.
diff --git a/spec/features/payu_latam_checkout_spec.rb b/spec/features/payu_latam_checkout_spec.rb index <HASH>..<HASH> 100644 --- a/spec/features/payu_latam_checkout_spec.rb +++ b/spec/features/payu_latam_checkout_spec.rb @@ -23,8 +23,6 @@ describe 'Payu Latam checkout', :vcr, type: :feature do end it 'can process a valid payment', js: true do - sleep(5) - # wait to payU.getPaymentMethods() fill_credit_card '4111 1111 1111 1111', '32144457' click_button 'Save and Continue' expect(page).to have_content('Your order has been processed successfully') @@ -52,8 +50,6 @@ describe 'Payu Latam checkout', :vcr, type: :feature do stub_authorization! before do - sleep(5) - # wait to payU.getPaymentMethods() fill_credit_card '4111 1111 1111 1111', '32144457' click_button 'Save and Continue' end
remove sleep for payu js in spec since is not used right now
diff --git a/event-log/src/main/java/net/kuujo/copycat/event/internal/DefaultEventLog.java b/event-log/src/main/java/net/kuujo/copycat/event/internal/DefaultEventLog.java index <HASH>..<HASH> 100644 --- a/event-log/src/main/java/net/kuujo/copycat/event/internal/DefaultEventLog.java +++ b/event-log/src/main/java/net/kuujo/copycat/event/internal/DefaultEventLog.java @@ -86,6 +86,7 @@ public class DefaultEventLog<T> extends AbstractResource<EventLog<T>> implements executor.execute(() -> consumer.handle(value)); } commitIndex = index; + result.flip(); return result; }
Flip event log consumer result before returning.
diff --git a/src/Utipd/XCPDClient/Client.php b/src/Utipd/XCPDClient/Client.php index <HASH>..<HASH> 100644 --- a/src/Utipd/XCPDClient/Client.php +++ b/src/Utipd/XCPDClient/Client.php @@ -39,7 +39,7 @@ class Client $client = $this->buildClient(); // build the request - $request = $this->buildRequest($name, $arguments[0], $client); + $request = $this->buildRequest($name, $arguments ? $arguments[0] : [], $client); // get the response $response = $client->send($request);
added support for empty client params
diff --git a/app/Services/CalendarService.php b/app/Services/CalendarService.php index <HASH>..<HASH> 100644 --- a/app/Services/CalendarService.php +++ b/app/Services/CalendarService.php @@ -290,7 +290,7 @@ class CalendarService $query ->orderBy('d_day') - ->orderByDesc('d_year'); + ->orderBy('d_year'); $ind_query = (clone $query) ->join('individuals', static function (JoinClause $join): void {
Fix: #<I> - order of events on calendar pages
diff --git a/Gruntfile.js b/Gruntfile.js index <HASH>..<HASH> 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -6,7 +6,6 @@ module.exports = function(grunt) { nodeunit : { zones : [ "tests/zones/**/*.js", - "tests/countries/*.js" ], countries: [ "tests/countries/*.js"
grunt: do not bundle zone and contry tests
diff --git a/lib/file-set.js b/lib/file-set.js index <HASH>..<HASH> 100644 --- a/lib/file-set.js +++ b/lib/file-set.js @@ -1,7 +1,9 @@ -var fs = require("fs"), - glob = require("glob"), - Glob = glob.Glob, - a = require("array-tools"); +"use strict"; +var fs = require("fs"); +var glob = require("glob"); +var Glob = glob.Glob; +var a = require("array-tools"); +var path = require("path"); /** Exports a contructor taking a list of file patterns as input, returning a `file-set` instance containing the expanded patterns split into separate lists of `files`, `dirs` and `notExisting`. @@ -74,11 +76,14 @@ FileSet.prototype.add = function(files){ } catch(err){ if (err.code === "ENOENT"){ nonExistingFiles.push(file); + } else { + throw err; } } }); nonExistingFiles.forEach(function(file){ + file = path.normalize(file); var glob = new Glob(file, { sync: true, stat: true }); if (glob.found.length){ glob.found.forEach(function(file){
fixed issue when path like 'this/that/../something'
diff --git a/flask_resty/view.py b/flask_resty/view.py index <HASH>..<HASH> 100644 --- a/flask_resty/view.py +++ b/flask_resty/view.py @@ -87,6 +87,10 @@ class ApiView(MethodView): return flask.url_for(flask.request.endpoint, _method='GET', **id_dict) def get_request_data(self, **kwargs): + data_raw = self.parse_request_data() + return self.deserialize(data_raw, **kwargs) + + def parse_request_data(self): try: data_raw = flask.request.get_json()['data'] except TypeError: @@ -94,7 +98,7 @@ class ApiView(MethodView): except KeyError: raise ApiError(400, {'code': 'invalid_data.missing'}) - return self.deserialize(data_raw, **kwargs) + return data_raw def deserialize(self, data_raw, expected_id=None, **kwargs): data, errors = self.deserializer.load(data_raw, **kwargs)
feature: add get_raw_request_data (#<I>) * feature: add get_raw_request_data This makes it easier to override the logic associated with getting the request data w/o ovverriding the de-serializer. * rename to parse_request_data
diff --git a/PyFunceble/logger.py b/PyFunceble/logger.py index <HASH>..<HASH> 100644 --- a/PyFunceble/logger.py +++ b/PyFunceble/logger.py @@ -80,7 +80,11 @@ class Logger: # pylint: disable=too-many-public-methods # pylint: disable=line-too-long - OWN_FORMAT: str = "[%(asctime)s::%(levelname)s::%(origin_path)s:%(origin_line)s@%(origin_func)s](PID%(thread)s:%(threadName)s): %(message)s" + OWN_FORMAT: str = ( + "[%(asctime)s | %(levelname)s | %(origin_path)s:" + "%(origin_line)s@%(origin_func)s | TPID%(thread)d:%(threadName)s" + " | PPID%(process)d:%(processName)s]:\n%(message)s" + ) """ Our very own format. """
Improvement of the logging format. Indeed, before this patch, because we didn't used multiprocessing, there was no tracking of running/logging process.
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index <HASH>..<HASH> 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,4 @@ +require 'rubygems' require 'mocha' require 'builder' require 'pivotal'
Make sure specs see rubygems
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup_data = { 'long_description': """Simple tools for processing string in russian (choose proper form for plurals, in-words representation of numerals, dates in russian without locales, transliteration, etc)""", - 'packages': ['pytils', 'pytils.templatetags', 'pytils.test', 'pytils.test.templatetags'], + 'packages': ['pytils', 'pytils.templatetags', 'pytils.test', 'pytils.test.templatetags', 'pytils.third'], 'license': "GPL", 'platforms': "All", 'classifiers': [
Fix #<I>, pytils.third is added as package in setup.py
diff --git a/lib/travis/model/artifact/log.rb b/lib/travis/model/artifact/log.rb index <HASH>..<HASH> 100644 --- a/lib/travis/model/artifact/log.rb +++ b/lib/travis/model/artifact/log.rb @@ -10,8 +10,9 @@ class Artifact::Log < Artifact def append(job_id, chars, number = nil, final = false) if Travis::Features.feature_active?(:log_aggregation) id = Artifact::Log.where(job_id: job_id).select(:id).first.id + puts "[warn] artifact is is nil for job_id: #{job_id}, number: #{number}, ignoring the log part!" meter('logs.update') do - Artifact::Part.create!(artifact_id: id, content: filter(chars), number: number, final: final || final?(chars)) + Artifact::Part.create!(artifact_id: id, content: filter(chars), number: number, final: final || final?(chars)) if id end else meter('logs.update') do
ignore artifact parts that do not have an id and warn
diff --git a/lib/fernet.rb b/lib/fernet.rb index <HASH>..<HASH> 100644 --- a/lib/fernet.rb +++ b/lib/fernet.rb @@ -10,12 +10,14 @@ Fernet::Configuration.run module Fernet TOKEN_VERSION = 0x80.freeze - def self.generate(secret, message = '', &block) - Generator.new(secret: secret, message: message).generate(&block) + def self.generate(secret, message = '', opts = {}, &block) + Generator.new(opts.merge({secret: secret, message: message})). + generate(&block) end - def self.verify(secret, token, &block) - Verifier.new(secret: secret, token: token).verify(&block) + def self.verify(secret, token, opts = {}, &block) + Verifier.new(opts.merge({secret: secret, token: token})). + verify(&block) end def self.verifier(secret, token, &block)
Allows options to be injected into the generator/verifier
diff --git a/tests/test_project.py b/tests/test_project.py index <HASH>..<HASH> 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -35,7 +35,7 @@ class ProjectTest(unittest.TestCase): with self.assertRaises(ConfigurationError): find_configs(package_root) - @patch('pathlib.Path') + @patch.object(pathlib, 'Path') @patch('ballet.project.find_configs') def test_config_get(self, mock_find_configs, mock_Path): config1 = {
Have to patch.object pathlib because of compat issues
diff --git a/lib/Form/Field/Upload.php b/lib/Form/Field/Upload.php index <HASH>..<HASH> 100644 --- a/lib/Form/Field/Upload.php +++ b/lib/Form/Field/Upload.php @@ -150,7 +150,9 @@ class Form_Field_Upload extends Form_Field { //.', error: '.$this->getFileError()); //more user friendly } - $e->addMoreInfo('upload_error',$this->getFileError()); + if(is_subclass_of($e, 'BaseException')){ + $e->addMoreInfo('upload_error',$this->getFileError()); + } echo '<script>$=window.top.$;'; $_POST['ajax_submit']=1;
Update Upload.php fix for Fatal error: Call to undefined method ErrorException::addMoreInfo() in /atk4/lib/Form/Field/Upload.php on line <I>
diff --git a/src/social-likes.js b/src/social-likes.js index <HASH>..<HASH> 100644 --- a/src/social-likes.js +++ b/src/social-likes.js @@ -1,5 +1,5 @@ import Button from './button'; -import { deepmerge, toArray } from './util'; +import { deepmerge, dataset, toArray } from './util'; import { prefix } from './config'; // Default options @@ -17,7 +17,7 @@ const defaults = { export default class SocialLikes { constructor(container, options = {}) { this.container = container; - this.options = deepmerge(defaults, options); + this.options = deepmerge(deepmerge(defaults, options), dataset(container)); let buttons = this.container.children; this.buttons = toArray(buttons).map(elem => {
data-attributes on container should override SocialLikes options.
diff --git a/manifest.php b/manifest.php index <HASH>..<HASH> 100755 --- a/manifest.php +++ b/manifest.php @@ -29,7 +29,7 @@ return array( 'label' => 'Browser and OS diagnostic tool', 'description' => 'Check compatibility of the os and browser of a client', 'license' => 'GPL-2.0', - 'version' => '2.17.10', + 'version' => '2.17.11', 'author' => 'Open Assessment Technologies SA', 'requires' => array( 'tao' => '>=17.8.0', diff --git a/scripts/update/Updater.php b/scripts/update/Updater.php index <HASH>..<HASH> 100755 --- a/scripts/update/Updater.php +++ b/scripts/update/Updater.php @@ -727,6 +727,6 @@ class Updater extends \common_ext_ExtensionUpdater $this->setVersion('2.17.9'); } - $this->skip('2.17.9', '2.17.10'); + $this->skip('2.17.9', '2.17.11'); } }
Bump v. <I> (PDOException replaced with DBALException)
diff --git a/etrago/cluster/gasclustering.py b/etrago/cluster/gasclustering.py index <HASH>..<HASH> 100755 --- a/etrago/cluster/gasclustering.py +++ b/etrago/cluster/gasclustering.py @@ -146,8 +146,14 @@ def create_gas_busmap(etrago): save="network_ch4_" + kmean_gas_settings["bus_weight_tocsv"], ) elif kmean_gas_settings["bus_weight_fromcsv"] is not None: - weight_ch4 = pd.Series.from_csv(kmean_gas_settings["bus_weight_fromcsv"]) - weight_ch4.index = weight_ch4.index.astype(str) + # create DataFrame with uniform weightings for all ch4_buses + weight_ch4 = pd.DataFrame([1] * len(buses_ch4), index=buses_ch4.index) + loaded_weights = pd.read_csv( + kmean_gas_settings["bus_weight_fromcsv"], index_col=0 + ) + # load weights into previously created DataFrame + loaded_weights.index = loaded_weights.index.astype(str) + weight_ch4.loc[loaded_weights.index] = loaded_weights else: weight_ch4 = weighting_for_scenario(network_ch4.buses, save=False)
Updated deprecated from_csv to pandas.read_csv()
diff --git a/lib/schema_dev/gem.rb b/lib/schema_dev/gem.rb index <HASH>..<HASH> 100644 --- a/lib/schema_dev/gem.rb +++ b/lib/schema_dev/gem.rb @@ -120,7 +120,7 @@ module SchemaDev s = s.gsub('%GEM_MODULE%', gem_module) s = s.gsub('%FULLNAME%', fullname) s = s.gsub('%EMAIL%', email) - s = s.gsub('%SCHEMA_PLUS_CORE_DEPENDENCY%', dependency(schema_plus_core_version)) + s = s.gsub('%SCHEMA_PLUS_CORE_DEPENDENCY%') { dependency(schema_plus_core_version) } s = s.gsub('%SCHEMA_DEV_DEPENDENCY%', dependency(SchemaDev::VERSION)) s = s.gsub('%YEAR%', Time.now.strftime("%Y")) end
Only try to connect to the internet if you need it.
diff --git a/underfs/oss/src/main/java/tachyon/underfs/oss/OSSInputStream.java b/underfs/oss/src/main/java/tachyon/underfs/oss/OSSInputStream.java index <HASH>..<HASH> 100644 --- a/underfs/oss/src/main/java/tachyon/underfs/oss/OSSInputStream.java +++ b/underfs/oss/src/main/java/tachyon/underfs/oss/OSSInputStream.java @@ -65,4 +65,9 @@ public class OSSInputStream extends InputStream { int ret = mInputStream.read(b, off, len); return ret; } + + @Override + public long skip(long n) throws IOException { + throw new IOException("unsupported skip in OSSInputStream currently."); + } }
[TACHYON-<I>] Merge Implement the OSSUnderFileSystem. Throw exception when call OSSInputStream.skip for the oss sdk not provide yet.
diff --git a/salt/cloud/clouds/ibmsce.py b/salt/cloud/clouds/ibmsce.py index <HASH>..<HASH> 100644 --- a/salt/cloud/clouds/ibmsce.py +++ b/salt/cloud/clouds/ibmsce.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- ''' IBM SCE Cloud Module ====================
utf tag for ibm cloud
diff --git a/common/persistence/sql/class.Platform.php b/common/persistence/sql/class.Platform.php index <HASH>..<HASH> 100644 --- a/common/persistence/sql/class.Platform.php +++ b/common/persistence/sql/class.Platform.php @@ -152,7 +152,17 @@ class common_persistence_sql_Platform { * @return string */ public function getNowExpression(){ - return $this->dbalPlatform->getNowExpression(); + // We can't use $this->dbalPlatform->getNowExpression() because sqlite, + // at least used for the tests, returns `datetime('now')` which can + // not be parsed as a regular date. + // We instead generate a date with php and the format it with + // $this->dbalPlatform->getDateTimeTzFormatString(), to still have the + // correct format to be inserted in db. + + $datetime = new \DateTime('now', new \DateTimeZone('UTC')); + $date = $datetime->format($this->dbalPlatform->getDateTimeTzFormatString()); + + return $date; } /**
Amended getNowExpression to use a php-generated date instead of relying on platform-generated date. Sqlite returns `datetime('now')` which cannot be parsed as a regular date.
diff --git a/lxc/cluster.go b/lxc/cluster.go index <HASH>..<HASH> 100644 --- a/lxc/cluster.go +++ b/lxc/cluster.go @@ -160,7 +160,11 @@ func (c *cmdClusterList) Run(cmd *cobra.Command, args []string) error { data := [][]string{} for _, member := range members { roles := member.ClusterMemberPut.Roles - line := []string{member.ServerName, member.URL, strings.Join(roles, "\n"), member.Architecture, member.FailureDomain, member.Description, strings.ToUpper(member.Status), member.Message} + rolesDelimiter := "\n" + if c.flagFormat == "csv" { + rolesDelimiter = "," + } + line := []string{member.ServerName, member.URL, strings.Join(roles, rolesDelimiter), member.Architecture, member.FailureDomain, member.Description, strings.ToUpper(member.Status), member.Message} data = append(data, line) } sort.Sort(byName(data))
lxc/cluster: Comma as delimeter for csv format
diff --git a/contrib/clients/TSCA/ruby/RubyClient.rb b/contrib/clients/TSCA/ruby/RubyClient.rb index <HASH>..<HASH> 100755 --- a/contrib/clients/TSCA/ruby/RubyClient.rb +++ b/contrib/clients/TSCA/ruby/RubyClient.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby -$:.push('../../../../thrift/gen-rb') +$:.push('gen-rb') $:.unshift '../../../lib/rb/lib' require 'csv'
Adapt TSCA ruby client to new code layout
diff --git a/lib/backup/notifier/mail.rb b/lib/backup/notifier/mail.rb index <HASH>..<HASH> 100644 --- a/lib/backup/notifier/mail.rb +++ b/lib/backup/notifier/mail.rb @@ -76,6 +76,11 @@ module Backup attr_accessor :openssl_verify_mode ## + # Automatically set SSL + # Example: true + attr_accessor :ssl + + ## # When using the `:sendmail` `delivery_method` option, # this may be used to specify the absolute path to `sendmail` (if needed) # Example: '/usr/sbin/sendmail' @@ -174,7 +179,8 @@ module Backup :password => @password, :authentication => @authentication, :enable_starttls_auto => @enable_starttls_auto, - :openssl_verify_mode => @openssl_verify_mode } + :openssl_verify_mode => @openssl_verify_mode, + :ssl => @ssl } when 'sendmail' opts = {} opts.merge!(:location => File.expand_path(@sendmail)) if @sendmail
Add support for SMTP with SSL. Fastmail requires SMTP to use SSL but not STARTTLS. This change enables ones to turn on SSL without automatically starting TLS. Here are some relevant links: <URL>
diff --git a/gui/tools/designer.py b/gui/tools/designer.py index <HASH>..<HASH> 100644 --- a/gui/tools/designer.py +++ b/gui/tools/designer.py @@ -77,7 +77,9 @@ class BasicDesigner: elif evt.GetEventType() == wx.EVT_LEFT_UP.typeId: self.mouse_up(evt) elif evt.GetEventType() == wx.EVT_MOTION.typeId: - self.mouse_move(evt) + # wait 500ms before EVT_LEFT_DOWN to prevent accidental moves + if self.timestamp and evt.Timestamp - self.timestamp > 500: + self.mouse_move(evt) elif evt.GetEventType() == wx.EVT_RIGHT_DOWN.typeId and self.inspector: # on right click, inspect and pop up the context menu # do this after this event to prevent reference issues (deletions!)
fixed accidental move when clicking over a control in the designer
diff --git a/builder/amazon/chroot/device.go b/builder/amazon/chroot/device.go index <HASH>..<HASH> 100644 --- a/builder/amazon/chroot/device.go +++ b/builder/amazon/chroot/device.go @@ -27,11 +27,12 @@ func AvailableDevice() (string, error) { continue } - for i := 1; i < 16; i++ { - device := fmt.Sprintf("/dev/%s%c%d", prefix, letter, i) - if _, err := os.Stat(device); err != nil { - return device, nil - } + // To be able to build both Paravirtual and HVM images, the unnumbered + // device and the first numbered one must be available. + // E.g. /dev/xvdf and /dev/xvdf1 + numbered_device := fmt.Sprintf("%s%d", device, 1) + if _, err := os.Stat(numbered_device); err != nil { + return device, nil } }
To be able to build both PV and HVM images, it is not possible to use both /dev/sd[f-p] and [1-<I>] as the HVM images get attached at /dev/sdf but must be mounted a /dev/sdf1. This reduces the number of simultaneous packer runs possible significantly, but unless you are Netflix, who have Aminator anyway, this is probably never going to be an issue
diff --git a/src/main/com/mongodb/DBApiLayer.java b/src/main/com/mongodb/DBApiLayer.java index <HASH>..<HASH> 100644 --- a/src/main/com/mongodb/DBApiLayer.java +++ b/src/main/com/mongodb/DBApiLayer.java @@ -83,10 +83,16 @@ public class DBApiLayer extends DB { try { if (isServerVersionAtLeast(asList(2, 6, 0))) { CommandResult userInfoResult = command(new BasicDBObject("usersInfo", username)); - userInfoResult.throwOnError(); - DBObject userCommandDocument = getUserCommandDocument(username, passwd, readOnly, - ((List) userInfoResult.get("users")).isEmpty() - ? "createUser" : "updateUser"); + try { + userInfoResult.throwOnError(); + } catch (MongoException e) { + if (e.getCode() != 13) { + throw e; + } + } + String operationType = (!userInfoResult.containsField("users") || + ((List) userInfoResult.get("users")).isEmpty()) ? "createUser" : "updateUser"; + DBObject userCommandDocument = getUserCommandDocument(username, passwd, readOnly, operationType); CommandResult commandResult = command(userCommandDocument); commandResult.throwOnError(); return new WriteResult(commandResult, getWriteConcern());
Work around localhost exception issues in addUser helper JAVA-<I>
diff --git a/src/Keboola/Syrup/Command/QueueCreateCommand.php b/src/Keboola/Syrup/Command/QueueCreateCommand.php index <HASH>..<HASH> 100644 --- a/src/Keboola/Syrup/Command/QueueCreateCommand.php +++ b/src/Keboola/Syrup/Command/QueueCreateCommand.php @@ -60,9 +60,12 @@ class QueueCreateCommand extends ContainerAwareCommand } if (!$noWatch) { - $cwClient = CloudWatchClient::factory([ - 'region' => 'us-east-1' - ]); + $data['region'] = $region; + if ($accessKey != null && $secretKey != null) { + $data['key'] = $accessKey; + $data['secret'] = $secretKey; + } + $cwClient = CloudWatchClient::factory($data); $cwClient->putMetricAlarm([ // AlarmName is required
fix (QueueCreateCommand): use supplied credentials for Cloudwatch alert
diff --git a/question/type/questiontype.php b/question/type/questiontype.php index <HASH>..<HASH> 100644 --- a/question/type/questiontype.php +++ b/question/type/questiontype.php @@ -1701,6 +1701,7 @@ class default_questiontype { * This is used in question/restorelib.php */ function restore($old_question_id,$new_question_id,$info,$restore) { + global $DB; $status = true; $extraquestionfields = $this->extra_question_fields(); @@ -1716,7 +1717,7 @@ class default_questiontype { foreach ($extraquestionfields as $field) { $record->$field = backup_todb($recordinfo['#'][strtoupper($field)]['0']['#']); } - if (!insert_record($questionextensiontable, $record)) { + if (!$DB->insert_record($questionextensiontable, $record)) { echo "Can't insert record in $questionextensiontable when restoring " . $this->name() . ' question id ' . $question; $status = false;
questiontypes: MDL-<I> Fix another merge error.
diff --git a/pysat/tests/test_utils.py b/pysat/tests/test_utils.py index <HASH>..<HASH> 100644 --- a/pysat/tests/test_utils.py +++ b/pysat/tests/test_utils.py @@ -545,7 +545,7 @@ class TestBasics(): self.testInst.index.freq = pysat.utils.calc_freq(self.testInst.index) - assert set.testInst.index.freq.find("1S") == 0 + assert self.testInst.index.freq.find("1S") == 0 def test_calc_freq_ns(self): """Test index frequency calculation with nanosecond output""" @@ -555,7 +555,7 @@ class TestBasics(): uts=np.arange(0.0, 0.04, .01)) freq = pysat.utils.calc_freq(tind) - assert set.testInst.index.freq.find("10000000N") == 0 + assert self.testInst.index.freq.find("10000000N") == 0 def test_calc_freq_len_fail(self): """Test index frequency calculation with empty list"""
Update test_utils.py Fixed bug in frequency tests
diff --git a/tests/Hal/HalTest.php b/tests/Hal/HalTest.php index <HASH>..<HASH> 100644 --- a/tests/Hal/HalTest.php +++ b/tests/Hal/HalTest.php @@ -788,7 +788,6 @@ JSON; ); $json = json_decode($hal->asJson()); - var_dump($json); $this->assertInternalType('array', $json->_embedded->foo->_embedded->bar); } }
Careless. Remove var_dump.
diff --git a/lib/awesome_translations/erb_inspector.rb b/lib/awesome_translations/erb_inspector.rb index <HASH>..<HASH> 100644 --- a/lib/awesome_translations/erb_inspector.rb +++ b/lib/awesome_translations/erb_inspector.rb @@ -4,7 +4,7 @@ class AwesomeTranslations::ErbInspector def initialize(args = {}) @args = args - @args[:exts] ||= [".erb", ".haml", ".rb", ".rake"] + @args[:exts] ||= [".erb", ".haml", ".rb", ".rake", ".slim"] if @args[:dirs] @dirs = @args[:dirs]
Added support for *.slim files
diff --git a/examples/profile.php b/examples/profile.php index <HASH>..<HASH> 100755 --- a/examples/profile.php +++ b/examples/profile.php @@ -8,7 +8,12 @@ $token = isset($_GET['token']) ? $_GET['token'] : ''; $profileAttributes = []; try { - $yotiClient = new Yoti\YotiClient(getenv('YOTI_SDK_ID'), getenv('YOTI_KEY_FILE_PATH')); + $yotiConnectApi = getenv('YOTI_CONNECT_API') ?: Yoti\YotiClient::DEFAULT_CONNECT_API; + $yotiClient = new Yoti\YotiClient( + getenv('YOTI_SDK_ID'), + getenv('YOTI_KEY_FILE_PATH'), + $yotiConnectApi + ); $activityDetails = $yotiClient->getActivityDetails($token); $profile = $activityDetails->getProfile();
SDK-<I>: Add override option for CoonectAPi
diff --git a/pylivetrader/backend/alpaca.py b/pylivetrader/backend/alpaca.py index <HASH>..<HASH> 100644 --- a/pylivetrader/backend/alpaca.py +++ b/pylivetrader/backend/alpaca.py @@ -527,7 +527,8 @@ class Backend(BaseBackend): limit=bar_count) # change the index values to assets to compatible with zipline - symbol_asset = {a.symbol: a for a in assets} + symbol_asset = {a.symbol: a for a in assets} if not assets_is_scalar \ + else {assets.symbol: assets} df.columns = df.columns.set_levels([ symbol_asset[s] for s in df.columns.levels[0]], level=0) return df
fix in case assets is not a list
diff --git a/lib/server.js b/lib/server.js index <HASH>..<HASH> 100644 --- a/lib/server.js +++ b/lib/server.js @@ -104,7 +104,7 @@ Server.prototype._publish = function() { var info = this._bridge.getService(Service.AccessoryInformation); info.setCharacteristic(Characteristic.Manufacturer, `${toTitleCase(require('../package.json').author.name)}`); info.setCharacteristic(Characteristic.Model, `${toTitleCase(require('../package.json').name)}`); - info.setCharacteristic(Characteristic.SerialNumber, bridgeConfig.pin); + info.setCharacteristic(Characteristic.SerialNumber, bridgeConfig.username); info.setCharacteristic(Characteristic.FirmwareRevision, require('../package.json').version); this._printPin(bridgeConfig.pin);
Update server.js Populate serial number from bridge username (MAC address)
diff --git a/handlebars/helpers.js b/handlebars/helpers.js index <HASH>..<HASH> 100644 --- a/handlebars/helpers.js +++ b/handlebars/helpers.js @@ -302,7 +302,7 @@ function renderTree (object, isLast, fn) { * @param somePath the root-directory of the tree * @param isLast an array of boolean values, showing whether the current element on each level is the last element in the list * @param filter a function that returns true for each file that should be displayed - * @returns an object structure compatible with `renderTree` representing the file tree + * @returns {object} an object structure compatible with `renderTree` representing the file tree */ function createDirectoryTree (somePath, isLast, filter) { debug('filter', filter) @@ -310,10 +310,6 @@ function createDirectoryTree (somePath, isLast, filter) { var filelink = path.basename(somePath) if (fs.statSync(somePath).isFile()) { - if (filter && !filter(somePath)) { - debug('Omitting ' + somePath + ' based on glob') - return '' - } return {name: filelink} } return {
Remove redundant filter-call in "createDirectoryTree"
diff --git a/system/Model.php b/system/Model.php index <HASH>..<HASH> 100644 --- a/system/Model.php +++ b/system/Model.php @@ -1123,7 +1123,7 @@ class Model */ public function paginate(int $perPage = null, string $group = 'default', int $page = 0) { - $pager = \Config\Services::pager(null, null, true); + $pager = \Config\Services::pager(null, null, false); $page = $page >= 1 ? $page : $pager->getCurrentPage($group); $total = $this->countAllResults(false);
back to use shared pager instance in Model::paginate
diff --git a/tensor2tensor/utils/t2t_model.py b/tensor2tensor/utils/t2t_model.py index <HASH>..<HASH> 100644 --- a/tensor2tensor/utils/t2t_model.py +++ b/tensor2tensor/utils/t2t_model.py @@ -387,7 +387,7 @@ class T2TModel(base.Layer): assert not isinstance(target_modality, dict), ( "model_body must return a dictionary of logits when " "problem_hparams.target_modality is a dict.") - return self._loss_single(logits, target_modality, features) + return self._loss_single(logits, target_modality, features["targets"]) def optimize(self, loss, num_async_replicas=1): """Return a training op minimizing loss."""
One more fix for target modalites.
diff --git a/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java b/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java index <HASH>..<HASH> 100644 --- a/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java +++ b/natural-language-understanding/src/main/java/com/ibm/watson/natural_language_understanding/v1/NaturalLanguageUnderstanding.java @@ -165,6 +165,7 @@ public class NaturalLanguageUnderstanding extends BaseService { } builder.header("Accept", "application/json"); if (listModelsOptions != null) { + } ResponseConverter<ListModelsResults> responseConverter = ResponseConverterUtils.getValue( new com.google.gson.reflect.TypeToken<ListModelsResults>() { @@ -208,6 +209,7 @@ public class NaturalLanguageUnderstanding extends BaseService { builder.header(header.getKey(), header.getValue()); } builder.header("Accept", "application/json"); + ResponseConverter<DeleteModelResults> responseConverter = ResponseConverterUtils.getValue( new com.google.gson.reflect.TypeToken<DeleteModelResults>() { }.getType());
refactor(Natural Language Understanding): Add newest generator output
diff --git a/labware/liquids.py b/labware/liquids.py index <HASH>..<HASH> 100644 --- a/labware/liquids.py +++ b/labware/liquids.py @@ -73,7 +73,7 @@ class LiquidContainer(): def assert_capacity(self, new_amount, ml=False): if not self.max_volume: - return + raise ValueError("No maximum liquid amount set for well.") new_value = self.calculate_total_volume()+new_amount if (new_value > self.max_volume): raise VolumeError(
LiquidContainer: Force maximum limit. I'm not actually sure why the tests concerning maximum limits on MicroplateWell are passing. Need to figure out where they're set.
diff --git a/TextFormatter/Tests/ParamsAndFiltersTest.php b/TextFormatter/Tests/ParamsAndFiltersTest.php index <HASH>..<HASH> 100644 --- a/TextFormatter/Tests/ParamsAndFiltersTest.php +++ b/TextFormatter/Tests/ParamsAndFiltersTest.php @@ -636,6 +636,21 @@ class ParamsAndFiltersTest extends \PHPUnit_Framework_TestCase ) ), array( + '[x range=TWENTY /]', + '<rt><X>[x range=TWENTY /]</X></rt>', + array( + 'error' => array( + array( + 'pos' => 0, + 'bbcodeId' => 'X', + 'paramName' => 'range', + 'msg' => 'Invalid param %s', + 'params' => array('range') + ) + ) + ) + ), + array( '[size=1]too small[/size]', '<rt><SIZE size="7"><st>[size=1]</st>too small<et>[/size]</et></SIZE></rt>', array(
Added test covering invalid data in a range param
diff --git a/lib/resolve.js b/lib/resolve.js index <HASH>..<HASH> 100644 --- a/lib/resolve.js +++ b/lib/resolve.js @@ -25,6 +25,12 @@ module.exports = function resolve(dirname) { return path.resolve(process.env.APP_ROOT_PATH); } + // Defer to Yarn Plug'n'Play if enabled + if (process.versions.pnp) { + var pnp = require('pnpapi'); + return pnp.getPackageInformation(pnp.topLevel).packageLocation; + } + // Defer to main process in electron renderer if ('undefined' !== typeof window && window.process && 'renderer' === window.process.type) { var electron = 'electron';
feat: Yarn Plug'n'Play support