diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/biomart/dataset.py b/biomart/dataset.py index <HASH>..<HASH> 100644 --- a/biomart/dataset.py +++ b/biomart/dataset.py @@ -110,7 +110,8 @@ class BiomartDataset(object): dataset_filter = self.filters.get(filter_name, None) if not dataset_filter: - self.show_filters() + if self.verbose: + self.show_filters() raise biomart.BiomartException("The filter '%s' does not exist." % filter_name) if len(dataset_filter.accepted_values) > 0 and filter_value not in dataset_filter.accepted_values: @@ -130,12 +131,14 @@ class BiomartDataset(object): for attribute_name in attributes: if attribute_name not in self.attributes.keys(): - self.show_attributes() + if self.verbose: + self.show_attributes() raise biomart.BiomartException("The attribute '%s' does not exist." % attribute_name) # selected attributes must belong to the same attribute page. if len(set([self.attributes[a].attribute_page for a in attributes])) > 1: - self.show_attributes() + if self.verbose: + self.show_attributes() raise biomart.BiomartException("You must use attributes that belong to the same attribute page.") # filters and attributes looks ok, start building the XML query
be less verbose if not asked
diff --git a/templates/api/services/protocols/bearer.js b/templates/api/services/protocols/bearer.js index <HASH>..<HASH> 100644 --- a/templates/api/services/protocols/bearer.js +++ b/templates/api/services/protocols/bearer.js @@ -13,7 +13,7 @@ exports.authorize = function(token, done) { Passport.findOne({ accessToken: token }, function(err, passport) { if (err) { return done(err); } if (!passport) { return done(null, false); } - User.findById(passport.user, function(err, user) { + User.findOneById(passport.user, function(err, user) { if (err) { return done(err); } if (!user) { return done(null, false); } return done(null, user, { scope: 'all' });
In sails <I> findById returns and array In sails <I> `findById` returns and array. One might expect to be able to access the user model by `req.user` instead of `req.user[0]`
diff --git a/lib/select.js b/lib/select.js index <HASH>..<HASH> 100644 --- a/lib/select.js +++ b/lib/select.js @@ -85,20 +85,15 @@ var selectors = { op = operators[op]; return function(el) { var attr; - switch (key) { - case 'for': - attr = el.htmlFor; - break; - case 'class': - attr = el.className; - break; - case 'href': - attr = el.getAttribute('href', 2); - break; - default: - attr = el[key] != null ? el[key] : el.getAttribute(key); - break; - } + if (key == 'for') + attr = el.htmlFor; + else if (key == 'class') + attr = el.className; + else if (key == 'href') + attr = el.getAttribute('href', 2); + else + attr = key in el ? el[key] : el.getAttribute(key); + return attr != null && op(attr + '', val); }; },
Replaced unoptimized switched by if/else
diff --git a/lib/omnibus/cli/base.rb b/lib/omnibus/cli/base.rb index <HASH>..<HASH> 100644 --- a/lib/omnibus/cli/base.rb +++ b/lib/omnibus/cli/base.rb @@ -94,7 +94,7 @@ module Omnibus aliases: '-l', type: :string, enum: %w(fatal error warn info debug), - lazy_default: 'warn' + lazy_default: 'info' class_option :override, desc: 'Override one or more Omnibus config options', aliases: '-o',
Use :info as the default log level
diff --git a/client/servers/manager.go b/client/servers/manager.go index <HASH>..<HASH> 100644 --- a/client/servers/manager.go +++ b/client/servers/manager.go @@ -204,7 +204,7 @@ func (m *Manager) SetServers(servers Servers) bool { // Determine if they are equal equal := m.serversAreEqual(servers) - // If server list is equal don't change the list and return immediatly + // If server list is equal don't change the list and return immediately // This prevents unnecessary shuffling of a failed server that was moved to the // bottom of the list if equal { diff --git a/client/servers/manager_test.go b/client/servers/manager_test.go index <HASH>..<HASH> 100644 --- a/client/servers/manager_test.go +++ b/client/servers/manager_test.go @@ -74,6 +74,11 @@ func TestServers_SetServers(t *testing.T) { require.False(m.SetServers([]*servers.Server{s1, s2})) after := m.GetServers() require.Equal(before, after) + + // Send a shuffled list, verify original order doesn't change + require.False(m.SetServers([]*servers.Server{s2, s1})) + afterShuffledInput := m.GetServers() + require.Equal(after, afterShuffledInput) } func TestServers_FindServer(t *testing.T) {
fix typo and add one more test scenario
diff --git a/lib/python/vdm/static/js/vdm.ui.js b/lib/python/vdm/static/js/vdm.ui.js index <HASH>..<HASH> 100755 --- a/lib/python/vdm/static/js/vdm.ui.js +++ b/lib/python/vdm/static/js/vdm.ui.js @@ -1796,10 +1796,10 @@ var loadPage = function() { id: VdmUI.getCurrentDbCookie() } } - else if (item == "partition-detection"){ + else if (item == "partitionDetection"){ deploymentInfo = { data:{ - partitionDetection:{ + "partition-detection":{ enabled: clusterObjects.txtPartitionDetection.text()=="Off"?false:true }
VDM-<I>: fixed issue with enable/disable partition detection
diff --git a/tutorials/ot-info-for-taxon-name.py b/tutorials/ot-info-for-taxon-name.py index <HASH>..<HASH> 100755 --- a/tutorials/ot-info-for-taxon-name.py +++ b/tutorials/ot-info-for-taxon-name.py @@ -1,6 +1,7 @@ #!/usr/bin/env python -'''Simple command-line tool that wraps the taxonomic name matching service - which is described at https://github.com/OpenTreeOfLife/opentree/wiki/Open-Tree-of-Life-APIs#match_names +'''Simple command-line tool that combines the actions +of the ot-tnrs-match-names.py, ot-taxon-info.py, and ot-taxon-subtree.py +scripts ''' import pprint import sys @@ -41,6 +42,7 @@ def fetch_and_write_taxon_info(id_list, include_anc, list_tips, output): wrap_response=True) write_taxon_info(info, include_anc, output) + def write_taxon_info(taxon, include_anc, output): '''Writes out data from `taxon` to the `output` stream to demonstrate the attributes of a taxon object.
corrected doc string to reflect current behavior
diff --git a/qiime_tools/util.py b/qiime_tools/util.py index <HASH>..<HASH> 100644 --- a/qiime_tools/util.py +++ b/qiime_tools/util.py @@ -124,7 +124,7 @@ def parse_taxonomy_table(idtaxFNH): idtax = OrderedDict() with file_handle(idtaxFNH) as idtxF: for line in idtxF: - ID, tax = line.strip().split('\t') + ID, tax = line.strip().split('\t')[:2] idtax[ID] = tax return idtax
Restores accidental reversion of commit <I>c<I> introduced by commit <I>d6a<I>.
diff --git a/lib/fixture_builder.rb b/lib/fixture_builder.rb index <HASH>..<HASH> 100755 --- a/lib/fixture_builder.rb +++ b/lib/fixture_builder.rb @@ -14,6 +14,8 @@ module FixtureBuilder class Configuration attr_accessor :select_sql, :delete_sql, :skip_tables, :files_to_check, :record_name_fields, :fixture_builder_file, :after_build + SCHEMA_FILES = ['db/schema.rb', 'db/development_structure.sql', 'db/test_structure.sql', 'db/production_structure.sql'] + def initialize @custom_names = {} @file_hashes = file_hashes @@ -40,7 +42,14 @@ module FixtureBuilder end def files_to_check - @files_to_check ||= %w{ db/schema.rb } + @files_to_check ||= schema_definition_files + end + + def schema_definition_files + Dir['db/*'].inject([]) do |result, file| + result << file if SCHEMA_FILES.include?(file) + result + end end def files_to_check=(files)
When using database utilities not covered by schema.rb someone may choose to use sql. FixtureBuilder crapped out because it was hard coded to check for schema.rb. This patch adds other default schema files and only appends them to the check list if they exist.
diff --git a/internal/cli/ui.go b/internal/cli/ui.go index <HASH>..<HASH> 100644 --- a/internal/cli/ui.go +++ b/internal/cli/ui.go @@ -28,9 +28,10 @@ func (c *UICommand) Run(args []string) int { return 1 } - if c.basis.Local() { - c.basis.UI().Output("Vagrant must be configured in server mode to access the UI", terminal.WithWarningStyle()) - } + // TODO(spox): comment this out until local configuration is updated + // if c.client.Local() { + // c.client.UI().Output("Vagrant must be configured in server mode to access the UI", terminal.WithWarningStyle()) + // } // Get our API client client := c.basis.Client()
Temporarily disable local check in client UI setup
diff --git a/controller/frontend/src/Controller/Frontend/Product/Standard.php b/controller/frontend/src/Controller/Frontend/Product/Standard.php index <HASH>..<HASH> 100644 --- a/controller/frontend/src/Controller/Frontend/Product/Standard.php +++ b/controller/frontend/src/Controller/Frontend/Product/Standard.php @@ -351,7 +351,11 @@ class Standard */ protected function getCatalogIdsFromTree( \Aimeos\MShop\Catalog\Item\Iface $item ) { - $list = array( $item->getId() ); + $list = []; + + if( $item->getStatus() > 0 ) { + $list[] = $item->getId(); + } foreach( $item->getChildren() as $child ) { $list = array_merge( $list, $this->getCatalogIdsFromTree( $child ) );
Aggregate only products from active categories
diff --git a/cf/api/strategy/domains.go b/cf/api/strategy/domains.go index <HASH>..<HASH> 100644 --- a/cf/api/strategy/domains.go +++ b/cf/api/strategy/domains.go @@ -51,10 +51,23 @@ func (s domainsEndpointStrategy) DeleteSharedDomainURL(guid string) string { return buildURL(v2("domains", guid), params{recursive: true}) } -type separatedDomainsEndpointStrategy struct { - domainsEndpointStrategy +type separatedDomainsEndpointStrategy struct{} + +func (s separatedDomainsEndpointStrategy) DomainURL(name string) string { + return buildURL(v2("shared_domains"), params{ + q: map[string]string{"name": name}, + }) +} + +func (s separatedDomainsEndpointStrategy) OrgDomainsURL(orgGuid string) string { + return v2("organizations", orgGuid, "private_domains") } +func (s separatedDomainsEndpointStrategy) OrgDomainURL(orgGuid, name string) string { + return buildURL(s.OrgDomainsURL(orgGuid), params{ + q: map[string]string{"name": name}, + }) +} func (s separatedDomainsEndpointStrategy) PrivateDomainsURL() string { return v2("private_domains") }
Stop using deprecated endpoints for domains. [Fixes #<I>]
diff --git a/bencode/misc.go b/bencode/misc.go index <HASH>..<HASH> 100644 --- a/bencode/misc.go +++ b/bencode/misc.go @@ -6,16 +6,10 @@ import ( ) // Wow Go is retarded. -var marshalerType = reflect.TypeOf(func() *Marshaler { - var m Marshaler - return &m -}()).Elem() - -// Wow Go is retarded. -var unmarshalerType = reflect.TypeOf(func() *Unmarshaler { - var i Unmarshaler - return &i -}()).Elem() +var ( + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() + unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() +) func bytesAsString(b []byte) string { return *(*string)(unsafe.Pointer(&b))
bencode: simplify getting `marshalerType` and `unmarshalerType` (#<I>)
diff --git a/salt/master.py b/salt/master.py index <HASH>..<HASH> 100644 --- a/salt/master.py +++ b/salt/master.py @@ -413,7 +413,8 @@ class AESFuncs(object): pub_path = os.path.join(self.opts['pki_dir'], 'minions', id_) with open(pub_path, 'r') as fp_: minion_pub = fp_.read() - tmp_pub = tempfile.mktemp() + fd_, tmp_pub = tempfile.mkstemp() + fd_.close() with open(tmp_pub, 'w+') as fp_: fp_.write(minion_pub) pub = RSA.load_pub_key(tmp_pub)
clean up tempfile commit in master.py
diff --git a/allauth/app_settings.py b/allauth/app_settings.py index <HASH>..<HASH> 100644 --- a/allauth/app_settings.py +++ b/allauth/app_settings.py @@ -11,21 +11,24 @@ def check_context_processors(): ctx_present = False if django.VERSION < (1, 8,): + setting = "settings.TEMPLATE_CONTEXT_PROCESSORS" if allauth_ctx in settings.TEMPLATE_CONTEXT_PROCESSORS: ctx_present = True else: - for engine in template.engines.templates.values(): + for name, engine in template.engines.templates.items(): if allauth_ctx in engine.get('OPTIONS', {})\ .get('context_processors', []): ctx_present = True - break + else: + setting = "settings.TEMPLATES['{}']['OPTIONS']['context_processors']" + setting = setting.format(name) if not ctx_present: excmsg = ("socialaccount context processor " - "not found in settings.TEMPLATE_CONTEXT_PROCESSORS." + "not found in {}. " "See settings.py instructions here: " - "https://github.com/pennersr/django-allauth#installation") - raise ImproperlyConfigured(excmsg) + "http://django-allauth.readthedocs.org/en/latest/installation.html") + raise ImproperlyConfigured(excmsg.format(setting)) if SOCIALACCOUNT_ENABLED:
Fixed up outdated error message in context processors check. Changed the URL to be more relevant and print the correct setting based on the django version.
diff --git a/ayrton/__init__.py b/ayrton/__init__.py index <HASH>..<HASH> 100755 --- a/ayrton/__init__.py +++ b/ayrton/__init__.py @@ -47,6 +47,8 @@ class CommandWrapper (sh.Command): # if _out or _err are not provided, connect them to the original ones if not '_out' in kwargs: kwargs['_out']= sys.stdout.buffer + if not '_err' in kwargs: + kwargs['_err']= sys.stderr.buffer return super ().__call__ (*args, **kwargs)
+ stderr to stderr by default too.
diff --git a/server.js b/server.js index <HASH>..<HASH> 100644 --- a/server.js +++ b/server.js @@ -48,10 +48,6 @@ app.use(function(req, res, next){ next(); } }); -<<<<<<< HEAD - -======= ->>>>>>> c69e2987859e0cdf6e22027ff8118c9a955f34c0 app.all('*', function(req, res, next) { res.header('Access-Control-Allow-Origin', '*'); res.header('Access-Control-Allow-Headers', 'X-Requested-With');
[CHORE] Cleaning merge commit garbage
diff --git a/src/Behavior/EAV/Entity.php b/src/Behavior/EAV/Entity.php index <HASH>..<HASH> 100644 --- a/src/Behavior/EAV/Entity.php +++ b/src/Behavior/EAV/Entity.php @@ -14,7 +14,6 @@ namespace Indigo\Doctrine\Behavior\EAV; use Doctrine\Common\Collections\Selectable; use Doctrine\Common\Collections\Criteria; use Doctrine\ORM\Mapping as ORM; -use Indigo\Doctrine\Field; /** * Use this trait to implement Entity part of EAV behavior on entities @@ -23,8 +22,6 @@ use Indigo\Doctrine\Field; */ trait Entity { - use Field\Id; - /** * @var Selectable */
Removes id from EAV entity
diff --git a/lib/poise/helpers/resource_subclass.rb b/lib/poise/helpers/resource_subclass.rb index <HASH>..<HASH> 100644 --- a/lib/poise/helpers/resource_subclass.rb +++ b/lib/poise/helpers/resource_subclass.rb @@ -57,6 +57,7 @@ module Poise else subclass_resource_equivalents << superclass_resource_name end + subclass_resource_equivalents.uniq! end # An array of names for the resources this class is equivalent to for
Uniq the equivalents in case this is called more than once.
diff --git a/src/main/java/com/treasure_data/client/HttpConnectionImpl.java b/src/main/java/com/treasure_data/client/HttpConnectionImpl.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/treasure_data/client/HttpConnectionImpl.java +++ b/src/main/java/com/treasure_data/client/HttpConnectionImpl.java @@ -73,6 +73,7 @@ public class HttpConnectionImpl { postReadTimeout = Integer.parseInt(props.getProperty( Config.TD_CLIENT_POSTMETHOD_READ_TIMEOUT, Config.TD_CLIENT_POSTMETHOD_READ_TIMEOUT_DEFAULTVALUE)); + this.props = props; } private void setRequestAuthHeader(Request<?> request, HttpURLConnection conn) throws IOException { @@ -371,7 +372,6 @@ public class HttpConnectionImpl { } // system properties - Properties props = System.getProperties(); String host = props.getProperty( Config.TD_API_SERVER_HOST, Config.TD_API_SERVER_HOST_DEFAULTVALUE); int port = Integer.parseInt(props.getProperty(
changed HttpConnectionImpl class -- fixed bug: 'props' field in the class is never accessed
diff --git a/pyqode/core/managers/file.py b/pyqode/core/managers/file.py index <HASH>..<HASH> 100644 --- a/pyqode/core/managers/file.py +++ b/pyqode/core/managers/file.py @@ -167,7 +167,7 @@ class FileManager(Manager): content, self.get_mimetype(path), self.encoding) self.editor.setDocumentTitle(self.editor.file.name) self.opening = False - QtCore.QTimer.singleShot(1, self._restore_cached_pos) + self._restore_cached_pos() def _restore_cached_pos(self): pos = Cache().get_cursor_position(self.path) diff --git a/pyqode/core/modes/checker.py b/pyqode/core/modes/checker.py index <HASH>..<HASH> 100644 --- a/pyqode/core/modes/checker.py +++ b/pyqode/core/modes/checker.py @@ -241,7 +241,10 @@ class CheckerMode(Mode, QtCore.QObject): usd = message.block.userData() try: if usd and usd.messages: - usd.messages.remove(message) + try: + usd.messages.remove(message) + except ValueError: + pass except AttributeError: pass self._messages.remove(message)
Do not use a timer for jumping to the cached cursor position. The difference is that the cursor won't be centered (if centerOnScroll was true). This fix a bug with goto definition in other files in pyqode.python
diff --git a/lib/Doctrine/DBAL/Migrations/Finder/RecursiveRegexFinder.php b/lib/Doctrine/DBAL/Migrations/Finder/RecursiveRegexFinder.php index <HASH>..<HASH> 100644 --- a/lib/Doctrine/DBAL/Migrations/Finder/RecursiveRegexFinder.php +++ b/lib/Doctrine/DBAL/Migrations/Finder/RecursiveRegexFinder.php @@ -71,6 +71,8 @@ final class RecursiveRegexFinder extends AbstractFinder implements MigrationDeep foreach ($iteratorFilesMatch as $file) { $files[] = $file[0]; } + + sort($files); return $files; }
RecursiveDirectoryIterator don't obtain some order of the file list. RecursiveDirectoryIterator shouldn't return a sorted list and haven't to do it be direct. But migration script logic requires sorted list of the Version*.php files for correct working.
diff --git a/docker/utils/utils.py b/docker/utils/utils.py index <HASH>..<HASH> 100644 --- a/docker/utils/utils.py +++ b/docker/utils/utils.py @@ -57,9 +57,10 @@ def compare_version(v1, v2): def ping(url): try: res = requests.get(url) - return res.status >= 400 except Exception: return False + else: + return res.status_code >= 400 def _convert_port_binding(binding):
replace status with status_code as defined by requests API Move this statement in `else` clause to make sure the try except block doesn't catch coding errors.
diff --git a/src/lity.js b/src/lity.js index <HASH>..<HASH> 100644 --- a/src/lity.js +++ b/src/lity.js @@ -269,6 +269,8 @@ } function init(handler, content, options, el) { + _ready = $.Deferred(); + _instanceCount++; globalToggle(); @@ -342,7 +344,6 @@ } if (content) { - _ready = $.Deferred(); $.when(close()).done($.proxy(init, null, handler, content, options, el)); } @@ -402,6 +403,7 @@ var options = el.data('lity-options') || el.data('lity'); if (open(target, options, el)) { + el.blur(); event.preventDefault(); } }
Fix weird lightbox state when hitting enter triggering click on still focused anchor element
diff --git a/spec/rackstash/logger_spec.rb b/spec/rackstash/logger_spec.rb index <HASH>..<HASH> 100644 --- a/spec/rackstash/logger_spec.rb +++ b/spec/rackstash/logger_spec.rb @@ -203,8 +203,8 @@ describe Rackstash::Logger do end it 'implements the same method signature as the Buffer' do - expect(Rackstash::Buffer.instance_method(:tag).arity) - .to eql logger.method(:tag).arity + expect(Rackstash::Buffer.instance_method(:tag).parameters) + .to eql logger.method(:tag).parameters end end
Check that Logger#tag implements the same interface as Buffer#tag
diff --git a/models/DEV_DB.js b/models/DEV_DB.js index <HASH>..<HASH> 100644 --- a/models/DEV_DB.js +++ b/models/DEV_DB.js @@ -75,7 +75,7 @@ jsh.App[modelid] = new (function(){ }; this.getFormElement = function(){ - return jsh.$root('.xformcontainer.xelem'+model.class); + return jsh.$root('.xformcontainer.xelem'+xmodel.class); } this.oninit = function(xmodel) {
JSH-<I> Refactoring js
diff --git a/wonambi/ioeeg/bci2000.py b/wonambi/ioeeg/bci2000.py index <HASH>..<HASH> 100644 --- a/wonambi/ioeeg/bci2000.py +++ b/wonambi/ioeeg/bci2000.py @@ -238,7 +238,7 @@ def _read_header(filename): hdr[section] = {} # defaultdict(dict) continue - if row == '': + if row.strip() == '': continue elif section == 'StateVector': @@ -247,6 +247,13 @@ def _read_header(filename): else: group = match('(?P<subsection>[\w:%]*) (?P<format>\w*) (?P<key>\w*)= (?P<value>.*) // ', row) + + if group is None: + group = match('(?P<subsection>[\w:%]*) (?P<format>\w*) (?P<key>\w*)= (?P<value>.*)', row) # For Group without comment + if group is None: + print("Cannot parse row:",row) + continue + onerow = group.groupdict() values = onerow['value'].split(' ')
Reading header elements without comments is now possible. Unparsable elements do not break the programm.
diff --git a/pmxbot/dictlib.py b/pmxbot/dictlib.py index <HASH>..<HASH> 100644 --- a/pmxbot/dictlib.py +++ b/pmxbot/dictlib.py @@ -8,5 +8,5 @@ class ConfigDict(ItemsAsAttributes, dict): return cls(yaml.load(f)) def to_yaml(self, filename): - with open(filename, 'wb') as f: + with open(filename, 'w') as f: yaml.dump(self, f)
Can't open in binary mode anymore (Python 3 requires writing yaml as text)
diff --git a/test/unit/selector.js b/test/unit/selector.js index <HASH>..<HASH> 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -1,7 +1,7 @@ module("selector"); test("element", function() { - expect(19); + expect(18); QUnit.reset(); ok( jQuery("*").size() >= 30, "Select all" ); @@ -27,7 +27,6 @@ test("element", function() { ok( jQuery("#lengthtest input").length, '&lt;input name="length"&gt; cannot be found under IE, see #945' ); // Check for unique-ness and sort order - same( jQuery("*, *").get(), jQuery("*").get(), "Check for duplicates: *, *" ); same( jQuery("p, div p").get(), jQuery("p").get(), "Check for duplicates: p, div p" ); t( "Checking sort order", "h2, h1", ["qunit-header", "qunit-banner", "qunit-userAgent"] );
Testing *, * was unnecessary - especially in slower browsers.
diff --git a/sunspot_rails/lib/sunspot/rails/searchable.rb b/sunspot_rails/lib/sunspot/rails/searchable.rb index <HASH>..<HASH> 100644 --- a/sunspot_rails/lib/sunspot/rails/searchable.rb +++ b/sunspot_rails/lib/sunspot/rails/searchable.rb @@ -232,7 +232,7 @@ module Sunspot #:nodoc: progress_bar = options[:progress_bar] if options[:batch_size] counter = 0 - find_in_batches(:include => options[:include], :batch_size => options[:batch_size]) do |records| + find_in_batches(:include => options[:include], :batch_size => options[:batch_size], :start => options[:first_id]) do |records| solr_benchmark options[:batch_size], counter do Sunspot.index(records) end
On reindex the :start => option is now passed to find_in_batches
diff --git a/config/drivers.php b/config/drivers.php index <HASH>..<HASH> 100644 --- a/config/drivers.php +++ b/config/drivers.php @@ -6,18 +6,18 @@ return [ 'chrome' => [ 'mac' => [ - 'version' => '2.9', - 'url' => 'http://chromedriver.storage.googleapis.com/2.9/chromedriver_mac32.zip', + 'version' => '2.35.0', + 'url' => 'https://chromedriver.storage.googleapis.com/2.35/chromedriver_mac64.zip', 'filename' => 'chromedriver', ], 'win' => [ - 'version' => '2.9', - 'url' => 'http://chromedriver.storage.googleapis.com/2.9/chromedriver_win32.zip', + 'version' => '2.35.0', + 'url' => 'https://chromedriver.storage.googleapis.com/2.35/chromedriver_win32.zip', 'filename' => 'chromedriver.exe', ], 'linux' => [ - 'version' => '2.9', - 'url' => 'http://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip', + 'version' => '2.35.0', + 'url' => 'https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip', 'filename' => 'chromedriver', ], ],
updated versions for ChromeDriver download links (#<I>)
diff --git a/lib/fast_find.rb b/lib/fast_find.rb index <HASH>..<HASH> 100644 --- a/lib/fast_find.rb +++ b/lib/fast_find.rb @@ -32,7 +32,7 @@ module FastFind @mutex.synchronize do return if @walkers - @walkers = concurrency.times.map { Walker.new.spawn(@queue) } + @walkers = @concurrency.times.map { Walker.new.spawn(@queue) } end end @@ -41,8 +41,8 @@ module FastFind return unless @walkers @queue.clear - walkers.each { @queue << nil } - walkers.each(&:join) + @walkers.each { @queue << nil } + @walkers.each(&:join) @walkers = nil end @@ -89,7 +89,7 @@ module FastFind end end ensure - if one_shot + if one_shot? @queue.clear shutdown end @@ -97,6 +97,8 @@ module FastFind private + def one_shot?() !!@one_shot end + def yield_entry(entry, block) if block.arity == 2 block.call(entry[0].dup, entry[1]) @@ -104,8 +106,6 @@ module FastFind block.call entry[0].dup end end - - attr_reader :walkers, :one_shot, :concurrency end class Walker
Drop private attributes and just use @'s
diff --git a/java/src/main/java/org/whispersystems/signalservice/api/SignalServiceMessageSender.java b/java/src/main/java/org/whispersystems/signalservice/api/SignalServiceMessageSender.java index <HASH>..<HASH> 100644 --- a/java/src/main/java/org/whispersystems/signalservice/api/SignalServiceMessageSender.java +++ b/java/src/main/java/org/whispersystems/signalservice/api/SignalServiceMessageSender.java @@ -296,7 +296,10 @@ public class SignalServiceMessageSender { throw new IOException("Unsupported sync message!"); } - sendMessage(localAddress, Optional.<UnidentifiedAccess>absent(), System.currentTimeMillis(), content, false); + long timestamp = message.getSent().isPresent() ? message.getSent().get().getTimestamp() + : System.currentTimeMillis(); + + sendMessage(localAddress, Optional.<UnidentifiedAccess>absent(), timestamp, content, false); } public void setSoTimeoutMillis(long soTimeoutMillis) {
Fix self-sync timestamp inconsistency
diff --git a/src/main/java/org/cactoos/collection/CollectionOf.java b/src/main/java/org/cactoos/collection/CollectionOf.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/cactoos/collection/CollectionOf.java +++ b/src/main/java/org/cactoos/collection/CollectionOf.java @@ -53,8 +53,8 @@ import org.cactoos.scalar.Unchecked; * @todo #1116:30min Remove this deprecated class after the issue * https://github.com/llorllale/cactoos-matchers/issues/148 has been resolved. * The Cactoos-Matchers project(https://github.com/llorllale/cactoos-matchers) - * utilizes this class and by removing the class right now causes issues with - * class not found in the Cactoos-Matchers project. + * utilizes this class and by removing the class right now will cause issues + * of class not found in the Cactoos-Matchers project. */ @Deprecated public final class CollectionOf<T> implements Collection<T> {
(#<I>) Small spelling fixes done
diff --git a/pylint/checkers/base.py b/pylint/checkers/base.py index <HASH>..<HASH> 100644 --- a/pylint/checkers/base.py +++ b/pylint/checkers/base.py @@ -1943,10 +1943,11 @@ class NameChecker(_BasicChecker): class DocStringChecker(_BasicChecker): msgs = { "C0112": ( - "Empty %s docstring", # W0132 + "Empty %s docstring", "empty-docstring", "Used when a module, function, class or method has an empty " "docstring (it would be too easy ;).", + {"old_names": [("W0132", "old-empty-docstring")]}, ), "C0114": ( "Missing module docstring",
[docstrings] Add W<I> as the old name for empty-docstring
diff --git a/moa/src/main/java/moa/tasks/active/ALPrequentialEvaluationTask.java b/moa/src/main/java/moa/tasks/active/ALPrequentialEvaluationTask.java index <HASH>..<HASH> 100644 --- a/moa/src/main/java/moa/tasks/active/ALPrequentialEvaluationTask.java +++ b/moa/src/main/java/moa/tasks/active/ALPrequentialEvaluationTask.java @@ -64,7 +64,7 @@ public class ALPrequentialEvaluationTask extends ALMainTask { public ClassOption learnerOption = new ClassOption("learner", 'l', "Learner to train.", ALClassifier.class, - "moa.classifiers.active.PALStream"); + "moa.classifiers.active.ALRandom"); public ClassOption streamOption = new ClassOption("stream", 's', "Stream to learn from.", ExampleStream.class,
Set default learner to ALRandom
diff --git a/hepdata_validator/full_submission_validator.py b/hepdata_validator/full_submission_validator.py index <HASH>..<HASH> 100644 --- a/hepdata_validator/full_submission_validator.py +++ b/hepdata_validator/full_submission_validator.py @@ -43,6 +43,7 @@ class FullSubmissionValidator(Validator): """ self.single_yaml_file = False temp_directory = None + self.directory = directory try: # Check input file/directory exists and is valid
Ensure self.directory is updated at each call to validate
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( author_email='aymeric.augustin@m4x.org', url='https://github.com/trac-hacks/trac-github', description='Trac - GitHub integration', - download_url='http://pypi.python.org/pypi/trac-github', + download_url='https://pypi.python.org/pypi/trac-github', packages=['tracext'], platforms='all', license='BSD',
Use HTTPS in download URL It appears that PyPI is now HTTPS-only.
diff --git a/lib/arjdbc/postgresql/adapter.rb b/lib/arjdbc/postgresql/adapter.rb index <HASH>..<HASH> 100644 --- a/lib/arjdbc/postgresql/adapter.rb +++ b/lib/arjdbc/postgresql/adapter.rb @@ -1081,6 +1081,7 @@ module ArJdbc # Returns the list of all column definitions for a table. def columns(table_name, name = nil) klass = ::ActiveRecord::ConnectionAdapters::PostgreSQLColumn + pass_cast_type = respond_to?(:lookup_cast_type) column_definitions(table_name).map do |row| # name, type, default, notnull, oid, fmod name = row[0]; type = row[1]; default = row[2] @@ -1094,7 +1095,12 @@ module ArJdbc elsif default =~ /^\(([-+]?[\d\.]+)\)$/ # e.g. "(-1)" for a negative default default = $1 end - klass.new(name, default, oid, type, ! notnull, fmod, self) + if pass_cast_type + cast_type = lookup_cast_type(type) + klass.new(name, default, cast_type, type, ! notnull, fmod, self) + else + klass.new(name, default, oid, type, ! notnull, fmod, self) + end end end
Update postgres adapter column definition with cast_type
diff --git a/core/types/transaction.go b/core/types/transaction.go index <HASH>..<HASH> 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -213,7 +213,7 @@ func (tx *Transaction) Hash() common.Hash { } // Size returns the true RLP encoded storage size of the transaction, either by -// encoding and returning it, or returning a previsouly cached value. +// encoding and returning it, or returning a previously cached value. func (tx *Transaction) Size() common.StorageSize { if size := tx.size.Load(); size != nil { return size.(common.StorageSize)
core/types: fixed typo (#<I>)
diff --git a/Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/RewardBase.java b/Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/RewardBase.java index <HASH>..<HASH> 100755 --- a/Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/RewardBase.java +++ b/Minecraft/src/main/java/com/microsoft/Malmo/MissionHandlers/RewardBase.java @@ -23,10 +23,26 @@ public class RewardBase extends HandlerBase implements IRewardProducer if (distribution == null || distribution.isEmpty()) return reward; List<String> parties = Arrays.asList(distribution.split(" ")); - int ind = parties.indexOf(this.agentName); - if (ind == -1) - ind = parties.indexOf("me"); - if (ind != -1) + // Search for our agent name in this list of parties: + int ind = 0; + for (String party : parties) + { + if (party.startsWith(this.agentName + ":")) + break; + ind++; + } + if (ind == parties.size()) + { + // Didn't find it - search for "me": + ind = 0; + for (String party : parties) + { + if (party.startsWith("me:")) + break; + ind++; + } + } + if (ind != parties.size()) { String us = parties.get(ind); String[] parts = us.split(":");
Fixed bug with reward distibution.
diff --git a/python/dllib/src/bigdl/dllib/utils/common.py b/python/dllib/src/bigdl/dllib/utils/common.py index <HASH>..<HASH> 100644 --- a/python/dllib/src/bigdl/dllib/utils/common.py +++ b/python/dllib/src/bigdl/dllib/utils/common.py @@ -462,6 +462,17 @@ def create_spark_conf(): sparkConf.setAll(bigdl_conf.items()) if not is_spark_below_2_2(): extend_spark_driver_cp(sparkConf, get_bigdl_classpath()) + + # add content in PYSPARK_FILES in spark.submit.pyFiles + # This is a workaround for current Spark on k8s + python_lib = os.environ.get('PYSPARK_FILES', None) + if python_lib: + existing_py_files = sparkConf.get("spark.submit.pyFiles") + if existing_py_files: + sparkConf.set(key="spark.submit.pyFiles", value="%s,%s" % (python_lib, existing_py_files)) + else: + sparkConf.set(key="spark.submit.pyFiles", value=python_lib) + return sparkConf
Support BigDL for Spark on k8s (#<I>) * maybe some refactor * handle k8s master url * k8s * add doc * add more doc * add doc
diff --git a/lib/formwandler/form.rb b/lib/formwandler/form.rb index <HASH>..<HASH> 100644 --- a/lib/formwandler/form.rb +++ b/lib/formwandler/form.rb @@ -96,7 +96,9 @@ module Formwandler def submit if valid? && models_valid? - save_models! + ActiveRecord::Base.transaction do + save_models! + end load_results else false
Add transaction around #save_models! call (fixes #3)
diff --git a/actionpack/lib/action_dispatch/journey/path/pattern.rb b/actionpack/lib/action_dispatch/journey/path/pattern.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_dispatch/journey/path/pattern.rb +++ b/actionpack/lib/action_dispatch/journey/path/pattern.rb @@ -136,6 +136,10 @@ module ActionDispatch Array.new(length - 1) { |i| self[i + 1] } end + def named_captures + @names.zip(captures).to_h + end + def [](x) idx = @offsets[x - 1] + x @match[idx] diff --git a/actionpack/test/journey/path/pattern_test.rb b/actionpack/test/journey/path/pattern_test.rb index <HASH>..<HASH> 100644 --- a/actionpack/test/journey/path/pattern_test.rb +++ b/actionpack/test/journey/path/pattern_test.rb @@ -280,6 +280,15 @@ module ActionDispatch assert_equal "list", match[1] assert_equal "rss", match[2] end + + def test_named_captures + path = Path::Pattern.from_string "/books(/:action(.:format))" + + uri = "/books/list.rss" + match = path =~ uri + named_captures = { "action" => "list", "format" => "rss" } + assert_equal named_captures, match.named_captures + end end end end
Adds named_captures to MatchData to emulate Regex This change adds a `named_captures` method to `ActionDispatch::Journey::Path::MatchData` in order to emulate a similar method present on `Regex`'s `MatchData` present in Ruby core. This method can be useful for introspection of routes without the need to use `zip` while testing or developing in Rails core.
diff --git a/gns3server/modules/base_manager.py b/gns3server/modules/base_manager.py index <HASH>..<HASH> 100644 --- a/gns3server/modules/base_manager.py +++ b/gns3server/modules/base_manager.py @@ -372,8 +372,8 @@ class BaseManager: nio = NIOUDP(lport, rhost, rport) elif nio_settings["type"] == "nio_tap": tap_device = nio_settings["tap_device"] - if not is_interface_up(tap_device): - raise aiohttp.web.HTTPConflict(text="TAP interface {} does not exist or is down".format(tap_device)) + #if not is_interface_up(tap_device): + # raise aiohttp.web.HTTPConflict(text="TAP interface {} does not exist or is down".format(tap_device)) # FIXME: check for permissions on tap device # if not self.has_privileged_access(executable): # raise aiohttp.web.HTTPForbidden(text="{} has no privileged access to {}.".format(executable, tap_device))
Do not require a TAP interface to already exist. Fixes #<I>.
diff --git a/openquake/baselib/node.py b/openquake/baselib/node.py index <HASH>..<HASH> 100644 --- a/openquake/baselib/node.py +++ b/openquake/baselib/node.py @@ -729,13 +729,14 @@ def node_from_xml(xmlfile, nodefactory=Node): return node_from_elem(root, nodefactory) -def node_to_xml(node, output=sys.stdout, nsmap=None): +def node_to_xml(node, output, nsmap=None): """ Convert a Node object into a pretty .xml file without keeping everything in memory. If you just want the string representation use tostring(node). :param node: a Node-compatible object (ElementTree nodes are fine) + :param output: a binary output file :param nsmap: if given, shorten the tags with aliases """
Small fix in node_to_xml [ci skip]
diff --git a/autoinput.js b/autoinput.js index <HASH>..<HASH> 100644 --- a/autoinput.js +++ b/autoinput.js @@ -65,8 +65,8 @@ BlockQuote.register("autoInput", "startBlockQuote", new InputRule( OrderedList.register("autoInput", "startOrderedList", new InputRule( /^(\d+)\. $/, " ", function(pm, match, pos) { - wrapAndJoin(pm, pos, this, {order: match[1]}, - node => node.childCount + +node.attrs.order == match[1]) + wrapAndJoin(pm, pos, this, {order: +match[1]}, + node => node.childCount + node.attrs.order == +match[1]) } )) @@ -86,7 +86,7 @@ CodeBlock.register("autoInput", "startCodeBlock", new InputRule( Heading.registerComputed("autoInput", "startHeading", type => { let re = new RegExp("^(#{1," + type.maxLevel + "}) $") return new InputRule(re, " ", function(pm, match, pos) { - setAs(pm, pos, this, {level: String(match[1].length)}) + setAs(pm, pos, this, {level: match[1].length}) }) })
Allow any JSON-serializeable value as attribute value
diff --git a/src/tagify.js b/src/tagify.js index <HASH>..<HASH> 100644 --- a/src/tagify.js +++ b/src/tagify.js @@ -997,8 +997,9 @@ Tagify.prototype = { }, fixFirefoxLastTagNoCaret(){ - if( isFirefox && this.DOM.input.lastChild.nodeType == 1 ){ - this.DOM.input.appendChild(document.createTextNode("")) + var inputElm = this.DOM.input + if( isFirefox && inputElm.childNodes.length && inputElm.lastChild.nodeType == 1 ){ + inputElm.appendChild(document.createTextNode("")) this.setRangeAtStartEnd(true) return true } @@ -1863,14 +1864,13 @@ Tagify.prototype = { this.preUpdate() var value = removeCollectionProp(this.value, "__isValid") - if( this.settings.originalInputValueFormat ) - value = this.settings.originalInputValueFormat(value) - else - value = JSON.stringify(value) - this.DOM.originalInput.value = this.settings.mode == 'mix' ? this.getMixedTagsAsString(value) - : value.length ? value : "" + : value.length + ? this.settings.originalInputValueFormat + ? this.settings.originalInputValueFormat(value) + : JSON.stringify(value) + : "" this.DOM.originalInput.dispatchEvent(new CustomEvent('change')) },
fixed major bug with previous commit regarding "originalInputValueFormat" in "update" method
diff --git a/java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandler.java b/java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandler.java index <HASH>..<HASH> 100644 --- a/java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandler.java +++ b/java/core/libjoynr/src/main/java/io/joynr/proxy/ProxyInvocationHandler.java @@ -589,7 +589,7 @@ public abstract class ProxyInvocationHandler implements InvocationHandler { return invokeInternal(proxy, method, args); } catch (Exception e) { if (this.throwable != null) { - logger.debug("Exception caught: {} overridden by: {}", e.getMessage(), throwable.getMessage()); + logger.trace("Exception caught: {} overridden by: {}", e.getMessage(), throwable.getMessage()); throw throwable; } else { throw e;
[Java] Moved log to loglevel trace in ProxyInvocationHandler
diff --git a/concrete/src/Cache/CacheClearer.php b/concrete/src/Cache/CacheClearer.php index <HASH>..<HASH> 100644 --- a/concrete/src/Cache/CacheClearer.php +++ b/concrete/src/Cache/CacheClearer.php @@ -145,7 +145,13 @@ class CacheClearer */ protected function filesToClear($directory) { - $iterator = new FilesystemIterator($directory); + try { + $iterator = new FilesystemIterator($directory); + } catch (\UnexpectedValueException $e) { + // The directory doesn't exist + return; + } + $exclude = []; if (!$this->repository->get('concrete.cache.clear.thumbnails', true)) {
Catch exception when cache directory doesn't exist
diff --git a/lib/icomoon-phantomjs.js b/lib/icomoon-phantomjs.js index <HASH>..<HASH> 100644 --- a/lib/icomoon-phantomjs.js +++ b/lib/icomoon-phantomjs.js @@ -7,14 +7,20 @@ var casper = require('casper').create({ casper.start('http://icomoon.io/app'); // Wait for loading to complete -casper.waitFor(function waitForLoadingComplete () { - // Wait until div#loading no longer exists - return this.evaluate(function () { - return !document.getElementById('loading'); - }); +casper.waitWhileVisible('#loading'); + +// Submit many images (need a file path for all our images) +var files = ['test/test_files/eye.svg']; +casper.then(function () { + console.log('abc', this.evaluate(function (file) { + $('#files').val(file); + $('#files').change(); + return file; + }, files[0])); }); -// TODO: Submit many images (need a file path for all our images) +// casper.wait(5000); + // TODO: Export our font // TODO: Extract variables (if specified)
Going for short-term of getting this working first before talking directly to backend
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -65,21 +65,30 @@ SQLite3Connection.prototype.query = function (text, values, callback) { this.emit('query', query) if (query.text.match(/^\s*(insert|update|replace)\s+/i)) { - this._db.run(query.text, - query.values, - function (err) { - query.complete(err, this.changes, this.lastID) - }) + runQuery(this._db, query); } else { - this._db.each(query.text, - query.values, - query.onRow.bind(query), - query.complete.bind(query)) + eachQuery(this._db, query); } return query } +function runQuery (db, query) { + db.run(query.text, query.values, function (err) { + query.complete(err, this.changes, this.lastID) + }) +} + +function eachQuery (db, query) { + db.each(query.text, query.values, onRow, function (err, count) { + query.complete(err, count); + }) + + function onRow (err, row) { + query.onRow(err, row) + } +} + SQLite3Connection.prototype.end = function (callback) { if (callback) this.on('end', callback) this._db.close()
Move differing run/each behaviour into helpers
diff --git a/Eloquent/Relations/Concerns/InteractsWithPivotTable.php b/Eloquent/Relations/Concerns/InteractsWithPivotTable.php index <HASH>..<HASH> 100644 --- a/Eloquent/Relations/Concerns/InteractsWithPivotTable.php +++ b/Eloquent/Relations/Concerns/InteractsWithPivotTable.php @@ -225,7 +225,7 @@ trait InteractsWithPivotTable $this->relatedPivotKey => $this->parseId($id), ], true); - $pivot->timestamps = in_array($this->updatedAt(), $this->pivotColumns); + $pivot->timestamps = $updated && in_array($this->updatedAt(), $this->pivotColumns); $pivot->fill($attributes)->save();
Prevent timestamp update when pivot is not dirty (#<I>)
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java index <HASH>..<HASH> 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java @@ -1,7 +1,7 @@ /* * %CopyrightBegin% * - * Copyright Ericsson AB 2000-2017. All Rights Reserved. + * Copyright Ericsson AB 2000-2021. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -565,6 +565,11 @@ public abstract class AbstractConnection extends Thread { // received tick? send tock! if (len == 0) { synchronized (this) { + if (socket == null) { + // protect from a potential thin race when the + // connection to the remote node is closed + throw new IOException("socket was closed"); + } OutputStream out = socket.getOutputStream(); out.write(tock); out.flush();
jinterface: Fix a NullPointerException in AbstractConnection After a call to close(), the socket is set to null which could lead to a NullPointerException in the receive_loop when handling tick messages. End the receive_loop instead in this case.
diff --git a/src/PhoreDirectory.php b/src/PhoreDirectory.php index <HASH>..<HASH> 100644 --- a/src/PhoreDirectory.php +++ b/src/PhoreDirectory.php @@ -145,4 +145,14 @@ class PhoreDirectory extends PhoreUri return $ret; } + /** + * Import file contents of parameter 1 to this directory + * + * @param $filename + */ + public function importZipFile($filename) + { + phore_exec("unzip :zipfile -d :folder", ["zipfile" => $filename, "folder" => (string)$this]); + } + } diff --git a/src/PhoreTempDir.php b/src/PhoreTempDir.php index <HASH>..<HASH> 100644 --- a/src/PhoreTempDir.php +++ b/src/PhoreTempDir.php @@ -14,6 +14,9 @@ class PhoreTempDir extends PhoreDirectory $this->mkdir(); } + + + public function __destruct() { $this->rmDir(true);
added importZipFile to directory
diff --git a/allaccess/tests/custom/views.py b/allaccess/tests/custom/views.py index <HASH>..<HASH> 100644 --- a/allaccess/tests/custom/views.py +++ b/allaccess/tests/custom/views.py @@ -5,7 +5,7 @@ import hashlib from django.core.urlresolvers import reverse -from allaccess.compat import get_user_model, smart_bytes +from allaccess.compat import get_user_model, smart_bytes, force_text from allaccess.views import OAuthRedirect, OAuthCallback @@ -28,7 +28,7 @@ class CustomCallback(OAuthCallback): digest = hashlib.sha1(smart_bytes(access)).digest() # Base 64 encode to get below 30 characters # Removed padding characters - email = '%s@example.com' % base64.urlsafe_b64encode(digest).replace('=', '') + email = '%s@example.com' % force_text(base64.urlsafe_b64encode(digest)).replace('=', '') User = get_user_model() kwargs = { 'email': email,
Custom test view needs to convert digest back to string.
diff --git a/spinoff/actor/_actor.py b/spinoff/actor/_actor.py index <HASH>..<HASH> 100644 --- a/spinoff/actor/_actor.py +++ b/spinoff/actor/_actor.py @@ -539,9 +539,10 @@ class Node(object): _all = [] @classmethod + @inlineCallbacks def stop_all(cls): for node in cls._all: - node.stop() + yield node.stop() del cls._all[:] @classmethod @@ -593,8 +594,11 @@ class Node(object): @inlineCallbacks def stop(self): - yield self.hub.stop() yield self.guardian.stop() + # TODO: just make the node send a special notification to other nodes, so as to avoid needless sending of many + # small termination messages: + yield sleep(.1) # let actors send termination messages + yield self.hub.stop() def __getstate__(self): # pragma: no cover raise PicklingError("Node cannot be serialized")
Node.stop now first stops the actors and then remoting, and then waits a bit before shutting down remoting to allow actors to send termination or other notifications in post_stop
diff --git a/iopipe/context.py b/iopipe/context.py index <HASH>..<HASH> 100644 --- a/iopipe/context.py +++ b/iopipe/context.py @@ -55,6 +55,13 @@ class IOpipeContext(object): log = metric def label(self, name): + if self.instance.report is None: + warnings.warn( + "Attempting to add label before function decorated with IOpipe. " + "This label will not be recorded." + ) + return + if not isinstance(name, string_types): warnings.warn( "Attempted to add a label that is not of type string. "
Check if there's a report before labeling (#<I>) Closes #<I>
diff --git a/backends/etcdv3/client.go b/backends/etcdv3/client.go index <HASH>..<HASH> 100644 --- a/backends/etcdv3/client.go +++ b/backends/etcdv3/client.go @@ -21,8 +21,10 @@ type Client struct { // NewEtcdClient returns an *etcdv3.Client with a connection to named machines. func NewEtcdClient(machines []string, cert, key, caCert string, basicAuth bool, username string, password string) (*Client, error) { cfg := clientv3.Config{ - Endpoints: machines, - DialTimeout: 5 * time.Second, + Endpoints: machines, + DialTimeout: 5 * time.Second, + DialKeepAliveTime: 10 * time.Second, + DialKeepAliveTimeout: 3 * time.Second, } if basicAuth {
Configure keepalives for etcdv3 backend
diff --git a/gremlin-core/src/main/java/com/tinkerpop/gremlin/process/util/DefaultTraversal.java b/gremlin-core/src/main/java/com/tinkerpop/gremlin/process/util/DefaultTraversal.java index <HASH>..<HASH> 100644 --- a/gremlin-core/src/main/java/com/tinkerpop/gremlin/process/util/DefaultTraversal.java +++ b/gremlin-core/src/main/java/com/tinkerpop/gremlin/process/util/DefaultTraversal.java @@ -62,7 +62,8 @@ public class DefaultTraversal<S, E> implements Traversal<S, E> { } public String toString() { - this.doFinalOptimization(); + // todo: optimizing on toString can cause weird stuff when debugging - can we have doPreflightFinalOptimization? + //this.doFinalOptimization(); return this.getSteps().toString(); }
Commented out toString execution of traversal optimizations. This causes early evaluation in the debugger and then really crazy stuff starts happening.
diff --git a/rules/DowngradePhp70/Rector/Spaceship/DowngradeSpaceshipRector.php b/rules/DowngradePhp70/Rector/Spaceship/DowngradeSpaceshipRector.php index <HASH>..<HASH> 100644 --- a/rules/DowngradePhp70/Rector/Spaceship/DowngradeSpaceshipRector.php +++ b/rules/DowngradePhp70/Rector/Spaceship/DowngradeSpaceshipRector.php @@ -64,8 +64,8 @@ $battleShipcompare = function ($left, $right) { return 0; } return $left < $right ? -1 : 1; -}); -return $battleShipcompare; +}; +return $battleShipcompare($a, $b); CODE_SAMPLE ), ]
Fix DowngradeSpaceshipRector sample code (#<I>)
diff --git a/src/Http/Middleware/DynamicMenusBuilder.php b/src/Http/Middleware/DynamicMenusBuilder.php index <HASH>..<HASH> 100644 --- a/src/Http/Middleware/DynamicMenusBuilder.php +++ b/src/Http/Middleware/DynamicMenusBuilder.php @@ -26,16 +26,18 @@ class DynamicMenusBuilder */ public function handle($request, Closure $next) { + session()->forget('active_menu'); + if (! $request->is('administrator*')) { $this->repository = app(Repository::class); $this->repository->getPublished()->each(function (Navigation $navigation) { MenuFactory::make($navigation->type, function (Builder $builder) use ($navigation) { $widgets = $navigation->getConnection()->table('widget_menu'); $assignment = [0]; - $navigation->menus->each(function (Menu $menu) use ($builder, $widgets, $assignment) { + $navigation->menus->each(function (Menu $menu) use ($builder, $widgets, &$assignment) { if ($menu->isActive()) { $assignment[] = $menu->id; - session(['active_menu' => $menu]); + session()->flash('active_menu', $menu); } $menus = $menu->descendantsAndSelf()->with('permissions')->get()->toHierarchy();
Flash active menu session on every request.
diff --git a/js/lib/mediawiki.ApiRequest.js b/js/lib/mediawiki.ApiRequest.js index <HASH>..<HASH> 100644 --- a/js/lib/mediawiki.ApiRequest.js +++ b/js/lib/mediawiki.ApiRequest.js @@ -560,12 +560,16 @@ function ParsoidCacheRequest ( env, title, oldid, options ) { timeout: 60 * 1000, // 60 seconds: less than 100s VE timeout so we still finish headers: { 'User-Agent': userAgent, - 'Cookie': env.cookie, 'Connection': 'close', 'x-parsoid-request': 'cache' } }; + if (env.cookie) { + // Forward the cookie if set + this.requestOptions.headers.Cookie = env.cookie; + } + if (!options.evenIfNotCached) { // Request a reply only from cache. this.requestOptions.headers['Cache-control'] = 'only-if-cached';
Only set cookie header on API requests when one was passed in We don't send Vary: Cookie headers ourselves, but it seems to be well possible that our Varnish config (by using various MW defaults) varies on cookies by default. That would explain the cache misses on selser that we are seeing in production. Change-Id: Id<I>fce<I>c<I>b<I>a9c<I>cf4bdd<I>e<I>
diff --git a/lib/typed/parfait/type.rb b/lib/typed/parfait/type.rb index <HASH>..<HASH> 100644 --- a/lib/typed/parfait/type.rb +++ b/lib/typed/parfait/type.rb @@ -61,9 +61,17 @@ module Parfait end def self.str_hash(str) - str = str.hash + if RUBY_ENGINE == "OPAL" + hash = 5381 + str.to_s.each_char do |c| + hash = ((hash << 5) + hash) + c.to_i; # hash * 33 + c without getting bignums + end + hash % (2 ** 51) + else + str.hash + end end - + def initialize( object_class , hash = {}) super() private_add_instance_variable :type ,:Type
had to fix the string hash for opal
diff --git a/src/properties/class-papi-property-group.php b/src/properties/class-papi-property-group.php index <HASH>..<HASH> 100644 --- a/src/properties/class-papi-property-group.php +++ b/src/properties/class-papi-property-group.php @@ -115,7 +115,7 @@ class Papi_Property_Group extends Papi_Property_Repeater { * @return array */ public function update_value( $values, $slug, $post_id ) { - if ( ! isset( $values[0] ) ) { + if ( ! isset( $values[0] ) && ! empty( $values ) ) { $values = [$values]; }
Fix empty array issue with group property test
diff --git a/cell/tests/actors/test_agents.py b/cell/tests/actors/test_agents.py index <HASH>..<HASH> 100644 --- a/cell/tests/actors/test_agents.py +++ b/cell/tests/actors/test_agents.py @@ -35,11 +35,12 @@ class test_dAgent(Case): ag, a = dA(conn), A() ag.cast = Mock() - proxy = ag.spawn(qualname(a)) + proxy = ag.spawn(A) ag.cast.assert_called_once_with( 'spawn', - {'name': qualname(a), 'id': actor_static_id.return_value}, + {'name': qualname(a), 'id': actor_static_id.return_value, + 'kwargs': {}}, ANY, reply_to=ticket_static_id.return_value, type=ACTOR_TYPE.RR, nowait=False)
Fix tests broken due the additional kwargs argument in spawn
diff --git a/system/modules/generalDriver/GeneralControllerDefault.php b/system/modules/generalDriver/GeneralControllerDefault.php index <HASH>..<HASH> 100644 --- a/system/modules/generalDriver/GeneralControllerDefault.php +++ b/system/modules/generalDriver/GeneralControllerDefault.php @@ -1589,7 +1589,7 @@ class GeneralControllerDefault extends Controller implements InterfaceGeneralCon } // Check if we have a valide sorting. - if ($intNextSorting <= 2 && !$blnWithoutReorder) + if (($intLowestSorting < 2 || $intNextSorting <= 2) && !$blnWithoutReorder) { // ToDo: Add child <=> parent config. $objConfig = $objCDP->getEmptyConfig(); @@ -1657,7 +1657,7 @@ class GeneralControllerDefault extends Controller implements InterfaceGeneralCon } // Check if we have a valide sorting. - if (round(($intNextSorting - $intAfterSorting) / 2) <= 2 && !$blnWithoutReorder) + if (($intAfterSorting < 2 || $intNextSorting < 2 || round(($intNextSorting - $intAfterSorting) / 2) <= 2) && !$blnWithoutReorder) { // ToDo: Add child <=> parent config. $objConfig = $objCDP->getEmptyConfig();
Update the "getNewPosition" function. Add some checks to validate the after sorting value.
diff --git a/oct2py/session.py b/oct2py/session.py index <HASH>..<HASH> 100644 --- a/oct2py/session.py +++ b/oct2py/session.py @@ -397,8 +397,12 @@ class Oct2Py(object): except Oct2PyError as e: if 'syntax error' in str(e): raise(e) - doc = self._eval('type {0}'.format(name), log=False, verbose=False) - doc = doc.splitlines()[0] + try: + doc = self._eval('type {0}'.format(name), log=False, verbose=False) + doc = doc.splitlines()[0] + except Oct2PyError: + msg = 'Function "%s" does not exist on the Octave Session path' + raise Oct2PyError(msg % name) return doc def __getattr__(self, attr):
Improve error message when function is not found
diff --git a/example-expo/AccessoryBar.js b/example-expo/AccessoryBar.js index <HASH>..<HASH> 100644 --- a/example-expo/AccessoryBar.js +++ b/example-expo/AccessoryBar.js @@ -10,8 +10,7 @@ import { export default class AccessoryBar extends React.Component { render() { - const { onSend } = this.props - const isTyping = this.props.isTyping + const { onSend, isTyping } = this.props return ( <View style={styles.container}>
refactor(typing-indicator): DRY in example
diff --git a/lib/knife-cloudformation/aws_commons.rb b/lib/knife-cloudformation/aws_commons.rb index <HASH>..<HASH> 100644 --- a/lib/knife-cloudformation/aws_commons.rb +++ b/lib/knife-cloudformation/aws_commons.rb @@ -120,6 +120,7 @@ module KnifeCloudformation cache.apply_limit(:stacks, args[:refresh_every].to_i) end if(@memo[:stacks].update_allowed? || args[:force_refresh]) + @memo[:stacks].restamp! long_running_job(:stacks) do logger.debug 'Populating full cloudformation list from remote end point' @memo.locked_action(:stacks_lock) do
Restamp the cached value prior to detached fetching
diff --git a/cli/command/system/info.go b/cli/command/system/info.go index <HASH>..<HASH> 100644 --- a/cli/command/system/info.go +++ b/cli/command/system/info.go @@ -91,6 +91,10 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error { fmt.Fprintf(dockerCli.Out(), "\n") } + fmt.Fprintf(dockerCli.Out(), " Log:") + fmt.Fprintf(dockerCli.Out(), " %s", strings.Join(info.Plugins.Log, " ")) + fmt.Fprintf(dockerCli.Out(), "\n") + fmt.Fprintf(dockerCli.Out(), "Swarm: %v\n", info.Swarm.LocalNodeState) if info.Swarm.LocalNodeState != swarm.LocalNodeStateInactive && info.Swarm.LocalNodeState != swarm.LocalNodeStateLocked { fmt.Fprintf(dockerCli.Out(), " NodeID: %s\n", info.Swarm.NodeID)
Add logdrivers to /info This is required for swarmkit to be able to filter based on log driver.
diff --git a/webpack.config.js b/webpack.config.js index <HASH>..<HASH> 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -49,7 +49,7 @@ module.exports = [{ }, { entry: './src/demo.js', output: { - path: path.join(__dirname, 'assets/dist'), + path: path.join(__dirname, 'dist'), filename: '[name].js', }, module: {loaders: loaders},
fix webpack config (#<I>)
diff --git a/backup/restorelib.php b/backup/restorelib.php index <HASH>..<HASH> 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -10,7 +10,7 @@ $status = true; if (empty($CFG->unzip)) { // Use built-in php-based unzip function - include_once("$CFG->wwwroot/lib/pclzip/pclzip.lib.php"); + include_once("$CFG->dirroot/lib/pclzip/pclzip.lib.php"); $archive = new PclZip($file); if (!$list = $archive->extract(dirname($file))) { $status = false;
Chanfed to locate the pclzip properly.
diff --git a/src/Corpus/TextCorpus.php b/src/Corpus/TextCorpus.php index <HASH>..<HASH> 100644 --- a/src/Corpus/TextCorpus.php +++ b/src/Corpus/TextCorpus.php @@ -150,23 +150,6 @@ class TextCorpus } /** - * Mark the neddle and get its context - * - * @return String - */ - private function extractExcerptTerm(int $needlePos, int $needleLength, String $text, int $contextLength, bool $mark = false) - { - //marking the term - $text = ($mark) ? Text::markString($text, $needlePos, $needleLength, ['{{','}}']) : $text; - $needleLength = ($mark) ? $needleLength+4 : $needleLength; - - //extracts the excerpt - $text = Text::getExcerpt($text, $needlePos, $needleLength, $contextLength); - - return utf8_encode($text); - } - - /** * Get percentage of times the needle shows up in the text * @param string $needle * @return float
Removed unused method Removed extractExcerptTerm method that was not used anymore.
diff --git a/lib/fog/rackspace/models/auto_scale/group_config.rb b/lib/fog/rackspace/models/auto_scale/group_config.rb index <HASH>..<HASH> 100644 --- a/lib/fog/rackspace/models/auto_scale/group_config.rb +++ b/lib/fog/rackspace/models/auto_scale/group_config.rb @@ -49,11 +49,30 @@ module Fog options['maxEntities'] = max_entities options['metadata'] = metadata unless metadata.nil? - data = service.update_group_config(group.id, options) - merge_attributes(data.body) + service.update_group_config(group.id, options) true end + # Saves group's configuration. + # This method will only save existing group configurations. New group configurations are created when a scaling group is created + # @return [Boolean] true if server has started saving + def save + if group.id + update + true + else + raise "New #{self.class} are created when a new Fog::Rackspace::AutoScale::Group is created" + end + end + + def reload + if group.id + data = service.get_group_config(group.id) + merge_attributes data.body['groupConfiguration'] + end + end + + end end end
[rackspace|auto_scale] fixed bug with group_config.update; added save and reload method
diff --git a/spec/unit/application/face_base_spec.rb b/spec/unit/application/face_base_spec.rb index <HASH>..<HASH> 100755 --- a/spec/unit/application/face_base_spec.rb +++ b/spec/unit/application/face_base_spec.rb @@ -97,6 +97,17 @@ describe Puppet::Application::FaceBase do end end + [%w{something_I_cannot_do --unknown-option}, + %w{something_I_cannot_do argument --unknown-option}].each do |input| + it "should report unknown actions even if there are unknown options" do + app.command_line.stubs(:args).returns input + Puppet::Face[:basetest, '0.0.1'].expects(:get_default_action).returns(nil) + app.stubs(:main) + expect { app.run }.to exit_with 1 + @logs.first.message.should =~ /has no 'something_I_cannot_do' action/ + end + end + it "should report a sensible error when options with = fail" do app.command_line.stubs(:args).returns %w{--action=bar foo} expect { app.preinit; app.parse_options }.
#<I>: Test unknown options don't shadow unknown actions. Unknown options used to shadow unknown actions: $ puppet node something_I_cannot_do --unknown-option Could not parse options: invalid option: --unknown-option The earlier changes have fixed this problem, but we now add extra testing to make sure that we don't regress to the earlier state of play.
diff --git a/stitch/src/main/java/com/mongodb/stitch/android/auth/anonymous/AnonymousAuthProviderInfo.java b/stitch/src/main/java/com/mongodb/stitch/android/auth/anonymous/AnonymousAuthProviderInfo.java index <HASH>..<HASH> 100644 --- a/stitch/src/main/java/com/mongodb/stitch/android/auth/anonymous/AnonymousAuthProviderInfo.java +++ b/stitch/src/main/java/com/mongodb/stitch/android/auth/anonymous/AnonymousAuthProviderInfo.java @@ -13,7 +13,7 @@ import com.mongodb.stitch.android.auth.AuthProviderInfo; */ @JsonIgnoreProperties(ignoreUnknown = true) public class AnonymousAuthProviderInfo extends AuthProviderInfo { - public static final String FQ_NAME = "anon/user"; + public static final String FQ_NAME = "anon-user"; @JsonCreator public AnonymousAuthProviderInfo(@JsonProperty(Fields.TYPE) @Nullable final String type,
fix FQ_NAME for anon provider (#<I>)
diff --git a/app/models/content.js b/app/models/content.js index <HASH>..<HASH> 100644 --- a/app/models/content.js +++ b/app/models/content.js @@ -1,6 +1,8 @@ import DS from 'ember-data'; import { get, computed } from '@ember/object'; +import { deprecate } from '@ember/application/deprecations'; + export default DS.Model.extend({ title: DS.attr('string'), canonical: DS.attr(), @@ -23,8 +25,10 @@ export default DS.Model.extend({ authors: DS.hasMany('author'), author: computed('authors.[]', function() { - // eslint-disable-next-line no-console - console.warn(`"author" is deprecated, you must define "authors" now. Content: ${this.title}`); + deprecate(`"author" is deprecated in the content model. You must use "authors" now in your templates.`, false, { + id: 'empress-blog:content-model-author', + until: '4.0.0', + }); return get(this, 'authors.firstObject'); }) });
turning contet.author deprecation into a real deprecation
diff --git a/lib/optimize/ConcatenatedModule.js b/lib/optimize/ConcatenatedModule.js index <HASH>..<HASH> 100644 --- a/lib/optimize/ConcatenatedModule.js +++ b/lib/optimize/ConcatenatedModule.js @@ -576,9 +576,12 @@ class ConcatenatedModule extends Module { moduleToInfoMap ) ); + + // Must use full identifier in our cache here to ensure that the source + // is updated should our dependencies list change. innerDependencyTemplates.set( "hash", - innerDependencyTemplates.get("hash") + this.rootModule.identifier() + innerDependencyTemplates.get("hash") + this.identifier() ); // Generate source code and analyse scopes
Invalidate concatenated module on dep change When the moduleSet for a given concatenated module changed, the source for the embedded modules would not necessarily, which lead to caching mismatch between the source and the modulesWithInfo structure. Fixes #<I>
diff --git a/web/web.go b/web/web.go index <HASH>..<HASH> 100644 --- a/web/web.go +++ b/web/web.go @@ -31,6 +31,7 @@ import ( var ( listenAddress = flag.String("listenAddress", ":9090", "Address to listen on for web interface.") useLocalAssets = flag.Bool("useLocalAssets", false, "Read assets/templates from file instead of binary.") + userAssetsPath = flag.String("userAssets", "", "Path to static asset directory, available at /user") ) type WebService struct { @@ -65,6 +66,10 @@ func (w WebService) ServeForever() error { exp.Handle("/static/", http.StripPrefix("/static/", new(blob.Handler))) } + if *userAssetsPath != "" { + exp.Handle("/user/", http.StripPrefix("/user/", http.FileServer(http.Dir(*userAssetsPath)))) + } + log.Printf("listening on %s", *listenAddress) return http.ListenAndServe(*listenAddress, exp.DefaultCoarseMux)
Support user-provided static asset directory [fix #<I>]
diff --git a/src/library.js b/src/library.js index <HASH>..<HASH> 100644 --- a/src/library.js +++ b/src/library.js @@ -82,6 +82,7 @@ } else if (Isla.Utils.type(o) === "String" || Isla.Utils.type(o) === "Boolean" || Isla.Utils.type(o) === "Function") { + o === null) { c = o; }
Fix library.clone so it preserves nulls.
diff --git a/trustar/models/page.py b/trustar/models/page.py index <HASH>..<HASH> 100644 --- a/trustar/models/page.py +++ b/trustar/models/page.py @@ -148,31 +148,6 @@ class Page(ModelBase): from_time=from_time, to_time=to_time) - @staticmethod - def get_cursor_based_page_generator(get_page, cursor=None): - """ - A page generator that uses cursor-based paginantion. - - :param get_page: a function to get the next page, given values for from_time and to_time - :param cursor: A Base64-encoded string that contains information on how to retrieve the next page. - If a cursor isn't passed, it will default to pageSize: 25, pageNumber: 0 - :return: a generator that yields each successive page - """ - - def get_next_cursor(result): - """ - Retrieves the Base-64 encoded cursor string from a page. - """ - - return result.responseMetaData.nextCursor - - # Yields result until an empty string is returned - while cursor != "": - # If cursor is None, no cursor value will be sent with request - result = get_page(cursor=cursor) - cursor = get_next_cursor(result) - yield result - @classmethod def get_generator(cls, page_generator): """
moved cursor-based pagination to own class
diff --git a/src/main/java/org/freecompany/redline/header/Header.java b/src/main/java/org/freecompany/redline/header/Header.java index <HASH>..<HASH> 100755 --- a/src/main/java/org/freecompany/redline/header/Header.java +++ b/src/main/java/org/freecompany/redline/header/Header.java @@ -96,7 +96,7 @@ public class Header extends AbstractHeader { REQUIREFLAGS( 1048, 4, "requireflags"), REQUIRENAME( 1049, 8, "requirename"), REQUIREVERSION( 1050, 8, "requireversion"), - CONFLICTFLAGS( 1053, 6, "conflictflags"), + CONFLICTFLAGS( 1053, 4, "conflictflags"), CONFLICTNAME( 1054, 8, "conflictname"), CONFLICTVERSION( 1055, 8, "conflictversion"), OBSOLETENAME( 1090, 8, "obsoletename"),
Changed data types for string arrays
diff --git a/input/_relation.js b/input/_relation.js index <HASH>..<HASH> 100644 --- a/input/_relation.js +++ b/input/_relation.js @@ -2,6 +2,7 @@ var d = require('es5-ext/lib/Object/descriptor') , copy = require('es5-ext/lib/Object/copy') + , extend = require('es5-ext/lib/Object/extend') , filter = require('es5-ext/lib/Object/filter') , forEach = require('es5-ext/lib/Object/for-each') , makeElement = require('dom-ext/lib/Document/prototype/make-element') @@ -100,6 +101,10 @@ module.exports = Object.defineProperties(relation, { inputOptions = filter(options, function (value, name) { return !htmlAttributes[name]; }); + if (options.input) { + extend(inputOptions, options.input); + delete inputOptions.input; + } input = this.toDOMInput(document, inputOptions); if (options.label == null) options.label = this._label;
Allow to provide custom input options to component
diff --git a/src/Enhavo/Bundle/NavigationBundle/Form/Type/NodeCollectionType.php b/src/Enhavo/Bundle/NavigationBundle/Form/Type/NodeCollectionType.php index <HASH>..<HASH> 100644 --- a/src/Enhavo/Bundle/NavigationBundle/Form/Type/NodeCollectionType.php +++ b/src/Enhavo/Bundle/NavigationBundle/Form/Type/NodeCollectionType.php @@ -87,7 +87,9 @@ class NodeCollectionType extends AbstractType /** @var NodeInterface $node */ $node = new $this->class; $modelClass = $item->getModel(); - $node->setSubject(new $modelClass); + if ($modelClass !== null) { + $node->setSubject(new $modelClass); + } $data[$key] = $node; } return $data;
Fix empty navigation model (#<I>)
diff --git a/lib/workers/branch/parent.js b/lib/workers/branch/parent.js index <HASH>..<HASH> 100644 --- a/lib/workers/branch/parent.js +++ b/lib/workers/branch/parent.js @@ -28,7 +28,14 @@ async function getParentBranch(config) { } if (pr.labels && pr.labels.includes(config.rebaseLabel)) { logger.info('Manual rebase requested via PR labels for #' + pr.number); - await platform.deleteLabel(pr.number, config.rebaseLabel); + // istanbul ignore if + if (config.dryRun) { + logger.info( + `DRY-RUN: Would delete label ${config.rebaseLabel} from #${pr.number}` + ); + } else { + await platform.deleteLabel(pr.number, config.rebaseLabel); + } return { parentBranch: undefined }; } }
fix: ignore delete label if dry-run (#<I>)
diff --git a/mapmyfitness/__init__.py b/mapmyfitness/__init__.py index <HASH>..<HASH> 100644 --- a/mapmyfitness/__init__.py +++ b/mapmyfitness/__init__.py @@ -11,7 +11,7 @@ class MapMyFitness(object): def __new__(cls, *args, **kwargs): if not cls._instance: - cls._instance = super(MapMyFitness, cls).__new__(cls, *args, **kwargs) + cls._instance = super(MapMyFitness, cls).__new__(cls) return cls._instance
Trying to make python3 happy with the singleton's use of super.
diff --git a/test/spec/ol/interaction/modify.test.js b/test/spec/ol/interaction/modify.test.js index <HASH>..<HASH> 100644 --- a/test/spec/ol/interaction/modify.test.js +++ b/test/spec/ol/interaction/modify.test.js @@ -423,6 +423,37 @@ describe('ol.interaction.Modify', function () { expect(lineFeature.getGeometry().getCoordinates().length).to.equal(5); }); + it('inserts one vertex into both linestrings with duplicate segments each', function () { + const lineFeature1 = new Feature( + new LineString([ + [-10, -10], + [10, 10], + [-10, -10], + ]) + ); + const lineFeature2 = new Feature( + new LineString([ + [10, 10], + [-10, -10], + [10, 10], + ]) + ); + features.length = 0; + features.push(lineFeature1, lineFeature2); + + const modify = new Modify({ + features: new Collection(features), + }); + map.addInteraction(modify); + + // Click on line + simulateEvent('pointermove', 0, 0, null, 0); + simulateEvent('pointerdown', 0, 0, null, 0); + simulateEvent('pointerup', 0, 0, null, 0); + + expect(lineFeature1.getGeometry().getCoordinates().length).to.be(4); + expect(lineFeature2.getGeometry().getCoordinates().length).to.be(4); + }); }); describe('circle modification', function () {
Add vertex insertion test for modify interaction
diff --git a/src/org/parosproxy/paros/network/HttpSender.java b/src/org/parosproxy/paros/network/HttpSender.java index <HASH>..<HASH> 100644 --- a/src/org/parosproxy/paros/network/HttpSender.java +++ b/src/org/parosproxy/paros/network/HttpSender.java @@ -31,6 +31,7 @@ // ZAP: 2013/01/23 Clean up of exception handling/logging. // ZAP: 2013/01/30 Issue 478: Allow to choose to send ZAP's managed cookies on // a single Cookie request header and set it as the default +// ZAP: 2013/07/10 Issue 720: Cannot send non standard http methods package org.parosproxy.paros.network; @@ -373,7 +374,10 @@ public class HttpSender { // no more retry modifyUserAgent(msg); method = helper.createRequestMethod(msg.getRequestHeader(), msg.getRequestBody()); - method.setFollowRedirects(isFollowRedirect); + if (! (method instanceof GenericMethod)) { + // cant do this for Generic methods - it will fail + method.setFollowRedirects(isFollowRedirect); + } this.executeMethod(method); if (allowState) { if (param.isHttpStateEnabled()) {
Issue <I>: Cannot send non standard http methods
diff --git a/src/Canonical.php b/src/Canonical.php index <HASH>..<HASH> 100644 --- a/src/Canonical.php +++ b/src/Canonical.php @@ -84,14 +84,15 @@ class Canonical implements EventSubscriberInterface $override = $this->override; - $schemeStubbed = false; + // Prepend scheme if not included so parse_url doesn't choke. if (strpos($override, 'http') !== 0) { - $schemeStubbed = true; $override = 'http://' . $override; } $parts = parse_url($override); - if (!$schemeStubbed && isset($parts['scheme'])) { + // Only override scheme if it's an upgrade to https. + // i.e Don't do: https -> http + if (isset($parts['scheme']) && $parts['scheme'] === 'https') { $this->requestContext->setScheme($parts['scheme']); } if (isset($parts['host'])) {
Change canonical to only override scheme if it is an upgrade. i.e. don't https -> http.
diff --git a/src/editor/EditorManager.js b/src/editor/EditorManager.js index <HASH>..<HASH> 100644 --- a/src/editor/EditorManager.js +++ b/src/editor/EditorManager.js @@ -407,6 +407,7 @@ define(function (require, exports, module) { _destroyEditorIfUnneeded(_currentEditorsDocument); _doFocusedEditorChanged(null, _currentEditor); _currentEditorsDocument = null; + StatusBar.hide(); $("#not-editor").css("display", ""); }
hide status bar when ther is no editor
diff --git a/test/com/google/javascript/jscomp/fuzzing/ControlledRandom.java b/test/com/google/javascript/jscomp/fuzzing/ControlledRandom.java index <HASH>..<HASH> 100644 --- a/test/com/google/javascript/jscomp/fuzzing/ControlledRandom.java +++ b/test/com/google/javascript/jscomp/fuzzing/ControlledRandom.java @@ -26,7 +26,7 @@ import java.util.Random; */ public class ControlledRandom extends Random { public ControlledRandom() { - super(); + super(123); } /** * @param seed
Fixing failed tests ------------- Created by MOE: <URL>
diff --git a/napalm_junos/junos.py b/napalm_junos/junos.py index <HASH>..<HASH> 100644 --- a/napalm_junos/junos.py +++ b/napalm_junos/junos.py @@ -854,20 +854,22 @@ class JunOSDriver(NetworkDriver): def get_mac_address_table(self): - mac_address_table = list() + mac_address_table = [] mac_table = junos_views.junos_mac_address_table(self.device) + if self.device.facts.get('personality', '') in ['SWITCH']: # for EX, QFX devices + mac_table.GET_RPC = 'get-ethernet-switching-table-information' mac_table.get() mac_table_items = mac_table.items() default_values = { - 'mac' : u'', - 'interface' : u'', - 'vlan' : 0, - 'static' : False, - 'active' : True, - 'moves' : 0, - 'last_move' : 0.0 + 'mac': u'', + 'interface': u'', + 'vlan': 0, + 'static': False, + 'active': True, + 'moves': 0, + 'last_move': 0.0 } for mac_table_entry in mac_table_items:
Diffrent RPC for EX & QFX series
diff --git a/executor/opensubmit/executor/__init__.py b/executor/opensubmit/executor/__init__.py index <HASH>..<HASH> 100755 --- a/executor/opensubmit/executor/__init__.py +++ b/executor/opensubmit/executor/__init__.py @@ -147,7 +147,7 @@ def _infos_cmd(cmd, stdhndl=" 2>&1", e_shell=True): except Exception as e: return "" -def _fetch_validator(url, path): +def _fetch_validator(config, url, path): ''' Fetch validator script from the given URL and put it under the given target file. @@ -536,7 +536,7 @@ def run(config_file): lock.release() return False # fetch validator into target directory - _fetch_validator(validator_url, finalpath) + _fetch_validator(config, validator_url, finalpath) # Allow submission to load their own libraries logger.debug("Setting LD_LIBRARY_PATH to "+finalpath) os.environ["LD_LIBRARY_PATH"]=finalpath
fixing issues #<I>. NameError: global name 'config' is not defined IF Validator ZIP package does not contain validator.py
diff --git a/internal/frame/frame.go b/internal/frame/frame.go index <HASH>..<HASH> 100644 --- a/internal/frame/frame.go +++ b/internal/frame/frame.go @@ -139,7 +139,7 @@ func (f *Frame) requantizeProcessLong(gr, ch, is_pos, sfb int) { if f.sideInfo.ScalefacScale[gr][ch] != 0 { sf_mult = 1.0 } - tmp1 := 1.0 + tmp1 := 0.0 // https://github.com/technosaurus/PDMP3/issues/4 if sfb < 21 { pf_x_pt := float64(f.sideInfo.Preflag[gr][ch]) * pretab[sfb] @@ -160,7 +160,7 @@ func (f *Frame) requantizeProcessShort(gr, ch, is_pos, sfb, win int) { if f.sideInfo.ScalefacScale[gr][ch] != 0 { sf_mult = 1.0 } - tmp1 := 1.0 + tmp1 := 0.0 // https://github.com/technosaurus/PDMP3/issues/4 if sfb < 12 { tmp1 = math.Pow(2.0, -(sf_mult * float64(f.mainData.ScalefacS[gr][ch][sfb][win])))
Reduce noises (but not all the problems are solved) (#<I>)
diff --git a/lib/taskrabbit/task.rb b/lib/taskrabbit/task.rb index <HASH>..<HASH> 100644 --- a/lib/taskrabbit/task.rb +++ b/lib/taskrabbit/task.rb @@ -50,6 +50,10 @@ module Taskrabbit end end + def new_record? + !id + end + def delete! reload('delete', "tasks/#{id.to_s}") end diff --git a/spec/taskrabbit/task_spec.rb b/spec/taskrabbit/task_spec.rb index <HASH>..<HASH> 100644 --- a/spec/taskrabbit/task_spec.rb +++ b/spec/taskrabbit/task_spec.rb @@ -78,6 +78,20 @@ describe Taskrabbit::Task do end end + describe "#new_record?" do + subject { Taskrabbit::Task.new } + + it "returns true if the task has no id" do + subject.stub(:id => nil) + subject.should be_new_record + end + + it "returns false if the task has an id" do + subject.stub(:id => 123) + subject.should_not be_new_record + end + end + describe "#find" do it "should fetch tasks" do
Add new_record? to Taskrabbit::Task
diff --git a/src/Composer/Command/RequireCommand.php b/src/Composer/Command/RequireCommand.php index <HASH>..<HASH> 100644 --- a/src/Composer/Command/RequireCommand.php +++ b/src/Composer/Command/RequireCommand.php @@ -20,6 +20,7 @@ use Composer\Factory; use Composer\Installer; use Composer\Json\JsonFile; use Composer\Json\JsonManipulator; +use Composer\Package\Version\VersionParser; /** * @author Jérémy Romey <jeremy@free-agent.fr> @@ -80,6 +81,12 @@ EOT $baseRequirements = array_key_exists($requireKey, $composer) ? $composer[$requireKey] : array(); $requirements = $this->formatRequirements($requirements); + // validate requirements format + $versionParser = new VersionParser(); + foreach ($requirements as $constraint) { + $versionParser->parseConstraints($constraint); + } + if (!$this->updateFileCleanly($json, $baseRequirements, $requirements, $requireKey)) { foreach ($requirements as $package => $version) { $baseRequirements[$package] = $version;
Validate constraints in require command, fixes #<I>
diff --git a/addon/merge/merge.js b/addon/merge/merge.js index <HASH>..<HASH> 100644 --- a/addon/merge/merge.js +++ b/addon/merge/merge.js @@ -918,7 +918,7 @@ hasMarker: function(n) { var handle = this.cm.getLineHandle(n) if (handle.markedSpans) for (var i = 0; i < handle.markedSpans.length; i++) - if (handle.markedSpans[i].mark.collapsed && handle.markedSpans[i].to != null) + if (handle.markedSpans[i].marker.collapsed && handle.markedSpans[i].to != null) return true return false },
[merge addon] Fix typo in hasMarker() This was causing exceptions to be thrown when using custom markers.
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -115,6 +115,7 @@ setup( 'License :: OSI Approved :: MIT License', 'Natural Language :: English', 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', ], # trinity entry_points={
misc: list Python <I> (sic!) in setup.py. This is a "bump" commit to force CircleCI picking up the new branch. Python <I> is known-to-work and regularly tested; it missing in setup.py is an oversight. Python <I> is not yet known to work, is just starting to get one module tested, - therefore not adding it here (yet).
diff --git a/src/main/java/org/fluentd/logger/Sender.java b/src/main/java/org/fluentd/logger/Sender.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/fluentd/logger/Sender.java +++ b/src/main/java/org/fluentd/logger/Sender.java @@ -1,3 +1,20 @@ +// +// A Structured Logger for Fluent +// +// Copyright (C) 2011 Muga Nishizawa +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// package org.fluentd.logger; import java.io.BufferedOutputStream;
added copyright notation in Sender.java