diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java index <HASH>..<HASH> 100755 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandManager.java @@ -55,7 +55,7 @@ import org.jxmpp.jid.Jid; * commands offered by a service and for processing commands requests. * * Pass in an XMPPConnection instance to - * {@link #getAddHocCommandsManager(org.jivesoftware.smack.XMPPConnection)} in order to + * {@link #getAddHocCommandsManager(XMPPConnection)} in order to * get an instance of this class. * * @author Gabriel Guardincerri
Do not fully qualify type in javadoc
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -114,6 +114,7 @@ function first ( ) { if ( results [index] ) { promise.fulfill(results [index]); } + index ++; } return promise.fulfill(results.pop()); }); diff --git a/package.json b/package.json index <HASH>..<HASH> 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "promix", "description": "Mix promises with callbacks for improved control flow", - "version": "0.1.10", + "version": "0.1.11", "main": "./index", "author": { "name": "Pachet", diff --git a/test/test-core.js b/test/test-core.js index <HASH>..<HASH> 100644 --- a/test/test-core.js +++ b/test/test-core.js @@ -207,6 +207,7 @@ function concat ( test ) { module.exports = { join : join, fork : fork, + first : first, wrap : wrap, errorless : errorless, invoke : invoke,
Fixing bug with the way that results were being checked within the promix.first() method.
diff --git a/src/DaftObjectMemoryTree.php b/src/DaftObjectMemoryTree.php index <HASH>..<HASH> 100644 --- a/src/DaftObjectMemoryTree.php +++ b/src/DaftObjectMemoryTree.php @@ -130,7 +130,7 @@ abstract class DaftObjectMemoryTree extends DaftObjectMemoryRepository implement ) : ( ((array) $id === (array) $this->GetNestedObjectTreeRootId()) - ? $this->RecallDaftNestedObjectFullTree(0) + ? $this->RecallDaftNestedObjectFullTree($relativeDepthLimit) : [] ); }
relative path limit needs to be passed on
diff --git a/code/Heystack/Subsystem/Ecommerce/Purchasable/Interfaces/PurchasableHolderInterface.php b/code/Heystack/Subsystem/Ecommerce/Purchasable/Interfaces/PurchasableHolderInterface.php index <HASH>..<HASH> 100644 --- a/code/Heystack/Subsystem/Ecommerce/Purchasable/Interfaces/PurchasableHolderInterface.php +++ b/code/Heystack/Subsystem/Ecommerce/Purchasable/Interfaces/PurchasableHolderInterface.php @@ -62,6 +62,13 @@ interface PurchasableHolderInterface extends TransactionModifierInterface public function getPurchasable(IdentifierInterface $identifier); /** + * Retrieves a purchasable from the implementing class' internal cache of + * purchasables using the Primary string on the Identifier object + * @param \Heystack\Subsystem\Core\Identifier\IdentifierInterface $identifier + */ + public function getPurchasableByPrimaryIdentifier(IdentifierInterface $identifier); + + /** * Removes a purchasable from the implementing class' internal cache of * purchasables * @param \Heystack\Subsystem\Core\Identifier\IdentifierInterface $identifier
FEATURE: Added getPurchasableByPrimaryIdentifier() so that we can retrieve the purchasable just using a part of the identifier (Primary)
diff --git a/LiSE/LiSE/allegedb/__init__.py b/LiSE/LiSE/allegedb/__init__.py index <HASH>..<HASH> 100644 --- a/LiSE/LiSE/allegedb/__init__.py +++ b/LiSE/LiSE/allegedb/__init__.py @@ -1221,6 +1221,8 @@ class ORM(object): if not to_keep: # unloading literally everything would make the game unplayable, # so don't + if hasattr(self, 'warning'): + self.warning("Not unloading, due to lack of keyframes") return caches = self._caches for past_branch, (
Add a warning when unload() can't do anything
diff --git a/Entity/DataRepository.php b/Entity/DataRepository.php index <HASH>..<HASH> 100644 --- a/Entity/DataRepository.php +++ b/Entity/DataRepository.php @@ -278,9 +278,11 @@ class DataRepository extends EntityRepository throw new \LogicException("Family {$family->getCode()} does not have an attribute as label"); } if ($attribute->getType()->isRelation() || $attribute->getType()->isEmbedded()) { - continue; // @todo fixme + // @todo fixme properly with eav join support + $orCondition[] = $eavQb->attribute($attribute)->isNotNull(); + } else { + $orCondition[] = $eavQb->attribute($attribute)->like($term); } - $orCondition[] = $eavQb->attribute($attribute)->like($term); } return $eavQb->apply($eavQb->getOr($orCondition));
Temporary fix for nested attributeAsLabel properties
diff --git a/invenio_files_rest/models.py b/invenio_files_rest/models.py index <HASH>..<HASH> 100644 --- a/invenio_files_rest/models.py +++ b/invenio_files_rest/models.py @@ -500,6 +500,7 @@ class FileInstance(db.Model, Timestamp): current_app.config['FILES_REST_DEFAULT_STORAGE_CLASS'] \ if storage_class is None else \ storage_class + return self class ObjectVersion(db.Model, Timestamp):
models: minor fix * Adds support for chaining methods.
diff --git a/src/Justimmo/Api/JustimmoApi.php b/src/Justimmo/Api/JustimmoApi.php index <HASH>..<HASH> 100644 --- a/src/Justimmo/Api/JustimmoApi.php +++ b/src/Justimmo/Api/JustimmoApi.php @@ -276,6 +276,8 @@ class JustimmoApi implements JustimmoApiInterface */ public function call($call, array $params = array()) { + $startTime = microtime(true); + if (!array_key_exists('culture', $params)) { $params['culture'] = $this->culture; } @@ -290,6 +292,13 @@ class JustimmoApi implements JustimmoApiInterface $this->logger->debug('cache found'); $this->logger->debug($content); + $this->logger->debug('call end', array( + 'url' => $url, + 'cache' => true, + 'time' => microtime(true) - $startTime, + 'response' => $content, + )); + return $content; } @@ -323,6 +332,13 @@ class JustimmoApi implements JustimmoApiInterface $this->cache->set($key, $response); + $this->logger->debug('call end', array( + 'url' => $url, + 'cache' => false, + 'time' => microtime(true) - $startTime, + 'response' => $response, + )); + return $response; }
statistic logging [skip ci]
diff --git a/src/fileseq/all.py b/src/fileseq/all.py index <HASH>..<HASH> 100644 --- a/src/fileseq/all.py +++ b/src/fileseq/all.py @@ -35,7 +35,7 @@ Regular expression for matching a file sequence string. Example: /film/shot/renders/bilbo_bty.1-100#.exr """ -_SPLITTER_PATTERN = re.compile("([\:xy\-0-9,]*)([\#\@]*)") +_SPLITTER_PATTERN = re.compile("([\:xy\-0-9,]*)([\#\@]+)") """ Regular expression pattern for matching file names on disk.
Force the frameID to include at least one # or @ character
diff --git a/src/Codeception/Module/WebDriver.php b/src/Codeception/Module/WebDriver.php index <HASH>..<HASH> 100644 --- a/src/Codeception/Module/WebDriver.php +++ b/src/Codeception/Module/WebDriver.php @@ -2123,16 +2123,16 @@ class WebDriver extends CodeceptionModule implements * 'field1' => 'value', * 'checkbox' => [ * 'value of first checkbox', - * 'value of second checkbox, + * 'value of second checkbox', * ], * 'otherCheckboxes' => [ * true, * false, - * false + * false, * ], * 'multiselect' => [ * 'first option value', - * 'second option value' + * 'second option value', * ] * ]); * ?>
Update WebDriver documentation - typo in example (#<I>) Missing `'` in an example which break the style
diff --git a/src/Illuminate/Foundation/Testing/TestResponse.php b/src/Illuminate/Foundation/Testing/TestResponse.php index <HASH>..<HASH> 100644 --- a/src/Illuminate/Foundation/Testing/TestResponse.php +++ b/src/Illuminate/Foundation/Testing/TestResponse.php @@ -64,6 +64,36 @@ class TestResponse } /** + * Assert that the response has a not found status code. + * + * @return $this + */ + public function assertNotFound() + { + PHPUnit::assertTrue( + $this->isNotFound(), + 'Response status code ['.$this->getStatusCode().'] is not a not found status code.' + ); + + return $this; + } + + /** + * Assert that the response has a forbidden status code. + * + * @return $this + */ + public function assertForbidden() + { + PHPUnit::assertTrue( + $this->isForbidden(), + 'Response status code ['.$this->getStatusCode().'] is not a forbidden status code.' + ); + + return $this; + } + + /** * Assert that the response has the given status code. * * @param int $status
Add additional methods for response status testing (#<I>)
diff --git a/spec/mysql2/statement_spec.rb b/spec/mysql2/statement_spec.rb index <HASH>..<HASH> 100644 --- a/spec/mysql2/statement_spec.rb +++ b/spec/mysql2/statement_spec.rb @@ -764,7 +764,9 @@ RSpec.describe Mysql2::Statement do context 'close' do it 'should free server resources' do stmt = @client.prepare 'SELECT 1' + GC.disable expect { stmt.close }.to change(&method(:stmt_count)).by(-1) + GC.enable end it 'should raise an error on subsequent execution' do
Deflake statement_spec by preventing GC during assertion
diff --git a/examples/other/export_x3d.py b/examples/other/export_x3d.py index <HASH>..<HASH> 100644 --- a/examples/other/export_x3d.py +++ b/examples/other/export_x3d.py @@ -1,5 +1,5 @@ -"""Embed a 3D scene -in a webpage with +"""Embed a 3D scene +in a webpage with x3dom and vtkplotter""" from vtkplotter import * @@ -10,7 +10,7 @@ e.pointColors(ec[:,1]) # add dummy colors along y t = Text(__doc__, pos=(3e03,5.5e03,1e04), s=350) show(e, t) -# This exports the scene and generates 2 files: +# This exports the scene and generates 2 files: # embryo.x3d and an example embryo.html to inspect in the browser exportWindow('embryo.x3d')
Removed trailing spaces in examples/other/export_x3d.py
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', setup( name='gspread', - packages=['gspread', 'gspread.v4'], + packages=['gspread'], description=description, long_description=long_description, version=version,
Exclude `v4` from setup
diff --git a/webhooks.go b/webhooks.go index <HASH>..<HASH> 100644 --- a/webhooks.go +++ b/webhooks.go @@ -87,7 +87,6 @@ func (p ProxyInterceptCallbackWebhook) GetInteractionData() (InteractionData, er // text message response, or redirect a call to another number. type ProxyOutOfSessionCallbackWebhook struct { AccountSid string `form:"AccountSid"` - Body string `form:"Body"` SessionUniqueName string `form:"sessionUniqueName"` SessionAccountSid string `form:"sessionAccountSid"` SessionServiceSid string `form:"sessionServiceSid"` @@ -99,6 +98,10 @@ type ProxyOutOfSessionCallbackWebhook struct { SessionDateEnded time.Time `form:"sessionDateEnded"` SessionClosedReason string `form:"sessionClosedReason"` + // SMS Specific + Body string `form:"Body"` + SmsSid string `form:"SmsSid"` + To string `form:"To"` ToCity string `form:"ToCity"` ToState string `form:"ToState"`
Add SmsSid to OOS Webhook
diff --git a/raft.go b/raft.go index <HASH>..<HASH> 100644 --- a/raft.go +++ b/raft.go @@ -201,8 +201,8 @@ func (r *Raft) appendEntries(rpc RPC, a *AppendEntriesRequest) (transition bool) Term: r.currentTerm, Success: false, } - var err error - defer rpc.Respond(resp, err) + var rpcErr error + defer rpc.Respond(resp, rpcErr) // Ignore an older term if a.Term < r.currentTerm { @@ -274,8 +274,8 @@ func (r *Raft) requestVote(rpc RPC, req *RequestVoteRequest) (transition bool) { Term: r.currentTerm, Granted: false, } - var err error - defer rpc.Respond(resp, err) + var rpcErr error + defer rpc.Respond(resp, rpcErr) // Ignore an older term if req.Term < r.currentTerm {
Ensure we don't return the wrong error as part of the RPC response
diff --git a/src/core/lombok/javac/apt/Processor.java b/src/core/lombok/javac/apt/Processor.java index <HASH>..<HASH> 100644 --- a/src/core/lombok/javac/apt/Processor.java +++ b/src/core/lombok/javac/apt/Processor.java @@ -256,12 +256,16 @@ public class Processor extends AbstractProcessor { for (int i = priorityLevels.length - 1; i >= 0; i--) { Long curLevel = priorityLevels[i]; Long nextLevel = (i == priorityLevels.length - 1) ? null : priorityLevels[i + 1]; + List<JCCompilationUnit> cusToAdvance = new ArrayList<JCCompilationUnit>(); for (Map.Entry<JCCompilationUnit, Long> entry : roots.entrySet()) { if (curLevel.equals(entry.getValue())) { - entry.setValue(nextLevel); + cusToAdvance.add(entry.getKey()); newLevels.add(nextLevel); } } + for (JCCompilationUnit unit : cusToAdvance) { + roots.put(unit, nextLevel); + } } newLevels.remove(null);
[i<I>] Another try to prevent NPEs on IBM J9
diff --git a/lib/database/domain.js b/lib/database/domain.js index <HASH>..<HASH> 100644 --- a/lib/database/domain.js +++ b/lib/database/domain.js @@ -71,9 +71,11 @@ Domain.prototype = { return domainNameFromHost; } - var domainNameFromPath = Domain.getNameFromPath(source.url); - if (domainNameFromPath) - return domainNameFromPath; + if (source.url) { + var domainNameFromPath = Domain.getNameFromPath(source.url); + if (domainNameFromPath) + return domainNameFromPath; + } throw new Error('no domain name'); },
Fix error around undefined (or null) request.url
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup( packages=['treetime'], install_requires = [ 'biopython>=1.66', - 'matplotlib>=2.0, ==2.*', + 'matplotlib>=2.0', 'numpy>=1.10.4', 'pandas>=0.17.1', 'scipy>=0.16.1' diff --git a/treetime/__init__.py b/treetime/__init__.py index <HASH>..<HASH> 100644 --- a/treetime/__init__.py +++ b/treetime/__init__.py @@ -7,4 +7,4 @@ from .gtr import GTR from .merger_models import Coalescent from .treeregression import TreeRegression from .argument_parser import make_parser -version="0.6.0" +version="0.6.1"
relax matplotlib requirement to allow version 3.*
diff --git a/src/js/core/mediaelement.js b/src/js/core/mediaelement.js index <HASH>..<HASH> 100644 --- a/src/js/core/mediaelement.js +++ b/src/js/core/mediaelement.js @@ -389,8 +389,10 @@ class MediaElement { }, triggerAction = (methodName, args) => { try { - // Sometimes, playing native DASH media might throw `DOMException: The play() request was interrupted`. - if (methodName === 'play' && t.mediaElement.rendererName === 'native_dash') { + // Sometimes, playing native DASH media might throw `DOMException: The play() request was interrupted`. + // Add this for native HLS playback as well + if (methodName === 'play' && + (t.mediaElement.rendererName === 'native_dash' || t.mediaElement.rendererName === 'native_hls') { const response = t.mediaElement.renderer[methodName](args); if (response && typeof response.then === 'function') { response.catch(() => {
Added handling of the .play() promise errors to native_hls player
diff --git a/src/Facade/Address.php b/src/Facade/Address.php index <HASH>..<HASH> 100755 --- a/src/Facade/Address.php +++ b/src/Facade/Address.php @@ -54,6 +54,11 @@ class Address return self::$sdk->get('customers/'.$customer.'/addresses', $terms); } + public static function Delete($customer, $id) + { + return self::$sdk->delete('customers/'.$customer.'/addresses/'.$id); + } + public static function Fields($customer = null, $id = null) { $uri = 'customers';
Add missing delete() method to Address facade
diff --git a/tests/test_general.py b/tests/test_general.py index <HASH>..<HASH> 100644 --- a/tests/test_general.py +++ b/tests/test_general.py @@ -12,11 +12,11 @@ from symfit import (Variable, Parameter, Fit, FitResults, Maximize, Likelihood, log, variables, parameters, Model, NumericalLeastSquares, Eq, Ge) from symfit.distributions import Gaussian, Exp -#from symfit.tests.tests_fit_result import TestFitResults -#from symfit.tests.tests_analytical_fit import TestAnalyticalFit -#from symfit.tests.tests_model import TestModel -#from symfit.tests.tests_ode import TestODE -#from symfit.tests.tests_constrained import TestConstrained +from tests.test_fit_result import TestFitResults +from tests.test_analytical_fit import TestAnalyticalFit +from tests.test_model import TestModel +from tests.test_ode import TestODE +from tests.test_constrained import TestConstrained if sys.version_info >= (3, 0): import inspect as inspect_sig
Re-enabled all tests.
diff --git a/labsuite/compilers/plate_map.py b/labsuite/compilers/plate_map.py index <HASH>..<HASH> 100644 --- a/labsuite/compilers/plate_map.py +++ b/labsuite/compilers/plate_map.py @@ -169,6 +169,6 @@ class Plate(): """ Returns the well position on this plate matching a particular value. """ - for pos in self.map: + for pos in sorted(self.map.keys()): if self.map[pos].strip() == value: return humanize_position(pos)
CSV Ingestion: Always return same well in value search.
diff --git a/dev/com.ibm.ws.logging_test/test/com/ibm/ws/logging/utils/FileLogHolderTest.java b/dev/com.ibm.ws.logging_test/test/com/ibm/ws/logging/utils/FileLogHolderTest.java index <HASH>..<HASH> 100644 --- a/dev/com.ibm.ws.logging_test/test/com/ibm/ws/logging/utils/FileLogHolderTest.java +++ b/dev/com.ibm.ws.logging_test/test/com/ibm/ws/logging/utils/FileLogHolderTest.java @@ -10,6 +10,11 @@ *******************************************************************************/ package com.ibm.ws.logging.utils; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; + import java.io.File; import java.io.FilenameFilter; import java.io.IOException;
Issue <I>: Revert missing imports
diff --git a/whizzer/rpc/proxy.py b/whizzer/rpc/proxy.py index <HASH>..<HASH> 100644 --- a/whizzer/rpc/proxy.py +++ b/whizzer/rpc/proxy.py @@ -40,14 +40,6 @@ class Proxy(object): self.requests = dict() self.timeout = None - def set_timeout(self, timeout): - """Set the timeout of blocking calls, None means block forever. - - timeout -- seconds after which to raise a TimeoutError for blocking calls. - - """ - self.timeout = timeout - def call(self, method, *args): """Perform a synchronous remote call where the returned value is given immediately.
timeout is a property not a method
diff --git a/backtrader/feeds/yahoo.py b/backtrader/feeds/yahoo.py index <HASH>..<HASH> 100644 --- a/backtrader/feeds/yahoo.py +++ b/backtrader/feeds/yahoo.py @@ -139,7 +139,10 @@ class YahooFinanceCSVData(feed.CSVDataBase): # In v7, the final seq is "adj close", close, volume adjustedclose = c # c was read above c = float(linetokens[next(i)]) - v = float(linetokens[next(i)]) + try: + v = float(linetokens[next(i)]) + except: # cover the case in which volume is "null" + v = 0.0 if self.p.swapcloses: # swap closing prices if requested c, adjustedclose = adjustedclose, c
Handle volume as string null in YahooFinanceData
diff --git a/src/DOM/Element.js b/src/DOM/Element.js index <HASH>..<HASH> 100644 --- a/src/DOM/Element.js +++ b/src/DOM/Element.js @@ -39,7 +39,7 @@ class Element extends Node { return window.innerHeight; } - getContext(contextType, context) { + getContext(contextType, contextOptions, context) { const possibleContext = context || global.__context; if (contextType != '2d' && possibleContext) { return possibleContext;
Fixed `gl.createBuffer is not a function`. With this change, I _believe_ `expo-pixi` works again with Expo SDK <I>.
diff --git a/filterbank/filterbank2.py b/filterbank/filterbank2.py index <HASH>..<HASH> 100755 --- a/filterbank/filterbank2.py +++ b/filterbank/filterbank2.py @@ -229,6 +229,7 @@ class Filterbank(object): self.header = self.container.header self.n_ints_in_file = self.container.n_ints_in_file self.__setup_time_axis() + self.heavy = self.container.heavy #Loading data (default for light files). if self.container.data is not None: @@ -763,6 +764,8 @@ def cmd_tool(args=None): # Open filterbank data filename = args.filename load_data = not args.info_only + info_only = args.info_only + # only load one integration if looking at spectrum wtp = args.what_to_plot @@ -783,8 +786,13 @@ def cmd_tool(args=None): fil = Filterbank(filename, f_start=args.f_start, f_stop=args.f_stop,t_start=t_start, t_stop=t_stop,load_data=load_data) fil.info() + if fil.heavy: + info_only = True + # And if we want to plot data, then plot data. - if not args.info_only: + + if not info_only: + # check start & stop frequencies make sense #try: # if args.f_start:
Added the heavy parameter. A boolean to take control of how large the file is.
diff --git a/lib/hocho/host.rb b/lib/hocho/host.rb index <HASH>..<HASH> 100644 --- a/lib/hocho/host.rb +++ b/lib/hocho/host.rb @@ -197,7 +197,7 @@ module Hocho alt = false begin Net::SSH.start(name, nil, ssh_options) - rescue Net::SSH::Exception, Errno::ECONNREFUSED => e + rescue Net::SSH::Exception, Errno::ECONNREFUSED, Net::SSH::Proxy::ConnectError => e raise if alt raise unless alternate_ssh_options_available? puts "[#{name}] Trying alternate_ssh_options due to #{e.inspect}"
handle Net::SSH::Proxy::ConnectError to switch to alternative
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from setuptools import find_packages, setup MIN_PY_VERSION = "3.9" PACKAGES = find_packages(exclude=["tests", "tests.*"]) REQUIREMENTS = list(val.strip() for val in open("requirements.txt")) -VERSION = "88" +VERSION = "89" setup( name="pydeconz",
Bump to <I> (#<I>)
diff --git a/session/manager.go b/session/manager.go index <HASH>..<HASH> 100644 --- a/session/manager.go +++ b/session/manager.go @@ -4,6 +4,7 @@ import ( "context" "time" + "github.com/gorilla/websocket" "github.com/mafredri/cdp" "github.com/mafredri/cdp/internal/errors" "github.com/mafredri/cdp/protocol/target" @@ -79,6 +80,10 @@ func (m *Manager) watch(ev *sessionEvents, created <-chan *session, done, errC c m.cancel() return true } + if _, ok := e.(*websocket.CloseError); ok { + m.cancel() + return true + } } if cdp.ErrorCause(err) == context.Canceled { // Manager was closed.
session: allow Manager.watch to take care of websocket errors (#<I>) Fixes: #<I>
diff --git a/bigfloat/bigfloat_config.py b/bigfloat/bigfloat_config.py index <HASH>..<HASH> 100644 --- a/bigfloat/bigfloat_config.py +++ b/bigfloat/bigfloat_config.py @@ -6,7 +6,8 @@ ## which one should be used. If this variable isn't set then the ## bigfloat module will make an attempt to find the library itself. ## -mpfr_library_location = '/opt/local/lib/libmpfr.dylib' +## Here's an example that's suitable for an OS X machine using MacPorts: +# mpfr_library_location = '/opt/local/lib/libmpfr.dylib' ## Set 'gmp_mp_size_t_int' to True if GMP uses the C 'int' type for ## mp_size_t and mp_exp_t, and to False if is uses the C 'long' type
Remove hardcoded MPFR library location from configuration file
diff --git a/core/Controller.php b/core/Controller.php index <HASH>..<HASH> 100644 --- a/core/Controller.php +++ b/core/Controller.php @@ -20,6 +20,7 @@ use monolyth\account\Logout_Controller; use monolyth\HTTP301_Exception; use monolyth\HTTP400_Exception; use monolyth\HTTP403_Exception; +use monolyth\HTTP401_Exception; use monolyth\HTTP404_Exception; use monolyth\render\HTTP404_Controller; use monolyth\HTTP405_Exception; @@ -160,6 +161,13 @@ abstract class Controller } ); $this->addRequirement( + 'monolyth\Ajax_Login_Required', + $user->loggedIn(), + function() use($project, $redir) { + throw new HTTP401_Exception; + } + ); + $this->addRequirement( 'monolyth\Nologin_Required', !$user->loggedIn(), function() { throw new HTTP301_Exception($this->url('')); }
this should be its own exception so we can catch it in an angular interceptor for instance
diff --git a/tasks/build.js b/tasks/build.js index <HASH>..<HASH> 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -10,11 +10,14 @@ module.exports = function(grunt){ var buildOptions = options.buildOptions; // Run the build with the provided options - build(system, buildOptions).then(function(){ - grunt.log.writeln("Build was successful."); + var promise = build(system, buildOptions); + if(promise.then) { + promise.then(function(){ + grunt.log.writeln("Build was successful."); - done(); - }); + done(); + }); + } });
Allow the grunt task to work with the watch mode
diff --git a/lib/wed/wed.js b/lib/wed/wed.js index <HASH>..<HASH> 100644 --- a/lib/wed/wed.js +++ b/lib/wed/wed.js @@ -1119,11 +1119,20 @@ oop.implement(Editor, SimpleEventEmitter); var it = this._selection_stack.pop(); if (it instanceof Array) this.setCaret(it); // setCaret() will call _caretChangeEmitter. - else { + else if (it !== undefined) { rangy.restoreSelection(it); // Call with a minimal object this._caretChangeEmitter(); } + else + // Null value means there was no selection, ergo... + this.clearSelection(); + }; + + this.clearSelection = function () { + this._$fake_caret.remove(); + this._raw_caret = undefined; + rangy.getSelection(this.my_window).removeAllRanges(); }; var state_to_str = {};
Fixed popSelection to clear the selection when needed.
diff --git a/pandas/core/generic.py b/pandas/core/generic.py index <HASH>..<HASH> 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2780,7 +2780,7 @@ class NDFrame(PandasObject, SelectionMixin, indexing.IndexingMixin): protocol : int Int which indicates which protocol should be used by the pickler, default HIGHEST_PROTOCOL (see [1]_ paragraph 12.1.2). The possible - values are 0, 1, 2, 3, 4. A negative value for the protocol + values are 0, 1, 2, 3, 4, 5. A negative value for the protocol parameter is equivalent to setting its value to HIGHEST_PROTOCOL. .. [1] https://docs.python.org/3/library/pickle.html.
DOC: Add protocol value '5' to pickle #<I> (#<I>)
diff --git a/src/test/java/noraui/Runner.java b/src/test/java/noraui/Runner.java index <HASH>..<HASH> 100644 --- a/src/test/java/noraui/Runner.java +++ b/src/test/java/noraui/Runner.java @@ -17,7 +17,7 @@ public class Runner { */ @BeforeClass public static void setUpClass() { - Context.getInstance().initializeEnv("demoGherkin.properties"); + Context.getInstance().initializeEnv("demoExcel.properties"); Context.getInstance().initializeRobot(Runner.class); }
Use demoExcel.properties because demoGherkin can't be used with serialized data
diff --git a/Lib/fontbakery/specifications/googlefonts_test.py b/Lib/fontbakery/specifications/googlefonts_test.py index <HASH>..<HASH> 100644 --- a/Lib/fontbakery/specifications/googlefonts_test.py +++ b/Lib/fontbakery/specifications/googlefonts_test.py @@ -297,7 +297,21 @@ def test_id_006(): assert status == PASS -# TODO: test_id_007 +def test_id_007(): + """ Font designer field in METADATA.pb must not be 'unknown'. """ + from fontbakery.specifications.googlefonts import \ + (check_font_designer_field_is_not_unknown, + metadata) + good = metadata("data/test/merriweather/") + print('Test PASS with a good METADATA.pb file...') + status, message = list(check_font_designer_field_is_not_unknown(good))[-1] + assert status == PASS + + bad = metadata("data/test/merriweather/") + bad.designer = "unknown" + print('Test FAIL with a bad METADATA.pb file...') + status, message = list(check_font_designer_field_is_not_unknown(bad))[-1] + assert status == FAIL def test_id_008(mada_ttFonts):
pytest: test/<I> (issue #<I>)
diff --git a/examples/mnist_mlp_spark.py b/examples/mnist_mlp_spark.py index <HASH>..<HASH> 100644 --- a/examples/mnist_mlp_spark.py +++ b/examples/mnist_mlp_spark.py @@ -18,6 +18,10 @@ batch_size = 64 nb_classes = 10 nb_epoch = 3 +# Create Spark context +conf = SparkConf().setAppName('Mnist_Spark_MLP') # .setMaster('local[8]') +sc = SparkContext(conf=conf) + # Load data (X_train, y_train), (X_test, y_test) = mnist.load_data() @@ -48,10 +52,6 @@ model.add(Activation('softmax')) sgd = SGD(lr=0.1) model.compile(loss='categorical_crossentropy', optimizer=sgd) -# Create Spark context -conf = SparkConf().setAppName('Mnist_Spark_MLP') # .setMaster('local[8]') -sc = SparkContext(conf=conf) - # Build RDD from numpy features and labels rdd = to_simple_rdd(sc, X_train, Y_train)
Initialize SparkContext first to avoid timeout problem on YARN.
diff --git a/optimizely/event/user_event_factory.py b/optimizely/event/user_event_factory.py index <HASH>..<HASH> 100644 --- a/optimizely/event/user_event_factory.py +++ b/optimizely/event/user_event_factory.py @@ -1,4 +1,4 @@ -# Copyright 2019 Optimizely +# Copyright 2019, 2021 Optimizely # 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 @@ -45,12 +45,12 @@ class UserEventFactory(object): if not activated_experiment and rule_type is not enums.DecisionSources.ROLLOUT: return None - variation, experiment_key = None, None + variation, experiment_id = None, None if activated_experiment: - experiment_key = activated_experiment.key + experiment_id = activated_experiment.id - if variation_id and experiment_key: - variation = project_config.get_variation_from_id(experiment_key, variation_id) + if variation_id and experiment_id: + variation = project_config.get_variation_from_id_by_experiment_id(experiment_id, variation_id) event_context = user_event.EventContext( project_config.account_id, project_config.project_id, project_config.revision, project_config.anonymize_ip, )
Fix Impression Events - Variation lookup by id and Experiment id (#<I>) * Fix in user_event_factory to use experiment_id to lookup variation for impression events. * Update License Header to <I>.
diff --git a/server/request_handling.go b/server/request_handling.go index <HASH>..<HASH> 100644 --- a/server/request_handling.go +++ b/server/request_handling.go @@ -1048,9 +1048,15 @@ func (s *GardenServer) streamInput(decoder *json.Decoder, in *io.PipeWriter, pro case payload.Signal != nil: switch *payload.Signal { case garden.SignalKill: - process.Signal(garden.SignalKill) + err = process.Signal(garden.SignalKill) + if err != nil { + s.logger.Error("stream-input-process-signal-kill-failed", err, lager.Data{"payload": payload}) + } case garden.SignalTerminate: - process.Signal(garden.SignalTerminate) + err = process.Signal(garden.SignalTerminate) + if err != nil { + s.logger.Error("stream-input-process-signal-terminate-failed", err, lager.Data{"payload": payload}) + } default: s.logger.Error("stream-input-unknown-process-payload-signal", nil, lager.Data{"payload": payload}) in.Close()
Improve logging of process signalling. [#<I>]
diff --git a/src/app/code/community/Fontis/Australia/sql/australia_setup/mysql4-upgrade-2.2.1-2.2.2.php b/src/app/code/community/Fontis/Australia/sql/australia_setup/mysql4-upgrade-2.2.1-2.2.2.php index <HASH>..<HASH> 100644 --- a/src/app/code/community/Fontis/Australia/sql/australia_setup/mysql4-upgrade-2.2.1-2.2.2.php +++ b/src/app/code/community/Fontis/Australia/sql/australia_setup/mysql4-upgrade-2.2.1-2.2.2.php @@ -20,7 +20,7 @@ $installer = $this; $installer->startSetup(); $installer->run( - "ALTER TABLE `australia_eparcel`" + "ALTER TABLE {$this->getTable('australia_eparcel')}" . " ADD `charge_code_individual` VARCHAR( 50 ) NULL DEFAULT NULL," . " ADD `charge_code_business` VARCHAR( 50 ) NULL DEFAULT NULL" );
Allowing extension to run on prefixed database tables.
diff --git a/nose/test_diskdf.py b/nose/test_diskdf.py index <HASH>..<HASH> 100644 --- a/nose/test_diskdf.py +++ b/nose/test_diskdf.py @@ -47,6 +47,17 @@ def test_surfaceSigmaProfile_formatStringParams(): assert essp.formatStringParams()[2] == r'%6.4f', "surfaceSigmaProfile's formatStringParams does not behave as expected" return None +def test_dfsetup_surfaceSigmaProfile(): + df= dehnendf(profileParams=(0.25,0.75,0.1), + beta=0.,correct=False) + from galpy.df import expSurfaceSigmaProfile + essp= expSurfaceSigmaProfile(params=(0.25,0.75,0.1)) + df_alt= dehnendf(surfaceSigma=essp, + beta=0.,correct=False) + assert numpy.all(numpy.fabs(numpy.array(df._surfaceSigmaProfile._params) + -numpy.array(df_alt._surfaceSigmaProfile._params)) < 10.**-10.), 'diskdf setup with explicit surfaceSigmaProfile class does not give the same profile as with parameters only' + return None + # Tests for cold population, flat rotation curve: <vt> =~ v_c def test_dehnendf_cold_flat_vt(): df= dehnendf(profileParams=(0.3333333333333333,1.0, 0.01),
test diskdf setup with explicit surfaceSigmaProfile class
diff --git a/resources/lang/de-DE/dashboard.php b/resources/lang/de-DE/dashboard.php index <HASH>..<HASH> 100644 --- a/resources/lang/de-DE/dashboard.php +++ b/resources/lang/de-DE/dashboard.php @@ -35,6 +35,7 @@ return [ 'failure' => 'Etwas ist mit dem Aktualisieren des Vorfall Updates schief gelaufen', ], ], + 'reported_by' => 'Reported by :user', 'add' => [ 'title' => 'Ereignis hinzufügen', 'success' => 'Ereignis hinzugefügt.',
New translations dashboard.php (German)
diff --git a/pycbc/workflow/jobsetup.py b/pycbc/workflow/jobsetup.py index <HASH>..<HASH> 100644 --- a/pycbc/workflow/jobsetup.py +++ b/pycbc/workflow/jobsetup.py @@ -426,10 +426,10 @@ class JobSegmenter(object): else: # Pick the tile size that is closest to 1/3 of the science segment target_size = seg_size / 3 - pick, pick_size = 0, valid_lengths[0] + pick, pick_diff = 0, abs(valid_lengths[0] - target_size) for i, size in enumerate(valid_lengths): - if abs(size - target_size) < pick_size: - pick, pick_size = i, size + if abs(size - target_size) < pick_diff: + pick, pick_diff = i, abs(size - target_size) return data_lengths[pick], valid_chunks[pick], valid_lengths[pick] def get_valid_times_for_job(self, num_job, allow_overlap=True):
fix the tile choosing algorithm to use the difference between the target and the choice
diff --git a/lib/commonAPI/ConnectionChecking/ext/platform/android/src/com/rho/connectionchecking/ConnectionCheckingService.java b/lib/commonAPI/ConnectionChecking/ext/platform/android/src/com/rho/connectionchecking/ConnectionCheckingService.java index <HASH>..<HASH> 100644 --- a/lib/commonAPI/ConnectionChecking/ext/platform/android/src/com/rho/connectionchecking/ConnectionCheckingService.java +++ b/lib/commonAPI/ConnectionChecking/ext/platform/android/src/com/rho/connectionchecking/ConnectionCheckingService.java @@ -295,6 +295,13 @@ private void navigatetoBadLink() Logger.E(TAG, "excetion in Thread run()"+e.getMessage()); } } + + if(isDialoguePresent) + { + killDialogue(); + isDialoguePresent=false; + counterTimeout=0; + } System.out.println("Thread is about to exit"); }
Update ConnectionCheckingService.java To check a special case when dialogue was coming on top of licensing screen
diff --git a/spec/amq/protocol_spec.rb b/spec/amq/protocol_spec.rb index <HASH>..<HASH> 100644 --- a/spec/amq/protocol_spec.rb +++ b/spec/amq/protocol_spec.rb @@ -57,9 +57,8 @@ describe AMQ::Protocol do AMQ::Protocol::Connection::StartOk.name.should eql("connection.start-ok") end - it "should have method equal to TODO" do - pending - AMQ::Protocol::Connection::StartOk.method.should eql("TODO") + it "should have method equal to 11" do + AMQ::Protocol::Connection::StartOk.method_id.should == 11 end describe ".encode" do
connection.start-ok has method id of <I>
diff --git a/sonar-batch/src/main/java/org/sonar/batch/indexer/DefaultSonarIndex.java b/sonar-batch/src/main/java/org/sonar/batch/indexer/DefaultSonarIndex.java index <HASH>..<HASH> 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/indexer/DefaultSonarIndex.java +++ b/sonar-batch/src/main/java/org/sonar/batch/indexer/DefaultSonarIndex.java @@ -22,6 +22,7 @@ package org.sonar.batch.indexer; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; +import org.apache.commons.lang.math.NumberUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.batch.Event; @@ -311,7 +312,7 @@ public class DefaultSonarIndex extends SonarIndex { ResourceUtils.isEntity(resource) && metric.isOptimizedBestValue() == Boolean.TRUE && metric.getBestValue() != null && - Double.compare(metric.getBestValue(), measure.getValue())==0 && + NumberUtils.compare(metric.getBestValue(), measure.getValue())==0 && !measure.hasOptionalData()); }
compare doubles with NumberUtils.compare() instead of Double.compare()
diff --git a/config.js b/config.js index <HASH>..<HASH> 100644 --- a/config.js +++ b/config.js @@ -14,7 +14,7 @@ module.exports = { packageTTL: parseInt(env.CACHE_PACKAGE_TTL) || 60, tarballTTL: parseInt(env.CACHE_TARBALL_TTL) || (6 * 60 * 60) }, - fs: {directory: env.NPM_REGISTER_FS_DIRECTORY || 'fs'}, + fs: {directory: env.NPM_REGISTER_FS_DIRECTORY || 'tmp'}, s3: {bucket: env.AWS_S3_BUCKET} } diff --git a/lib/storage/fs.js b/lib/storage/fs.js index <HASH>..<HASH> 100644 --- a/lib/storage/fs.js +++ b/lib/storage/fs.js @@ -9,7 +9,7 @@ const Stream = require('stream') class FS extends require('./base') { constructor () { super() - this.directory = path.resolve(config.fs.directory || 'fs') + this.directory = path.resolve(config.fs.directory) console.error(`Saving files to local filesystem at ${this.directory}`) if (!config.fs.directory) console.error('Set NPM_REGISTER_FS_DIRECTORY to change directory') }
fix: default fs path should be './tmp' according to the README (#<I>)
diff --git a/web/js/GMap.js b/web/js/GMap.js index <HASH>..<HASH> 100644 --- a/web/js/GMap.js +++ b/web/js/GMap.js @@ -3,6 +3,13 @@ (function () { "use strict"; + if (!window.google) { + tangelo.GMap = function () { + throw "Use of the GMap class requires loading the Google Map API *before* loading Tangelo."; + }; + return; + } + tangelo.GMap = function (elem, mapoptions, cfg) { var that;
Preventing Tangelo loading errors for apps that don't use Google Maps.
diff --git a/src/_picker/DropdownMenu.js b/src/_picker/DropdownMenu.js index <HASH>..<HASH> 100644 --- a/src/_picker/DropdownMenu.js +++ b/src/_picker/DropdownMenu.js @@ -108,6 +108,8 @@ class DropdownMenu extends React.Component<Props> { dropdownMenuItemComponentClass: DropdownMenuItem } = this.props; + this.menuItems = {}; + const createMenuItems = (items = [], groupId = 0) => items.map((item, index) => { const value = item[valueKey];
Fix: option value error when current keyboard operation option on `<TagPicker>` (#<I>)
diff --git a/server/etcdserver/api/v3rpc/watch.go b/server/etcdserver/api/v3rpc/watch.go index <HASH>..<HASH> 100644 --- a/server/etcdserver/api/v3rpc/watch.go +++ b/server/etcdserver/api/v3rpc/watch.go @@ -346,8 +346,9 @@ func (sws *serverWatchStream) recvLoop() error { } default: // we probably should not shutdown the entire stream when - // receive an valid command. + // receive an invalid command. // so just do nothing instead. + sws.lg.Warn("invalid watch request received in gRPC stream") continue } }
chore: log when an invalid watch request is received As protobuf doesn't have required field, user may send an empty WatchRequest by mistake. Currently, etcd will ignore the invalid request and keep the stream opening. If we don't reject the invalid request by closing the stream, it would be better to leave a log there. This commit also fixes a typo in the comment.
diff --git a/lib/assets/javascripts/_modules/search.js b/lib/assets/javascripts/_modules/search.js index <HASH>..<HASH> 100644 --- a/lib/assets/javascripts/_modules/search.js +++ b/lib/assets/javascripts/_modules/search.js @@ -3,8 +3,6 @@ (function ($, Modules) { 'use strict' - s.lunrIndex; - s.lunrData; Modules.Search = function Search () { var s = this var $html = $('html') @@ -160,7 +158,7 @@ content = $(content).mark(query) // Split content by sentence. - var sentences = content.html().replace(/(\.+|\:|\!|\?|\r|\n)(\"*|\'*|\)*|}*|]*)/gm, "|").split("|"); + var sentences = content.html().replace(/(\.+|:|!|\?|\r|\n)("*|'*|\)*|}*|]*)/gm, '|').split('|') // Select the first five sentences that contain a <mark> var selectedSentences = []
Fixes issues in search.js identified by Standard Theres no need to declare two properties on `s` variable as they will be added to `s` when they are first useds. Standard also raised an issue on unnessary escaping in the regex which is why I removed the couple `\` in the regex.
diff --git a/nailgun/entities.py b/nailgun/entities.py index <HASH>..<HASH> 100644 --- a/nailgun/entities.py +++ b/nailgun/entities.py @@ -4152,7 +4152,7 @@ class User( 'login': entity_fields.StringField( length=(1, 100), required=True, - str_type=('alpha', 'alphanumeric', 'cjk', 'latin1', 'utf8'), + str_type=('alpha', 'alphanumeric', 'cjk', 'latin1'), ), 'mail': entity_fields.EmailField(required=True), 'organization': entity_fields.OneToManyField(Organization),
utf8 value for login is removed as it is rejected by satellite
diff --git a/gump.class.php b/gump.class.php index <HASH>..<HASH> 100644 --- a/gump.class.php +++ b/gump.class.php @@ -398,7 +398,7 @@ class GUMP { return array( 'field' => $field, - 'value' => $input[$field], + 'value' => NULL, 'rule' => __FUNCTION__ ); }
Fixing validate_required() to not return the value of the field if it does not exist
diff --git a/webmap/__init__.py b/webmap/__init__.py index <HASH>..<HASH> 100644 --- a/webmap/__init__.py +++ b/webmap/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- -__version__ = '0.8.0' +__version__ = '0.8.1' default_app_config = 'webmap.apps.WebmapConfig' diff --git a/webmap/urls.py b/webmap/urls.py index <HASH>..<HASH> 100644 --- a/webmap/urls.py +++ b/webmap/urls.py @@ -5,10 +5,10 @@ from .rest import router from django.conf import settings -urlpatterns = ( +urlpatterns = [ url(r'^kml/([-\w]+)/$', views.kml_view), url(r'^search/([- \w]+)/$', views.search_view), -) +] if getattr(settings, 'REST_ENABLED', False): urlpatterns.append(url(r'^', include(router.urls)))
make url patterns appendable, bump minor version
diff --git a/src/Common/Identity.php b/src/Common/Identity.php index <HASH>..<HASH> 100644 --- a/src/Common/Identity.php +++ b/src/Common/Identity.php @@ -280,7 +280,7 @@ class Identity implements IdentityInterface return $this; } - private function arrayException($value) + protected function arrayException($value) { if (is_array($value)) { throw new \Exception('Value cannot be array', 101); @@ -299,7 +299,7 @@ class Identity implements IdentityInterface * @param string $value * @throws \Exception */ - private function operator($symbol, $value) + protected function operator($symbol, $value) { if ($this->isVoid()) { throw new \Exception('Field is not defined', 101);
<I> - 2 private methods changed to protected so they can be used in child classes.
diff --git a/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocbookBuildUtilities.java b/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocbookBuildUtilities.java index <HASH>..<HASH> 100644 --- a/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocbookBuildUtilities.java +++ b/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocbookBuildUtilities.java @@ -323,10 +323,10 @@ public class DocbookBuildUtilities { } if (bookVersion == null) { - rev.append(BuilderConstants.DEFAULT_EDITION + ".0"); + rev.append(BuilderConstants.DEFAULT_EDITION + ".0.0"); } else if (contentSpec.getEdition().matches("^[0-9]+\\.[0-9]+\\.[0-9]+$")) { rev.append(bookVersion); - } else if (contentSpec.getEdition().matches("^[0-9]+\\.[0-9]+(\\.[0-9]+)?$")) { + } else if (contentSpec.getEdition().matches("^[0-9]+\\.[0-9]+$")) { rev.append(bookVersion + ".0"); } else { rev.append(bookVersion + ".0.0");
Fixed a bug in the generateRevision method, where in some cases not enough 0's were appended.
diff --git a/core/codeWriter.js b/core/codeWriter.js index <HASH>..<HASH> 100644 --- a/core/codeWriter.js +++ b/core/codeWriter.js @@ -97,7 +97,8 @@ if (APPLY_LINE_NUMBERS) { var l = code.split("\n"); var i = 0; - while (l[i] && l[i].substr(0,8)=="Modules.") i++; + while (l[i] && (l[i].substr(0,8)=="Modules." || + l[i].substr(0,8)=="setTime(")) i++; lineNumberOffset = -i; }
add one more hack to work around debugging lines when modules and setTime are used
diff --git a/commands/release/stage/command.go b/commands/release/stage/command.go index <HASH>..<HASH> 100644 --- a/commands/release/stage/command.go +++ b/commands/release/stage/command.go @@ -154,7 +154,7 @@ func runMain() (err error) { // Delete the local release branch. task = fmt.Sprintf("Delete branch '%v'", releaseBranch) log.Run(task) - if err := git.Branch("-d", releaseBranch); err != nil { + if err := git.Branch("-D", releaseBranch); err != nil { return errs.NewError(task, err) } defer action.RollbackTaskOnError(&err, task, action.ActionFunc(func() error {
release stage: Use git branch -D Use -D while deleting the local release branch. Story-Id: unassigned Change-Id: a0b5b<I>b7
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,8 @@ var rework = require('rework'), color = require('rework-color'), autoprefixer = require('autoprefixer'), read = require('fs-extra').readFileSync, - write = require('fs-extra').writeFileSync; + write = require('fs-extra').writeFileSync, + exists = require('fs-extra').existsSync; module.exports = function(options) { options = options || {}; @@ -13,7 +14,7 @@ module.exports = function(options) { browsers = options.browsers || [], output; - if (!src) { + if (!exists(src)) { throw new Error("Sorry, I couldn't find an input file. Did you supply one?"); }
Updating source file check to test for existence of file not just a string being passed.
diff --git a/peek_plugin_base/__init__.py b/peek_plugin_base/__init__.py index <HASH>..<HASH> 100644 --- a/peek_plugin_base/__init__.py +++ b/peek_plugin_base/__init__.py @@ -1,4 +1,4 @@ __project__ = 'Synerty Peek' __copyright__ = '2016, Synerty' __author__ = 'Synerty' -__version__ = '0.8.0' \ No newline at end of file +__version__ = '0.8.1' \ No newline at end of file diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ from setuptools import find_packages pip_package_name = "peek-plugin-base" py_package_name = "peek_plugin_base" -package_version = '0.8.0' +package_version = '0.8.1' egg_info = "%s.egg-info" % pip_package_name if os.path.isdir(egg_info):
Updated to version <I>
diff --git a/cartoframes/utils/utils.py b/cartoframes/utils/utils.py index <HASH>..<HASH> 100644 --- a/cartoframes/utils/utils.py +++ b/cartoframes/utils/utils.py @@ -21,6 +21,18 @@ try: except NameError: basestring = str +if sys.version_info < (3, 0): + from io import BytesIO + from gzip import GzipFile + + def compress(data): + buf = BytesIO() + with GzipFile(fileobj=buf, mode='wb') as f: + f.write(data) + return buf.getvalue() + + gzip.compress = compress + GEOM_TYPE_POINT = 'point' GEOM_TYPE_LINE = 'line'
Fix gzip.compress in P<I>
diff --git a/indra/assemblers/pysb/kappa_util.py b/indra/assemblers/pysb/kappa_util.py index <HASH>..<HASH> 100644 --- a/indra/assemblers/pysb/kappa_util.py +++ b/indra/assemblers/pysb/kappa_util.py @@ -159,7 +159,15 @@ def cm_json_to_graph(cm_json): graph : pygraphviz.Agraph A graph representing the contact map. """ + # This is for kappy compatibility: as of 4.1.2, im_json is a string, + # whereas before it was a json object + if isinstance(cm_json, str): + cm_json = json.loads(cm_json) cmap_data = cm_json['contact map']['map'] + # There also seems to be an additional level of nesting in a one-element + # list that we can unpack here + if len(cmap_data) == 1 and isinstance(cmap_data[0], list): + cmap_data = cmap_data[0] # Initialize the graph graph = AGraph()
Start adapting to changes for CM structure
diff --git a/hwtypes/bit_vector.py b/hwtypes/bit_vector.py index <HASH>..<HASH> 100644 --- a/hwtypes/bit_vector.py +++ b/hwtypes/bit_vector.py @@ -281,6 +281,8 @@ class BitVector(AbstractBitVector): @bv_cast def bvurem(self, other): other = other.as_uint() + if other == 0: + return self return type(self)(self.as_uint() % other) # bvumod
Implement the corner case of x % 0
diff --git a/Form/Admin/ProducerFormBuilder.php b/Form/Admin/ProducerFormBuilder.php index <HASH>..<HASH> 100755 --- a/Form/Admin/ProducerFormBuilder.php +++ b/Form/Admin/ProducerFormBuilder.php @@ -40,6 +40,9 @@ class ProducerFormBuilder extends AbstractFormBuilder $name = $languageData->addChild($this->getElement('text_field', [ 'name' => 'name', 'label' => $this->trans('common.label.name'), + 'rules' => [ + $this->getRule('required') + ], ])); $languageData->addChild($this->getElement('slug_field', [ @@ -47,7 +50,10 @@ class ProducerFormBuilder extends AbstractFormBuilder 'label' => $this->trans('common.label.slug'), 'name_field' => $name, 'generate_route' => 'admin.routing.generate', - 'translatable_id' => $this->getRequestHelper()->getAttributesBagParam('id') + 'translatable_id' => $this->getRequestHelper()->getAttributesBagParam('id'), + 'rules' => [ + $this->getRule('required') + ], ])); $metaData = $form->addChild($this->getElement('nested_fieldset', [
Added rule required to all forms (cherry picked from commit 0ffd7c3b<I>f<I>d<I>bf9b<I>bebeb<I>)
diff --git a/src/Http/Controller.php b/src/Http/Controller.php index <HASH>..<HASH> 100644 --- a/src/Http/Controller.php +++ b/src/Http/Controller.php @@ -7,6 +7,7 @@ use Illuminate\Contracts\Config\Repository; use Illuminate\Contracts\Validation\ValidatesWhenResolved; use Illuminate\Http\Request; use Illuminate\Routing\Controller as BaseController; +use Illuminate\Routing\ResourceRegistrar; use Illuminate\Routing\ResponseFactory; use Illuminate\Support\Collection; use Larapie\Contracts\TransformableContract; @@ -167,7 +168,9 @@ class Controller extends BaseController protected function findModel($model, $resourceName) { - return call_user_func([$model, 'find'], $this->request->route($resourceName)); + $id = $this->findIdInRoute($resourceName); + + return call_user_func([$model, 'find'], $id); } protected function notFound() @@ -260,4 +263,13 @@ class Controller extends BaseController } } } + + protected function findIdInRoute($resourceName) + { + $id = $this->request->route($resourceName) + ?: $this->request->route(str_plural($resourceName)) + ?: $this->request->route(str_singular($resourceName)); + + return $id; + } }
Handling singular/plural resources in any case
diff --git a/Nominatim.php b/Nominatim.php index <HASH>..<HASH> 100644 --- a/Nominatim.php +++ b/Nominatim.php @@ -48,8 +48,9 @@ final class Nominatim extends AbstractHttpProvider implements Provider private $referer; /** - * @param HttpClient $client - * @param string|null $locale + * @param HttpClient $client an HTTP client + * @param string $userAgent Value of the User-Agent header + * @param string $referer Value of the Referer header * * @return Nominatim */ @@ -59,8 +60,10 @@ final class Nominatim extends AbstractHttpProvider implements Provider } /** - * @param HttpClient $client an HTTP adapter - * @param string $rootUrl Root URL of the nominatim server + * @param HttpClient $client an HTTP client + * @param string $rootUrl Root URL of the nominatim server + * @param string $userAgent Value of the User-Agent header + * @param string $referer Value of the Referer header */ public function __construct(HttpClient $client, $rootUrl, string $userAgent, string $referer = '') {
[Nominatim] Updated doc blocks (#<I>) * Updated doc blocks * cs
diff --git a/pyqtree.py b/pyqtree.py index <HASH>..<HASH> 100644 --- a/pyqtree.py +++ b/pyqtree.py @@ -343,4 +343,9 @@ class Index(_QuadTree): Returns: - A list of inserted items whose bounding boxes intersect with the input bbox. """ - return list(set(self._intersect(bbox))) + uniq = [] + for item in self._intersect(bbox): + if item not in uniq: + uniq.append(item) + + return uniq diff --git a/pyqtree_test.py b/pyqtree_test.py index <HASH>..<HASH> 100644 --- a/pyqtree_test.py +++ b/pyqtree_test.py @@ -5,7 +5,7 @@ INDEX_BBOX = (0, 0, 10, 10) ITEM1 = 'Item 1' BBOX1 = (0, 0, 0, 0) -ITEM2 = 'Item 2' +ITEM2 = {'name': 'Item 2'} # non-hashable BBOX2 = (1, 1, 1, 1)
Add support for non-hashable items
diff --git a/lib/sensu/transport/base.rb b/lib/sensu/transport/base.rb index <HASH>..<HASH> 100644 --- a/lib/sensu/transport/base.rb +++ b/lib/sensu/transport/base.rb @@ -60,7 +60,7 @@ module Sensu # @param options [Hash, String] # @return [Transport] the transport object. def self.connect(options={}) - options ||= Hash.new + options ||= {} transport = self.new transport.connect(options) transport
use {} instead of Hash.new, consistency
diff --git a/winsetup.py b/winsetup.py index <HASH>..<HASH> 100644 --- a/winsetup.py +++ b/winsetup.py @@ -64,6 +64,10 @@ def main(): '--title="PyTango 9" ' \ '--bitmap="%s" ' \ '--plat-name=%s ' % (ver, bdist_dir, dist_dir, bitmap, plat_name) + cmd_line += 'bdist_wheel --skip-build ' \ + '--bdist-dir=%s ' \ + '--dist-dir=%s ' \ + '--plat-name=%s ' % (bdist_dir, dist_dir, plat_name) os.system(cmd_line) except: print("Failed:")
winsetup: add support to build wheel
diff --git a/quark/ast.py b/quark/ast.py index <HASH>..<HASH> 100644 --- a/quark/ast.py +++ b/quark/ast.py @@ -296,8 +296,10 @@ class Callable(Definition): return result def copy(self): - return self.__class__(copy(self.type), copy(self.name), - copy(self.params), copy(self.body)) + result = self.__class__(copy(self.type), copy(self.name), + copy(self.params), copy(self.body)) + result.static = self.static + return result class Function(Callable): pass @@ -413,7 +415,9 @@ class Declaration(AST): return result def copy(self): - return self.__class__(copy(self.type), copy(self.name), copy(self.value)) + result = self.__class__(copy(self.type), copy(self.name), copy(self.value)) + result.static = self.static + return result class Param(Declaration): pass
Keep static-ness when copy()ing Callable and Declaration AST nodes
diff --git a/appframe-express.js b/appframe-express.js index <HASH>..<HASH> 100644 --- a/appframe-express.js +++ b/appframe-express.js @@ -162,13 +162,13 @@ module.exports = require('appframe')().registerPlugin({ app.server.use(function(req, res, next){ req.id = app.random(128) + '-' + req.originalUrl; requests[req.id] = true; - app.emit('express.request_open', req.id); + app.emit('express.request_open', req); if(app.config.debug){ app.info('> REQ: ' + req.originalUrl, req.id); } var cleanup = function(){ delete requests[req.id]; - app.emit('express.request_finish', req.id); + app.emit('express.request_finish', req); }; res.on('finish', cleanup); res.on('close', cleanup);
Emit full request object on every request for logging purposes
diff --git a/example/client-server.js b/example/client-server.js index <HASH>..<HASH> 100644 --- a/example/client-server.js +++ b/example/client-server.js @@ -8,8 +8,7 @@ * client can then set and get these values using method calls. */ -var http = require('http') - , xmlrpc = require('../lib/node-xmlrpc.js') +var xmlrpc = require('../lib/node-xmlrpc.js') ////////////////////////////////////////////////////////////////////////
Removes HTTP requirement in example script.
diff --git a/hypermap/aggregator/models.py b/hypermap/aggregator/models.py index <HASH>..<HASH> 100644 --- a/hypermap/aggregator/models.py +++ b/hypermap/aggregator/models.py @@ -48,7 +48,7 @@ class Resource(PolymorphicModel): is_public = models.BooleanField(default=True) def __unicode__(self): - return '%s - %s' % (self.polymorphic_ctype.name, self.title) + return '%s - %s' % (self.polymorphic_ctype.name, self.id) @property def first_check(self): @@ -233,7 +233,7 @@ class Layer(Resource): keywords = TaggableManager() def __unicode__(self): - return self.name + return '%s - %s' % (self.id, self.name) def get_url_endpoint(self): """
Added a better unicode repr for layer
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ if sys.argv[-1] == 'publish': os.system('python setup.py sdist bdist_wheel upload') sys.exit() -required = ['numpy>=1.14.0'] +required = ['numpy==1.19.2', 'scikit-learn==0.23.2'] setup( name=NAME,
Update setup.py to include scikit-learn
diff --git a/lib/netsuite/utilities.rb b/lib/netsuite/utilities.rb index <HASH>..<HASH> 100644 --- a/lib/netsuite/utilities.rb +++ b/lib/netsuite/utilities.rb @@ -86,6 +86,7 @@ module NetSuite !e.message.include?('com.netledger.common.exceptions.NLDatabaseOfflineException') && !e.message.include?('com.netledger.database.NLConnectionUtil$NoCompanyDbsOnlineException') && !e.message.include?('com.netledger.cache.CacheUnavailableException') && + !e.message.include?('java.lang.IllegalStateException') && !e.message.include?('An unexpected error occurred.') && !e.message.include?('An unexpected error has occurred. Technical Support has been alerted to this problem.') && !e.message.include?('Session invalidation is in progress with different thread') &&
Adding new netsuite error to retry list
diff --git a/src/backform.js b/src/backform.js index <HASH>..<HASH> 100644 --- a/src/backform.js +++ b/src/backform.js @@ -260,7 +260,7 @@ this.clearInvalid(); - this.$el.find(':input').each(function(ix, el) { + this.$el.find(':input').not('button').each(function(ix, el) { var attrArr = $(el).attr('name').split('.'), name = attrArr.shift(), path = attrArr.join('.'),
Ignoring buttons for model error-checking.
diff --git a/tests/test_gluon_block.py b/tests/test_gluon_block.py index <HASH>..<HASH> 100644 --- a/tests/test_gluon_block.py +++ b/tests/test_gluon_block.py @@ -1,3 +1,4 @@ +import pytest import mxnet as mx from mxnet import nd, np, npx from mxnet.test_utils import assert_allclose @@ -50,6 +51,8 @@ def test_gluon_nonzero_hybridize(): out.wait_to_read() +@pytest.mark.xfail(reason='Expected to fail due to MXNet bug https://github.com/apache/' + 'incubator-mxnet/issues/19659') def test_gluon_boolean_mask(): class Foo(HybridBlock): def forward(self, data, indices):
Unblock CI by skipping the test (#<I>) * Update test_gluon_block.py * Update test_gluon_block.py
diff --git a/src/entity/camera.js b/src/entity/camera.js index <HASH>..<HASH> 100755 --- a/src/entity/camera.js +++ b/src/entity/camera.js @@ -182,12 +182,17 @@ /** * set the viewport to follow the specified entity - * @param {Object} Object Entity to follow + * @param {Object} Object ObjectEntity or Position Vector to follow * @param {axis} [axis="AXIS.BOTH"] AXIS.HORIZONTAL, AXIS.VERTICAL, AXIS.BOTH */ follow : function(target, axis) { - this.target = target; + if (target instanceof me.ObjectEntity) + this.target = target.pos; + else if (target instanceof me.Vector2d) + this.target = target; + else + throw "melonJS: invalid target for viewport.follow"; // if axis is null, camera is moved on target center this.follow_axis = axis || this.AXIS.NONE; },
Allowed to specify either an ObjectEntity or a position Vector as Target (Other object type will now throw an exception).
diff --git a/src/components/VCard/VCard.js b/src/components/VCard/VCard.js index <HASH>..<HASH> 100644 --- a/src/components/VCard/VCard.js +++ b/src/components/VCard/VCard.js @@ -22,7 +22,8 @@ export default { type: String, default: 'div' }, - tile: Boolean + tile: Boolean, + width: [String, Number] }, computed: { @@ -47,6 +48,10 @@ export default { style.background = `url("${this.img}") center center / cover no-repeat` } + if (this.width) { + style.width = isNaN(this.width) ? this.width : `${this.width}px` + } + return style } },
feat(v-card): added new **width** prop
diff --git a/src/vr-controls.js b/src/vr-controls.js index <HASH>..<HASH> 100644 --- a/src/vr-controls.js +++ b/src/vr-controls.js @@ -30,7 +30,7 @@ module.exports = document.registerElement( this.yawObject.add(this.pitchObject); this.setAttribute('locomotion', true); - this.setAttribute('mouse-look', true); + this.setAttribute('mouselook', true); this.attachMouseKeyboardListeners(); this.load();
fix mouselook for vr-controls
diff --git a/binance/client.py b/binance/client.py index <HASH>..<HASH> 100644 --- a/binance/client.py +++ b/binance/client.py @@ -6346,4 +6346,4 @@ class Client(object): :type recvWindow: int """ - return self._request_options_api('get', 'userTrades', signed=True, data=params + return self._request_options_api('get', 'userTrades', signed=True, data=params)
Update client.py Add missing bracket
diff --git a/lib/prey/os/windows/wmic.js b/lib/prey/os/windows/wmic.js index <HASH>..<HASH> 100644 --- a/lib/prey/os/windows/wmic.js +++ b/lib/prey/os/windows/wmic.js @@ -61,6 +61,7 @@ var splitter = function(cmd) { var queue = async.queue(function(cmd,callback) { var wm = spawn("wmic",splitter(cmd)); + var pid = wm.pid; var all = ""; var err = null; @@ -74,15 +75,25 @@ var queue = async.queue(function(cmd,callback) { wm.on('exit',function() { removeTmpFile(); - callback(err,all); + // add a pid to the output string object + callback(err,{data:all,pid:pid}); }); wm.stdin.end(); },1); + +/** + * Run the wmic command provided. + * + * The resulting output string has an additional pid property added so, one may get the process + * details. This seems the easiest way of doing so given the run is in a queue. + **/ var run = exports.run = function(cmd,cb) { - queue.push(cmd,cb); + queue.push(cmd,function(err,o) { + cb(err,o.data,o.pid); + }); }; exports.extractValue = function(str) {
add a pid to the output of wmic.run
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ function qed(promiser, params) { if (!params.length) { var info = fninfo(promiser) if (info.length === 2 && info[0] === 'req' && info[1] === 'res') { - params = ['req','res'] + params = ['req','res'] } } params = params.map(dot.safe) @@ -40,8 +40,6 @@ function qed(promiser, params) { }).then(null, function (err) { if (res.error) res.error(err) else if (res.send) res.send(500, msg(err)) - - throw err }) }
don't rethrow error
diff --git a/tests/helpers/module-for-acceptance.js b/tests/helpers/module-for-acceptance.js index <HASH>..<HASH> 100644 --- a/tests/helpers/module-for-acceptance.js +++ b/tests/helpers/module-for-acceptance.js @@ -1,3 +1,4 @@ +import Ember from 'ember'; import { module } from 'qunit'; import startApp from '../helpers/start-app'; import destroyApp from '../helpers/destroy-app'; @@ -18,6 +19,8 @@ export default function(name, options = {}) { if (options.afterEach) { options.afterEach.apply(this, arguments); } + + Ember.Test.adapter = null; } }); }
Ensure Ember.Test.adapter is removed after acceptance tests.
diff --git a/lib/veewee/provider/virtualbox/box/helper/create.rb b/lib/veewee/provider/virtualbox/box/helper/create.rb index <HASH>..<HASH> 100644 --- a/lib/veewee/provider/virtualbox/box/helper/create.rb +++ b/lib/veewee/provider/virtualbox/box/helper/create.rb @@ -24,7 +24,7 @@ module Veewee def add_ssh_nat_mapping - unless definition.nil? || definition.force_ssh_port + unless definition.nil? || definition.no_nat #Map SSH Ports command="#{@vboxcmd} modifyvm \"#{name}\" --natpf#{self.natinterface} \"guestssh,tcp,,#{definition.ssh_host_port},,#{definition.ssh_guest_port}\"" shell_exec("#{command}")
created a new :no_nat configuration stanza (boolean) separated from force_ssh_port: it is now possible to deactivate one or the other separately
diff --git a/tests/test_types.py b/tests/test_types.py index <HASH>..<HASH> 100644 --- a/tests/test_types.py +++ b/tests/test_types.py @@ -5,15 +5,12 @@ from zephyr.types import MISSING, ValidationError, Type, Any, String, \ Field, AttributeField, MethodField, FunctionField, ConstantField, Object, \ Optional, LoadOnly, DumpOnly from zephyr.errors import merge_errors +from zephyr.validators import Predicate from collections import namedtuple def validator(predicate, message='Something went wrong'): - def validate(value): - if not predicate(value): - raise ValidationError(message) - - return validate + return Predicate(predicate, message) def constant_succeed_validator():
Replace custom validator with Predicate in type tests
diff --git a/GPy/testing/kernel_tests.py b/GPy/testing/kernel_tests.py index <HASH>..<HASH> 100644 --- a/GPy/testing/kernel_tests.py +++ b/GPy/testing/kernel_tests.py @@ -9,8 +9,6 @@ from GPy.core.parameterization.param import Param verbose = 0 -np.random.seed(50) - class Kern_check_model(GPy.core.Model): """
removed random.seed from the base of kernel_tests.py (the tests still pass)
diff --git a/Swipeable.js b/Swipeable.js index <HASH>..<HASH> 100644 --- a/Swipeable.js +++ b/Swipeable.js @@ -81,7 +81,7 @@ export default class Swipeable extends Component<PropType, StateType> { ); } - componentWillUpdate(props: PropType, state: StateType) { + UNSAFE_componentWillUpdate(props: PropType, state: StateType) { if ( this.props.friction !== props.friction || this.props.overshootLeft !== props.overshootLeft ||
Use UNSAFE_componentWillUpdate in Swipable.js (#<I>) To silence the react warning, ideally we'd migrate to new React apis.
diff --git a/lib/rufus/decision.rb b/lib/rufus/decision.rb index <HASH>..<HASH> 100644 --- a/lib/rufus/decision.rb +++ b/lib/rufus/decision.rb @@ -276,6 +276,8 @@ module Decision hash end + alias :run :transform + # Outputs back this table as a CSV String # def to_csv
todo #<I> : run() as an alias to transform()
diff --git a/http/sys_seal.go b/http/sys_seal.go index <HASH>..<HASH> 100644 --- a/http/sys_seal.go +++ b/http/sys_seal.go @@ -13,7 +13,10 @@ import ( func handleSysSeal(core *vault.Core) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != "PUT" { + switch r.Method { + case "PUT": + case "POST": + default: respondError(w, http.StatusMethodNotAllowed, nil) return } @@ -33,7 +36,10 @@ func handleSysSeal(core *vault.Core) http.Handler { func handleSysUnseal(core *vault.Core) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != "PUT" { + switch r.Method { + case "PUT": + case "POST": + default: respondError(w, http.StatusMethodNotAllowed, nil) return }
Allow POST as well as PUT for seal/unseal command, fits in more with how logical handles things
diff --git a/demo/src/screens/MainScreen.js b/demo/src/screens/MainScreen.js index <HASH>..<HASH> 100644 --- a/demo/src/screens/MainScreen.js +++ b/demo/src/screens/MainScreen.js @@ -105,6 +105,7 @@ export default class UiLibExplorerMenu extends Component { text80 placeholder="Search your component.." onChangeText={this.filterExplorerScreens} + autoCorrect={false} /> </View> <ListView
don't auto correct search field in the main screen (of demo app)
diff --git a/lib/unobservable.rb b/lib/unobservable.rb index <HASH>..<HASH> 100644 --- a/lib/unobservable.rb +++ b/lib/unobservable.rb @@ -2,6 +2,15 @@ require 'set' module Unobservable + # Unobservable is designed so that it will not interfere with + # existing classes. Rather than injecting an instance_events + # method directly into Module, we have chosen to externalize + # this logic. + # + # In short: instance_events_for produces a list of instance + # events for any module regardless of whether or + # not that module includes the Unobservable::ModuleSupport + # mixin. def self.instance_events_for(mod, include_supers = true) raise TypeError, "Only modules and classes can have instance_events" unless mod.is_a? Module @@ -25,6 +34,12 @@ module Unobservable end module ModuleSupport + + # Returns the list of instance events that are associated with the + # module or class. If include_supers = true, then the list of events + # will also include events defined in superclasses and included modules. + # Otherwise, instance_events will only return the events defined explicitly + # by this module or class. By default, include_supers = true . def instance_events(include_supers = true) if include_supers == false @unobservable_instance_events ||= Set.new @@ -36,6 +51,8 @@ module Unobservable private + + # def attr_event(*names) @unobservable_instance_events ||= Set.new @@ -150,6 +167,7 @@ module Unobservable end + # Pass the specific arguments / block to all of the # event handlers. Return true if there was at least # 1 event handler; return false otherwise.
Added some comments to the code.
diff --git a/lib/weixin_authorize/api/media.rb b/lib/weixin_authorize/api/media.rb index <HASH>..<HASH> 100644 --- a/lib/weixin_authorize/api/media.rb +++ b/lib/weixin_authorize/api/media.rb @@ -43,11 +43,31 @@ module WeixinAuthorize # } # ] # } - def upload_news(news) + # Option: author, content_source_url + def upload_mass_news(news=[]) upload_news_url = "#{media_base_url}/uploadnews" http_post(upload_news_url, {articles: news}) end + # media_id: 需通过基础支持中的上传下载多媒体文件来得到 + # https://file.api.weixin.qq.com/cgi-bin/media/uploadvideo?access_token=ACCESS_TOKEN + + # return: + # { + # "type":"video", + # "media_id":"IhdaAQXuvJtGzwwc0abfXnzeezfO0NgPK6AQYShD8RQYMTtfzbLdBIQkQziv2XJc", + # "created_at":1398848981 + # } + def upload_mass_video(media_id, title="", desc="") + video_msg = { + "media_id" => media_id, + "title" => title, + "description" => desc + } + + http_post("#{media_base_url}/uploadvideo", video_msg) + end + private def process_file(media)
added #upload_mass_news and #upload_mass_video
diff --git a/templates/genomics/steps/drug_id.py b/templates/genomics/steps/drug_id.py index <HASH>..<HASH> 100644 --- a/templates/genomics/steps/drug_id.py +++ b/templates/genomics/steps/drug_id.py @@ -33,8 +33,8 @@ class GenomicsOfDrugSensitivityInCancerByGene(Resource): def get_interface(self, filename): interface = {} - fhndl = open(filename) - fhndl.next() + fhndl = open(filename, 'rU') + line = fhndl.next() for line in fhndl: parts = line.rstrip('\r\n').split(',') genes = parts[0].split('///')
added universal newline support to gdsc resource
diff --git a/bokeh/plotting_helpers.py b/bokeh/plotting_helpers.py index <HASH>..<HASH> 100644 --- a/bokeh/plotting_helpers.py +++ b/bokeh/plotting_helpers.py @@ -395,7 +395,7 @@ class _list_attr_splat(list): else: return dir(self) -_arg_template = " %s (%s) : \n %s (default %r)" +_arg_template = " %s (%s) : %s (default %r)" _doc_template = """ Configure and add %s glyphs to this Figure. Args: @@ -404,6 +404,19 @@ Args: Keyword Args: %s +Other Parameters: + alpha (float) : an alias to set all alpha keyword args at once + color (Color) : an alias to set all color keyword args at once + data_source (ColumnDataSource) : a user supplied data source + legend (str) : a legend tag for this glyph + x_range_name (str) : name an extra range to use for mapping x-coordinates + y_range_name (str) : name an extra range to use for mapping y-coordinates + level (Enum) : control the render level order for this glyph + +It is also possible to set the color and alpha parameters of a "nonselection" +glyph. To do so, prefix any visual parameter with ``'nonselection_'``. +For example, pass ``nonselection_alpha`` or ``nonselection_fill_alpha``. + Returns: GlyphRenderer """
add renderer and plot params to docs
diff --git a/tests/behat/features/bootstrap/FeatureContext.php b/tests/behat/features/bootstrap/FeatureContext.php index <HASH>..<HASH> 100644 --- a/tests/behat/features/bootstrap/FeatureContext.php +++ b/tests/behat/features/bootstrap/FeatureContext.php @@ -6,6 +6,7 @@ use SilverStripe\BehatExtension\Context\SilverStripeContext, SilverStripe\BehatExtension\Context\BasicContext, SilverStripe\BehatExtension\Context\LoginContext, SilverStripe\BehatExtension\Context\FixtureContext, + SilverStripe\BehatExtension\Context\EmailContext, SilverStripe\Framework\Test\Behaviour\CmsFormsContext, SilverStripe\Framework\Test\Behaviour\CmsUiContext; @@ -41,6 +42,7 @@ class FeatureContext extends SilverStripeContext $this->useContext('LoginContext', new LoginContext($parameters)); $this->useContext('CmsFormsContext', new CmsFormsContext($parameters)); $this->useContext('CmsUiContext', new CmsUiContext($parameters)); + $this->useContext('EmailContext', new EmailContext($parameters)); $fixtureContext = new FixtureContext($parameters); $fixtureContext->setFixtureFactory($this->getFixtureFactory());
Using Behat EmailContext by default
diff --git a/packages/create-razzle-app/lib/utils/get-install-cmd.js b/packages/create-razzle-app/lib/utils/get-install-cmd.js index <HASH>..<HASH> 100644 --- a/packages/create-razzle-app/lib/utils/get-install-cmd.js +++ b/packages/create-razzle-app/lib/utils/get-install-cmd.js @@ -10,7 +10,7 @@ module.exports = function getInstallCmd() { } try { - execa.sync('yarnpkg', '--version'); + execa.sync('yarnpkg', ['--version']); cmd = 'yarn'; } catch (e) { cmd = 'npm';
fix #<I> (#<I>)
diff --git a/eng/tox/install_depend_packages.py b/eng/tox/install_depend_packages.py index <HASH>..<HASH> 100644 --- a/eng/tox/install_depend_packages.py +++ b/eng/tox/install_depend_packages.py @@ -32,7 +32,8 @@ MINIMUM_VERSION_SUPPORTED_OVERRIDE = { 'msrest': '0.6.10', 'six': '1.9', 'typing-extensions': '3.6.5', - 'opentelemetry-api': '1.3.0' + 'opentelemetry-api': '1.3.0', + 'cryptography': '3.3' } def install_dependent_packages(setup_py_file_path, dependency_type, temp_dir):
override mindependency for cryptography (#<I>)