diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/wsgiservice/resource.py b/wsgiservice/resource.py
index <HASH>..<HASH> 100644
--- a/wsgiservice/resource.py
+++ b/wsgiservice/resource.py
@@ -207,7 +207,7 @@ class Resource(object):
else:
self.response.vary.append('Accept')
types = [mime for ext, mime in self.EXTENSION_MAP]
- return self.request.accept.first_match(types)
+ return self.request.accept.best_match(types)
def handle_ignored_resources(self):
"""Ignore robots.txt and favicon.ico GET requests based on a list of
|
Replace first_match with best_match.
first_match has been deprecated since WebOb <I>b1.
|
diff --git a/synapse/tests/test_lib_config.py b/synapse/tests/test_lib_config.py
index <HASH>..<HASH> 100644
--- a/synapse/tests/test_lib_config.py
+++ b/synapse/tests/test_lib_config.py
@@ -115,8 +115,20 @@ class ConfTest(SynTest):
with self.getTestDir() as fdir:
fp0 = os.path.join(fdir, 'c0.json')
fp1 = os.path.join(fdir, 'c1.json')
+ fpnull = os.path.join(fdir, 'null.json')
+ fpnewp = os.path.join(fdir, 'newp.json')
jssave(config0, fp0)
jssave(config1, fp1)
+ jssave(None, fpnull)
+
+ with Foo() as conf:
+ conf.loadConfPath(fpnewp)
+ self.eq(conf.getConfOpt('enabled'), 0)
+ self.eq(conf.getConfOpt('fooval'), 99)
+
+ conf.loadConfPath(fpnull)
+ self.eq(conf.getConfOpt('enabled'), 0)
+ self.eq(conf.getConfOpt('fooval'), 99)
with Foo() as conf:
conf.loadConfPath(fp0)
|
Add test coverage for loadConfPath
|
diff --git a/src/main/java/org/jboss/remotingjmx/protocol/v2/ServerCommon.java b/src/main/java/org/jboss/remotingjmx/protocol/v2/ServerCommon.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jboss/remotingjmx/protocol/v2/ServerCommon.java
+++ b/src/main/java/org/jboss/remotingjmx/protocol/v2/ServerCommon.java
@@ -202,12 +202,40 @@ public abstract class ServerCommon extends Common {
public void handleError(Channel channel, IOException error) {
log.warn("Channel closing due to error", error);
- end();
+ executor.execute(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ serverMessageInterceptor.handleEvent(new Event() {
+ @Override
+ public void run() {
+ end();
+ }
+ });
+ } catch (IOException e) {
+ log.error(e);
+ }
+ }
+ });
}
@Override
- public void handleEnd(Channel channel) {
- end();
+ public void handleEnd(final Channel channel) {
+ executor.execute(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ serverMessageInterceptor.handleEvent(new Event() {
+ @Override
+ public void run() {
+ end();
+ }
+ });
+ } catch (IOException e) {
+ log.error(e);
+ }
+ }
+ });
}
}
|
[REMJMX-<I>] Always reuse serverMessageInterceptor when closing channel so proper security identity is set up.
|
diff --git a/src/main/java/com/squareup/thumbor/ThumborUrl.java b/src/main/java/com/squareup/thumbor/ThumborUrl.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/squareup/thumbor/ThumborUrl.java
+++ b/src/main/java/com/squareup/thumbor/ThumborUrl.java
@@ -345,7 +345,12 @@ public final class ThumborUrl {
// URL-safe Base64 encode.
final String encoded = Utilities.base64Encode(encrypted);
- return new StringBuilder(host).append("/").append(encoded).append("/").append(target).toString();
+ return new StringBuilder(host) //
+ .append("/") //
+ .append(encoded) //
+ .append("/") //
+ .append(target) //
+ .toString();
}
/**
|
Stylisting tweak to match other build methods.
|
diff --git a/metrics-core/src/main/java/com/codahale/metrics/Clock.java b/metrics-core/src/main/java/com/codahale/metrics/Clock.java
index <HASH>..<HASH> 100644
--- a/metrics-core/src/main/java/com/codahale/metrics/Clock.java
+++ b/metrics-core/src/main/java/com/codahale/metrics/Clock.java
@@ -20,8 +20,6 @@ public abstract class Clock {
return System.currentTimeMillis();
}
- private static final Clock DEFAULT = new UserTimeClock();
-
/**
* The default clock to use.
*
@@ -29,7 +27,7 @@ public abstract class Clock {
* @see Clock.UserTimeClock
*/
public static Clock defaultClock() {
- return DEFAULT;
+ return UserTimeClockHolder.DEFAULT;
}
/**
@@ -41,4 +39,8 @@ public abstract class Clock {
return System.nanoTime();
}
}
+
+ private static class UserTimeClockHolder {
+ private static final Clock DEFAULT = new UserTimeClock();
+ }
}
|
Move the default UserTimeClock to a holder class
This allows to avoid a deadlock when the user creates a new
UserTimeClock by hand. By creating a holder class we defer the
resolution of UserTimeClock class in the Clock class until the
`defaultClock` method invocation, rather than classloading.
|
diff --git a/scapy/contrib/mpls.py b/scapy/contrib/mpls.py
index <HASH>..<HASH> 100644
--- a/scapy/contrib/mpls.py
+++ b/scapy/contrib/mpls.py
@@ -17,7 +17,7 @@
from scapy.packet import Packet, bind_layers, Padding
from scapy.fields import BitField, ByteField, ShortField
-from scapy.layers.inet import IP
+from scapy.layers.inet import IP, UDP
from scapy.contrib.bier import BIER
from scapy.layers.inet6 import IPv6
from scapy.layers.l2 import Ether, GRE
@@ -63,6 +63,7 @@ class MPLS(Packet):
bind_layers(Ether, MPLS, type=0x8847)
+bind_layers(UDP, MPLS, dport=6635)
bind_layers(GRE, MPLS, proto=0x8847)
bind_layers(MPLS, MPLS, s=0)
bind_layers(MPLS, EoMCW)
|
adding support for MPLS over UDP
|
diff --git a/spacy/cli/package.py b/spacy/cli/package.py
index <HASH>..<HASH> 100644
--- a/spacy/cli/package.py
+++ b/spacy/cli/package.py
@@ -16,8 +16,8 @@ def package(input_dir, output_dir, force):
check_dirs(input_path, output_path)
template_setup = get_template('setup.py')
+ template_manifest = get_template('MANIFEST.in')
template_init = get_template('en_model_name/__init__.py')
- template_manifest = 'include meta.json'
meta = generate_meta()
model_name = meta['lang'] + '_' + meta['name']
|
Fetch MANIFEST.in from GitHub as well
|
diff --git a/cmd/influxd/launcher/query_test.go b/cmd/influxd/launcher/query_test.go
index <HASH>..<HASH> 100644
--- a/cmd/influxd/launcher/query_test.go
+++ b/cmd/influxd/launcher/query_test.go
@@ -44,8 +44,8 @@ mem,server=b value=45.2`))
}
rawQ := fmt.Sprintf(`from(bucket:"%s")
- |> filter(fn: (r) => r._measurement == "cpu" and (r._field == "v1" or r._field == "v0"))
|> range(start:-1m)
+ |> filter(fn: (r) => r._measurement == "cpu" and (r._field == "v1" or r._field == "v0"))
`, be.Bucket.Name)
// Expected keys:
|
test(launcher): fix ill-formatted query; range must come before filter
Until <URL>
|
diff --git a/src/main/java/com/thinkaurelius/faunus/formats/rexster/FaunusRexsterExtension.java b/src/main/java/com/thinkaurelius/faunus/formats/rexster/FaunusRexsterExtension.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/thinkaurelius/faunus/formats/rexster/FaunusRexsterExtension.java
+++ b/src/main/java/com/thinkaurelius/faunus/formats/rexster/FaunusRexsterExtension.java
@@ -27,7 +27,7 @@ import java.io.OutputStream;
@ExtensionNaming(namespace = FaunusRexsterExtension.EXTENSION_NAMESPACE, name = FaunusRexsterExtension.EXTENSION_NAME)
public class FaunusRexsterExtension extends AbstractRexsterExtension {
- public static final String EXTENSION_NAMESPACE = "aurelius";
+ public static final String EXTENSION_NAMESPACE = "faunus";
public static final String EXTENSION_NAME = "v";
public static final byte[] LINE_BREAK = "\n".getBytes();
|
Changed namespace of kibble to 'faunus'
|
diff --git a/web/concrete/config/app.php b/web/concrete/config/app.php
index <HASH>..<HASH> 100644
--- a/web/concrete/config/app.php
+++ b/web/concrete/config/app.php
@@ -234,10 +234,7 @@ if (!defined('UPLOAD_FILE_EXTENSIONS_ALLOWED')) {
} else {
define('UPLOAD_FILE_EXTENSIONS_CONFIGURABLE', false);
}
-<<<<<<< HEAD
-=======
if (!defined('SEO_EXCLUDE_WORDS')) {
Config::getOrDefine('SEO_EXCLUDE_WORDS', 'a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with');
-}
->>>>>>> 0a5729a... finished up the seo excluded words
+}
\ No newline at end of file
|
resolved cherry-pick conflict
Former-commit-id: c2f<I>c<I>d6a<I>c9ad<I>b<I>c3c<I>d2f<I>f
|
diff --git a/dingo/core/__init__.py b/dingo/core/__init__.py
index <HASH>..<HASH> 100644
--- a/dingo/core/__init__.py
+++ b/dingo/core/__init__.py
@@ -692,6 +692,16 @@ class NetworkDingo:
for grid_district in self.mv_grid_districts():
grid_district.mv_grid.routing(debug, anim)
+ def connect_generators(self, debug=False):
+ """ Connects MV generators (graph nodes) to grid (graph) for every MV grid district
+
+ Args:
+ debug: If True, information is printed during process
+ """
+
+ for grid_district in self.mv_grid_districts():
+ grid_district.mv_grid.connect_generators(debug)
+
def mv_parametrize_grid(self, debug=False):
""" Performs Parametrization of grid equipment of all MV grids, see
method `parametrize_grid()` in class `MVGridDingo` for details.
|
add call method for connecting generators to NetworkDingo class
|
diff --git a/lib/Server.php b/lib/Server.php
index <HASH>..<HASH> 100644
--- a/lib/Server.php
+++ b/lib/Server.php
@@ -329,6 +329,12 @@ class sspmod_openidProvider_Server {
public function loadState($stateId) {
assert('is_string($stateId)');
+ // sanitize the input
+ $restartURL = SimpleSAML_Utilities::getURLFromStateID($stateId);
+ if (!is_null($restartURL)) {
+ SimpleSAML_Utilities::checkURLAllowed($restartURL);
+ }
+
return SimpleSAML_Auth_State::loadState($stateId, 'openidProvider:resumeState');
}
|
Followup on previous commits. Use redirectUntrustedURL() as a shortcut, and let everything else make use of redirectTrustedURL(). Move the responsibility to check the input out of the library, to the places where URLs are grabbed from input parameters.
git-svn-id: <URL>
|
diff --git a/lib/namespace.js b/lib/namespace.js
index <HASH>..<HASH> 100644
--- a/lib/namespace.js
+++ b/lib/namespace.js
@@ -141,21 +141,25 @@ Namespace.prototype.add = function(client, fn){
var self = this;
this.run(socket, function(err){
process.nextTick(function(){
- if (err) return socket.err(err.data || err.message);
-
- // track socket
- self.sockets.push(socket);
-
- // it's paramount that the internal `onconnect` logic
- // fires before user-set events to prevent state order
- // violations (such as a disconnection before the connection
- // logic is complete)
- socket.onconnect();
- if (fn) fn();
-
- // fire user-set events
- self.emit('connect', socket);
- self.emit('connection', socket);
+ if ('open' == client.conn.readyState) {
+ if (err) return socket.error(err.data || err.message);
+
+ // track socket
+ self.sockets.push(socket);
+
+ // it's paramount that the internal `onconnect` logic
+ // fires before user-set events to prevent state order
+ // violations (such as a disconnection before the connection
+ // logic is complete)
+ socket.onconnect();
+ if (fn) fn();
+
+ // fire user-set events
+ self.emit('connect', socket);
+ self.emit('connection', socket);
+ } else {
+ debug('next called after client was closed - ignoring socket');
+ }
});
});
return socket;
|
namespace: make sure not to fire `connection` if underlying client closed after `next` is called from a middleware
|
diff --git a/.karma.conf.js b/.karma.conf.js
index <HASH>..<HASH> 100644
--- a/.karma.conf.js
+++ b/.karma.conf.js
@@ -77,6 +77,31 @@ module.exports = function (config) {
// { type: 'text', subdir: '.', file: 'text.txt' },
{ type: 'text-summary', subdir: '.', file: 'text-summary.txt' },
],
+ check: {
+ global: {
+ statements: 75,
+ branches: 55,
+ functions: 75,
+ lines: 75,
+ excludes: [
+ 'foo/bar/**/*.js'
+ ]
+ },
+ // each: {
+ // statements: 50,
+ // branches: 50,
+ // functions: 50,
+ // lines: 50,
+ // excludes: [
+ // 'other/directory/**/*.js'
+ // ],
+ // overrides: {
+ // 'baz/component/**/*.js': {
+ // statements: 98
+ // }
+ // }
+ // }
+ },
watermarks: {
statements: [70, 75],
functions: [70, 75],
|
test(.karma.conf.js): added code coverage check
|
diff --git a/Connection.php b/Connection.php
index <HASH>..<HASH> 100644
--- a/Connection.php
+++ b/Connection.php
@@ -424,7 +424,10 @@ class Connection extends Component
CURLOPT_RETURNTRANSFER => false,
CURLOPT_HEADER => false,
// http://www.php.net/manual/en/function.curl-setopt.php#82418
- CURLOPT_HTTPHEADER => ['Expect:'],
+ CURLOPT_HTTPHEADER => [
+ 'Expect:',
+ 'Content-Type: application/json',
+ ],
CURLOPT_WRITEFUNCTION => function ($curl, $data) use (&$body) {
$body .= $data;
|
<I> (#<I>)
* support "gt", ">", "lt", "<", "gte", ">=", "lte" and "<=" operator
* reset the curl post fields and post method when resetting the curl handler
* Remove deprecated warning "Content type detection for rest requests is deprecated. Specify the content type using the [Content-Type] header"
|
diff --git a/generators/heroku/index.js b/generators/heroku/index.js
index <HASH>..<HASH> 100644
--- a/generators/heroku/index.js
+++ b/generators/heroku/index.js
@@ -191,28 +191,7 @@ module.exports = class extends BaseBlueprintGenerator {
type: 'list',
name: 'herokuJavaVersion',
message: 'Which Java version would you like to use to build and run your app ?',
- choices: [
- {
- value: '1.8',
- name: '1.8',
- },
- {
- value: '11',
- name: '11',
- },
- {
- value: '12',
- name: '12',
- },
- {
- value: '13',
- name: '13',
- },
- {
- value: '14',
- name: '14',
- },
- ],
+ choices: constants.JAVA_COMPATIBLE_VERSIONS.map(version => ({ value: version })),
default: 1,
},
];
|
support jdk<I> with heroku sub gen
|
diff --git a/python/ray/tests/test_advanced_9.py b/python/ray/tests/test_advanced_9.py
index <HASH>..<HASH> 100644
--- a/python/ray/tests/test_advanced_9.py
+++ b/python/ray/tests/test_advanced_9.py
@@ -186,6 +186,10 @@ def test_function_table_gc_actor(call_ray_start):
wait_for_condition(lambda: function_entry_num(job_id) == 0)
+@pytest.mark.skipif(
+ sys.platform != "linux",
+ reason="This test is only run on linux machines.",
+)
def test_worker_oom_score(shutdown_only):
@ray.remote
def get_oom_score():
|
[core] Skip windows test for adjusting worker OOM score (#<I>)
Fixes CI failure introduced in #<I>.
|
diff --git a/werkzeug/serving.py b/werkzeug/serving.py
index <HASH>..<HASH> 100644
--- a/werkzeug/serving.py
+++ b/werkzeug/serving.py
@@ -481,7 +481,7 @@ def run_simple(hostname, port, application, use_reloader=False,
from werkzeug.debug import DebuggedApplication
application = DebuggedApplication(application, use_evalex)
if static_files:
- from werkzeug.utils import SharedDataMiddleware
+ from werkzeug.wsgi import SharedDataMiddleware
application = SharedDataMiddleware(application, static_files)
def inner():
|
Fixed an import error in the serving support. This fixes #<I>
|
diff --git a/bolt/spark.py b/bolt/spark.py
index <HASH>..<HASH> 100644
--- a/bolt/spark.py
+++ b/bolt/spark.py
@@ -41,20 +41,27 @@ class BoltArraySpark(BoltArray):
Functional operators
"""
- # TODO make sure that operation preserves shape
+ # TODO handle shape changes
+ # TODO add axes
def map(self, func):
return self._constructor(self._rdd.mapValues(func)).__finalize__(self)
+ # TODO add axes
def reduce(self, func):
return self._constructor(self._rdd.values().reduce(func)).__finalize__(self)
"""
- Basic array operators
+ Reductions
"""
+ # TODO add axes
def sum(self, axis=0):
return self._constructor(self._rdd.sum()).__finalize__(self)
+ """
+ Slicing and indexing
+ """
+
def __getitem__(self):
pass
|
Add todos and reorganize
|
diff --git a/modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/mail/EmailTestCase.java b/modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/mail/EmailTestCase.java
index <HASH>..<HASH> 100644
--- a/modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/mail/EmailTestCase.java
+++ b/modules/activiti-engine/src/test/java/org/activiti/engine/test/bpmn/mail/EmailTestCase.java
@@ -37,7 +37,7 @@ public class EmailTestCase extends PluggableActivitiTestCase {
wiser.start();
serverUpAndRunning = true;
} catch (RuntimeException e) { // Fix for slow port-closing Jenkins
- if (e.getMessage().toLowerCase().contains("BindException")) {
+ if (e.getMessage().toLowerCase().contains("bindexception")) {
Thread.sleep(250L);
}
}
|
(possible) fix for failing email tests
|
diff --git a/consul/mdb_table.go b/consul/mdb_table.go
index <HASH>..<HASH> 100644
--- a/consul/mdb_table.go
+++ b/consul/mdb_table.go
@@ -28,12 +28,19 @@ const (
using a row id, while maintaining any number of secondary indexes.
*/
type MDBTable struct {
- lastRowID uint64 // Last used rowID
- Env *mdb.Env
- Name string // This is the name of the table, must be unique
- Indexes map[string]*MDBIndex
- Encoder func(interface{}) []byte
- Decoder func([]byte) interface{}
+ Env *mdb.Env
+ Name string // This is the name of the table, must be unique
+ Indexes map[string]*MDBIndex
+ Encoder func(interface{}) []byte
+ Decoder func([]byte) interface{}
+
+ // NotifyGroup is created in init, it can be used to
+ // watch a table for changes. It is not invoked internally,
+ // but can be used by clients of the table.
+ NotifyGroup *NotifyGroup
+
+ // Last used rowID
+ lastRowID uint64
}
// MDBTables is used for when we have a collection of tables
@@ -97,6 +104,9 @@ func (t *MDBTable) Init() error {
return fmt.Errorf("Missing table indexes")
}
+ // Create the notify group
+ t.NotifyGroup = &NotifyGroup{}
+
// Ensure we have a unique id index
id, ok := t.Indexes["id"]
if !ok {
|
consul: Add a NotifyGroup to the MDBTable
|
diff --git a/isort/settings.py b/isort/settings.py
index <HASH>..<HASH> 100644
--- a/isort/settings.py
+++ b/isort/settings.py
@@ -402,7 +402,7 @@ def file_should_be_skipped(
position = os.path.split(position[0])
for glob in config['skip_glob']:
- if fnmatch.fnmatch(filename, glob):
+ if fnmatch.fnmatch(filename, glob) or fnmatch.fnmatch('/' + filename, glob):
return True
if not (os.path.isfile(os_path) or os.path.isdir(os_path) or os.path.islink(os_path)):
|
Fix issue with */ style glob tests
|
diff --git a/pywws/Plot.py b/pywws/Plot.py
index <HASH>..<HASH> 100755
--- a/pywws/Plot.py
+++ b/pywws/Plot.py
@@ -486,7 +486,7 @@ class BasePlotter(object):
self.plot_count = len(plot_list)
if self.plot_count < 1:
# nothing to plot
- self.logger.error('%s has no plot nodes' % input_file)
+ self.logger.info('%s has no plot nodes' % input_file)
self.doc.unlink()
return 1
# get start and end datetimes
diff --git a/pywws/version.py b/pywws/version.py
index <HASH>..<HASH> 100644
--- a/pywws/version.py
+++ b/pywws/version.py
@@ -1,3 +1,3 @@
version = '13.08'
-release = '1049'
-commit = '2bc66e7'
+release = '1050'
+commit = '05c221c'
|
Reduce "no plot nodes" message from error to info
The pywws.Tasks module always tries graph templates as plots first,
before trying them as wind roses if the plot failed. This was generating
spurious error messages for a situation that isn't really an error.
|
diff --git a/bokeh/server/application_context.py b/bokeh/server/application_context.py
index <HASH>..<HASH> 100644
--- a/bokeh/server/application_context.py
+++ b/bokeh/server/application_context.py
@@ -7,6 +7,7 @@ import logging
log = logging.getLogger(__name__)
from .session import ServerSession
+from .exceptions import ProtocolError
class ApplicationContext(object):
''' Server-side holder for bokeh.application.Application plus any associated data.
|
Add missing import to server/application_context.py
This was only apparent when an error was raised.
|
diff --git a/labm8/py/dockerutil.py b/labm8/py/dockerutil.py
index <HASH>..<HASH> 100644
--- a/labm8/py/dockerutil.py
+++ b/labm8/py/dockerutil.py
@@ -166,7 +166,9 @@ class BazelPy3Image(object):
subprocess.check_call(
_Docker(["tag", self.image_name, tmp_name], timeout=60),
)
- subprocess.check_call(_Docker(["rmi", self.image_name], timeout=60))
+ subprocess.check_call(
+ _Docker(["rmi", "--force", self.image_name], timeout=60)
+ )
yield DockerImageRunContext(tmp_name)
# FIXME(cec): Using the --force flag here is almost certainly the wrong
# thing, but I'm getting strange errors when trying to untag the image
|
Force removal of docker image.
github.com/ChrisCummins/phd/issues/<I>
|
diff --git a/lib/yard/generators/class_generator.rb b/lib/yard/generators/class_generator.rb
index <HASH>..<HASH> 100644
--- a/lib/yard/generators/class_generator.rb
+++ b/lib/yard/generators/class_generator.rb
@@ -1,6 +1,8 @@
module YARD
module Generators
class ClassGenerator < Base
+ before_generate :is_class?
+
def sections_for(object)
[
:header,
@@ -11,9 +13,8 @@ module YARD
AttributesGenerator,
ConstantsGenerator,
ConstructorGenerator,
- MethodSummaryGenerator.new(options, :ignore_serializer => true,
- :scope => :instance, :visibility => :public
- )
+ G(MethodSummaryGenerator, :scope => :instance, :visibility => :public),
+ G(MethodDetailsGenerator, :scope => :instance, :visibility => :public)
]
]
end
|
Add visibility grouping generators to class generator
|
diff --git a/libcontainer/cgroups/systemd/v2.go b/libcontainer/cgroups/systemd/v2.go
index <HASH>..<HASH> 100644
--- a/libcontainer/cgroups/systemd/v2.go
+++ b/libcontainer/cgroups/systemd/v2.go
@@ -53,6 +53,10 @@ func genV2ResourcesProperties(c *configs.Cgroup) ([]systemdDbus.Property, error)
properties = append(properties,
newProp("MemoryMax", uint64(c.Resources.Memory)))
}
+ if c.Resources.MemoryReservation != 0 {
+ properties = append(properties,
+ newProp("MemoryLow", uint64(c.Resources.MemoryReservation)))
+ }
// swap is set
if c.Resources.MemorySwap != 0 {
swap, err := cgroups.ConvertMemorySwapToCgroupV2Value(c.Resources.MemorySwap, c.Resources.Memory)
|
cgroupv2+systemd: set MemoryLow
For some reason, this was not set before.
Test case is added by the next commit.
|
diff --git a/eventsourcing/examples/test_parking_lot.py b/eventsourcing/examples/test_parking_lot.py
index <HASH>..<HASH> 100644
--- a/eventsourcing/examples/test_parking_lot.py
+++ b/eventsourcing/examples/test_parking_lot.py
@@ -17,10 +17,10 @@ from eventsourcing.system import NotificationLogReader
@dataclass
class LicencePlate:
number: str
+ regex = re.compile("^[0-9]{3}-[0-9]{3}$")
def __post_init__(self) -> None:
- regex = re.compile("^[0-9]{3}-[0-9]{3}$")
- if not bool(regex.match(self.number)):
+ if not bool(self.regex.match(self.number)):
raise ValueError()
|
Moved regex to be a class attribute.
|
diff --git a/core/server/src/main/java/alluxio/master/file/FileSystemMaster.java b/core/server/src/main/java/alluxio/master/file/FileSystemMaster.java
index <HASH>..<HASH> 100644
--- a/core/server/src/main/java/alluxio/master/file/FileSystemMaster.java
+++ b/core/server/src/main/java/alluxio/master/file/FileSystemMaster.java
@@ -1987,7 +1987,7 @@ public final class FileSystemMaster extends AbstractMaster {
try {
return loadMetadataAndJournal(inodePath, options);
} catch (Exception e) {
- // NOTE, this may be expected when client tries to get info (e.g. exisits()) for a file
+ // NOTE, this may be expected when client tries to get info (e.g. exists()) for a file
// existing neither in Alluxio nor UFS.
LOG.debug("Failed to load metadata for path from UFS: {}", inodePath.getUri());
}
|
Update the comment in loadMetadataIfNotExistAndJournal from exisits to exists.
|
diff --git a/lib/smartcoin/version.rb b/lib/smartcoin/version.rb
index <HASH>..<HASH> 100644
--- a/lib/smartcoin/version.rb
+++ b/lib/smartcoin/version.rb
@@ -1,3 +1,3 @@
module Smartcoin
- VERSION = "0.1.2"
+ VERSION = "0.1.3"
end
|
SmartCoin library version <I>
|
diff --git a/org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/UIElementBase.java b/org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/UIElementBase.java
index <HASH>..<HASH> 100644
--- a/org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/UIElementBase.java
+++ b/org.carewebframework.shell/src/main/java/org/carewebframework/shell/layout/UIElementBase.java
@@ -1376,7 +1376,7 @@ public abstract class UIElementBase {
* @param eventData Data associated with the event.
* @param recurse If true, recurse up the parent chain.
*/
- protected void notifyParent(String eventName, Object eventData, boolean recurse) {
+ public void notifyParent(String eventName, Object eventData, boolean recurse) {
UIElementBase ele = parent;
while (ele != null) {
@@ -1403,7 +1403,7 @@ public abstract class UIElementBase {
* @param eventData Data associated with the event.
* @param recurse If true, recurse over all child levels.
*/
- protected void notifyChildren(String eventName, Object eventData, boolean recurse) {
+ public void notifyChildren(String eventName, Object eventData, boolean recurse) {
notifyChildren(this, eventName, eventData, recurse);
}
|
Make NotifyParent and NotifyChildren public.
|
diff --git a/jquery-loadTemplate/jquery.loadTemplate-0.5.4.js b/jquery-loadTemplate/jquery.loadTemplate-0.5.4.js
index <HASH>..<HASH> 100644
--- a/jquery-loadTemplate/jquery.loadTemplate-0.5.4.js
+++ b/jquery-loadTemplate/jquery.loadTemplate-0.5.4.js
@@ -229,6 +229,10 @@
$elem.attr("alt", applyFormatters($elem, value, "alt"));
});
+ processElements("data-value", template, data, function ($elem, value) {
+ $elem.val(applyFormatters($elem, value, "value"));
+ });
+
processElements("data-link", template, data, function ($elem, value) {
var $linkElem = $("<a/>");
$linkElem.attr("href", applyFormatters($elem, value, "link"));
@@ -347,4 +351,4 @@
$.fn.loadTemplate = loadTemplate;
$.addTemplateFormatter = addTemplateFormatter;
-})(jQuery);
\ No newline at end of file
+})(jQuery);
|
Added support for the "value" attribute (e.g. to fill form fields)
|
diff --git a/dist/createStore.js b/dist/createStore.js
index <HASH>..<HASH> 100644
--- a/dist/createStore.js
+++ b/dist/createStore.js
@@ -55,9 +55,7 @@ function createStore(modules) {
if (module.decorateReducer) moduleReducer = module.decorateReducer(moduleReducer);
reducerList[module.name] = moduleReducer;
});
- config.sagas && config.sagas.forEach(function (saga) {
- return sagas.concat(saga);
- });
+ sagas = config.sagas ? sagas.concat(config.sagas) : sagas;
var combinedReducer = (0, _redux.combineReducers)(reducerList);
if (config.decorateReducer) {
diff --git a/src/createStore.js b/src/createStore.js
index <HASH>..<HASH> 100644
--- a/src/createStore.js
+++ b/src/createStore.js
@@ -36,7 +36,7 @@ export default function createStore(modules, config = {}){
moduleReducer = module.decorateReducer(moduleReducer);
reducerList[module.name] = moduleReducer;
});
- config.sagas && config.sagas.forEach(saga => sagas.concat(saga));
+ sagas = config.sagas ? sagas.concat(config.sagas) : sagas;
let combinedReducer = combineReducers(reducerList);
if (config.decorateReducer) {
|
#<I>: fix bug where extra sagas passed in from config were not concatenating to the sagas array
|
diff --git a/node-binance-api.js b/node-binance-api.js
index <HASH>..<HASH> 100644
--- a/node-binance-api.js
+++ b/node-binance-api.js
@@ -148,7 +148,7 @@ let api = function Binance( options = {} ) {
const reqHandler = cb => ( error, response, body ) => {
Binance.info.lastRequest = new Date().getTime();
- Binance.info.lastURL = response.request.uri.href;
+ if ( response && response.request ) Binance.info.lastURL = response.request.uri.href;
Binance.info.statusCode = response.statusCode;
Binance.info.usedWeight = response.headers['x-mbx-used-weight-1m'] || 0;
Binance.info.orderCount1s = response.headers['x-mbx-order-count-1s'] || 0;
@@ -456,7 +456,7 @@ let api = function Binance( options = {} ) {
try {
Binance.info.lastRequest = new Date().getTime();
Binance.info.statusCode = response.statusCode;
- Binance.info.lastURL = response.request.uri.href;
+ if ( response && response.request ) Binance.info.lastURL = response.request.uri.href;
Binance.info.usedWeight = response.headers['x-mbx-used-weight-1m'] || 0;
Binance.info.futuresLatency = response.headers['x-response-time'] || 0;
if ( !error && response.statusCode == 200 ) return resolve( JSON.parse( body ) );
|
Fix for "cannot read property 'request' of undefined" during fatal errors
|
diff --git a/lib/web_translate_it.rb b/lib/web_translate_it.rb
index <HASH>..<HASH> 100644
--- a/lib/web_translate_it.rb
+++ b/lib/web_translate_it.rb
@@ -16,14 +16,14 @@ require 'web_translate_it/command_line'
require 'web_translate_it/project'
module WebTranslateIt
-
+
def self.fetch_translations
config = Configuration.new
locale = I18n.locale.to_s
return if config.ignore_locales.include?(locale)
config.logger.debug { "➔ Fetching #{locale.upcase} language file(s) from Web Translate It…" } if config.logger
WebTranslateIt::Connection.new(config.api_key) do |http|
- config.files.find_all{ |file| file.locale == locale }.each do |file|
+ config.files.find_all{ |file| file.locale.in?(locale, I18n.lang) }.each do |file|
response = file.fetch(http)
config.logger.debug { "➔ Web Translate It response: #{response}" } if config.logger
end
|
do not fetch locales for static requests
|
diff --git a/tests/test_contentsmanager.py b/tests/test_contentsmanager.py
index <HASH>..<HASH> 100644
--- a/tests/test_contentsmanager.py
+++ b/tests/test_contentsmanager.py
@@ -1667,10 +1667,10 @@ def test_multiple_pairing(tmpdir):
model_md = cm.get("notebook.md", content=False, load_alternative_format=False)
model_py = cm.get("notebook.py", content=False, load_alternative_format=False)
- # ipynb is the older, then py, then md
+ # ipynb is the oldest one, then py, then md
# so that we read cell inputs from the py file
- assert model_ipynb["last_modified"] < model_py["last_modified"]
- assert model_py["last_modified"] < model_md["last_modified"]
+ assert model_ipynb["last_modified"] <= model_py["last_modified"]
+ assert model_py["last_modified"] <= model_md["last_modified"]
@skip_if_dict_is_not_ordered
|
Seen an example with identical timestamps
|
diff --git a/spec/factory_bot/factory_spec.rb b/spec/factory_bot/factory_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/factory_bot/factory_spec.rb
+++ b/spec/factory_bot/factory_spec.rb
@@ -14,18 +14,6 @@ describe FactoryBot::Factory do
expect(@factory.build_class).to eq @class
end
- it "passes a custom creation block" do
- strategy = double("strategy", result: nil, add_observer: true)
- allow(FactoryBot::Strategy::Build).to receive(:new).and_return strategy
- block = -> {}
- factory = FactoryBot::Factory.new(:object)
- factory.to_create(&block)
-
- factory.run(FactoryBot::Strategy::Build, {})
-
- expect(strategy).to have_received(:result).with(instance_of(FactoryBot::Evaluation))
- end
-
it "returns associations" do
factory = FactoryBot::Factory.new(:post)
FactoryBot.register_factory(FactoryBot::Factory.new(:admin))
|
Remove unhelpful spec
This spec was introduced back in <I>c<I>a1e6, at which point it was
testing that the to_create block got passed to a proxy object.
A lot has changed since then, and this test is no longer testing
anything involving to_create (we can remove the call to to_create and it
still passes). It is testing that we instantiate a strategy and pass an
evaluation to it, but that isn't a helpful test. The behavior we
actually care about is well tested in acceptance specs.
|
diff --git a/src/frontend/org/voltdb/ClientInterface.java b/src/frontend/org/voltdb/ClientInterface.java
index <HASH>..<HASH> 100644
--- a/src/frontend/org/voltdb/ClientInterface.java
+++ b/src/frontend/org/voltdb/ClientInterface.java
@@ -371,13 +371,10 @@ public class ClientInterface implements SnapshotDaemon.DaemonInitiator {
socket.socket().setKeepAlive(true);
if (handler instanceof ClientInputHandler) {
+ Connection c = m_network.registerChannel(socket, handler, 0);
synchronized (m_connections){
- Connection c = null;
if (!m_hasDTXNBackPressure) {
- c = m_network.registerChannel(socket, handler, SelectionKey.OP_READ);
- }
- else {
- c = m_network.registerChannel(socket, handler, 0);
+ c.enableReadSelection();
}
m_connections.add(c);
}
|
Fix a deadlock when accepting new connections.
|
diff --git a/app/classes/lib.php b/app/classes/lib.php
index <HASH>..<HASH> 100644
--- a/app/classes/lib.php
+++ b/app/classes/lib.php
@@ -879,7 +879,9 @@ function getConfig()
// We add these later, because the order is important: By having theme/ourtheme first,
// files in that folder will take precedence. For instance when overriding the menu template.
$config['twigpath'][] = realpath(__DIR__.'/../theme_defaults');
- $config['twigpath'][] = realpath(__DIR__.'/../extensions');
+
+ // Deprecated! Extensions that use templates, should add their own path: $this->app['twig.loader.filesystem']->addPath(__DIR__);
+ // $config['twigpath'][] = realpath(__DIR__.'/../extensions');
return $config;
|
Change: removed the entire 'app/extensions/' path from Twig by default.
From now on, it's the extensions responsibility to add a path, if its'
needed:
$this->app['twig.loader.filesystem']->addPath(__DIR__);
|
diff --git a/assembla/lib.py b/assembla/lib.py
index <HASH>..<HASH> 100644
--- a/assembla/lib.py
+++ b/assembla/lib.py
@@ -11,6 +11,9 @@ class AssemblaObject(object):
def __getitem__(self, key):
return self.data[key]
+ def __setitem__(self, key, value):
+ self.data[key] = value
+
def keys(self):
return self.data.keys()
@@ -20,6 +23,15 @@ class AssemblaObject(object):
def get(self, *args, **kwargs):
return self.data.get(*args, **kwargs)
+ def __repr__(self):
+ if 'name' in self.data:
+ return "<%s: %s>" % (type(self).__name__, self.data['name'])
+
+ if ('number' in self.data) and ('summary' in self.data):
+ return "<%s: #%s - %s>" % (type(self).__name__, self.data['number'], self.data['summary'])
+
+ return super(AssemblaObject, self).__repr__()
+
def assembla_filter(func):
"""
|
Allow keys to be set (in anticipation of write commands). Better object __repr__() for spaces and tickets.
|
diff --git a/Gruntfile.js b/Gruntfile.js
index <HASH>..<HASH> 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -74,6 +74,8 @@ module.exports = function (grunt) {
'!extensions/default/*/unittest-files/**/*',
'!extensions/default/*/unittests.js',
'extensions/default/*/**/*',
+ 'extensions/dev/*',
+ 'extensions/samples/**/*',
'thirdparty/CodeMirror2/addon/{,*/}*',
'thirdparty/CodeMirror2/keymap/{,*/}*',
'thirdparty/CodeMirror2/lib/{,*/}*',
|
add extensions/dev and extensions/samples to grunt build
|
diff --git a/lib/parslet/expression.rb b/lib/parslet/expression.rb
index <HASH>..<HASH> 100644
--- a/lib/parslet/expression.rb
+++ b/lib/parslet/expression.rb
@@ -37,8 +37,8 @@ class Parslet::Expression
rule(:string) {
str('\'') >>
(
- (str('\\') >> any) /
- (str('\'').absnt? >> any)
+ (str('\\') >> any) |
+ (str("'").absnt? >> any)
).repeat.as(:string) >>
str('\'')
}
diff --git a/spec/unit/parslet/expression_spec.rb b/spec/unit/parslet/expression_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/parslet/expression_spec.rb
+++ b/spec/unit/parslet/expression_spec.rb
@@ -18,15 +18,19 @@ describe Parslet::Expression do
end
end
- # REPLACE ME TODO
- def match(str)
- simple_matcher("match") do |parslet|
- parslet.parse(str)
+ RSpec::Matchers.define :accept do |string|
+ match do |parslet|
+ begin
+ parslet.parse(string)
+ true
+ rescue Parslet::ParseFailed
+ false
+ end
end
end
context "simple strings ('abc')" do
subject { exp("'abc'") }
- it { should match('abc') }
+ it { should accept('abc') }
end
end
\ No newline at end of file
|
+ Fixing the new examples with all the new code
The treetop parser is experimental and will undergo some changes yet.
|
diff --git a/src/Http/Middleware/LaravelCaffeineDripMiddleware.php b/src/Http/Middleware/LaravelCaffeineDripMiddleware.php
index <HASH>..<HASH> 100644
--- a/src/Http/Middleware/LaravelCaffeineDripMiddleware.php
+++ b/src/Http/Middleware/LaravelCaffeineDripMiddleware.php
@@ -47,6 +47,13 @@ class LaravelCaffeineDripMiddleware
"{$dripper->html}</body>",
$content
);
+
+ $content = preg_replace(
+ '/(<\/body\>?|<\/html\>?|\Z)/',
+ $dripper->html . '$1',
+ $content,
+ 1
+ );
$original = $response->original;
$response->setContent($content);
$response->original = $original;
|
Added functionality to account for missing body or html closing tags, thanks @tontonsb
|
diff --git a/service/s3/customizations.go b/service/s3/customizations.go
index <HASH>..<HASH> 100644
--- a/service/s3/customizations.go
+++ b/service/s3/customizations.go
@@ -21,7 +21,7 @@ func init() {
initRequest = func(r *request.Request) {
switch r.Operation.Name {
- case opPutBucketCors, opPutBucketLifecycle, opPutBucketPolicy, opPutBucketTagging, opDeleteObjects, opPutBucketLifecycleConfiguration:
+ case opPutBucketCors, opPutBucketLifecycle, opPutBucketPolicy, opPutBucketTagging, opDeleteObjects, opPutBucketLifecycleConfiguration, opPutBucketReplication:
// These S3 operations require Content-MD5 to be set
r.Handlers.Build.PushBack(contentMD5)
case opGetBucketLocation:
|
service/s3: Add Content-MD5 for PutBucketReplication
Adds customizations to the S3 service client for generating MD5 for
the PutBucketReplication operation.
Fix #<I>
|
diff --git a/varify/samples/management/subcommands/queue.py b/varify/samples/management/subcommands/queue.py
index <HASH>..<HASH> 100644
--- a/varify/samples/management/subcommands/queue.py
+++ b/varify/samples/management/subcommands/queue.py
@@ -9,7 +9,7 @@ from varify.samples.pipeline.handlers import load_samples
SAMPLE_DIRS = getattr(settings, 'VARIFY_SAMPLE_DIRS', ())
-log = logging.getLogger(__file__)
+log = logging.getLogger(__name__)
class Command(BaseCommand):
|
Use __name__ over __file__ in queue logger
|
diff --git a/worker/bridge.js b/worker/bridge.js
index <HASH>..<HASH> 100644
--- a/worker/bridge.js
+++ b/worker/bridge.js
@@ -1,10 +1,6 @@
import PromiseWorker from 'promise-worker';
-const uri = process.env.NODE_ENV === 'development' ?
- '/panels-worker.js' :
- 'https://cdn.uxtemple.com/panels-worker.js';
-
-const worker = new Worker(uri);
+const worker = new Worker('/panels-worker.js');
const promiseWorker = new PromiseWorker(worker);
export default promiseWorker;
|
fix: always load worker from /panels-worker.js
|
diff --git a/cake/tests/cases/console/console_output.test.php b/cake/tests/cases/console/console_output.test.php
index <HASH>..<HASH> 100644
--- a/cake/tests/cases/console/console_output.test.php
+++ b/cake/tests/cases/console/console_output.test.php
@@ -200,12 +200,4 @@ class ConsoleOutputTest extends CakeTestCase {
$this->output->write('<error>Bad</error> <error>Warning</error> Regular', false);
}
-/**
- * test wrapping blocks at certain widths.
- *
- * @return void
- */
- function testFormatBlock() {
- $this->markTestIncomplete('This test needs to be written.');
- }
}
\ No newline at end of file
|
Removing a test that doesn't need to be implemented.
|
diff --git a/src/Command/DaemonCommand.php b/src/Command/DaemonCommand.php
index <HASH>..<HASH> 100644
--- a/src/Command/DaemonCommand.php
+++ b/src/Command/DaemonCommand.php
@@ -91,16 +91,11 @@ class DaemonCommand extends BackgroundCommand
try {
$output->writeln('Daemon executing main process.');
parent::background($input, $output);
- } catch (\Exception $e) {
+ } finally {
+ $output->writeln('Daemon process shutting down.');
if ($pidFile !== null && file_exists($pidFile)) {
unlink($pidFile);
}
- throw $e;
- }
-
- $output->writeln('Daemon process shutting down.');
- if ($pidFile !== null && file_exists($pidFile)) {
- unlink($pidFile);
}
}
|
Use `finally` to remove duplication
|
diff --git a/lib/haml/version.rb b/lib/haml/version.rb
index <HASH>..<HASH> 100644
--- a/lib/haml/version.rb
+++ b/lib/haml/version.rb
@@ -1,3 +1,3 @@
module Haml
- VERSION = "3.2.0.alpha.14"
+ VERSION = "4.0.0.alpha.0"
end
|
Bump to <I>.alpha<I>
Note that I've just branch 3-2-stable from master, after a few beta RC's
it will become stable. <I> will not be released for at least 6 more
months, so don't mistake this for tangible progress on <I>; it's just
housekeeping.
|
diff --git a/src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php b/src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php
index <HASH>..<HASH> 100644
--- a/src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php
+++ b/src/Symfony/Bridge/PhpUnit/SymfonyTestsListener.php
@@ -186,6 +186,10 @@ class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
public function endTest(\PHPUnit_Framework_Test $test, $time)
{
if ($this->expectedDeprecations) {
+ if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE), true)) {
+ $test->addToAssertionCount(count($this->expectedDeprecations));
+ }
+
restore_error_handler();
if (!in_array($test->getStatus(), array(\PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED, \PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE, \PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE, \PHPUnit_Runner_BaseTestRunner::STATUS_ERROR), true)) {
|
Count @expectedDeprecation as an assertion
|
diff --git a/lib/billy/ssl/certificate_helpers.rb b/lib/billy/ssl/certificate_helpers.rb
index <HASH>..<HASH> 100644
--- a/lib/billy/ssl/certificate_helpers.rb
+++ b/lib/billy/ssl/certificate_helpers.rb
@@ -27,7 +27,7 @@ module Billy
# and ensure the location is safely created. Pass
# back the resulting path.
def write_file(name, contents)
- path = File.join(Billy.config.certs_path, name)
+ path = File.join(Billy.config.certs_path, "#{Process.pid}-#{name}")
FileUtils.mkdir_p(File.dirname(path))
File.write(path, contents)
path
|
Include pid in names of temporary files (#<I>)
|
diff --git a/src/main/java/org/cp/elements/lang/SystemUtils.java b/src/main/java/org/cp/elements/lang/SystemUtils.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/cp/elements/lang/SystemUtils.java
+++ b/src/main/java/org/cp/elements/lang/SystemUtils.java
@@ -26,8 +26,8 @@ package org.cp.elements.lang;
@SuppressWarnings("unused")
public abstract class SystemUtils {
- // Present Working Directory (PWD)
- public static final String CURRENT_DIRECTORY = System.getProperty("user.dir");
+ // define $PATH separator
+ public static final String PATH_SEPARATOR = System.getProperty("path.separator");
// Java Virtual Machine (JVM) Names
public static final String IBM_J9_JVM_NAME = "J9";
|
Add class member constant referencing the System PATH separator. Remove the CURRENT_DIRECTORY pathname file system reference.
|
diff --git a/lib/conceptql/tree.rb b/lib/conceptql/tree.rb
index <HASH>..<HASH> 100644
--- a/lib/conceptql/tree.rb
+++ b/lib/conceptql/tree.rb
@@ -10,7 +10,7 @@ module ConceptQL
end
def root(query)
- @root ||= traverse(query.statement.symbolize_keys)
+ @root ||= traverse(query.statement.deep_symbolize_keys)
end
private
|
Tree: deep symbolize keys in a statement
|
diff --git a/pkg/apis/networking/types.go b/pkg/apis/networking/types.go
index <HASH>..<HASH> 100644
--- a/pkg/apis/networking/types.go
+++ b/pkg/apis/networking/types.go
@@ -491,6 +491,7 @@ type IngressServiceBackend struct {
// ServiceBackendPort is the service port being referenced.
type ServiceBackendPort struct {
// Name is the name of the port on the Service.
+ // This must be an IANA_SVC_NAME (following RFC6335).
// This is a mutually exclusive setting with "Number".
// +optional
Name string
|
Update types.go
Minor comment on BackendPort Name that should follow IANA. Service port names do not have this restriction so there is a mismatch.
|
diff --git a/chess/position.py b/chess/position.py
index <HASH>..<HASH> 100644
--- a/chess/position.py
+++ b/chess/position.py
@@ -23,7 +23,7 @@ import types
# TODO: Find a sane order for the members.
-san_regex = re.compile('^([NBKRQ])?([a-h])?([1-8])?x?([a-h][1-8])(=[NBRQ])?$')
+san_regex = re.compile('^([NBKRQ])?([a-h])?([1-8])?x?([a-h][1-8])(=[NBRQ])?(\+|#)?$')
MoveInfo = collections.namedtuple("MoveInfo", [
"move",
|
Let the SAN regex allow + and # suffixes.
|
diff --git a/parfait-spring/src/main/java/com/custardsource/parfait/spring/SelfStartingMonitoringView.java b/parfait-spring/src/main/java/com/custardsource/parfait/spring/SelfStartingMonitoringView.java
index <HASH>..<HASH> 100644
--- a/parfait-spring/src/main/java/com/custardsource/parfait/spring/SelfStartingMonitoringView.java
+++ b/parfait-spring/src/main/java/com/custardsource/parfait/spring/SelfStartingMonitoringView.java
@@ -31,6 +31,10 @@ public class SelfStartingMonitoringView implements Lifecycle {
this(MonitorableRegistry.DEFAULT_REGISTRY, monitoringView, quietPeriodInMillis);
}
+ public SelfStartingMonitoringView(MonitorableRegistry registry, MonitoringView monitoringView) {
+ this(registry, monitoringView, DEFAULT_QUIET_PERIOD);
+ }
+
public SelfStartingMonitoringView(MonitorableRegistry registry, MonitoringView monitoringView, final long quietPeriodInMillis) {
this.monitoringView = monitoringView;
this.monitorableRegistry = registry;
@@ -63,4 +67,8 @@ public class SelfStartingMonitoringView implements Lifecycle {
public boolean isRunning() {
return monitoringView.isRunning();
}
+
+ public static final long defaultQuietPeriod() {
+ return DEFAULT_QUIET_PERIOD;
+ }
}
|
Add new constructor that just provides standard default quiescent period, but also provide a static method to return the default period for static import, and Spring config file usage goodness.
|
diff --git a/src/commands/run.js b/src/commands/run.js
index <HASH>..<HASH> 100644
--- a/src/commands/run.js
+++ b/src/commands/run.js
@@ -36,7 +36,7 @@ async function startIPFS () {
Please install it by going to https://ipfs.io/docs/install`)
}
- return exec('ipfs', ['daemon'])
+ return execa('ipfs', ['daemon'])
}
function getContract (pkg, contract) {
|
Fix IPFS daemon spawning
|
diff --git a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/fi/iki/elonen/NanoHTTPD.java
+++ b/core/src/main/java/fi/iki/elonen/NanoHTTPD.java
@@ -1102,9 +1102,12 @@ public abstract class NanoHTTPD {
FORBIDDEN(403, "Forbidden"),
NOT_FOUND(404, "Not Found"),
METHOD_NOT_ALLOWED(405, "Method Not Allowed"),
+ NOT_ACCEPTABLE(406, "Not Acceptable"),
REQUEST_TIMEOUT(408, "Request Timeout"),
+ CONFLICT(409, "Conflict"),
RANGE_NOT_SATISFIABLE(416, "Requested Range Not Satisfiable"),
INTERNAL_ERROR(500, "Internal Server Error"),
+ NOT_IMPLEMENTED(501, "Not Implemented"),
UNSUPPORTED_HTTP_VERSION(505, "HTTP Version Not Supported");
private final int requestStatus;
|
Added some HTTP status codes. Closes #<I>
|
diff --git a/lib/metro/models/properties/animation_property.rb b/lib/metro/models/properties/animation_property.rb
index <HASH>..<HASH> 100644
--- a/lib/metro/models/properties/animation_property.rb
+++ b/lib/metro/models/properties/animation_property.rb
@@ -27,7 +27,7 @@ module Metro
#
# class Hero < Metro::Model
# property :animation, path: "star.png", dimensions: Dimensions.of(25,25)
- # dimensions: Metro::Dimensions.of(25,25) }
+ # dimensions: Dimensions.of(25,25) }
#
# def draw
# animation.image.draw text, x, y, z_order, x_factor, y_factor, color
@@ -38,7 +38,7 @@ module Metro
#
# class Hero < Metro::Model
# property :walking, type: :animation, path: "star.png",
- # dimensions: Metro::Dimensions.of(25,25)
+ # dimensions: Dimensions.of(25,25)
#
# def draw
# walking.image.draw text, x, y, z_order, x_factor, y_factor, color
|
Updated animation property doc for correct use of units
|
diff --git a/dashboard_app/helpers.py b/dashboard_app/helpers.py
index <HASH>..<HASH> 100644
--- a/dashboard_app/helpers.py
+++ b/dashboard_app/helpers.py
@@ -21,8 +21,9 @@ class DocumentError(ValueError):
"""
Document error is raised when JSON document is malformed in any way
"""
- def __init__(self, msg):
+ def __init__(self, msg, cause=None):
super(DocumentError, self).__init__(msg)
+ self.cause = cause
class BundleDeserializer(object):
@@ -51,7 +52,7 @@ class BundleDeserializer(object):
parse_float=decimal.Decimal)
except Exception as ex:
raise DocumentError(
- "Unable to load document: {0}".format(ex))
+ "Unable to load document: {0}".format(ex), ex)
def memory_model_to_db_model(self, c_bundle):
"""
|
Add ability to chain exceptions to DocumentError
|
diff --git a/hooker/__main__.py b/hooker/__main__.py
index <HASH>..<HASH> 100644
--- a/hooker/__main__.py
+++ b/hooker/__main__.py
@@ -5,7 +5,10 @@ from .api import EVENTS
for arg in sys.argv[1:]:
try:
- importlib.import_module(arg)
+ if arg[-3:] == ".py":
+ importlib.import_module(arg[:-3])
+ else:
+ importlib.import_module(arg)
except ModuleNotFoundError:
exec(open(arg).read())
|
[main] Worked around the .py arguments
|
diff --git a/salt/utils/error.py b/salt/utils/error.py
index <HASH>..<HASH> 100644
--- a/salt/utils/error.py
+++ b/salt/utils/error.py
@@ -6,8 +6,10 @@ Utilities to enable exception reraising across the master commands
from __future__ import absolute_import
# Import python libs
-import exceptions
-
+try:
+ import exceptions
+except ImportError:
+ pass
# Import salt libs
import salt.exceptions
|
Checking if exceptions module can be imported as it's removed from Python3
|
diff --git a/get-poetry.py b/get-poetry.py
index <HASH>..<HASH> 100644
--- a/get-poetry.py
+++ b/get-poetry.py
@@ -197,7 +197,7 @@ class Installer:
dist = os.path.join(dir, 'dist')
print(' - Getting dependencies')
self.call(
- 'pip', 'install', 'poetry=={}'.format(version),
+ 'python', '-m', 'pip', 'install', 'poetry=={}'.format(version),
'--target', dist
)
@@ -243,7 +243,7 @@ class Installer:
)
self.call(
- 'pip', 'install',
+ 'python', '-m', 'pip', 'install',
'--upgrade',
'--no-deps',
os.path.join(dir, 'poetry-{}-{}.whl'.format(version, tag))
|
Update get-poetry.py script
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,7 @@ setup(
'ginga.web', 'ginga.web.pgw',
'ginga.web.pgw.js', 'ginga.web.pgw.templates',
# Common stuff
- 'ginga.misc', 'ginga.misc.plugins', 'ginga.base',
+ 'ginga.misc', 'ginga.misc.plugins',
'ginga.canvas', 'ginga.canvas.types', 'ginga.util',
# Misc
'ginga.icons', 'ginga.doc', 'ginga.tests',
|
Modified setup.py to remove 'base' directory from install
|
diff --git a/cli.js b/cli.js
index <HASH>..<HASH> 100755
--- a/cli.js
+++ b/cli.js
@@ -42,7 +42,7 @@ CLI.prototype.run = function () {
// There was no help options, get IP using canihazip and output it to stdout.
else {
var canihazip = require('./');
- return canihazip(console.log);
+ return canihazip().then(console.log);
}
};
|
use promise.then rather than callback in cli.js
|
diff --git a/lib/ehon/version.rb b/lib/ehon/version.rb
index <HASH>..<HASH> 100644
--- a/lib/ehon/version.rb
+++ b/lib/ehon/version.rb
@@ -1,3 +1,3 @@
module Ehon
- VERSION = "0.0.1"
+ VERSION = "0.1.0"
end
|
bumped up version <I>
|
diff --git a/lib/autowow/commands/vcs.rb b/lib/autowow/commands/vcs.rb
index <HASH>..<HASH> 100644
--- a/lib/autowow/commands/vcs.rb
+++ b/lib/autowow/commands/vcs.rb
@@ -93,6 +93,11 @@ module Autowow
cmd + ["reset", "--hard", branch]
end
+ # Doesn't work on Windows
+ def current_branch_remote
+ cmd + ["rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{u}"]
+ end
+
include ReflectionUtils::CreateModuleFunctions
end
end
|
Adds command to check for branch remote
|
diff --git a/pkg/minikube/sysinit/systemd.go b/pkg/minikube/sysinit/systemd.go
index <HASH>..<HASH> 100644
--- a/pkg/minikube/sysinit/systemd.go
+++ b/pkg/minikube/sysinit/systemd.go
@@ -18,6 +18,7 @@ limitations under the License.
package sysinit
import (
+ "errors"
"os/exec"
"k8s.io/minikube/pkg/minikube/assets"
@@ -53,6 +54,9 @@ func (s *Systemd) Disable(svc string) error {
// Enable enables a service
func (s *Systemd) Enable(svc string) error {
+ if svc == "kubelet" {
+ return errors.New("please don't enable kubelet as it creates a race condition; if it starts on systemd boot it will pick up /etc/hosts before we have time to configure /etc/hosts")
+ }
_, err := s.r.RunCmd(exec.Command("sudo", "systemctl", "enable", svc))
return err
}
|
make it impossible to enable the kubelet service
|
diff --git a/lib/jp_prefecture/prefecture.rb b/lib/jp_prefecture/prefecture.rb
index <HASH>..<HASH> 100644
--- a/lib/jp_prefecture/prefecture.rb
+++ b/lib/jp_prefecture/prefecture.rb
@@ -115,6 +115,9 @@ module JpPrefecture
# @return [Integer] 見つかった場合は都道府県コード
# @return [nil] 見つからない場合は nil
def self.find_code_by_name(name)
+ # nameがnil、空文字の場合は見つからないと判断してnilを返す。
+ return nil if name.nil? || name.empty?
+
name = name.downcase
Mapping.data.each do |m|
|
Appdend gurd to JpPrefecture::Prefecture.find_code_by_name.
|
diff --git a/core/common/src/test/java/alluxio/security/authorization/ModeBitsTest.java b/core/common/src/test/java/alluxio/security/authorization/ModeBitsTest.java
index <HASH>..<HASH> 100644
--- a/core/common/src/test/java/alluxio/security/authorization/ModeBitsTest.java
+++ b/core/common/src/test/java/alluxio/security/authorization/ModeBitsTest.java
@@ -10,6 +10,7 @@
*/
package alluxio.security.authorization;
+
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
|
Update ModeBitsTest.java
|
diff --git a/cdm/src/main/java/ucar/nc2/NetcdfFileWriter.java b/cdm/src/main/java/ucar/nc2/NetcdfFileWriter.java
index <HASH>..<HASH> 100644
--- a/cdm/src/main/java/ucar/nc2/NetcdfFileWriter.java
+++ b/cdm/src/main/java/ucar/nc2/NetcdfFileWriter.java
@@ -469,7 +469,7 @@ public class NetcdfFileWriter {
shortName = makeValidObjectName(shortName);
if (!isValidDataType(dataType))
- throw new IllegalArgumentException("illegal dataType: "+dataType);
+ throw new IllegalArgumentException("illegal dataType: "+dataType+" not supported in netcdf-3");
// check unlimited if netcdf-3
if (!version.isNetdf4format()) {
|
made nicer error message when illegal datatypes encountered trying to write netcdf-3
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -29,8 +29,8 @@ setup(
description = "a modern parsing library",
license = "MIT",
keywords = "Earley LALR parser parsing ast",
- url = "https://github.com/erezsh/lark",
- download_url = "https://github.com/erezsh/lark/tarball/master",
+ url = "https://github.com/lark-parser/lark",
+ download_url = "https://github.com/lark-parser/lark/tarball/master",
long_description='''
Lark is a modern general-purpose parsing library for Python.
|
Update links in pypi (Issue #<I>)
|
diff --git a/Kwf/Assets/CommonJs/Underscore/TemplateProvider.php b/Kwf/Assets/CommonJs/Underscore/TemplateProvider.php
index <HASH>..<HASH> 100644
--- a/Kwf/Assets/CommonJs/Underscore/TemplateProvider.php
+++ b/Kwf/Assets/CommonJs/Underscore/TemplateProvider.php
@@ -11,7 +11,7 @@ class Kwf_Assets_CommonJs_Underscore_TemplateProvider extends Kwf_Assets_Provide
'underscore'
);
- if (file_exists(substr($ret->getAbsoluteFileName(), 0, -15) . '.scss')) {
+ if (file_exists(substr($ret->getAbsoluteFileName(), 0, -15) . '.scss') && substr($ret->getFileNameWithType(), 0, 13) != 'web/commonjs/') {
$ret->addDependency(
Kwf_Assets_Dependency_Abstract::DEPENDENCY_TYPE_REQUIRES,
new Kwf_Assets_Dependency_File_Scss($this->_providerList, substr($dependencyName, 0, -15) . '.scss')
|
Fix scss files getting included twice in commonjs when using underscore.tpl
|
diff --git a/commons/util/src/main/java/net/automatalib/commons/util/mappings/Mapping.java b/commons/util/src/main/java/net/automatalib/commons/util/mappings/Mapping.java
index <HASH>..<HASH> 100644
--- a/commons/util/src/main/java/net/automatalib/commons/util/mappings/Mapping.java
+++ b/commons/util/src/main/java/net/automatalib/commons/util/mappings/Mapping.java
@@ -36,6 +36,11 @@ import java.util.function.Function;
@FunctionalInterface
public interface Mapping<D, R> extends Function<D, R> {
+ @Override
+ default R apply(D elem) {
+ return get(elem);
+ }
+
/**
* Get the range object <code>elem</code> maps to.
*
@@ -44,10 +49,5 @@ public interface Mapping<D, R> extends Function<D, R> {
*
* @return the object from the range corresponding to <code>elem</code>.
*/
- @Override
- default R apply(D elem) {
- return get(elem);
- }
-
R get(D elem);
}
|
Mapping: move doc to correct method
|
diff --git a/pingparsing/cli.py b/pingparsing/cli.py
index <HASH>..<HASH> 100644
--- a/pingparsing/cli.py
+++ b/pingparsing/cli.py
@@ -22,7 +22,9 @@ QUIET_LOG_LEVEL = logbook.NOTSET
def parse_option():
- parser = argparse.ArgumentParser()
+ parser = argparse.ArgumentParser(
+ epilog="Issue tracker: https://github.com/thombashi/pingparsing/issues")
+
if is_use_stdin():
parser.add_argument(
"destination_or_file", nargs="+",
|
Add issue tracker description to pingparsing command
|
diff --git a/elasticmock/fake_elasticsearch.py b/elasticmock/fake_elasticsearch.py
index <HASH>..<HASH> 100644
--- a/elasticmock/fake_elasticsearch.py
+++ b/elasticmock/fake_elasticsearch.py
@@ -336,7 +336,7 @@ class FakeElasticsearch(Elasticsearch):
i = 0
for searchable_index in searchable_indexes:
for document in self.__documents_dict[searchable_index]:
- if doc_type is not None and document.get('_type') != doc_type:
+ if doc_type and document.get('_type') != doc_type:
continue
i += 1
result = {
diff --git a/tests/fake_elasticsearch/test_count.py b/tests/fake_elasticsearch/test_count.py
index <HASH>..<HASH> 100644
--- a/tests/fake_elasticsearch/test_count.py
+++ b/tests/fake_elasticsearch/test_count.py
@@ -20,3 +20,8 @@ class TestCount(TestElasticmock):
result = self.es.count(index=['users', 'pcs'])
self.assertEqual(2, result.get('count'))
+
+ def test_should_count_with_empty_doc_types(self):
+ self.es.index(index='index', doc_type=DOC_TYPE, body={'data': 'test'})
+ count = self.es.count(doc_type=[])
+ self.assertEqual(1, count.get('count'))
|
Fixed count not working with empty doc_type list
This will help support Elasticsearch-dsl, which uses doc_type=[] (acceptable by elasticsearch client)
|
diff --git a/Branch-SDK/src/io/branch/referral/SystemObserver.java b/Branch-SDK/src/io/branch/referral/SystemObserver.java
index <HASH>..<HASH> 100644
--- a/Branch-SDK/src/io/branch/referral/SystemObserver.java
+++ b/Branch-SDK/src/io/branch/referral/SystemObserver.java
@@ -227,7 +227,8 @@ public class SystemObserver {
if ((appInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 1) {
JSONObject packObj = new JSONObject();
try {
- String label = appInfo.loadLabel(pm).toString();
+ CharSequence labelCs = appInfo.loadLabel(pm);
+ String label = labelCs == null ? null : labelCs.toString();
if (label != null)
packObj.put("name", label);
String packName = appInfo.packageName;
|
A charsequence.toString() is never null
Modified this code so it still reflects the old test. However,
appInfo.loadLabel(pm) will (currently) not be able to return a null
value, as the name or packagename is returned if the label is null. That
said, a manufacturer could break this function.
Charsequence#toString on a null value raises a NullPointerException
|
diff --git a/topology/probes/lldp/lldp.go b/topology/probes/lldp/lldp.go
index <HASH>..<HASH> 100644
--- a/topology/probes/lldp/lldp.go
+++ b/topology/probes/lldp/lldp.go
@@ -344,7 +344,10 @@ func (p *Probe) getOrCreate(id graph.Identifier, m graph.Metadata) *graph.Node {
// - when the interface is listed in the configuration file or we are in auto discovery mode
func (p *Probe) handleNode(n *graph.Node) {
firstLayerType, _ := probes.GoPacketFirstLayerType(n)
- mac, _ := n.GetFieldString("MAC")
+ mac, _ := n.GetFieldString("BondSlave.PermMAC")
+ if mac == "" {
+ mac, _ = n.GetFieldString("MAC")
+ }
name, _ := n.GetFieldString("Name")
if name != "" && mac != "" && firstLayerType == layers.LayerTypeEthernet {
|
lldp: use permanent mac address instead of mac if present
|
diff --git a/upload/system/library/cache.php b/upload/system/library/cache.php
index <HASH>..<HASH> 100644
--- a/upload/system/library/cache.php
+++ b/upload/system/library/cache.php
@@ -10,7 +10,7 @@ class Cache {
$class = 'Cache'. $driver;
- $this->cache=new $class($expire);
+ $this->cache = new $class($expire);
} else {
exit('Error: Could not load cache driver ' . $driver . ' cache!');
}
@@ -28,4 +28,3 @@ class Cache {
return $this->cache->delete($key);
}
}
-?>
\ No newline at end of file
|
added spaces ( = ) and removed ?>
|
diff --git a/tasklib/backends.py b/tasklib/backends.py
index <HASH>..<HASH> 100644
--- a/tasklib/backends.py
+++ b/tasklib/backends.py
@@ -155,7 +155,7 @@ class TaskWarrior(object):
else:
escaped_serialized_value = six.u("'{0}'").format(serialized_value)
- format_default = lambda: six.u("{0}:{1}").format(field,
+ format_default = lambda task: six.u("{0}:{1}").format(field,
escaped_serialized_value)
format_func = getattr(self, 'format_{0}'.format(field),
|
TaskWarrior: Default formatter needs to take an argument
|
diff --git a/libraries/commerce/scanner/constants/index.js b/libraries/commerce/scanner/constants/index.js
index <HASH>..<HASH> 100644
--- a/libraries/commerce/scanner/constants/index.js
+++ b/libraries/commerce/scanner/constants/index.js
@@ -28,6 +28,7 @@ export const SCANNER_FORMATS_BARCODE = [
'CODE_128',
'PDF_417',
'ITF',
+ 'DATA_MATRIX',
];
export const SCANNER_FORMATS_QR_CODE = ['QR_CODE'];
|
CCP-<I> added DATA_MATRIX support for scanner
|
diff --git a/pkg/tsdb/cloudwatch/metric_find_query.go b/pkg/tsdb/cloudwatch/metric_find_query.go
index <HASH>..<HASH> 100644
--- a/pkg/tsdb/cloudwatch/metric_find_query.go
+++ b/pkg/tsdb/cloudwatch/metric_find_query.go
@@ -162,7 +162,7 @@ func init() {
"AWS/IoT": {"ActionType", "BehaviorName", "CheckName", "JobId", "Protocol", "RuleName", "ScheduledAuditName", "SecurityProfileName"},
"AWS/IoTAnalytics": {"ActionType", "ChannelName", "DatasetName", "DatastoreName", "PipelineActivityName", "PipelineActivityType", "PipelineName"},
"AWS/KMS": {"KeyId"},
- "AWS/Kafka": {"Broker", "Cluster", "Topic"},
+ "AWS/Kafka": {"Broker ID", "Cluster Name", "Topic"},
"AWS/Kinesis": {"ShardId", "StreamName"},
"AWS/KinesisAnalytics": {"Application", "Flow", "Id"},
"AWS/KinesisVideo": {},
|
fix: modifying AWS Kafka dimension names to correct ones (#<I>)
|
diff --git a/django_afip/admin.py b/django_afip/admin.py
index <HASH>..<HASH> 100644
--- a/django_afip/admin.py
+++ b/django_afip/admin.py
@@ -99,6 +99,7 @@ class ReceiptAdmin(admin.ModelAdmin):
)
return
+ queryset = queryset.filter(batch__isnull=False)
models.ReceiptBatch.objects.create(queryset)
create_batch.short_description = _('Create receipt batch')
|
Don't change the batch of a receipt when mass-editing
|
diff --git a/src/xterm.js b/src/xterm.js
index <HASH>..<HASH> 100644
--- a/src/xterm.js
+++ b/src/xterm.js
@@ -1118,6 +1118,11 @@ Terminal.prototype.refresh = function(start, end) {
}
};
+/**
+ * Queues linkification for the specified rows.
+ * @param {number} start The row to start from (between 0 and this.rows - 1).
+ * @param {number} end The row to end at (between start and this.rows - 1).
+ */
Terminal.prototype.queueLinkification = function(start, end) {
if (this.linkifier) {
for (let i = start; i <= end; i++) {
|
Add jsdoc back, was lost in merge
|
diff --git a/includes/version.php b/includes/version.php
index <HASH>..<HASH> 100644
--- a/includes/version.php
+++ b/includes/version.php
@@ -3,7 +3,7 @@
* YOURLS version
*
*/
-define( 'YOURLS_VERSION', '1.7.1' );
+define( 'YOURLS_VERSION', '1.7.2' );
/**
* YOURLS DB version. Increments when changes are made to the DB schema, to trigger a DB update
|
Prepare potential next bugfix release
Next dot release stuff should get committed in their own branch
|
diff --git a/src/components/slider/index.js b/src/components/slider/index.js
index <HASH>..<HASH> 100644
--- a/src/components/slider/index.js
+++ b/src/components/slider/index.js
@@ -121,6 +121,8 @@ export default class Slider extends PureBaseComponent {
this.initialThumbSize = THUMB_SIZE;
this.checkProps(props);
+
+ this.createPanResponderConfig();
}
checkProps(props) {
@@ -132,7 +134,7 @@ export default class Slider extends PureBaseComponent {
}
}
- UNSAFE_componentWillMount() {
+ createPanResponderConfig() {
this._panResponder = PanResponder.create({
onMoveShouldSetPanResponder: this.handleMoveShouldSetPanResponder,
onPanResponderGrant: this.handlePanResponderGrant,
|
moving componentWillMount code to c'tor (#<I>)
|
diff --git a/karyon2-admin/src/main/java/netflix/adminresources/AdminResourcesContainer.java b/karyon2-admin/src/main/java/netflix/adminresources/AdminResourcesContainer.java
index <HASH>..<HASH> 100644
--- a/karyon2-admin/src/main/java/netflix/adminresources/AdminResourcesContainer.java
+++ b/karyon2-admin/src/main/java/netflix/adminresources/AdminResourcesContainer.java
@@ -99,6 +99,16 @@ public class AdminResourcesContainer {
private AtomicBoolean alreadyInited = new AtomicBoolean(false);
private int serverPort; // actual server listen port (apart from what's in Config)
+ @Inject
+ public AdminResourcesContainer() {}
+
+ public AdminResourcesContainer(Injector appInjector, AdminContainerConfig adminContainerConfig,
+ AdminPageRegistry adminPageRegistry) {
+ this.appInjector = appInjector;
+ this.adminContainerConfig = adminContainerConfig;
+ this.adminPageRegistry = adminPageRegistry;
+ }
+
/**
* Starts the container and hence the embedded jetty server.
*
|
create constructor for AdminResourcesContainer for use outside of guice
|
diff --git a/instaLooter.py b/instaLooter.py
index <HASH>..<HASH> 100644
--- a/instaLooter.py
+++ b/instaLooter.py
@@ -32,7 +32,7 @@ try:
import lxml
PARSER = 'lxml'
except ImportError:
- PARSER = 'html'
+ PARSER = 'html.parser'
class InstaDownloader(threading.Thread):
|
Fix parser naming for BeautifulSoup
|
diff --git a/clientv3/client.go b/clientv3/client.go
index <HASH>..<HASH> 100644
--- a/clientv3/client.go
+++ b/clientv3/client.go
@@ -86,6 +86,7 @@ func NewFromConfigFile(path string) (*Client, error) {
// Close shuts down the client's etcd connections.
func (c *Client) Close() error {
c.cancel()
+ c.Watcher.Close()
return toErr(c.ctx, c.conn.Close())
}
diff --git a/clientv3/watch.go b/clientv3/watch.go
index <HASH>..<HASH> 100644
--- a/clientv3/watch.go
+++ b/clientv3/watch.go
@@ -396,15 +396,17 @@ func (w *watchGrpcStream) run() {
for _, ws := range w.substreams {
if _, ok := closing[ws]; !ok {
close(ws.recvc)
+ closing[ws] = struct{}{}
}
}
for _, ws := range w.resuming {
if _, ok := closing[ws]; ws != nil && !ok {
close(ws.recvc)
+ closing[ws] = struct{}{}
}
}
w.joinSubstreams()
- for toClose := len(w.substreams) + len(w.resuming); toClose > 0; toClose-- {
+ for range closing {
w.closeSubstream(<-w.closingc)
}
|
clientv3: only receive from closing streams in Watcher close
Was overcounting the number of expected closing messages; the resuming
list may have nil entries. Also the full client wasn't closing the watcher
client, only canceling its context, so client closes weren't joining with
the watcher shutdown.
Fixes #<I>
|
diff --git a/lib/bud/collections.rb b/lib/bud/collections.rb
index <HASH>..<HASH> 100644
--- a/lib/bud/collections.rb
+++ b/lib/bud/collections.rb
@@ -490,7 +490,6 @@ module Bud
end
end
- require 'ruby-debug'; debugger if finals.length == 0 and agg_in.length > 0
if block_given?
finals.map{|r| yield r}
else
|
remove stray debugging statement
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -5,8 +5,6 @@ try:
from setuptools import setup, Command, find_packages
except ImportError:
from distutils.core import setup
-import pip
-from pip.req import parse_requirements
class PyTest(Command):
|
removed unused imports from setup.py
|
diff --git a/tests/plugins/test_flatpak_create_oci.py b/tests/plugins/test_flatpak_create_oci.py
index <HASH>..<HASH> 100644
--- a/tests/plugins/test_flatpak_create_oci.py
+++ b/tests/plugins/test_flatpak_create_oci.py
@@ -474,7 +474,8 @@ COMMAND_PATTERNS = [
(['flatpak', 'build-bundle', '@repo',
'--oci', '@filename', '@name', '@branch'],
MockFlatpak.build_bundle),
- (['flatpak', 'build-export', '@repo', '@directory', '@branch'],
+ # For build-export, we assume the latest flatpak version for flatpak_module_tools compatibility
+ (['flatpak', 'build-export', '@repo', '@directory', '@branch', '--disable-sandbox'],
MockFlatpak.build_export),
(['flatpak', 'build-finish', '--command', '@command'] +
FLATPAK_APP_FINISH_ARGS + ['@directory'],
|
Comply with latest Flatpak changes
flatpak-module-tools can now handle disabling Flatpak sandboxing when
checking icons, which is needed to run atomic-reactor in a container for
Flatpak >= <I>. For that, we assume Flatpak >= <I> if flatpak is
mocked.
|
diff --git a/json_span.go b/json_span.go
index <HASH>..<HASH> 100644
--- a/json_span.go
+++ b/json_span.go
@@ -124,7 +124,8 @@ func newW3CForeignParent(trCtx w3ctrace.Context) *ForeignParent {
// Span represents the OpenTracing span document to be sent to the agent
type Span struct {
- TraceID int64 `json:"t"`
+ TraceID int64 `json:"-"`
+ TraceID128 string `json:"t"`
ParentID int64 `json:"p,omitempty"`
SpanID int64 `json:"s"`
Timestamp uint64 `json:"ts"`
@@ -145,6 +146,7 @@ func newSpan(span *spanS) Span {
data := RegisteredSpanType(span.Operation).ExtractData(span)
sp := Span{
TraceID: span.context.TraceID,
+ TraceID128: FormatLongID(span.context.TraceIDHi, span.context.TraceID),
ParentID: span.context.ParentID,
SpanID: span.context.SpanID,
Timestamp: uint64(span.Start.UnixNano()) / uint64(time.Millisecond),
|
Send <I>-bit trace IDs to the agent
|
diff --git a/lib/app.js b/lib/app.js
index <HASH>..<HASH> 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -189,6 +189,7 @@ if (require.main === module) {
config.load(argv._[0])
.then((cfg) => {
exports.log(`Loaded configuration file: ${argv._[0]}`);
+ process.chdir(config.basePath);
return cfg;
})
.then((cfg) => {
|
chdir to the directory containing the config file on startup
fixed #<I>
|
diff --git a/system/Model.php b/system/Model.php
index <HASH>..<HASH> 100644
--- a/system/Model.php
+++ b/system/Model.php
@@ -1129,7 +1129,7 @@ class Model
*
* @return array|null
*/
- public function paginate(int $perPage = null, string $group = 'default', int $page = 0)
+ public function paginate(int $perPage = null, string $group = 'default', int $page = 0, int $segment = 0)
{
$pager = \Config\Services::pager(null, null, false);
$page = $page >= 1 ? $page : $pager->getCurrentPage($group);
@@ -1138,7 +1138,7 @@ class Model
// Store it in the Pager library so it can be
// paginated in the views.
- $this->pager = $pager->store($group, $page, $perPage, $total);
+ $this->pager = $pager->store($group, $page, $perPage, $total,$segment);
$perPage = $this->pager->getPerPage($group);
$offset = ($page - 1) * $perPage;
|
add $segment option in pager call by Model.php
add the $segment option when the Pager library is call by the model paginate function
|
diff --git a/Kwf_js/EyeCandy/Lightbox/Lightbox.js b/Kwf_js/EyeCandy/Lightbox/Lightbox.js
index <HASH>..<HASH> 100644
--- a/Kwf_js/EyeCandy/Lightbox/Lightbox.js
+++ b/Kwf_js/EyeCandy/Lightbox/Lightbox.js
@@ -417,7 +417,7 @@ Lightbox.prototype = {
var closeLightbox = (function() {
//didn't change yet, wait a bit longer
if (previousEntries == historyState.entries) {
- closeLightbox.defer(10, this);
+ setTimeout(closeLightbox.bind(this), 10);
return;
}
//check if there is still a lightbox open
@@ -425,13 +425,13 @@ Lightbox.prototype = {
if (historyState.currentState.lightbox) {
previousEntries = historyState.entries;
history.back();
- closeLightbox.defer(1, this);
+ setTimeout(closeLightbox.bind(this), 1);
} else {
//last entry in history that had lightbox open
onlyCloseOnPopstate = false;
}
});
- closeLightbox.defer(1, this);
+ setTimeout(closeLightbox.bind(this), 1);
} else {
delete historyState.currentState.lightbox;
historyState.replaceState(document.title, this.closeHref);
|
change the defer() to setTimeout()
defer() is a ext function, but ext is not longer in koala-frontend. Instead of defer() we use simple setTimeout() now.
|
diff --git a/slither/tools/upgradeability/compare_function_ids.py b/slither/tools/upgradeability/compare_function_ids.py
index <HASH>..<HASH> 100644
--- a/slither/tools/upgradeability/compare_function_ids.py
+++ b/slither/tools/upgradeability/compare_function_ids.py
@@ -12,7 +12,8 @@ logger = logging.getLogger("Slither-check-upgradeability")
def get_signatures(c):
functions = c.functions
- functions = [f.full_name for f in functions if f.visibility in ['public', 'external'] and not f.is_constructor]
+ functions = [f.full_name for f in functions if f.visibility in ['public', 'external'] and
+ not f.is_constructor and not f.is_fallback]
variables = c.state_variables
variables = [variable.name+ '()' for variable in variables if variable.visibility in ['public']]
|
upgradeability check: remove FP in case of fallback function collision (fix #<I>)
|
diff --git a/kafka_consumer/check.py b/kafka_consumer/check.py
index <HASH>..<HASH> 100644
--- a/kafka_consumer/check.py
+++ b/kafka_consumer/check.py
@@ -30,7 +30,7 @@ DEFAULT_KAFKA_TIMEOUT = 5
DEFAULT_ZK_TIMEOUT = 5
DEFAULT_KAFKA_RETRIES = 3
-CONTEXT_UPPER_BOUND = 100
+CONTEXT_UPPER_BOUND = 200
class BadKafkaConsumerConfiguration(Exception):
|
[kafka_consumer] bumping up context limit upper bound.
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -77,10 +77,6 @@ DynamoDBDOWN.prototype._open = function (options, cb) {
}
}
-DynamoDBDOWN.prototype._close = function (cb) {
- cb()
-}
-
DynamoDBDOWN.prototype._put = function (key, value, options, cb) {
const params = {
TableName: this.encodedTableName,
|
refactor: use abstract implementation of `_close`
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -137,7 +137,8 @@ pygments_style = 'sphinx'
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
-html_theme = 'default'
+# html_theme = 'default'
+html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
|
changed to alabaster theme for a while
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.