diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/components/hand-controls.js b/src/components/hand-controls.js index <HASH>..<HASH> 100644 --- a/src/components/hand-controls.js +++ b/src/components/hand-controls.js @@ -27,7 +27,6 @@ var EVENTS = {}; EVENTS[ANIMATIONS.fist] = 'grip'; EVENTS[ANIMATIONS.thumbUp] = 'pistol'; EVENTS[ANIMATIONS.point] = 'pointing'; -EVENTS[ANIMATIONS.thumb] = 'thumb'; /** * Hand controls component that abstracts 6DoF controls: @@ -378,7 +377,7 @@ function getGestureEventName (gesture, active) { if (eventName === 'grip') { return eventName + (active ? 'close' : 'open'); } - if (eventName === 'point' || eventName === 'thumb') { + if (eventName === 'point') { return eventName + (active ? 'up' : 'down'); } if (eventName === 'pointing' || eventName === 'pistol') {
Remove unused reference to thumb events `ANIMATIONS.thumb` did not exist, so "thumb" events would never be triggered
diff --git a/src/libhoney.js b/src/libhoney.js index <HASH>..<HASH> 100644 --- a/src/libhoney.js +++ b/src/libhoney.js @@ -33,10 +33,10 @@ const defaults = Object.freeze({ // the maximum number of pending events we allow in our queue before they get batched pendingWorkCapacity: 10000, - // the maximum number of s we enqueue before we drop. + // the maximum number of events we enqueue before we begin dropping them. maxResponseQueueSize: 1000, - // if this is false, all sending is disabled. useful for disabling libhoney when testing + // if this is set to true, all sending is disabled. useful for disabling libhoney when testing disabled: false });
Tweak Libhoney config comments
diff --git a/src/PdoAdapter.php b/src/PdoAdapter.php index <HASH>..<HASH> 100644 --- a/src/PdoAdapter.php +++ b/src/PdoAdapter.php @@ -370,9 +370,7 @@ class PdoAdapter implements AdapterInterface */ protected function getChunkResource($pathId, $isCompressed) { - $filename = $this->getTempFilename(); - $resource = $this->getTempResource($filename, ''); - + $resource = fopen('php://temp', 'w+b'); $compressFilter = null; if ($isCompressed) { $compressFilter = stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_WRITE);
Fix #3 Use php://temp for file resources When getChunkResource is called for file reads, it now uses the php://temp resource which automatically cleans up. This should mean less temporary files left behind.
diff --git a/lib/generators/hyrax/templates/catalog_controller.rb b/lib/generators/hyrax/templates/catalog_controller.rb index <HASH>..<HASH> 100644 --- a/lib/generators/hyrax/templates/catalog_controller.rb +++ b/lib/generators/hyrax/templates/catalog_controller.rb @@ -21,6 +21,10 @@ class CatalogController < ApplicationController config.view.gallery.partials = [:index_header, :index] config.view.slideshow.partials = [:index] + # Because too many times on Samvera tech people raise a problem regarding a failed query to SOLR. + # Often, it's because they inadvertantly exceeded the character limit of a GET request. + config.http_method :post + ## Default parameters to send to solr for all search-like requests. See also SolrHelper#solr_search_params config.default_solr_params = { qt: "search",
Switching blacklight http_method to :post Because too many times on Samvera tech people raise a problem regarding a failed query to SOLR. Often, it's because they inadvertantly exceeded the character limit of a GET request.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -39,8 +39,8 @@ install_requires = [ 'Flask~=0.0,>=0.12.2', 'IDUtils~=0.0,>=0.2.4', 'dojson~=1.0,>=1.3.1', - 'inspire-schemas~=54.0,>=54.0.0', - 'inspire-utils~=0.0,>=0.1.0', + 'inspire-schemas~=55.0,>=55.0.1', + 'inspire-utils~=1.0,>=1.0.0', 'isbnid_fork~=0.0,>=0.5.2', 'langdetect~=1.0,>=1.0.7', 'pycountry~=17.0,>=17.5.4', diff --git a/tests/test_hep_bd9xx.py b/tests/test_hep_bd9xx.py index <HASH>..<HASH> 100644 --- a/tests/test_hep_bd9xx.py +++ b/tests/test_hep_bd9xx.py @@ -1017,6 +1017,7 @@ def test_references_from_999C50_9_r_u_h_m_o(): assert expected == result['999C5'] +@pytest.mark.xfail(reason='name is normalized incorrectly') def test_reference_from_999C5t_p_y_e_o(): schema = load_schema('hep') subschema = schema['properties']['references']
setup: bump inspire-schemas to version ~<I> Sem-ver: breaks compatibility
diff --git a/salt/states/user.py b/salt/states/user.py index <HASH>..<HASH> 100644 --- a/salt/states/user.py +++ b/salt/states/user.py @@ -270,7 +270,7 @@ def present(name, gid The id of the default group to assign to the user. Either a group name or gid can be used. If not specified, and the user does not exist, then - he next available gid will be assigned. + the next available gid will be assigned. gid_from_name : False If ``True``, the default group id will be set to the id of the group
Porting PR #<I> to <I>
diff --git a/presto-main/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java b/presto-main/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java index <HASH>..<HASH> 100644 --- a/presto-main/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java +++ b/presto-main/src/main/java/com/facebook/presto/sql/planner/planPrinter/PlanPrinter.java @@ -1351,9 +1351,8 @@ public class PlanPrinter return "NULL"; } - Signature coercion = functionRegistry.getCoercion(type, VARCHAR); - try { + Signature coercion = functionRegistry.getCoercion(type, VARCHAR); Slice coerced = (Slice) new FunctionInvoker(functionRegistry).invoke(coercion, session.toConnectorSession(), value); return coerced.toStringUtf8(); }
Fix exception caused by coersion in plan printer PlanPrinter can throw an exception when attempting to convert a constant to a String
diff --git a/library/CM/SmartyPlugins/function.date_period.php b/library/CM/SmartyPlugins/function.date_period.php index <HASH>..<HASH> 100644 --- a/library/CM/SmartyPlugins/function.date_period.php +++ b/library/CM/SmartyPlugins/function.date_period.php @@ -8,8 +8,8 @@ function smarty_function_date_period(array $params, Smarty_Internal_Template $te if (($seconds / (365 * 86400)) >= 1) { $count = floor($seconds / (365 * 86400)); $periodName = 'year'; - } elseif (($seconds / (31 * 86400)) >= 1) { - $count = floor($seconds / (31 * 86400)); + } elseif (($seconds / (30 * 86400)) >= 1) { + $count = floor($seconds / (30 * 86400)); $periodName = 'month'; } elseif (($seconds / (7 * 86400)) >= 1) { $count = floor($seconds / (7 * 86400));
Make a month have <I> days, so it fits all our serviceBundles
diff --git a/app/framework/directives/module.js b/app/framework/directives/module.js index <HASH>..<HASH> 100644 --- a/app/framework/directives/module.js +++ b/app/framework/directives/module.js @@ -2,7 +2,7 @@ var directiveModules = angular.module('onsen.directives', []); // [] -> create n directiveModules.factory('ONSEN_CONSTANTS', function() { var CONSTANTS = { - DIRECTIVE_TEMPLATE_URL: "onsenui/templates" + DIRECTIVE_TEMPLATE_URL: "plugins/onsenui/templates" }; return CONSTANTS;
change template file path prefix with plugins
diff --git a/lib/buildbox/monitor.rb b/lib/buildbox/monitor.rb index <HASH>..<HASH> 100644 --- a/lib/buildbox/monitor.rb +++ b/lib/buildbox/monitor.rb @@ -20,11 +20,8 @@ module Buildbox if build.started? || build.finished? new_build = @api.update_build(build) - p new_build.state - # Try and cancel the build if we haven't tried already if new_build.state == 'canceled' && !@build.cancelling? - p 'going tot ry and cancel' Buildbox::Canceler.cancel(@build) end end @@ -32,7 +29,7 @@ module Buildbox if build.finished? break else - sleep 3 # 3 seconds seems reasonable for now + sleep 2 # 2 seconds seems reasonable for now end end end
Removed some debugging code from the monitor.
diff --git a/cmd/pivnet/commands/pivnet.go b/cmd/pivnet/commands/pivnet.go index <HASH>..<HASH> 100644 --- a/cmd/pivnet/commands/pivnet.go +++ b/cmd/pivnet/commands/pivnet.go @@ -14,7 +14,7 @@ const ( printAsJSON = "json" printAsYAML = "yaml" - host = "https://network.pivotal.io" + defaultHost = "https://network.pivotal.io" ) type PivnetCommand struct { @@ -51,7 +51,7 @@ func init() { } if Pivnet.Host == "" { - Pivnet.Host = host + Pivnet.Host = defaultHost } } diff --git a/cmd/pivnet/main.go b/cmd/pivnet/main.go index <HASH>..<HASH> 100644 --- a/cmd/pivnet/main.go +++ b/cmd/pivnet/main.go @@ -8,9 +8,16 @@ import ( "github.com/pivotal-cf-experimental/go-pivnet/cmd/pivnet/version" ) +var ( + // buildVersion is deliberately left uninitialized so it can be set at compile-time + buildVersion string +) + func main() { - if version.Version == "" { + if buildVersion == "" { version.Version = "dev" + } else { + version.Version = buildVersion } parser := flags.NewParser(&commands.Pivnet, flags.HelpFlag)
Inject version into cli correctly. [#<I>]
diff --git a/repo/config/init.go b/repo/config/init.go index <HASH>..<HASH> 100644 --- a/repo/config/init.go +++ b/repo/config/init.go @@ -35,7 +35,8 @@ func Init(out io.Writer, nBitsForKeypair int) (*Config, error) { "/ip4/0.0.0.0/tcp/4001", // "/ip4/0.0.0.0/udp/4002/utp", // disabled for now. }, - API: "/ip4/127.0.0.1/tcp/5001", + API: "/ip4/127.0.0.1/tcp/5001", + Gateway: "/ip4/127.0.0.1/tcp/8080", }, Bootstrap: BootstrapPeerStrings(bootstrapPeers),
repo/config: Added default gateway address to initial config
diff --git a/redis/client.py b/redis/client.py index <HASH>..<HASH> 100644 --- a/redis/client.py +++ b/redis/client.py @@ -65,7 +65,10 @@ def parse_info(response): if line and not line.startswith('#'): key, value = line.split(':') try: - info[key] = float(value) if '.' in value else int(value) + if '.' in value: + info[key] = float(value) + else: + info[key] = int(value) except ValueError: info[key] = get_value(value) return info
Remove ternary operator to support Python <I>
diff --git a/devices/tuya.js b/devices/tuya.js index <HASH>..<HASH> 100644 --- a/devices/tuya.js +++ b/devices/tuya.js @@ -331,6 +331,7 @@ module.exports = [ {modelID: 'TS0601', manufacturerName: '_TZE200_dfxkcots'}, {modelID: 'TS0601', manufacturerName: '_TZE200_ojzhk75b'}, {modelID: 'TS0601', manufacturerName: '_TZE200_swaamsoy'}, + {modelID: 'TS0601', manufacturerName: '_TZE200_3p5ydos3'}, ], model: 'TS0601_dimmer', vendor: 'TuYa',
Add _TZE<I>_3p5ydos3 to TS<I>_dimmer (#<I>)
diff --git a/api/src/main/java/org/hobsoft/microbrowser/MicrodataProperty.java b/api/src/main/java/org/hobsoft/microbrowser/MicrodataProperty.java index <HASH>..<HASH> 100644 --- a/api/src/main/java/org/hobsoft/microbrowser/MicrodataProperty.java +++ b/api/src/main/java/org/hobsoft/microbrowser/MicrodataProperty.java @@ -67,5 +67,16 @@ public interface MicrodataProperty */ double getDoubleValue(); + /** + * Gets this item property as the specified type to allow access to the provider-specific API. + * + * @param <T> + * the type of the provider-specific API + * @param type + * the type of the provider-specific API required + * @return an instance of the provider-specific API + * @throws IllegalArgumentException + * if the provider does not support the specific type + */ <T> T unwrap(Class<T> type); }
Issue #6: Added Javadoc for MicrodataProperty.unwrap
diff --git a/redis_collections/sortedsets.py b/redis_collections/sortedsets.py index <HASH>..<HASH> 100644 --- a/redis_collections/sortedsets.py +++ b/redis_collections/sortedsets.py @@ -444,12 +444,9 @@ class GeoDB(SortedSetBase): """ pickled_place_1 = self._pickle(place_1) pickled_place_2 = self._pickle(place_2) - try: - return self.redis.geodist( - self.key, pickled_place_1, pickled_place_2, unit=unit - ) - except TypeError: - return None + return self.redis.geodist( + self.key, pickled_place_1, pickled_place_2, unit=unit + ) def get_hash(self, place): """ @@ -458,10 +455,7 @@ class GeoDB(SortedSetBase): instead. """ pickled_place = self._pickle(place) - try: - return self.redis.geohash(self.key, pickled_place)[0] - except (AttributeError, TypeError): - return None + return self.redis.geohash(self.key, pickled_place)[0] def get_location(self, place): """
Rely on redis <I>
diff --git a/src/humanize/filesize.py b/src/humanize/filesize.py index <HASH>..<HASH> 100644 --- a/src/humanize/filesize.py +++ b/src/humanize/filesize.py @@ -23,6 +23,9 @@ def naturalsize(value, binary=False, gnu=False, format="%.1f"): gnu (bool): If `True`, the binary argument is ignored and GNU-style (`ls -sh` style) prefixes are used (K, M) with the 2**10 definition. format (str): Custom formatter. + + Returns: + str: Human readable representation of a filesize. """ if gnu: suffix = suffixes["gnu"] diff --git a/src/humanize/i18n.py b/src/humanize/i18n.py index <HASH>..<HASH> 100644 --- a/src/humanize/i18n.py +++ b/src/humanize/i18n.py @@ -36,6 +36,9 @@ def activate(locale, path=None): Returns: dict: Translations. + + Raises: + Exception: If humanize cannot find the locale folder. """ if path is None: path = _get_default_locale_path()
Add some missing returns/raises
diff --git a/_config.php b/_config.php index <HASH>..<HASH> 100644 --- a/_config.php +++ b/_config.php @@ -9,8 +9,6 @@ * and if absolutely necessary if you can't use the yml file, mysite/_config.php instead. */ -use CWP\Core\Extension\CwpControllerExtension; -use SilverStripe\Core\Config\Config; use SilverStripe\Core\Environment; use SilverStripe\HybridSessions\HybridSession; use SilverStripe\i18n\i18n; @@ -29,8 +27,8 @@ if (!Environment::getEnv('WKHTMLTOPDF_BINARY')) { // Configure password strength requirements $pwdValidator = new PasswordValidator(); -$pwdValidator->characterStrength(3, ["lowercase", "uppercase", "digits", "punctuation"]); - +$pwdValidator->setMinTestScore(3); +$pwdValidator->setTestNames(["lowercase", "uppercase", "digits", "punctuation"]); Member::set_password_validator($pwdValidator); // Automatically configure session key for activedr with hybridsessions module
MINOR Remove deprecated use of characterStrength and remove unused imports
diff --git a/shims.php b/shims.php index <HASH>..<HASH> 100644 --- a/shims.php +++ b/shims.php @@ -3,7 +3,7 @@ namespace { // PHPUnit 6 compat - if (class_exists('PHPUnit\Framework\TestCase')) { + if ( class_exists( 'PHPUnit\Runner\Version' ) && version_compare( PHPUnit\Runner\Version::id(), '6.0', '>=' ) ) { $aliases = [ 'PHPUnit\Framework\Test' => 'PHPUnit_Framework_Test', 'PHPUnit\Framework\TestSuite' => 'PHPUnit_Framework_TestSuite',
use the runner version to load shims
diff --git a/lib/Constants.js b/lib/Constants.js index <HASH>..<HASH> 100644 --- a/lib/Constants.js +++ b/lib/Constants.js @@ -88,10 +88,11 @@ module.exports = { changeNickname: 1 << 26, manageNicknames: 1 << 27, manageRoles: 1 << 28, - all: 0b11111111101111111110000111111, - allGuild: 0b11100000000000000000000111111, - allText: 0b10000000001111111110000010001, - allVoice: 0b10011111100000000000000010001 + manageEmojis: 1 << 30, + all: 0b1111111111101111111110000111111, + allGuild: 0b1111100000000000000000000111111, + allText: 0b0010000000001111111110000010001, + allVoice: 0b0010011111100000000000000010001 }, VoiceOPCodes: { IDENTIFY: 0,
Add manageEmojis permission constant Bonus question: what's this hidden 1 << <I>?
diff --git a/openquake/calculators/classical.py b/openquake/calculators/classical.py index <HASH>..<HASH> 100644 --- a/openquake/calculators/classical.py +++ b/openquake/calculators/classical.py @@ -190,9 +190,12 @@ def preclassical(srcs, srcfilter, params, monitor): # this can be slow for src in srcs: t0 = time.time() - src.nsites = len(srcfilter.close_sids(src)) + if srcfilter.sitecol: + src.nsites = len(srcfilter.close_sids(src)) + else: + src.nsites = 1 # don't discard # NB: it is crucial to split only the close sources, for - # performance reasons (think of Ecuador in SAM) + # performance reasons (think of Ecuador in SAM)q splits = split_source(src) if ( params['split_sources'] and src.nsites) else [src] sources.extend(splits)
Small fix of preclassical for missing sitecol
diff --git a/test/e2e/nvidia-gpus.go b/test/e2e/nvidia-gpus.go index <HASH>..<HASH> 100644 --- a/test/e2e/nvidia-gpus.go +++ b/test/e2e/nvidia-gpus.go @@ -163,8 +163,17 @@ func dsFromManifest(url string) *extensions.DaemonSet { var controller extensions.DaemonSet framework.Logf("Parsing ds from %v", url) - response, err := http.Get(url) + var response *http.Response + var err error + for i := 1; i <= 5; i++ { + response, err = http.Get(url) + if err == nil && response.StatusCode == 200 { + break + } + time.Sleep(time.Duration(i) * time.Second) + } Expect(err).NotTo(HaveOccurred()) + Expect(response.StatusCode).To(Equal(200)) defer response.Body.Close() data, err := ioutil.ReadAll(response.Body)
Retry downloading the daemonset installer few times to avoid spurious network issues.
diff --git a/sub_peers.js b/sub_peers.js index <HASH>..<HASH> 100644 --- a/sub_peers.js +++ b/sub_peers.js @@ -88,6 +88,13 @@ TChannelSubPeers.prototype.add = function add(hostPort, options) { peer = topChannel.peers.add(hostPort, options); peer.setPreferConnectionDirection(self.preferConnectionDirection); + if (peer.countConnections('out') > 0) { + this.currentConnectedPeers++; + } + + peer.incrementOutConnectionEvent.on(self.boundOnOutConnectionIncrement); + peer.decrementOutConnectionEvent.on(self.boundOnOutConnectionDecrement); + self._map[hostPort] = peer; self._keys.push(hostPort); @@ -113,6 +120,15 @@ TChannelSubPeers.prototype._delete = function _del(peer) { return; } + if (peer.countConnections('out') > 0) { + this.currentConnectedPeers--; + } + + peer.incrementOutConnectionEvent + .removeListener(self.boundOnOutConnectionIncrement); + peer.decrementOutConnectionEvent + .removeListener(self.boundOnOutConnectionDecrement); + delete self._map[peer.hostPort]; popout(self._keys, index);
sub_peers: hook up event listeners
diff --git a/uDMX.py b/uDMX.py index <HASH>..<HASH> 100644 --- a/uDMX.py +++ b/uDMX.py @@ -250,6 +250,7 @@ def send_dmx_message(message_tokens): # Open the uDMX USB device dev = pyuDMX.uDMXDevice() if not dev.open(): + print "Unable to find and open uDMX interface" return False # Translate the tokens into integers.
Show error message when no uDMX is found
diff --git a/examples/seq2seq/finetune_trainer.py b/examples/seq2seq/finetune_trainer.py index <HASH>..<HASH> 100755 --- a/examples/seq2seq/finetune_trainer.py +++ b/examples/seq2seq/finetune_trainer.py @@ -175,11 +175,11 @@ def main(): bool(training_args.parallel_mode == ParallelMode.DISTRIBUTED), training_args.fp16, ) + transformers.utils.logging.enable_default_handler() + transformers.utils.logging.enable_explicit_format() # Set the verbosity to info of the Transformers logger (on main process only): if is_main_process(training_args.local_rank): transformers.utils.logging.set_verbosity_info() - transformers.utils.logging.enable_default_handler() - transformers.utils.logging.enable_explicit_format() logger.info("Training/evaluation parameters %s", training_args) # Set seed
fix logger format for non-main process (#<I>)
diff --git a/test/minimal_app_test.rb b/test/minimal_app_test.rb index <HASH>..<HASH> 100644 --- a/test/minimal_app_test.rb +++ b/test/minimal_app_test.rb @@ -26,7 +26,7 @@ if RubotoTest::RUBOTO_PLATFORM == 'STANDALONE' '1.6.8' => 3.5, '1.7.0.preview1' => 4.6, '1.7.0.preview2' => ANDROID_TARGET < 15 ? 4.7 : 4.9, - '1.7.0.rc1' => ANDROID_TARGET < 15 ? 4.7 : 4.9, + '1.7.0.rc1' => ANDROID_TARGET < 15 ? 4.7 : 5.3, }[JRUBY_JARS_VERSION.to_s] || 3.2 lower_limit = upper_limit * 0.9 version_message ="JRuby: #{JRUBY_JARS_VERSION}, ANDROID_TARGET: #{ANDROID_TARGET}"
* Adjust minimal app side to new JRuby
diff --git a/src/app/Traits/UpdatedBy.php b/src/app/Traits/UpdatedBy.php index <HASH>..<HASH> 100644 --- a/src/app/Traits/UpdatedBy.php +++ b/src/app/Traits/UpdatedBy.php @@ -6,6 +6,10 @@ trait UpdatedBy { protected static function bootUpdatedBy() { + self::creating(function ($model) { + $model->updated_by = optional(auth()->user())->id; + }); + self::updating(function ($model) { $model->updated_by = optional(auth()->user())->id; });
updates updatedBy to fit Laravel style
diff --git a/demo/src/index.js b/demo/src/index.js index <HASH>..<HASH> 100644 --- a/demo/src/index.js +++ b/demo/src/index.js @@ -8,7 +8,7 @@ import { } from "three"; import { DemoManager } from "three-demo"; -import { EffectComposer } from "../../src"; +import { EffectComposer, OverrideMaterialManager } from "../../src"; import { AntialiasingDemo } from "./demos/AntialiasingDemo.js"; import { BloomDemo } from "./demos/BloomDemo.js"; @@ -217,6 +217,9 @@ window.addEventListener("load", (event) => { renderer.shadowMap.needsUpdate = true; renderer.shadowMap.enabled = true; + // Enable the override material workaround. + OverrideMaterialManager.workaroundEnabled = true; + // Create the effect composer. composer = new EffectComposer(renderer, { frameBufferType: HalfFloatType
Enable override material workaround
diff --git a/lib/tomlrb.rb b/lib/tomlrb.rb index <HASH>..<HASH> 100644 --- a/lib/tomlrb.rb +++ b/lib/tomlrb.rb @@ -1,6 +1,9 @@ require 'time' require 'stringio' require "tomlrb/version" +require 'tomlrb/local_date_time' +require 'tomlrb/local_date' +require 'tomlrb/local_time' require 'tomlrb/string_utils' require "tomlrb/scanner" require "tomlrb/parser"
Load LocalDateTime and so on
diff --git a/src/Zerg/DataSet.php b/src/Zerg/DataSet.php index <HASH>..<HASH> 100644 --- a/src/Zerg/DataSet.php +++ b/src/Zerg/DataSet.php @@ -48,13 +48,13 @@ class DataSet implements \ArrayAccess, \Iterator */ public function setData(array $data) { - $this->data = (array) $data; + $this->data = $data; } /** * Move into a level. * - * @param string $level The level to move into. + * @param string|int $level The level to move into. */ public function push($level) { @@ -72,8 +72,8 @@ class DataSet implements \ArrayAccess, \Iterator /** * Set a value in the current level. * - * @param string $name The name of the value to add. - * @param string $value The value to add. + * @param string|int $name The name of the value to add. + * @param mixed $value The value to add. */ public function setValue($name, $value) { @@ -94,7 +94,7 @@ class DataSet implements \ArrayAccess, \Iterator /** * Get a value by name from the current level. * - * @param string $name The name of the value to retrieve. + * @param string|int $name The name of the value to retrieve. * @return mixed The found value. Returns null if the value cannot be found. */ public function getValue($name)
fix docs and remove unnecessary casting
diff --git a/event.go b/event.go index <HASH>..<HASH> 100644 --- a/event.go +++ b/event.go @@ -151,7 +151,7 @@ func NewEntry(id EventID, e Event) Entry { return Entry{ EventID: id, Schema: e.Schema(), - Time: time.Now(), + Time: time.Now().In(time.UTC), Host: host, Deploy: deploy, PID: pid, diff --git a/event_test.go b/event_test.go index <HASH>..<HASH> 100644 --- a/event_test.go +++ b/event_test.go @@ -198,6 +198,10 @@ func TestNewEntry(t *testing.T) { t.Errorf("Unexpectedly old timestamp: %v", e.Time) } + if e.Time.Location() != time.UTC { + t.Errorf("Unexpectedly non-UTC timestamp: %v", e.Time) + } + if e.Host == "" { t.Errorf("Blank hostname for meta data") }
Always use UTC for timestamps.
diff --git a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableListener.java b/draggablepanel/src/main/java/com/github/pedrovgs/DraggableListener.java index <HASH>..<HASH> 100644 --- a/draggablepanel/src/main/java/com/github/pedrovgs/DraggableListener.java +++ b/draggablepanel/src/main/java/com/github/pedrovgs/DraggableListener.java @@ -20,12 +20,12 @@ package com.github.pedrovgs; */ public interface DraggableListener { - public void onMaximized(); + void onMaximized(); - public void onMinimized(); + void onMinimized(); - public void onClosedToLeft(); + void onClosedToLeft(); - public void onClosedToRight(); + void onClosedToRight(); }
Remove public modifier from DraggableListener interface
diff --git a/nunaliit2-js/src/main/js/nunaliit2/n2.mapAndControls.js b/nunaliit2-js/src/main/js/nunaliit2/n2.mapAndControls.js index <HASH>..<HASH> 100644 --- a/nunaliit2-js/src/main/js/nunaliit2/n2.mapAndControls.js +++ b/nunaliit2-js/src/main/js/nunaliit2/n2.mapAndControls.js @@ -4808,7 +4808,15 @@ var MapAndControls = $n2.Class({ * This is called when the map has moved. */ _mapMoved: function(){ + var _this = this; + + if( this.mapWasMoved ) return; + this.mapWasMoved = true; + setTimeout(function(){ + _this.mapWasMoved = false; + _this._refreshSimplifiedGeometries(); + },200); }, /*
nunaliit2-js: In map and controls, refresh simplified geometries when map is moved. Issue #<I>
diff --git a/alerta/app/auth.py b/alerta/app/auth.py index <HASH>..<HASH> 100644 --- a/alerta/app/auth.py +++ b/alerta/app/auth.py @@ -121,7 +121,10 @@ def google(): r = requests.get(people_api_url, headers=headers) profile = json.loads(r.text) - token = create_token(profile['sub'], profile['name'], profile['email'], provider='google') + try: + token = create_token(profile['sub'], profile['name'], profile['email'], provider='google') + except KeyError: + return jsonify(status="error", message="Google+ API is not enabled for this Client ID") return jsonify(token=token)
catch exception when Google+ API is not enabled
diff --git a/indra/explanation/paths_graph.py b/indra/explanation/paths_graph.py index <HASH>..<HASH> 100644 --- a/indra/explanation/paths_graph.py +++ b/indra/explanation/paths_graph.py @@ -288,8 +288,7 @@ def sample_single_path(pg, source, target, signed=False, target_polarity=0, out_edges = pg.out_edges(current_node, data=True) else: out_edges = pg.out_edges(current_node) - if sys.version_info.major == 3: - out_edges = sorted(out_edges) + out_edges.sort() if out_edges: if weighted: weights = [t[2]['weight'] for t in out_edges]
Change to useing .sort() to accomodate py2.
diff --git a/web2/htdocs/js/lib.js b/web2/htdocs/js/lib.js index <HASH>..<HASH> 100644 --- a/web2/htdocs/js/lib.js +++ b/web2/htdocs/js/lib.js @@ -290,6 +290,16 @@ })(); // }}} + /*************************************************** + website() - Return the base URL of this SHIELD, per document.location + ***************************************************/ + exported.website = function () { // {{{ + return document.location.toString().replace(/#.*/, '').replace(/\/$/, ''); + } + // }}} + + + /*************************************************** $(...).serializeObject()
Put website() function back into js code authentication provider configuration could not be shown in the UI because this function was missing. It's back now.
diff --git a/keanu-python/tests/test_net.py b/keanu-python/tests/test_net.py index <HASH>..<HASH> 100644 --- a/keanu-python/tests/test_net.py +++ b/keanu-python/tests/test_net.py @@ -24,7 +24,7 @@ def test_construct_bayes_net() -> None: ("get_observed_vertices", False, True, True, True), ("get_continuous_latent_vertices", True, False, True, False), ("get_discrete_latent_vertices", True, False, False, True)]) -def test_can_get_vertices_from_bayes_net(get_method, latent, observed, continuous, discrete) -> None: +def test_can_get_vertices_from_bayes_net(get_method: str, latent: bool, observed: bool, continuous: bool, discrete: bool) -> None: gamma = Gamma(1., 1.) gamma.observe(0.5)
annotate a test in test_net which I missed
diff --git a/scripts/search-job-messages.py b/scripts/search-job-messages.py index <HASH>..<HASH> 100644 --- a/scripts/search-job-messages.py +++ b/scripts/search-job-messages.py @@ -1,7 +1,7 @@ # Submits search job, waits for completion, then prints and emails _messages_ # (as opposed to records). Pass the query via stdin. # -# cat query.sumoql | python search-job.py <accessId> <accessKey> \ +# cat query.sumoql | python search-job-messages.py <accessId> <accessKey> \ # <fromDate> <toDate> <timeZone> # # Note: fromDate and toDate must be either ISO 8601 date-times or epoch @@ -9,7 +9,7 @@ # # Example: # -# cat query.sumoql | python search-job.py <accessId> <accessKey> \ +# cat query.sumoql | python search-job-messages.py <accessId> <accessKey> \ # 1408643380441 1408649380441 PST import json
renamed file in example search-job.py -> search-job-messages.py
diff --git a/huey/bin/huey_consumer.py b/huey/bin/huey_consumer.py index <HASH>..<HASH> 100755 --- a/huey/bin/huey_consumer.py +++ b/huey/bin/huey_consumer.py @@ -91,7 +91,7 @@ def load_huey(path): raise -if __name__ == '__main__': +def consumer_main(): parser = get_option_parser() options, args = parser.parse_args() @@ -115,3 +115,7 @@ if __name__ == '__main__': options.scheduler_interval, options.periodic_task_interval) consumer.run() + + +if __name__ == '__main__': + consumer_main() diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -24,5 +24,9 @@ setup( 'Framework :: Django', ], test_suite='runtests.runtests', - scripts = ['huey/bin/huey_consumer.py'], + entry_points={ + 'console_scripts': [ + 'huey_consumer = huey.bin.huey_consumer:consumer_main' + ] + } )
Change how heuy_consumer is started This fixes #<I> The logic behind this is that other programs that would like to reuse huey can now do: from huey.bin.huey_consumer import consumer_main and thus include consumer main as a sub command. Also, setuptools takes care of properly instaling scripts in windows and virtual environments.
diff --git a/pyrogram/client/methods/messages/send_dice.py b/pyrogram/client/methods/messages/send_dice.py index <HASH>..<HASH> 100644 --- a/pyrogram/client/methods/messages/send_dice.py +++ b/pyrogram/client/methods/messages/send_dice.py @@ -38,7 +38,7 @@ class SendDice(BaseClient): "pyrogram.ForceReply" ] = None ) -> Union["pyrogram.Message", None]: - """Send a dice. + """Send a dice with a random value from 1 to 6. Parameters: chat_id (``int`` | ``str``): @@ -47,8 +47,8 @@ class SendDice(BaseClient): For a contact that exists in your Telegram address book you can use his phone number (str). emoji (``str``, *optional*): - Emoji on which the dice throw animation is based. Currently, must be one of "🎲" or "🎯". - Defauts to "🎲". + Emoji on which the dice throw animation is based. Currently, must be one of "🎲", "🎯" or "🏀". + Defaults to "🎲". disable_notification (``bool``, *optional*): Sends the message silently. @@ -75,6 +75,9 @@ class SendDice(BaseClient): # Send a dart app.send_dice("pyrogramlounge", "🎯") + + # Send a basketball + app.send_dice("pyrogramlounge", "🏀") """ r = self.send(
Update send_dice: add basketball "dice"
diff --git a/geopackage-sdk/src/main/java/mil/nga/geopackage/user/UserCursor.java b/geopackage-sdk/src/main/java/mil/nga/geopackage/user/UserCursor.java index <HASH>..<HASH> 100644 --- a/geopackage-sdk/src/main/java/mil/nga/geopackage/user/UserCursor.java +++ b/geopackage-sdk/src/main/java/mil/nga/geopackage/user/UserCursor.java @@ -233,6 +233,9 @@ public abstract class UserCursor<TColumn extends UserColumn, TTable extends User // If requery has not been performed, a requery dao has been set, and there are invalid positions if (invalidCursor == null && dao != null && hasInvalidPositions()) { + // Close the original cursor when performing an invalid cursor query + super.close(); + // Set the blob columns to return as null List<TColumn> blobColumns = dao.getTable().columnsOfType(GeoPackageDataType.BLOB); String[] columnsAs = dao.buildColumnsAsNull(blobColumns);
close the user cursor when performing the invalid rows cursor query
diff --git a/activesupport/lib/active_support/file_evented_update_checker.rb b/activesupport/lib/active_support/file_evented_update_checker.rb index <HASH>..<HASH> 100644 --- a/activesupport/lib/active_support/file_evented_update_checker.rb +++ b/activesupport/lib/active_support/file_evented_update_checker.rb @@ -1,6 +1,8 @@ require 'listen' require 'set' require 'pathname' +require 'thread' +require 'concurrent/atomic/atomic_boolean' module ActiveSupport class FileEventedUpdateChecker #:nodoc: all @@ -14,22 +16,24 @@ module ActiveSupport end @block = block - @updated = false + @updated = Concurrent::AtomicBoolean.new(false) @lcsp = @ph.longest_common_subpath(@dirs.keys) if (dtw = directories_to_watch).any? Listen.to(*dtw, &method(:changed)).start end + + @mutex = Mutex.new end def updated? - @updated + @updated.true? end def execute @block.call ensure - @updated = false + @updated.make_false end def execute_if_updated @@ -42,8 +46,10 @@ module ActiveSupport private def changed(modified, added, removed) - unless updated? - @updated = (modified + added + removed).any? { |f| watching?(f) } + @mutex.synchronize do + unless updated? + @updated.value = (modified + added + removed).any? { |f| watching?(f) } + end end end
make the @updated flag atomic in the evented monitor listen is calling us from its own thread, we need to synchronize reads and writes to this flag.
diff --git a/examples/arrays.js b/examples/arrays.js index <HASH>..<HASH> 100644 --- a/examples/arrays.js +++ b/examples/arrays.js @@ -21,9 +21,9 @@ console.log($.nullArray(10)); console.log($.range(5)); -/* creating a pre-initialized array with values ranging from x to y) +/* creating a pre-initialized array with values ranging from x to y) */ -console.log($.range(2.7)); +console.log($.range(2,7)); /* finding only the even numbers in an array */
Update example writing mistake & forgotten comments
diff --git a/salt/modules/saltcheck.py b/salt/modules/saltcheck.py index <HASH>..<HASH> 100644 --- a/salt/modules/saltcheck.py +++ b/salt/modules/saltcheck.py @@ -52,7 +52,7 @@ import os import time import yaml try: - # import salt.utils + import salt.utils import salt.client import salt.exceptions except ImportError:
uncommented salt.utils import
diff --git a/saunter/testcase/webdriver.py b/saunter/testcase/webdriver.py index <HASH>..<HASH> 100644 --- a/saunter/testcase/webdriver.py +++ b/saunter/testcase/webdriver.py @@ -69,6 +69,7 @@ class SaunterTestCase(BaseTestCase): """ self.verificationErrors = [] self.cf = saunter.ConfigWrapper.ConfigWrapper().config + self.config = self.cf if self.cf.getboolean("SauceLabs", "ondemand"): desired_capabilities = { "platform": self.cf.get("SauceLabs", "os"),
no idea why i used .cf rather than .config as that is what i always try to type
diff --git a/lib/travis/notification/publisher/redis.rb b/lib/travis/notification/publisher/redis.rb index <HASH>..<HASH> 100644 --- a/lib/travis/notification/publisher/redis.rb +++ b/lib/travis/notification/publisher/redis.rb @@ -15,7 +15,8 @@ module Travis def publish(event) payload = MultiJson.encode(event) - list = 'events:' << event[:uuid] + # list = 'events:' << event[:uuid] + lit = 'events' redis.publish list, payload
publish instrumentation events to redis "events" for now, got issues with pattern matching?
diff --git a/code/GridFieldOrderableRows.php b/code/GridFieldOrderableRows.php index <HASH>..<HASH> 100755 --- a/code/GridFieldOrderableRows.php +++ b/code/GridFieldOrderableRows.php @@ -45,6 +45,7 @@ class GridFieldOrderableRows extends RequestHandler implements * @param string $sortField */ public function __construct($sortField = 'Sort') { + parent::__construct(); $this->sortField = $sortField; } @@ -351,6 +352,8 @@ class GridFieldOrderableRows extends RequestHandler implements )); } } + + $this->extend('onAfterReorderItems', $list); } protected function populateSortValues(DataList $list) {
Add extension hook after re-ordering items
diff --git a/django_countries/fields.py b/django_countries/fields.py index <HASH>..<HASH> 100644 --- a/django_countries/fields.py +++ b/django_countries/fields.py @@ -103,6 +103,8 @@ class Country(object): flag_url = settings.COUNTRIES_FLAG_URL url = flag_url.format( code_upper=self.code, code=self.code.lower()) + if not url: + return '' url = urlparse.urljoin(settings.STATIC_URL, url) return self.maybe_escape(url) diff --git a/django_countries/tests/test_fields.py b/django_countries/tests/test_fields.py index <HASH>..<HASH> 100644 --- a/django_countries/tests/test_fields.py +++ b/django_countries/tests/test_fields.py @@ -8,7 +8,7 @@ from django.utils import translation from django.utils.encoding import force_text try: from unittest import skipIf -except: +except ImportError: from django.utils.unittest import skipIf from django_countries import fields, countries @@ -216,6 +216,10 @@ class TestCountryObject(TestCase): country = fields.Country(code='XX') self.assertEqual(country.numeric_padded, None) + def test_empty_flag_url(self): + country = fields.Country(code='XX', flag_url='') + self.assertEqual(country.flag, '') + class TestModelForm(TestCase):
If empty flag_url is given to a Country object, flag should be blank
diff --git a/test_howdoi.py b/test_howdoi.py index <HASH>..<HASH> 100644 --- a/test_howdoi.py +++ b/test_howdoi.py @@ -54,8 +54,7 @@ class HowdoiTestCase(unittest.TestCase): first_answer = self.call_howdoi(query) second_answer = self.call_howdoi(query + ' -a') self.assertNotEqual(first_answer, second_answer) - self.assertIn("Answer from http://stackoverflow.com", - second_answer) + self.assertTrue("Answer from http://stackoverflow.com" in second_answer) def test_multiple_answers(self): query = self.queries[0]
Fix for test in Python <I>
diff --git a/examples/as_example1.js b/examples/as_example1.js index <HASH>..<HASH> 100644 --- a/examples/as_example1.js +++ b/examples/as_example1.js @@ -44,11 +44,11 @@ function echo(context, req, head, body, callback) { server.listen(4040, '127.0.0.1', onListening); function onListening() { - client = client.makeSubChannel({ + var clientChan = client.makeSubChannel({ serviceName: 'server', peers: [server.hostPort] }); - tchannelJSON.send(client.request({ + tchannelJSON.send(clientChan.request({ headers: { cn: 'client' },
Trivial rename in examples
diff --git a/lib/bandcamp/methodical.rb b/lib/bandcamp/methodical.rb index <HASH>..<HASH> 100644 --- a/lib/bandcamp/methodical.rb +++ b/lib/bandcamp/methodical.rb @@ -1,13 +1,15 @@ -module Methodical +module BandCamp + module Methodical - def to_methods hash - eigenclass = class << self; self; end - hash.each_pair do |key, val| - eigenclass.instance_eval { attr_reader key.to_sym } - instance_variable_set("@#{key}".to_sym, val) + def to_methods hash + eigenclass = class << self; self; end + hash.each_pair do |key, val| + eigenclass.instance_eval { attr_reader key.to_sym } + instance_variable_set("@#{key}".to_sym, val) + end end - end - private :to_methods + private :to_methods + end end
Moved mixin into the BandCamp namespace.
diff --git a/khard/address_book.py b/khard/address_book.py index <HASH>..<HASH> 100644 --- a/khard/address_book.py +++ b/khard/address_book.py @@ -67,13 +67,7 @@ class AddressBook(metaclass=abc.ABCMeta): :returns: the length of the shortes unequal initial substrings :rtype: int """ - sum = 0 - for char1, char2 in zip(uid1, uid2): - if char1 == char2: - sum += 1 - else: - break - return sum + return len(os.path.commonprefix((uid1, uid2))) def _search_all(self, query): """Search in all fields for contacts matching query.
Use stdlib to compare uids The os.path library provides a function to compare prefixes that can be used instead of the custom code.
diff --git a/lib/endpoint/overrides/deprecations.js b/lib/endpoint/overrides/deprecations.js index <HASH>..<HASH> 100644 --- a/lib/endpoint/overrides/deprecations.js +++ b/lib/endpoint/overrides/deprecations.js @@ -17,7 +17,7 @@ function deprecations (endpoints) { if (searchIssuesAndPullRequests) { const deprecated = Object.assign({}, searchIssuesAndPullRequests) deprecated.name = 'Search issues' - deprecated.idName = 'search' + deprecated.idName = 'issues' deprecated.deprecated = { date: '2018-12-27', message: '"Search issues" has been renamed to "Search issues and pull requests"',
build: idName search-issues -> issues (again :)
diff --git a/sunevents-node.js b/sunevents-node.js index <HASH>..<HASH> 100644 --- a/sunevents-node.js +++ b/sunevents-node.js @@ -44,7 +44,7 @@ module.exports = function(RED) { node.events.on("sunevent", function(event, date) { var msg = {}; msg.topic = event; - msg.payload = {event: event, date: date}; + msg.payload = date; node.log(util.format("Injecting event %s for %s", event, date)); // send out the message to the rest of the workspace.
Changed payload to be a String containing the date time stamp of the sun event.
diff --git a/lib/nat/service.go b/lib/nat/service.go index <HASH>..<HASH> 100644 --- a/lib/nat/service.go +++ b/lib/nat/service.go @@ -85,7 +85,10 @@ func (s *Service) serve(ctx context.Context) { case <-timer.C: case <-s.processScheduled: if !timer.Stop() { - <-timer.C + select { + case <-timer.C: + default: + } } case <-ctx.Done(): timer.Stop()
lib/nat: Don't hang on draining timer chan (fixes #<I>) (#<I>)
diff --git a/lib/wlang/dialect/dispatching.rb b/lib/wlang/dialect/dispatching.rb index <HASH>..<HASH> 100644 --- a/lib/wlang/dialect/dispatching.rb +++ b/lib/wlang/dialect/dispatching.rb @@ -46,7 +46,8 @@ module WLang define_method(methname) do |buf, fns| args, rest = normalize_tag_fns(fns, arity) buf << code.bind(self).call(*args) - flush_trailing_fns(buf, rest) + flush_trailing_fns(buf, rest) unless rest.empty? + buf end dispatching_map[symbols] = ['', methname] else
Avoid unnecessary call to flush_trailing_fns
diff --git a/theanets/graph.py b/theanets/graph.py index <HASH>..<HASH> 100644 --- a/theanets/graph.py +++ b/theanets/graph.py @@ -366,8 +366,8 @@ class Network(object): def add(s): h.update(str(s).encode('utf-8')) h = hashlib.md5() - # Use ordereddict to avoid creating different graphs with the save kwargs but different orders. - # See discussion at https://groups.google.com/forum/#!topic/theanets/nL6Nis29B7Q + # See discussions + # https://groups.google.com/forum/#!topic/theanets/nL6Nis29B7Q add(sorted(kwargs.items(), key=lambda x: x[0])) for l in self.layers: add('{}{}{}'.format(l.__class__.__name__, l.name, l.size))
shorten line length to pass the test
diff --git a/riak/client/__init__.py b/riak/client/__init__.py index <HASH>..<HASH> 100644 --- a/riak/client/__init__.py +++ b/riak/client/__init__.py @@ -38,6 +38,14 @@ from riak.util import deprecateQuorumAccessors from riak.util import lazy_property +def default_encoder(obj): + """ + Default encoder for JSON datatypes, which returns UTF-8 encoded + json instead of the default bloated \uXXXX escaped ASCII strings. + """ + return json.dumps(obj, ensure_ascii=False).encode("utf-8") + + @deprecateQuorumAccessors class RiakClient(RiakMapReduceChain, RiakClientOperations): """ @@ -91,8 +99,8 @@ class RiakClient(RiakMapReduceChain, RiakClientOperations): self._http_pool = RiakHttpPool(self, **transport_options) self._pb_pool = RiakPbcPool(self, **transport_options) - self._encoders = {'application/json': json.dumps, - 'text/json': json.dumps} + self._encoders = {'application/json': default_encoder, + 'text/json': default_encoder} self._decoders = {'application/json': json.loads, 'text/json': json.loads} self._buckets = WeakValueDictionary()
Switching JSON encoding to UTF-8. By default, python's JSON encoder will escape all non-ASCII characters, using a sequence of 6 bytes, for the sake of legacy non-UTF-8 compatible clients. This is a significant overhead in the case of non-ASCII string and can be reduced by using a modern encoding.
diff --git a/browser/scrollTo.js b/browser/scrollTo.js index <HASH>..<HASH> 100644 --- a/browser/scrollTo.js +++ b/browser/scrollTo.js @@ -1,4 +1,5 @@ sb.include('effect'); +sb.include('browser.getScrollPosition'); /** @Name: sb.browser.scrollTo @Author: Paul Visco
added required include for getScrollPosition
diff --git a/mapclassify.py b/mapclassify.py index <HASH>..<HASH> 100644 --- a/mapclassify.py +++ b/mapclassify.py @@ -55,7 +55,7 @@ def quantile(y,k=4): >>> Note that if there are enough ties that the quantile values repeat, we - collapse to psuedo quantiles in which case the number of classes will be + collapse to pseudo quantiles in which case the number of classes will be less than k >>> x=[1.0]*100 diff --git a/moran.py b/moran.py index <HASH>..<HASH> 100644 --- a/moran.py +++ b/moran.py @@ -84,8 +84,18 @@ class Moran: -0.012987012987012988 >>> mi.p_norm 0.00027147862770937614 - >>> - + + SIDS example replicating OpenGeoda + + >>> w=pysal.open("../examples/sids2.gal").read() + >>> f=pysal.open("../examples/sids2.dbf") + >>> SIDR=np.array(f.by_col("SIDR74")) + >>> mi=pysal.Moran(SIDR,w) + >>> mi.I + 0.24772519320480135 + >>> mi.p_norm + 0.0001158330781489969 + """ def __init__(self,y,w,transformation="r",permutations=PERMUTATIONS): self.y=y
- fix histogram logic bug in weights init - added more examples to replicate GeoDa
diff --git a/packages/selenium-ide/src/neo/playback/playback-tree/command-node.js b/packages/selenium-ide/src/neo/playback/playback-tree/command-node.js index <HASH>..<HASH> 100644 --- a/packages/selenium-ide/src/neo/playback/playback-tree/command-node.js +++ b/packages/selenium-ide/src/neo/playback/playback-tree/command-node.js @@ -53,7 +53,7 @@ export class CommandNode { next: this.next }; } else if (result.result === "success") { - this._incrementTimesVisited(); + if (ControlFlowCommandChecks.isLoop(this.command)) this.timesVisited++; return { result: "success", next: this.isControlFlow() ? result.next : this.next @@ -115,10 +115,6 @@ export class CommandNode { }); } - _incrementTimesVisited() { - if (ControlFlowCommandChecks.isLoop(this.command)) this.timesVisited++; - } - _isRetryLimit() { let limit = 1000; let value = Math.floor(+this.command.value);
Inlined conditional incrementing of `timesVisited` since it's only needed in one place now.
diff --git a/src/SwiftMailer/Transport/FileTransport.php b/src/SwiftMailer/Transport/FileTransport.php index <HASH>..<HASH> 100644 --- a/src/SwiftMailer/Transport/FileTransport.php +++ b/src/SwiftMailer/Transport/FileTransport.php @@ -120,7 +120,7 @@ class FileTransport implements Swift_Transport protected function doSend(Swift_Mime_Message $message, &$failedRecipients = null) { $body = $message->toString(); - $fileName = $this->path.'/'.date('Y-m-d H:i:s'); + $fileName = $this->path.'/'.date('Y-m-d H_i_s'); for ($i = 0; $i < $this->retryLimit; ++$i) { /* We try an exclusive creation of the file. This is an atomic operation, it avoid locking mechanism */
Use "_" separator for time as ":" does not work on Windows
diff --git a/onnx/backend/test/runner/__init__.py b/onnx/backend/test/runner/__init__.py index <HASH>..<HASH> 100644 --- a/onnx/backend/test/runner/__init__.py +++ b/onnx/backend/test/runner/__init__.py @@ -8,6 +8,7 @@ import functools import glob import os import re +import shutil import tarfile import tempfile import unittest @@ -151,7 +152,16 @@ class Runner(object): models_dir = os.getenv('ONNX_MODELS', os.path.join(onnx_home, 'models')) model_dir = os.path.join(models_dir, model_test.model_name) - if not os.path.exists(model_dir): + if not os.path.exists(os.path.join(model_dir, 'model.onnx')): + if os.path.exists(model_dir): + bi = 0 + while True: + dest = '{}.old.{}'.format(model_dir, bi) + if os.path.exists(dest): + bi += 1 + continue + shutil.move(model_dir, dest) + break os.makedirs(model_dir) url = 'https://s3.amazonaws.com/download.onnx/models/{}.tar.gz'.format( model_test.model_name)
Change the cached model checking logic (#<I>) * Change the cached model checking logic * Move the old folder, instead of deleting
diff --git a/hug/test.py b/hug/test.py index <HASH>..<HASH> 100644 --- a/hug/test.py +++ b/hug/test.py @@ -26,7 +26,8 @@ import json from hug.run import server from hug import output_format from functools import partial -from unittest.mock import patch +from unittest import mock +from collections import namedtuple def call(method, api_module, url, body='', headers=None, **params): @@ -57,8 +58,11 @@ for method in HTTP_METHODS: def cli(method, **arguments): '''Simulates testing a hug cli method from the command line''' - with patch('argparse.ArgumentParser.parse_args', lambda self: arguments): + test_arguments = mock.Mock() + test_arguments.__dict__ = arguments + with mock.patch('argparse.ArgumentParser.parse_args', lambda self: test_arguments): + old_output = method.cli.output to_return = [] - with patch('__main__.method.cli.output', lambda data: to_return.append(data)): - method.cli() - return to_return and to_return[0] or None + method.cli() + method.cli.output = old_output + return to_return and to_return[0] or None
Fix how arguments are passed in when testing clis
diff --git a/test/extended/authorization/rbac/groups_default_rules.go b/test/extended/authorization/rbac/groups_default_rules.go index <HASH>..<HASH> 100644 --- a/test/extended/authorization/rbac/groups_default_rules.go +++ b/test/extended/authorization/rbac/groups_default_rules.go @@ -114,7 +114,7 @@ var ( // These custom resources are used to extend console functionality // The console team is working on eliminating this exception in the near future - rbacv1helpers.NewRule(read...).Groups(consoleGroup).Resources("consoleclidownloads", "consolelinks", "consoleexternalloglinks", "consolenotifications").RuleOrDie(), + rbacv1helpers.NewRule(read...).Groups(consoleGroup).Resources("consoleclidownloads", "consolelinks", "consoleexternalloglinks", "consolenotifications", "consoleyamlsamples").RuleOrDie(), // TODO: remove when openshift-apiserver has removed these rbacv1helpers.NewRule("get").URLs(
Add consoleyamlsamples to list of console resource exceptions
diff --git a/src/types/__tests__/run-tests.test.js b/src/types/__tests__/run-tests.test.js index <HASH>..<HASH> 100644 --- a/src/types/__tests__/run-tests.test.js +++ b/src/types/__tests__/run-tests.test.js @@ -18,6 +18,7 @@ test('TypeScript', async () => { const cleanedMessage = err.message .replace(/src\/types\//gm, '') .replace(/error TS\d+: /gm, '') + .replace(/\(\d+,\d+\)/gm, '') expect(cleanedMessage).toMatchSnapshot('rejected') } })
Remove lines from TypeScript snapshots (cherry picked from commit b<I>f8f<I>f1c<I>e<I>a8d<I>dabb<I>) # Conflicts: # src/types/__tests__/__snapshots__/run-tests.test.js.snap
diff --git a/go/engine/pgp_update_test.go b/go/engine/pgp_update_test.go index <HASH>..<HASH> 100644 --- a/go/engine/pgp_update_test.go +++ b/go/engine/pgp_update_test.go @@ -109,6 +109,7 @@ func TestPGPUpdateMultiKey(t *testing.T) { // Generate a second PGP sibkey. arg := PGPKeyImportEngineArg{ AllowMulti: true, + DoExport: true, Gen: &libkb.PGPGenArg{ PrimaryBits: 768, SubkeyBits: 768,
In TestPGPUpdateMultiKey, actually do the updates Previously, this test just checked that the arguments were interpreted correctly. Since the generated keys were never exported to the local keyring, the update did nothing. Since the process of updating PGP keys is a little more complicated now, and a little more security-conscious, it's useful to test the whole thing.
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingListener.java b/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingListener.java index <HASH>..<HASH> 100644 --- a/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingListener.java +++ b/flink-runtime/src/test/java/org/apache/flink/runtime/leaderelection/TestingListener.java @@ -51,11 +51,11 @@ public class TestingListener implements LeaderRetrievalListener { long start = System.currentTimeMillis(); long curTimeout; - while ( + synchronized (lock) { + while ( exception == null && - (address == null || address.equals(oldAddress)) && - (curTimeout = timeout - System.currentTimeMillis() + start) > 0) { - synchronized (lock) { + (address == null || address.equals(oldAddress)) && + (curTimeout = timeout - System.currentTimeMillis() + start) > 0) { try { lock.wait(curTimeout); } catch (InterruptedException e) {
[FLINK-<I>] [tests] Perform TestingListener#waitForNewLeader under lock Performin TestingListener#waitForNewLeader under the lock which is also hold when updating the leader information makes sure that leader changes won't go unnoticed. This led before to failing test cases due to timeouts. This closes #<I>.
diff --git a/src/lib/core/property.php b/src/lib/core/property.php index <HASH>..<HASH> 100644 --- a/src/lib/core/property.php +++ b/src/lib/core/property.php @@ -167,6 +167,8 @@ function papi_get_property_meta_value( $id, $slug, $type = 'post' ) { } else { $type = papi_get_meta_type( $type ); $value = get_metadata( $type, $id, unpapify( $slug ), true ); + // Backward compatibility, slugs can contain `papi` prefix. + $value = papi_is_empty( $value ) ? get_metadata( $type, $id, $slug, true ) : $value; } if ( papi_is_empty( $value ) ) {
Add backward compatibility for property meta saved with prefix
diff --git a/contribs/gmf/src/print/component.js b/contribs/gmf/src/print/component.js index <HASH>..<HASH> 100644 --- a/contribs/gmf/src/print/component.js +++ b/contribs/gmf/src/print/component.js @@ -779,12 +779,8 @@ export class PrintController { this.updateCustomFields_(); - const hasLegend = this.layoutInfo.attributes.includes('legend'); - if (hasLegend) { - this.fieldValues.legend = this.fieldValues.legend; - } else { - delete this.fieldValues.legend; - } + this.layoutInfo.legend = this.layoutInfo.attributes.includes('legend') ? + this.fieldValues['legend'] !== false : undefined; this.layoutInfo.scales = clientInfo.scales || []; this.layoutInfo.dpis = clientInfo.dpiSuggestions || [];
Revert regression in gmf print component
diff --git a/tests/Embera/Provider/HuluTest.php b/tests/Embera/Provider/HuluTest.php index <HASH>..<HASH> 100644 --- a/tests/Embera/Provider/HuluTest.php +++ b/tests/Embera/Provider/HuluTest.php @@ -34,6 +34,11 @@ final class HuluTest extends ProviderTester public function testProvider() { + $travis = (bool) getenv('ONTRAVIS'); + if ($travis) { + $this->markTestIncomplete('Disabling this provider since it seems to have problems with the endpoint (OnSizzle).'); + } + $this->validateProvider('Hulu', [ 'width' => 480, 'height' => 270]); } } diff --git a/tests/Embera/Provider/SoundsgoodTest.php b/tests/Embera/Provider/SoundsgoodTest.php index <HASH>..<HASH> 100644 --- a/tests/Embera/Provider/SoundsgoodTest.php +++ b/tests/Embera/Provider/SoundsgoodTest.php @@ -21,7 +21,6 @@ final class SoundsgoodTest extends ProviderTester { protected $tasks = [ 'valid_urls' => [ - 'https://play.soundsgood.co/playlist/chill-new-songwriters-2019-indie-rock-folk-and-soul', 'https://play.soundsgood.co/playlist/if-12-2019', 'https://play.soundsgood.co/playlist/19-avril-2015', ],
Fixed Soundsgood tests - Hulu is having problems right now.
diff --git a/salt/output/virt_query.py b/salt/output/virt_query.py index <HASH>..<HASH> 100644 --- a/salt/output/virt_query.py +++ b/salt/output/virt_query.py @@ -30,7 +30,7 @@ def output(data): id_, vm_data['graphics']['port']) if 'disks' in vm_data: - for disk, d_data in list(vm_data['disks'].items()): + for disk, d_data in vm_data['disks'].items(): out += ' Disk - {0}:\n'.format(disk) out += ' Size: {0}\n'.format(d_data['disk size']) out += ' File: {0}\n'.format(d_data['file'])
Removing lists and change back to earlier
diff --git a/src/WindowsAzure/ServiceRuntime/RoleEnvironment.php b/src/WindowsAzure/ServiceRuntime/RoleEnvironment.php index <HASH>..<HASH> 100644 --- a/src/WindowsAzure/ServiceRuntime/RoleEnvironment.php +++ b/src/WindowsAzure/ServiceRuntime/RoleEnvironment.php @@ -181,6 +181,8 @@ class RoleEnvironment /** * Tracks role environment changes raising events as necessary. * + * This method is blocking and can/should be called in a separate fork. + * * @static * * @return none
#<I>: Adding comment in the listener methods for trackchanges method
diff --git a/aws/resource_aws_acm_certificate.go b/aws/resource_aws_acm_certificate.go index <HASH>..<HASH> 100644 --- a/aws/resource_aws_acm_certificate.go +++ b/aws/resource_aws_acm_certificate.go @@ -292,6 +292,10 @@ func convertValidationOptions(certificate *acm.CertificateDetail) ([]map[string] var emailValidationResult []string if *certificate.Type == acm.CertificateTypeAmazonIssued { + if len(certificate.DomainValidationOptions) == 0 { + log.Printf("[DEBUG] No validation options need to retry.") + return nil, nil, fmt.Errorf("No validation options need to retry.") + } for _, o := range certificate.DomainValidationOptions { if o.ResourceRecord != nil { validationOption := map[string]interface{}{
Retry ACM certificate domain validation when the DomainValidationOptions array is completely empty.
diff --git a/source/Core/oxwidgetcontrol.php b/source/Core/oxwidgetcontrol.php index <HASH>..<HASH> 100644 --- a/source/Core/oxwidgetcontrol.php +++ b/source/Core/oxwidgetcontrol.php @@ -101,18 +101,14 @@ class oxWidgetControl extends oxShopControl // if exists views chain, initializing these view at first if (is_array($aViewsChain) && !empty($aViewsChain)) { - foreach ($aViewsChain as $sParentClassName) { if ($sParentClassName != $sClass && !in_array(strtolower($sParentClassName), $aActiveViewsNames)) { // creating parent view object - if (strtolower($sParentClassName) == 'oxubase') { - $oViewObject = oxNew('oxubase'); - $oConfig->setActiveView($oViewObject); - } else { - $oViewObject = oxNew($sParentClassName); - $oViewObject->setClassName($sParentClassName); - $oConfig->setActiveView($oViewObject); + $oViewObject = oxNew($sParentClassName); + if (strtolower($sParentClassName) != 'oxubase') { + $oViewObject->setClassName($sParentClassName); } + $oConfig->setActiveView($oViewObject); } } }
try to simplify view chain code Removed duplicate code in classname is oxubase, the only diff. left is the setClassName call.
diff --git a/internetarchive/cli/ia_upload.py b/internetarchive/cli/ia_upload.py index <HASH>..<HASH> 100755 --- a/internetarchive/cli/ia_upload.py +++ b/internetarchive/cli/ia_upload.py @@ -83,6 +83,7 @@ def _upload_files(item, files, upload_kwargs, prev_identifier=None, archive_sess def main(argv, session): args = docopt(__doc__, argv=argv) + ERRORS = False # Validate args. s = Schema({ @@ -172,7 +173,6 @@ def main(argv, session): session = ArchiveSession() spreadsheet = csv.DictReader(open(args['--spreadsheet'], 'rU')) prev_identifier = None - errors = False for row in spreadsheet: local_file = row['file'] identifier = row['identifier'] @@ -189,8 +189,8 @@ def main(argv, session): r = _upload_files(item, local_file, upload_kwargs, prev_identifier, session) for _r in r: if (not _r) or (not _r.ok): - errors = True + ERRORS = True prev_identifier = identifier - if errors: + if ERRORS: sys.exit(1)
made ERRORS global to address UnboundLocalError bug.
diff --git a/_pytest/python.py b/_pytest/python.py index <HASH>..<HASH> 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -228,7 +228,10 @@ class Module(pytest.File, PyCollectorMixin): self.ihook.pytest_pycollect_before_module_import(mod=self) # we assume we are only called once per module try: - mod = self.fspath.pyimport(ensuresyspath=True) + try: + mod = self.fspath.pyimport(ensuresyspath=True) + finally: + self.ihook.pytest_pycollect_after_module_import(mod=self) except SyntaxError: excinfo = py.code.ExceptionInfo() raise self.CollectError(excinfo.getrepr(style="short")) @@ -243,8 +246,6 @@ class Module(pytest.File, PyCollectorMixin): "HINT: use a unique basename for your test file modules" % e.args ) - finally: - self.ihook.pytest_pycollect_after_module_import(mod=self) #print "imported test module", mod self.config.pluginmanager.consider_module(mod) return mod
expand try/except/finally which py<I> does't like
diff --git a/Notifications/ResetPassword.php b/Notifications/ResetPassword.php index <HASH>..<HASH> 100644 --- a/Notifications/ResetPassword.php +++ b/Notifications/ResetPassword.php @@ -59,7 +59,7 @@ class ResetPassword extends Notification return (new MailMessage) ->subject(Lang::get('Reset Password Notification')) ->line(Lang::get('You are receiving this email because we received a password reset request for your account.')) - ->action(Lang::get('Reset Password'), url(config('app.url').route('password.reset', ['token' => $this->token, 'email' => $notifiable->getEmailForPasswordReset()], false))) + ->action(Lang::get('Reset Password'), url(route('password.reset', ['token' => $this->token, 'email' => $notifiable->getEmailForPasswordReset()], false))) ->line(Lang::get('This password reset link will expire in :count minutes.', ['count' => config('auth.passwords.'.config('auth.defaults.passwords').'.expire')])) ->line(Lang::get('If you did not request a password reset, no further action is required.')); }
Use the router for absolute urls (#<I>)
diff --git a/lib/flipflop/facade.rb b/lib/flipflop/facade.rb index <HASH>..<HASH> 100644 --- a/lib/flipflop/facade.rb +++ b/lib/flipflop/facade.rb @@ -1,3 +1,5 @@ +require "forwardable" + module Flipflop module Facade extend Forwardable diff --git a/test/test_helper.rb b/test/test_helper.rb index <HASH>..<HASH> 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -140,9 +140,9 @@ class TestApp Rails.application.config.i18n.enforce_available_locales = false Rails.application.config.autoloader = :classic # Disable Zeitwerk in Rails 6+ - active_record_options = Rails.application.config.active_record - if active_record_options.respond_to?(:sqlite3=) and active_record_options.sqlite3.nil? - active_record_options.sqlite3 = ActiveSupport::OrderedOptions.new + if ActiveRecord::Base.respond_to?(:sqlite3=) + # Avoid Rails 6+ deprecation warning + Rails.application.config.active_record.sqlite3 = ActiveSupport::OrderedOptions.new end if defined?(ActionView::Railtie::NULL_OPTION)
Fixes for older Rails versions.
diff --git a/spec/jobs/import_url_job_spec.rb b/spec/jobs/import_url_job_spec.rb index <HASH>..<HASH> 100644 --- a/spec/jobs/import_url_job_spec.rb +++ b/spec/jobs/import_url_job_spec.rb @@ -29,9 +29,18 @@ RSpec.describe ImportUrlJob do end context 'after running the job' do + let!(:tmpdir) { Rails.root.join("tmp/spec/#{Process.pid}") } + before do file_set.id = 'abc123' allow(file_set).to receive(:reload) + + FileUtils.mkdir_p(tmpdir) + allow(Dir).to receive(:mktmpdir).and_return(tmpdir) + end + + after do + FileUtils.remove_entry(tmpdir) end it 'creates the content and updates the associated operation' do @@ -39,6 +48,11 @@ RSpec.describe ImportUrlJob do described_class.perform_now(file_set, operation) expect(operation).to be_success end + + it 'leaves the temp directory in place' do + described_class.perform_now(file_set, operation) + expect(File.exist?(File.join(tmpdir, file_hash))).to be true + end end context "when a batch update job is running too" do
Add test to make sure ImportUrlJob leaves its temp directory/file(s) in place.
diff --git a/src/Dev/FixtureBlueprint.php b/src/Dev/FixtureBlueprint.php index <HASH>..<HASH> 100644 --- a/src/Dev/FixtureBlueprint.php +++ b/src/Dev/FixtureBlueprint.php @@ -207,7 +207,7 @@ class FixtureBlueprint extends BaseBlueprint // Mutate Class (if required): - $this->mutateClass($object, $identifier, $data); + $object = $this->mutateClass($object, $identifier, $data); // Write Object to Database: @@ -255,6 +255,10 @@ class FixtureBlueprint extends BaseBlueprint { $objects = DataList::create($this->getClass()); + if (!$objects->exists()) { + $objects = DataList::create($this->getBaseClass()); + } + if (is_array($filter)) { $objects = $objects->filter($filter); }
Fixed a bug with class mutation in fixtures
diff --git a/src/search/FindInFiles.js b/src/search/FindInFiles.js index <HASH>..<HASH> 100644 --- a/src/search/FindInFiles.js +++ b/src/search/FindInFiles.js @@ -795,7 +795,7 @@ define(function (require, exports, module) { var addPromise; if (entry.isDirectory) { - if (!added || !removed) { + if (!added || !removed || (!added.length && !removed.length)) { // If the added or removed sets are null, must redo the search for the entire subtree - we // don't know which child files/folders may have been added or removed. _removeSearchResultsForEntry(entry);
Fix: Find in Files results don't update to reflect external changes unless file is open
diff --git a/pymatbridge/version.py b/pymatbridge/version.py index <HASH>..<HASH> 100644 --- a/pymatbridge/version.py +++ b/pymatbridge/version.py @@ -87,7 +87,14 @@ MICRO = _version_micro VERSION = __version__ PACKAGES = ['pymatbridge'] PACKAGE_DATA = {"pymatbridge": ["matlab/matlabserver.m", "matlab/messenger.*", - "matlab/usrprog/*.m", "matlab/util/*.m", + "matlab/usrprog/*", "matlab/util/*.m", + "matlab/util/json_tool/*.m", + "matlab/util/json_tool/json_v0.2.2/.gitignore", + "matlab/util/json_tool/json_v0.2.2/LICENSE", + "matlab/util/json_tool/json_v0.2.2/README.md", + "matlab/util/json_tool/json_v0.2.2/test/*", + "matlab/util/json_tool/json_v0.2.2/+json/*.m", + "matlab/util/json_tool/json_v0.2.2/+json/java/*", "tests/*.py", "examples/*.ipynb"]} REQUIRES = []
Added json tool folder to installation
diff --git a/cacheback/utils.py b/cacheback/utils.py index <HASH>..<HASH> 100644 --- a/cacheback/utils.py +++ b/cacheback/utils.py @@ -1,4 +1,5 @@ import logging +import warnings from django.conf import settings from django.core import signals @@ -24,6 +25,14 @@ except ImportError as exc: logger = logging.getLogger('cacheback') +class RemovedInCacheback13Warning(DeprecationWarning): + pass + + +def warn_deprecation(message, exc=RemovedInCacheback13Warning): + warnings.warn(message, exc) + + def get_cache(backend, **kwargs): """ Compatibilty wrapper for getting Django's cache backend instance
Add helper to easy raise warnings for deprecated imports/calls.
diff --git a/python/ccxt/base/exchange.py b/python/ccxt/base/exchange.py index <HASH>..<HASH> 100644 --- a/python/ccxt/base/exchange.py +++ b/python/ccxt/base/exchange.py @@ -1533,6 +1533,15 @@ class Exchange(object): else: raise NotSupported(self.id + ' fetchDepositAddress not supported yet') + def parse_funding_rate(self, contract, market=None): + raise NotSupported(self.id + "parse_funding_rate has not been implemented") + + def parse_funding_rates(self, response, market=None, timeframe='1m', since=None, limit=None): + parsed = [self.parse_funding_rate(res, market) for res in response] + sorted = self.sort_by(parsed, 0) + tail = since is None + return self.filter_by_since_limit(sorted, since, limit, 0, tail) + def parse_ohlcv(self, ohlcv, market=None): if isinstance(ohlcv, list): return [
Added parse_funding_rate and parse_funding_rates to python exchange base
diff --git a/tests/TypeParseTest.php b/tests/TypeParseTest.php index <HASH>..<HASH> 100644 --- a/tests/TypeParseTest.php +++ b/tests/TypeParseTest.php @@ -732,8 +732,8 @@ class TypeParseTest extends TestCase public function testCombineLiteralStringWithClassString() { $this->assertSame( - 'string', - (string)Type::parseString('"array"|class-string') + 'class-string|string(array)', + Type::parseString('"array"|class-string')->getId() ); } @@ -743,8 +743,8 @@ class TypeParseTest extends TestCase public function testCombineLiteralClassStringWithClassString() { $this->assertSame( - 'class-string', - (string)Type::parseString('A::class|class-string') + 'A::class|class-string', + Type::parseString('A::class|class-string')->getId() ); }
Add workarounds for class-string tests
diff --git a/src/assets/PriceEstimator.php b/src/assets/PriceEstimator.php index <HASH>..<HASH> 100644 --- a/src/assets/PriceEstimator.php +++ b/src/assets/PriceEstimator.php @@ -23,7 +23,7 @@ class PriceEstimator extends AssetBundle /** * @var string */ - public $sourcePath = __DIR__; + public $sourcePath = __DIR__ . '/PriceEstimator'; /** * @var array
fixed asset path (#<I>)
diff --git a/lib/appbundler/app.rb b/lib/appbundler/app.rb index <HASH>..<HASH> 100644 --- a/lib/appbundler/app.rb +++ b/lib/appbundler/app.rb @@ -47,6 +47,10 @@ module Appbundler ret end + SHITLIST = [ + "github_changelog_generator", + ] + def write_merged_lockfiles(without: []) # just return we don't have an external lockfile return if app_dir == File.dirname(gemfile_lock) @@ -58,6 +62,7 @@ module Appbundler locked_gems = {} gemfile_lock_specs.each do |s| + next if SHITLIST.include?(s.name) # we use the fact that all the gems from the Gemfile.lock have been preinstalled to skip gems that aren't for our platform. spec = safe_resolve_local_gem(s) next if spec.nil? @@ -80,6 +85,7 @@ module Appbundler t.puts "# GEMS FROM GEMFILE:" requested_dependencies(without).each do |dep| + next if SHITLIST.include?(dep.name) if locked_gems[dep.name] t.puts locked_gems[dep.name] else @@ -93,6 +99,7 @@ module Appbundler t.puts "# GEMS FROM LOCKFILE: " locked_gems.each do |name, line| + next if SHITLIST.include?(name) next if seen_gems[name] t.puts line end
avoid github-changelog-generator issues this is a bit of a hack to ship ChefDK <I> because this gem infects and breaks everything in the world.
diff --git a/webapps/ui/cockpit/client/scripts/navigation/controllers/cam-header-views-ctrl.js b/webapps/ui/cockpit/client/scripts/navigation/controllers/cam-header-views-ctrl.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/client/scripts/navigation/controllers/cam-header-views-ctrl.js +++ b/webapps/ui/cockpit/client/scripts/navigation/controllers/cam-header-views-ctrl.js @@ -1,10 +1,6 @@ 'use strict'; function checkActive(plugin, path) { - var checked = plugin.id; - if (checked === 'processes') { - checked = 'process'; - } return path.indexOf(plugin.id) > -1; }
refactor(navigation): remove dead code Related to CAM-<I>
diff --git a/is-native-implemented.js b/is-native-implemented.js index <HASH>..<HASH> 100644 --- a/is-native-implemented.js +++ b/is-native-implemented.js @@ -1,10 +1,8 @@ -// Exports true if environment provides native `WeakMap` implementation, -// whatever that is. +// Exports true if environment provides native `WeakMap` implementation, whatever that is. 'use strict'; module.exports = (function () { - if (typeof WeakMap === 'undefined') return false; - return (Object.prototype.toString.call(WeakMap.prototype) === - '[object WeakMap]'); + if (typeof WeakMap !== 'function') return false; + return (Object.prototype.toString.call(new WeakMap()) === '[object WeakMap]'); }());
Fix native detection So it's not affected by V8 bug: <URL>
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ /* -List.js 1.1.1 +List.js 1.2 By Jonny Strömberg (www.jonnystromberg.com, www.listjs.com) */ (function( window, undefined ) {
Update version in index.js Update version from <I> to <I> in index.js.
diff --git a/src/frontend/commands/BlockController.php b/src/frontend/commands/BlockController.php index <HASH>..<HASH> 100644 --- a/src/frontend/commands/BlockController.php +++ b/src/frontend/commands/BlockController.php @@ -143,6 +143,8 @@ class BlockController extends \luya\console\Command 'link' => 'Generats a linkable internal or external resource (use Link Injector!)', 'cms-page' => 'Returns CMS page selection tree (only when cms is registered).', 'slug' => 'Slugified input field which allows only lower chars and - for url rules.', + 'radio' => 'Generate radio inputs which allows to select and return a single value.', + 'multiple-inputs' => 'Nesting all types inside an array.' ]; } @@ -169,7 +171,8 @@ class BlockController extends \luya\console\Command 'link' => 'self::TYPE_LINK', 'cms-page' => 'self::TYPE_CMS_PAGE', 'slug' => 'self::TYPE_SLUG', - 'radios' => 'self::TYPE_RADIOS', + 'radio' => 'self::TYPE_RADIO', + 'multiple-inpus' => 'self::TYPE_MULTIPLE_INPUTS', ]; }
added multiple inputs to block command. #<I>
diff --git a/anyconfig/backend/tests/xml.py b/anyconfig/backend/tests/xml.py index <HASH>..<HASH> 100644 --- a/anyconfig/backend/tests/xml.py +++ b/anyconfig/backend/tests/xml.py @@ -57,7 +57,7 @@ CNF_0_S = """\ class Test_00(unittest.TestCase): - def test__namespaces_from_file(self): + def test_10__namespaces_from_file(self): ref = {"http://example.com/ns/config": '', "http://example.com/ns/config/val": "val"} xmlfile = anyconfig.compat.StringIO(XML_W_NS_S)
refactor: rename test methods to keep the order in .backend.tests.xml.Test_<I>
diff --git a/src/test/java/com/metamx/http/client/io/AppendableByteArrayInputStreamTest.java b/src/test/java/com/metamx/http/client/io/AppendableByteArrayInputStreamTest.java index <HASH>..<HASH> 100644 --- a/src/test/java/com/metamx/http/client/io/AppendableByteArrayInputStreamTest.java +++ b/src/test/java/com/metamx/http/client/io/AppendableByteArrayInputStreamTest.java @@ -210,7 +210,7 @@ public class AppendableByteArrayInputStreamTest { try { byte[] readBytes = new byte[10]; - in.read(readBytes); + while (in.read(readBytes) != -1); return readBytes; } catch (IOException e) {
Read until EOF (which shouldn't happen...)
diff --git a/js/bitmart.js b/js/bitmart.js index <HASH>..<HASH> 100644 --- a/js/bitmart.js +++ b/js/bitmart.js @@ -436,7 +436,7 @@ module.exports = class bitmart extends Exchange { const pricePrecision = this.safeInteger (market, 'price_max_precision'); const precision = { 'amount': this.safeNumber (market, 'base_min_size'), - 'price': parseFloat (this.decimalToPrecision (Math.pow (10, -pricePrecision), ROUND, 10)), + 'price': parseFloat (this.decimalToPrecision (Math.pow (10, -pricePrecision), ROUND, 12)), }; const minBuyCost = this.safeNumber (market, 'min_buy_amount'); const minSellCost = this.safeNumber (market, 'min_sell_amount');
For some markets (BABYDOGE/USDT and etc) with price_max_precision > <I> price precision calculated as 0. P.S. BABYDOGE/USDT price precision is <I>. Max precision for all markets is <I>.
diff --git a/pkg/kubelet/pod_workers.go b/pkg/kubelet/pod_workers.go index <HASH>..<HASH> 100644 --- a/pkg/kubelet/pod_workers.go +++ b/pkg/kubelet/pod_workers.go @@ -34,7 +34,6 @@ import ( "k8s.io/kubernetes/pkg/kubelet/events" "k8s.io/kubernetes/pkg/kubelet/eviction" "k8s.io/kubernetes/pkg/kubelet/metrics" - kubelettypes "k8s.io/kubernetes/pkg/kubelet/types" kubetypes "k8s.io/kubernetes/pkg/kubelet/types" "k8s.io/kubernetes/pkg/kubelet/util/queue" ) @@ -665,7 +664,7 @@ func (p *podWorkers) UpdatePod(options UpdatePodOptions) { options.KillPodOptions.PodTerminationGracePeriodSecondsOverride = &gracePeriod // if a static pod comes through, start tracking it explicitly (cleared by the pod worker loop) - if kubelettypes.IsStaticPod(pod) { + if kubetypes.IsStaticPod(pod) { p.terminatingStaticPodFullnames[kubecontainer.GetPodFullName(pod)] = struct{}{} }
fix kubelet/types is imported more than once
diff --git a/src/pymoca/backends/casadi/api.py b/src/pymoca/backends/casadi/api.py index <HASH>..<HASH> 100644 --- a/src/pymoca/backends/casadi/api.py +++ b/src/pymoca/backends/casadi/api.py @@ -280,14 +280,19 @@ def transfer_model(model_folder: str, model_name: str, compiler_options=None): codegen = compiler_options.get('codegen', False) if cache or codegen: - # Until CasADi supports pickling MXFunctions, caching implies expanding to SX. + # Until CasADi supports pickling MXFunctions, caching implies + # expanding to SX. We only raise a warning when we have to (re)compile + # the model though. + raise_expand_warning = False if cache and not compiler_options.get('expand_mx', False): - logger.warning("Caching implies expanding to SX. Setting 'expand_mx' to True.") compiler_options['expand_mx'] = True + raise_expand_warning = True try: return _load_model(model_folder, model_name, compiler_options) except (FileNotFoundError, InvalidCacheError): + if raise_expand_warning: + logger.warning("Caching implies expanding to SX. Setting 'expand_mx' to True.") model = _compile_model(model_folder, model_name, compiler_options) _save_model(model_folder, model_name, model, cache, codegen) return model
Only raise "cache needs expand_mx" warning if compiling
diff --git a/src/codegeneration/SuperTransformer.js b/src/codegeneration/SuperTransformer.js index <HASH>..<HASH> 100644 --- a/src/codegeneration/SuperTransformer.js +++ b/src/codegeneration/SuperTransformer.js @@ -110,7 +110,7 @@ export class SuperTransformer extends ParseTreeTransformer { // We should never get to these if ClassTransformer is doing its job. transformGetAccessor(tree) { return tree; } transformSetAccessor(tree) { return tree; } - transformPropertyMethodAssignMent(tree) { return tree; } + transformPropertyMethodAssignment(tree) { return tree; } /** * @param {CallExpression} tree
fix a typo in SuperTransformer
diff --git a/lib/itunes/version.rb b/lib/itunes/version.rb index <HASH>..<HASH> 100644 --- a/lib/itunes/version.rb +++ b/lib/itunes/version.rb @@ -1,3 +1,3 @@ module ITunes - VERSION = '0.4.0' + VERSION = '0.4.1' end
rubygems error pushing <I>, bumping to <I>
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -104,6 +104,7 @@ function matchSnapshot(chai, utils) { var dirty = false; if (!update && !snapshotState.update && snapshot) { if (obj !== snapshot.code) { + addSnapshot(path, context.index, lang === undefined ? null : lang, snapshot.code, dirty); throw new chai.AssertionError("Received value does not match stored snapshot.", { actual: obj, expected: snapshot.code,
Fix bug with missing visited flags when test fails