diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/transformers/tokenization_utils.py b/src/transformers/tokenization_utils.py index <HASH>..<HASH> 100644 --- a/src/transformers/tokenization_utils.py +++ b/src/transformers/tokenization_utils.py @@ -22,6 +22,7 @@ import logging import operator import os import re +import warnings from collections import UserDict, defaultdict from contextlib import contextmanager from typing import Any, Dict, List, NamedTuple, Optional, Sequence, Tuple, Union @@ -822,7 +823,14 @@ class PreTrainedTokenizer(SpecialTokensMixin): super().__init__(**kwargs) # For backward compatibility we fallback to set model_max_length from max_len if provided - model_max_length = model_max_length if model_max_length is not None else kwargs.pop("max_len", None) + if "max_len" in kwargs: + warnings.warn( + "Parameter max_len is deprecated and will be removed in a future release. " + "Use model_max_length instead.", + category=FutureWarning, + ) + + model_max_length = kwargs.pop("max_len") self.model_max_length = model_max_length if model_max_length is not None else VERY_LARGE_INTEGER # Padding side is right by default and overridden in subclasses. If specified in the kwargs, it is changed.
Warn the user about max_len being on the path to be deprecated. (#<I>) * Warn the user about max_len being on the path to be deprecated. * Ensure better backward compatibility when max_len is provided to a tokenizer. * Make sure to override the parameter and not the actual instance value. * Format & quality
diff --git a/Model/Api.php b/Model/Api.php index <HASH>..<HASH> 100644 --- a/Model/Api.php +++ b/Model/Api.php @@ -11,6 +11,7 @@ namespace MauticPlugin\MauticContactSourceBundle\Model; +use Doctrine\DBAL\Connection; use Doctrine\ORM\EntityManager; use FOS\RestBundle\Util\Codes; use Mautic\CampaignBundle\Entity\Campaign; @@ -1834,10 +1835,19 @@ class Api } // Commit any MySQL changes and close the connection/s to prepare for a process fork. + /** @var Connection $connection */ $connection = $this->em->getConnection(); - if ($connection->isConnected()) { - if ($connection->isTransactionActive()) { - $connection->commit(); + if ($connection) { + while (0 !== $connection->getTransactionNestingLevel()) { + // Check for RollBackOnly to avoid exceptions. + if (!$connection->isRollbackOnly()) { + // Follow behavior of the private commitAll method, in case there are nested transactions. + if (false === $connection->isAutoCommit() && 1 === $connection->getTransactionNestingLevel()) { + $connection->commit(); + break; + } + $connection->commit(); + } } $connection->close(); }
[ENG-<I>] Recursively commit nested transactions. This code looks a little funky, but it’s following the pattern of the DBAL connection logic as much as possible. I’m supporting non-autocommit and rollback-only even though those modes *shouldn’t* be used in this project. With this the buffer errors do not occur.
diff --git a/orbiter.js b/orbiter.js index <HASH>..<HASH> 100644 --- a/orbiter.js +++ b/orbiter.js @@ -266,7 +266,7 @@ Orbiter.prototype.setup = function () { } function onMouseDown (e) { - const pos = offset(e, window) + const pos = offset(e, orbiter.element) down( pos[0], pos[1], @@ -275,7 +275,7 @@ Orbiter.prototype.setup = function () { } function onMouseMove (e) { - const pos = offset(e, window) + const pos = offset(e, orbiter.element) move( pos[0], pos[1],
Use position relative to orbiter element instead of window for offset computation
diff --git a/colly.go b/colly.go index <HASH>..<HASH> 100644 --- a/colly.go +++ b/colly.go @@ -178,6 +178,7 @@ func (c *Collector) scrape(u, method string, depth int, requestData io.Reader, c return err } req.Header.Set("User-Agent", c.UserAgent) + if ctx == nil { ctx = NewContext() } @@ -369,8 +370,16 @@ func (c *Collector) checkRedirectFunc() func(req *http.Request, via []*http.Requ return http.ErrUseLastResponse } + lastRequest := via[len(via)-1] + // Copy the headers from last request - req.Header = via[len(via)-1].Header + req.Header = lastRequest.Header + + // If domain has changed, remove the Authorization-header if it exists + if req.URL.Host != lastRequest.URL.Host { + req.Header.Del("Authorization") + } + return nil } }
Removes the Authorization header if it exists and host has changed after a redirect
diff --git a/Eloquent/Relations/MorphPivot.php b/Eloquent/Relations/MorphPivot.php index <HASH>..<HASH> 100644 --- a/Eloquent/Relations/MorphPivot.php +++ b/Eloquent/Relations/MorphPivot.php @@ -45,6 +45,10 @@ class MorphPivot extends Pivot */ public function delete() { + if (isset($this->attributes[$this->getKeyName()])) { + return (int) parent::delete(); + } + if ($this->fireModelEvent('deleting') === false) { return 0; }
[6.x] Fix missing statement preventing deletion (#<I>) * Fix missing statement preventing deletion The delete method was missing a statement which prevented the deletion of many to many polymorphic pivot models. * style change
diff --git a/service/routes/meta.js b/service/routes/meta.js index <HASH>..<HASH> 100644 --- a/service/routes/meta.js +++ b/service/routes/meta.js @@ -7,8 +7,8 @@ const path = require('path'); const router = express.Router(); // eslint-disable-line new-cap -const serviceInfo = Object.assign({}, require(path.join(__dirname, '../../about.json')), { - appVersion: require(path.join(__dirname,'../../package.json')).version, +const serviceInfo = Object.assign({}, require('../../about.json'), { + appVersion: require('../../package.json').version, hostname: require("os").hostname(), dateDeployed: require('graceful-fs').statSync(path.join(__dirname,'../../package.json')).mtime });
Require handles relative paths (#<I>)
diff --git a/lib/flipper/adapters/redis_cache.rb b/lib/flipper/adapters/redis_cache.rb index <HASH>..<HASH> 100644 --- a/lib/flipper/adapters/redis_cache.rb +++ b/lib/flipper/adapters/redis_cache.rb @@ -148,7 +148,7 @@ module Flipper return [] if keys.empty? cache_keys = keys.map { |key| key_for(key) } - @cache.mget(cache_keys).map do |value| + @cache.mget(*cache_keys).map do |value| value ? Marshal.load(value) : nil end end
Spread cache keys when using `Redis#mget` The [signature of `Redis#mget` actually requires a splatted array of keys to fetch](<URL> does not work with `redis-store`. This patch should fix that.
diff --git a/tests/test_interface.rb b/tests/test_interface.rb index <HASH>..<HASH> 100755 --- a/tests/test_interface.rb +++ b/tests/test_interface.rb @@ -1412,12 +1412,18 @@ class TestInterface < CiscoTestCase assert_raises(Cisco::UnsupportedError) { i.ipv4_pim_sparse_mode = true } return end + begin + i.switchport_mode = :disabled + rescue Cisco::CliError => e + skip_message = 'Interface does not support switchport disable' + skip(skip_message) if e.message['requested config change not allowed'] + raise + end # Sample cli: # # interface Ethernet1/1 # ip pim sparse-mode # - i.switchport_mode = :disabled i.ipv4_pim_sparse_mode = false refute(i.ipv4_pim_sparse_mode)
Skip when intf does not support switchport disable
diff --git a/lib/wasabi/core_ext/string.rb b/lib/wasabi/core_ext/string.rb index <HASH>..<HASH> 100644 --- a/lib/wasabi/core_ext/string.rb +++ b/lib/wasabi/core_ext/string.rb @@ -5,9 +5,9 @@ module Wasabi # Returns the String in snakecase. def snakecase str = dup - str.gsub! /::/, '/' - str.gsub! /([A-Z]+)([A-Z][a-z])/, '\1_\2' - str.gsub! /([a-z\d])([A-Z])/, '\1_\2' + str.gsub!(/::/, '/') + str.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2') + str.gsub!(/([a-z\d])([A-Z])/, '\1_\2') str.tr! ".", "_" str.tr! "-", "_" str.downcase! diff --git a/lib/wasabi/document.rb b/lib/wasabi/document.rb index <HASH>..<HASH> 100644 --- a/lib/wasabi/document.rb +++ b/lib/wasabi/document.rb @@ -25,7 +25,9 @@ module Wasabi self.document = document end - attr_accessor :document, :request, :xml + attr_accessor :document, :request + + attr_writer :xml alias_method :document?, :document
Fixed the lines that caused warnings when running in debug mode
diff --git a/includes/class-freemius.php b/includes/class-freemius.php index <HASH>..<HASH> 100755 --- a/includes/class-freemius.php +++ b/includes/class-freemius.php @@ -1712,6 +1712,16 @@ ); } + /** + * @author Leo Fajardo (@leorw) + * @since 1.2.3.1 + * + * @return bool + */ + private function is_network_activation_mode() { + return ( $this->_is_network_active && $this->is_activation_mode() ); + } + /** * Check if current page is the opt-in/pending-activation page. * @@ -4529,6 +4539,12 @@ return; } + if ( ! is_network_admin() && + $this->is_network_activation_mode() + ) { + return; + } + if ( $this->is_plugin_new_install() || $this->is_only_premium() ) { // Show notice for new plugin installations. $this->_admin_notices->add( @@ -9495,7 +9511,9 @@ // return; // } - if ( ! $this->has_api_connectivity() && ! $this->is_enable_anonymous() ) { + if ( ( ! $this->has_api_connectivity() && ! $this->is_enable_anonymous() ) || + ( ! is_network_admin() && $this->is_network_activation_mode() ) + ) { $this->_menu->remove_menu_item(); } else { $this->do_action( 'before_admin_menu_init' );
[multisite] [optin] [admin-notice] During network activation mode, do not show the optin screen and optin admin notice on the sites.
diff --git a/pandas/core/frame.py b/pandas/core/frame.py index <HASH>..<HASH> 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -462,6 +462,9 @@ class DataFrame(NDFrame): return com.console_encode(value) return com.console_encode(buf.getvalue()) + def _repr_html_(self): + return self.to_html() + def __iter__(self): """ Iterate over columns of the frame.
Add _repr_html method to make DataFrames nice in IPython notebook.
diff --git a/lib/Gregwar/Image.php b/lib/Gregwar/Image.php index <HASH>..<HASH> 100644 --- a/lib/Gregwar/Image.php +++ b/lib/Gregwar/Image.php @@ -468,7 +468,7 @@ class Image $this->save($file, $type, $quality); } - return $this->getFilename($this->file); + return $this->getFilename($file); } /**
Fix a mistake on file caching
diff --git a/src/crypto.js b/src/crypto.js index <HASH>..<HASH> 100644 --- a/src/crypto.js +++ b/src/crypto.js @@ -2,9 +2,9 @@ var crypto = require('crypto'); function base64UrlSafeEncode(string) { return string.toString('base64') - .replace(/\+/g, '-') - .replace(/\//g, '_') - .replace(/=/g, ''); + .replace(/\+/g, '-') + .replace(/\//g, '_') + .replace(/=/g, ''); } function sha256(buffer) {
fix linter indentation issues
diff --git a/message.go b/message.go index <HASH>..<HASH> 100644 --- a/message.go +++ b/message.go @@ -169,7 +169,7 @@ func ParseMessage(raw string) (m *Message) { j = i + strings.IndexByte(raw[i:], space) // Extract command - if j > 0 { + if j > i { m.Command = raw[i:j] } else { m.Command = raw[i:]
Fix panic when parsing messages with only a command.
diff --git a/lib/gcli/ui/view.js b/lib/gcli/ui/view.js index <HASH>..<HASH> 100644 --- a/lib/gcli/ui/view.js +++ b/lib/gcli/ui/view.js @@ -77,6 +77,7 @@ exports.createView = function(options) { */ exports.populateWithOutputData = function(outputData, element) { util.clearElement(element); + var document = element.ownerDocument; var output = outputData.output; if (output == null) { @@ -88,16 +89,16 @@ exports.populateWithOutputData = function(outputData, element) { node = output; } else if (output.isView) { - node = output.toDom(element.ownerDocument); + node = output.toDom(document); } else { if (outputData.command.returnType === 'terminal') { - node = util.createElement(element.ownerDocument, 'textarea'); + node = util.createElement(document, 'textarea'); node.classList.add('gcli-row-terminal'); node.readOnly = true; } else { - node = util.createElement(element.ownerDocument, 'p'); + node = util.createElement(document, 'p'); } util.setContents(node, output.toString());
Bug <I> (intro): Don't lookup element.ownerDocument repeatedly
diff --git a/lib/proxy.js b/lib/proxy.js index <HASH>..<HASH> 100644 --- a/lib/proxy.js +++ b/lib/proxy.js @@ -68,15 +68,10 @@ function proxyRequest(req, res, rule) { }; // get a ProxyServer from the cache - router = createRouter(target); - - // handle any errors returned by the target server - router.on('error', errorCallback); + router = createRouter(target); // proxy the request - router.web(req, res); - - router.removeListener('error', errorCallback); + router.web(req, res, errorCallback); } // factory method to cache/fetch HttpProxy instances
fix for handling network errors when proxying
diff --git a/tests/test_simulator.py b/tests/test_simulator.py index <HASH>..<HASH> 100644 --- a/tests/test_simulator.py +++ b/tests/test_simulator.py @@ -47,7 +47,7 @@ class TestSimulationCell(unittest.TestCase): self.assertTupleEqual(state_size, sz) def test_interm_size(self): - expected = [((8,), (8,), (8,)), ()] + expected = [((8,), (8,), (8,), (8,)), ()] cells = [self.cell1, self.cell2] for cell, sz in zip(cells, expected): interm_size = cell.interm_size
Refactor test_simualtor to handle changed Reservoir domain
diff --git a/core/Pimf/Util/Validator.php b/core/Pimf/Util/Validator.php index <HASH>..<HASH> 100644 --- a/core/Pimf/Util/Validator.php +++ b/core/Pimf/Util/Validator.php @@ -298,7 +298,7 @@ class Validator $func = function($a,$b) use ($operator) { switch ($operator){ case "<": - return ($a > $b); + return ($a < $b); case ">": return ($a > $b); case "==":
fix: refactoring of create_function()
diff --git a/pkg/kubectl/resource/builder.go b/pkg/kubectl/resource/builder.go index <HASH>..<HASH> 100644 --- a/pkg/kubectl/resource/builder.go +++ b/pkg/kubectl/resource/builder.go @@ -587,8 +587,16 @@ func (b *Builder) Do() *Result { return r } +// SplitResourceArgument splits the argument with commas and returns unique +// strings in the original order. func SplitResourceArgument(arg string) []string { + out := []string{} set := util.NewStringSet() - set.Insert(strings.Split(arg, ",")...) - return set.List() + for _, s := range strings.Split(arg, ",") { + if set.Has(s) { + continue + } + out = append(out, s) + } + return out }
`kubectl get rc,pods` should invoke in that order SplitResourceArguments should not use a golang map
diff --git a/DataGrid/Extension/View/ColumnTypeExtension/ColumnViewOptionsExtension.php b/DataGrid/Extension/View/ColumnTypeExtension/ColumnViewOptionsExtension.php index <HASH>..<HASH> 100644 --- a/DataGrid/Extension/View/ColumnTypeExtension/ColumnViewOptionsExtension.php +++ b/DataGrid/Extension/View/ColumnTypeExtension/ColumnViewOptionsExtension.php @@ -55,6 +55,22 @@ class ColumnViewOptionsExtension extends ColumnAbstractTypeExtension /** * {@inheritDoc} */ + public function setDefaultOptions(ColumnTypeInterface $column) + { + $column->getOptionsResolver()->setDefaults(array( + 'translation_domain' => null, + )); + + $column->getOptionsResolver()->setAllowedTypes(array( + 'translation_domain' => array( + 'string' , + 'null' + ), + )); + } + + /** + * {@inheritDoc} public function getDefaultOptionsValues(ColumnTypeInterface $column) { return array( @@ -64,9 +80,9 @@ class ColumnViewOptionsExtension extends ColumnAbstractTypeExtension /** * {@inheritDoc} - */ public function getAvailableOptions(ColumnTypeInterface $column) { return array('translation_domain'); } + */ } \ No newline at end of file
Added OptionsResolver to handle column extension options
diff --git a/models/wiki.go b/models/wiki.go index <HASH>..<HASH> 100644 --- a/models/wiki.go +++ b/models/wiki.go @@ -76,7 +76,9 @@ func (repo *Repository) LocalWikiPath() string { // UpdateLocalWiki makes sure the local copy of repository wiki is up-to-date. func (repo *Repository) UpdateLocalWiki() error { - return UpdateLocalCopyBranch(repo.WikiPath(), repo.LocalWikiPath(), "master") + // Don't pass branch name here because it fails to clone and + // checkout to a specific branch when wiki is an empty repository. + return UpdateLocalCopyBranch(repo.WikiPath(), repo.LocalWikiPath(), "") } func discardLocalWikiChanges(localPath string) error {
#<I> fix clone fail when wiki is empty
diff --git a/WebPConvert.php b/WebPConvert.php index <HASH>..<HASH> 100755 --- a/WebPConvert.php +++ b/WebPConvert.php @@ -224,25 +224,14 @@ class WebPConvert } // Save converters in the `Converters` directory to array .. - $files = array_filter(scandir(__DIR__ . '/Converters'), function ($file) { - return is_file($file); - }); + $files = array_map(function($e) { return basename($e, '.php'); }, glob(__DIR__ . '/Converters/*.php')); // .. and merge it with the $converters array, keeping the updated order of execution foreach ($files as $file) { - if (is_dir('Converters/' . $file)) { - if ($file == '.') { - continue; - } - if ($file == '..') { - continue; - } - if (in_array($file, $converters)) { - continue; - } - - $converters[] = $file; + if (in_array($file, $converters)) { + continue; } + $converters[] = $file; } self::logMessage('Order of converters to be tried: <i>' . implode('</i>, <i>', $converters) . '</i>');
Fixing array .. so it only contains filenames, thus making directory check obsolete
diff --git a/web3/main.py b/web3/main.py index <HASH>..<HASH> 100644 --- a/web3/main.py +++ b/web3/main.py @@ -169,7 +169,7 @@ class Web3(object): def positive_int_to_hex(value, bit_size=None): hex_value = remove_0x_prefix(hex(value)) if bit_size: - return hex_value.zfill(bit_size / 4) + return hex_value.zfill(int(bit_size / 4)) return ('0' * (len(hex_value) % 2)) + hex_value
[issue <I>] cast arg to int for python3 testing error
diff --git a/docs/src/pages/versions/LatestVersion.js b/docs/src/pages/versions/LatestVersion.js index <HASH>..<HASH> 100644 --- a/docs/src/pages/versions/LatestVersion.js +++ b/docs/src/pages/versions/LatestVersion.js @@ -33,7 +33,7 @@ function LatestVersion(props) { <Link {...props2} variant="secondary" - href="https://material-ui-ci.netlify.com/" + href="https://material-ui.netlify.com/" /> )} >
[docs] Update master branch docs preview URL
diff --git a/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java b/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java index <HASH>..<HASH> 100644 --- a/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java +++ b/factory/src/test/java/com/google/auto/factory/processor/AutoFactoryProcessorTest.java @@ -129,7 +129,7 @@ public class AutoFactoryProcessorTest { .processedWith(new AutoFactoryProcessor()) .failsToCompile() .withErrorContaining("AutoFactory does not support generic types") - .in(file).onLine(6).atColumn(14); + .in(file).onLine(21).atColumn(14); } @Test public void providedButNoAutoFactory() {
Fix a line number on a test
diff --git a/lib/ohai/plugins/python.rb b/lib/ohai/plugins/python.rb index <HASH>..<HASH> 100644 --- a/lib/ohai/plugins/python.rb +++ b/lib/ohai/plugins/python.rb @@ -19,16 +19,12 @@ require_plugin "languages" output = nil +python = Mash.new status = popen4("python -c \"import sys; print sys.version\"") do |pid, stdin, stdout, stderr| stdin.close output = stdout.gets.split if stdout + python[:version] = output[0] + python[:builddate] = "%s %s %s %s" % [output[2],output[3],output[4],output[5].gsub!(/\)/,'')] end -if status == 0 - languages[:python] = Mash.new - version = output[0] - builddate = "%s %s %s %s" % [output[2],output[3],output[4],output[5].gsub!(/\)/,'')] - languages[:python][:version] = version - languages[:python][:builddate] = builddate -end - +languages[:python] = python if python[:version] and python[:builddate]
make the python plugin match the java plugin in style a little more closely
diff --git a/src/DigitalOcean/CLI/SSHKeys/AddCommand.php b/src/DigitalOcean/CLI/SSHKeys/AddCommand.php index <HASH>..<HASH> 100644 --- a/src/DigitalOcean/CLI/SSHKeys/AddCommand.php +++ b/src/DigitalOcean/CLI/SSHKeys/AddCommand.php @@ -29,7 +29,7 @@ class AddCommand extends Command { $this ->setName('ssh-keys:add') - ->addArgument('name', InputArgument::REQUIRED, 'The SSH key id') + ->addArgument('name', InputArgument::REQUIRED, 'The name of the new SSH key') ->addArgument('ssh_pub_key', InputArgument::REQUIRED, 'The SSH key string') ->setDescription('Add a new public SSH key to your account') ->addOption('credentials', null, InputOption::VALUE_REQUIRED,
Updated: add command help text in CLI
diff --git a/gdown/download.py b/gdown/download.py index <HASH>..<HASH> 100644 --- a/gdown/download.py +++ b/gdown/download.py @@ -106,7 +106,7 @@ def download(url, output, quiet): pbar.close() if tmp_file: f.close() - shutil.copy(tmp_file, output) + shutil.move(tmp_file, output) except IOError as e: print(e, file=sys.stderr) return
Move tmp file instead of copying
diff --git a/andes/core/model/model.py b/andes/core/model/model.py index <HASH>..<HASH> 100644 --- a/andes/core/model/model.py +++ b/andes/core/model/model.py @@ -1323,7 +1323,7 @@ class Model: def post_init_check(self): """ - Post init checking. Warns if values of `InitChecker` is not True. + Post init checking. Warns if values of `InitChecker` are not True. """ self.get_inputs(refresh=True)
A minor grammatical error was corrected.
diff --git a/daemon/graphdriver/devmapper/deviceset.go b/daemon/graphdriver/devmapper/deviceset.go index <HASH>..<HASH> 100644 --- a/daemon/graphdriver/devmapper/deviceset.go +++ b/daemon/graphdriver/devmapper/deviceset.go @@ -1479,12 +1479,9 @@ func (devices *DeviceSet) closeTransaction() error { } func determineDriverCapabilities(version string) error { - /* - * Driver version 4.27.0 and greater support deferred activation - * feature. - */ + // Kernel driver version >= 4.27.0 support deferred removal - logrus.Debugf("devicemapper: driver version is %s", version) + logrus.Debugf("devicemapper: kernel dm driver version is %s", version) versionSplit := strings.Split(version, ".") major, err := strconv.Atoi(versionSplit[0])
graphdriver/devmapper: clarify a message Make sure user understands this is about the in-kernel driver (not the dockerd driver or smth). While at it, amend the comment as well.
diff --git a/zimsoap/zobjects.py b/zimsoap/zobjects.py index <HASH>..<HASH> 100644 --- a/zimsoap/zobjects.py +++ b/zimsoap/zobjects.py @@ -301,8 +301,13 @@ class Signature(ZObject): """ o = super(Signature, cls).from_dict(d) if d.has_key('content'): - o._content = d['content']['_content'] - o._contenttype = d['content']['type'] + # Sometimes, several contents, (one txt, other html), take last + try: + o._content = d['content']['_content'] + o._contenttype = d['content']['type'] + except TypeError: + o._content = d['content'][-1]['_content'] + o._contenttype = d['content'][-1]['type'] return o
handle several content in signatures fixes #<I> @0h<I>
diff --git a/Kwf/Model/Abstract.php b/Kwf/Model/Abstract.php index <HASH>..<HASH> 100644 --- a/Kwf/Model/Abstract.php +++ b/Kwf/Model/Abstract.php @@ -875,6 +875,8 @@ abstract class Kwf_Model_Abstract implements Kwf_Model_Interface return (!$value || $rowValue >= $value); } else if ($expr instanceof Kwf_Model_Select_Expr_Equal) { return ($rowValue == $value); + } else if ($expr instanceof Kwf_Model_Select_Expr_NotEquals) { + return ($rowValue != $value); } else if ($expr instanceof Kwf_Model_Select_Expr_LowerEqual) { return (!$value || $rowValue <= $value); } else {
added check for Kwf_Model_Select_Expr_NotEquals to Kwf_Model_Select_Expr_CompareField_Abstract
diff --git a/core/kernel/persistence/smoothsql/class.Resource.php b/core/kernel/persistence/smoothsql/class.Resource.php index <HASH>..<HASH> 100644 --- a/core/kernel/persistence/smoothsql/class.Resource.php +++ b/core/kernel/persistence/smoothsql/class.Resource.php @@ -659,9 +659,11 @@ class core_kernel_persistence_smoothsql_Resource implements core_kernel_persiste $normalizedValues[] = $value->getUri(); } elseif (is_array($value)) { foreach ($value as $val) { - $normalizedValues[] = $val instanceof core_kernel_classes_Resource - ? $val->getUri() - : $val; + if ($val !== null) { + $normalizedValues[] = $val instanceof core_kernel_classes_Resource + ? $val->getUri() + : $val; + } } } else { $normalizedValues[] = ($value == null) ? '' : $value;
Fixed Uncaught TypeError: Argument 4 passed to core_kernel_classes_Triple::createTriple() must be of the type string, null given
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -40,7 +40,7 @@ sys.path.insert(0, os.path.abspath('..')) # -- Project information ----------------------------------------------------- project = 'JAX' -copyright = '2019, Google LLC. NumPy and SciPy documentation are copyright the respective authors.' +copyright = '2020, Google LLC. NumPy and SciPy documentation are copyright the respective authors.' author = 'The JAX authors' # The short X.Y version
DOC: update webpage copyright year to <I>
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -665,7 +665,7 @@ var msbuildDefaults = { stdout: process.stdout, stderr: process.stderr, maxBuffer: MAX_BUFFER, - verbosity: 'normal', + verbosity: 'diag', errorOnFail: true, toolsVersion: msBuildToolsVersion };
turning on diag verbosity in msbuild.
diff --git a/src/Behat/MinkExtension/ServiceContainer/Driver/AppiumFactory.php b/src/Behat/MinkExtension/ServiceContainer/Driver/AppiumFactory.php index <HASH>..<HASH> 100644 --- a/src/Behat/MinkExtension/ServiceContainer/Driver/AppiumFactory.php +++ b/src/Behat/MinkExtension/ServiceContainer/Driver/AppiumFactory.php @@ -24,8 +24,8 @@ class AppiumFactory extends Selenium2Factory ->children() ->scalarNode('browser')->defaultValue('remote')->end() ->append($this->getCapabilitiesNode()) - ->scalarNode('appium_host')->defaultValue(getenv('APPIUM_HOST'))->end() - ->scalarNode('appium_port')->defaultValue(getenv('APPIUM_PORT'))->end() + ->scalarNode('appium_host')->defaultValue('0.0.0.0')->end() + ->scalarNode('appium_port')->defaultValue('4723')->end() ->end() ; }
Removed ENV variables and added Appium default server and port
diff --git a/lib/nrser/refinements/hash.rb b/lib/nrser/refinements/hash.rb index <HASH>..<HASH> 100644 --- a/lib/nrser/refinements/hash.rb +++ b/lib/nrser/refinements/hash.rb @@ -14,5 +14,9 @@ module NRSER end alias_method :omit, :except + + def leaves + NRSER.leaves self + end # #leaves end # Hash end # NRSER \ No newline at end of file
add NRSER.leaves to Hash refeinement
diff --git a/src/org/opencms/main/CmsContextInfo.java b/src/org/opencms/main/CmsContextInfo.java index <HASH>..<HASH> 100644 --- a/src/org/opencms/main/CmsContextInfo.java +++ b/src/org/opencms/main/CmsContextInfo.java @@ -123,7 +123,7 @@ public class CmsContextInfo { setProjectName(CmsProject.ONLINE_PROJECT_NAME); setRequestedUri("/"); setSiteRoot("/"); - setRequestMatcher(OpenCms.getSiteManager().getWorkplaceSiteMatcher()); + setRequestMatcher(CmsSiteMatcher.DEFAULT_MATCHER); setLocaleName(CmsLocaleManager.getDefaultLocale().toString()); setEncoding(OpenCms.getSystemInfo().getDefaultEncoding()); setRemoteAddr(CmsContextInfo.LOCALHOST);
Fixing issue where sitemanager was accessed before being initialized.
diff --git a/pyemma/msm/analysis/dense/pcca.py b/pyemma/msm/analysis/dense/pcca.py index <HASH>..<HASH> 100644 --- a/pyemma/msm/analysis/dense/pcca.py +++ b/pyemma/msm/analysis/dense/pcca.py @@ -566,6 +566,6 @@ class PCCA: """ res = [] assignment = self.metastable_assignment - for i in self.m: + for i in range(self.m): res.append(np.where(assignment == i)[0]) return res \ No newline at end of file
[msm.analysis.dense.pcca]: corrected iteration
diff --git a/notifications/apps.py b/notifications/apps.py index <HASH>..<HASH> 100644 --- a/notifications/apps.py +++ b/notifications/apps.py @@ -5,6 +5,7 @@ from django.apps import AppConfig class Config(AppConfig): name = "notifications" + default_auto_field = 'django.db.models.AutoField' def ready(self): super(Config, self).ready()
Added default auto field in application config
diff --git a/lib/fog/storage/rackspace.rb b/lib/fog/storage/rackspace.rb index <HASH>..<HASH> 100644 --- a/lib/fog/storage/rackspace.rb +++ b/lib/fog/storage/rackspace.rb @@ -42,14 +42,14 @@ module Fog if data.is_a?(String) metadata[:body] = data - metadata[:headers]['Content-Length'] = metadata[:body].size.to_s + metadata[:headers]['Content-Length'] = metadata[:body].size else filename = ::File.basename(data.path) unless (mime_types = MIME::Types.of(filename)).empty? metadata[:headers]['Content-Type'] = mime_types.first.content_type end - metadata[:body] = data.read - metadata[:headers]['Content-Length'] = ::File.size(data.path).to_s + metadata[:body] = data + metadata[:headers]['Content-Length'] = ::File.size(data.path) end # metadata[:headers]['Content-MD5'] = Base64.encode64(Digest::MD5.digest(metadata[:body])).strip metadata
[storage|rackspace] fix streaming bug. Bug was causing whole file to load to memory before upload thanks meskyanichi
diff --git a/src/geo/ui/widgets/category/model.js b/src/geo/ui/widgets/category/model.js index <HASH>..<HASH> 100644 --- a/src/geo/ui/widgets/category/model.js +++ b/src/geo/ui/widgets/category/model.js @@ -85,7 +85,9 @@ module.exports = WidgetModel.extend({ applyCategoryColors: function() { this.set('categoryColors', true); - this.trigger('applyCategoryColors', this); + this.trigger('applyCategoryColors', this._data.map(function(m){ + return [ m.get('name'), m.get('color') ]; + }), this); }, cancelCategoryColors: function() {
When category colors are applied, trigger that change with categories + colors data
diff --git a/salt/grains/core.py b/salt/grains/core.py index <HASH>..<HASH> 100644 --- a/salt/grains/core.py +++ b/salt/grains/core.py @@ -970,7 +970,7 @@ def id_(): ''' return {'id': __opts__.get('id', '')} -_REPLACE_LINUX_RE = re.compile(r'linux', re.IGNORECASE) +_REPLACE_LINUX_RE = re.compile(r'\Wlinux', re.IGNORECASE) # This maps (at most) the first ten characters (no spaces, lowercased) of # 'osfullname' to the 'os' grain that Salt traditionally uses.
Only remove the word linux from distroname when its not part of the name This will now still replace "CentOS Linux" with "CentOS" while leaving "CloudLinux" unmodified. Fixes #<I>
diff --git a/form_error_reporting.py b/form_error_reporting.py index <HASH>..<HASH> 100644 --- a/form_error_reporting.py +++ b/form_error_reporting.py @@ -183,7 +183,8 @@ class GARequestErrorReportingMixin(GAErrorReportingMixin): request = self.get_ga_request() if not request: return query_dict - user_ip = request.META.get('REMOTE_ADDR') + user_ip = request.META.get('HTTP_X_FORWARDED_FOR', request.META.get('REMOTE_ADDR', '')) + user_ip = user_ip.split(',')[0].strip() user_agent = request.META.get('HTTP_USER_AGENT') if user_ip: query_dict['uip'] = user_ip
Respect forwarded header when reporting user’s IP address
diff --git a/app/interactors/pavlov/interactor.rb b/app/interactors/pavlov/interactor.rb index <HASH>..<HASH> 100644 --- a/app/interactors/pavlov/interactor.rb +++ b/app/interactors/pavlov/interactor.rb @@ -1,4 +1,5 @@ require 'active_support/concern' +require 'active_support/inflector' module Pavlov module Interactor diff --git a/app/interactors/pavlov/operation.rb b/app/interactors/pavlov/operation.rb index <HASH>..<HASH> 100644 --- a/app/interactors/pavlov/operation.rb +++ b/app/interactors/pavlov/operation.rb @@ -9,7 +9,7 @@ module Pavlov end def raise_unauthorized - raise CanCan::AccessDenied + raise CanCan::AccessDenied, 'Unauthorized' end def check_authority
Bugfix, boyscout Added a require so tests can be run standalone Raise now with message, so it doesn't use the Class as message
diff --git a/start.py b/start.py index <HASH>..<HASH> 100755 --- a/start.py +++ b/start.py @@ -29,7 +29,7 @@ def main(): else: python_plugin_version = get_version() getgauge_version = version.LooseVersion(pkg_resources.get_distribution('getgauge').version) - if list(map(int, python_plugin_version.split(".")[0:2])) != getgauge_version.version[0:2]: + if (list(map(int, python_plugin_version.split(".")[0:3])) != getgauge_version.version[0:3]) or ('dev' in getgauge_version.version and 'nightly' not in python_plugin_version) or ('dev' not in getgauge_version.version and 'nightly' in python_plugin_version): show_error_exit(python_plugin_version, getgauge_version) if 'dev' in getgauge_version.version and 'nightly' in python_plugin_version: python_plugin_version.replace("-","")
Fixing getgauge and python version mismatch
diff --git a/lib/faker/internet.rb b/lib/faker/internet.rb index <HASH>..<HASH> 100644 --- a/lib/faker/internet.rb +++ b/lib/faker/internet.rb @@ -1,3 +1,4 @@ +# encoding: utf-8 module Faker class Internet < Base class << self
Kill complaints about the utf characters in the file
diff --git a/flask_unchained/bundles/sqlalchemy/extensions/migrate.py b/flask_unchained/bundles/sqlalchemy/extensions/migrate.py index <HASH>..<HASH> 100644 --- a/flask_unchained/bundles/sqlalchemy/extensions/migrate.py +++ b/flask_unchained/bundles/sqlalchemy/extensions/migrate.py @@ -13,7 +13,7 @@ class Migrate(BaseMigrate): @unchained.inject('db') def init_app(self, app: FlaskUnchained, db=injectable): - alembic_config = app.config.get('ALEMBIC', {}) + alembic_config = app.config.setdefault('ALEMBIC', {}) alembic_config.setdefault('script_location', 'db/migrations') self.configure(Migrate.configure_alembic_template_directory)
make default setting of the alembic migrations folder to be accessible from current_app
diff --git a/tests/runners/browser_test_runner_tests.js b/tests/runners/browser_test_runner_tests.js index <HASH>..<HASH> 100644 --- a/tests/runners/browser_test_runner_tests.js +++ b/tests/runners/browser_test_runner_tests.js @@ -300,7 +300,7 @@ describe('browser test runner', function() { it('allows to cancel the timeout', function(done) { launcher.settings.exe = 'node'; - launcher.settings.args = [path.join(__dirname, 'fixtures/processes/just-running.js')]; + launcher.settings.args = [path.join(__dirname, '../fixtures/processes/just-running.js')]; runner.start(function() { expect(reporter.results.length).to.eq(0); done(); diff --git a/tests/utils/reporter_tests.js b/tests/utils/reporter_tests.js index <HASH>..<HASH> 100644 --- a/tests/utils/reporter_tests.js +++ b/tests/utils/reporter_tests.js @@ -68,7 +68,9 @@ describe('Reporter', function() { sinon.match.any, sinon.match.any); - fs.unlinkSync('report.xml'); + return reporter.close().then(function() { + fs.unlinkSync('report.xml'); + }); }); });
Fix flaky tests Fix wrong fixture path causing a different stderr on slow environments. Ensure report file is closed before trying to remove it.
diff --git a/bundles/as2/lib/sprout/tasks/mtasc_task.rb b/bundles/as2/lib/sprout/tasks/mtasc_task.rb index <HASH>..<HASH> 100644 --- a/bundles/as2/lib/sprout/tasks/mtasc_task.rb +++ b/bundles/as2/lib/sprout/tasks/mtasc_task.rb @@ -155,6 +155,7 @@ EOF end add_param(:pack, :paths) do |p| + p.delimiter = ' ' p.description = "Compile all the files contained in specified package - not recursively (eg to compile files in c:\flash\code\my\app do mtasc -cp c:\flash\code -pack my/app)." end
Fixed pack delimiter for MTASCTask
diff --git a/src/PokeApi.php b/src/PokeApi.php index <HASH>..<HASH> 100644 --- a/src/PokeApi.php +++ b/src/PokeApi.php @@ -27,6 +27,13 @@ class PokeApi return $this->sendRequest($url); } + + public function berryFlavor($lookUp) + { + $url = $this->baseUrl.'berry-flavor/'.$lookUp; + + return $this->sendRequest($url); + } public function sendRequest($url) {
Update PokeApi.php
diff --git a/tests/Mongolid/Serializer/Type/ObjectIDTest.php b/tests/Mongolid/Serializer/Type/ObjectIDTest.php index <HASH>..<HASH> 100644 --- a/tests/Mongolid/Serializer/Type/ObjectIDTest.php +++ b/tests/Mongolid/Serializer/Type/ObjectIDTest.php @@ -25,6 +25,7 @@ class ObjectIDTest extends TestCase */ public function setUp() { + parent::setUp(); $this->mongoId = new MongoObjectID($this->stringId); } diff --git a/tests/Mongolid/Serializer/Type/UTCDatetimeTest.php b/tests/Mongolid/Serializer/Type/UTCDatetimeTest.php index <HASH>..<HASH> 100644 --- a/tests/Mongolid/Serializer/Type/UTCDatetimeTest.php +++ b/tests/Mongolid/Serializer/Type/UTCDatetimeTest.php @@ -26,6 +26,7 @@ class UTCDateTimeTest extends TestCase */ public function setUp() { + parent::setUp(); $now = DateTime::createFromFormat('Y-m-d H:i:s', $this->formatedDate); $this->mongoDate = new MongoUTCDateTime($now->getTimestamp()*1000); }
Added missing parent::setUp calls
diff --git a/src/main/java/com/corundumstudio/socketio/protocol/Event.java b/src/main/java/com/corundumstudio/socketio/protocol/Event.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/corundumstudio/socketio/protocol/Event.java +++ b/src/main/java/com/corundumstudio/socketio/protocol/Event.java @@ -17,7 +17,7 @@ package com.corundumstudio.socketio.protocol; import java.util.List; -class Event { +public class Event { private String name; private List<Object> args;
Make "Event" class publish In order to create custom serialization code (using `JsonSupport`) I need to be able to create `Event` classes
diff --git a/test/pem.js b/test/pem.js index <HASH>..<HASH> 100644 --- a/test/pem.js +++ b/test/pem.js @@ -15,7 +15,7 @@ suite( 'JSON Web Key', function() { } }) - test( 'parse a PEM encoded public key', function() { + test( 'parse a PEM encoded RSA public key', function() { var key = JSONWebKey.fromPEM( keys.rsa.public ) assert.deepEqual( key, JSONWebKey.fromJSON({ kty: 'RSA', @@ -24,7 +24,7 @@ suite( 'JSON Web Key', function() { })) }) - test( 'parse a PEM encoded private key', function() { + test( 'parse a PEM encoded RSA private key', function() { var key = JSONWebKey.fromPEM( keys.rsa.private ) assert.deepEqual( key, JSONWebKey.fromJSON({ kty: 'RSA',
Update test/pem: Enhance wording
diff --git a/docs/src/modules/utils/generateMarkdown.js b/docs/src/modules/utils/generateMarkdown.js index <HASH>..<HASH> 100644 --- a/docs/src/modules/utils/generateMarkdown.js +++ b/docs/src/modules/utils/generateMarkdown.js @@ -366,7 +366,7 @@ ${pagesMarkdown } function generateImportStatement(reactAPI) { - const source = reactAPI.filename + const source = normalizePath(reactAPI.filename) // determine the published package name .replace( /\/packages\/material-ui(-(.+?))?\/src/,
[core] Fix markdown generation on Windows (#<I>)
diff --git a/lib/shelly/cli/deploy.rb b/lib/shelly/cli/deploy.rb index <HASH>..<HASH> 100644 --- a/lib/shelly/cli/deploy.rb +++ b/lib/shelly/cli/deploy.rb @@ -60,6 +60,7 @@ module Shelly desc "pending", "Show commits which haven't been deployed yet" def pending app = multiple_clouds(options[:cloud], "deploy pending") + app.git_fetch_remote if app.deployed? commits = app.pending_commits if commits.present? diff --git a/spec/shelly/cli/deploy_spec.rb b/spec/shelly/cli/deploy_spec.rb index <HASH>..<HASH> 100644 --- a/spec/shelly/cli/deploy_spec.rb +++ b/spec/shelly/cli/deploy_spec.rb @@ -115,6 +115,12 @@ describe Shelly::CLI::Deploy do hooks(@deploys, :pending).should include(:inside_git_repository?) end + it "should fetch git references from shelly" do + @app.should_receive(:git_fetch_remote) + @app.stub(:pending_commits => "commit") + invoke(@deploys, :pending) + end + context "when application has been deployed" do context "and has pending commits to deploy" do it "should display them" do
Fetch references before showing not deployed commits [#<I>]
diff --git a/service_configuration_lib/spark_config.py b/service_configuration_lib/spark_config.py index <HASH>..<HASH> 100644 --- a/service_configuration_lib/spark_config.py +++ b/service_configuration_lib/spark_config.py @@ -870,7 +870,7 @@ def _emit_resource_requirements( writer.send((metric_key, int(time.time()), required_quantity)) -def _get_spark_hourly_cost( +def get_spark_hourly_cost( clusterman_metrics, resources: Mapping[str, int], cluster: str, @@ -913,7 +913,7 @@ def send_and_calculate_resources_cost( cluster = spark_conf['spark.executorEnv.PAASTA_CLUSTER'] app_name = spark_conf['spark.app.name'] resources = get_resources_requested(spark_conf) - hourly_cost = _get_spark_hourly_cost(clusterman_metrics, resources, cluster, pool) + hourly_cost = get_spark_hourly_cost(clusterman_metrics, resources, cluster, pool) _emit_resource_requirements( clusterman_metrics, resources, app_name, spark_web_url, cluster, pool, )
Make api for spark hourly cost public
diff --git a/plugins/jobs/plugin.go b/plugins/jobs/plugin.go index <HASH>..<HASH> 100644 --- a/plugins/jobs/plugin.go +++ b/plugins/jobs/plugin.go @@ -224,6 +224,7 @@ func (p *Plugin) Serve() chan error { //nolint:gocognit if err != nil { p.events.Push(events.JobEvent{ Event: events.EventJobError, + Error: err, ID: jb.ID(), Start: start, Elapsed: time.Since(start), @@ -248,6 +249,7 @@ func (p *Plugin) Serve() chan error { //nolint:gocognit p.events.Push(events.JobEvent{ Event: events.EventJobError, ID: jb.ID(), + Error: err, Start: start, Elapsed: time.Since(start), }) @@ -271,6 +273,7 @@ func (p *Plugin) Serve() chan error { //nolint:gocognit p.events.Push(events.JobEvent{ Event: events.EventJobError, ID: jb.ID(), + Error: err, Start: start, Elapsed: time.Since(start), }) @@ -295,6 +298,7 @@ func (p *Plugin) Serve() chan error { //nolint:gocognit Event: events.EventJobError, ID: jb.ID(), Start: start, + Error: err, Elapsed: time.Since(start), }) p.putPayload(exec)
Add error to the EventJobError event
diff --git a/src/ol/geom/point.js b/src/ol/geom/point.js index <HASH>..<HASH> 100644 --- a/src/ol/geom/point.js +++ b/src/ol/geom/point.js @@ -13,6 +13,7 @@ goog.require('ol.geom.flat'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. + * @todo stability experimental */ ol.geom.Point = function(coordinates, opt_layout) { goog.base(this); @@ -55,6 +56,7 @@ ol.geom.Point.prototype.closestPointXY = /** * @return {ol.geom.RawPoint} Coordinates. + * @todo stability experimental */ ol.geom.Point.prototype.getCoordinates = function() { return this.flatCoordinates.slice(); @@ -86,6 +88,7 @@ ol.geom.Point.prototype.getType = function() { /** * @param {ol.geom.RawPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. + * @todo stability experimental */ ol.geom.Point.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) {
Add stability annotation to ol.geom.Point
diff --git a/test/unit/import/cat1/procedure_order_importer_test.rb b/test/unit/import/cat1/procedure_order_importer_test.rb index <HASH>..<HASH> 100644 --- a/test/unit/import/cat1/procedure_order_importer_test.rb +++ b/test/unit/import/cat1/procedure_order_importer_test.rb @@ -12,6 +12,6 @@ class ProcedureOrderImporterTest < MiniTest::Unit::TestCase assert procedure_order.codes['CPT'].include?('90870') assert procedure_order.oid expected_start = HealthDataStandards::Util::HL7Helper.timestamp_to_integer('20110524094323') - assert_equal expected_start, procedure_order.start_time + assert_equal expected_start, procedure_order.time end end \ No newline at end of file
fixing test to reflect that procedure order should use time, not start_time.
diff --git a/hikaricp-common/src/main/java/com/zaxxer/hikari/proxy/ConnectionProxy.java b/hikaricp-common/src/main/java/com/zaxxer/hikari/proxy/ConnectionProxy.java index <HASH>..<HASH> 100644 --- a/hikaricp-common/src/main/java/com/zaxxer/hikari/proxy/ConnectionProxy.java +++ b/hikaricp-common/src/main/java/com/zaxxer/hikari/proxy/ConnectionProxy.java @@ -109,7 +109,7 @@ public abstract class ConnectionProxy implements IHikariConnectionProxy LOGGER.warn(String.format("Connection %s (%s) marked as broken because of SQLSTATE(%s), ErrorCode(%d).", delegate.toString(), parentPool.toString(), sqlState, sqle.getErrorCode()), sqle); } - else if (sqle.getNextException() instanceof SQLException) { + else if (sqle.getNextException() instanceof SQLException && sqle != sqle.getNextException()) { checkException(sqle.getNextException()); } }
Fix #<I> Guard against drivers that construct an SQLException where the 'cause' is self-referential. Hopefully the cycle is not multi-layers deep, because this check will only guard against one "loop".
diff --git a/Core/src/main/java/com/eden/orchid/api/generators/OrchidGenerators.java b/Core/src/main/java/com/eden/orchid/api/generators/OrchidGenerators.java index <HASH>..<HASH> 100644 --- a/Core/src/main/java/com/eden/orchid/api/generators/OrchidGenerators.java +++ b/Core/src/main/java/com/eden/orchid/api/generators/OrchidGenerators.java @@ -87,9 +87,18 @@ public final class OrchidGenerators { private void useGenerator(OrchidGenerator generator) { Clog.d("Using generator: #{$1}:[#{$2 | className}]", generator.getPriority(), generator); - generator.startGeneration((!EdenUtils.isEmpty(generator.getName())) - ? indexPages.get(generator.getName()) - : new ArrayList<>()); + + List<OrchidPage> generatorPages = null; + + if(!EdenUtils.isEmpty(generator.getName())) { + generatorPages = indexPages.get(generator.getName()); + } + + if(generatorPages == null) { + generatorPages = new ArrayList<>(); + } + + generator.startGeneration(generatorPages); } public boolean shouldUseGenerator(OrchidGenerator generator) {
Fix null list being sent to generators
diff --git a/salt/fileserver/__init__.py b/salt/fileserver/__init__.py index <HASH>..<HASH> 100644 --- a/salt/fileserver/__init__.py +++ b/salt/fileserver/__init__.py @@ -222,7 +222,9 @@ def reap_fileserver_cache_dir(cache_base, find_func): # This will only remove the directory on the second time # "_reap_cache" is called (which is intentional) if len(dirs) == 0 and len(files) == 0: - os.rmdir(root) + # only remove if empty directory is older than 60s + if time.time() - os.path.getctime(root) > 60: + os.rmdir(root) continue # if not, lets check the files in the directory for file_ in files:
Fix for issue #<I> This resolves issues when the freshly created directory is removed by fileserver.update.
diff --git a/src/Vkontakte.php b/src/Vkontakte.php index <HASH>..<HASH> 100644 --- a/src/Vkontakte.php +++ b/src/Vkontakte.php @@ -165,10 +165,10 @@ class Vkontakte extends AbstractProvider } protected function createResourceOwner(array $response, AccessToken $token) { - $response = reset($response['response']); - $additional = $token->getValues(); - $response['email'] = !empty($additional['email']) ? $additional['email'] : null; - $response['id'] = !empty($additional['user_id']) ? $additional['user_id'] : null; + $response = reset($response['response']); + $additional = $token->getValues(); + if (!empty($additional['email'])) $response['email'] = $additional['email']; + if (!empty($additional['user_id'])) $response['id'] = $additional['user_id']; return new User($response, $response['id']); }
Fix bug when `id` and `email` was set to null even if they're was in user response
diff --git a/src/useSprings.js b/src/useSprings.js index <HASH>..<HASH> 100644 --- a/src/useSprings.js +++ b/src/useSprings.js @@ -26,7 +26,7 @@ export const useSprings = (length, propsArg) => { [length] ) - const ref = springs[0].props.ref + const ref = springs[0] ? springs[0].props.ref : void 0 const { start, update, stop } = useMemo( () => ({ /** Apply any pending updates */
fix: useSprings "length" of 0 Reported by: <URL>
diff --git a/xbmcswift2/listitem.py b/xbmcswift2/listitem.py index <HASH>..<HASH> 100644 --- a/xbmcswift2/listitem.py +++ b/xbmcswift2/listitem.py @@ -212,11 +212,8 @@ class ListItem(object): listitem.set_property(key, val) if stream_info: - assert isinstance(stream_info, dict) - for stream_type in ('video', 'audio', 'subtitle'): - if stream_type in stream_info: - stream_values = stream_info[stream_type] - listitem.add_stream_info(stream_type, stream_values) + for stream_type, stream_values in stream_info.items(): + listitem.add_stream_info(stream_type, stream_values) if context_menu: listitem.add_context_menu_items(context_menu, replace_context_menu)
Don't allow stream_info to fail silently
diff --git a/imgaug/augmenters/color.py b/imgaug/augmenters/color.py index <HASH>..<HASH> 100644 --- a/imgaug/augmenters/color.py +++ b/imgaug/augmenters/color.py @@ -282,6 +282,9 @@ class ChangeColorspace(Augmenter): # HSV "HSV2RGB": cv2.COLOR_HSV2RGB, "HSV2BGR": cv2.COLOR_HSV2BGR, + # HLS + "HLS2RGB": cv2.COLOR_HLS2RGB, + "HLS2BGR": cv2.COLOR_HLS2BGR, } def __init__(self, to_colorspace, from_colorspace="RGB", alpha=1.0, name=None, deterministic=False, random_state=None):
add HLS support for WithColorspace
diff --git a/kerncraft/models/benchmark.py b/kerncraft/models/benchmark.py index <HASH>..<HASH> 100644 --- a/kerncraft/models/benchmark.py +++ b/kerncraft/models/benchmark.py @@ -106,6 +106,7 @@ class Benchmark: sum(self.kernel._flops.values())/(time_per_repetition/iterations_per_repetition)/1e6 self.results['MEM BW [MByte/s]'] = float(result['Memory BW [MBytes/s]'][0]) self.results['Performance [MLUP/s]'] = (iterations_per_repetition/time_per_repetition)/1e6 + self.results['Performance[MIt/s]'] = (iterations_per_repetition/time_per_repetition)/1e6 def report(self): if self._args.verbose > 0: @@ -118,6 +119,7 @@ class Benchmark: self.results['MEM volume (per repetition) [B]']) print('Performance [MFLOP/s]', self.results['Performance [MFLOP/s]']) print('Performance [MLUP/s]', self.results['Performance [MLUP/s]']) + print('Performance [It/s]', self.results['Performance[MIt/s]']) if self._args.verbose > 0: print('MEM BW [MByte/s]:', self.results['MEM BW [MByte/s]']) print()
added output for It/s (although it was already present as LUP/s)
diff --git a/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php b/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php +++ b/src/Illuminate/Foundation/Exceptions/views/illustrated-layout.blade.php @@ -1,4 +1,4 @@ -<!doctype html> +<!DOCTYPE html> <html lang="en"> <head> <title>@yield('title')</title>
Use consistent uppercase for DOCTYPE This is in line with the Google HTML guide and with other files in the framework. <URL>
diff --git a/src/utils/promise.js b/src/utils/promise.js index <HASH>..<HASH> 100644 --- a/src/utils/promise.js +++ b/src/utils/promise.js @@ -119,6 +119,7 @@ define( function () { } catch ( e ) { if ( !called ) { // 2.3.3.3.4.1 reject( e ); // 2.3.3.3.4.2 + called = true; return; } }
all tests in the Promises/A+ compliance suite pass! w<I>t!
diff --git a/lib/megam/api/version.rb b/lib/megam/api/version.rb index <HASH>..<HASH> 100644 --- a/lib/megam/api/version.rb +++ b/lib/megam/api/version.rb @@ -1,5 +1,5 @@ module Megam class API - VERSION = "0.8.2" + VERSION = "0.9.0" end end
changed the version to <I>
diff --git a/bin/wsdump.py b/bin/wsdump.py index <HASH>..<HASH> 100755 --- a/bin/wsdump.py +++ b/bin/wsdump.py @@ -59,7 +59,7 @@ class InteractiveConsole(code.InteractiveConsole): def write(self, data): sys.stdout.write("\033[2K\033[E") # sys.stdout.write("\n") - sys.stdout.write("\033[34m" + data + "\033[39m") + sys.stdout.write("\033[34m< " + data + "\033[39m") sys.stdout.write("\n> ") sys.stdout.flush() @@ -117,9 +117,9 @@ def main(): opcode, data = recv() msg = None if not args.verbose and opcode in OPCODE_DATA: - msg = "< %s" % data + msg = data elif args.verbose: - msg = "< %s: %s" % (websocket.ABNF.OPCODE_MAP.get(opcode), data) + msg = "%s: %s" % (websocket.ABNF.OPCODE_MAP.get(opcode), data) if msg is not None: console.write(msg)
console decoration of wsdump.py inside InteractiveConsole
diff --git a/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/util/SecureRandomFactory.java b/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/util/SecureRandomFactory.java index <HASH>..<HASH> 100644 --- a/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/util/SecureRandomFactory.java +++ b/httpcache4j-api/src/main/java/org/codehaus/httpcache4j/util/SecureRandomFactory.java @@ -8,14 +8,15 @@ import java.security.SecureRandom; */ public class SecureRandomFactory { public static SecureRandom getRandom() { - byte[] seed = SecureRandom.getSeed(512); - return getRandom(seed); + return getRandom(null); } public static SecureRandom getRandom(byte[] seed) { try { SecureRandom rnd = SecureRandom.getInstance("SHA1PRNG"); - rnd.setSeed(seed); + if (seed != null) { + rnd.setSeed(seed); + } return rnd; } catch (NoSuchAlgorithmException e) { throw new IllegalStateException(e);
Apparently the generate seed method is stupidly slow.
diff --git a/differentiate/diff.py b/differentiate/diff.py index <HASH>..<HASH> 100644 --- a/differentiate/diff.py +++ b/differentiate/diff.py @@ -9,11 +9,13 @@ def diff(x, y, x_only=False, y_only=False): :param y_only: Return only unique values from y :return: list of unique values """ - # Validate both lists, confirm either are empty + # Validate both lists, confirm neither are empty if len(x) == 0 and len(y) > 0: return y # All y values are unique if x is empty elif len(y) == 0 and len(x) > 0: return x # All x values are unique if y is empty + elif len(y) == 0 and len(x) == 0: + return [] # Convert dictionaries to lists of tuples if isinstance(x, dict):
Added condition to IF statement to check if both lists are empty
diff --git a/net_transport.go b/net_transport.go index <HASH>..<HASH> 100644 --- a/net_transport.go +++ b/net_transport.go @@ -5,13 +5,13 @@ import ( "context" "errors" "fmt" - "github.com/hashicorp/go-hclog" "io" "net" "os" "sync" "time" + "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-msgpack/codec" ) @@ -122,7 +122,6 @@ type StreamLayer interface { type netConn struct { target ServerAddress conn net.Conn - r *bufio.Reader w *bufio.Writer dec *codec.Decoder enc *codec.Encoder @@ -344,12 +343,10 @@ func (n *NetworkTransport) getConn(target ServerAddress) (*netConn, error) { netConn := &netConn{ target: target, conn: conn, - r: bufio.NewReader(conn), + dec: codec.NewDecoder(bufio.NewReader(conn), &codec.MsgpackHandle{}), w: bufio.NewWriter(conn), } - // Setup encoder/decoders - netConn.dec = codec.NewDecoder(netConn.r, &codec.MsgpackHandle{}) netConn.enc = codec.NewEncoder(netConn.w, &codec.MsgpackHandle{}) // Done
Remove unused field from netConn
diff --git a/src/main/java/eu/hansolo/tilesfx/skins/SunburstChartTileSkin.java b/src/main/java/eu/hansolo/tilesfx/skins/SunburstChartTileSkin.java index <HASH>..<HASH> 100644 --- a/src/main/java/eu/hansolo/tilesfx/skins/SunburstChartTileSkin.java +++ b/src/main/java/eu/hansolo/tilesfx/skins/SunburstChartTileSkin.java @@ -63,7 +63,6 @@ public class SunburstChartTileSkin extends TileSkin { TreeNode<ChartData> tree = tile.getSunburstChart().getTreeNode(); if (null == tree) { return; } tree.setOnTreeNodeEvent(e -> { - System.out.println("TreeNodeEvent"); EventType type = e.getType(); if (EventType.NODE_SELECTED == type) { TreeNode<ChartData> segment = e.getSource();
removed System.out.println
diff --git a/lib/python/vdm/static/js/vdm.ui.js b/lib/python/vdm/static/js/vdm.ui.js index <HASH>..<HASH> 100644 --- a/lib/python/vdm/static/js/vdm.ui.js +++ b/lib/python/vdm/static/js/vdm.ui.js @@ -3365,13 +3365,27 @@ var loadPage = function() { e.stopPropagation() return; } + var role_with_space = $('#txtUserRole').val().split(','); + var roles = [] + + for(var i = 0; i < role_with_space.length; i++){ + role_trim = role_with_space[i].trim() + if(role_trim.indexOf(' ') > -1){ + $('#errorRole').show() + $('#errorRole').html('Only alphabets, numbers, _ and . are allowed.') + e.preventDefault() + e.stopPropagation() + return; + } + roles.push(role_trim) + } + role = roles.join() ShowSavingStatus(); var username = $('#txtOrgUser').val(); var newUsername = $('#txtUser').val(); var password = encodeURIComponent($('#txtPassword').val()); - var role = $('#txtUserRole').val(); var requestType = "POST"; var requestUser = ""; var database_id = 0;
VDM-<I> Modified code to handle issue while starting VDM after adding multiple user roles.
diff --git a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java index <HASH>..<HASH> 100644 --- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java +++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordReader.java @@ -461,7 +461,7 @@ public class ColumnFamilyRecordReader extends RecordReader<ByteBuffer, SortedMap } // nothing new? reached the end - if (lastRow != null && (rows.get(0).key.equals(lastRow.key) || rows.get(0).columns.get(0).column.equals(startColumn))) + if (lastRow != null && (rows.get(0).key.equals(lastRow.key) || rows.get(0).columns.get(0).column.name.equals(startColumn))) { rows = null; return;
fix bad comparison in hadoop cf recorder reader patch by dbrosius; reviewed by jbellis for CASSANDRA-<I>
diff --git a/uncompyle6/scanners/scanner26.py b/uncompyle6/scanners/scanner26.py index <HASH>..<HASH> 100755 --- a/uncompyle6/scanners/scanner26.py +++ b/uncompyle6/scanners/scanner26.py @@ -174,7 +174,7 @@ class Scanner26(scan.Scanner2): collection_type = op_name.split("_")[1] next_tokens = self.bound_collection_from_tokens( - tokens, t, i, "CONST_%s" % collection_type + tokens, t, len(tokens), "CONST_%s" % collection_type ) if next_tokens is not None: tokens = next_tokens
Correct bug in long literal replacement for <I>-7
diff --git a/lib/cancan/model_adapters/active_record_adapter.rb b/lib/cancan/model_adapters/active_record_adapter.rb index <HASH>..<HASH> 100644 --- a/lib/cancan/model_adapters/active_record_adapter.rb +++ b/lib/cancan/model_adapters/active_record_adapter.rb @@ -99,7 +99,7 @@ module CanCan def override_scope conditions = @rules.map(&:conditions).compact - if conditions.any? { |c| c.kind_of?(ActiveRecord::Relation) } + if defined?(ActiveRecord::Relation) && conditions.any? { |c| c.kind_of?(ActiveRecord::Relation) } if conditions.size == 1 conditions.first else
make sure ActiveRecord::Relation is defined before checking conditions against it so Rails 2 is supported again - closes #<I>
diff --git a/lib/Cake/Console/Command/UpgradeShell.php b/lib/Cake/Console/Command/UpgradeShell.php index <HASH>..<HASH> 100644 --- a/lib/Cake/Console/Command/UpgradeShell.php +++ b/lib/Cake/Console/Command/UpgradeShell.php @@ -702,11 +702,11 @@ class UpgradeShell extends Shell { * @return void */ protected function _findFiles($extensions = '') { + $this->_files = array(); foreach ($this->_paths as $path) { if (!is_dir($path)) { continue; } - $this->_files = array(); $Iterator = new RegexIterator( new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)), '/^.+\.(' . $extensions . ')$/i',
Fixed bug in UpgradeShell::findFiles(). $this->_files was reset on each loop through paths, which means, for example, if you still had the old 'views' directory kicking around the results from 'View' would be overwritten.
diff --git a/termbox/compat.go b/termbox/compat.go index <HASH>..<HASH> 100644 --- a/termbox/compat.go +++ b/termbox/compat.go @@ -286,7 +286,10 @@ func makeEvent(tev tcell.Event) Event { return Event{Type: EventResize, Width: w, Height: h} case *tcell.EventKey: k := tev.Key() - ch := tev.Rune() + ch := rune(0) + if k == tcell.KeyRune { + ch = tev.Rune() + } mod := tev.Mod() return Event{ Type: EventKey,
fixes #<I> Emulation problem with control keys
diff --git a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/IgnoreInFlightDataITCase.java b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/IgnoreInFlightDataITCase.java index <HASH>..<HASH> 100644 --- a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/IgnoreInFlightDataITCase.java +++ b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/IgnoreInFlightDataITCase.java @@ -258,6 +258,17 @@ public class IgnoreInFlightDataITCase extends TestLogger { @Override public void snapshotState(FunctionSnapshotContext context) throws Exception { + Iterator<Integer> integerIterator = valueState.get().iterator(); + + if (!integerIterator.hasNext() + || integerIterator.next() < PARALLELISM + || (context.getCheckpointId() > 1 + && lastCheckpointValue.get().get() < PARALLELISM)) { + // Try to restart task. + throw new RuntimeException( + "Not enough data to guarantee the in-flight data were generated before the first checkpoint"); + } + if (context.getCheckpointId() > 2) { // It is possible if checkpoint was triggered too fast after restart. return; // Just ignore it.
[FLINK-<I>][tests] Fail IgnoreInFlightData test when there is not enough data for it for all checkpoints not only the first one
diff --git a/jenetics.prog/src/main/java/io/jenetics/prog/op/MathOp.java b/jenetics.prog/src/main/java/io/jenetics/prog/op/MathOp.java index <HASH>..<HASH> 100644 --- a/jenetics.prog/src/main/java/io/jenetics/prog/op/MathOp.java +++ b/jenetics.prog/src/main/java/io/jenetics/prog/op/MathOp.java @@ -310,8 +310,23 @@ public enum MathOp implements Op<Double> { * * @see Math#tanh(double) */ - TANH("tanh", 1, v -> tanh(v[0])); + TANH("tanh", 1, v -> tanh(v[0])), + /* ************************************************************************* + * Conditional functions + * ************************************************************************/ + + /** + * Returns +1.0 if its first argument is greater than its second argument + * and returns -1.0 otherwise. + * + * @since !__version__! + */ + GT("gt", 2, v -> v[0] > v[1] ? 1.0 : -1.0); + + /* ************************************************************************* + * Additional mathematical constants. + * ************************************************************************/ /** * The double value that is closer than any other to pi, the ratio of the
#<I>: Add 'GT' function usable for Genetic Programming.
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py index <HASH>..<HASH> 100644 --- a/gitlab/v4/objects.py +++ b/gitlab/v4/objects.py @@ -2023,10 +2023,10 @@ class Project(GitlabObject): GitlabDeleteError: If the action cannot be done GitlabConnectionError: If the server cannot be reached. """ - url = "/projects/%s/star" % self.id - r = self.gitlab._raw_delete(url, **kwargs) - raise_error_from_response(r, GitlabDeleteError, [200, 304]) - return Project(self.gitlab, r.json()) if r.status_code == 200 else self + url = "/projects/%s/unstar" % self.id + r = self.gitlab._raw_post(url, **kwargs) + raise_error_from_response(r, GitlabDeleteError, [201, 304]) + return Project(self.gitlab, r.json()) if r.status_code == 201 else self def archive(self, **kwargs): """Archive a project.
[v4] Update project unstar endpoint
diff --git a/test/test_connection.py b/test/test_connection.py index <HASH>..<HASH> 100644 --- a/test/test_connection.py +++ b/test/test_connection.py @@ -459,6 +459,11 @@ class TestConnection(unittest.TestCase, TestRequestMixin): c = get_connection() if is_mongos(c): raise SkipTest('fsync/lock not supported by mongos') + + res = c.admin.command('getCmdLineOpts') + if '--master' in res['argv'] and version.at_least(c, (2, 3, 0)): + raise SkipTest('SERVER-7714') + self.assertFalse(c.is_locked) # async flushing not supported on windows... if sys.platform not in ('cygwin', 'win32'):
Skip fsync_lock test with <I>.x master/slave.
diff --git a/spec.go b/spec.go index <HASH>..<HASH> 100644 --- a/spec.go +++ b/spec.go @@ -140,6 +140,7 @@ var specCommand = cli.Command{ Soft: uint64(1024), }, }, + NoNewPrivileges: true, }, } @@ -300,6 +301,7 @@ func createLibcontainerConfig(cgroupName string, spec *specs.LinuxSpec) (*config config.Sysctl = spec.Linux.Sysctl config.ProcessLabel = spec.Linux.SelinuxProcessLabel config.AppArmorProfile = spec.Linux.ApparmorProfile + config.NoNewPrivileges = spec.Linux.NoNewPrivileges for _, g := range spec.Process.User.AdditionalGids { config.AdditionalGroups = append(config.AdditionalGroups, strconv.FormatUint(uint64(g), 10)) }
Hook up the support to the OCI specification config
diff --git a/src/ShapeFile.php b/src/ShapeFile.php index <HASH>..<HASH> 100644 --- a/src/ShapeFile.php +++ b/src/ShapeFile.php @@ -525,7 +525,7 @@ class ShapeFile */ private function _createDBFFile() { - if (!self::supports_dbase() || count($this->DBFHeader) == 0) { + if (!self::supports_dbase() || !is_array($this->DBFHeader) || count($this->DBFHeader) == 0) { $this->DBFFile = null; return true;
Check whether header is array prior to counting it
diff --git a/src/drawEdge.js b/src/drawEdge.js index <HASH>..<HASH> 100644 --- a/src/drawEdge.js +++ b/src/drawEdge.js @@ -70,7 +70,7 @@ function _moveEdge(edge, x1, y1, x2, y2, attributes, options) { var shortening = options.shortening || 0; var arrowHeadLength = 10; var arrowHeadWidth = 7; - var margin = 0.174; + var margin = 0.1; var arrowHeadPoints = [ [0, -arrowHeadWidth / 2],
Adapt drawEdge() to conform to Graphviz version <I>
diff --git a/src/sap.ui.rta/src/sap/ui/rta/RuntimeAuthoring.js b/src/sap.ui.rta/src/sap/ui/rta/RuntimeAuthoring.js index <HASH>..<HASH> 100644 --- a/src/sap.ui.rta/src/sap/ui/rta/RuntimeAuthoring.js +++ b/src/sap.ui.rta/src/sap/ui/rta/RuntimeAuthoring.js @@ -475,7 +475,8 @@ sap.ui.define([ return this._handlePersonalizationChangesOnStart() .then(function(bReloadTriggered){ if (bReloadTriggered) { - return Promise.reject(false); + // FLP Plugin reacts on this error string and doesn't the error on the UI + return Promise.reject("Reload triggered"); } // Take default plugins if no plugins handed over
[INTERNAL] sap.ui.rta: enhanced handling of rta start with pers changes now start function rejects the promise with a specific error, on which the FLP plugin reacts. Change-Id: If<I>f<I>b<I>bd<I>a2dc<I>d<I>bdf4dd
diff --git a/src/ElasticSearch/Bulk.php b/src/ElasticSearch/Bulk.php index <HASH>..<HASH> 100644 --- a/src/ElasticSearch/Bulk.php +++ b/src/ElasticSearch/Bulk.php @@ -42,7 +42,7 @@ class Bulk { * _refresh_ *bool* If set to true, immediately refresh the shard after indexing * @return \Elasticsearch\Bulk */ - public function index($document, $id=false, $index, $type, array $options = array()) { + public function index($document, $id=null, $index, $type, array $options = array()) { $params = array( '_id' => $id, '_index' => $index, '_type' => $type);
The default "false" ID is stored with "false" ID: not with the auto-generated ID The default "null" ID is understood by ES as a no-ID
diff --git a/govc/library/info.go b/govc/library/info.go index <HASH>..<HASH> 100644 --- a/govc/library/info.go +++ b/govc/library/info.go @@ -89,7 +89,7 @@ Examples: govc library.info */ govc device.cdrom.insert -vm $vm -device cdrom-3000 $(govc library.info -L /lib1/item1/file1) govc library.info -json | jq . - govc library.info /lib1/item1 -json | jq .` + govc library.info -json /lib1/item1 | jq .` } type infoResultsWriter struct {
Fixed docs for govc library.info w/-json When -json comes after the "library/item" then it does not trigger JSON output.
diff --git a/server/errors.go b/server/errors.go index <HASH>..<HASH> 100644 --- a/server/errors.go +++ b/server/errors.go @@ -40,14 +40,14 @@ var ( // ErrReservedPublishSubject represents an error condition when sending to a reserved subject, e.g. _SYS.> ErrReservedPublishSubject = errors.New("reserved internal subject") - // ErrBadClientProtocol signals a client requested an invalud client protocol. + // ErrBadClientProtocol signals a client requested an invalid client protocol. ErrBadClientProtocol = errors.New("invalid client protocol") // ErrTooManyConnections signals a client that the maximum number of connections supported by the // server has been reached. ErrTooManyConnections = errors.New("maximum connections exceeded") - // ErrTooManyAccountConnections signals that an acount has reached its maximum number of active + // ErrTooManyAccountConnections signals that an account has reached its maximum number of active // connections. ErrTooManyAccountConnections = errors.New("maximum account active connections exceeded")
cleanup: fix word errors in errors.go
diff --git a/moskito-core/src/main/java/net/anotheria/moskito/core/plugins/PluginRepository.java b/moskito-core/src/main/java/net/anotheria/moskito/core/plugins/PluginRepository.java index <HASH>..<HASH> 100644 --- a/moskito-core/src/main/java/net/anotheria/moskito/core/plugins/PluginRepository.java +++ b/moskito-core/src/main/java/net/anotheria/moskito/core/plugins/PluginRepository.java @@ -17,7 +17,7 @@ import java.util.concurrent.ConcurrentMap; * @author lrosenberg * @since 19.03.13 15:47 */ -public class PluginRepository { +public final class PluginRepository { /** * Logger. @@ -37,7 +37,7 @@ public class PluginRepository { /** * Returns plugin repository singleton instance. - * @return + * @return the instance of this repository. */ public static final PluginRepository getInstance(){ return PluginRepositoryHolder.instance; @@ -141,6 +141,9 @@ public class PluginRepository { * Singletonhelper. */ private static class PluginRepositoryHolder{ + /** + * Instance of the PluginRepository. + */ private static final PluginRepository instance = new PluginRepository(); static{ instance.setup();
javadoc/checkstyle/typos/removed commented code
diff --git a/decode.go b/decode.go index <HASH>..<HASH> 100644 --- a/decode.go +++ b/decode.go @@ -152,6 +152,14 @@ func unify(data interface{}, rv reflect.Value) error { return unifyAnything(data, rv) } + // Special case. Handle time.Time values specifically. + // TODO: Remove this code when we decide to drop support for Go 1.1. + // This isn't necessary in Go 1.2 because time.Time satisfies the encoding + // interfaces. + if rv.Type().AssignableTo(rvalue(time.Time{}).Type()) { + return unifyDatetime(data, rv) + } + // Special case. Look for a value satisfying the TextUnmarshaler interface. if v, ok := rv.Interface().(TextUnmarshaler); ok { return unifyText(data, v)
Fix bug in Go <I> where time.Time values aren't decoded properly.
diff --git a/src/main/java/com/marklogic/client/impl/DatabaseClientImpl.java b/src/main/java/com/marklogic/client/impl/DatabaseClientImpl.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/marklogic/client/impl/DatabaseClientImpl.java +++ b/src/main/java/com/marklogic/client/impl/DatabaseClientImpl.java @@ -133,7 +133,7 @@ public class DatabaseClientImpl implements DatabaseClient { } // undocumented backdoor access to JerseyServices - public RESTServices getService() { + public RESTServices getServices() { return services; } }
correct rename on backdoor to get access to Jersey Services git-svn-id: svn+ssh://svn.marklogic.com/project/engsvn/client-api/java/trunk@<I> <I>cac<I>-8da6-<I>-9e9d-6dc<I>b<I>c
diff --git a/src/Generators/SchemaGenerator.php b/src/Generators/SchemaGenerator.php index <HASH>..<HASH> 100644 --- a/src/Generators/SchemaGenerator.php +++ b/src/Generators/SchemaGenerator.php @@ -470,7 +470,7 @@ class SchemaGenerator */ private function generateDeleteQuery(string $typeName, array $typeFields): string { - $query = ' ' . strtolower($typeName); + $query = ' delete' . $typeName; $arguments = []; //Loop through fields to find the 'ID' field.
add 'delete' to Delete query
diff --git a/lib/columns-to-model.js b/lib/columns-to-model.js index <HASH>..<HASH> 100644 --- a/lib/columns-to-model.js +++ b/lib/columns-to-model.js @@ -85,7 +85,7 @@ function dataToType(data, name, options) { return { value: d, - length: d.length, + length: (d && d.toString) ? d.toString().length : null, kind: pickle(d, options) }; }); @@ -128,6 +128,10 @@ function dataToType(data, name, options) { else if ((kind === "INTEGER" || kind === "FLOAT") && knownID.test(name)) { return new Sequelize.STRING(Math.floor(maxLength * 2)); } + // Check for long integers + else if (kind === "INTEGER" && maxLength > 8) { + return Sequelize.BIGINT; + } else { return Sequelize[kind]; } @@ -142,7 +146,7 @@ function standardize(value) { // Determine if should index based on name function shouldIndex(name) { - var nameTest = /(^|_|\s)(id|name|key)($|_|\s)/g; + var nameTest = /(^|_|-|\s)(id|name|key|amount|amt)($|_|-|\s)/g; return nameTest.test(name); }
Fixing guessing to use larger integers if needed.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100755 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ with open('requirements.txt') as requirements: setup( name='twitterscraper', - version='0.2.6', + version='0.2.7', description='Tool for scraping Tweets', url='https://github.com/taspinar/twitterscraper', author=['Ahmet Taspinar', 'Lasse Schuirmann'],
update version no in setup.py
diff --git a/src/Entity/AbstractEntityTest.php b/src/Entity/AbstractEntityTest.php index <HASH>..<HASH> 100644 --- a/src/Entity/AbstractEntityTest.php +++ b/src/Entity/AbstractEntityTest.php @@ -148,6 +148,18 @@ abstract class AbstractEntityTest extends AbstractTest $meta = $entityManager->getClassMetadata($class); foreach ($meta->getFieldNames() as $f) { $method = 'get'.$f; + $reflectionMethod = new \ReflectionMethod($generated, $method); + if ($reflectionMethod->hasReturnType()) { + $returnType = $reflectionMethod->getReturnType(); + $allowsNull = $returnType->allowsNull(); + if ($allowsNull) { + // As we can't assert anything here so simply call + // the method and allow the type hint to raise any + // errors. + $generated->$method(); + continue; + } + } $this->assertNotEmpty($generated->$method(), "$f getter returned empty"); } $entityManager->persist($generated);
Update AbstractEntityTest to handle nullable fields