text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto">It happened somewhere in <a class="commit-link" href="https://github.com/atom/atom/compare/v0.137.0...v0.138.0"><tt>v0.137.0...v0.138.0</tt></a></p>
<p dir="auto">The Atom appmenu / global menu no longer works with Atom 0.137.0 in Ubuntu 14.10 (with Unity): <a href="http://i.imgur.com/1TSYnD5.png" rel="nofollow">http://i.imgur.com/1TSYnD5.png</a></p> <p dir="auto">It used to work up until this version and also, Ubuntu 14.10 seems to be the only one affected as I've tested it in Ubuntu 14.04 and it still works there.</p> <p dir="auto">Tested with both the Atom deb downloaded from GitHub and with Atom from the WebUpd8 Atom PPA.</p>
1
<p dir="auto">Cross-build binaries under directory <code class="notranslate">test/images</code>,<br> <a href="https://github.com/kubernetes/kubernetes/tree/master/test/images">https://github.com/kubernetes/kubernetes/tree/master/test/images</a></p> <p dir="auto">TODO LIST:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> clusterapi-tester</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> dnsutils</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> entrypoint-tester</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> fakegitserver</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> goproxy</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> hostexec</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iperf</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> jessie-dnsutils</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> mount-tester</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> mount-tester-user</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> n-way-http</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> netexec</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> network-tester</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> pets</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> port-forward-tester</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> porter</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> resource-consumer</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> serve_hostname</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> volumes-tester</li> </ul> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/luxas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/luxas">@luxas</a> I agree with you that we should get the Makefiles somehow standardized. I would like to do some help.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/AlexMioMio/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/AlexMioMio">@AlexMioMio</a></p>
<p dir="auto"><em>TL;DR - Add more release versions to gcr.io/google_containers/ and tag by version</em></p> <p dir="auto">Currently, the kube-apiserver.yaml linked to in the in the 1.1 version of the docs for High Availability (<a href="http://kubernetes.io/v1.1/docs/admin/high-availability.html" rel="nofollow">http://kubernetes.io/v1.1/docs/admin/high-availability.html</a>) refers to:<br> <code class="notranslate">image: gcr.io/google_containers/kube-apiserver:9680e782e08a1a1c94c656190011bd02</code></p> <p dir="auto">This image tag has kube-apiserver version 0.18.0. When I tried to get version 1.1.3 (the version we are running / looking to replace with a containerized version) I realized this was the only image that exists.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~$ curl -k -s -X GET https://gcr.io/v2/google_containers/kube-apiserver/tags/list | jq -r '.tags[]' 9680e782e08a1a1c94c656190011bd02"><pre class="notranslate"><code class="notranslate">~$ curl -k -s -X GET https://gcr.io/v2/google_containers/kube-apiserver/tags/list | jq -r '.tags[]' 9680e782e08a1a1c94c656190011bd02 </code></pre></div> <p dir="auto">The main issue here is that there is only a single version available for the apiserver. This is also the case for the kube-controller-manager, kube-scheduler, and podmaster.</p> <p dir="auto">There are multiple versions of etcd but there isn't a standardized pattern as 2.0.3 is preceded by a 'v' and the rest are not:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~$ curl -k -s -X GET https://gcr.io/v2/google_containers/etcd/tags/list | jq -r '.tags[]' 2.0.12 2.0.13 2.0.8 2.0.9 2.0.9.1 2.1.0-alpha.0 2.2.1 v2.0.3"><pre class="notranslate"><code class="notranslate">~$ curl -k -s -X GET https://gcr.io/v2/google_containers/etcd/tags/list | jq -r '.tags[]' 2.0.12 2.0.13 2.0.8 2.0.9 2.0.9.1 2.1.0-alpha.0 2.2.1 v2.0.3 </code></pre></div> <p dir="auto">A further improvement would be to tag each image with just a version number.</p>
0
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li>[ x] I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li>[x ] I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li>[x ] I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <ul dir="auto"> <li>None</li> </ul> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>:</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="software -&gt; celery:4.4.2 (cliffs) kombu:4.6.8 py:3.7.5 billiard:3.6.3.0 py-amqp:2.5.2 platform -&gt; system:Darwin arch:64bit kernel version:18.7.0 imp:CPython loader -&gt; celery.loaders.default.Loader settings -&gt; transport:amqp results:disabled"><pre class="notranslate"><code class="notranslate">software -&gt; celery:4.4.2 (cliffs) kombu:4.6.8 py:3.7.5 billiard:3.6.3.0 py-amqp:2.5.2 platform -&gt; system:Darwin arch:64bit kernel version:18.7.0 imp:CPython loader -&gt; celery.loaders.default.Loader settings -&gt; transport:amqp results:disabled </code></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: N/A or Unknown</li> <li><strong>Minimal Celery Version</strong>: N/A or Unknown</li> <li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li> <li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> </p><div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Backend: file system<br> steriliser: pickle</p> <p dir="auto">Scenario: Define a group and retrieve the result, for instance, group([add.s(1,2), add.s(3,4)])().get()<br> This should give the correct result of two adding calculation</p> <h1 dir="auto">Actual Behavior</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ venv3/lib/python3.7/site-packages/celery/result.py:229: in get on_message=on_message, venv3/lib/python3.7/site-packages/celery/backends/base.py:579: in wait_for_pending no_ack=no_ack, venv3/lib/python3.7/site-packages/celery/backends/base.py:606: in wait_for meta = self.get_task_meta(task_id) venv3/lib/python3.7/site-packages/celery/backends/base.py:457: in get_task_meta meta = self._get_task_meta_for(task_id) venv3/lib/python3.7/site-packages/celery/backends/base.py:791: in _get_task_meta_for return self.decode_result(meta) venv3/lib/python3.7/site-packages/celery/backends/base.py:322: in decode_result return self.meta_from_decoded(self.decode(payload)) venv3/lib/python3.7/site-packages/celery/backends/base.py:333: in decode accept=self.accept) venv3/lib/python3.7/site-packages/kombu/serialization.py:264: in loads return decode(data) /usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py:130: in __exit__ self.gen.throw(type, value, traceback) venv3/lib/python3.7/site-packages/kombu/serialization.py:54: in _reraise_errors reraise(wrapper, wrapper(exc), sys.exc_info()[2]) venv3/lib/python3.7/site-packages/vine/five.py:194: in reraise raise value.with_traceback(tb) venv3/lib/python3.7/site-packages/kombu/serialization.py:50: in _reraise_errors yield venv3/lib/python3.7/site-packages/kombu/serialization.py:264: in loads return decode(data) venv3/lib/python3.7/site-packages/kombu/serialization.py:338: in unpickle return pickle_loads(str_to_bytes(s)) venv3/lib/python3.7/site-packages/kombu/serialization.py:59: in pickle_loads return load(BytesIO(s)) venv3/lib/python3.7/site-packages/celery/backends/base.py:69: in unpickle_backend return cls(*args, app=current_app._get_current_object(), **kwargs) venv3/lib/python3.7/site-packages/celery/backends/filesystem.py:53: in __init__ path = self._find_path(url) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;celery.backends.filesystem.FilesystemBackend object at 0x10b2c7c90&gt;, url = None def _find_path(self, url): if not url: &gt; raise ImproperlyConfigured(E_NO_PATH_SET) E kombu.exceptions.DecodeError: You need to configure a path for the file-system backend venv3/lib/python3.7/site-packages/celery/backends/filesystem.py:77: DecodeError"><pre class="notranslate"><code class="notranslate"> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ venv3/lib/python3.7/site-packages/celery/result.py:229: in get on_message=on_message, venv3/lib/python3.7/site-packages/celery/backends/base.py:579: in wait_for_pending no_ack=no_ack, venv3/lib/python3.7/site-packages/celery/backends/base.py:606: in wait_for meta = self.get_task_meta(task_id) venv3/lib/python3.7/site-packages/celery/backends/base.py:457: in get_task_meta meta = self._get_task_meta_for(task_id) venv3/lib/python3.7/site-packages/celery/backends/base.py:791: in _get_task_meta_for return self.decode_result(meta) venv3/lib/python3.7/site-packages/celery/backends/base.py:322: in decode_result return self.meta_from_decoded(self.decode(payload)) venv3/lib/python3.7/site-packages/celery/backends/base.py:333: in decode accept=self.accept) venv3/lib/python3.7/site-packages/kombu/serialization.py:264: in loads return decode(data) /usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/contextlib.py:130: in __exit__ self.gen.throw(type, value, traceback) venv3/lib/python3.7/site-packages/kombu/serialization.py:54: in _reraise_errors reraise(wrapper, wrapper(exc), sys.exc_info()[2]) venv3/lib/python3.7/site-packages/vine/five.py:194: in reraise raise value.with_traceback(tb) venv3/lib/python3.7/site-packages/kombu/serialization.py:50: in _reraise_errors yield venv3/lib/python3.7/site-packages/kombu/serialization.py:264: in loads return decode(data) venv3/lib/python3.7/site-packages/kombu/serialization.py:338: in unpickle return pickle_loads(str_to_bytes(s)) venv3/lib/python3.7/site-packages/kombu/serialization.py:59: in pickle_loads return load(BytesIO(s)) venv3/lib/python3.7/site-packages/celery/backends/base.py:69: in unpickle_backend return cls(*args, app=current_app._get_current_object(), **kwargs) venv3/lib/python3.7/site-packages/celery/backends/filesystem.py:53: in __init__ path = self._find_path(url) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;celery.backends.filesystem.FilesystemBackend object at 0x10b2c7c90&gt;, url = None def _find_path(self, url): if not url: &gt; raise ImproperlyConfigured(E_NO_PATH_SET) E kombu.exceptions.DecodeError: You need to configure a path for the file-system backend venv3/lib/python3.7/site-packages/celery/backends/filesystem.py:77: DecodeError </code></pre></div> <h1 dir="auto">Solution</h1> <p dir="auto">FilesystemBackend class defined in <a href="https://github.com/celery/celery/blob/master/celery/backends/filesystem.py#L34">https://github.com/celery/celery/blob/master/celery/backends/filesystem.py#L34</a>, misses <code class="notranslate">__reduce__</code> method to pickle the instance properly. The following example would make it work.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def __reduce__(self, args=(), kwargs={}): kwargs.update( dict(url=self.url)) return super(FilesystemBackend, self).__reduce__(args, kwargs)"><pre class="notranslate"><code class="notranslate">def __reduce__(self, args=(), kwargs={}): kwargs.update( dict(url=self.url)) return super(FilesystemBackend, self).__reduce__(args, kwargs) </code></pre></div>
<h1 dir="auto">Checklist</h1> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the contents of <code class="notranslate">pip freeze</code> in the issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all the versions of all the external dependencies required<br> to reproduce this bug.</li> </ul> <h2 dir="auto">Optional Debugging Information</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried reproducing the issue on more than one Python version<br> and/or implementation.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one message broker and/or<br> result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one version of the message<br> broker and/or result backend.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one operating system.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue on more than one workers pool.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue with autoscaling, retries,<br> ETA/Countdown &amp; rate limits disabled.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have tried reproducing the issue after downgrading<br> and/or upgrading Celery and its dependencies.</li> </ul> <h2 dir="auto">Related Issues and Possible Duplicates</h2> <h4 dir="auto">Related Issues</h4> <h2 dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="272093092" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/4371" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/4371/hovercard" href="https://github.com/celery/celery/issues/4371">#4371</a></h2> <h4 dir="auto">Possible Duplicates</h4> <ul dir="auto"> <li>None</li> </ul> <h2 dir="auto">Environment &amp; Settings</h2> <p dir="auto"><strong>Celery version</strong>: 4.3.0 , 4.4.2</p> <details> <summary><b><code class="notranslate">celery report</code> Output:</b></summary> <p dir="auto"> </p><p dir="auto">software -&gt; celery:4.3.0 (rhubarb) kombu:4.6.8 py:3.7.0<br> billiard:3.6.3.0 py-amqp:2.5.2<br> platform -&gt; system:Linux arch:64bit<br> kernel version:4.15.0-91-generic imp:CPython<br> loader -&gt; celery.loaders.app.AppLoader<br> settings -&gt; transport:amqp results:disabled</p> <p dir="auto">broker_url: 'amqp://guest:********<a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/localhost/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/localhost">@localhost</a>:5672//'</p> <p dir="auto"></p> </details> <h1 dir="auto">Steps to Reproduce</h1> <h2 dir="auto">Required Dependencies</h2> <ul dir="auto"> <li><strong>Minimal Python Version</strong>: N/A or Unknown</li> <li><strong>Minimal Celery Version</strong>: N/A or Unknown</li> <li><strong>Minimal Kombu Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Version</strong>: N/A or Unknown</li> <li><strong>Minimal OS and/or Kernel Version</strong>: N/A or Unknown</li> <li><strong>Minimal Broker Client Version</strong>: N/A or Unknown</li> <li><strong>Minimal Result Backend Client Version</strong>: N/A or Unknown</li> </ul> <h3 dir="auto">Python Packages</h3> <details> <summary><b><code class="notranslate">pip freeze</code> Output:</b></summary> <p dir="auto"> </p><p dir="auto">aioprocessing==1.0.1<br> alabaster==0.7.12<br> alembic==1.2.1<br> amqp==2.5.2<br> aniso8601==6.0.0<br> astroid==2.3.3<br> astropy==3.2.3<br> atomicwrites==1.3.0<br> attrs==19.3.0<br> auto-sklearn==0.5.2<br> Babel==2.7.0<br> backcall==0.1.0<br> backports.csv==1.0.7<br> billiard==3.6.3.0<br> bleach==3.1.0<br> boto3==1.9.160<br> botocore==1.12.160<br> catboost==0.14.2<br> celery==4.3.0<br> celery-progress==0.0.3<br> certifi==2019.11.28<br> cffi==1.14.0<br> chardet==3.0.4<br> Click==7.0<br> cloudpickle==1.1.1<br> config==0.4.2<br> configparser==3.7.4<br> ConfigSpace==0.4.7<br> confuse==1.0.0<br> coreapi==2.3.3<br> coreschema==0.0.4<br> coverage==4.5.4<br> cycler==0.10.0<br> Cython==0.29.16<br> databricks-cli==0.9.0<br> debug==0.3.2<br> decorator==4.4.1<br> defusedxml==0.6.0<br> diff-match-patch==20181111<br> dill==0.2.9<br> Django==2.2.2<br> django-cors-headers==3.0.2<br> django-dbconn-retry==0.1.5<br> django-import-export==1.2.0<br> django-keycloak==0.1.1<br> django-rest-framework==0.1.0<br> django-user==0.2.1<br> djangorestframework==3.9.4<br> docker==4.0.1<br> docutils==0.14<br> drf-yasg==1.16.0<br> ds-lime==0.1.1.27<br> ecdsa==0.13.2<br> eli5==0.10.1<br> entrypoints==0.3<br> enum34==1.1.6<br> et-xmlfile==1.0.1<br> fastparquet==0.3.2<br> Flask==1.0.3<br> future==0.17.1<br> gitdb2==2.0.5<br> GitPython==2.1.11<br> gorilla==0.3.0<br> GPy==1.9.9<br> GPyOpt==1.2.5<br> graphene==2.1.7<br> graphene-django==2.5.0<br> graphene-file-upload==1.2.2<br> graphql-core==2.2.1<br> graphql-relay==2.0.0<br> graphviz==0.11<br> gunicorn==19.9.0<br> h5py==2.10.0<br> hpbandster==0.7.4<br> htmlmin==0.1.12<br> idna==2.8<br> imageio==2.5.0<br> imagesize==1.1.0<br> importlib-metadata==0.20<br> inflection==0.3.1<br> ipdb==0.13.2<br> ipython==7.13.0<br> ipython-genutils==0.2.0<br> isort==4.3.21<br> itsdangerous==1.1.0<br> itypes==1.1.0<br> jdcal==1.4.1<br> jedi==0.16.0<br> Jinja2==2.10.1<br> jmespath==0.9.4<br> joblib==0.13.2<br> jsonschema==3.0.1<br> jupyter-client==5.3.4<br> jupyter-core==4.6.1<br> Keras==2.3.1<br> Keras-Applications==1.0.8<br> Keras-Preprocessing==1.1.0<br> kiwisolver==1.1.0<br> kombu==4.6.8<br> lazy-import==0.2.2<br> lazy-object-proxy==1.4.3<br> liac-arff==2.4.0<br> lightgbm==2.2.3<br> lime==0.1.1.34<br> llvmlite==0.29.0<br> lockfile==0.12.2<br> Mako==1.1.0<br> MarkupSafe==1.1.1<br> matplotlib==3.1.0<br> mccabe==0.6.1<br> memory-profiler==0.55.0<br> missingno==0.4.2<br> mistune==0.8.4<br> mleap==0.8.1<br> mlflow==1.2.0<br> mock==3.0.5<br> more-itertools==8.2.0<br> multiprocess==0.70.7<br> nbconvert==5.6.1<br> nbformat==4.4.0<br> nest-asyncio==1.2.3<br> netifaces==0.10.9<br> networkx==2.3<br> nose==1.3.7<br> nose-exclude==0.5.0<br> numba==0.45.1<br> numpy==1.16.4<br> objgraph==3.4.1<br> odfpy==1.4.0<br> openpyxl==2.6.2<br> packaging==19.0<br> pandas==0.24.2<br> pandas-profiling==2.3.0<br> pandocfilters==1.4.2<br> paramz==0.9.5<br> parso==0.6.0<br> patsy==0.5.1<br> PDPbox==0.2.0<br> pexpect==4.8.0<br> phik==0.9.8<br> pickleshare==0.7.5<br> Pillow==6.0.0<br> plotly==3.10.0<br> pluggy==0.12.0<br> prometheus-client==0.7.1<br> promise==2.2.1<br> prompt-toolkit==3.0.4<br> protobuf==3.8.0<br> psutil==5.6.2<br> psycopg2==2.7.5<br> ptyprocess==0.6.0<br> py==1.8.0<br> py4j==0.10.7<br> pyarrow==0.14.1<br> pyasn1==0.4.5<br> pycparser==2.20<br> pydot==1.4.1<br> pyfiglet==0.8.post1<br> Pygments==2.4.2<br> PyHive==0.6.1<br> pylint==2.4.3<br> Pympler==0.7<br> pynisher==0.5.0<br> pyparsing==2.4.0<br> pyrfr==0.8.0<br> Pyro4==4.77<br> pyrsistent==0.15.3<br> pysasl==0.5.0<br> pyspark==2.4.3<br> pytest==5.1.2<br> pytest-cov==2.7.1<br> pytest-django==3.5.1<br> pytest-mock==1.10.4<br> pytest-pylint==0.14.1<br> python-dateutil==2.8.0<br> python-editor==1.0.4<br> python-jose==3.0.1<br> python-keycloak-client==0.2.2<br> pytz==2019.1<br> PyWavelets==1.0.3<br> PyYAML==5.1.1<br> pyzmq==18.1.1<br> querystring-parser==1.2.3<br> rabbitmq==0.2.0<br> requests==2.22.0<br> retrying==1.3.3<br> rsa==4.0<br> ruamel.yaml==0.15.97<br> Rx==1.6.1<br> s3transfer==0.2.0<br> sasl==0.2.1<br> scikit-image==0.15.0<br> scikit-learn==0.19.2<br> scipy==1.3.0<br> seaborn==0.9.0<br> see==1.4.1<br> Send2Trash==1.5.0<br> serpent==1.28<br> simplejson==3.16.0<br> singledispatch==3.4.0.3<br> six==1.14.0<br> skater==1.0.4<br> smac==0.8.0<br> smmap2==2.0.5<br> snowballstemmer==1.2.1<br> sobol-seq==0.1.2<br> spark-celery==0.1.1<br> Sphinx==2.1.0<br> sphinx-rtd-theme==0.4.3<br> sphinxcontrib-applehelp==1.0.1<br> sphinxcontrib-devhelp==1.0.1<br> sphinxcontrib-htmlhelp==1.0.2<br> sphinxcontrib-jsmath==1.0.1<br> sphinxcontrib-qthelp==1.0.2<br> sphinxcontrib-serializinghtml==1.1.3<br> SQLAlchemy==1.3.8<br> sqlparse==0.3.0<br> statsmodels==0.10.2<br> tablib==0.13.0<br> tabulate==0.8.3<br> testpath==0.4.4<br> thrift==0.11.0<br> thrift-sasl==0.3.0<br> tornado==6.0.3<br> traitlets==4.3.2<br> typed-ast==1.4.0<br> typing==3.6.6<br> uritemplate==3.0.0<br> urllib3==1.25.3<br> vine==1.3.0<br> wcwidth==0.1.7<br> webencodings==0.5.1<br> websocket-client==0.56.0<br> Werkzeug==0.15.4<br> wrapt==1.11.2<br> xgboost==0.90<br> xlrd==1.2.0<br> xlwt==1.3.0<br> yellowbrick==0.9.1<br> zipp==0.6.0</p> <p dir="auto"></p> </details> <h3 dir="auto">Other Dependencies</h3> <details> <p dir="auto"> N/A </p> </details> <h2 dir="auto">Minimally Reproducible Test Case</h2> <details> <p dir="auto"> 1. Write a task that causes an error that does not correspond to BaseExeption. : </p><p dir="auto">def foo():</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" process = psutil.Process(os.getpid()) print(f'foo process mem info{process.memory_full_info()}') dummy = numpy.array(numpy.random.randint(100, 200, 300000000)) print(dummy.nbytes) idx = 0 while idx &lt; 2: time.sleep(1) idx = idx + 1 raise ValueError"><pre class="notranslate"><code class="notranslate"> process = psutil.Process(os.getpid()) print(f'foo process mem info{process.memory_full_info()}') dummy = numpy.array(numpy.random.randint(100, 200, 300000000)) print(dummy.nbytes) idx = 0 while idx &lt; 2: time.sleep(1) idx = idx + 1 raise ValueError </code></pre></div> <ol start="2" dir="auto"> <li>Run celery in prefork mode. Set the work volume of each worker pool to 2 or more.</li> <li>Keep trying foo.delay()</li> </ol> <p dir="auto"></p> </details> <h1 dir="auto">Expected Behavior</h1> <p dir="auto">Resource release after appropriate handling of exceptions</p> <h1 dir="auto">Actual Behavior</h1> <p dir="auto">foo.delay()<br> foo process mem infopfullmem(rss=35368960, vms=384946176, shared=4370432, text=2338816, lib=0, data=300494848, dirty=0, uss=9674752, pss=21053440, swap=0)</p> <p dir="auto">foo process mem infopfullmem(rss=2437492736, vms=2785394688, shared=5931008, text=2338816, lib=0, data=2700943360, dirty=0, uss=2410758144, pss=2422296576, swap=0)</p> <p dir="auto">foo process mem infopfullmem(rss=4837507072, vms=5185384448, shared=5922816, text=2338816, lib=0, data=5100933120, dirty=0, uss=4810747904, pss=4822307840, swap=0)</p> <p dir="auto">Memory builds up continuously</p>
0
<p dir="auto">I've seen this a couple times, e.g.</p> <p dir="auto"><a href="http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/28103/#" rel="nofollow">http://kubekins.dls.corp.google.com:8081/job/kubernetes-pull-build-test-e2e-gce/28103/#</a></p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/caesarxuchao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/caesarxuchao">@caesarxuchao</a></p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="• Failure [12.590 seconds] Generated release_1_2 clientset /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/generated_clientset.go:154 should create pods, delete pods, watch pods [It] /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/generated_clientset.go:153 Expected &lt;int&gt;: 0 to equal &lt;int&gt;: 1 /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/generated_clientset.go:102"><pre class="notranslate"><span class="pl-c1">• Failure [12.590 seconds]</span> <span class="pl-c1">Generated release_1_2 clientset</span> <span class="pl-c1">/go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/generated_clientset.go:154</span> <span class="pl-c1"> should create pods, delete pods, watch pods [It]</span> <span class="pl-c1"> /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/generated_clientset.go:153</span> <span class="pl-c1"> Expected</span> <span class="pl-c1"> &lt;int&gt;: 0</span> <span class="pl-c1"> to equal</span> <span class="pl-c1"> &lt;int&gt;: 1</span> <span class="pl-c1"> /go/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/test/e2e/generated_clientset.go:102</span></pre></div>
1
<p dir="auto">See; tensorflow.org/versions/r0.7/tutorials/mnist/beginners/index.html --&gt; Training section. "Math Processing Error" appears in multiple places in page. Used OSX / Safari, Firefox, and Chrome. Screen shot attached.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/351870/13761735/a3f2a3b6-e9f7-11e5-9373-5b7eb37fd534.png"><img src="https://cloud.githubusercontent.com/assets/351870/13761735/a3f2a3b6-e9f7-11e5-9373-5b7eb37fd534.png" alt="screen shot 2016-03-14 at 3 15 14 pm" style="max-width: 100%;"></a></p>
<p dir="auto">The website tries to load,</p> <p dir="auto"><code class="notranslate">https://www.tensorflow.org/MathJax/jax/output/HTML-CSS/fonts/STIX/fontdata.js?rev=2.6.1</code></p> <p dir="auto">and fails. Someone needs to fix the path to get the right version of mathjax, and have all the LaTeX symbols show up.</p> <p dir="auto">Thanks.</p>
1
<p dir="auto"><code class="notranslate">Groupby</code> by level of <code class="notranslate">MultiIndex</code> with <code class="notranslate">rolling</code> duplicate index level.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df = pd.DataFrame(data=[[1, 1, 10, 20], [1, 2, 30, 40], [1, 3, 50, 60], [2, 1, 11, 21], [2, 2, 31, 41], [2, 3, 51, 61]], columns=['id', 'date', 'd1', 'd2']) df.set_index(['id', 'date'], inplace=True) print (df) d1 d2 id date 1 1 10 20 2 30 40 3 50 60 2 1 11 21 2 31 41 3 51 61"><pre class="notranslate"><code class="notranslate">df = pd.DataFrame(data=[[1, 1, 10, 20], [1, 2, 30, 40], [1, 3, 50, 60], [2, 1, 11, 21], [2, 2, 31, 41], [2, 3, 51, 61]], columns=['id', 'date', 'd1', 'd2']) df.set_index(['id', 'date'], inplace=True) print (df) d1 d2 id date 1 1 10 20 2 30 40 3 50 60 2 1 11 21 2 31 41 3 51 61 </code></pre></div> <p dir="auto">Double <code class="notranslate">id</code> level.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df1 = df.d1.groupby(level='id').rolling(window=2).sum() print(df1) id id date 1 1 1 NaN 2 40.0 3 80.0 2 2 1 NaN 2 42.0 3 82.0 Name: d1, dtype: float64"><pre class="notranslate"><code class="notranslate">df1 = df.d1.groupby(level='id').rolling(window=2).sum() print(df1) id id date 1 1 1 NaN 2 40.0 3 80.0 2 2 1 NaN 2 42.0 3 82.0 Name: d1, dtype: float64 </code></pre></div> <p dir="auto">Solution with <code class="notranslate">apply</code> works nice.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df2 = df.groupby(level='id').d1.apply(lambda x: x.rolling(window=2).sum()) print(df2) id date 1 1 NaN 2 40.0 3 80.0 2 1 NaN 2 42.0 3 82.0 Name: d1, dtype: float64"><pre class="notranslate"><code class="notranslate">df2 = df.groupby(level='id').d1.apply(lambda x: x.rolling(window=2).sum()) print(df2) id date 1 1 NaN 2 40.0 3 80.0 2 1 NaN 2 42.0 3 82.0 Name: d1, dtype: float64 </code></pre></div> <p dir="auto"><a href="http://stackoverflow.com/questions/42119793/doing-a-groupby-and-rolling-window-on-a-pandas-dataframe-with-a-multilevel-index" rel="nofollow">SO question</a>.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="print (pd.show_versions()) INSTALLED VERSIONS ------------------ commit: None python: 3.5.1.final.0 python-bits: 64 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel byteorder: little LC_ALL: None LANG: sk_SK LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 8.1.1 setuptools: 20.3 Cython: 0.23.4 numpy: 1.11.0 scipy: 0.17.0 statsmodels: 0.6.1 xarray: None IPython: 4.1.2 sphinx: 1.3.1 patsy: 0.4.0 dateutil: 2.5.1 pytz: 2016.2 blosc: None bottleneck: 1.0.0 tables: 3.2.2 numexpr: 2.5.1 matplotlib: 1.5.1 openpyxl: 2.3.2 xlrd: 0.9.4 xlwt: 1.0.0 xlsxwriter: 0.8.4 lxml: 3.6.0 bs4: 4.4.1 html5lib: 0.999 httplib2: None apiclient: None sqlalchemy: 1.0.12 pymysql: None psycopg2: None jinja2: 2.8 boto: 2.39.0 pandas_datareader: 0.2.1 None"><pre class="notranslate"><code class="notranslate">print (pd.show_versions()) INSTALLED VERSIONS ------------------ commit: None python: 3.5.1.final.0 python-bits: 64 OS: Windows OS-release: 7 machine: AMD64 processor: Intel64 Family 6 Model 42 Stepping 7, GenuineIntel byteorder: little LC_ALL: None LANG: sk_SK LOCALE: None.None pandas: 0.19.2 nose: 1.3.7 pip: 8.1.1 setuptools: 20.3 Cython: 0.23.4 numpy: 1.11.0 scipy: 0.17.0 statsmodels: 0.6.1 xarray: None IPython: 4.1.2 sphinx: 1.3.1 patsy: 0.4.0 dateutil: 2.5.1 pytz: 2016.2 blosc: None bottleneck: 1.0.0 tables: 3.2.2 numexpr: 2.5.1 matplotlib: 1.5.1 openpyxl: 2.3.2 xlrd: 0.9.4 xlwt: 1.0.0 xlsxwriter: 0.8.4 lxml: 3.6.0 bs4: 4.4.1 html5lib: 0.999 httplib2: None apiclient: None sqlalchemy: 1.0.12 pymysql: None psycopg2: None jinja2: 2.8 boto: 2.39.0 pandas_datareader: 0.2.1 None </code></pre></div>
<p dir="auto">I found another oddity while digging through <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="170700095" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/13966" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/13966/hovercard" href="https://github.com/pandas-dev/pandas/issues/13966">#13966</a>.</p> <p dir="auto">Begin with the initial DataFrame in that issue:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df = pd.DataFrame({'A': [1] * 20 + [2] * 12 + [3] * 8, 'B': np.arange(40)})"><pre class="notranslate"><code class="notranslate">df = pd.DataFrame({'A': [1] * 20 + [2] * 12 + [3] * 8, 'B': np.arange(40)}) </code></pre></div> <p dir="auto">Save the grouping:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [215]: g = df.groupby('A')"><pre class="notranslate"><code class="notranslate">In [215]: g = df.groupby('A') </code></pre></div> <p dir="auto">Compute the rolling sum:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [216]: r = g.rolling(4) In [217]: r.sum() Out[217]: A B A 1 0 NaN NaN 1 NaN NaN 2 NaN NaN 3 4.0 6.0 4 4.0 10.0 5 4.0 14.0 6 4.0 18.0 7 4.0 22.0 8 4.0 26.0 9 4.0 30.0 ... ... ... 2 30 8.0 114.0 31 8.0 118.0 3 32 NaN NaN 33 NaN NaN 34 NaN NaN 35 12.0 134.0 36 12.0 138.0 37 12.0 142.0 38 12.0 146.0 39 12.0 150.0 [40 rows x 2 columns]"><pre class="notranslate"><code class="notranslate">In [216]: r = g.rolling(4) In [217]: r.sum() Out[217]: A B A 1 0 NaN NaN 1 NaN NaN 2 NaN NaN 3 4.0 6.0 4 4.0 10.0 5 4.0 14.0 6 4.0 18.0 7 4.0 22.0 8 4.0 26.0 9 4.0 30.0 ... ... ... 2 30 8.0 114.0 31 8.0 118.0 3 32 NaN NaN 33 NaN NaN 34 NaN NaN 35 12.0 134.0 36 12.0 138.0 37 12.0 142.0 38 12.0 146.0 39 12.0 150.0 [40 rows x 2 columns] </code></pre></div> <p dir="auto">It maintains the <code class="notranslate">by</code> column (<code class="notranslate">A</code>)! That column should not be in the resulting DataFrame.</p> <p dir="auto">It gets weirder if I compute the sum over the entire grouping and then re-do the rolling calculation. Now <code class="notranslate">by</code> column is gone as expected:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [218]: g.sum() Out[218]: B A 1 190 2 306 3 284 In [219]: r.sum() Out[219]: B A 1 0 NaN 1 NaN 2 NaN 3 6.0 4 10.0 5 14.0 6 18.0 7 22.0 8 26.0 9 30.0 ... ... 2 30 114.0 31 118.0 3 32 NaN 33 NaN 34 NaN 35 134.0 36 138.0 37 142.0 38 146.0 39 150.0 [40 rows x 1 columns]"><pre class="notranslate"><code class="notranslate">In [218]: g.sum() Out[218]: B A 1 190 2 306 3 284 In [219]: r.sum() Out[219]: B A 1 0 NaN 1 NaN 2 NaN 3 6.0 4 10.0 5 14.0 6 18.0 7 22.0 8 26.0 9 30.0 ... ... 2 30 114.0 31 118.0 3 32 NaN 33 NaN 34 NaN 35 134.0 36 138.0 37 142.0 38 146.0 39 150.0 [40 rows x 1 columns] </code></pre></div> <p dir="auto">So the grouping summation has some sort of side effect.</p>
1
<p dir="auto">Importing the numpy c-extensions failed.</p> <p dir="auto">Original error was: No module named 'numpy.core._multiarray_umath'</p> <p dir="auto">python Version:<br> 3.7.0</p> <p dir="auto">numpy version<br> 1.18.2</p> <p dir="auto">Operating System :Windows</p> <h3 dir="auto">Error message:</h3> <p dir="auto">Failed to load entry point 'info':</p> <p dir="auto">IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!</p> <p dir="auto">Importing the numpy c-extensions failed.</p> <ul dir="auto"> <li> <p dir="auto">Try uninstalling and reinstalling numpy.</p> </li> <li> <p dir="auto">If you have already done that, then:</p> <ol dir="auto"> <li>Check that you expected to use Python3.7 from "c:\python37\python_d.exe",<br> and that you have no directories in your PATH or PYTHONPATH that can<br> interfere with the Python and numpy version "1.18.2" you're trying to use.</li> <li>If (1) looks fine, you can open a new issue at<br> <a href="https://github.com/numpy/numpy/issues">https://github.com/numpy/numpy/issues</a>. Please include details on: <ul dir="auto"> <li>how you installed Python</li> <li>how you installed numpy</li> <li>your operating system</li> <li>whether or not you have multiple versions of Python installed</li> <li>if you built from source, your compiler versions and ideally a build log</li> </ul> </li> </ol> </li> <li> <p dir="auto">If you're working with a numpy git repository, try <code class="notranslate">git clean -xdf</code><br> (removes all files not under version control) and rebuild numpy.</p> </li> </ul> <p dir="auto">Note: this error has many possible causes, so please don't comment on<br> an existing issue about this - open a new one instead.</p> <p dir="auto">Original error was: No module named 'numpy.core._multiarray_umath'</p> <p dir="auto">tried reinstalling numpy. but the problem persist</p>
<p dir="auto">I am unable to <code class="notranslate">import numpy</code> (version 1.14.5) when I am using a debug version of Python (<code class="notranslate">python_d.exe</code>). When I attempt to do so I get the following traceback</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:20:40) [MSC v.1900 64 bit (AMD64)] on win32 Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information. &gt;&gt;&gt; import numpy Traceback (most recent call last): File &quot;C:\Python\Python35\lib\site-packages\numpy\core\__init__.py&quot;, line 16, in &lt;module&gt; from . import multiarray ImportError: cannot import name 'multiarray'"><pre class="notranslate"><code class="notranslate">Python 3.5.4 (v3.5.4:3f56838, Aug 8 2017, 02:20:40) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. &gt;&gt;&gt; import numpy Traceback (most recent call last): File "C:\Python\Python35\lib\site-packages\numpy\core\__init__.py", line 16, in &lt;module&gt; from . import multiarray ImportError: cannot import name 'multiarray' </code></pre></div> <p dir="auto">For debugging I often need to step across from Python code into C++ code, but if I have a numpy dependency I cannot do so due to the above behavior.</p>
1
<h2 dir="auto">Steps to Reproduce</h2> <ol dir="auto"> <li>flutter create newapp</li> <li>...</li> <li>...</li> </ol> <h2 dir="auto">Logs</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>
<p dir="auto">Noticed this while investigating <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="342853918" data-permission-text="Title is private" data-url="https://github.com/flutter/flutter/issues/19571" data-hovercard-type="issue" data-hovercard-url="/flutter/flutter/issues/19571/hovercard" href="https://github.com/flutter/flutter/issues/19571">#19571</a></p> <ol dir="auto"> <li>Run this Flutter app:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Foo { } void main() { print(new Foo()); }"><pre class="notranslate"><code class="notranslate">class Foo { } void main() { print(new Foo()); } </code></pre></div> <ol start="2" dir="auto"> <li> <p dir="auto">Add a second <code class="notranslate">class Foo { }</code> declaration, and do a hot reload.</p> </li> <li> <p dir="auto">Do another hot reload. The engine will crash inside Dart's ReloadSources.</p> </li> </ol> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/a-siva/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/a-siva">@a-siva</a></p> <p dir="auto">Stack trace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#0 dart::Object::SetRaw (this=0x8b51c63c, value=0x50f05) at ../../third_party/dart/runtime/vm/object.h:9169 #1 dart::String::initializeHandle (obj=0x8b51c63c, raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374 #2 dart::String::Handle (zone=&lt;optimized out&gt;, raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374 #3 dart::String::Handle (raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374 #4 dart::IsolateReloadContext::Reload (this=0x89bb6940, force_reload=false, root_script_url=&lt;optimized out&gt;, packages_url_=0x8b51c398 &quot;/data/user/0/com.example.bug19571/cache/bug_19571XQXBUU/bug_19571/.packages&quot;) at ../../third_party/dart/runtime/vm/isolate_reload.cc:550 #5 0x8c0b0ca6 in dart::Isolate::ReloadSources (this=0x89a4ea00, js=&lt;optimized out&gt;, force_reload=33, root_script_url=0x1 &lt;error: Cannot access memory at address 0x1&gt;, packages_url=0x8b51c398 &quot;/data/user/0/com.example.bug19571/cache/bug_19571XQXBUU/bug_19571/.packages&quot;, dont_delete_reload_context=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/isolate.cc:1230 #6 0x8c1e1bce in dart::ReloadSources (thread=&lt;optimized out&gt;, js=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/service.cc:3053 #7 0x8c1da36a in dart::Service::InvokeMethod (I=0x89a4ea00, msg=..., parameters_are_dart_objects=false) at ../../third_party/dart/runtime/vm/service.cc:869 #8 0x8c1da92c in dart::Service::HandleIsolateMessage (isolate=0x89a4ea00, msg=...) at ../../third_party/dart/runtime/vm/service.cc:917 #9 0x8c0ae008 in dart::IsolateMessageHandler::HandleMessage (this=&lt;optimized out&gt;, message=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/isolate.cc:565 #10 0x8c0ccd44 in dart::MessageHandler::HandleMessages (this=0x98cb1ca0, ml=&lt;optimized out&gt;, allow_normal_messages=true, allow_multiple_normal_messages=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/message_handler.cc:231 #11 0x8c0cce10 in dart::MessageHandler::HandleNextMessage (this=0x98cb1ca0) at ../../third_party/dart/runtime/vm/message_handler.cc:290 #12 0x8c3032a4 in Dart_HandleMessage () at ../../third_party/dart/runtime/vm/dart_api_impl.cc:1664 #13 0x8bf07b10 in tonic::DartMessageHandler::OnHandleMessage (this=0x89a701e0, dart_state=0x9af78890) at ../../third_party/tonic/dart_message_handler.cc:114"><pre class="notranslate"><code class="notranslate">#0 dart::Object::SetRaw (this=0x8b51c63c, value=0x50f05) at ../../third_party/dart/runtime/vm/object.h:9169 #1 dart::String::initializeHandle (obj=0x8b51c63c, raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374 #2 dart::String::Handle (zone=&lt;optimized out&gt;, raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374 #3 dart::String::Handle (raw_ptr=0x50f05) at ../../third_party/dart/runtime/vm/object.h:7374 #4 dart::IsolateReloadContext::Reload (this=0x89bb6940, force_reload=false, root_script_url=&lt;optimized out&gt;, packages_url_=0x8b51c398 "/data/user/0/com.example.bug19571/cache/bug_19571XQXBUU/bug_19571/.packages") at ../../third_party/dart/runtime/vm/isolate_reload.cc:550 #5 0x8c0b0ca6 in dart::Isolate::ReloadSources (this=0x89a4ea00, js=&lt;optimized out&gt;, force_reload=33, root_script_url=0x1 &lt;error: Cannot access memory at address 0x1&gt;, packages_url=0x8b51c398 "/data/user/0/com.example.bug19571/cache/bug_19571XQXBUU/bug_19571/.packages", dont_delete_reload_context=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/isolate.cc:1230 #6 0x8c1e1bce in dart::ReloadSources (thread=&lt;optimized out&gt;, js=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/service.cc:3053 #7 0x8c1da36a in dart::Service::InvokeMethod (I=0x89a4ea00, msg=..., parameters_are_dart_objects=false) at ../../third_party/dart/runtime/vm/service.cc:869 #8 0x8c1da92c in dart::Service::HandleIsolateMessage (isolate=0x89a4ea00, msg=...) at ../../third_party/dart/runtime/vm/service.cc:917 #9 0x8c0ae008 in dart::IsolateMessageHandler::HandleMessage (this=&lt;optimized out&gt;, message=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/isolate.cc:565 #10 0x8c0ccd44 in dart::MessageHandler::HandleMessages (this=0x98cb1ca0, ml=&lt;optimized out&gt;, allow_normal_messages=true, allow_multiple_normal_messages=&lt;optimized out&gt;) at ../../third_party/dart/runtime/vm/message_handler.cc:231 #11 0x8c0cce10 in dart::MessageHandler::HandleNextMessage (this=0x98cb1ca0) at ../../third_party/dart/runtime/vm/message_handler.cc:290 #12 0x8c3032a4 in Dart_HandleMessage () at ../../third_party/dart/runtime/vm/dart_api_impl.cc:1664 #13 0x8bf07b10 in tonic::DartMessageHandler::OnHandleMessage (this=0x89a701e0, dart_state=0x9af78890) at ../../third_party/tonic/dart_message_handler.cc:114 </code></pre></div>
0
<p dir="auto">Seems like the copy docstring in <code class="notranslate">pandas.Series</code> is duplicated.</p> <p dir="auto">Instead of this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dtype : numpy.dtype or None If None, dtype will be inferred copy : boolean, default False Copy input data copy : boolean, default False"><pre class="notranslate"><code class="notranslate">dtype : numpy.dtype or None If None, dtype will be inferred copy : boolean, default False Copy input data copy : boolean, default False </code></pre></div> <p dir="auto">Shouldn't it be this?</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dtype : numpy.dtype or None If None, dtype will be inferred copy : boolean, default False Copy input data"><pre class="notranslate"><code class="notranslate">dtype : numpy.dtype or None If None, dtype will be inferred copy : boolean, default False Copy input data </code></pre></div>
<p dir="auto">quantities related<br> xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="9197041" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/2494" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/2494/hovercard" href="https://github.com/pandas-dev/pandas/issues/2494">#2494</a><br> xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="4153105" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/1071" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/1071/hovercard" href="https://github.com/pandas-dev/pandas/issues/1071">#1071</a></p> <p dir="auto">custom meta-data<br> xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="9170204" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/2485" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/2485/hovercard" href="https://github.com/pandas-dev/pandas/issues/2485">#2485</a></p> <p dir="auto">It would be very convenient if unit support could be integrated into pandas.<br> Idea: pandas checks for the presence of a unit-attribute of columns and - if present - uses it</p> <ul dir="auto"> <li>with 'print' to show the units e.g. below the column names</li> <li>to calculate 'under the hood' with these units similar to the example below</li> </ul> <p dir="auto">For my example I use the module pint and add an attribute 'unit' to columns (and a 'title'...).</p> <p dir="auto">Example:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from pandas import DataFrame as DF from pint import UnitRegistry units = UnitRegistry() class ColumnDescription(): '''Column description with additional attributes. The idea is to use this description to be able to add unit and title attributes to a column description in one step. A list of ColumnDescriptions is than used as argument to DataFrame() with unit support. ''' def __init__(self, name, data, title = None, unit = None): ''' Args: name (str): Name of the column.. data (list): List of the column data. title (str): Title of the column. Defaults to None. unit (str): Unit of the column (see documentation of module pint). Defaults to None. ''' self.data = data '''(list): List of the column data.''' self.name = name '''(str): Name of the column, naming convention similar to python variables. Used to access the column with pandas syntax, e.g. df['column'] or df.column. ''' self.title = title '''(str): Title of the column. More human readable than the 'name'. E.g.: Title: 'This is a column title'. name: 'column_title'. ''' self.unit = unit '''Unit of the column (see module pint). Intended to be used in calculations involving different columns. ''' class DataFrame(DF): '''Data Frame with support for ColumnDescriptions (e.g. unit support). 1. See documentation of pandas.DataFrame. 2. When used with ColumnDescriptions supports additional column attributes like title and unit. ''' def __init__(self, data, title = None): ''' Args: data (list or dict): 1. Dict, as in documentation of DataFrame 2. List of the column data (of type ColumnDescription). title (str): Title of the data frame. Defaults to None. ''' if isinstance(data, list): if isinstance(data[0], ColumnDescription): d = {} for column in data: d[column.name] = column.data super(DataFrame, self).__init__(d) for column in data: self[column.name].title = column.title self[column.name].unit = column.unit self.title = title else: super(DataFrame, self).__init__(data) if __name__ == '__main__': data = [ ColumnDescription('length', [1, 10], title = 'Length in meter', unit = 'meter'), ColumnDescription('time', [10, 1], title = 'Time in s', unit = 's') ] d = {'length':[1, 10], 'time': [10, 1]} df = DataFrame(d) print 'standard df' print df df = DataFrame(data) print '\n' + 'new df' print df ####use of dimensions#### # pint works with numpy arrays # df[name] is currently not working with pint, but would be I think # it would be a real enhancement if it would... test = df.as_matrix(['length']) * units(df['length'].unit) / \ (df.as_matrix(['time']) * units(df['time'].unit)) print '\n' + 'unit test' print test print '\n' + 'magnitude' print test.magnitude print '\n' + 'dimensionality' print test.dimensionality "><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">pandas</span> <span class="pl-k">import</span> <span class="pl-v">DataFrame</span> <span class="pl-k">as</span> <span class="pl-v">DF</span> <span class="pl-k">from</span> <span class="pl-s1">pint</span> <span class="pl-k">import</span> <span class="pl-v">UnitRegistry</span> <span class="pl-s1">units</span> <span class="pl-c1">=</span> <span class="pl-v">UnitRegistry</span>() <span class="pl-k">class</span> <span class="pl-v">ColumnDescription</span>(): <span class="pl-s">'''Column description with additional attributes.</span> <span class="pl-s"></span> <span class="pl-s"> The idea is to use this description to be able to add unit and title</span> <span class="pl-s"> attributes to a column description in one step.</span> <span class="pl-s"></span> <span class="pl-s"> A list of ColumnDescriptions is than used as argument to DataFrame()</span> <span class="pl-s"> with unit support.</span> <span class="pl-s"> '''</span> <span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">name</span>, <span class="pl-s1">data</span>, <span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span>, <span class="pl-s1">unit</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span>): <span class="pl-s">'''</span> <span class="pl-s"> Args:</span> <span class="pl-s"> name (str): Name of the column..</span> <span class="pl-s"> data (list): List of the column data.</span> <span class="pl-s"> title (str): Title of the column. Defaults to None.</span> <span class="pl-s"> unit (str): Unit of the column (see documentation of module pint).</span> <span class="pl-s"> Defaults to None.</span> <span class="pl-s"></span> <span class="pl-s"> '''</span> <span class="pl-s1">self</span>.<span class="pl-s1">data</span> <span class="pl-c1">=</span> <span class="pl-s1">data</span> <span class="pl-s">'''(list): List of the column data.'''</span> <span class="pl-s1">self</span>.<span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s1">name</span> <span class="pl-s">'''(str): Name of the column, naming convention similar to python variables.</span> <span class="pl-s"></span> <span class="pl-s"> Used to access the column with pandas syntax, e.g. df['column'] or df.column.</span> <span class="pl-s"> '''</span> <span class="pl-s1">self</span>.<span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">title</span> <span class="pl-s">'''(str): Title of the column. </span> <span class="pl-s"></span> <span class="pl-s"> More human readable than the 'name'. E.g.:</span> <span class="pl-s"> Title: 'This is a column title'.</span> <span class="pl-s"> name: 'column_title'.</span> <span class="pl-s"> '''</span> <span class="pl-s1">self</span>.<span class="pl-s1">unit</span> <span class="pl-c1">=</span> <span class="pl-s1">unit</span> <span class="pl-s">'''Unit of the column (see module pint).</span> <span class="pl-s"></span> <span class="pl-s"> Intended to be used in calculations involving different columns.</span> <span class="pl-s"> '''</span> <span class="pl-k">class</span> <span class="pl-v">DataFrame</span>(<span class="pl-v">DF</span>): <span class="pl-s">'''Data Frame with support for ColumnDescriptions (e.g. unit support).</span> <span class="pl-s"></span> <span class="pl-s"> 1. See documentation of pandas.DataFrame.</span> <span class="pl-s"> 2. When used with ColumnDescriptions supports additional column attributes</span> <span class="pl-s"> like title and unit.</span> <span class="pl-s"> '''</span> <span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">data</span>, <span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-c1">None</span>): <span class="pl-s">'''</span> <span class="pl-s"> Args:</span> <span class="pl-s"> data (list or dict):</span> <span class="pl-s"> 1. Dict, as in documentation of DataFrame</span> <span class="pl-s"> 2. List of the column data (of type ColumnDescription).</span> <span class="pl-s"> title (str): Title of the data frame. Defaults to None.</span> <span class="pl-s"> '''</span> <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">data</span>, <span class="pl-s1">list</span>): <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">data</span>[<span class="pl-c1">0</span>], <span class="pl-v">ColumnDescription</span>): <span class="pl-s1">d</span> <span class="pl-c1">=</span> {} <span class="pl-k">for</span> <span class="pl-s1">column</span> <span class="pl-c1">in</span> <span class="pl-s1">data</span>: <span class="pl-s1">d</span>[<span class="pl-s1">column</span>.<span class="pl-s1">name</span>] <span class="pl-c1">=</span> <span class="pl-s1">column</span>.<span class="pl-s1">data</span> <span class="pl-en">super</span>(<span class="pl-v">DataFrame</span>, <span class="pl-s1">self</span>).<span class="pl-en">__init__</span>(<span class="pl-s1">d</span>) <span class="pl-k">for</span> <span class="pl-s1">column</span> <span class="pl-c1">in</span> <span class="pl-s1">data</span>: <span class="pl-s1">self</span>[<span class="pl-s1">column</span>.<span class="pl-s1">name</span>].<span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">column</span>.<span class="pl-s1">title</span> <span class="pl-s1">self</span>[<span class="pl-s1">column</span>.<span class="pl-s1">name</span>].<span class="pl-s1">unit</span> <span class="pl-c1">=</span> <span class="pl-s1">column</span>.<span class="pl-s1">unit</span> <span class="pl-s1">self</span>.<span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s1">title</span> <span class="pl-k">else</span>: <span class="pl-en">super</span>(<span class="pl-v">DataFrame</span>, <span class="pl-s1">self</span>).<span class="pl-en">__init__</span>(<span class="pl-s1">data</span>) <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">'__main__'</span>: <span class="pl-s1">data</span> <span class="pl-c1">=</span> [ <span class="pl-v">ColumnDescription</span>(<span class="pl-s">'length'</span>, [<span class="pl-c1">1</span>, <span class="pl-c1">10</span>], <span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s">'Length in meter'</span>, <span class="pl-s1">unit</span> <span class="pl-c1">=</span> <span class="pl-s">'meter'</span>), <span class="pl-v">ColumnDescription</span>(<span class="pl-s">'time'</span>, [<span class="pl-c1">10</span>, <span class="pl-c1">1</span>], <span class="pl-s1">title</span> <span class="pl-c1">=</span> <span class="pl-s">'Time in s'</span>, <span class="pl-s1">unit</span> <span class="pl-c1">=</span> <span class="pl-s">'s'</span>) ] <span class="pl-s1">d</span> <span class="pl-c1">=</span> {<span class="pl-s">'length'</span>:[<span class="pl-c1">1</span>, <span class="pl-c1">10</span>], <span class="pl-s">'time'</span>: [<span class="pl-c1">10</span>, <span class="pl-c1">1</span>]} <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-v">DataFrame</span>(<span class="pl-s1">d</span>) <span class="pl-k">print</span> <span class="pl-s">'standard df'</span> <span class="pl-k">print</span> <span class="pl-s1">df</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-v">DataFrame</span>(<span class="pl-s1">data</span>) <span class="pl-k">print</span> <span class="pl-s">'<span class="pl-cce">\n</span>'</span> <span class="pl-c1">+</span> <span class="pl-s">'new df'</span> <span class="pl-k">print</span> <span class="pl-s1">df</span> <span class="pl-c">####use of dimensions####</span> <span class="pl-c"># pint works with numpy arrays</span> <span class="pl-c"># df[name] is currently not working with pint, but would be I think </span> <span class="pl-c"># it would be a real enhancement if it would...</span> <span class="pl-s1">test</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">as_matrix</span>([<span class="pl-s">'length'</span>]) <span class="pl-c1">*</span> <span class="pl-en">units</span>(<span class="pl-s1">df</span>[<span class="pl-s">'length'</span>].<span class="pl-s1">unit</span>) <span class="pl-c1">/</span> \ (<span class="pl-s1">df</span>.<span class="pl-en">as_matrix</span>([<span class="pl-s">'time'</span>]) <span class="pl-c1">*</span> <span class="pl-en">units</span>(<span class="pl-s1">df</span>[<span class="pl-s">'time'</span>].<span class="pl-s1">unit</span>)) <span class="pl-k">print</span> <span class="pl-s">'<span class="pl-cce">\n</span>'</span> <span class="pl-c1">+</span> <span class="pl-s">'unit test'</span> <span class="pl-k">print</span> <span class="pl-s1">test</span> <span class="pl-k">print</span> <span class="pl-s">'<span class="pl-cce">\n</span>'</span> <span class="pl-c1">+</span> <span class="pl-s">'magnitude'</span> <span class="pl-k">print</span> <span class="pl-s1">test</span>.<span class="pl-s1">magnitude</span> <span class="pl-k">print</span> <span class="pl-s">'<span class="pl-cce">\n</span>'</span> <span class="pl-c1">+</span> <span class="pl-s">'dimensionality'</span> <span class="pl-k">print</span> <span class="pl-s1">test</span>.<span class="pl-s1">dimensionality</span></pre></div>
0
<p dir="auto">When exporting interfaces from a .d.ts file using the es6 module format, using a * symbol will generate an equivalent line in the javascript even if no file is generated by tsc.</p> <p dir="auto">test.d.ts:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export interface Test { }"><pre class="notranslate"><code class="notranslate">export interface Test { } </code></pre></div> <p dir="auto">module_no_asterisk.ts:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export {Test} from &quot;test&quot;;"><pre class="notranslate"><code class="notranslate">export {Test} from "test"; </code></pre></div> <p dir="auto">generates an empty file. However:</p> <p dir="auto">module_asterisk.ts:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export * from &quot;test&quot;;"><pre class="notranslate"><code class="notranslate">export * from "test"; </code></pre></div> <p dir="auto">generates the following.<br> module_asterisk.js:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export * from &quot;test&quot;;"><pre class="notranslate"><code class="notranslate">export * from "test"; </code></pre></div> <p dir="auto">even though no test file is generated due to it being a definition file.</p> <p dir="auto">Would it be possible to detect when an export * is nothing but interfaces and not generate any output?</p>
<p dir="auto">I have a file<code class="notranslate">interfaces.d.ts</code> which defines some interfaces, e.g:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export interface IFoo {} export interface IBar {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">IFoo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">IBar</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <p dir="auto">I want to reexport all interfaces in another module:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export * from &quot;interfaces&quot;;"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">"interfaces"</span><span class="pl-kos">;</span></pre></div> <p dir="auto">When targeting AMD, compiled code looks like this:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="define([&quot;require&quot;, &quot;exports&quot;, &quot;interfaces&quot;], function (require, exports, interfaces_1) { function __export(m) { for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; } __export(interfaces_1); });"><pre class="notranslate"><span class="pl-en">define</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-s">"require"</span><span class="pl-kos">,</span> <span class="pl-s">"exports"</span><span class="pl-kos">,</span> <span class="pl-s">"interfaces"</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">require</span><span class="pl-kos">,</span> <span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s1">interfaces_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">function</span> <span class="pl-en">__export</span><span class="pl-kos">(</span><span class="pl-s1">m</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">p</span> <span class="pl-k">in</span> <span class="pl-s1">m</span><span class="pl-kos">)</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">exports</span><span class="pl-kos">.</span><span class="pl-en">hasOwnProperty</span><span class="pl-kos">(</span><span class="pl-s1">p</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-s1">exports</span><span class="pl-kos">[</span><span class="pl-s1">p</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">m</span><span class="pl-kos">[</span><span class="pl-s1">p</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">__export</span><span class="pl-kos">(</span><span class="pl-s1">interfaces_1</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Module "interfaces" should not be imported at all, because it doesn't contain any JS code. To fix this I have to list all exported interfaces manually:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export { IFoo, IBar } from &quot;interfaces&quot;;"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-kos">{</span> <span class="pl-smi">IFoo</span><span class="pl-kos">,</span> <span class="pl-smi">IBar</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"interfaces"</span><span class="pl-kos">;</span></pre></div> <p dir="auto">It's a problem if the number of interfaces is large.</p> <p dir="auto">I use version 1.5.3.</p>
1
<p dir="auto">In native applications you can navigate between adjacent menu items using left and right arrow keys. In Electron this is impossible. Only up/down navigation works to select items from current open menu.</p> <p dir="auto">Windows 7, 64-bit<br> Electron 0.36.2</p>
<p dir="auto">I created the <a href="http://electron.atom.io/docs/latest/tutorial/quick-start/" rel="nofollow">Quick Start</a> app and ran it in Windows 8.1 Professional (64-bit) with <code class="notranslate">"electron-prebuilt": "^0.30.4"</code>.</p> <p dir="auto">Here are some ways in which using Electron menus from the keyboard don't work like Windows native menus:</p> <ol dir="auto"> <li>Pressing <code class="notranslate">Alt</code> by itself should select the first menu from the menu bar. (Electron just flashes the accelerator keys at you.)</li> <li>Similarly, pressing and releasing <code class="notranslate">Alt</code> then pressing a shortcut key should bring that menu up (Electron requires you to hold <code class="notranslate">Alt</code> while pressing the shortcut key, per item # 1 ).</li> <li>When you use the keyboard to choose a menu, the first item in the menu should be pre-selected. (Electron holds the menu open, but no item is selected.)</li> <li>When you have a menu selected, pressing <code class="notranslate">←</code> or <code class="notranslate">→</code> should take you to the first item in the menu to the left/right, respectively. (Electron ignores the left and right arrow keys.)</li> <li>When you have a menu selected, pressing <code class="notranslate">↑</code> should highlight the last item in the menu. (Electron highlights the first.)</li> </ol>
1
<h3 dir="auto">What problem does this feature solve?</h3> <p dir="auto">I use the following pattern to wait for a condition to hold:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const unwatch = this.$watch(function () { return this.queue.find((element) =&gt; element.shown === false); }, function (newValue, oldValue) { if (!newValue) return; unwatch(); // There is an element in the queue with shown === false. });"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">unwatch</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">$watch</span><span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">queue</span><span class="pl-kos">.</span><span class="pl-en">find</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">element</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">element</span><span class="pl-kos">.</span><span class="pl-c1">shown</span> <span class="pl-c1">===</span> <span class="pl-c1">false</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">newValue</span><span class="pl-kos">,</span> <span class="pl-s1">oldValue</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">newValue</span><span class="pl-kos">)</span> <span class="pl-k">return</span><span class="pl-kos">;</span> <span class="pl-s1">unwatch</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// There is an element in the queue with shown === false.</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">The problem is that this pattern is not possible to use if I also want callback to be called if the condition holds already when <code class="notranslate">$watch</code> is called. This is done by setting <code class="notranslate">immediate</code> to <code class="notranslate">true</code>. But then <code class="notranslate">unwatch</code> is not yet set because <code class="notranslate">$watch</code> has not returned.</p> <p dir="auto">I could be checking if the condition holds before creating <code class="notranslate">$watch</code> but this makes the code more complicated and in parts duplicated.</p> <h3 dir="auto">What does the proposed API look like?</h3> <p dir="auto">In Meteor's Tracker this is solved by providing access to current computation as an argument to the callback function. Maybe Vue could do the same and provide <code class="notranslate">unwatch</code> as the third argument to the callback <code class="notranslate">(newValue, oldValue, unwatch)</code>.</p>
<h3 dir="auto">Version</h3> <p dir="auto">2.6.7</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://jsfiddle.net/misq007/a5wth0rf/39/" rel="nofollow">https://jsfiddle.net/misq007/a5wth0rf/39/</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">the error will popup</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">Provide/Inject to work properly for the first level component in the same way as it is working when nested.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">Injection "mode" not found</p>
0
<p dir="auto">Rust does not interoperate with C unions right now. Doing so typically requires a lot of unsafe casting. Consensus seems to be that we need a macro-based solution.</p>
<p dir="auto">How would one call C functions involving union with Rust FFI?</p> <p dir="auto">SpiderMonkey's jsval is one example.</p>
1
<p dir="auto">Hi guys,</p> <p dir="auto">the tooltip function on a disabled button doesn't work in Firefox. The tooltip doesn't show up. No JS-Error thrown.<br> It works in Internet Explorer 10.</p> <p dir="auto">Regards,<br> davkraid</p>
<p dir="auto">If you have a button with the disabled class, the tooltip doesn't pop up. 😢</p>
1
<p dir="auto">(with a built-in class, or indeed a class defined using the native <code class="notranslate">class</code> syntax)</p> <h3 dir="auto">Input Code</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const headers = new class extends Headers {}"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">headers</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-k">class</span> <span class="pl-k">extends</span> <span class="pl-v">Headers</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <h3 dir="auto">Link to repl</h3> <p dir="auto"><a href="http://babeljs.io/repl/#?babili=false&amp;evaluate=true&amp;lineWrap=false&amp;presets=es2015&amp;targets=&amp;browsers=&amp;builtIns=false&amp;code=const%20headers%20%3D%20new%20class%20extends%20Headers%20%7B%7D&amp;experimental=false&amp;loose=false&amp;spec=false&amp;playground=true" rel="nofollow">babel repl</a></p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">generate code that works, as the input code does in browser</p> <h3 dir="auto">Current Behavior</h3> <p dir="auto">the generated code does not work (says `Constructor Headers requires 'new')</p> <h3 dir="auto">Context</h3> <p dir="auto">i just need to add a couple of methods in one place to a class that's already defined as a class (and as such requires new).</p>
<p dir="auto">Current Babel transform, when it comes to call the parent</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(&quot;this hasn't been initialised - super() hasn't been called&quot;); } return call &amp;&amp; (typeof call === &quot;object&quot; || typeof call === &quot;function&quot;) ? call : self; }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">_possibleConstructorReturn</span><span class="pl-kos">(</span><span class="pl-s1">self</span><span class="pl-kos">,</span> <span class="pl-s1">call</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-s1">self</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">ReferenceError</span><span class="pl-kos">(</span><span class="pl-s">"this hasn't been initialised - super() hasn't been called"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-s1">call</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-kos">(</span><span class="pl-k">typeof</span> <span class="pl-s1">call</span> <span class="pl-c1">===</span> <span class="pl-s">"object"</span> <span class="pl-c1">||</span> <span class="pl-k">typeof</span> <span class="pl-s1">call</span> <span class="pl-c1">===</span> <span class="pl-s">"function"</span><span class="pl-kos">)</span> ? <span class="pl-s1">call</span> : <span class="pl-s1">self</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">It's a way too poor implementation.</p> <p dir="auto">If we take the current basic ES6 compat syntax:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class List extends Array {}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">List</span> <span class="pl-k">extends</span> <span class="pl-v">Array</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <p dir="auto">We'll realize babel does a bad job.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var l = new List(); l instanceof List; // false"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">l</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">List</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">l</span> <span class="pl-k">instanceof</span> <span class="pl-v">List</span><span class="pl-kos">;</span> <span class="pl-c">// false</span></pre></div> <p dir="auto">The reason is simple: Babel replace the returns and exit, without caring about userland expectations.</p> <p dir="auto">This is how above basic extend should desugar:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function List() { return Object.setPrototypeOf( Array.apply(this, arguments), List.prototype ); }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-v">List</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span> <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-smi">arguments</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">It's a very ad-hoc case for the initial example that currently fails, but it's good enough to understand that inheriting the prototype is the least of the problem.</p> <p dir="auto">Indeed, we have 3 ways to do that within a transpiled code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// losing the initial prototype // for polyfilled ES5+ or lower List.prototype = Object.create( Array.prototype, {constructor: { configurable: true, writable: true, value: List.prototype }} ); // using a cleaner way // for ES5+ compliant targets Object.setPrototypeOf( List.prototype, Array.prototype ); // using a cleaner way // that works well with // partially polyfilled .setPrototypeOf List.prototype = Object.setPrototypeOf( List.prototype, Array.prototype );"><pre class="notranslate"><span class="pl-c">// losing the initial prototype</span> <span class="pl-c">// for polyfilled ES5+ or lower</span> <span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span> <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-kos">{</span><span class="pl-c1">constructor</span>: <span class="pl-kos">{</span> <span class="pl-c1">configurable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">writable</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c1">value</span>: <span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-kos">}</span><span class="pl-kos">}</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// using a cleaner way</span> <span class="pl-c">// for ES5+ compliant targets</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span> <span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// using a cleaner way</span> <span class="pl-c">// that works well with</span> <span class="pl-c">// partially polyfilled .setPrototypeOf</span> <span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span> <span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">,</span> <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Solved the inheritance bit, considering Babel also set the prototype of each constructor,<br> we need to address cases where a <code class="notranslate">super</code> call might "<em>upgrade</em>" the current context, like it is for <code class="notranslate">HTMLELement</code> or exotic native objects.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// native ES6 static example class List extends Array { constructor(a, b, c) { super(a, b); this.push(c); } }"><pre class="notranslate"><span class="pl-c">// native ES6 static example</span> <span class="pl-k">class</span> <span class="pl-v">List</span> <span class="pl-k">extends</span> <span class="pl-v">Array</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">,</span> <span class="pl-s1">c</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">c</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Above case should desugar to something like the follwoing:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function List(a, b, c) { // the super bit var self = Object.setPrototypeOf( Array.call(this, a, b), List.prototype ); // the rest with swapped context self.push(c); // at the end return self; }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-v">List</span><span class="pl-kos">(</span><span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">,</span> <span class="pl-s1">c</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// the super bit</span> <span class="pl-k">var</span> <span class="pl-s1">self</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span> <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s1">a</span><span class="pl-kos">,</span> <span class="pl-s1">b</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-v">List</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// the rest with swapped context</span> <span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">c</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// at the end</span> <span class="pl-k">return</span> <span class="pl-s1">self</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">which is also ad-hoc example code for the previous example.</p> <p dir="auto">Considering a transpiler will get the arguments part easily right, this is how previous case could be generically transpiled for arguments used in both constructors:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// to make it as generic as possible function Child() { // the super call bit desugar to ... var instance = Object.getPrototypeOf(Child) .apply(this, arguments), type = instance ? typeof instance : '', // if Parent overwrote its default return self = (type === 'object' || type === 'function') ? // upgrade the instance to reflect Child constructor Object.setPrototypeOf(instance, Child.prototype) : // otherwise use the current context as is this ; // at this point, the rest of the constructor // should use `self` instead of `this` self.push(c); // and return `self` reference at the end return self; }"><pre class="notranslate"><span class="pl-c">// to make it as generic as possible</span> <span class="pl-k">function</span> <span class="pl-v">Child</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// the super call bit desugar to ...</span> <span class="pl-k">var</span> <span class="pl-s1">instance</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">getPrototypeOf</span><span class="pl-kos">(</span><span class="pl-v">Child</span><span class="pl-kos">)</span> <span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-smi">arguments</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">type</span> <span class="pl-c1">=</span> <span class="pl-s1">instance</span> ? <span class="pl-k">typeof</span> <span class="pl-s1">instance</span> : <span class="pl-s">''</span><span class="pl-kos">,</span> <span class="pl-c">// if Parent overwrote its default return</span> <span class="pl-s1">self</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span> <span class="pl-c1">||</span> <span class="pl-s1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'function'</span><span class="pl-kos">)</span> ? <span class="pl-c">// upgrade the instance to reflect Child constructor</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span><span class="pl-s1">instance</span><span class="pl-kos">,</span> <span class="pl-v">Child</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">)</span> : <span class="pl-c">// otherwise use the current context as is</span> <span class="pl-smi">this</span> <span class="pl-kos">;</span> <span class="pl-c">// at this point, the rest of the constructor</span> <span class="pl-c">// should use `self` instead of `this`</span> <span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">c</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// and return `self` reference at the end</span> <span class="pl-k">return</span> <span class="pl-s1">self</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">The last problem is that modern syntax would use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect" rel="nofollow">Reflect</a> to create any sort of object, instead of old, ES3 friendly, <code class="notranslate">.call</code> or <code class="notranslate">.apply</code> way.</p> <p dir="auto">Following a past, present, and even future proof approach:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var reConstruct = typeof Reflect === 'object' ? Reflect.construct : function (Parent, args, Child) { return Parent.apply(this, args); } ; function Child() { // the super call bit var instance = reConstruct.call( this, Object.getPrototypeOf(Child), arguments, Child ), type = instance ? typeof instance : '', self = (type === 'object' || type === 'function') ? Object.setPrototypeOf(instance, Child.prototype) : this ; // the rest of the constructor body self.push(c); // at the end or instead of empty returns return self; }"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">reConstruct</span> <span class="pl-c1">=</span> <span class="pl-k">typeof</span> <span class="pl-v">Reflect</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span> ? <span class="pl-v">Reflect</span><span class="pl-kos">.</span><span class="pl-c1">construct</span> : <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-v">Parent</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">,</span> <span class="pl-v">Child</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-v">Parent</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-s1">args</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">;</span> <span class="pl-k">function</span> <span class="pl-v">Child</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// the super call bit</span> <span class="pl-k">var</span> <span class="pl-s1">instance</span> <span class="pl-c1">=</span> <span class="pl-s1">reConstruct</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span> <span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">getPrototypeOf</span><span class="pl-kos">(</span><span class="pl-v">Child</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-smi">arguments</span><span class="pl-kos">,</span> <span class="pl-v">Child</span> <span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">type</span> <span class="pl-c1">=</span> <span class="pl-s1">instance</span> ? <span class="pl-k">typeof</span> <span class="pl-s1">instance</span> : <span class="pl-s">''</span><span class="pl-kos">,</span> <span class="pl-s1">self</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'object'</span> <span class="pl-c1">||</span> <span class="pl-s1">type</span> <span class="pl-c1">===</span> <span class="pl-s">'function'</span><span class="pl-kos">)</span> ? <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">setPrototypeOf</span><span class="pl-kos">(</span><span class="pl-s1">instance</span><span class="pl-kos">,</span> <span class="pl-v">Child</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">)</span> : <span class="pl-smi">this</span> <span class="pl-kos">;</span> <span class="pl-c">// the rest of the constructor body</span> <span class="pl-s1">self</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">c</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// at the end or instead of empty returns</span> <span class="pl-k">return</span> <span class="pl-s1">self</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Above solution would work with userland, exotic, or DOM constructors, and in both native and transpiled engines.</p>
1
<p dir="auto">Sending an https request with timeout, does not make retries when it gets a timeout.<br> Code:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import requests s = requests.session() s.mount('https://localhost:10000', requests.adapters.HTTPAdapter(max_retries = 3)) s.post('https://localhost:10000', timeout = 3)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">requests</span> <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">requests</span>.<span class="pl-en">session</span>() <span class="pl-s1">s</span>.<span class="pl-en">mount</span>(<span class="pl-s">'https://localhost:10000'</span>, <span class="pl-s1">requests</span>.<span class="pl-s1">adapters</span>.<span class="pl-v">HTTPAdapter</span>(<span class="pl-s1">max_retries</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span>)) <span class="pl-s1">s</span>.<span class="pl-en">post</span>(<span class="pl-s">'https://localhost:10000'</span>, <span class="pl-s1">timeout</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span>)</pre></div> <p dir="auto">Raises this exception (with no retries):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="File &quot;/usr/local/lib/python2.7/dist-packages/requests/sessions.py&quot;, line 498, in post return self.request('POST', url, data=data, **kwargs) File &quot;/usr/local/lib/python2.7/dist-packages/requests/sessions.py&quot;, line 456, in request resp = self.send(prep, **send_kwargs) File &quot;/usr/local/lib/python2.7/dist-packages/requests/sessions.py&quot;, line 559, in send r = adapter.send(request, **kwargs) File &quot;/usr/local/lib/python2.7/dist-packages/requests/adapters.py&quot;, line 382, in send raise SSLError(e, request=request) SSLError: _ssl.c:492: The handshake operation timed out"><pre class="notranslate"><code class="notranslate">File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 498, in post return self.request('POST', url, data=data, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 456, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 559, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 382, in send raise SSLError(e, request=request) SSLError: _ssl.c:492: The handshake operation timed out </code></pre></div> <p dir="auto">A similar request (even using the same session object) with <code class="notranslate">http</code> instead of <code class="notranslate">https</code> raises the exception <code class="notranslate">Timeout: HTTPConnectionPool(host='localhost', port=10000): Read timed out. (read timeout=1)</code> after 3 retries as expected.</p> <p dir="auto">This does not seem to be a general issue with ssl + retries - I've successfully used both</p> <p dir="auto">The problem was found on version 2.3.0 both on linux and windows, and also on the latest version - 2.4.3 (tried on linux only).</p>
<p dir="auto">Alternative title: <em>A bugfix in urlib3 raises a new bug in requests.</em> (I tried to figure out what changed in <code class="notranslate">urllib3</code> but was not able to do so).</p> <p dir="auto">I believe the issue has to do with these lines (</p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/psf/requests/blob/ac3be98b19f4d09c6a970b271a3ae30f3d0858f7/requests/adapters.py#L509-L539">requests/requests/adapters.py</a> </p> <p class="mb-0 color-fg-muted"> Lines 509 to 539 in <a data-pjax="true" class="commit-tease-sha" href="/psf/requests/commit/ac3be98b19f4d09c6a970b271a3ae30f3d0858f7">ac3be98</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L509" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="509"></td> <td id="LC509" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">try</span>: </td> </tr> <tr class="border-0"> <td id="L510" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="510"></td> <td id="LC510" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">skip_host</span> <span class="pl-c1">=</span> <span class="pl-s">"Host"</span> <span class="pl-c1">in</span> <span class="pl-s1">request</span>.<span class="pl-s1">headers</span> </td> </tr> <tr class="border-0"> <td id="L511" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="511"></td> <td id="LC511" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">low_conn</span>.<span class="pl-en">putrequest</span>( </td> </tr> <tr class="border-0"> <td id="L512" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="512"></td> <td id="LC512" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">request</span>.<span class="pl-s1">method</span>, </td> </tr> <tr class="border-0"> <td id="L513" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="513"></td> <td id="LC513" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">url</span>, </td> </tr> <tr class="border-0"> <td id="L514" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="514"></td> <td id="LC514" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">skip_accept_encoding</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, </td> </tr> <tr class="border-0"> <td id="L515" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="515"></td> <td id="LC515" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">skip_host</span><span class="pl-c1">=</span><span class="pl-s1">skip_host</span>, </td> </tr> <tr class="border-0"> <td id="L516" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="516"></td> <td id="LC516" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> ) </td> </tr> <tr class="border-0"> <td id="L517" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="517"></td> <td id="LC517" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td> </tr> <tr class="border-0"> <td id="L518" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="518"></td> <td id="LC518" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">for</span> <span class="pl-s1">header</span>, <span class="pl-s1">value</span> <span class="pl-c1">in</span> <span class="pl-s1">request</span>.<span class="pl-s1">headers</span>.<span class="pl-en">items</span>(): </td> </tr> <tr class="border-0"> <td id="L519" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="519"></td> <td id="LC519" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">low_conn</span>.<span class="pl-en">putheader</span>(<span class="pl-s1">header</span>, <span class="pl-s1">value</span>) </td> </tr> <tr class="border-0"> <td id="L520" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="520"></td> <td id="LC520" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td> </tr> <tr class="border-0"> <td id="L521" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="521"></td> <td id="LC521" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">low_conn</span>.<span class="pl-en">endheaders</span>() </td> </tr> <tr class="border-0"> <td id="L522" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="522"></td> <td id="LC522" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td> </tr> <tr class="border-0"> <td id="L523" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="523"></td> <td id="LC523" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-s1">request</span>.<span class="pl-s1">body</span>: </td> </tr> <tr class="border-0"> <td id="L524" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="524"></td> <td id="LC524" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">low_conn</span>.<span class="pl-en">send</span>(<span class="pl-en">hex</span>(<span class="pl-en">len</span>(<span class="pl-s1">i</span>))[<span class="pl-c1">2</span>:].<span class="pl-en">encode</span>(<span class="pl-s">"utf-8"</span>)) </td> </tr> <tr class="border-0"> <td id="L525" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="525"></td> <td id="LC525" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">low_conn</span>.<span class="pl-en">send</span>(<span class="pl-s">b"<span class="pl-cce">\r</span><span class="pl-cce">\n</span>"</span>) </td> </tr> <tr class="border-0"> <td id="L526" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="526"></td> <td id="LC526" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">low_conn</span>.<span class="pl-en">send</span>(<span class="pl-s1">i</span>) </td> </tr> <tr class="border-0"> <td id="L527" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="527"></td> <td id="LC527" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">low_conn</span>.<span class="pl-en">send</span>(<span class="pl-s">b"<span class="pl-cce">\r</span><span class="pl-cce">\n</span>"</span>) </td> </tr> <tr class="border-0"> <td id="L528" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="528"></td> <td id="LC528" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">low_conn</span>.<span class="pl-en">send</span>(<span class="pl-s">b"0<span class="pl-cce">\r</span><span class="pl-cce">\n</span><span class="pl-cce">\r</span><span class="pl-cce">\n</span>"</span>) </td> </tr> <tr class="border-0"> <td id="L529" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="529"></td> <td id="LC529" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td> </tr> <tr class="border-0"> <td id="L530" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="530"></td> <td id="LC530" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"># Receive the response from the server</span> </td> </tr> <tr class="border-0"> <td id="L531" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="531"></td> <td id="LC531" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">r</span> <span class="pl-c1">=</span> <span class="pl-s1">low_conn</span>.<span class="pl-en">getresponse</span>() </td> </tr> <tr class="border-0"> <td id="L532" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="532"></td> <td id="LC532" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td> </tr> <tr class="border-0"> <td id="L533" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="533"></td> <td id="LC533" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">resp</span> <span class="pl-c1">=</span> <span class="pl-v">HTTPResponse</span>.<span class="pl-en">from_httplib</span>( </td> </tr> <tr class="border-0"> <td id="L534" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="534"></td> <td id="LC534" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">r</span>, </td> </tr> <tr class="border-0"> <td id="L535" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="535"></td> <td id="LC535" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">pool</span><span class="pl-c1">=</span><span class="pl-s1">conn</span>, </td> </tr> <tr class="border-0"> <td id="L536" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="536"></td> <td id="LC536" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">connection</span><span class="pl-c1">=</span><span class="pl-s1">low_conn</span>, </td> </tr> <tr class="border-0"> <td id="L537" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="537"></td> <td id="LC537" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">preload_content</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, </td> </tr> <tr class="border-0"> <td id="L538" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="538"></td> <td id="LC538" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">decode_content</span><span class="pl-c1">=</span><span class="pl-c1">False</span>, </td> </tr> <tr class="border-0"> <td id="L539" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="539"></td> <td id="LC539" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> ) </td> </tr> </tbody></table> </div> </div> ). It seems like the library is uploading the body with a <code class="notranslate">PUT</code> while it should first follow the redirection before uploading the body.<p></p> <p dir="auto">We've traced this down, confusingly, to different behavior for <code class="notranslate">requests</code> depending on the <code class="notranslate">urllib3</code> version. Essentially, on an older <code class="notranslate">urllib3</code>, python <code class="notranslate">requests</code> will send the entire file twice(!) which can be time-consuming for larger files. This is <strong>incorrect</strong> behavior. Upon a <code class="notranslate">PUT</code> to a node that responds with a 307/redirect, <code class="notranslate">requests</code> sends the whole body then handles redirects, and then <code class="notranslate">PUT</code> again.</p> <h2 dir="auto">Expected Result</h2> <p dir="auto">I expected for a <code class="notranslate">PUT</code> request receiving a 307 to redirect and re-<code class="notranslate">PUT</code> (It does) but doesn't send data immediately until after redirects are resolved. This should probably behave more like what <code class="notranslate">curl</code> is doing (see output below).</p> <h2 dir="auto">Actual Result</h2> <p dir="auto">Data is sent immediately instead of checking for redirects, causing the file to be sent at least twice.</p> <h2 dir="auto">Reproduction Steps</h2> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import requests import subprocess import logging # These two lines enable debugging at httplib level (requests-&gt;urllib3-&gt;http.client) # You will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA. # The only thing missing will be the response.body which is not logged. try: import http.client as http_client except ImportError: # Python 2 import httplib as http_client http_client.HTTPConnection.debuglevel = 1 # You must initialize logging, otherwise you'll not see debug output. logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) requests_log = logging.getLogger(&quot;requests.packages.urllib3&quot;) requests_log.setLevel(logging.DEBUG) requests_log.propagate = True print(&quot;working with big file&quot;) fpath = &quot;big_file.txt&quot; fp = open(fpath, 'rb') sever = &quot;https:// .... &quot; # our internal server try: ret = requests.put(f&quot;{server}&quot;, headers={&quot;Content-Type&quot;:&quot;application/octet-stream&quot;}, data=fp, allow_redirects = True, stream = True) print(ret.status_code) except Exception as exception: print(exception)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">requests</span> <span class="pl-k">import</span> <span class="pl-s1">subprocess</span> <span class="pl-k">import</span> <span class="pl-s1">logging</span> <span class="pl-c"># These two lines enable debugging at httplib level (requests-&gt;urllib3-&gt;http.client)</span> <span class="pl-c"># You will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA.</span> <span class="pl-c"># The only thing missing will be the response.body which is not logged.</span> <span class="pl-k">try</span>: <span class="pl-k">import</span> <span class="pl-s1">http</span>.<span class="pl-s1">client</span> <span class="pl-k">as</span> <span class="pl-s1">http_client</span> <span class="pl-k">except</span> <span class="pl-v">ImportError</span>: <span class="pl-c"># Python 2</span> <span class="pl-k">import</span> <span class="pl-s1">httplib</span> <span class="pl-k">as</span> <span class="pl-s1">http_client</span> <span class="pl-s1">http_client</span>.<span class="pl-v">HTTPConnection</span>.<span class="pl-s1">debuglevel</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span> <span class="pl-c"># You must initialize logging, otherwise you'll not see debug output.</span> <span class="pl-s1">logging</span>.<span class="pl-en">basicConfig</span>() <span class="pl-s1">logging</span>.<span class="pl-en">getLogger</span>().<span class="pl-en">setLevel</span>(<span class="pl-s1">logging</span>.<span class="pl-v">DEBUG</span>) <span class="pl-s1">requests_log</span> <span class="pl-c1">=</span> <span class="pl-s1">logging</span>.<span class="pl-en">getLogger</span>(<span class="pl-s">"requests.packages.urllib3"</span>) <span class="pl-s1">requests_log</span>.<span class="pl-en">setLevel</span>(<span class="pl-s1">logging</span>.<span class="pl-v">DEBUG</span>) <span class="pl-s1">requests_log</span>.<span class="pl-s1">propagate</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span> <span class="pl-en">print</span>(<span class="pl-s">"working with big file"</span>) <span class="pl-s1">fpath</span> <span class="pl-c1">=</span> <span class="pl-s">"big_file.txt"</span> <span class="pl-s1">fp</span> <span class="pl-c1">=</span> <span class="pl-en">open</span>(<span class="pl-s1">fpath</span>, <span class="pl-s">'rb'</span>) <span class="pl-s1">sever</span> <span class="pl-c1">=</span> <span class="pl-s">"https:// .... "</span> <span class="pl-c"># our internal server</span> <span class="pl-k">try</span>: <span class="pl-s1">ret</span> <span class="pl-c1">=</span> <span class="pl-s1">requests</span>.<span class="pl-en">put</span>(<span class="pl-s">f"<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">server</span><span class="pl-kos">}</span></span>"</span>, <span class="pl-s1">headers</span><span class="pl-c1">=</span>{<span class="pl-s">"Content-Type"</span>:<span class="pl-s">"application/octet-stream"</span>}, <span class="pl-s1">data</span><span class="pl-c1">=</span><span class="pl-s1">fp</span>, <span class="pl-s1">allow_redirects</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">stream</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>) <span class="pl-en">print</span>(<span class="pl-s1">ret</span>.<span class="pl-s1">status_code</span>) <span class="pl-k">except</span> <span class="pl-v">Exception</span> <span class="pl-k">as</span> <span class="pl-s1">exception</span>: <span class="pl-en">print</span>(<span class="pl-s1">exception</span>)</pre></div> <p dir="auto">Meanwhile, <code class="notranslate">curl</code> seems to do the RightThing™ here:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ time curl -L -v https://server/large_file.txt --upload-file ./big_file.txt * About to connect() to server port 443 (#0) * Trying ADDRESS... * Connected to server(ADDRESS) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * NSS: client certificate not found (nickname not specified) * SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 * Server certificate: * subject: CN=CN_INFO * start date: Jun 27 21:45:02 2022 GMT * expire date: Aug 01 21:45:02 2023 GMT * common name: SERVER * issuer: CN=CN_AUTHORITY &gt; PUT /large_file.txt HTTP/1.1 &gt; User-Agent: curl/7.29.0 &gt; Host: server:443 &gt; Accept: */* &gt; Content-Length: 1048576 &gt; Expect: 100-continue &gt; &lt; HTTP/1.1 307 TEMPORARY_REDIRECT &lt; Connection: Keep-Alive &lt; Server: XrootD/5.5.5 &lt; Content-Length: 0 &lt; Date: Tue, 20 Dec 2022 14:34:33 GMT &lt; ETag: &quot;751376756371357696:00000000&quot; &lt; Location: http://server_redirect/large_file.txt &lt; * Closing connection 0 * Issue another request to this URL: 'http://server_redirect/large_file.txt' * About to connect() to server_redirect port 443 (#1) * Trying ADDRESS... * Connected to server_redirect (ADDRESS) port 443 (#1) &gt; PUT /server_redirect/large_file.txt HTTP/1.1 &gt; User-Agent: curl/7.29.0 &gt; Host: server_redirect:443 &gt; Accept: */* &gt; Content-Length: 1048576 &gt; Expect: 100-continue &gt; &lt; HTTP/1.1 100 Continue &lt; Connection: Close &lt; Server: OURSERVER &lt; Date: Tue, 20 Dec 2022 14:34:33 GMT * We are completely uploaded and fine &lt; HTTP/1.1 201 CREATED &lt; Connection: Keep-Alive &lt; Server: OURSERVER &lt; Content-Length: 0"><pre class="notranslate">$ <span class="pl-k">time</span> curl -L -v https://server/large_file.txt --upload-file ./big_file.txt <span class="pl-k">*</span> About to <span class="pl-en">connect</span>() to server port 443 (<span class="pl-c"><span class="pl-c">#</span>0)</span> <span class="pl-k">*</span> Trying ADDRESS... <span class="pl-k">*</span> Connected to server(ADDRESS) port 443 (<span class="pl-c"><span class="pl-c">#</span>0)</span> <span class="pl-k">*</span> Initializing NSS with certpath: sql:/etc/pki/nssdb <span class="pl-k">*</span> CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none <span class="pl-k">*</span> NSS: client certificate not found (nickname not specified) <span class="pl-k">*</span> SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 <span class="pl-k">*</span> Server certificate: <span class="pl-k">*</span> subject: CN=CN_INFO <span class="pl-k">*</span> start date: Jun 27 21:45:02 2022 GMT <span class="pl-k">*</span> expire date: Aug 01 21:45:02 2023 GMT <span class="pl-k">*</span> common name: SERVER <span class="pl-k">*</span> issuer: CN=CN_AUTHORITY <span class="pl-k">&gt;</span> PUT /large_file.txt HTTP/1.1 <span class="pl-k">&gt;</span> User-Agent: curl/7.29.0 <span class="pl-k">&gt;</span> Host: server:443 <span class="pl-k">&gt;</span> Accept: <span class="pl-k">*</span>/<span class="pl-k">*</span> <span class="pl-k">&gt;</span> Content-Length: 1048576 <span class="pl-k">&gt;</span> Expect: 100-continue <span class="pl-k">&gt;</span> <span class="pl-k">&lt;</span> HTTP/1.1 307 TEMPORARY_REDIRECT <span class="pl-k">&lt;</span> Connection: Keep-Alive <span class="pl-k">&lt;</span> Server: XrootD/5.5.5 <span class="pl-k">&lt;</span> Content-Length: 0 <span class="pl-k">&lt;</span> Date: Tue, 20 Dec 2022 14:34:33 GMT <span class="pl-k">&lt;</span> ETag: <span class="pl-s"><span class="pl-pds">"</span>751376756371357696:00000000<span class="pl-pds">"</span></span> <span class="pl-k">&lt;</span> Location: http://server_redirect/large_file.txt <span class="pl-k">&lt;</span> <span class="pl-k">*</span> Closing connection 0 <span class="pl-k">*</span> Issue another request to this URL: <span class="pl-s"><span class="pl-pds">'</span>http://server_redirect/large_file.txt<span class="pl-pds">'</span></span> <span class="pl-k">*</span> About to <span class="pl-en">connect</span>() to server_redirect port 443 (<span class="pl-c"><span class="pl-c">#</span>1)</span> <span class="pl-k">*</span> Trying ADDRESS... <span class="pl-k">*</span> Connected to server_redirect (ADDRESS) port 443 (<span class="pl-c"><span class="pl-c">#</span>1)</span> <span class="pl-k">&gt;</span> PUT /server_redirect/large_file.txt HTTP/1.1 <span class="pl-k">&gt;</span> User-Agent: curl/7.29.0 <span class="pl-k">&gt;</span> Host: server_redirect:443 <span class="pl-k">&gt;</span> Accept: <span class="pl-k">*</span>/<span class="pl-k">*</span> <span class="pl-k">&gt;</span> Content-Length: 1048576 <span class="pl-k">&gt;</span> Expect: 100-continue <span class="pl-k">&gt;</span> <span class="pl-k">&lt;</span> HTTP/1.1 100 Continue <span class="pl-k">&lt;</span> Connection: Close <span class="pl-k">&lt;</span> Server: OURSERVER <span class="pl-k">&lt;</span> Date: Tue, 20 Dec 2022 14:34:33 GMT <span class="pl-k">*</span> We are completely uploaded and fine <span class="pl-k">&lt;</span> HTTP/1.1 201 CREATED <span class="pl-k">&lt;</span> Connection: Keep-Alive <span class="pl-k">&lt;</span> Server: OURSERVER <span class="pl-k">&lt;</span> Content-Length: 0</pre></div> <h2 dir="auto">System Information</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ python -m requests.help"><pre class="notranslate"><code class="notranslate">$ python -m requests.help </code></pre></div> <p dir="auto">This (older) version silently works:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;chardet&quot;: { &quot;version&quot;: &quot;4.0.0&quot; }, &quot;charset_normalizer&quot;: { &quot;version&quot;: &quot;2.0.12&quot; }, &quot;cryptography&quot;: { &quot;version&quot;: &quot;&quot; }, &quot;idna&quot;: { &quot;version&quot;: &quot;2.10&quot; }, &quot;implementation&quot;: { &quot;name&quot;: &quot;CPython&quot;, &quot;version&quot;: &quot;3.7.9&quot; }, &quot;platform&quot;: { &quot;release&quot;: &quot;22.1.0&quot;, &quot;system&quot;: &quot;Darwin&quot; }, &quot;pyOpenSSL&quot;: { &quot;openssl_version&quot;: &quot;&quot;, &quot;version&quot;: null }, &quot;requests&quot;: { &quot;version&quot;: &quot;2.27.1&quot; }, &quot;system_ssl&quot;: { &quot;version&quot;: &quot;1010113f&quot; }, &quot;urllib3&quot;: { &quot;version&quot;: &quot;1.26.3&quot; }, &quot;using_charset_normalizer&quot;: false, &quot;using_pyopenssl&quot;: false }"><pre class="notranslate">{ <span class="pl-ent">"chardet"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>4.0.0<span class="pl-pds">"</span></span> }, <span class="pl-ent">"charset_normalizer"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.0.12<span class="pl-pds">"</span></span> }, <span class="pl-ent">"cryptography"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span> }, <span class="pl-ent">"idna"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.10<span class="pl-pds">"</span></span> }, <span class="pl-ent">"implementation"</span>: { <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>CPython<span class="pl-pds">"</span></span>, <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>3.7.9<span class="pl-pds">"</span></span> }, <span class="pl-ent">"platform"</span>: { <span class="pl-ent">"release"</span>: <span class="pl-s"><span class="pl-pds">"</span>22.1.0<span class="pl-pds">"</span></span>, <span class="pl-ent">"system"</span>: <span class="pl-s"><span class="pl-pds">"</span>Darwin<span class="pl-pds">"</span></span> }, <span class="pl-ent">"pyOpenSSL"</span>: { <span class="pl-ent">"openssl_version"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>, <span class="pl-ent">"version"</span>: <span class="pl-c1">null</span> }, <span class="pl-ent">"requests"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.27.1<span class="pl-pds">"</span></span> }, <span class="pl-ent">"system_ssl"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1010113f<span class="pl-pds">"</span></span> }, <span class="pl-ent">"urllib3"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.26.3<span class="pl-pds">"</span></span> }, <span class="pl-ent">"using_charset_normalizer"</span>: <span class="pl-c1">false</span>, <span class="pl-ent">"using_pyopenssl"</span>: <span class="pl-c1">false</span> }</pre></div> <p dir="auto">This version breaks (correctly):</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;chardet&quot;: { &quot;version&quot;: null }, &quot;charset_normalizer&quot;: { &quot;version&quot;: &quot;2.1.1&quot; }, &quot;cryptography&quot;: { &quot;version&quot;: &quot;&quot; }, &quot;idna&quot;: { &quot;version&quot;: &quot;3.4&quot; }, &quot;implementation&quot;: { &quot;name&quot;: &quot;CPython&quot;, &quot;version&quot;: &quot;3.10.6&quot; }, &quot;platform&quot;: { &quot;release&quot;: &quot;22.1.0&quot;, &quot;system&quot;: &quot;Darwin&quot; }, &quot;pyOpenSSL&quot;: { &quot;openssl_version&quot;: &quot;&quot;, &quot;version&quot;: null }, &quot;requests&quot;: { &quot;version&quot;: &quot;2.28.1&quot; }, &quot;system_ssl&quot;: { &quot;version&quot;: &quot;1010113f&quot; }, &quot;urllib3&quot;: { &quot;version&quot;: &quot;1.26.13&quot; }, &quot;using_charset_normalizer&quot;: true, &quot;using_pyopenssl&quot;: false }"><pre class="notranslate">{ <span class="pl-ent">"chardet"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-c1">null</span> }, <span class="pl-ent">"charset_normalizer"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.1.1<span class="pl-pds">"</span></span> }, <span class="pl-ent">"cryptography"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span> }, <span class="pl-ent">"idna"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>3.4<span class="pl-pds">"</span></span> }, <span class="pl-ent">"implementation"</span>: { <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>CPython<span class="pl-pds">"</span></span>, <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>3.10.6<span class="pl-pds">"</span></span> }, <span class="pl-ent">"platform"</span>: { <span class="pl-ent">"release"</span>: <span class="pl-s"><span class="pl-pds">"</span>22.1.0<span class="pl-pds">"</span></span>, <span class="pl-ent">"system"</span>: <span class="pl-s"><span class="pl-pds">"</span>Darwin<span class="pl-pds">"</span></span> }, <span class="pl-ent">"pyOpenSSL"</span>: { <span class="pl-ent">"openssl_version"</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-pds">"</span></span>, <span class="pl-ent">"version"</span>: <span class="pl-c1">null</span> }, <span class="pl-ent">"requests"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>2.28.1<span class="pl-pds">"</span></span> }, <span class="pl-ent">"system_ssl"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1010113f<span class="pl-pds">"</span></span> }, <span class="pl-ent">"urllib3"</span>: { <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.26.13<span class="pl-pds">"</span></span> }, <span class="pl-ent">"using_charset_normalizer"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"using_pyopenssl"</span>: <span class="pl-c1">false</span> }</pre></div>
0
<p dir="auto">When creat a array with set the dtype , the array just lost the columns which the dtype is numpy.string_,numpy.str,numpy.str_,numpy.str0 .<br> And when i change 'string_' to '&lt;U1' ,that will work .</p> <h3 dir="auto">Reproducing code example:</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np &lt;&lt; your code here &gt;&gt; b = np.array([('a',1,2),(3,4,5),(6,7,8)], dtype=([('name','string_'),('age','int8'),('salary','float32')])) a = np.array([('a',1,2),(3,4,5),(6,7,8)], dtype=([('name','&lt;U1'),('age','int8'),('salary','float32')]))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-c1">&lt;&lt;</span> <span class="pl-s1">your</span> <span class="pl-s1">code</span> <span class="pl-s1">here</span> <span class="pl-c1">&gt;&gt;</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([(<span class="pl-s">'a'</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span>),(<span class="pl-c1">3</span>,<span class="pl-c1">4</span>,<span class="pl-c1">5</span>),(<span class="pl-c1">6</span>,<span class="pl-c1">7</span>,<span class="pl-c1">8</span>)], <span class="pl-s1">dtype</span><span class="pl-c1">=</span>([(<span class="pl-s">'name'</span>,<span class="pl-s">'string_'</span>),(<span class="pl-s">'age'</span>,<span class="pl-s">'int8'</span>),(<span class="pl-s">'salary'</span>,<span class="pl-s">'float32'</span>)])) <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([(<span class="pl-s">'a'</span>,<span class="pl-c1">1</span>,<span class="pl-c1">2</span>),(<span class="pl-c1">3</span>,<span class="pl-c1">4</span>,<span class="pl-c1">5</span>),(<span class="pl-c1">6</span>,<span class="pl-c1">7</span>,<span class="pl-c1">8</span>)], <span class="pl-s1">dtype</span><span class="pl-c1">=</span>([(<span class="pl-s">'name'</span>,<span class="pl-s">'&lt;U1'</span>),(<span class="pl-s">'age'</span>,<span class="pl-s">'int8'</span>),(<span class="pl-s">'salary'</span>,<span class="pl-s">'float32'</span>)]))</pre></div> <h3 dir="auto">Error message:</h3> <h3 dir="auto">Numpy/Python version information:</h3> <p dir="auto">1.15.0 3.6.6 |Anaconda custom (64-bit)| (default, Jun 28 2018, 11:27:44) [MSC v.1900 64 bit (AMD64)]</p>
<p dir="auto">Example:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; dt = np.dtype([('f', float), ('s', str)]) &gt;&gt;&gt; np.array([(1.0, &quot;hello world&quot;)], dt) array([(1.0, '')], dtype=[('f', '&lt;f8'), ('s', 'S')])"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">dt</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">dtype</span>([(<span class="pl-s">'f'</span>, <span class="pl-s1">float</span>), (<span class="pl-s">'s'</span>, <span class="pl-s1">str</span>)]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([(<span class="pl-c1">1.0</span>, <span class="pl-s">"hello world"</span>)], <span class="pl-s1">dt</span>) <span class="pl-en">array</span>([(<span class="pl-c1">1.0</span>, <span class="pl-s">''</span>)], <span class="pl-s1">dtype</span><span class="pl-c1">=</span>[(<span class="pl-s">'f'</span>, <span class="pl-s">'&lt;f8'</span>), (<span class="pl-s">'s'</span>, <span class="pl-s">'S'</span>)])</pre></div> <p dir="auto">Proposal: This should either resize or raise a ValueError (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="223359260" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/8970" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/8970/hovercard" href="https://github.com/numpy/numpy/pull/8970">#8970</a>), as it seems like it would always mask bugs</p>
1
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 10.0.18363.900 PowerToys version: 0.19.0 PowerToy module for which you are reporting the bug: PowerToys Run, Keyboard Manager"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.18363.900 PowerToys version: 0.19.0 PowerToy module for which you are reporting the bug: PowerToys Run, Keyboard Manager </code></pre></div> <h1 dir="auto">What I did</h1> <ol dir="auto"> <li>I changed the keyboard shortcut for PowerToys Run to Win+R (aka the current Run shortcut)</li> <li>After I saw that Run still triggered on Win+R, I changed the PowerToys Run shortcut back to Alt+Spacebar</li> <li>I then used Keyboard Manager, so that Win+R would trigger Alt+Spacebar</li> </ol> <h1 dir="auto">Expected behavior</h1> <p dir="auto">At first, the system behaved as expected, triggering PowerToys Run whenever I hit Win+R</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Eventually, whenever I hit the spacebar, PowerToys Run would launch. I would change settings in PowerToys to prevent this behavior. My fixes (which included removing the shortcut remap) worked at first, but eventually, the bug would be triggered again. I tried deleting the PowerToys app and reinstalling it. Since the data from my previous installation is backed up, I'm worried that the bug will come again, forcing me to disable PowerToys Run completely.</p>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [run &quot;ver&quot; at a command prompt] PowerToys version: 0.19 PowerToy module for which you are reporting the bug (if applicable): PT Run"><pre class="notranslate"><code class="notranslate">Windows build number: [run "ver" at a command prompt] PowerToys version: 0.19 PowerToy module for which you are reporting the bug (if applicable): PT Run </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Remap key from alt-space to win-space<br> execute shortcut multiple times</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">don't have start menu false positive executions</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Lots of start menu executions</p>
1
<p dir="auto">Recently upgraded from 0.35 to 1.3, and now, simply put, the electron process (specifically the <code class="notranslate">webContents</code>?) crashes every time a request is made to an HTTP URL.</p> <ul dir="auto"> <li>Electron version: 1.3.3</li> <li>Operating system: Arch Linux</li> </ul> <p dir="auto">There's no discernible error message, the window goes white and the devtools report they have been disconnected, and the <code class="notranslate">mainWindow.webContents</code> throws a <code class="notranslate">crashed</code> event but not much else. The Network tab of the devtools shows that the request begins and reaches Waiting (TTFB), but does not start actually downloading the content.</p> <p dir="auto">I've tried requesting pages using both the <code class="notranslate">request</code> and <code class="notranslate">needle</code> libraries, and both cause the crash. HTTP calls in the server (i.e., where <code class="notranslate">app.on('ready')</code> is defined) do NOT crash the client in any form.</p> <p dir="auto">Not sure if I've missed something obvious. Any help would be appreciated.</p>
<ul dir="auto"> <li>Electron version: 1.3.3</li> <li>Operating system: Windows 10.0.10586</li> </ul> <p dir="auto">The issue is one of my webviews is crashing when using the <em><strong>fetch</strong></em> api. I use it to handle a chunked http response.</p> <p dir="auto">When calling <strong><em>stream.read()</em></strong> for a second time it returns Promise.reject(NETWORK ERROR) and the webview crashes.</p> <p dir="auto">The issue does not occur on mac os.</p> <p dir="auto">I'm attaching some dump information. I failed to add the symbols but I'll try again and come back with an updated version.</p> <p dir="auto">Any help would be greatly appreciated.</p> <p dir="auto">Thanks</p> <p dir="auto">Juan</p> <p dir="auto"><a href="https://github.com/electron/electron/files/415696/electron.txt">electron.txt</a></p>
1
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ x ] bug report =&gt; search github for a similar issue or PR before submitting [ x ] feature request "><pre class="notranslate"><code class="notranslate">[ x ] bug report =&gt; search github for a similar issue or PR before submitting [ x ] feature request </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> I have a component that may create inside it several other components that may have Radio Button Groups inside them. I want the nested components to not have to receive any reference of their index in the array since they may be used in other situations. The problem is that each group seems to need an unique 'name'. By having several groups generated with the same name, the view only shows the selected circles for one (although the value bindings work well)</p> <p dir="auto"><strong>Expected behavior</strong><br> I would like to be able to generate a unique random name for each radio button group inputs or some other thing that would allow each button group to be isolated from the other</p> <p dir="auto"><strong>Reproduction of the problem</strong><br> Here's a plunker in which it doesn't seem possible to have unique names for each groups (without sending inside the reference of the array index which I wanted to avoid, since the radioButton component is used in another part of the app that doesn't really need any index. Apart from that reason I wanted to pass in only the relevant data to that component. The real case is a little bit more complex.</p> <p dir="auto"><a href="https://plnkr.co/edit/3gNOgRT9TYwJmwuebJGB?p=preview" rel="nofollow">https://plnkr.co/edit/3gNOgRT9TYwJmwuebJGB?p=preview</a></p> <p dir="auto">Thanks</p> <ul dir="auto"> <li> <p dir="auto"><strong>Angular version:</strong> 2.0.0 final</p> </li> <li> <p dir="auto"><strong>Language:</strong> [all | TypeScript 2 beta ]</p> </li> </ul>
<p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="116989595" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/5294" data-hovercard-type="pull_request" data-hovercard-url="/angular/angular/pull/5294/hovercard" href="https://github.com/angular/angular/pull/5294">#5294</a> for pointers</p>
0
<p dir="auto">As noted in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="99777054" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/12076" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/12076/hovercard" href="https://github.com/golang/go/issues/12076">#12076</a> Getpagesize doesn't currently return the actual system's default page size, but rather a hard-coded value. Per the discussion with <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ianlancetaylor/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ianlancetaylor">@ianlancetaylor</a> on golang-dev [1], the opinion was that syscall.Getpagesize should return the same value as the POSIX call sysconf(_SC_PAGESIZE).</p> <p dir="auto">This change will be necessary for future platform support on Solaris.</p> <p dir="auto">While this change could be generally applied (more than likely) to all other POSIX platforms, I'm only planning on making this change for Solaris for now.</p> <p dir="auto">This issue is being filed to track the change against golang/go separately from x/sys/unix.</p> <p dir="auto">While it may be viewed as related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="62197372" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/10180" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/10180/hovercard" href="https://github.com/golang/go/issues/10180">#10180</a>, I believe it can be resolved independently.</p> <p dir="auto">[1] <a href="https://groups.google.com/forum/#!topic/golang-dev/ZLzxYzULzU8" rel="nofollow">https://groups.google.com/forum/#!topic/golang-dev/ZLzxYzULzU8</a></p>
<p dir="auto">At least three problems here:<br> <code class="notranslate">1</code>. cmd/ld INITRND needs to be at least as large as the page size, otherwise<br> we might trigger kernel bugs. See <a href="https://groups.google.com/forum/#!topic/golang-nuts/29RraQ-t3gc" rel="nofollow">https://groups.google.com/forum/#!topic/golang-nuts/29RraQ-t3gc</a><br> for a case.</p> <p dir="auto">However, just using a larger INITRND value will make the binary bigger because<br> of the zero padding between segments.</p> <p dir="auto">I think we can have a way to have a much larger INITRND without increasing<br> the size of the binary by leaving a VM hole between the segments.<br> (e.g. text segment ends at <code class="notranslate">N*INITRND + x</code>, then we make the next segment's<br> load address start at <code class="notranslate">(N+1)*INITRND + x + 1</code>, so there is no hole in the file, but<br> different segments end up on different pages (if <code class="notranslate">INITRND &gt;= page size</code>).</p> <p dir="auto"><code class="notranslate">2</code>. _PhysPageSize in runtime needs to be a variable and auto detected<br> at process start up. This might incur a performance overhead, but as the<br> proliferation of non-4K page size systems (power64, arm, arm64), we should<br> make the change to continue the Go tradition that it just works without extra<br> tuning. At least, we should make cmd/dist detect page size and tune the<br> const in runtime.</p> <p dir="auto"><code class="notranslate">3</code>. syscall.Getpagesize should return the value in the runtime. Right now,<br> it's hardcoded on all systems.</p>
1
<p dir="auto">by <strong>juanval</strong>:</p> <pre class="notranslate">go version go1.3 darwin/amd64 What steps reproduce the problem? Example: <a href="http://play.golang.org/p/-GqZSloAM3" rel="nofollow">http://play.golang.org/p/-GqZSloAM3</a> 1. fmt.Println(math.Sin(1.5e17)) What happened? Program prints "1.231298118089368e+08" What should have happened instead? Program should print value in [-1,1] range Please provide any additional information below. Source code for math.Sin warns that "Results may be meaningless for x &gt; 2**49 = 5.6e14". However, it says nothing about not respecting the [-1,1] range. I discovered this when doing math.Sin(float64(time.Now().UnixNano())) returned 1.1828933275348654e+20 Also, that information does not appear in godoc.</pre>
<pre class="notranslate">Sigh, for example, === RUN TestConnectionlessWriteClosedError --- PASS: TestConnectionlessWriteClosedError (0.00 seconds) write_test.go:134: use of closed network connection write_test.go:134: use of closed network connection write_test.go:134: use of closed network connection write_test.go:134: use of closed network connection write_test.go:134: use of closed network connection write_test.go:134: use of closed network connection instead of === RUN TestConnectionlessWriteClosedError --- PASS: TestConnectionlessWriteClosedError (0.00 seconds) write_test.go:134: udp4 127.0.0.1:41400: use of closed network connection write_test.go:134: udp4 127.0.0.1:41400: use of closed network connection write_test.go:134: udp6 [::1]:57416: use of closed network connection write_test.go:134: udp6 [::1]:57416: use of closed network connection write_test.go:134: unixgram /tmp/nettest869396226: use of closed network connection write_test.go:134: unixgram /tmp/nettest869396226: use of closed network connection The root cause is <a href="https://golang.org/issue/4856" rel="nofollow">issue #4856</a>.</pre>
0
<p dir="auto">Describe what you were doing when the bug occurred:<br> 1.<br> 2.<br> 3.</p> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.7.0-23309eb38</p> <p dir="auto">Call stack: at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163895)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)</p> <p dir="auto">Component stack: at Ul (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:342099)<br> at div<br> at div<br> at div<br> at Co (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:263571)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:366677<br> at n (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:276314)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:278724<br> at div<br> at div<br> at Xi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:325177)<br> at Ge (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:207026)<br> at sn (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:216342)<br> at Va (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:293773)<br> at us (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:371869)</p>
<p dir="auto">Describe what you were doing when the bug occurred:<br> 1.<br> 2.<br> 3.</p> <hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.7.0-23309eb38</p> <p dir="auto">Call stack: at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163895)<br> at I (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:163773)<br> at e.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:166664)<br> at Ul (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:342328)<br> at gi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:62450)<br> at tl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:71793)<br> at zl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:113765)<br> at Ic (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:104502)<br> at Tc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:104430)<br> at Dc (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:32:104298)</p> <p dir="auto">Component stack: at Ul (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:342099)<br> at div<br> at div<br> at div<br> at Co (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:263571)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:366677<br> at n (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:276314)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:278724<br> at div<br> at div<br> at Xi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:325177)<br> at Ge (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:207026)<br> at sn (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:216342)<br> at Va (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:293773)<br> at us (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:40:371869)</p>
1
<p dir="auto">Similar to Visual Studio extensions, I would like to register a specific file extension and swap out the code editor for a custom UI experience when that file opened.</p>
<p dir="auto">I want to implement an extension to display a graphical presentation for a binary file. I have had a look at markdown extension. But it displays the customized preview window with the default editor window side by side. So I want to know:</p> <ol dir="auto"> <li>Is there a method to only open the preview window (customized) without opening the default editor window.</li> <li>Can the default editor window be embedded in a customized window<br> It will be great if extension developers can freely compose their customized window with the internal VSCode views such as Editor, Tab, etc.</li> </ol>
1
<p dir="auto">Platform: win32, python 2.6 binary installer from python.org, numpy binary installer of versions given, mingw32 compiler (specified in distutils.cfg)</p> <p dir="auto">"easy_install ffnet" works fine with numpy 1.6.2; with numpy 1.7.0, it raises a SandboxViolation:</p> <blockquote> <p dir="auto">Wrote C/API module "_pikaia" to file "build\src.win32-2.6\ffnet\fortran_pikaiamodule.c"<br> Fortran 77 wrappers are saved to "build\src.win32-2.6\ffnet\fortran_pikaia-f2pywrappers.f"<br> error: Setup script exited with error: SandboxViolation: open('C:\Python26\lib<br> s\libmsvcr90.def', 'w') {}</p> </blockquote> <p dir="auto">I know distribution/setup tools are a little flavour-of-the-month, but I haven't seen a call that numpy.distutils is incompatible with easy_install now (ffnet still recommends easy_install).</p>
<p dir="auto">I didn't see this error reported, apologies if it is a duplicate -- my current numpy is 1.6.2.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ sudo easy_install --upgrade numpy Searching for numpy Reading http://pypi.python.org/simple/numpy/ Reading http://numpy.scipy.org Reading http://sourceforge.net/project/showfiles.php?group_id=1369&amp;package_id=175103 Reading http://www.numpy.org Reading http://sourceforge.net/projects/numpy/files/NumPy/ Reading http://numeric.scipy.org Best match: numpy 1.7.0 Downloading http://pypi.python.org/packages/source/n/numpy/numpy-1.7.0.zip#md5=ca27913c59393940e880fab420f985b4 Processing numpy-1.7.0.zip Running numpy-1.7.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-vw2DNu/numpy-1.7.0/egg-dist-tmp-gJGWkL Running from numpy source directory. error: SandboxViolation: open('/dev/null', 'w') {} The package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been aborted. This package cannot be safely installed by EasyInstall, and may not support alternate installation locations even if you run its setup script by hand. Please inform the package's author and the EasyInstall maintainers to find out if a fix or workaround is available."><pre class="notranslate"><code class="notranslate">$ sudo easy_install --upgrade numpy Searching for numpy Reading http://pypi.python.org/simple/numpy/ Reading http://numpy.scipy.org Reading http://sourceforge.net/project/showfiles.php?group_id=1369&amp;package_id=175103 Reading http://www.numpy.org Reading http://sourceforge.net/projects/numpy/files/NumPy/ Reading http://numeric.scipy.org Best match: numpy 1.7.0 Downloading http://pypi.python.org/packages/source/n/numpy/numpy-1.7.0.zip#md5=ca27913c59393940e880fab420f985b4 Processing numpy-1.7.0.zip Running numpy-1.7.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-vw2DNu/numpy-1.7.0/egg-dist-tmp-gJGWkL Running from numpy source directory. error: SandboxViolation: open('/dev/null', 'w') {} The package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been aborted. This package cannot be safely installed by EasyInstall, and may not support alternate installation locations even if you run its setup script by hand. Please inform the package's author and the EasyInstall maintainers to find out if a fix or workaround is available. </code></pre></div>
1
<p dir="auto">Compare:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; A = Diagonal(rand(1000)) 1000×1000 Diagonal{Float64,Array{Float64,1}}: 0.0341907 ⋅ ⋅ ⋅ … ⋅ ⋅ ⋅ ⋅ 0.758919 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.700876 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.453502 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ … ⋅ ⋅ ⋅ ⋮ ⋱ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ … ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.489115 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.791967 ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ ⋅ 0.164329 julia&gt; sparse(A) 1000×1000 SparseMatrixCSC{Float64,Int64} with 1000 stored entries: [1 , 1] = 0.0341907 [2 , 2] = 0.758919 [3 , 3] = 0.700876 [4 , 4] = 0.453502 [5 , 5] = 0.560549 [6 , 6] = 0.832382 ⋮ [995 , 995] = 0.270777 [996 , 996] = 0.0664044 [997 , 997] = 0.689441 [998 , 998] = 0.489115 [999 , 999] = 0.791967 [1000, 1000] = 0.164329"><pre class="notranslate">julia<span class="pl-k">&gt;</span> A <span class="pl-k">=</span> <span class="pl-c1">Diagonal</span>(<span class="pl-c1">rand</span>(<span class="pl-c1">1000</span>)) <span class="pl-c1">1000</span><span class="pl-k">×</span><span class="pl-c1">1000</span> Diagonal{Float64,Array{Float64,<span class="pl-c1">1</span>}}<span class="pl-k">:</span> <span class="pl-c1">0.0341907</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> … <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-c1">0.758919</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-c1">0.700876</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-c1">0.453502</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> … <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> ⋮ ⋱ <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> … <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-c1">0.489115</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-c1">0.791967</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-k">⋅</span> <span class="pl-c1">0.164329</span> julia<span class="pl-k">&gt;</span> <span class="pl-c1">sparse</span>(A) <span class="pl-c1">1000</span><span class="pl-k">×</span><span class="pl-c1">1000</span> SparseMatrixCSC{Float64,Int64} with <span class="pl-c1">1000</span> stored entries<span class="pl-k">:</span> [<span class="pl-c1">1</span> , <span class="pl-c1">1</span>] <span class="pl-k">=</span> <span class="pl-c1">0.0341907</span> [<span class="pl-c1">2</span> , <span class="pl-c1">2</span>] <span class="pl-k">=</span> <span class="pl-c1">0.758919</span> [<span class="pl-c1">3</span> , <span class="pl-c1">3</span>] <span class="pl-k">=</span> <span class="pl-c1">0.700876</span> [<span class="pl-c1">4</span> , <span class="pl-c1">4</span>] <span class="pl-k">=</span> <span class="pl-c1">0.453502</span> [<span class="pl-c1">5</span> , <span class="pl-c1">5</span>] <span class="pl-k">=</span> <span class="pl-c1">0.560549</span> [<span class="pl-c1">6</span> , <span class="pl-c1">6</span>] <span class="pl-k">=</span> <span class="pl-c1">0.832382</span> ⋮ [<span class="pl-c1">995</span> , <span class="pl-c1">995</span>] <span class="pl-k">=</span> <span class="pl-c1">0.270777</span> [<span class="pl-c1">996</span> , <span class="pl-c1">996</span>] <span class="pl-k">=</span> <span class="pl-c1">0.0664044</span> [<span class="pl-c1">997</span> , <span class="pl-c1">997</span>] <span class="pl-k">=</span> <span class="pl-c1">0.689441</span> [<span class="pl-c1">998</span> , <span class="pl-c1">998</span>] <span class="pl-k">=</span> <span class="pl-c1">0.489115</span> [<span class="pl-c1">999</span> , <span class="pl-c1">999</span>] <span class="pl-k">=</span> <span class="pl-c1">0.791967</span> [<span class="pl-c1">1000</span>, <span class="pl-c1">1000</span>] <span class="pl-k">=</span> <span class="pl-c1">0.164329</span></pre></div> <p dir="auto">Why can't a <code class="notranslate">SparseMatrixCSC</code> be printed in the same way as the structured sparse-matrix types? It would be a heck of a lot more readable.</p> <p dir="auto">PS. On an unrelated note, I also notice that the <code class="notranslate">SparseMatrixCSC</code> output isn't setting the <code class="notranslate">:typeinfo</code> property of the <code class="notranslate">IOContext</code>, so it screws up e.g. <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="395715199" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/30575" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/30575/hovercard" href="https://github.com/JuliaLang/julia/pull/30575">#30575</a>. <em>Update:</em> This is fixed by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="395973023" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/30589" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/30589/hovercard" href="https://github.com/JuliaLang/julia/pull/30589">#30589</a>.</p>
<p dir="auto">Disclamer: This very well may be duplicate for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="232095851" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/22123" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/22123/hovercard" href="https://github.com/JuliaLang/julia/issues/22123">#22123</a> (or rather <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="217507678" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/21191" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/21191/hovercard" href="https://github.com/JuliaLang/julia/issues/21191">#21191</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="216747675" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/21153" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/21153/hovercard" href="https://github.com/JuliaLang/julia/issues/21153">#21153</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/martinholters/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/martinholters">@martinholters</a> should know better, I guess).</p> <p dir="auto">I have this (crazy, unrealistic, computer-generated) type:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Ref{Tuple{T,Ref{Union{Ref{Tuple{Ref{Union{Ref{Ref{Tuple{Ref{Tuple{Union{Tuple{Ref{Ref{T}},T}, T},T}},T}}}, T}},T}}, Ref{T}, T}}}} where T"><pre class="notranslate"><code class="notranslate">Ref{Tuple{T,Ref{Union{Ref{Tuple{Ref{Union{Ref{Ref{Tuple{Ref{Tuple{Union{Tuple{Ref{Ref{T}},T}, T},T}},T}}}, T}},T}}, Ref{T}, T}}}} where T </code></pre></div> <p dir="auto">Julia (recent <code class="notranslate">master</code>) dies when I try to check reflexivity for it:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="t = Ref{Tuple{T,Ref{Union{Ref{Tuple{Ref{Union{Ref{Ref{Tuple{Ref{Tuple{Union{Tuple{Ref{Ref{T}},T}, T},T}},T}}}, T}},T}}, Ref{T}, T}}}} where T s = Ref{Tuple{T,Ref{Union{Ref{Tuple{Ref{Union{Ref{Ref{Tuple{Ref{Tuple{Union{Tuple{Ref{Ref{T}},T}, T},T}},T}}}, T}},T}}, Ref{T}, T}}}} where T t &lt;: s"><pre class="notranslate"><code class="notranslate">t = Ref{Tuple{T,Ref{Union{Ref{Tuple{Ref{Union{Ref{Ref{Tuple{Ref{Tuple{Union{Tuple{Ref{Ref{T}},T}, T},T}},T}}}, T}},T}}, Ref{T}, T}}}} where T s = Ref{Tuple{T,Ref{Union{Ref{Tuple{Ref{Union{Ref{Ref{Tuple{Ref{Tuple{Union{Tuple{Ref{Ref{T}},T}, T},T}},T}}}, T}},T}}, Ref{T}, T}}}} where T t &lt;: s </code></pre></div> <p dir="auto">(I use different bindings, <code class="notranslate">s</code> and <code class="notranslate">t</code>, otherwise it will trivially says <code class="notranslate">true</code>.)</p> <p dir="auto">I compared the output to the one of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="232095851" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/22123" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/22123/hovercard" href="https://github.com/JuliaLang/julia/issues/22123">#22123</a>, <a href="https://www.diffchecker.com/IPkmjlCQ" rel="nofollow">here is the diff</a>. They are very similar, but one call to <code class="notranslate">subtype_unionall</code>. I was about to forget this, but as a last resort fired up <code class="notranslate">julia-debug</code>. And there I got notably different output. So i decided to file a bug. The output from <code class="notranslate">julia-debug</code>is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia-debug: /home/artem/julia-dev/src/subtype.c:114: statestack_get: Assertion `i &gt;= 0 &amp;&amp; i &lt; sizeof(st-&gt;stack) * 8' failed. signal (6): Aborted in expression starting at /home/artem/julia-work/exp/crash-rj1.jl:7 gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) unknown function (ip: 0x7fc23523dbd6) __assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) statestack_get at /home/artem/julia-dev/src/subtype.c:114 pick_union_element at /home/artem/julia-dev/src/subtype.c:388 subtype at /home/artem/julia-dev/src/subtype.c:846 subtype_ufirst at /home/artem/julia-dev/src/subtype.c:416 var_lt at /home/artem/julia-dev/src/subtype.c:454 subtype at /home/artem/julia-dev/src/subtype.c:883 subtype_tuple at /home/artem/julia-dev/src/subtype.c:796 subtype at /home/artem/julia-dev/src/subtype.c:926 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 subtype_tuple at /home/artem/julia-dev/src/subtype.c:796 subtype at /home/artem/julia-dev/src/subtype.c:926 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 subtype_tuple at /home/artem/julia-dev/src/subtype.c:796 subtype at /home/artem/julia-dev/src/subtype.c:926 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 subtype_tuple at /home/artem/julia-dev/src/subtype.c:796 subtype at /home/artem/julia-dev/src/subtype.c:926 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 subtype_unionall at /home/artem/julia-dev/src/subtype.c:593 subtype at /home/artem/julia-dev/src/subtype.c:896 subtype_unionall at /home/artem/julia-dev/src/subtype.c:624 subtype at /home/artem/julia-dev/src/subtype.c:893 exists_subtype at /home/artem/julia-dev/src/subtype.c:1009 forall_exists_subtype at /home/artem/julia-dev/src/subtype.c:1037 jl_subtype_env at /home/artem/julia-dev/src/subtype.c:1091 jl_subtype at /home/artem/julia-dev/src/subtype.c:1109 jl_f_issubtype at /home/artem/julia-dev/src/builtins.c:416 jl_call_fptr_internal at /home/artem/julia-dev/src/julia_internal.h:383 jl_call_method_internal at /home/artem/julia-dev/src/julia_internal.h:402 jl_apply_generic at /home/artem/julia-dev/src/gf.c:2089 do_call at /home/artem/julia-dev/src/interpreter.c:323 eval_value at /home/artem/julia-dev/src/interpreter.c:395 eval_body at /home/artem/julia-dev/src/interpreter.c:509 jl_interpret_toplevel_thunk_callback at /home/artem/julia-dev/src/interpreter.c:720 unknown function (ip: 0xfffffffffffffffe) unknown function (ip: 0x7fc2270e190f) unknown function (ip: 0xffffffffffffffff) jl_interpret_toplevel_thunk at /home/artem/julia-dev/src/interpreter.c:729 jl_toplevel_eval_flex at /home/artem/julia-dev/src/toplevel.c:806 jl_parse_eval_all at /home/artem/julia-dev/src/ast.c:839 jl_load at /home/artem/julia-dev/src/toplevel.c:844 jl_load_ at /home/artem/julia-dev/src/toplevel.c:851 include at ./boot.jl:296 [inlined] include_relative at ./loading.jl:1012 jl_call_fptr_internal at /home/artem/julia-dev/src/julia_internal.h:383 jl_call_method_internal at /home/artem/julia-dev/src/julia_internal.h:402 jl_apply_generic at /home/artem/julia-dev/src/gf.c:2089 include at ./sysimg.jl:26 jl_call_fptr_internal at /home/artem/julia-dev/src/julia_internal.h:383 jl_call_method_internal at /home/artem/julia-dev/src/julia_internal.h:402 jl_apply_generic at /home/artem/julia-dev/src/gf.c:2089 exec_options at ./client.jl:332 _start at ./client.jl:447 jl_call_fptr_internal at /home/artem/julia-dev/src/julia_internal.h:383 jl_call_method_internal at /home/artem/julia-dev/src/julia_internal.h:402 jl_apply_generic at /home/artem/julia-dev/src/gf.c:2089 jl_apply at /home/artem/julia-dev/ui/../src/julia.h:1523 true_main at /home/artem/julia-dev/ui/repl.c:107 main at /home/artem/julia-dev/ui/repl.c:238 __libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) _start at ./julia-debug (unknown line) Allocations: 461264 (Pool: 460989; Big: 275); GC: 0 Aborted (core dumped)"><pre class="notranslate"><code class="notranslate">julia-debug: /home/artem/julia-dev/src/subtype.c:114: statestack_get: Assertion `i &gt;= 0 &amp;&amp; i &lt; sizeof(st-&gt;stack) * 8' failed. signal (6): Aborted in expression starting at /home/artem/julia-work/exp/crash-rj1.jl:7 gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) unknown function (ip: 0x7fc23523dbd6) __assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) statestack_get at /home/artem/julia-dev/src/subtype.c:114 pick_union_element at /home/artem/julia-dev/src/subtype.c:388 subtype at /home/artem/julia-dev/src/subtype.c:846 subtype_ufirst at /home/artem/julia-dev/src/subtype.c:416 var_lt at /home/artem/julia-dev/src/subtype.c:454 subtype at /home/artem/julia-dev/src/subtype.c:883 subtype_tuple at /home/artem/julia-dev/src/subtype.c:796 subtype at /home/artem/julia-dev/src/subtype.c:926 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 subtype_tuple at /home/artem/julia-dev/src/subtype.c:796 subtype at /home/artem/julia-dev/src/subtype.c:926 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 subtype_tuple at /home/artem/julia-dev/src/subtype.c:796 subtype at /home/artem/julia-dev/src/subtype.c:926 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 subtype_tuple at /home/artem/julia-dev/src/subtype.c:796 subtype at /home/artem/julia-dev/src/subtype.c:926 forall_exists_equal at /home/artem/julia-dev/src/subtype.c:985 subtype at /home/artem/julia-dev/src/subtype.c:946 subtype_unionall at /home/artem/julia-dev/src/subtype.c:593 subtype at /home/artem/julia-dev/src/subtype.c:896 subtype_unionall at /home/artem/julia-dev/src/subtype.c:624 subtype at /home/artem/julia-dev/src/subtype.c:893 exists_subtype at /home/artem/julia-dev/src/subtype.c:1009 forall_exists_subtype at /home/artem/julia-dev/src/subtype.c:1037 jl_subtype_env at /home/artem/julia-dev/src/subtype.c:1091 jl_subtype at /home/artem/julia-dev/src/subtype.c:1109 jl_f_issubtype at /home/artem/julia-dev/src/builtins.c:416 jl_call_fptr_internal at /home/artem/julia-dev/src/julia_internal.h:383 jl_call_method_internal at /home/artem/julia-dev/src/julia_internal.h:402 jl_apply_generic at /home/artem/julia-dev/src/gf.c:2089 do_call at /home/artem/julia-dev/src/interpreter.c:323 eval_value at /home/artem/julia-dev/src/interpreter.c:395 eval_body at /home/artem/julia-dev/src/interpreter.c:509 jl_interpret_toplevel_thunk_callback at /home/artem/julia-dev/src/interpreter.c:720 unknown function (ip: 0xfffffffffffffffe) unknown function (ip: 0x7fc2270e190f) unknown function (ip: 0xffffffffffffffff) jl_interpret_toplevel_thunk at /home/artem/julia-dev/src/interpreter.c:729 jl_toplevel_eval_flex at /home/artem/julia-dev/src/toplevel.c:806 jl_parse_eval_all at /home/artem/julia-dev/src/ast.c:839 jl_load at /home/artem/julia-dev/src/toplevel.c:844 jl_load_ at /home/artem/julia-dev/src/toplevel.c:851 include at ./boot.jl:296 [inlined] include_relative at ./loading.jl:1012 jl_call_fptr_internal at /home/artem/julia-dev/src/julia_internal.h:383 jl_call_method_internal at /home/artem/julia-dev/src/julia_internal.h:402 jl_apply_generic at /home/artem/julia-dev/src/gf.c:2089 include at ./sysimg.jl:26 jl_call_fptr_internal at /home/artem/julia-dev/src/julia_internal.h:383 jl_call_method_internal at /home/artem/julia-dev/src/julia_internal.h:402 jl_apply_generic at /home/artem/julia-dev/src/gf.c:2089 exec_options at ./client.jl:332 _start at ./client.jl:447 jl_call_fptr_internal at /home/artem/julia-dev/src/julia_internal.h:383 jl_call_method_internal at /home/artem/julia-dev/src/julia_internal.h:402 jl_apply_generic at /home/artem/julia-dev/src/gf.c:2089 jl_apply at /home/artem/julia-dev/ui/../src/julia.h:1523 true_main at /home/artem/julia-dev/ui/repl.c:107 main at /home/artem/julia-dev/ui/repl.c:238 __libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line) _start at ./julia-debug (unknown line) Allocations: 461264 (Pool: 460989; Big: 275); GC: 0 Aborted (core dumped) </code></pre></div> <p dir="auto">Versioninfo:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 0.7.0-DEV.3716 Commit 842ff17 (2018-02-05 03:16 UTC) Platform Info: OS: Linux (x86_64-linux-gnu) CPU: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)"><pre class="notranslate"><code class="notranslate">Julia Version 0.7.0-DEV.3716 Commit 842ff17 (2018-02-05 03:16 UTC) Platform Info: OS: Linux (x86_64-linux-gnu) CPU: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-3.9.1 (ORCJIT, broadwell) </code></pre></div>
0
<p dir="auto">Happened several times in the last few runs:<br> <a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/28543/kubernetes-pull-build-test-e2e-gce/48158/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/28543/kubernetes-pull-build-test-e2e-gce/48158/</a><br> <a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/26696/kubernetes-pull-build-test-e2e-gce/48157/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/26696/kubernetes-pull-build-test-e2e-gce/48157/</a><br> <a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/27243/kubernetes-pull-build-test-e2e-gce/48156/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/pr-logs/pull/27243/kubernetes-pull-build-test-e2e-gce/48156/</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Waiting up to 300 seconds for cluster initialization. This will continually check to see if the API for kubernetes is reachable. This may time out if there was some uncaught error during start up. ...........................................Cluster failed to initialize within 300 seconds. 2016/07/07 15:09:32 e2e.go:218: Error running up: exit status 2 2016/07/07 15:09:32 e2e.go:214: Step 'up' finished in 7m56.450395031s 2016/07/07 15:09:32 e2e.go:114: Error starting e2e cluster. Aborting. exit status 1"><pre class="notranslate"><code class="notranslate">Waiting up to 300 seconds for cluster initialization. This will continually check to see if the API for kubernetes is reachable. This may time out if there was some uncaught error during start up. ...........................................Cluster failed to initialize within 300 seconds. 2016/07/07 15:09:32 e2e.go:218: Error running up: exit status 2 2016/07/07 15:09:32 e2e.go:214: Step 'up' finished in 7m56.450395031s 2016/07/07 15:09:32 e2e.go:114: Error starting e2e cluster. Aborting. exit status 1 </code></pre></div>
<p dir="auto">gcloud is crashing due to <code class="notranslate">ERROR: gcloud crashed (error): [Errno 111] Connection refused</code></p> <p dir="auto">see <a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10711/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gke/10711/</a> for an example.</p> <p dir="auto"><a href="https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce/19753/" rel="nofollow">https://k8s-gubernator.appspot.com/build/kubernetes-jenkins/logs/kubernetes-e2e-gce/19753/</a> seems to have some backtraces. This may indicate that it has something to do with the metadata server.</p> <p dir="auto">At least one of the failures in:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="163318470" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28336" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28336/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28336">#28336</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="162320270" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28083" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28083/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28083">#28083</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="162126238" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/28013" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/28013/hovercard" href="https://github.com/kubernetes/kubernetes/issues/28013">#28013</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="161598746" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27839" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/27839/hovercard" href="https://github.com/kubernetes/kubernetes/issues/27839">#27839</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="161405369" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/27767" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/27767/hovercard" href="https://github.com/kubernetes/kubernetes/issues/27767">#27767</a></p>
1
<p dir="auto">In the provided numpy swig interface file, <a href="https://github.com/numpy/numpy/blob/master/tools/swig/numpy.i">numpy.i</a>, the ARGOUTVIEWM typemaps for dimension 4 arrays seem to be erroneously duplicated. Lines <a href="https://github.com/numpy/numpy/blob/master/tools/swig/numpy.i#L2799-L2949">2799-2949</a> approximately duplicate lines <a href="https://github.com/numpy/numpy/blob/master/tools/swig/numpy.i#L2951-L3101">2951-3101</a>, with the exception of line <a href="https://github.com/numpy/numpy/blob/master/tools/swig/numpy.i#L2890">2890</a> which appears to be incorrect because it only goes up to dimension 3. It seems to me that lines 2799-2949 should just be deleted. I will make a pull request with this edit.</p>
<h2 dir="auto">Documentation</h2> <p dir="auto"><a href="https://numpy.org/doc/stable/reference/generated/numpy.argsort.html" rel="nofollow">Reference URL</a></p> <p dir="auto">Typo in first example of One Dimensional Array</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/58799086/116272520-99169f00-a79e-11eb-84a4-c15eaeaa24f9.png"><img src="https://user-images.githubusercontent.com/58799086/116272520-99169f00-a79e-11eb-84a4-c15eaeaa24f9.png" alt="image" style="max-width: 100%;"></a></p>
0
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-target-elements-by-class-using-jquery" rel="nofollow">http://freecodecamp.com/challenges/waypoint-target-elements-by-class-using-jquery</a> has an issue.</p> <p dir="auto">This issue is also replicated on <a href="http://freecodecamp.com/challenges/waypoint-target-html-elements-with-selectors-using-jquery" rel="nofollow">http://freecodecamp.com/challenges/waypoint-target-html-elements-with-selectors-using-jquery</a></p> <p dir="auto">Where the &lt;script&gt; tag should be, the letters "fccss" appear; and<br> where the &lt;/script&gt; tag should be, the letters "fcces" appear.</p> <p dir="auto">I assume "fccss" starts for "FCC Start Script" and<br> I assume "fcces" starts for "FCC End Script".</p> <p dir="auto">This wasn't clear and I couldn't complete the waypoint until I realized the bug. (Was it intentional?)</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/8146817/9373589/22734e3e-46ba-11e5-9715-047a27d45c91.jpg"><img src="https://cloud.githubusercontent.com/assets/8146817/9373589/22734e3e-46ba-11e5-9715-047a27d45c91.jpg" alt="bug" style="max-width: 100%;"></a></p> <p dir="auto">And yes, I'm using Chrome on a Mac.</p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-create-a-javascript-slot-machine</a> has an issue.</p> <p dir="auto">The four Javascript slot machine exercises all display the JS section of the code incorrectly. Presumably <code class="notranslate">fccss</code> is supposed to be <code class="notranslate">&lt;script&gt;</code>, and likewise <code class="notranslate">fcces</code> is supposed to be <code class="notranslate">&lt;/script&gt;</code>.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5023165/9371847/695d7f04-46a6-11e5-9ed0-8600b29b6c44.png"><img width="1969" alt="screen shot 2015-08-19 at 7 11 54 pm" src="https://cloud.githubusercontent.com/assets/5023165/9371847/695d7f04-46a6-11e5-9ed0-8600b29b6c44.png" style="max-width: 100%;"></a></p>
1
<p dir="auto">gc successfully compiles the following program:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package a func f() int { for {}; ; }"><pre class="notranslate"><span class="pl-k">package</span> a <span class="pl-k">func</span> <span class="pl-en">f</span>() <span class="pl-smi">int</span> { <span class="pl-k">for</span> {}; ; }</pre></div> <p dir="auto">while gotype says:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="go.go:5: missing return at end of function"><pre class="notranslate"><code class="notranslate">go.go:5: missing return at end of function </code></pre></div> <p dir="auto">go version devel +9b04852 Sat Jul 11 00:08:50 2015 +0000 linux/amd64</p>
<p dir="auto">Per a (pending) spec change, the following code should be permitted:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="package p func f() int { return 3 ; // &lt;&lt;&lt; trailing empty statement }"><pre class="notranslate"><code class="notranslate">package p func f() int { return 3 ; // &lt;&lt;&lt; trailing empty statement } </code></pre></div> <p dir="auto">See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="135056151" data-permission-text="Title is private" data-url="https://github.com/golang/go/issues/14422" data-hovercard-type="issue" data-hovercard-url="/golang/go/issues/14422/hovercard" href="https://github.com/golang/go/issues/14422">#14422</a> for details.</p>
1
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">Simply, I myself am not a fan of the default windows start menu. I only ever use it for searching for apps or files so PowerToys Run seemed like a good replacement. It's fast and has less clutter HOWEVER it don't have the option to map the WinKey by itself to replace the start menu. I've had to resort to remapping the WinKey to act as a different key and use AutoHotkey to launch PowerToys Run when it's pressed. This has it's issues though...</p> <h1 dir="auto">Proposed technical implementation details</h1> <p dir="auto">Simply in the shortcuts box, allow the WinKey to trigger it all on it's own. Make it not trigger the normal start menu when the WinKey is pressed.</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide a description of the new feature</h2> <p dir="auto">I think it would be useful to be able to export/import the remapped keys and shortcuts. This would allow the users to use the same mappings in different devices as well as saving them if they needed to reinstall PowerToys.</p> <p dir="auto">Apart from that, I guess this feature could be easily implemented.</p> <p dir="auto">If you'd like to see this feature implemented, add a 👍 reaction to this post.</p>
0
<p dir="auto">I have an app using material-ui and SSR. On some pages of my app, I get a warning like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Warning: Prop `className` did not match. Server: .... &quot;a-224 b-231 c-241 d-293&quot; Client: &quot;a-224 b-231 c-241 d-284&quot;"><pre class="notranslate"><code class="notranslate">Warning: Prop `className` did not match. Server: .... "a-224 b-231 c-241 d-293" Client: "a-224 b-231 c-241 d-284" </code></pre></div> <p dir="auto">(I replaced the long classnames with a, b, c, d). But the mismatch is on the "suffix" of the last className. "d-293" on server vs "d-284" on client.</p> <p dir="auto">So it seems that at some point, there is some classes added on the server and not on the client, and it's breaking the classes index suffix.<br> I tried to trace the problem, and wanted to detect the problem to show an example but it's quite difficult.</p> <p dir="auto">I do have a lot of "Hidden" components in my app, and as I'm using SSR, I use the css implementation. As soon as I switch on the JS one, the problem disappear.</p> <p dir="auto">I was wondering if there is some builtin tool to debug the generator on the server and on the client, so I could more easily understand the problem ?</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>latest beta</td> </tr> </tbody> </table>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">I would have expected to be able to use <code class="notranslate">value={100}</code> inside a RadioGroup and FormControlLabel.<br> The docs state, that value is a <code class="notranslate">string</code> <a href="https://material-ui-1dab0.firebaseapp.com/api/radio-group/" rel="nofollow">https://material-ui-1dab0.firebaseapp.com/api/radio-group/</a> <a href="https://material-ui-1dab0.firebaseapp.com/api/form-control-label/" rel="nofollow">https://material-ui-1dab0.firebaseapp.com/api/form-control-label/</a> , but I wonder if this is on purpose or accident.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">It actually works just fine, but throws type errors in the console.</p> <p dir="auto">If you also think that value should accept numbers, i'd be happy to create a pr.</p> <p dir="auto">Best Regards,<br> lukas</p>
0
<h5 dir="auto">Description of the problem</h5> <p dir="auto"><code class="notranslate">BufferAttribute</code> can be shared among geometries (or even it can be referenced twice or more in one geometry). But <code class="notranslate">.toJSON()</code> creates the same data many times for such a shared buffer attribute. That leads to non-efficient serialized data and shared buffer attribute will become many duplicated buffer attributes through serialization.</p> <p dir="auto">What do you think of adding <code class="notranslate">attribute</code> field to serialized json data like this?</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ metadata: { ... }, attribute: [ { array: [ ... ], .... }, { array: [ ... ], .... }, { array: [ ... ], .... } ], geometry: [ { data: { attributes: { position: 0, // BufferAttribute doesn't have uuid so using index instead? normal: 1, uv: 2 } }, .... }, { data: { attributes: { position: 0, normal: 1, uv: 3 } }, .... } ] .... }"><pre class="notranslate"><code class="notranslate">{ metadata: { ... }, attribute: [ { array: [ ... ], .... }, { array: [ ... ], .... }, { array: [ ... ], .... } ], geometry: [ { data: { attributes: { position: 0, // BufferAttribute doesn't have uuid so using index instead? normal: 1, uv: 2 } }, .... }, { data: { attributes: { position: 0, normal: 1, uv: 3 } }, .... } ] .... } </code></pre></div> <p dir="auto">Pros:</p> <ul dir="auto"> <li>Efficient data in case attribute is shared</li> <li>Reproduce the shared attribute even through serialization</li> </ul> <p dir="auto">Cons:</p> <ul dir="auto"> <li>Break compatibility if there is any users who exported serialized json data to external file/storage.</li> </ul> <h5 dir="auto">Three.js version</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Dev</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> r101</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> ...</li> </ul> <h5 dir="auto">Browser</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Chrome</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Firefox</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Internet Explorer</li> </ul> <h5 dir="auto">OS</h5> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> All of them</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Windows</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> macOS</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Linux</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Android</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> iOS</li> </ul> <h5 dir="auto">Hardware Requirements (graphics card, VR Device, ...)</h5>
<p dir="auto">I am trying to use the example at <a href="https://threejs.org/examples/?q=spline#webgl_geometry_spline_editor" rel="nofollow">https://threejs.org/examples/?q=spline#webgl_geometry_spline_editor</a> .<br> It appears that I cannot reliably drag the control points. Sometimes while changing perspective, the dragging controls appear, but I can't get this to happen reliably.</p> <p dir="auto">OS X 10.9<br> Firefox 51.0.1<br> Google Chrome 56.0.2924.87</p>
0
<p dir="auto">Current code for precision_recall_curve assumes the curve always passes through (recall=0, precision=1). However this is not the case.</p> <p dir="auto">For instance,<br> pred_proba = [0.8, 0.8, 0.8, 0.2, 0.2]<br> true_value = [0, 0, 1, 1, 0]<br> metrics.precision_recall_curve(true_value, pred_proba) will return<br> precision = [ 0.4 0.33333333 1. ]<br> recall = [ 1. 0.5 0. ]<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1704511/9019531/34e97af6-37a2-11e5-88e4-4cb2b703874d.png"><img src="https://cloud.githubusercontent.com/assets/1704511/9019531/34e97af6-37a2-11e5-88e4-4cb2b703874d.png" alt="index" style="max-width: 100%;"></a></p> <p dir="auto">the result's not correct and actually in favor of the poor model (the model misclassified points with high-score will have more area under the curve).</p> <p dir="auto">Be careful when using auc based on metrics.ranking.precision_recall_curve before the bug is solved</p>
<p dir="auto">Referencing <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/metrics/ranking.py#L346-L348"><code class="notranslate">"The last precision and recall values are 1. and 0. respectively and do not have a corresponding threshold. This ensures that the graph starts on the x axis."</code></a></p> <p dir="auto">Say you have a tie in your highest predicted probability output from the classifier with some false positives and some true positives, for example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="y_true = [ 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0] y_pred = [.9, .9, .9, .8, .8, .7, .7, .6, .5, .4, .3] precision, recall, thresholds = precision_recall_curve(y_true, y_pred)"><pre class="notranslate"><code class="notranslate">y_true = [ 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0] y_pred = [.9, .9, .9, .8, .8, .7, .7, .6, .5, .4, .3] precision, recall, thresholds = precision_recall_curve(y_true, y_pred) </code></pre></div> <p dir="auto">Yields:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Pricision: [0.400, 0.333, 0.375, 0.428, 0.400, 0.333, 1.000] Recall: [1.000, 0.750, 0.750, 0.750, 0.500, 0.250, 0.000]"><pre class="notranslate"><code class="notranslate">Pricision: [0.400, 0.333, 0.375, 0.428, 0.400, 0.333, 1.000] Recall: [1.000, 0.750, 0.750, 0.750, 0.500, 0.250, 0.000] </code></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5210848/6098145/7fb45fec-af8a-11e4-9e21-7549071fb2b3.png"><img src="https://cloud.githubusercontent.com/assets/5210848/6098145/7fb45fec-af8a-11e4-9e21-7549071fb2b3.png" alt="download 1" style="max-width: 100%;"></a></p> <p dir="auto">I understand that recall goes to zero in the limit, but precision might not be so clear-cut. A <em>really</em> difficult problem where your top prediction is a false positive would have precision go to zero in the limit I believe. For plotting with this function, this case is probably not a big deal a vertical line from 0 to 1 would be hidden by the y-axis.</p> <p dir="auto">But for the drawn top-preds, as seen above, the plot becomes misleading and makes the viewer think that at least their top prediction was true positive. This may seem like a corner case, but I ran into it on a tough classification problem I was working on and was a little baffled by the output until I checked the code out.</p> <p dir="auto">A quick fix to preserve the intention of a clean P-R plot might be to draw a horizontal line from the highest threshold to the y-axis, this should not alter the output of most cases like <a href="http://scikit-learn.org/stable/auto_examples/plot_precision_recall.html" rel="nofollow">here</a>. Trying to actually calculate where it's going in the limit might be a bit overkill :-)</p> <p dir="auto">I would also think that adding a <code class="notranslate">1</code> to the end of the <code class="notranslate">thresholds</code> vector would be helpful when plotting both precision and recall against the probabilities.</p> <p dir="auto">I'm happy to open a PR if anyone thinks this is worth addressing.</p>
1
<p dir="auto">I have a an index with 30M documents, spread across 4 nodes, 30 shards, with 2 replicas each. Each document has a nested mapping type "a", representing a transaction log entry. Each transaction log entry has a positive or negative dollar value and a timestamp. When I attempt to bucket the nested objects using the date range and sum aggregations, the sum aggregation appears to break on transactions with both positive and negative numbers.</p> <p dir="auto">For example, consider the following query. I include a reverse nested agg to show that the nested objects are different than the output of the sum agg.</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;size&quot;: 0, &quot;query&quot;: { &quot;filtered&quot;: { &quot;query&quot;: { &quot;match_all&quot;: {} }, &quot;filter&quot;: { &quot;bool&quot;: { &quot;must&quot;: [ { &quot;range&quot;: { &quot;timestamp&quot;: { &quot;gte&quot;: &quot;2011-10-01&quot; } } }, { &quot;term&quot;: { &quot;bar.name&quot;: &quot;ASpecialName&quot; } } ] } } } }, &quot;aggs&quot;: { &quot;BAR&quot;: { &quot;terms&quot;: { &quot;field&quot;: &quot;bar.name&quot;, &quot;size&quot;: 2, &quot;order&quot;: { &quot;NESTED&gt;TOTAL&quot;: &quot;asc&quot; } }, &quot;aggs&quot;: { &quot;NESTED&quot;: { &quot;nested&quot;: { &quot;path&quot;: &quot;a&quot; }, &quot;aggs&quot;: { &quot;TOTAL&quot;: { &quot;sum&quot;: { &quot;field&quot;: &quot;a.obligatedamount&quot; } }, &quot;DATES&quot;: { &quot;date_range&quot;: { &quot;field&quot;: &quot;a.signeddate&quot;, &quot;keyed&quot;: true, &quot;ranges&quot;: [ { &quot;key&quot;: &quot;FY2012&quot;, &quot;from&quot;: &quot;2011-10-01&quot;, &quot;to&quot;: &quot;2012-09-30&quot; }, { &quot;key&quot;: &quot;FY2013&quot;, &quot;from&quot;: &quot;2012-10-01&quot;, &quot;to&quot;: &quot;2013-09-30&quot; }, { &quot;key&quot;: &quot;FY2014&quot;, &quot;from&quot;: &quot;2013-10-01&quot;, &quot;to&quot;: &quot;2014-09-30&quot; }, { &quot;key&quot;: &quot;FY2015&quot;, &quot;from&quot;: &quot;2014-10-01&quot;, &quot;to&quot;: &quot;2015-09-30&quot; } ] }, &quot;aggs&quot;: { &quot;DATEBUCKET_SUBTOTAL&quot;: { &quot;sum&quot;: { &quot;field&quot;: &quot;a.obligatedamount&quot; } }, &quot;HITS_REVERSE&quot;: { &quot;reverse_nested&quot;: {}, &quot;aggs&quot;: { &quot;HITS&quot;: { &quot;top_hits&quot;: { &quot;_source&quot;: { &quot;include&quot;: [ &quot;a.obligatedamount&quot;, &quot;a.signeddate&quot; ] } } } } } } } } } } } } }"><pre class="notranslate">{ <span class="pl-ent">"size"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"query"</span>: { <span class="pl-ent">"filtered"</span>: { <span class="pl-ent">"query"</span>: { <span class="pl-ent">"match_all"</span>: {} }, <span class="pl-ent">"filter"</span>: { <span class="pl-ent">"bool"</span>: { <span class="pl-ent">"must"</span>: [ { <span class="pl-ent">"range"</span>: { <span class="pl-ent">"timestamp"</span>: { <span class="pl-ent">"gte"</span>: <span class="pl-s"><span class="pl-pds">"</span>2011-10-01<span class="pl-pds">"</span></span> } } }, { <span class="pl-ent">"term"</span>: { <span class="pl-ent">"bar.name"</span>: <span class="pl-s"><span class="pl-pds">"</span>ASpecialName<span class="pl-pds">"</span></span> } } ] } } } }, <span class="pl-ent">"aggs"</span>: { <span class="pl-ent">"BAR"</span>: { <span class="pl-ent">"terms"</span>: { <span class="pl-ent">"field"</span>: <span class="pl-s"><span class="pl-pds">"</span>bar.name<span class="pl-pds">"</span></span>, <span class="pl-ent">"size"</span>: <span class="pl-c1">2</span>, <span class="pl-ent">"order"</span>: { <span class="pl-ent">"NESTED&gt;TOTAL"</span>: <span class="pl-s"><span class="pl-pds">"</span>asc<span class="pl-pds">"</span></span> } }, <span class="pl-ent">"aggs"</span>: { <span class="pl-ent">"NESTED"</span>: { <span class="pl-ent">"nested"</span>: { <span class="pl-ent">"path"</span>: <span class="pl-s"><span class="pl-pds">"</span>a<span class="pl-pds">"</span></span> }, <span class="pl-ent">"aggs"</span>: { <span class="pl-ent">"TOTAL"</span>: { <span class="pl-ent">"sum"</span>: { <span class="pl-ent">"field"</span>: <span class="pl-s"><span class="pl-pds">"</span>a.obligatedamount<span class="pl-pds">"</span></span> } }, <span class="pl-ent">"DATES"</span>: { <span class="pl-ent">"date_range"</span>: { <span class="pl-ent">"field"</span>: <span class="pl-s"><span class="pl-pds">"</span>a.signeddate<span class="pl-pds">"</span></span>, <span class="pl-ent">"keyed"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"ranges"</span>: [ { <span class="pl-ent">"key"</span>: <span class="pl-s"><span class="pl-pds">"</span>FY2012<span class="pl-pds">"</span></span>, <span class="pl-ent">"from"</span>: <span class="pl-s"><span class="pl-pds">"</span>2011-10-01<span class="pl-pds">"</span></span>, <span class="pl-ent">"to"</span>: <span class="pl-s"><span class="pl-pds">"</span>2012-09-30<span class="pl-pds">"</span></span> }, { <span class="pl-ent">"key"</span>: <span class="pl-s"><span class="pl-pds">"</span>FY2013<span class="pl-pds">"</span></span>, <span class="pl-ent">"from"</span>: <span class="pl-s"><span class="pl-pds">"</span>2012-10-01<span class="pl-pds">"</span></span>, <span class="pl-ent">"to"</span>: <span class="pl-s"><span class="pl-pds">"</span>2013-09-30<span class="pl-pds">"</span></span> }, { <span class="pl-ent">"key"</span>: <span class="pl-s"><span class="pl-pds">"</span>FY2014<span class="pl-pds">"</span></span>, <span class="pl-ent">"from"</span>: <span class="pl-s"><span class="pl-pds">"</span>2013-10-01<span class="pl-pds">"</span></span>, <span class="pl-ent">"to"</span>: <span class="pl-s"><span class="pl-pds">"</span>2014-09-30<span class="pl-pds">"</span></span> }, { <span class="pl-ent">"key"</span>: <span class="pl-s"><span class="pl-pds">"</span>FY2015<span class="pl-pds">"</span></span>, <span class="pl-ent">"from"</span>: <span class="pl-s"><span class="pl-pds">"</span>2014-10-01<span class="pl-pds">"</span></span>, <span class="pl-ent">"to"</span>: <span class="pl-s"><span class="pl-pds">"</span>2015-09-30<span class="pl-pds">"</span></span> } ] }, <span class="pl-ent">"aggs"</span>: { <span class="pl-ent">"DATEBUCKET_SUBTOTAL"</span>: { <span class="pl-ent">"sum"</span>: { <span class="pl-ent">"field"</span>: <span class="pl-s"><span class="pl-pds">"</span>a.obligatedamount<span class="pl-pds">"</span></span> } }, <span class="pl-ent">"HITS_REVERSE"</span>: { <span class="pl-ent">"reverse_nested"</span>: {}, <span class="pl-ent">"aggs"</span>: { <span class="pl-ent">"HITS"</span>: { <span class="pl-ent">"top_hits"</span>: { <span class="pl-ent">"_source"</span>: { <span class="pl-ent">"include"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>a.obligatedamount<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>a.signeddate<span class="pl-pds">"</span></span> ] } } } } } } } } } } } } }</pre></div> <p dir="auto">The following result is returned. Note the odd number in the DATEBUCKET_SUBTOTAL in FY2012 for "ASpecialPlace". This appears to only be an issue when the transaction log contains both negative and positive numbers. (Response slightly truncated...)</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;aggregations&quot;: { &quot;BAR&quot;: { &quot;doc_count_error_upper_bound&quot;: 0, &quot;sum_other_doc_count&quot;: 0, &quot;buckets&quot;: [ { &quot;key&quot;: &quot;ASpecialPlace&quot;, &quot;doc_count&quot;: 2, &quot;NESTED&quot;: { &quot;doc_count&quot;: 3, &quot;DATES&quot;: { &quot;buckets&quot;: { &quot;FY2012&quot;: { &quot;from_as_string&quot;: &quot;2011-10-01T00:00:00.000Z&quot;, &quot;to_as_string&quot;: &quot;2012-09-30T00:00:00.000Z&quot;, &quot;doc_count&quot;: 1, &quot;HITS_REVERSE&quot;: { &quot;doc_count&quot;: 1, &quot;HITS&quot;: { &quot;hits&quot;: { &quot;total&quot;: 1, &quot;max_score&quot;: 1, &quot;hits&quot;: [ { &quot;_index&quot;: &quot;myIndex&quot;, &quot;_type&quot;: &quot;myType&quot;, &quot;_id&quot;: &quot;AG9J61P110025&quot;, &quot;_score&quot;: 1, &quot;_source&quot;: { &quot;a&quot;: [ { &quot;signeddate&quot;: &quot;2011-02-01T00:00:00+0000&quot;, &quot;obligatedamount&quot;: 4000 }, { &quot;signeddate&quot;: &quot;2012-07-11T00:00:00+0000&quot;, &quot;obligatedamount&quot;: -1694 } ] } } ] } } }, &quot;DATEBUCKET_SUBTOTAL&quot;: { &quot;value&quot;: -8.365e-321 } }, &quot;FY2013&quot;: { &quot;from_as_string&quot;: &quot;2012-10-01T00:00:00.000Z&quot;, &quot;to&quot;: 1380499200000, &quot;doc_count&quot;: 0, &quot;HITS_REVERSE&quot;: { &quot;doc_count&quot;: 0, &quot;HITS&quot;: { &quot;hits&quot;: { &quot;total&quot;: 0, &quot;max_score&quot;: null, &quot;hits&quot;: [] } } }, &quot;DATEBUCKET_SUBTOTAL&quot;: { &quot;value&quot;: 0 } }, &quot;FY2014&quot;: { &quot;from_as_string&quot;: &quot;2013-10-01T00:00:00.000Z&quot;, &quot;to_as_string&quot;: &quot;2014-09-30T00:00:00.000Z&quot;, &quot;doc_count&quot;: 1, &quot;HITS_REVERSE&quot;: { &quot;doc_count&quot;: 1, &quot;HITS&quot;: { &quot;hits&quot;: { &quot;total&quot;: 1, &quot;max_score&quot;: 1, &quot;hits&quot;: [ { &quot;_index&quot;: &quot;myIndex&quot;, &quot;_type&quot;: &quot;myType&quot;, &quot;_id&quot;: &quot;AG04GGP140011&quot;, &quot;_score&quot;: 1, &quot;_source&quot;: { &quot;a&quot;: [ { &quot;signeddate&quot;: &quot;2013-12-19T00:00:00+0000&quot;, &quot;obligatedamount&quot;: 3449 } ] } } ] } } }, &quot;DATEBUCKET_SUBTOTAL&quot;: { &quot;value&quot;: 3449 } }, &quot;FY2015&quot;: { &quot;from_as_string&quot;: &quot;2014-10-01T00:00:00.000Z&quot;, &quot;to_as_string&quot;: &quot;2015-09-30T00:00:00.000Z&quot;, &quot;doc_count&quot;: 0, &quot;HITS_REVERSE&quot;: { &quot;doc_count&quot;: 0, &quot;HITS&quot;: { &quot;hits&quot;: { &quot;total&quot;: 0, &quot;max_score&quot;: null, &quot;hits&quot;: [] } } }, &quot;DATEBUCKET_SUBTOTAL&quot;: { &quot;value&quot;: 0 } } } }, &quot;TOTAL&quot;: { &quot;value&quot;: 3449 } } } ] } } }"><pre class="notranslate">{ <span class="pl-ent">"aggregations"</span>: { <span class="pl-ent">"BAR"</span>: { <span class="pl-ent">"doc_count_error_upper_bound"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"sum_other_doc_count"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"buckets"</span>: [ { <span class="pl-ent">"key"</span>: <span class="pl-s"><span class="pl-pds">"</span>ASpecialPlace<span class="pl-pds">"</span></span>, <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">2</span>, <span class="pl-ent">"NESTED"</span>: { <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">3</span>, <span class="pl-ent">"DATES"</span>: { <span class="pl-ent">"buckets"</span>: { <span class="pl-ent">"FY2012"</span>: { <span class="pl-ent">"from_as_string"</span>: <span class="pl-s"><span class="pl-pds">"</span>2011-10-01T00:00:00.000Z<span class="pl-pds">"</span></span>, <span class="pl-ent">"to_as_string"</span>: <span class="pl-s"><span class="pl-pds">"</span>2012-09-30T00:00:00.000Z<span class="pl-pds">"</span></span>, <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"HITS_REVERSE"</span>: { <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"HITS"</span>: { <span class="pl-ent">"hits"</span>: { <span class="pl-ent">"total"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"max_score"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"hits"</span>: [ { <span class="pl-ent">"_index"</span>: <span class="pl-s"><span class="pl-pds">"</span>myIndex<span class="pl-pds">"</span></span>, <span class="pl-ent">"_type"</span>: <span class="pl-s"><span class="pl-pds">"</span>myType<span class="pl-pds">"</span></span>, <span class="pl-ent">"_id"</span>: <span class="pl-s"><span class="pl-pds">"</span>AG9J61P110025<span class="pl-pds">"</span></span>, <span class="pl-ent">"_score"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"_source"</span>: { <span class="pl-ent">"a"</span>: [ { <span class="pl-ent">"signeddate"</span>: <span class="pl-s"><span class="pl-pds">"</span>2011-02-01T00:00:00+0000<span class="pl-pds">"</span></span>, <span class="pl-ent">"obligatedamount"</span>: <span class="pl-c1">4000</span> }, { <span class="pl-ent">"signeddate"</span>: <span class="pl-s"><span class="pl-pds">"</span>2012-07-11T00:00:00+0000<span class="pl-pds">"</span></span>, <span class="pl-ent">"obligatedamount"</span>: <span class="pl-c1">-1694</span> } ] } } ] } } }, <span class="pl-ent">"DATEBUCKET_SUBTOTAL"</span>: { <span class="pl-ent">"value"</span>: <span class="pl-c1">-8.365e-321</span> } }, <span class="pl-ent">"FY2013"</span>: { <span class="pl-ent">"from_as_string"</span>: <span class="pl-s"><span class="pl-pds">"</span>2012-10-01T00:00:00.000Z<span class="pl-pds">"</span></span>, <span class="pl-ent">"to"</span>: <span class="pl-c1">1380499200000</span>, <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"HITS_REVERSE"</span>: { <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"HITS"</span>: { <span class="pl-ent">"hits"</span>: { <span class="pl-ent">"total"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"max_score"</span>: <span class="pl-c1">null</span>, <span class="pl-ent">"hits"</span>: [] } } }, <span class="pl-ent">"DATEBUCKET_SUBTOTAL"</span>: { <span class="pl-ent">"value"</span>: <span class="pl-c1">0</span> } }, <span class="pl-ent">"FY2014"</span>: { <span class="pl-ent">"from_as_string"</span>: <span class="pl-s"><span class="pl-pds">"</span>2013-10-01T00:00:00.000Z<span class="pl-pds">"</span></span>, <span class="pl-ent">"to_as_string"</span>: <span class="pl-s"><span class="pl-pds">"</span>2014-09-30T00:00:00.000Z<span class="pl-pds">"</span></span>, <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"HITS_REVERSE"</span>: { <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"HITS"</span>: { <span class="pl-ent">"hits"</span>: { <span class="pl-ent">"total"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"max_score"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"hits"</span>: [ { <span class="pl-ent">"_index"</span>: <span class="pl-s"><span class="pl-pds">"</span>myIndex<span class="pl-pds">"</span></span>, <span class="pl-ent">"_type"</span>: <span class="pl-s"><span class="pl-pds">"</span>myType<span class="pl-pds">"</span></span>, <span class="pl-ent">"_id"</span>: <span class="pl-s"><span class="pl-pds">"</span>AG04GGP140011<span class="pl-pds">"</span></span>, <span class="pl-ent">"_score"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"_source"</span>: { <span class="pl-ent">"a"</span>: [ { <span class="pl-ent">"signeddate"</span>: <span class="pl-s"><span class="pl-pds">"</span>2013-12-19T00:00:00+0000<span class="pl-pds">"</span></span>, <span class="pl-ent">"obligatedamount"</span>: <span class="pl-c1">3449</span> } ] } } ] } } }, <span class="pl-ent">"DATEBUCKET_SUBTOTAL"</span>: { <span class="pl-ent">"value"</span>: <span class="pl-c1">3449</span> } }, <span class="pl-ent">"FY2015"</span>: { <span class="pl-ent">"from_as_string"</span>: <span class="pl-s"><span class="pl-pds">"</span>2014-10-01T00:00:00.000Z<span class="pl-pds">"</span></span>, <span class="pl-ent">"to_as_string"</span>: <span class="pl-s"><span class="pl-pds">"</span>2015-09-30T00:00:00.000Z<span class="pl-pds">"</span></span>, <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"HITS_REVERSE"</span>: { <span class="pl-ent">"doc_count"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"HITS"</span>: { <span class="pl-ent">"hits"</span>: { <span class="pl-ent">"total"</span>: <span class="pl-c1">0</span>, <span class="pl-ent">"max_score"</span>: <span class="pl-c1">null</span>, <span class="pl-ent">"hits"</span>: [] } } }, <span class="pl-ent">"DATEBUCKET_SUBTOTAL"</span>: { <span class="pl-ent">"value"</span>: <span class="pl-c1">0</span> } } } }, <span class="pl-ent">"TOTAL"</span>: { <span class="pl-ent">"value"</span>: <span class="pl-c1">3449</span> } } } ] } } }</pre></div> <p dir="auto">If I set a filter at the nested level to remove any nested "a" objects with a negative value, everything works fine. Note, this behavior is also apparent if using a stats agg instead of just a sum.</p>
<p dir="auto">Today, a new field can be added to the local mapping of two shards simultaneously. If the detected field type is different, then each shard can end up with a different field type. These shards then send their new mapping to the master, but only of the mappings will win.</p> <p dir="auto">This can result in incorrect results and even data loss, eg: one shard thinks that the field is a string, and the other shard (and the master) thinks that it is a number. In this case, sorting and aggregations will be wrong (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48793648" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/8485" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/8485/hovercard" href="https://github.com/elastic/elasticsearch/issues/8485">#8485</a>). Then, when the string-shard is allocated to a new node, that node will receive the "number" mapping from the master. Replaying the transaction log can cause shard failures (eg <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="50293007" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/8684" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/8684/hovercard" href="https://github.com/elastic/elasticsearch/issues/8684">#8684</a>). Or new numeric doc values are written but, when we try to merge segments, it fails with a doc values exception (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="45091629" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/8009" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/8009/hovercard" href="https://github.com/elastic/elasticsearch/issues/8009">#8009</a>).</p> <p dir="auto">The only way to ensure that dynamic fields are the same on all shards is to wait for the master to acknowledge the mapping changes before indexing the document, so:</p> <ul dir="auto"> <li>parse the document</li> <li>update local mapping</li> <li><strong>if changed, send to master and wait for ack</strong></li> <li>index document</li> </ul> <p dir="auto">This will potentially slow down indexing when many dynamic fields are being added, but it is the only way to automatically protect against data loss due to mapping conflicts.</p> <p dir="auto">Should a user wish to disable waiting for the master (and they are certain that their dynamic mapping rules are good enough to prevent these problems) then we should allow them to opt-out by setting <code class="notranslate">"dynamic": "unsafe"</code></p>
1
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong><br> Expressions testing for strict (in)equality with <code class="notranslate">undefined</code> evaluate incorrectly, e.g.:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{{ undefinedVariable === undefined }}"><pre class="notranslate"><code class="notranslate">{{ undefinedVariable === undefined }} </code></pre></div> <p dir="auto">^ "false" output to DOM</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;p *ngIf=&quot;undefinedVariable !== undefined&quot;&gt;Should not display&lt;/p&gt;"><pre class="notranslate"><code class="notranslate">&lt;p *ngIf="undefinedVariable !== undefined"&gt;Should not display&lt;/p&gt; </code></pre></div> <p dir="auto">^ "Should not display" output to DOM</p> <p dir="auto"><strong>Expected behavior</strong><br> Expressions testing for strict (in)equality with <code class="notranslate">undefined</code> evaluate correctly</p> <p dir="auto"><strong>Reproduction of the problem</strong><br> <a href="http://plnkr.co/edit/SdxObL" rel="nofollow">http://plnkr.co/edit/SdxObL</a></p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <ul dir="auto"> <li> <p dir="auto"><strong>Angular version:</strong> 2.0.X</p> </li> <li> <p dir="auto"><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]</p> </li> <li> <p dir="auto"><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]</p> </li> <li> <p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =</p> </li> </ul>
<p dir="auto"><strong>I'm submitting a ...</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x] bug report =&gt; search github for a similar issue or PR before submitting [ ] feature request [ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre></div> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">Here is the code I have for a component:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@Component({ selector: 'myComponent', templateUrl: 'mycomponent.component.html', styles: [` chart { display: block; } `], styleUrls: ['mycomponent.component.scss'], })"><pre class="notranslate">@<span class="pl-v">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">selector</span>: <span class="pl-s">'myComponent'</span><span class="pl-kos">,</span> <span class="pl-c1">templateUrl</span>: <span class="pl-s">'mycomponent.component.html'</span><span class="pl-kos">,</span> <span class="pl-c1">styles</span>: <span class="pl-kos">[</span><span class="pl-s">`</span> <span class="pl-s"> chart {</span> <span class="pl-s"> display: block;</span> <span class="pl-s"> }</span> <span class="pl-s"> `</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c1">styleUrls</span>: <span class="pl-kos">[</span><span class="pl-s">'mycomponent.component.scss'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div> <p dir="auto">And here is the Typescript error I have:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR in [default] /Users/max/Documents/workspace/admin/src/app/spots/spots-debug-graph.component.ts:19:4 An object literal cannot have multiple properties with the same name in strict mode. ERROR in [default] /Users/max/Documents/workspace/admin/src/app/spots/spots-debug-graph.component.ts:19:4 Duplicate identifier 'styles'."><pre class="notranslate"><code class="notranslate">ERROR in [default] /Users/max/Documents/workspace/admin/src/app/spots/spots-debug-graph.component.ts:19:4 An object literal cannot have multiple properties with the same name in strict mode. ERROR in [default] /Users/max/Documents/workspace/admin/src/app/spots/spots-debug-graph.component.ts:19:4 Duplicate identifier 'styles'. </code></pre></div> <p dir="auto">If I remove one of the two <code class="notranslate">styles</code>or <code class="notranslate">styleUrls</code>declarations I have no error.</p> <p dir="auto"><strong>Expected behavior</strong><br> There should be no error as in the typing definition of the <code class="notranslate">Component</code>decorator there is those two attributes.</p> <p dir="auto"><strong>Reproduction of the problem</strong><br> I don't seem to be able to create a plunkr to reproduct this error.<br> Maybe because I'm using angular-cli to build my project, so with Webpack and not SystemJs.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br> I need to change the style of the chart block to make it take all the place of its parent container.</p> <p dir="auto"><strong>Please tell us about your environment:</strong></p> <p dir="auto">OS X El Captain 10.11.6<br> angular-cli: 1.0.0-beta.15<br> node: 6.1.0<br> os: darwin x64</p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.0.0-rc.X<br> Last version, Angular 2.0.0.</li> <li><strong>Browser:</strong> [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]<br> I just checked in Chrome but I don't think this is related to the browser as I have the error in the CLI when using <code class="notranslate">ng serve</code>.</li> <li><strong>Language:</strong> [all | TypeScript X.X | ES6/7 | ES5]<br> Typescript 2.0.2</li> <li><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> = 6.1.0</li> </ul>
0
<h2 dir="auto">Steps to Reproduce</h2> <p dir="auto">Pages on Navigator stack rebuild when a new page is pushed onto the stack.<br> Suppose the pages were numbered numerically, in the order they are pushed onto the stack i.e. page 1 -&gt; page 2 -&gt; page 3. When we push Page 3, previous pages from page 1 to 2 rebuild as evident from the print statements. Is this a bug?</p> <div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'package:flutter/material.dart'; void main() { runApp(new MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'Flutter Demo', theme: new ThemeData( primarySwatch: Colors.blue, ), home: new MyHomePage(id: 1), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.id}) : super(key: key); final int id; @override _MyHomePageState createState() =&gt; new _MyHomePageState(); } class _MyHomePageState extends State&lt;MyHomePage&gt; { @override Widget build(BuildContext context) { print('Page ${widget.id} built!'); return new Scaffold( appBar: new AppBar( title: new Text(widget.id.toString()), ), body: new Center( child: new RaisedButton( child: new Text('Open next page'), onPressed: () { Navigator.of(context).push( new MaterialPageRoute( builder: (_) =&gt; new MyHomePage(id: widget.id + 1), maintainState: true ) ); } ) ), ); } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'package:flutter/material.dart'</span>; <span class="pl-k">void</span> <span class="pl-en">main</span>() { <span class="pl-en">runApp</span>(<span class="pl-k">new</span> <span class="pl-c1">MyApp</span>()); } <span class="pl-k">class</span> <span class="pl-c1">MyApp</span> <span class="pl-k">extends</span> <span class="pl-c1">StatelessWidget</span> { <span class="pl-k">@override</span> <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) { <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">MaterialApp</span>( title<span class="pl-k">:</span> <span class="pl-s">'Flutter Demo'</span>, theme<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">ThemeData</span>( primarySwatch<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.blue, ), home<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">MyHomePage</span>(id<span class="pl-k">:</span> <span class="pl-c1">1</span>), ); } } <span class="pl-k">class</span> <span class="pl-c1">MyHomePage</span> <span class="pl-k">extends</span> <span class="pl-c1">StatefulWidget</span> { <span class="pl-c1">MyHomePage</span>({<span class="pl-c1">Key</span> key, <span class="pl-c1">this</span>.id}) <span class="pl-k">:</span> <span class="pl-c1">super</span>(key<span class="pl-k">:</span> key); <span class="pl-k">final</span> <span class="pl-c1">int</span> id; <span class="pl-k">@override</span> <span class="pl-c1">_MyHomePageState</span> <span class="pl-en">createState</span>() <span class="pl-k">=&gt;</span> <span class="pl-k">new</span> <span class="pl-c1">_MyHomePageState</span>(); } <span class="pl-k">class</span> <span class="pl-c1">_MyHomePageState</span> <span class="pl-k">extends</span> <span class="pl-c1">State</span>&lt;<span class="pl-c1">MyHomePage</span>&gt; { <span class="pl-k">@override</span> <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) { <span class="pl-en">print</span>(<span class="pl-s">'Page <span class="pl-s">${<span class="pl-v">widget</span>.<span class="pl-v">id</span>}</span> built!'</span>); <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-c1">Scaffold</span>( appBar<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">AppBar</span>( title<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(widget.id.<span class="pl-en">toString</span>()), ), body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Center</span>( child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">RaisedButton</span>( child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Open next page'</span>), onPressed<span class="pl-k">:</span> () { <span class="pl-c1">Navigator</span>.<span class="pl-en">of</span>(context).<span class="pl-en">push</span>( <span class="pl-k">new</span> <span class="pl-c1">MaterialPageRoute</span>( builder<span class="pl-k">:</span> (_) <span class="pl-k">=&gt;</span> <span class="pl-k">new</span> <span class="pl-c1">MyHomePage</span>(id<span class="pl-k">:</span> widget.id <span class="pl-k">+</span> <span class="pl-c1">1</span>), maintainState<span class="pl-k">:</span> <span class="pl-c1">true</span> ) ); } ) ), ); } }</pre></div> <h2 dir="auto">Logs</h2> <p dir="auto">When page 2 is pushed, the log outputs</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter (21176): Page 2 built! I/flutter (21176): Page 2 built! I/flutter (21176): Page 1 built!"><pre class="notranslate"><code class="notranslate">I/flutter (21176): Page 2 built! I/flutter (21176): Page 2 built! I/flutter (21176): Page 1 built! </code></pre></div> <p dir="auto">Expected:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter (21176): Page 2 built! // only "><pre class="notranslate"><code class="notranslate">I/flutter (21176): Page 2 built! // only </code></pre></div> <p dir="auto">When page 3 is pushed, the log outputs</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter (21176): Page 2 built! I/flutter (21176): Page 3 built! I/flutter (21176): Page 3 built! I/flutter (21176): Page 2 built! I/flutter (21176): Page 1 built!"><pre class="notranslate"><code class="notranslate">I/flutter (21176): Page 2 built! I/flutter (21176): Page 3 built! I/flutter (21176): Page 3 built! I/flutter (21176): Page 2 built! I/flutter (21176): Page 1 built! </code></pre></div> <p dir="auto">Expected:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I/flutter (21176): Page 3 built! // only "><pre class="notranslate"><code class="notranslate">I/flutter (21176): Page 3 built! // only </code></pre></div> <h2 dir="auto">Flutter Doctor</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[√] Flutter (on Microsoft Windows [Version 10.0.15063], locale en-US, channel master) • Flutter at C:\Users\tzm\Downloads\flutter_sdk • Framework revision b156a0f054 (5 days ago), 2017-08-11 22:01:40 -0700 • Engine revision fef7d827d6 • Tools Dart version 1.25.0-dev.9.0 [√] Android toolchain - develop for Android devices (Android SDK 25.0.3) • Android SDK at C:\Users\tzm\AppData\Local\Android\sdk • Platform android-26, build-tools 25.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06)"><pre class="notranslate"><code class="notranslate">[√] Flutter (on Microsoft Windows [Version 10.0.15063], locale en-US, channel master) • Flutter at C:\Users\tzm\Downloads\flutter_sdk • Framework revision b156a0f054 (5 days ago), 2017-08-11 22:01:40 -0700 • Engine revision fef7d827d6 • Tools Dart version 1.25.0-dev.9.0 [√] Android toolchain - develop for Android devices (Android SDK 25.0.3) • Android SDK at C:\Users\tzm\AppData\Local\Android\sdk • Platform android-26, build-tools 25.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_112-release-b06) </code></pre></div>
<p dir="auto">Flutter crash report; please file at <a href="https://github.com/flutter/flutter/issues">https://github.com/flutter/flutter/issues</a>.</p> <h2 dir="auto">command</h2> <p dir="auto">flutter build apk</p> <h2 dir="auto">exception</h2> <p dir="auto">FormatException: FormatException: Bad UTF-8 encoding 0xe4 (at offset 9)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#0 _Utf8Decoder.convert (dart:convert/utf.dart:484:15) #1 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:345:14) #2 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341:5) #3 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86:18) #4 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24) #5 _rootRunUnary (dart:async/zone.dart:1132:38) #6 _CustomZone.runUnary (dart:async/zone.dart:1029:19) #7 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7) #8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11) #9 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7) #10 _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19) #11 _StreamController._add (dart:async/stream_controller.dart:639:7) #12 _StreamController.add (dart:async/stream_controller.dart:585:5) #13 _Socket._onData (dart:io/runtime/binsocket_patch.dart:1721:41) #14 _rootRunUnary (dart:async/zone.dart:1136:13) #15 _CustomZone.runUnary (dart:async/zone.dart:1029:19) #16 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7) #17 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11) #18 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7) #19 _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19) #20 _StreamController._add (dart:async/stream_controller.dart:639:7) #21 _StreamController.add (dart:async/stream_controller.dart:585:5) #22 new _RawSocket.&lt;anonymous closure&gt; (dart:io/runtime/binsocket_patch.dart:1283:33) #23 _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:826:14) #24 _microtaskLoop (dart:async/schedule_microtask.dart:41:21) #25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) #26 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13) #27 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)"><pre class="notranslate"><code class="notranslate">#0 _Utf8Decoder.convert (dart:convert/utf.dart:484:15) #1 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:345:14) #2 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341:5) #3 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86:18) #4 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24) #5 _rootRunUnary (dart:async/zone.dart:1132:38) #6 _CustomZone.runUnary (dart:async/zone.dart:1029:19) #7 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7) #8 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11) #9 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7) #10 _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19) #11 _StreamController._add (dart:async/stream_controller.dart:639:7) #12 _StreamController.add (dart:async/stream_controller.dart:585:5) #13 _Socket._onData (dart:io/runtime/binsocket_patch.dart:1721:41) #14 _rootRunUnary (dart:async/zone.dart:1136:13) #15 _CustomZone.runUnary (dart:async/zone.dart:1029:19) #16 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7) #17 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11) #18 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7) #19 _SyncStreamController._sendData (dart:async/stream_controller.dart:763:19) #20 _StreamController._add (dart:async/stream_controller.dart:639:7) #21 _StreamController.add (dart:async/stream_controller.dart:585:5) #22 new _RawSocket.&lt;anonymous closure&gt; (dart:io/runtime/binsocket_patch.dart:1283:33) #23 _NativeSocket.issueReadEvent.issue (dart:io/runtime/binsocket_patch.dart:826:14) #24 _microtaskLoop (dart:async/schedule_microtask.dart:41:21) #25 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5) #26 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13) #27 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5) </code></pre></div> <h2 dir="auto">flutter doctor</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="�[32m[✓]�[39m Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.407], locale zh-CN) �[32m•�[39m Flutter version 1.0.0 at D:\AndroidSDK\flutter �[32m•�[39m Framework revision 5391447fae (11 days ago), 2018-11-29 19:41:26 -0800 �[32m•�[39m Engine revision 7375a0f414 �[32m•�[39m Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297) �[32m[✓]�[39m Android toolchain - develop for Android devices (Android SDK 28.0.3) �[32m•�[39m Android SDK at E:\androidsdk �[32m•�[39m Android NDK location not configured (optional; useful for native profiling support) �[32m•�[39m Platform android-28, build-tools 28.0.3 �[32m•�[39m ANDROID_HOME = E:\androidsdk �[32m•�[39m Java binary at: F:\android-studio-ide-181.5014246-windows\android-studio\jre\bin\java �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) �[32m•�[39m All Android licenses accepted. �[32m[✓]�[39m Android Studio (version 3.2) �[32m•�[39m Android Studio at F:\android-studio-ide-181.5014246-windows\android-studio �[32m•�[39m Flutter plugin version 31.1.1 �[32m•�[39m Dart plugin version 181.5656 �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) �[33m[!]�[39m Connected device �[33m!�[39m No devices available �[33m!�[39m Doctor found issues in 1 category."><pre class="notranslate"><code class="notranslate">�[32m[✓]�[39m Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.407], locale zh-CN) �[32m•�[39m Flutter version 1.0.0 at D:\AndroidSDK\flutter �[32m•�[39m Framework revision 5391447fae (11 days ago), 2018-11-29 19:41:26 -0800 �[32m•�[39m Engine revision 7375a0f414 �[32m•�[39m Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297) �[32m[✓]�[39m Android toolchain - develop for Android devices (Android SDK 28.0.3) �[32m•�[39m Android SDK at E:\androidsdk �[32m•�[39m Android NDK location not configured (optional; useful for native profiling support) �[32m•�[39m Platform android-28, build-tools 28.0.3 �[32m•�[39m ANDROID_HOME = E:\androidsdk �[32m•�[39m Java binary at: F:\android-studio-ide-181.5014246-windows\android-studio\jre\bin\java �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) �[32m•�[39m All Android licenses accepted. �[32m[✓]�[39m Android Studio (version 3.2) �[32m•�[39m Android Studio at F:\android-studio-ide-181.5014246-windows\android-studio �[32m•�[39m Flutter plugin version 31.1.1 �[32m•�[39m Dart plugin version 181.5656 �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06) �[33m[!]�[39m Connected device �[33m!�[39m No devices available �[33m!�[39m Doctor found issues in 1 category. </code></pre></div>
0
<p dir="auto">Should we add PathEscape and PathUnescape functions, similar to QueryEscape and QueryUnescape? The functionality is already present (see func (*URL) EscapedPath), but it is awkward to use.</p> <p dir="auto">See <a href="https://groups.google.com/forum/#!topic/golang-dev/UDUqvuKrq14" rel="nofollow">https://groups.google.com/forum/#!topic/golang-dev/UDUqvuKrq14</a> for golang-dev discussion</p>
<pre class="notranslate">Compile this file (loosely based on test/named1.go) with 6g: package p type Bool bool type Int int type String string func B(Bool) {} func I(Int) {} func S(String) {} func F() { B(1 == 2) I(1 + 2) S("1" + "2") } I see this: foo.go:12: cannot use false (type ideal bool) as type Bool in function argument If the type of "1 == 2" is in fact "ideal bool", then it would seem that the function call should be permitted, by analogy with the other two function calls. However, the spec currently says "Comparison operators compare two operands and yield a value of type bool". From that I conclude that the compiler is correct to give an error, but that the error message should say "type bool", not "type ideal bool".</pre>
0
<p dir="auto">When encoding a large data structure (such as a tree representing a file-system), the Encode() methods first marshal the encoded data into a []byte buffer and then write the buffer to the writer. Similarly, the Decode() methods require a buffer to unmarshal from. These buffers must be allocated (and grown) and typically more than double the memory consumption of the process. This is limiting for applications which are sized to the machine/container.</p> <p dir="auto">I propose that the interfaces are extended to support streaming encoding/decoding of data. For each type (except slices and maps), the data would be separately marshaled and written. For slices and maps, each entry would be marshaled and written, rather the slice/map as a whole.</p> <p dir="auto">Some API suggestions/alternatives:<br> func Encode(w io.Writer, v interface{}) error<br> func NewStreamingEncoder(w io.Writer) *Encoder<br> func (enc *Encoder) StreamingEncode(v interface{}) error</p>
<p dir="auto">Gc correctly rejects the following program:</p> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package n func n(){_=string(0.)}"><pre class="notranslate"><span class="pl-k">package</span> n <span class="pl-k">func</span> <span class="pl-en">n</span>(){<span class="pl-s1">_</span><span class="pl-c1">=</span><span class="pl-en">string</span>(<span class="pl-c1">0.</span>)}</pre></div> <p dir="auto">But gotype successfully compiles it. It must not. <code class="notranslate">0.</code> is an fp constant.<br> on commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/golang/go/commit/e9a746de6e61b9b823a981843c0d98bc209eed2b/hovercard" href="https://github.com/golang/go/commit/e9a746de6e61b9b823a981843c0d98bc209eed2b"><tt>e9a746d</tt></a></p>
0
<p dir="auto"><strong>I'm submitting a ...</strong> (check one with "x")<br> [x] bug report<br> [ ] feature request<br> [ ] support request</p> <p dir="auto"><strong>Current behavior</strong></p> <p dir="auto">Define property named "click" as an <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/output/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/output">@output</a>().<br> `@Output()<br> public click: EventEmitter = new EventEmitter();</p> <p dir="auto">public foo(item){<br> this.click.emit(item);<br> }<code class="notranslate">use the component and bind the click property to handler</code>&lt;myComponent (click) = "myClickHandler($event)"/&gt;`</p> <p dir="auto">When you debug all works fine.<br> When you work without debugging for some reason the DOM/JS click event is emitting.</p> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">Override the DOM/JS click event and emit only the custom click.</p> <p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br> <a href="http://plnkr.co/edit/vaKukOWH55Q8RTB4nZQD" rel="nofollow">http://plnkr.co/edit/vaKukOWH55Q8RTB4nZQD</a><br> The plunker doesnt run.</p> <p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p> <p dir="auto">I want that the one that going to use my component will use it intuitively.</p> <ul dir="auto"> <li><strong>Angular version:</strong> 2.4.4</li> </ul> <ul dir="auto"> <li> <p dir="auto"><strong>Browser:</strong> Chrome 46</p> </li> <li> <p dir="auto"><strong>Language:</strong> TypeScript</p> </li> </ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@Component({ selector: 'my-component' events: ['change'] }) @View({ template: '&lt;input (change)=&quot;...&quot;&gt;' }) class MyComponent { } "><pre class="notranslate"><code class="notranslate">@Component({ selector: 'my-component' events: ['change'] }) @View({ template: '&lt;input (change)="..."&gt;' }) class MyComponent { } </code></pre></div> <p dir="auto">The above code creates an issue. It conflates the <code class="notranslate">change</code> event from the <code class="notranslate">MyComponent</code> with the bubbling <code class="notranslate">change</code> event from the <code class="notranslate">&lt;input&gt;</code>.</p> <p dir="auto">The correct behavior is that the <code class="notranslate">change</code> event which is part of the components should filter out the DOM <code class="notranslate">change</code> events. Otherwise</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;my-component (change)=&quot;doSomething($event)&quot;&gt;"><pre class="notranslate"><code class="notranslate">&lt;my-component (change)="doSomething($event)"&gt; </code></pre></div> <p dir="auto">will sometimes get the <code class="notranslate">$event</code> from the <code class="notranslate">MyComponent</code> and sometimes from the <code class="notranslate">input</code> event.</p>
1
<p dir="auto">Sometimes it happens so that some code logically belongs in one module, but there is just too much of it to put in one file. For example, here is my use case:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// base.ts export interface SomeCoreType { ... } export interface MyStandardAjaxResponse { ... } export function doAjax( url: string, onSuccess: (r: MyStandardAjaxResponse) =&gt; void ) { ... } export interface User { ... } export function isUserOk( u: User ) { return ... } // and so on"><pre class="notranslate"><code class="notranslate">// base.ts export interface SomeCoreType { ... } export interface MyStandardAjaxResponse { ... } export function doAjax( url: string, onSuccess: (r: MyStandardAjaxResponse) =&gt; void ) { ... } export interface User { ... } export function isUserOk( u: User ) { return ... } // and so on </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// customer.ts import b = module( &quot;./base.ts&quot; ); export class Customer { constructor( id: number, someArg: b.SomeCoreType ) { b.doAjax( '/api/getCustomer', r =&gt; this.loadData( r ) ); } loadData( r: b.MyStandardAjaxResponse ) { ... } } // and so on"><pre class="notranslate"><code class="notranslate">// customer.ts import b = module( "./base.ts" ); export class Customer { constructor( id: number, someArg: b.SomeCoreType ) { b.doAjax( '/api/getCustomer', r =&gt; this.loadData( r ) ); } loadData( r: b.MyStandardAjaxResponse ) { ... } } // and so on </code></pre></div> <p dir="auto">Over time, that <strong>base.ts</strong> file tends to grow with all kinds of enums, utility functions, common types, etc. At some point, it becomes so large that I want to partition it across several files. For example, I'd like to extract <strong>SomeCoreType</strong> into its own module <strong>coreType.ts</strong>, then extract <strong>MyStandardAjaxResponse</strong> and <strong>doAjax</strong> into <strong>ajax.ts</strong>, and extract <strong>User</strong> and <strong>isUserOk</strong> into <strong>user.ts</strong>. Just for my sanity's sake. Makes sense?</p> <p dir="auto">But if I do that, I'll have to import a gazillion of modules every time.<br> So my next logical step - consolidate them all back into base.ts:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// base.ts import _coreType = module(&quot;./coreType&quot;); export var CoreType = _coreType; import _ajax = module(&quot;./ajax&quot;); export var Ajax = _ajax; import _user = module(&quot;./user&quot;); export var User = _user; // and so on"><pre class="notranslate"><code class="notranslate">// base.ts import _coreType = module("./coreType"); export var CoreType = _coreType; import _ajax = module("./ajax"); export var Ajax = _ajax; import _user = module("./user"); export var User = _user; // and so on </code></pre></div> <p dir="auto">That's better. Now I only have to import base.ts.<br> However, I still have to write <strong>b.Ajax.doAjax</strong> instead of just <strong>b.doAjax</strong>. That's inconvenient.<br> But an even bigger issue is that now I can't use interfaces declared in those modules. TypeScript just doesn't pick them up.</p> <p dir="auto">What I'd like to be able to do is something like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Ajax = module(&quot;./ajax&quot;); export Ajax.*;"><pre class="notranslate"><code class="notranslate">import Ajax = module("./ajax"); export Ajax.*; </code></pre></div> <p dir="auto">Or, perhaps, the infamous <strong>export import</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="export import Ajax = module(&quot;./ajax&quot;);"><pre class="notranslate"><code class="notranslate">export import Ajax = module("./ajax"); </code></pre></div> <p dir="auto">Or, maybe, something like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="reexport module(&quot;./ajax&quot;);"><pre class="notranslate"><code class="notranslate">reexport module("./ajax"); </code></pre></div> <p dir="auto">And the output code could look something like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="define(['module', 'exports', './ajax'], function(module, exports, __ajax__) { for( var k in __ajax__ ) exports[k] = __ajax__[k]; });"><pre class="notranslate"><code class="notranslate">define(['module', 'exports', './ajax'], function(module, exports, __ajax__) { for( var k in __ajax__ ) exports[k] = __ajax__[k]; }); </code></pre></div>
<p dir="auto">Support compiling multiple input .ts files into one external module.</p> <p dir="auto">Need to determine exactly how the module boundaries are defined when doing this.</p>
1
<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jockjocko/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jockjocko">@jockjocko</a> on April 12, 2016 9:39</em></p> <ul dir="auto"> <li>VSCode Version: 0.10.15-insider</li> <li>OS Version: Windows 10</li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>Create class and constructor.</li> <li>Create a new instance of the newly created class</li> <li>Shift + f12 or right click find all references</li> </ol> <p dir="auto">I would expect it to find all references of the class being constructed "new ExampleClass()".</p> <p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="147692752" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/5185" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/5185/hovercard" href="https://github.com/microsoft/vscode/issues/5185">microsoft/vscode#5185</a></em></p>
<p dir="auto">I dont find a way to "Find References" on a constructor of a class. Is this not supported?</p>
1
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto"><code class="notranslate">http://localhost:3000/_error</code> reloads indefinitely.</p> <h2 dir="auto">To Reproduce</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="yarn create next-app test cd test yarn dev"><pre class="notranslate"><code class="notranslate">yarn create next-app test cd test yarn dev </code></pre></div> <p dir="auto">And go to <code class="notranslate">http://localhost:3000/_error</code>.</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">I expect to have a 404 error, similar to calling <code class="notranslate">http://localhost:3000/_document</code>, <code class="notranslate">http://localhost:3000/_app</code> or any other non-existing page.</p> <h2 dir="auto">System information</h2> <ul dir="auto"> <li>OS: Linux</li> <li>Browser (if applies): Chrome</li> <li>Version of Next.js: 9.0.5</li> </ul>
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto">When you visit <code class="notranslate">/_error</code> in development the page reloads non-stop and the error page is rendered with a status of 200 and text of <code class="notranslate">An unexpected error occurred</code>.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p> <ol dir="auto"> <li>Create minimal Next.js project <code class="notranslate">yarn create next-app error-loop</code></li> <li>Visit <code class="notranslate">/_error</code> in your browser</li> <li>See the error</li> </ol> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Still being discussed, most likely to render 404 similar to <code class="notranslate">_app</code> and <code class="notranslate">_document</code></p> <h2 dir="auto">Screenshots</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/22380829/61557864-fce93100-aa2a-11e9-97e7-700741f6b75d.gif"><img src="https://user-images.githubusercontent.com/22380829/61557864-fce93100-aa2a-11e9-97e7-700741f6b75d.gif" alt="error-loop" data-animated-image="" style="max-width: 100%;"></a></p> <h2 dir="auto">System information</h2> <ul dir="auto"> <li>OS: [e.g. macOS, Windows] any</li> <li>Browser (if applies) [e.g. chrome, safari] any</li> <li>Version of Next.js: [e.g. 6.0.2] latest (9.0.2)</li> </ul> <h2 dir="auto">Additional context</h2> <p dir="auto">Related PR <a href="https://github.com/zeit/next.js/pull/8033" data-hovercard-type="pull_request" data-hovercard-url="/vercel/next.js/pull/8033/hovercard">here</a></p>
1
<p dir="auto">I want to try the compression performance of weight pruning of TensorFlow. Is it OK for you to provide the model after pruning? e.g., the 50% sparsity MobileNetV1?</p>
1
<h2 dir="auto">🐛 Bug</h2> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>Execute <code class="notranslate">conda install pytorch torchvision cudatoolkit=10.0 -c pytorch</code> to intall pytorch1.1 and torchvision0.3.0</li> <li>Execute <code class="notranslate">conda install pytorch-nightly -c pytorch</code> to install pytorch1.2</li> <li>Import torchvision then get the following error.</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt; File &quot;/opt/anaconda/lib/python3.7/site-packages/torchvision/__init__.py&quot;, line 1, in &lt;module&gt; from torchvision import models File &quot;/opt/anaconda/lib/python3.7/site-packages/torchvision/models/__init__.py&quot;, line 11, in &lt;module&gt; from . import detection File &quot;/opt/anaconda/lib/python3.7/site-packages/torchvision/models/detection/__init__.py&quot;, line 1, in &lt;module&gt; from .faster_rcnn import * File &quot;/opt/anaconda/lib/python3.7/site-packages/torchvision/models/detection/faster_rcnn.py&quot;, line 7, in &lt;module&gt; from torchvision.ops import misc as misc_nn_ops File &quot;/opt/anaconda/lib/python3.7/site-packages/torchvision/ops/__init__.py&quot;, line 1, in &lt;module&gt; from .boxes import nms, box_iou File &quot;/opt/anaconda/lib/python3.7/site-packages/torchvision/ops/boxes.py&quot;, line 2, in &lt;module&gt; from torchvision import _C ImportError: /opt/anaconda/lib/python3.7/site-packages/torchvision/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at7getTypeERKNS_6TensorE"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File "/opt/anaconda/lib/python3.7/site-packages/torchvision/__init__.py", line 1, in &lt;module&gt; from torchvision import models File "/opt/anaconda/lib/python3.7/site-packages/torchvision/models/__init__.py", line 11, in &lt;module&gt; from . import detection File "/opt/anaconda/lib/python3.7/site-packages/torchvision/models/detection/__init__.py", line 1, in &lt;module&gt; from .faster_rcnn import * File "/opt/anaconda/lib/python3.7/site-packages/torchvision/models/detection/faster_rcnn.py", line 7, in &lt;module&gt; from torchvision.ops import misc as misc_nn_ops File "/opt/anaconda/lib/python3.7/site-packages/torchvision/ops/__init__.py", line 1, in &lt;module&gt; from .boxes import nms, box_iou File "/opt/anaconda/lib/python3.7/site-packages/torchvision/ops/boxes.py", line 2, in &lt;module&gt; from torchvision import _C ImportError: /opt/anaconda/lib/python3.7/site-packages/torchvision/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN2at7getTypeERKNS_6TensorE </code></pre></div> <h2 dir="auto">Environment</h2> <p dir="auto">Versions of relevant libraries:<br> [pip] numpy==1.16.2<br> [pip] numpydoc==0.8.0<br> [pip] torch==1.2.0.dev20190730+cu100<br> [pip] torchvision==0.3.0<br> [conda] blas 1.0 mkl<br> [conda] mkl 2019.3 199<br> [conda] mkl-service 1.1.2 py37he904b0f_5<br> [conda] mkl_fft 1.0.10 py37ha843d7b_0<br> [conda] mkl_random 1.0.2 py37hd81dba3_0<br> [conda] pytorch 1.1.0 py3.7_cuda10.0.130_cudnn7.5.1_0<br> [conda] pytorch-nightly 1.2.0.dev20190730+cu100 py3.7_cuda10.0.130_cudnn7.6.1_0 pytorch<br> [conda] torchvision 0.3.0 py37_cu10.0.130_1</p> <h2 dir="auto">Additional context</h2> <p dir="auto">This import error only happens with pytorch1.2 and torchvision0.3, while pytorch1.2 and torchvision0.2 are ok. So there may be some incompatible problem between torchvision0.3 and pytorch1.2.</p>
<p dir="auto">The official website does not provide the torchvison version installation method.<br> Here is the error message when torchvison 0.3.0 is used.<br> torchvision/_C.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN2at7getTypeERKNS_6TensorE</p> <p dir="auto">That should be caused by the mismatch version between pytorch-nightly and torchvision 0.3.0.</p>
1
<p dir="auto">Consider the following code:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const path = &quot;./404.txt&quot;; await Deno.readTextFile(path);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">path</span> <span class="pl-c1">=</span> <span class="pl-s">"./404.txt"</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">readTextFile</span><span class="pl-kos">(</span><span class="pl-s1">path</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">I get the following error when I run the script.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: Uncaught (in promise) NotFound: No such file or directory (os error 2) const text = await Deno.readTextFile(path); ^ at deno:core/core.js:86:46 at unwrapOpResult (deno:core/core.js:106:13) at async open (deno:runtime/js/40_files.js:46:17) at async Object.readTextFile (deno:runtime/js/40_read_file.js:40:18) at async file:///Users/sr/deno_issues/io_error.ts:2:14"><pre class="notranslate"><code class="notranslate">error: Uncaught (in promise) NotFound: No such file or directory (os error 2) const text = await Deno.readTextFile(path); ^ at deno:core/core.js:86:46 at unwrapOpResult (deno:core/core.js:106:13) at async open (deno:runtime/js/40_files.js:46:17) at async Object.readTextFile (deno:runtime/js/40_read_file.js:40:18) at async file:///Users/sr/deno_issues/io_error.ts:2:14 </code></pre></div> <p dir="auto">It isn't easy to debug when you've hundreds of files with the above information.</p> <p dir="auto">One thing I'm not sure about is if we should delegate the responsibility to scripts or if we should include the path in Deno's built-in error itself.</p> <p dir="auto">I favor including the path in the default error message as most scripts usually won't take the extra effort to display additional information when they encounter the error.</p>
<p dir="auto">Currently the error message of the exception, thrown from the <code class="notranslate">Deno.stat/statSync</code>, when the file is missing, does not include the file name:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="nickolay@frontier:~/workspace/Bryntum/siesta-monorepo/siesta$ deno Deno 1.9.2 exit using ctrl+d or close() &gt; Deno.statSync('/home/nickolay/not_existing_file') Uncaught NotFound: No such file or directory (os error 2) at unwrapOpResult (deno:core/core.js:99:13) at Object.opSync (deno:core/core.js:113:12) at Object.statSync (deno:runtime/js/30_fs.js:224:22) at &lt;anonymous&gt;:2:6 &gt; "><pre class="notranslate"><code class="notranslate">nickolay@frontier:~/workspace/Bryntum/siesta-monorepo/siesta$ deno Deno 1.9.2 exit using ctrl+d or close() &gt; Deno.statSync('/home/nickolay/not_existing_file') Uncaught NotFound: No such file or directory (os error 2) at unwrapOpResult (deno:core/core.js:99:13) at Object.opSync (deno:core/core.js:113:12) at Object.statSync (deno:runtime/js/30_fs.js:224:22) at &lt;anonymous&gt;:2:6 &gt; </code></pre></div> <p dir="auto">Is this intentional with some rationale behind, or just an oversight? From usability perspective the filename should be included in the message of course.</p>
1
<p dir="auto">When compiling a TypeScript project that references <code class="notranslate">@types/node</code>, the compiler (TSC) will report an error regarding duplicate <code class="notranslate">assert</code> identifiers.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="node_modules/@types/node/assert.d.ts:56:14 - error TS2300: Duplicate identifier 'assert'. 56 export = assert; ~~~~~~ node_modules/@types/node/ts3.7/assert.d.ts:56:14 56 export = assert; ~~~~~~ 'assert' was also declared here."><pre class="notranslate"><code class="notranslate">node_modules/@types/node/assert.d.ts:56:14 - error TS2300: Duplicate identifier 'assert'. 56 export = assert; ~~~~~~ node_modules/@types/node/ts3.7/assert.d.ts:56:14 56 export = assert; ~~~~~~ 'assert' was also declared here. </code></pre></div> <p dir="auto">Rolling <code class="notranslate">@types/node</code> back to version <code class="notranslate">12.12.6</code> resolves the issue.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/G-Rath/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/G-Rath">@G-Rath</a> (mentioned due to the latest activity in the <code class="notranslate">ts3.*</code> directories)</p>
<p dir="auto">After adding the NuGet package <code class="notranslate">Handlebars.TypeScript.DefinitelyTyped</code>, it's throwing a lot of "Duplicate Identifier" errors because there are two handlebars files. My project will not compile with it installed.</p>
0
<p dir="auto">When i add brand logo to navbar it gets overlapped by ".navbar-collapse" so it can't be clickable. There is no example of such use case and i can't seem to find any solution.</p>
<p dir="auto">i am a beginner in website development and m stuck here by unable to replace the bootsrtap navbar brand with a logo-image which is a png file .</p>
1
<p dir="auto"><code class="notranslate">cmd + click</code> adds an extra cursor in the editor.</p> <p dir="auto"><code class="notranslate">cmd + shift + click</code> currently behaves in a weird way that does not appear to be intended. My expectation was for <code class="notranslate">cmd + shift + click</code> to add multiple cursors on the lines between the last added cursor and the click position (on the same column as the click).</p> <p dir="auto">Does this sound like a good idea? I know I would find it rather useful.</p>
<p dir="auto">In plenty editors, doing <code class="notranslate">left-alt</code> (left option) and selecting text will take a slice of that text:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1189716/3020145/21a1ced6-df9b-11e3-9cf2-70371ca5fee1.gif"><img src="https://cloud.githubusercontent.com/assets/1189716/3020145/21a1ced6-df9b-11e3-9cf2-70371ca5fee1.gif" alt="sublime" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">Notice that only characters are selected, empty lines are ignored. Also, after selecting with <code class="notranslate">left-alt</code>, there should be multi-cursors at the end of each selection:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1189716/3020149/2d06c1c8-df9b-11e3-9a39-226039d0f777.gif"><img src="https://cloud.githubusercontent.com/assets/1189716/3020149/2d06c1c8-df9b-11e3-9a39-226039d0f777.gif" alt="reslice" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto">The GIF are from Sublime, the same behavior is observed in TextMate, IntelliJ, vim (visual selection).</p> <p dir="auto">The current behavior in Atom is to perform a normal text selection:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1189716/3020155/3bbc4512-df9b-11e3-97a8-1acab2dd686f.gif"><img src="https://cloud.githubusercontent.com/assets/1189716/3020155/3bbc4512-df9b-11e3-97a8-1acab2dd686f.gif" alt="atom" data-animated-image="" style="max-width: 100%;"></a></p>
1
<p dir="auto">Hi there. First of all, thanks a lot for making JAX such a great framework. It's awesome.</p> <p dir="auto">Actually it's only awesome when we only do training on a single node. To my knowledge, the multi-node support is still missing for now. 10 months ago, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hawkinsp/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hawkinsp">@hawkinsp</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gnecula/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gnecula">@gnecula</a> mentioned that there's already some experimental support for multi-GPU training across multiple devices in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="600654895" data-permission-text="Title is private" data-url="https://github.com/google/jax/issues/2731" data-hovercard-type="issue" data-hovercard-url="/google/jax/issues/2731/hovercard" href="https://github.com/google/jax/issues/2731">#2731</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="606736362" data-permission-text="Title is private" data-url="https://github.com/google/jax/issues/2837" data-hovercard-type="issue" data-hovercard-url="/google/jax/issues/2837/hovercard" href="https://github.com/google/jax/issues/2837">#2837</a> respectively. However, there's no description how we can achieve that, in a hacky way or not. I understand that experimental support could be brittle and/or rough. Just feeling adventurous and want to try out. Could someone share some idea on the multi-node training recipe with JAX?</p> <p dir="auto">Also what is the priority and roadmap of fully supporting multi-node training with JAX? From the fact that no one's responding to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="600654895" data-permission-text="Title is private" data-url="https://github.com/google/jax/issues/2731" data-hovercard-type="issue" data-hovercard-url="/google/jax/issues/2731/hovercard" href="https://github.com/google/jax/issues/2731">#2731</a> any more, I assume it's not of high priority and not likely coming in the near future? Thanks again!</p>
<p dir="auto">I don't have a node with 8 gpus. I have two nodes each with 4 gpus. So is it possible to train a model on multiple nodes?</p>
1
<p dir="auto"><strong>Apache Airflow version</strong>: 1.7.1.2</p> <p dir="auto"><strong>Kubernetes version (if you are using kubernetes)</strong> (use <code class="notranslate">kubectl version</code>):</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>:</li> <li><strong>OS</strong> (e.g. from /etc/os-release):</li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li> <li><strong>Install tools</strong>:</li> <li><strong>Others</strong>:<br> <strong>What happened</strong>:</li> </ul> <p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="155599707" data-permission-text="Title is private" data-url="https://github.com/apache/airflow/issues/1514" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/1514/hovercard" href="https://github.com/apache/airflow/pull/1514">#1514</a> added a verify_integrity function that greedily creates TaskInstance objects for all tasks in a dag.</p> <p dir="auto">This does not interact well with the assumptions in the new update_state function. The guard for if len(tis) == len(dag.active_tasks) is no longer effective; in the old world of lazily-created tasks this code would only run once all the tasks in the dag had run. Now it runs all the time, and as soon as one task in a dag run fails the whole DagRun fails. This is bad since the scheduler stops processing the DagRun after that.</p> <p dir="auto">In retrospect, the old code was also buggy: if your dag ends with a bunch of Queued tasks the DagRun could be marked as failed prematurely.</p> <p dir="auto">I suspect the fix is to update the guard to look at tasks where the state is success or failed. Otherwise we're evaluating and failing the dag based on up_for_retry/queued/scheduled tasks.</p> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto"><strong>How to reproduce it</strong>:</p> <p dir="auto"><strong>Anything else we need to know</strong>:</p> <p dir="auto">Moved here from <a href="https://issues.apache.org/jira/browse/AIRFLOW-441" rel="nofollow">https://issues.apache.org/jira/browse/AIRFLOW-441</a></p>
<h3 dir="auto">Body</h3> <h2 dir="auto">Provider <a href="https://pypi.org/project/apache-airflow-providers-alibaba/1.1.0rc1" rel="nofollow">alibaba: 1.1.0rc1</a></h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21785" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21785/hovercard">Add oss_task_handler into alibaba-provider and enable remote logging to OSS (#21785)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/EricGao888/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/EricGao888">@EricGao888</a></li> </ul> <h2 dir="auto">Provider <a href="https://pypi.org/project/apache-airflow-providers-amazon/3.1.1rc1" rel="nofollow">amazon: 3.1.1rc1</a></h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21231" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21231/hovercard">Added AWS RDS sensors (#21231)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kazanzhy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kazanzhy">@kazanzhy</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/20907" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/20907/hovercard">Added AWS RDS operators (#20907)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kazanzhy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kazanzhy">@kazanzhy</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/19137" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/19137/hovercard">Add RedshiftDataHook (#19137)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/john-jac/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/john-jac">@john-jac</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21686" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21686/hovercard">Feature: Add invoke lambda function operator (#21686)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/schirag1993/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/schirag1993">@schirag1993</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21779" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21779/hovercard">Add JSON output on SqlToS3Operator (#21779)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/mariotaddeucci/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/mariotaddeucci">@mariotaddeucci</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21673" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21673/hovercard">Implement a Sagemaker DeleteModelOperator and Delete model hook. (#21673)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/hsrocks/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/hsrocks">@hsrocks</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/20642" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/20642/hovercard">Added Hook for Amazon RDS (#20642)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kazanzhy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kazanzhy">@kazanzhy</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21475" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21475/hovercard">Added SNS example DAG and rst (#21475)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ferruzzi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ferruzzi">@ferruzzi</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22002" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22002/hovercard">retry on very specific eni provision failures (#22002)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zachliu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zachliu">@zachliu</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21778" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21778/hovercard">Configurable AWS Session Factory (#21778)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ac1997/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ac1997">@ac1997</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/21500" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21500/hovercard">S3KeySensor to use S3Hook url parser (#21500)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dstandish/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dstandish">@dstandish</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21574" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21574/hovercard">ECSOperator: Get log events after sleep to get all logs (#21574)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kanga333/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kanga333">@kanga333</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/21295" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21295/hovercard">Use temporary file in GCSToS3Operator (#21295)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rafalh/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rafalh">@rafalh</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22125" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22125/hovercard">AWS RDS integration fixes (#22125)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kazanzhy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kazanzhy">@kazanzhy</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21885" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21885/hovercard">Fix the Type Hints in <code class="notranslate">RedshiftSQLOperator</code> (#21885)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kaxil/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kaxil">@kaxil</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/21458" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21458/hovercard">Bug Fix - S3DeleteObjectsOperator will try and delete all keys (#21458)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/njrs92/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/njrs92">@njrs92</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21681" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21681/hovercard">Fix Amazon SES emailer signature (#21681)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/potiuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/potiuk">@potiuk</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/21441" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21441/hovercard">Fix EcsOperatorError, so it can be loaded from a picklefile (#21441)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ngwallace/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ngwallace">@ngwallace</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22157" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22157/hovercard">Fix RedshiftDataOperator and update doc (#22157)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vincbeck/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vincbeck">@vincbeck</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22137" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22137/hovercard">bugfix (#22137)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zachliu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zachliu">@zachliu</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/21981" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21981/hovercard">If uploading task logs to S3 fails, retry once (#21981)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/steveyz-astro/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/steveyz-astro">@steveyz-astro</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/22071" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22071/hovercard">Bug-fix GCSToS3Operator (#22071)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rsg17/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rsg17">@rsg17</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/21423" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21423/hovercard">Refactor query status polling logic in EMRContainerHook (#21423)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/victorphoenix3/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/victorphoenix3">@victorphoenix3</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22256" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22256/hovercard">use different logger to avoid duplicate log entry (#22256)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zachliu/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zachliu">@zachliu</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21422" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21422/hovercard">[doc] Improve s3 operator example by adding task upload_keys (#21422)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zhongjiajie/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zhongjiajie">@zhongjiajie</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21988" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21988/hovercard">Rename 'S3' hook name to 'Amazon S3' (#21988)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/treyyi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/treyyi">@treyyi</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22080" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22080/hovercard">Add template fields to DynamoDBToS3Operator (#22080)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/eladkal/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/eladkal">@eladkal</a></li> </ul> <h2 dir="auto">Provider <a href="https://pypi.org/project/apache-airflow-providers-databricks/2.4.0rc1" rel="nofollow">databricks: 2.4.0rc1</a></h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22076" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22076/hovercard">Add new options to DatabricksCopyIntoOperator (#22076)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexott/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexott">@alexott</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/21852" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/21852/hovercard">Databricks hook - retry on HTTP Status 429 as well (#21852)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alexott/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alexott">@alexott</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22221" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22221/hovercard">Skip some tests for Databricks from running on Python 3.10 (#22221)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/potiuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/potiuk">@potiuk</a></li> </ul> <h2 dir="auto">Provider <a href="https://pypi.org/project/apache-airflow-providers-docker/2.5.1rc1" rel="nofollow">docker: 2.5.1rc1</a></h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22145" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22145/hovercard">Avoid trying to kill container when it did not succeed for Docker (#22145)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/potiuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/potiuk">@potiuk</a></li> </ul> <h2 dir="auto">Provider <a href="https://pypi.org/project/apache-airflow-providers-google/6.6.0rc1" rel="nofollow">google: 6.6.0rc1</a></h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22179" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22179/hovercard">Support Uploading Bigger Files to Google Drive (#22179)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ulsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ulsc">@ulsc</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22222" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22222/hovercard">Make <code class="notranslate">chunk_size</code> in <code class="notranslate">GoogleDriveHook</code> standard (#22222)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ulsc/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ulsc">@ulsc</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22062" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22062/hovercard">Add guide for DataprocInstantiateInlineWorkflowTemplateOperator (#22062)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/NiloFreitas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/NiloFreitas">@NiloFreitas</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/apache/airflow/pull/22058" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22058/hovercard">Allow GCS Metadata to be included in GCS Upload (#22058)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/patricker/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/patricker">@patricker</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/20377" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/20377/hovercard">Dataplex operators (#20377)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wojsamjan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wojsamjan">@wojsamjan</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22127" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22127/hovercard">Add support for ARM platform (#22127)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/potiuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/potiuk">@potiuk</a></li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22091" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22091/hovercard">Use yaml safe load (#22091)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/lwyszomi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/lwyszomi">@lwyszomi</a></li> </ul> <h2 dir="auto">Provider <a href="https://pypi.org/project/apache-airflow-providers-snowflake/2.5.2rc1" rel="nofollow">snowflake: 2.5.2rc1</a></h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/apache/airflow/pull/22181" data-hovercard-type="pull_request" data-hovercard-url="/apache/airflow/pull/22181/hovercard">Remove Snowflake limits (#22181)</a>: <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/potiuk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/potiuk">@potiuk</a></li> </ul> <p dir="auto">The guidelines on how to test providers can be found in</p> <p dir="auto"><a href="https://github.com/apache/airflow/blob/main/dev/README_RELEASE_PROVIDER_PACKAGES.md#verify-by-contributors">Verify providers by contributors</a></p> <h3 dir="auto">Committer</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I acknowledge that I am a maintainer/committer of the Apache Airflow project.</li> </ul>
0
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">I realize this would be a whole new feature and not necessarily improvements to the existing toys, but I have long waited for Microsoft to implement the old Mac feature "hot corners" where by simply moving the mouse to any of the 4 corners of the screen would do things like prevent sleep, or launch a screen saver, or any program for that matter. It sounds like a power user function to me, so power toys sounds like a good place for it. In the event of multiple screens, it would still be just 4 corners two on each extreme end of double wide screen or one on each corner of a quadruple double stacked screen. There were some improvements to the Mac version I hoped one day to see on a Microsoft version, but one thing at a time I guess. First, let's see if the feature makes the proverbial "cut".</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">Operating systems such as macOS or some Linux distributions have hot corners option in their functionality. It would be great to have something like that in Windows. Although there are third party applications that provide such functionality (e.g. WinX Corners), they are sometimes limited.</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <p dir="auto">For example, you can set one of the default options:</p> <ul dir="auto"> <li>Opening the task view</li> <li>Opening the start menu</li> <li>Opening of the action centre</li> <li>Opening Cortana (?)</li> <li>Opening the Alt-tab interface</li> <li>Execution of own powershell / cmd command</li> </ul>
1
<h4 dir="auto">Challenge Name</h4> <p dir="auto"><a href="http://codepen.io/Lihkinrian/pen/evOgVr?editors=0010" rel="nofollow">http://codepen.io/Lihkinrian/pen/evOgVr?editors=0010</a></p> <h4 dir="auto">Issue Description</h4> <p dir="auto">When i use <a href="http://codepen.io" rel="nofollow">http://codepen.io</a> i am getting an error "getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See <a href="https://goo.gl/rStTGz" rel="nofollow">https://goo.gl/rStTGz</a> for more details." i am using http for both the request url and request origin url. But when i use https for the request origin url i.e the <a href="https://codepen.io//Lihkinrian/pen/evOgVr?editors=0010" rel="nofollow">https://codepen.io//Lihkinrian/pen/evOgVr?editors=0010</a> and http for the api i get "Mixed Content: The page at '<a href="https://codepen.io/Lihkinrian/pen/evOgVr?editors=0010" rel="nofollow">https://codepen.io/Lihkinrian/pen/evOgVr?editors=0010</a>' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint '<a href="http://api.openweathermap.org/data/2.5/weather?lat=10.0090639&amp;lon=76.3614448&amp;&amp;appid=39809327b8276ac16891fe71210a0291" rel="nofollow">http://api.openweathermap.org/data/2.5/weather?lat=10.0090639&amp;lon=76.3614448&amp;&amp;appid=39809327b8276ac16891fe71210a0291</a>'. This request has been blocked; the content must be served over HTTPS.".</p> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Browser Name, Version: Chrome v56</li> <li>Operating System: windows 10</li> <li>Mobile, Desktop, or Tablet: laptop</li> </ul> <h4 dir="auto">Your Code</h4> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" function getWeatherData() { navigator.geolocation.getCurrentPosition(function(position) { var lat = position.coords.latitude, lon = position.coords.longitude, url = 'http://api.openweathermap.org/data/2.5/weather?lat=' + lat + '&amp;lon=' + lon + '&amp;&amp;appid=39809327b8276ac16891fe71210a0291'; $.getJSON(url, function(data) { console.log(data); }); }); } $(document).ready(function() { getWeatherData(); }); "><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">getWeatherData</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">navigator</span><span class="pl-kos">.</span><span class="pl-c1">geolocation</span><span class="pl-kos">.</span><span class="pl-en">getCurrentPosition</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">position</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">lat</span> <span class="pl-c1">=</span> <span class="pl-s1">position</span><span class="pl-kos">.</span><span class="pl-c1">coords</span><span class="pl-kos">.</span><span class="pl-c1">latitude</span><span class="pl-kos">,</span> <span class="pl-s1">lon</span> <span class="pl-c1">=</span> <span class="pl-s1">position</span><span class="pl-kos">.</span><span class="pl-c1">coords</span><span class="pl-kos">.</span><span class="pl-c1">longitude</span><span class="pl-kos">,</span> <span class="pl-s1">url</span> <span class="pl-c1">=</span> <span class="pl-s">'http://api.openweathermap.org/data/2.5/weather?lat='</span> <span class="pl-c1">+</span> <span class="pl-s1">lat</span> <span class="pl-c1">+</span> <span class="pl-s">'&amp;lon='</span> <span class="pl-c1">+</span> <span class="pl-s1">lon</span> <span class="pl-c1">+</span> <span class="pl-s">'&amp;&amp;appid=39809327b8276ac16891fe71210a0291'</span><span class="pl-kos">;</span> <span class="pl-s1">$</span><span class="pl-kos">.</span><span class="pl-en">getJSON</span><span class="pl-kos">(</span><span class="pl-s1">url</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">data</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-en">$</span><span class="pl-kos">(</span><span class="pl-smi">document</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">ready</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-en">getWeatherData</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </pre></div> <h4 dir="auto">Screenshot</h4>
<h4 dir="auto">Show the Local Weather</h4> <p dir="auto"><a href="https://www.freecodecamp.com/challenges/show-the-local-weather" rel="nofollow">https://www.freecodecamp.com/challenges/show-the-local-weather</a></p> <h4 dir="auto">Weather App Location issue</h4> <p dir="auto">I am currently using Google chrome and I have been trying to figure out why my location could not be found when I copied the exact code from FCC and placed it in Codepen.io. After a week of fighting I asked for help and I learn that I had to use https:// so I can find my location. The second issue is that when I tried to pass this location to the Weather API it would not work, so I asked the community again and I learn that the FCC given locator will not work when we pass the location to the weather API. Could you please add a side note to the other codes as a heads up so that they don't end up beating their computer with a baseball bat?</p> <h4 dir="auto">Browser Information</h4> <ul dir="auto"> <li>Browser Name, Version: Google Chrome Version 51.0.2704.84 m</li> <li>Operating System: Windows 10</li> <li>Mobile, Desktop, or Tablet: Desktop</li> </ul> <h4 dir="auto">Your Code</h4> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// If relevant, paste all of your challenge code in here "><pre class="notranslate"><span class="pl-c">// If relevant, paste all of your challenge code in here</span></pre></div> <h4 dir="auto">Screenshot</h4>
1
<p dir="auto">I have a Paper element containing a grid system (24 columns) that contains a Paper, that contains a typography</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="(schematic) &lt;Paper&gt; &lt;Grid container spacing={24}&gt; &lt;Grid item xs={12} sm={6}&gt; &lt;Paper&gt; &lt;Typography&gt;"><pre class="notranslate"><code class="notranslate">(schematic) &lt;Paper&gt; &lt;Grid container spacing={24}&gt; &lt;Grid item xs={12} sm={6}&gt; &lt;Paper&gt; &lt;Typography&gt; </code></pre></div> <p dir="auto">I would like to change the Typography's font color to white, but it gets overriden by the Typography component. I <strong>can</strong> make it change if use the <code class="notranslate">style</code> attribute or the classes, but I would like to use some "normal" CSS for these kind of things</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/mui-org/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate. (Note: Also search on Google in general)</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto"><strong>expected result:</strong><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16261166/36067606-95c47356-0ec0-11e8-8b52-ff31ffdb1358.png"><img src="https://user-images.githubusercontent.com/16261166/36067606-95c47356-0ec0-11e8-8b52-ff31ffdb1358.png" alt="capture du 2018-02-11 00-13-30" style="max-width: 100%;"></a></p> <h2 dir="auto">Current Behavior</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16261166/36067611-ac2df0b8-0ec0-11e8-9603-037e7c89155e.png"><img src="https://user-images.githubusercontent.com/16261166/36067611-ac2df0b8-0ec0-11e8-9603-037e7c89155e.png" alt="capture du 2018-02-11 00-13-50" style="max-width: 100%;"></a></p> <p dir="auto">This is what I can see from the developer's console:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16261166/36067625-e4b63972-0ec0-11e8-8d52-e21053cf534c.png"><img src="https://user-images.githubusercontent.com/16261166/36067625-e4b63972-0ec0-11e8-8d52-e21053cf534c.png" alt="capture du 2018-02-11 00-16-25" style="max-width: 100%;"></a></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;Paper elevation={4} className=&quot;dashboard-paper&quot;&gt; &lt;Grid container spacing={24}&gt; &lt;Grid item xs={12} sm={6}&gt; &lt;Paper elevation={8} &gt; &lt;Typography // This is the component that causes me some troubles variant=&quot;headline&quot; component=&quot;h3&quot; className=&quot;dashboard-typography&quot; &gt; This is a sheet of paper. &lt;/Typography&gt; &lt;Typography component=&quot;p&quot;&gt; Paper can be used to build surface or other elements for your application. &lt;/Typography&gt; &lt;/Paper&gt; &lt;/Grid&gt; &lt;/Grid&gt; &lt;/Paper"><pre class="notranslate"><code class="notranslate">&lt;Paper elevation={4} className="dashboard-paper"&gt; &lt;Grid container spacing={24}&gt; &lt;Grid item xs={12} sm={6}&gt; &lt;Paper elevation={8} &gt; &lt;Typography // This is the component that causes me some troubles variant="headline" component="h3" className="dashboard-typography" &gt; This is a sheet of paper. &lt;/Typography&gt; &lt;Typography component="p"&gt; Paper can be used to build surface or other elements for your application. &lt;/Typography&gt; &lt;/Paper&gt; &lt;/Grid&gt; &lt;/Grid&gt; &lt;/Paper </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=".dashboard-typography { padding: 2%; background-color: #3f51b5; color: #ffffff; }"><pre class="notranslate"><code class="notranslate">.dashboard-typography { padding: 2%; background-color: #3f51b5; color: #ffffff; } </code></pre></div> <h2 dir="auto">Context</h2> <p dir="auto">Even though I can use css by creating const and putting some css in it, I would like to avoid it because I don't know React and Material UI well enough to "allow me" this. The problem is it seems that I don't have a choice, or maybe I did something wrong</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>Material-UI</td> <td>v1.0.0-beta.33</td> </tr> <tr> <td>React</td> <td>16.0.36</td> </tr> <tr> <td>browser</td> <td>Chrome 64.0</td> </tr> </tbody> </table>
<p dir="auto">I'm having an issue with <code class="notranslate">RaisedButton</code> only when used inside of the <code class="notranslate">Toolbar</code> component. Here is the code in question:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;Toolbar&gt; &lt;ToolbarGroup float='right'&gt; &lt;RaisedButton label='Continue' primary={true} onTouchTap={callNextPage} /&gt; &lt;/ToolbarGroup&gt; &lt;/Toolbar&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-ent">Toolbar</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">ToolbarGroup</span> <span class="pl-c1">float</span><span class="pl-c1">=</span><span class="pl-s">'right'</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">RaisedButton</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">'Continue'</span> <span class="pl-c1">primary</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-c1">true</span><span class="pl-kos">}</span> <span class="pl-c1">onTouchTap</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">callNextPage</span><span class="pl-kos">}</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">ToolbarGroup</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Toolbar</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">The result: as you can see, the button is no longer styled.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4660659/14429970/46396600-0032-11e6-8df6-117b15180c80.png"><img width="281" alt="screen shot 2016-04-11 at 10 09 37 pm" src="https://cloud.githubusercontent.com/assets/4660659/14429970/46396600-0032-11e6-8df6-117b15180c80.png" style="max-width: 100%;"></a></p> <p dir="auto">What does work:</p> <ul dir="auto"> <li>Changing the RaisedButton component to <code class="notranslate">FlatButton</code> works fine.</li> <li>Other RaisedButton components in the app work fine</li> </ul> <p dir="auto">What the isn't the problem:</p> <ul dir="auto"> <li>There is no CSS effecting the particular RaisedButton</li> <li>The path to the component is correct</li> </ul> <h2 dir="auto">Versions</h2> <ul dir="auto"> <li>Material-UI: 0.15.0.alpha-2</li> <li>React: 15.0.1</li> <li>Browser: Chrome 45 (inside of Atom Editor)</li> </ul>
0
<ul dir="auto"> <li>VSCode Version: Version 0.10.10 / <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/vscode/commit/5b5f4db87c10345b9d5c8d0bed745bcad4533135/hovercard" href="https://github.com/microsoft/vscode/commit/5b5f4db87c10345b9d5c8d0bed745bcad4533135"><tt>5b5f4db</tt></a></li> <li>OS Version: Mac OS X Yosemite 10.10.5 / 14F1605</li> </ul> <h2 dir="auto">Steps to Reproduce:</h2> <ol dir="auto"> <li>Save a new file with a <code class="notranslate">.js</code> extension</li> <li>Add some JS code</li> </ol> <h2 dir="auto">Expected</h2> <p dir="auto">I'll see a full range of syntax highlighting</p> <h2 dir="auto">Actual</h2> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/829827/13761678/952a5f68-ea10-11e5-9953-b45ccd5ccbf6.png"><img src="https://cloud.githubusercontent.com/assets/829827/13761678/952a5f68-ea10-11e5-9953-b45ccd5ccbf6.png" alt="highlighting sample" style="max-width: 100%;"></a></p> <p dir="auto">I'm surprised that keywords like <code class="notranslate">var</code>, <code class="notranslate">let</code>, <code class="notranslate">const</code>, and <code class="notranslate">function</code> are not being highlighted.</p> <p dir="auto">I've seen this on other people's machines as well.</p> <p dir="auto">I can't imagine that I'm the first one to notice this. Is this by design? Is there some JS support extension I'm supposed to install?</p> <p dir="auto">Maybe this issue should be going to microsoft/vscode-textmate but I'm not sure.</p> <p dir="auto">Thanks!</p>
<p dir="auto">0.10.10 (Feburary build) has a regression is that the following JavaScript keywords are no longer highlighted in the Dark Visual Studio &amp; Light Visual Studio themes:<br> <code class="notranslate">var</code> <code class="notranslate">let</code> <code class="notranslate">const</code> <code class="notranslate">function</code> <code class="notranslate">get</code> <code class="notranslate">set</code> <code class="notranslate">class</code> <code class="notranslate">interface</code> <code class="notranslate">module</code> <code class="notranslate">namespace</code></p> <p dir="auto">This only affects JavaScript (not TypeScript).<br> The workaround if to switch to the Dark+ Default and Light+ theme.</p> <p dir="auto">Note that there are other colorizing issues open, not caused by this regression: e.g. 'import' and 'from'. See <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="125145725" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript-TmLanguage/issues/37" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript-TmLanguage/issues/37/hovercard" href="https://github.com/microsoft/TypeScript-TmLanguage/issues/37">microsoft/TypeScript-TmLanguage#37</a></p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues?q=is%3Aissue">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">I'm trying to upgrade from Next 4.2.3 to 5.1. I have styletron set up as per the example provided <a href="https://github.com/zeit/next.js/tree/canary/examples/with-styletron">here</a> with a few tweaks to make it work for version 3 of styletron. When using Next 5.1, the server side rendering isn't rendering the styles correctly. Client-side rehydration is still happening. This is causing a flash of unstyled content when loading a page for the first time.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">In the example, the styletron object is loaded in the getInitialProps function of a custom Document. In 4.2.3, this object is there, but for some reason it's undefined/null in 5.1+.</p> <p dir="auto">See here: <a href="https://github.com/zeit/next.js/blob/canary/examples/with-styletron/pages/_document.js#L7">https://github.com/zeit/next.js/blob/canary/examples/with-styletron/pages/_document.js#L7</a></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li><code class="notranslate">yarn create next-app --example with-styletron with-styletron-app</code></li> <li>Remove <code class="notranslate">styletron-client</code> and <code class="notranslate">styletron-server</code> from package.json, add <code class="notranslate">styletron</code> at <code class="notranslate">^3.0.0</code> and update <code class="notranslate">styletron-react</code> to <code class="notranslate">^3.0.0</code></li> <li>Change line 11 in styletron.js to <code class="notranslate">const Styletron = require('styletron-client').default</code>.</li> <li>Run the development server, experience the flash of unstyled content. Also observe that the <code class="notranslate">&lt;style&gt;</code> tag that should be re-hydrated is empty.</li> <li>Try it on 4.2.3. No flash of unstyled content. The rehydrated <code class="notranslate">&lt;style&gt;</code> tag is not empty.</li> </ol> <p dir="auto">In 5.1.0, the <code class="notranslate">styletron</code> object on <a href="https://github.com/zeit/next.js/blob/canary/examples/with-styletron/pages/_document.js#L7">this line</a> is undefined/null when server side rendering happens.</p> <h2 dir="auto">Context</h2> <p dir="auto">Just trying to upgrade to 5+ to take advantage of the improvements! I'd be more than happy to update the styletron example to the latest version of styletron if we can get this working.</p> <h2 dir="auto">Your Environment</h2> <table role="table"> <thead> <tr> <th>Tech</th> <th>Version</th> </tr> </thead> <tbody> <tr> <td>next</td> <td>5.1.0</td> </tr> <tr> <td>node</td> <td>8.1.3</td> </tr> <tr> <td>OS</td> <td>Mac</td> </tr> <tr> <td>browser</td> <td>Chrome</td> </tr> </tbody> </table>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">My app run smoothly.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Throw error</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">I have typescript project, which I cannot use <code class="notranslate">.babelrc</code> to my project. So I decided to make custom babel config via webpack (<code class="notranslate">next.config.js</code>).<br> This is my custom config in my <code class="notranslate">next.config.ts</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="module.exports = { webpack: (config: Webpack.Configuration) =&gt; { (config.module as Webpack.NewModule).rules.push({ test: /\.js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { plugins: [ [require('babel-plugin-module-resolver'), { root: './', alias: { '@': './app' } }] ] } } }) return config } }"><pre lang="tyepscript" class="notranslate"><code class="notranslate">module.exports = { webpack: (config: Webpack.Configuration) =&gt; { (config.module as Webpack.NewModule).rules.push({ test: /\.js$/, exclude: /(node_modules|bower_components)/, use: { loader: 'babel-loader', options: { plugins: [ [require('babel-plugin-module-resolver'), { root: './', alias: { '@': './app' } }] ] } } }) return config } } </code></pre></div> <p dir="auto">That will throw an error</p> <blockquote> <p dir="auto">error in ./dist/pages?entry<br> Module build failed: Error: Plugin 0 specified in "base" provided an invalid property of "defaultExtensions"</p> </blockquote> <p dir="auto">Any solution to write babel config via webpack config without <code class="notranslate">.babelrc</code> file?</p> <h2 dir="auto">Context</h2> <h2 dir="auto">Your Environment</h2> <ul dir="auto"> <li>Next.js version: next</li> <li>Environment name and version (e.g. Chrome 39, Node.js 5.4): node 8</li> <li>Operating System (Linux, maxOS, Windows): macOS</li> </ul>
0
<p dir="auto">I'm working on standing up a 3 node Zookeeper instance, and instead of having separate RCs and Services for each individual pod, I'd like one RC with three instances that keeps all three pods alive. The image is based off the <code class="notranslate">mesoscloud/zookeeper</code> image, just with the quorum enabled.</p> <p dir="auto">zookeeper-rc.json</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;apiVersion&quot;: &quot;v1&quot;, &quot;kind&quot;: &quot;ReplicationController&quot;, &quot;metadata&quot;: { &quot;name&quot;: &quot;zookeeper-test&quot; }, &quot;spec&quot;: { &quot;replicas&quot;: 1, &quot;template&quot;: { &quot;metadata&quot;: { &quot;labels&quot;: { &quot;app&quot;: &quot;zookeeper&quot; } }, &quot;spec&quot;: { &quot;containers&quot;: [ { &quot;env&quot;: [ { &quot;name&quot;: &quot;MYID&quot;, &quot;value&quot;: &quot;3&quot; }, { &quot;name&quot;: &quot;SERVERS&quot;, &quot;value&quot;: &quot;zk1,zk2,zk3&quot; } ], &quot;image&quot;: &quot;custom/zookeeper:latest&quot;, &quot;name&quot;: &quot;zk3&quot;, &quot;ports&quot;: [ { &quot;containerPort&quot;: 2181 }, { &quot;containerPort&quot;: 2888 }, { &quot;containerPort&quot;: 3888 } ] }, { &quot;env&quot;: [ { &quot;name&quot;: &quot;MYID&quot;, &quot;value&quot;: &quot;2&quot; }, { &quot;name&quot;: &quot;SERVERS&quot;, &quot;value&quot;: &quot;zk1,zk2,zk3&quot; } ], &quot;image&quot;: &quot;custom/zookeeper:latest&quot;, &quot;name&quot;: &quot;zk2&quot;, &quot;ports&quot;: [ { &quot;containerPort&quot;: 2181 }, { &quot;containerPort&quot;: 2888 }, { &quot;containerPort&quot;: 3888 } ] }, { &quot;env&quot;: [ { &quot;name&quot;: &quot;MYID&quot;, &quot;value&quot;: &quot;1&quot; }, { &quot;name&quot;: &quot;SERVERS&quot;, &quot;value&quot;: &quot;zk1,zk2,zk3&quot; } ], &quot;image&quot;: &quot;custom/zookeeper:latest&quot;, &quot;name&quot;: &quot;zk1&quot;, &quot;ports&quot;: [ { &quot;containerPort&quot;: 2181 }, { &quot;containerPort&quot;: 2888 }, { &quot;containerPort&quot;: 3888 } ] } ] } } } }"><pre class="notranslate">{ <span class="pl-ent">"apiVersion"</span>: <span class="pl-s"><span class="pl-pds">"</span>v1<span class="pl-pds">"</span></span>, <span class="pl-ent">"kind"</span>: <span class="pl-s"><span class="pl-pds">"</span>ReplicationController<span class="pl-pds">"</span></span>, <span class="pl-ent">"metadata"</span>: { <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>zookeeper-test<span class="pl-pds">"</span></span> }, <span class="pl-ent">"spec"</span>: { <span class="pl-ent">"replicas"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"template"</span>: { <span class="pl-ent">"metadata"</span>: { <span class="pl-ent">"labels"</span>: { <span class="pl-ent">"app"</span>: <span class="pl-s"><span class="pl-pds">"</span>zookeeper<span class="pl-pds">"</span></span> } }, <span class="pl-ent">"spec"</span>: { <span class="pl-ent">"containers"</span>: [ { <span class="pl-ent">"env"</span>: [ { <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>MYID<span class="pl-pds">"</span></span>, <span class="pl-ent">"value"</span>: <span class="pl-s"><span class="pl-pds">"</span>3<span class="pl-pds">"</span></span> }, { <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>SERVERS<span class="pl-pds">"</span></span>, <span class="pl-ent">"value"</span>: <span class="pl-s"><span class="pl-pds">"</span>zk1,zk2,zk3<span class="pl-pds">"</span></span> } ], <span class="pl-ent">"image"</span>: <span class="pl-s"><span class="pl-pds">"</span>custom/zookeeper:latest<span class="pl-pds">"</span></span>, <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>zk3<span class="pl-pds">"</span></span>, <span class="pl-ent">"ports"</span>: [ { <span class="pl-ent">"containerPort"</span>: <span class="pl-c1">2181</span> }, { <span class="pl-ent">"containerPort"</span>: <span class="pl-c1">2888</span> }, { <span class="pl-ent">"containerPort"</span>: <span class="pl-c1">3888</span> } ] }, { <span class="pl-ent">"env"</span>: [ { <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>MYID<span class="pl-pds">"</span></span>, <span class="pl-ent">"value"</span>: <span class="pl-s"><span class="pl-pds">"</span>2<span class="pl-pds">"</span></span> }, { <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>SERVERS<span class="pl-pds">"</span></span>, <span class="pl-ent">"value"</span>: <span class="pl-s"><span class="pl-pds">"</span>zk1,zk2,zk3<span class="pl-pds">"</span></span> } ], <span class="pl-ent">"image"</span>: <span class="pl-s"><span class="pl-pds">"</span>custom/zookeeper:latest<span class="pl-pds">"</span></span>, <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>zk2<span class="pl-pds">"</span></span>, <span class="pl-ent">"ports"</span>: [ { <span class="pl-ent">"containerPort"</span>: <span class="pl-c1">2181</span> }, { <span class="pl-ent">"containerPort"</span>: <span class="pl-c1">2888</span> }, { <span class="pl-ent">"containerPort"</span>: <span class="pl-c1">3888</span> } ] }, { <span class="pl-ent">"env"</span>: [ { <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>MYID<span class="pl-pds">"</span></span>, <span class="pl-ent">"value"</span>: <span class="pl-s"><span class="pl-pds">"</span>1<span class="pl-pds">"</span></span> }, { <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>SERVERS<span class="pl-pds">"</span></span>, <span class="pl-ent">"value"</span>: <span class="pl-s"><span class="pl-pds">"</span>zk1,zk2,zk3<span class="pl-pds">"</span></span> } ], <span class="pl-ent">"image"</span>: <span class="pl-s"><span class="pl-pds">"</span>custom/zookeeper:latest<span class="pl-pds">"</span></span>, <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>zk1<span class="pl-pds">"</span></span>, <span class="pl-ent">"ports"</span>: [ { <span class="pl-ent">"containerPort"</span>: <span class="pl-c1">2181</span> }, { <span class="pl-ent">"containerPort"</span>: <span class="pl-c1">2888</span> }, { <span class="pl-ent">"containerPort"</span>: <span class="pl-c1">3888</span> } ] } ] } } } }</pre></div> <p dir="auto">I have them working with one container per RC, but then I have one RC for each pod. Right now this is just testing, but when I scale out to 7+ nodes, and occassionally 13 nodes, I don't want 13 RCs for one ZK deployment.</p> <p dir="auto">When I try to deploy this:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mynameismevin$ kubectl create -f zookeeper-rc.json --validate The ReplicationController &quot;zookeeper-rc&quot; is invalid: * spec.template.spec.containers[1].name: duplicate value 'server' * spec.template.spec.containers[2].name: duplicate value 'server'"><pre class="notranslate">mynameismevin$ kubectl create -f zookeeper-rc.json --validate The ReplicationController <span class="pl-s"><span class="pl-pds">"</span>zookeeper-rc<span class="pl-pds">"</span></span> is invalid: <span class="pl-k">*</span> spec.template.spec.containers[1].name: duplicate value <span class="pl-s"><span class="pl-pds">'</span>server<span class="pl-pds">'</span></span> <span class="pl-k">*</span> spec.template.spec.containers[2].name: duplicate value <span class="pl-s"><span class="pl-pds">'</span>server<span class="pl-pds">'</span></span></pre></div> <p dir="auto">The EnvVars have to have <code class="notranslate">"name":"server"</code> for each container, so that can be passed to ZK so it knows what servers are in the cluster.</p> <p dir="auto">Is this a limitation of k8s or am I using this incorrectly?</p>
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):<br> No</p> <p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):<br> <code class="notranslate">scheduledjob</code>, <code class="notranslate">cannot determine</code>, <code class="notranslate">too many missed start times</code></p> <hr> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):<br> BUG REPORT</p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0+coreos.0&quot;, GitCommit:&quot;278a1f7034bdba61cba443722647da1a8204a6fc&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T20:48:37Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;} Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.0+coreos.0&quot;, GitCommit:&quot;278a1f7034bdba61cba443722647da1a8204a6fc&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-09-26T20:48:37Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0+coreos.0", GitCommit:"278a1f7034bdba61cba443722647da1a8204a6fc", GitTreeState:"clean", BuildDate:"2016-09-26T20:48:37Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0+coreos.0", GitCommit:"278a1f7034bdba61cba443722647da1a8204a6fc", GitTreeState:"clean", BuildDate:"2016-09-26T20:48:37Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"} </code></pre></div> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>: bare metal</li> <li><strong>OS</strong> (e.g. from /etc/os-release): <code class="notranslate">Debian GNU/Linux 8 (jessie)</code></li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): <code class="notranslate">4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 GNU/Linux</code></li> <li><strong>Install tools</strong>: <code class="notranslate">quay.io/coreos/hyperkube:v1.4.0_coreos.0</code>, deployed with <code class="notranslate">kargo</code></li> <li><strong>Others</strong>:</li> </ul> <p dir="auto"><strong>What happened</strong>:</p> <p dir="auto">I am using a scheduledjob with <strong><code class="notranslate">concurrencyPolicy: Forbid</code></strong>. An instance of my job has taken a long time to finish, thus skipping many start times.</p> <p dir="auto">Ever since, the scheduledjob will not schedule anything new.</p> <p dir="auto">Controller manager log has:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="E1106 13:37:12.457445 1 controller.go:163] Cannot determine if default/my-cron-job needs to be started: Too many missed start times to list"><pre class="notranslate"><code class="notranslate">E1106 13:37:12.457445 1 controller.go:163] Cannot determine if default/my-cron-job needs to be started: Too many missed start times to list </code></pre></div> <p dir="auto"><strong>What you expected to happen</strong>:</p> <p dir="auto">I expect the scheduledjob not to be stuck not scheduling anything anymore. With <code class="notranslate">concurrencyPolicy: Forbid</code>, I expect that it should just re-schedule something as soon as the previously running job has completed.</p> <p dir="auto">The "Too many missed start times to list" safeguard appears to apply mostly to cases where job concurrency is allowed to avoid creating a lot of jobs in case of timestamp issues.<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/kubernetes/kubernetes/blob/56bbfd259a6f45dfbcfb6f3c9f61643a787ed067/pkg/controller/scheduledjob/utils.go#L148">kubernetes/pkg/controller/scheduledjob/utils.go</a> </p> <p class="mb-0 color-fg-muted"> Line 148 in <a data-pjax="true" class="commit-tease-sha" href="/kubernetes/kubernetes/commit/56bbfd259a6f45dfbcfb6f3c9f61643a787ed067">56bbfd2</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L148" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="148"></td> <td id="LC148" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c">// An object might miss several starts. For example, if</span> </td> </tr> </tbody></table> </div> </div> :<p></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" // An object might miss several starts. For example, if // controller gets wedged on friday at 5:01pm when everyone has // gone home, and someone comes in on tuesday AM and discovers // the problem and restarts the controller, then all the hourly // jobs, more than 80 of them for one hourly scheduledJob, should // all start running with no further intervention (if the scheduledJob // allows concurrency and late starts). // // However, if there is a bug somewhere, or incorrect clock // on controller's server or apiservers (for setting creationTimestamp) // then there could be so many missed start times (it could be off // by decades or more), that it would eat up all the CPU and memory // of this controller. In that case, we want to not try to list // all the misseded start times."><pre class="notranslate"><code class="notranslate"> // An object might miss several starts. For example, if // controller gets wedged on friday at 5:01pm when everyone has // gone home, and someone comes in on tuesday AM and discovers // the problem and restarts the controller, then all the hourly // jobs, more than 80 of them for one hourly scheduledJob, should // all start running with no further intervention (if the scheduledJob // allows concurrency and late starts). // // However, if there is a bug somewhere, or incorrect clock // on controller's server or apiservers (for setting creationTimestamp) // then there could be so many missed start times (it could be off // by decades or more), that it would eat up all the CPU and memory // of this controller. In that case, we want to not try to list // all the misseded start times. </code></pre></div> <p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p> <p dir="auto">The issue shows up after about 100 minutes of this running.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apiVersion: batch/v2alpha1 kind: ScheduledJob metadata: name: my-cron-job labels: app: my-cron-job spec: schedule: 0/1 * * * ? concurrencyPolicy: Forbid jobTemplate: spec: template: spec: containers: - name: my-cron-job image: busybox:1.25 command: [&quot;sleep&quot;, &quot;7000&quot;] restartPolicy: Never"><pre class="notranslate"><code class="notranslate">apiVersion: batch/v2alpha1 kind: ScheduledJob metadata: name: my-cron-job labels: app: my-cron-job spec: schedule: 0/1 * * * ? concurrencyPolicy: Forbid jobTemplate: spec: template: spec: containers: - name: my-cron-job image: busybox:1.25 command: ["sleep", "7000"] restartPolicy: Never </code></pre></div> <p dir="auto"><strong>Anything else do we need to know</strong>:</p>
0
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/425" rel="nofollow">http://projects.scipy.org/scipy/ticket/425</a> on 2007-05-25 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cournape/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cournape">@cournape</a>, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cournape/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cournape">@cournape</a>.</em></p> <p dir="auto">It looks like the scipy.stats module needs some updating. First, there are now some duplicate with numpy functionality. Also, the API do not match between numpy and scipy. Eg :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="#!python from numpy.random import randn from scipy.stats import mean a = randn(10, 10) print a.mean() print mean(a)"><pre class="notranslate"><code class="notranslate">#!python from numpy.random import randn from scipy.stats import mean a = randn(10, 10) print a.mean() print mean(a) </code></pre></div> <p dir="auto">What is the feeling of other people on changing the module so that numpy and scipy behaviour match for all moments related function (mean, variance, kurtosis, etc...) ?</p>
<p dir="auto">To avoid duplication of the same question, can you please check out this topic on stackoverflow? <a href="http://bit.ly/TVcbz4" rel="nofollow">http://bit.ly/TVcbz4</a></p>
0
<p dir="auto">Pretty regularly, when I create a file in a project, ctrl-p won't reveal the new file in results unless I drill into Preferences, check, and then uncheck, Exclude VCS Ignored Paths. After that, the new file shows up as expected.</p>
<p dir="auto">I really don't know when this is happening. But it seems that sometimes when I add files with <code class="notranslate">touch file.txt</code> the fuzzy-finder does not list it, and you have to close the window and reopen it to show it (reload window also works). Worth noting is that it appears as it should in the tree-view.</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=jhuxhorn" rel="nofollow">Joern Huxhorn</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-7924?redirect=false" rel="nofollow">SPR-7924</a></strong> and commented</p> <p dir="auto">org.springframework.web.servlet.config.AnnotationDrivenBeanDefinitionParser<br> executes<br> messageConverters.add(createConverterBeanDefinition(MappingJacksonHttpMessageConverter.class, source));<br> at line 187 in spring-webmvc-3.0.5.RELEASE</p> <p dir="auto">There is no way that I'm aware of to configure the created MappingJacksonHttpMessageConverter instance.</p> <p dir="auto">I'd need to set the ObjectMapper of this instance so it's able to use my MixIn configuration (special handling of certain data types defined using serializationConfig.addMixInAnnotations or deserializationConfig.addMixInAnnotations) and other ObjectMapper configuration.</p> <p dir="auto">Otherwise, serializing e.g. a java.awt.Dimension is guaranteed to explode.</p> <p dir="auto">Is there any way to configure it that I'm missing? I searched quite extensive but couldn't find anything so far. Any workaround would be highly appreciated, even a hacky, temporary one...</p> <p dir="auto">This issue may be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398102154" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/11397" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/11397/hovercard" href="https://github.com/spring-projects/spring-framework/issues/11397">#11397</a>.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.5</p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=swisswheel" rel="nofollow">Martin Zeltner</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-1142?redirect=false" rel="nofollow">SPR-1142</a></strong> and commented</p> <p dir="auto">Example:</p> <p dir="auto">file1.xml:<br> &lt;beans&gt;<br> &lt;import resource="classpath:common/common-config.xml"/&gt;<br> ...<br> &lt;/beans&gt;</p> <p dir="auto">file2.xml:<br> &lt;beans&gt;<br> &lt;import resource="classpath:common/common-config.xml"/&gt;<br> ...<br> &lt;/beans&gt;</p> <p dir="auto">If I load now an application context which has "file1.xml" and "file2.xml" as config locations, the file "common-config.xml" will be loaded twice. I suggest to remember the url of already loaded config files.</p> <p dir="auto">Thanks,<br> Martin</p> <hr> <p dir="auto"><strong>Affects:</strong> 1.2.1</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/16066/SPR-1142-xml-application-context-import-once-2010-01-05.patch" rel="nofollow">SPR-1142-xml-application-context-import-once-2010-01-05.patch</a> (<em>17.65 kB</em>)</li> </ul> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398151337" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14160" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14160/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14160">#14160</a> Ignore duplicated import files or property-placeholder files</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398107814" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12263" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12263/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12263">#12263</a> When a bean definition is overridden, detect whether the definition has changed and log accordingly</li> </ul> <p dir="auto">67 votes, 52 watchers</p>
0
<p dir="auto">When try to access labels (<code class="notranslate">.loc</code>) by using a specific list of <code class="notranslate">Timestamp</code> objects or a <code class="notranslate">DatetimeIndex</code> object (See attached csv file), the resulting index is returned in UTC offset but the original timezone is not removed.</p> <p dir="auto">This seems to happen only in very specific cases, when the index passed to <code class="notranslate">.loc</code> contains labels that do not exist in the DataFrame and also contains duplicates.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/yuval-jether/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/yuval-jether">@yuval-jether</a></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd import pytz idx = pd.date_range('2011-01-01', '2017-10-01 00:00:00', freq='h', tz='America/Chicago') s = pd.Series(np.random.rand(len(idx)), index=idx) i = pd.to_datetime(['2017-09-30 06:00:00', '2017-09-30 23:00:00', '2017-09-30 23:00:00', '2017-10-01 00:00:00',]).tz_localize('America/Chicago') s.loc[i] Out[39]: 2017-09-30 06:00:00-05:00 0.380138 2017-09-30 23:00:00-05:00 0.774696 2017-09-30 23:00:00-05:00 0.774696 2017-10-01 00:00:00-05:00 0.728027 dtype: float64 # Added a label that does not exist in the Series import pandas as pd import pytz idx = pd.date_range('2011-01-01', '2017-10-01 00:00:00', freq='h', tz='America/Chicago') s = pd.Series(np.random.rand(len(idx)), index=idx) i = pd.to_datetime(['2017-09-30 06:00:00', '2017-09-30 23:00:00', '2017-09-30 23:00:00', '2017-10-01 00:00:00', '2017-10-01 01:00:00',]).tz_localize('America/Chicago') s.loc[i] Out[40]: 2017-09-30 11:00:00-05:00 0.645350 2017-10-01 04:00:00-05:00 0.099323 2017-10-01 04:00:00-05:00 0.099323 2017-10-01 05:00:00-05:00 0.037136 2017-10-01 06:00:00-05:00 NaN dtype: float64 "><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-k">import</span> <span class="pl-s1">pytz</span> <span class="pl-s1">idx</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2011-01-01'</span>, <span class="pl-s">'2017-10-01 00:00:00'</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'h'</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'America/Chicago'</span>) <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-en">len</span>(<span class="pl-s1">idx</span>)), <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">idx</span>) <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">to_datetime</span>([<span class="pl-s">'2017-09-30 06:00:00'</span>, <span class="pl-s">'2017-09-30 23:00:00'</span>, <span class="pl-s">'2017-09-30 23:00:00'</span>, <span class="pl-s">'2017-10-01 00:00:00'</span>,]).<span class="pl-en">tz_localize</span>(<span class="pl-s">'America/Chicago'</span>) <span class="pl-s1">s</span>.<span class="pl-s1">loc</span>[<span class="pl-s1">i</span>] <span class="pl-v">Out</span>[<span class="pl-c1">39</span>]: <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">30</span> <span class="pl-c1">06</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">05</span>:<span class="pl-c1">00</span> <span class="pl-c1">0.380138</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">30</span> <span class="pl-c1">23</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">05</span>:<span class="pl-c1">00</span> <span class="pl-c1">0.774696</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">30</span> <span class="pl-c1">23</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">05</span>:<span class="pl-c1">00</span> <span class="pl-c1">0.774696</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">00</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">05</span>:<span class="pl-c1">00</span> <span class="pl-c1">0.728027</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span> <span class="pl-c"># Added a label that does not exist in the Series</span> <span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-k">import</span> <span class="pl-s1">pytz</span> <span class="pl-s1">idx</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">date_range</span>(<span class="pl-s">'2011-01-01'</span>, <span class="pl-s">'2017-10-01 00:00:00'</span>, <span class="pl-s1">freq</span><span class="pl-c1">=</span><span class="pl-s">'h'</span>, <span class="pl-s1">tz</span><span class="pl-c1">=</span><span class="pl-s">'America/Chicago'</span>) <span class="pl-s1">s</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Series</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-en">len</span>(<span class="pl-s1">idx</span>)), <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">idx</span>) <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-en">to_datetime</span>([<span class="pl-s">'2017-09-30 06:00:00'</span>, <span class="pl-s">'2017-09-30 23:00:00'</span>, <span class="pl-s">'2017-09-30 23:00:00'</span>, <span class="pl-s">'2017-10-01 00:00:00'</span>, <span class="pl-s">'2017-10-01 01:00:00'</span>,]).<span class="pl-en">tz_localize</span>(<span class="pl-s">'America/Chicago'</span>) <span class="pl-s1">s</span>.<span class="pl-s1">loc</span>[<span class="pl-s1">i</span>] <span class="pl-v">Out</span>[<span class="pl-c1">40</span>]: <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">09</span><span class="pl-c1">-</span><span class="pl-c1">30</span> <span class="pl-c1">11</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">05</span>:<span class="pl-c1">00</span> <span class="pl-c1">0.645350</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">05</span>:<span class="pl-c1">00</span> <span class="pl-c1">0.099323</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">04</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">05</span>:<span class="pl-c1">00</span> <span class="pl-c1">0.099323</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">05</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">05</span>:<span class="pl-c1">00</span> <span class="pl-c1">0.037136</span> <span class="pl-c1">2017</span><span class="pl-c1">-</span><span class="pl-c1">10</span><span class="pl-c1">-</span><span class="pl-c1">01</span> <span class="pl-c1">06</span>:<span class="pl-c1">00</span>:<span class="pl-c1">00</span><span class="pl-c1">-</span><span class="pl-c1">05</span>:<span class="pl-c1">00</span> <span class="pl-v">NaN</span> <span class="pl-s1">dtype</span>: <span class="pl-s1">float64</span></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">pd.show_versions()<br> 2017-10-30 03:15:08 [pip.utils] [DEBUG] lzma module is not available<br> 2017-10-30 03:15:08 [pip.vcs] [DEBUG] Registered VCS backend: git<br> 2017-10-30 03:15:08 [pip.vcs] [DEBUG] Registered VCS backend: hg<br> 2017-10-30 03:15:08 [pip.pep425tags] [DEBUG] Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect<br> 2017-10-30 03:15:08 [pip.pep425tags] [DEBUG] Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect<br> 2017-10-30 03:15:08 [pip.pep425tags] [DEBUG] Config variable 'Py_UNICODE_SIZE' is unset, Python ABI tag may be incorrect<br> 2017-10-30 03:15:08 [pip.pep425tags] [DEBUG] Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect<br> 2017-10-30 03:15:08 [pip.pep425tags] [DEBUG] Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect<br> 2017-10-30 03:15:08 [pip.pep425tags] [DEBUG] Config variable 'Py_UNICODE_SIZE' is unset, Python ABI tag may be incorrect<br> 2017-10-30 03:15:08 [pip.vcs] [DEBUG] Registered VCS backend: svn<br> 2017-10-30 03:15:09 [pip.vcs] [DEBUG] Registered VCS backend: bzr<br> INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 2.7.12.final.0<br> python-bits: 64<br> OS: Windows<br> OS-release: 8.1<br> machine: AMD64<br> processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel<br> byteorder: little<br> LC_ALL: None<br> LANG: None<br> LOCALE: None.None<br> pandas: 0.20.3<br> pytest: 3.0.7<br> pip: 9.0.1<br> setuptools: 36.5.0<br> Cython: None<br> numpy: 1.13.1<br> scipy: 0.18.1<br> xarray: 0.9.6<br> IPython: 5.5.0<br> sphinx: None<br> patsy: 0.4.1<br> dateutil: 2.6.1<br> pytz: 2017.2<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: 2.6.2<br> feather: None<br> matplotlib: 2.0.2<br> openpyxl: 2.4.8<br> xlrd: 1.0.0<br> xlwt: 1.2.0<br> xlsxwriter: None<br> lxml: 3.8.0<br> bs4: 4.5.1<br> html5lib: 0.999999999<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.9.6<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: 0.4.0</p> </details>
<p dir="auto">Perhaps there is some canonical way of doing this that I'm not aware of, but from time to time I find myself wanting to group more than one frame by a key, and apply some function to the result. At the moment, I'm doing this in a somewhat roundabout way:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="results = [] for key, t1 in table1.groupby(level='id'): try: t2 = table2.xs(key, level='id') except KeyError: t2 = None try: t3 = table3.xs(key, level='id') except KeyError: t3 = None # ... etc r = some_func(t1, t2, t3) results.append(r) results = pd.concat(results)"><pre class="notranslate"><code class="notranslate">results = [] for key, t1 in table1.groupby(level='id'): try: t2 = table2.xs(key, level='id') except KeyError: t2 = None try: t3 = table3.xs(key, level='id') except KeyError: t3 = None # ... etc r = some_func(t1, t2, t3) results.append(r) results = pd.concat(results) </code></pre></div> <p dir="auto">I realize that often the easiest thing to do is just to merge the frames, but there are cases where that doesn't really make sense (e.g. non-compatible multiindexes that share one level). I imagine <code class="notranslate">pd.merge(t1, t2, on="id")</code> already does something like this to line up tables - do you guys think there is any value in exposing a standard way of doing this? Perhaps something like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pd.multi_frame_groupby([t1, t2, t3, t4], level='id').apply(some_func)"><pre class="notranslate"><code class="notranslate">pd.multi_frame_groupby([t1, t2, t3, t4], level='id').apply(some_func) </code></pre></div> <p dir="auto">Or, given that the full behaviour of such a groupby object is non trivial, perhaps just a generator for frame tuples?</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="gen = pd.multi_frame_groupby([t1, t2, t3, t4], level='id') pd.concat([some_func(*t) for t in gen])"><pre class="notranslate"><code class="notranslate">gen = pd.multi_frame_groupby([t1, t2, t3, t4], level='id') pd.concat([some_func(*t) for t in gen]) </code></pre></div>
0
<p dir="auto">Please see <a href="https://github.com/microsoft/PowerToys/wiki/Application-Compatibility">https://github.com/microsoft/PowerToys/wiki/Application-Compatibility</a></p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">Option for launcher that lets you choose between showing just file/folder results vs other kinds of results. (similar to how alfredapp works on mac)</p> <p dir="auto">Why? I usually use the launcher because I want a file/folder or an app - I know this before pressing the launcher hotkey. Launcher then shows me both files and apps and I have to visually filter out the one I want.</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <p dir="auto">Press a specific key (e.g. space) as the first character in the launcher input box means, 'only show me files or folders'. If the specific key isn't the first character typed, show non-file/folder results only.</p>
0
<p dir="auto">The module source looks like:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import parseIRI from './iri'; import typeProcessors from './typeProcessors'; import * as qs from './qs'; import { clone, defaults, parseResponseHeaders, createResult, startsWith, callHandlers } from './helpers'; export default Pajax; export * from './iri'; export * from './qs';"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">parseIRI</span> <span class="pl-k">from</span> <span class="pl-s">'./iri'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-s1">typeProcessors</span> <span class="pl-k">from</span> <span class="pl-s">'./typeProcessors'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">qs</span> <span class="pl-k">from</span> <span class="pl-s">'./qs'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">clone</span><span class="pl-kos">,</span> <span class="pl-s1">defaults</span><span class="pl-kos">,</span> <span class="pl-s1">parseResponseHeaders</span><span class="pl-kos">,</span> <span class="pl-s1">createResult</span><span class="pl-kos">,</span> <span class="pl-s1">startsWith</span><span class="pl-kos">,</span> <span class="pl-s1">callHandlers</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./helpers'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-v">Pajax</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./iri'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./qs'</span><span class="pl-kos">;</span></pre></div> <p dir="auto">I'm setting a <code class="notranslate">resolveModuleSource</code> function which is providing a normalized value for all of these dependencies.</p> <p dir="auto">The resulting output looks like:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="System.register('github:n-fuse/[email protected]/pajax', ['npm:[email protected]/helpers/create-class', 'npm:[email protected]/helpers/class-call-check', 'npm:[email protected]/helpers/define-property', 'npm:[email protected]/core-js/promise', 'npm:[email protected]/core-js/object/keys', 'github:n-fuse/[email protected]/iri', 'github:n-fuse/[email protected]/typeProcessors', 'github:n-fuse/[email protected]/qs', 'github:n-fuse/[email protected]/helpers', './iri', './qs'], function (_export) { // ... });"><pre class="notranslate"><span class="pl-v">System</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-s">'github:n-fuse/[email protected]/pajax'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">'npm:[email protected]/helpers/create-class'</span><span class="pl-kos">,</span> <span class="pl-s">'npm:[email protected]/helpers/class-call-check'</span><span class="pl-kos">,</span> <span class="pl-s">'npm:[email protected]/helpers/define-property'</span><span class="pl-kos">,</span> <span class="pl-s">'npm:[email protected]/core-js/promise'</span><span class="pl-kos">,</span> <span class="pl-s">'npm:[email protected]/core-js/object/keys'</span><span class="pl-kos">,</span> <span class="pl-s">'github:n-fuse/[email protected]/iri'</span><span class="pl-kos">,</span> <span class="pl-s">'github:n-fuse/[email protected]/typeProcessors'</span><span class="pl-kos">,</span> <span class="pl-s">'github:n-fuse/[email protected]/qs'</span><span class="pl-kos">,</span> <span class="pl-s">'github:n-fuse/[email protected]/helpers'</span><span class="pl-kos">,</span> <span class="pl-s">'./iri'</span><span class="pl-kos">,</span> <span class="pl-s">'./qs'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_export</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// ...</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">That is, the duplicated names aren't being normalized properly.</p> <p dir="auto">Note it should also be fine to dedupe dependencies at this level, as long as the first use order is maintained.</p>
<h2 dir="auto">Feature Request</h2> <p dir="auto">I have an idea in my head. Not sure if it's already implemented.</p> <p dir="auto">In JavaScript modules, Babel could detect same strings and create one small variable for that.<br> Then It would replace those duplicates with that variable. It could prevent the JS engine from creating strings every single time.</p> <p dir="auto">It might even decrease the file size. Like Google does it with CSS class names.</p> <h3 dir="auto">Example</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Original const doBlah = _ =&gt; { const arr = [ { name: &quot;John&quot;, age: 19 }, { name: &quot;Sophia&quot;, age: 12 }, { name: &quot;Max&quot;, age: 45 } ]; console.log(arr[0][&quot;name&quot;]); console.log(arr[1][&quot;name&quot;]); console.log(arr[2][&quot;name&quot;]); console.log(arr[0][&quot;age&quot;]); console.log(arr[1][&quot;age&quot;]); console.log(arr[2][&quot;age&quot;]); arr.push({ name: &quot;Kate&quot;, age: 23 }); console.log(arr[3][&quot;name&quot;]); console.log(arr[3][&quot;age&quot;]); }; "><pre class="notranslate"><span class="pl-c">// Original</span> <span class="pl-k">const</span> <span class="pl-en">doBlah</span> <span class="pl-c1">=</span> <span class="pl-s1">_</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">arr</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"John"</span><span class="pl-kos">,</span> <span class="pl-c1">age</span>: <span class="pl-c1">19</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"Sophia"</span><span class="pl-kos">,</span> <span class="pl-c1">age</span>: <span class="pl-c1">12</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"Max"</span><span class="pl-kos">,</span> <span class="pl-c1">age</span>: <span class="pl-c1">45</span> <span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s">"name"</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s">"name"</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s">"name"</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s">"age"</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s">"age"</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s">"age"</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"Kate"</span><span class="pl-kos">,</span> <span class="pl-c1">age</span>: <span class="pl-c1">23</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s">"name"</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s">"age"</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// Babel (Without converting back to es5) const doBlah = _ =&gt; { const arr = [ { name: &quot;John&quot;, age: 19 }, { name: &quot;Sophia&quot;, age: 12 }, { name: &quot;Max&quot;, age: 45 } ]; // Extra variables var a = &quot;name&quot;, b = &quot;age&quot;; // Replacing strings with variables console.log(arr[0][a); console.log(arr[1][a]); console.log(arr[2][a]); // Replacing strings with variables console.log(arr[0][b]); console.log(arr[1][b]); console.log(arr[2][b]); arr.push({ name: &quot;Kate&quot;, age: 23 }); // Replacing strings with variables console.log(arr[3][a]); console.log(arr[3][b]); };"><pre class="notranslate"><span class="pl-c">// Babel (Without converting back to es5)</span> <span class="pl-k">const</span> <span class="pl-en">doBlah</span> <span class="pl-c1">=</span> <span class="pl-s1">_</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">arr</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"John"</span><span class="pl-kos">,</span> <span class="pl-c1">age</span>: <span class="pl-c1">19</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"Sophia"</span><span class="pl-kos">,</span> <span class="pl-c1">age</span>: <span class="pl-c1">12</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"Max"</span><span class="pl-kos">,</span> <span class="pl-c1">age</span>: <span class="pl-c1">45</span> <span class="pl-kos">}</span> <span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-c">// Extra variables</span> <span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-s">"name"</span><span class="pl-kos">,</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s">"age"</span><span class="pl-kos">;</span> <span class="pl-c">// Replacing strings with variables</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">a</span><span class="pl-kos"></span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">a</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">a</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Replacing strings with variables </span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">b</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">b</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">b</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">"Kate"</span><span class="pl-kos">,</span> <span class="pl-c1">age</span>: <span class="pl-c1">23</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Replacing strings with variables </span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">a</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">[</span><span class="pl-c1">3</span><span class="pl-kos">]</span><span class="pl-kos">[</span><span class="pl-s1">b</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
0
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">It seems there is an issue with the pip installation of 1.1. After upgrading, I get an error when calling <code class="notranslate">import torch</code>.</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>Install torch==1.1.0 with pip</li> </ol> <p dir="auto">Traceback (most recent call last):<br> File "", line 1, in <br> File "/anaconda3/envs/torch/lib/python3.6/site-packages/torch/<strong>init</strong>.py", line 79, in <br> from torch._C import *<br> ImportError: dlopen(/anaconda3/envs/torch/lib/python3.6/site-packages/torch/_C.cpython-36m-darwin.so, 9): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib<br> Referenced from: /anaconda3/envs/torch/lib/python3.6/site-packages/torch/lib/libshm.dylib<br> Reason: image not found</p> <h2 dir="auto">Expected behavior</h2> <p dir="auto">The torch package should import...</p> <h2 dir="auto">Environment</h2> <p dir="auto">PyTorch version: N/A<br> Is debug build: N/A<br> CUDA used to build PyTorch: N/A</p> <p dir="auto">OS: Mac OSX 10.14.4<br> GCC version: Could not collect<br> CMake version: Could not collect</p> <p dir="auto">Python version: 3.6<br> Is CUDA available: N/A<br> CUDA runtime version: Could not collect<br> GPU models and configuration: Could not collect<br> Nvidia driver version: Could not collect<br> cuDNN version: Could not collect</p> <p dir="auto">Versions of relevant libraries:<br> [pip3] numpy==1.16.3<br> [pip3] torch==1.1.0<br> [conda] blas 1.0 mkl<br> [conda] mkl 2019.3 199<br> [conda] mkl-service 1.1.2 py37hfbe908c_5<br> [conda] mkl_fft 1.0.10 py37h5e564d8_0<br> [conda] mkl_random 1.0.2 py37h27c97d8_0</p>
<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2> <p dir="auto">I tried to install PyTorch, but I can't use it. It can't link dynamic library libomp.dylib</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>pipenv install torch torchvision</li> <li><code class="notranslate">from torch.utils.data import Dataset</code></li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/Users/kaspersapala/Documents/Airly/new-pollution-forecast/Datasets/__init__.py&quot;, line 3, in &lt;module&gt; from torch.utils.data import Dataset File &quot;/Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/__init__.py&quot;, line 79, in &lt;module&gt; from torch._C import * ImportError: dlopen(/Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/_C.cpython-37m-darwin.so, 9): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib Referenced from: /Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/lib/libshm.dylib Reason: image not found"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/Users/kaspersapala/Documents/Airly/new-pollution-forecast/Datasets/__init__.py", line 3, in &lt;module&gt; from torch.utils.data import Dataset File "/Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/__init__.py", line 79, in &lt;module&gt; from torch._C import * ImportError: dlopen(/Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/_C.cpython-37m-darwin.so, 9): Library not loaded: /usr/local/opt/libomp/lib/libomp.dylib Referenced from: /Users/kaspersapala/.local/share/virtualenvs/new-pollution-forecast-BSetKF9E/lib/python3.7/site-packages/torch/lib/libshm.dylib Reason: image not found </code></pre></div> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Being able to use and import PyTorch</p> <h2 dir="auto">Environment</h2> <ul dir="auto"> <li>PyTorch Version (e.g., 1.0): 1.1.0</li> <li>OS (e.g., Linux): Mac OS Mojave</li> <li>How you installed PyTorch (<code class="notranslate">conda</code>, <code class="notranslate">pip</code>, source): pipenv</li> <li>Python version: 3.7.1</li> </ul>
1
<p dir="auto">Always fire first element callback.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" &lt;ul&gt; &lt;li v-repeat=&quot;todos&quot; v-on=&quot;click:callback&quot; &gt; {{content}} : {{done}} &lt;/li&gt; &lt;/ul&gt;"><pre class="notranslate"><code class="notranslate"> &lt;ul&gt; &lt;li v-repeat="todos" v-on="click:callback" &gt; {{content}} : {{done}} &lt;/li&gt; &lt;/ul&gt; </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" var demo = new Vue({ template: demo_template, data: { title: 'todos', todos: [ {callback: function(){console.log(this.$index);}}, {callback: function(){console.log(this.$index);}} ] }"><pre class="notranslate"><code class="notranslate"> var demo = new Vue({ template: demo_template, data: { title: 'todos', todos: [ {callback: function(){console.log(this.$index);}}, {callback: function(){console.log(this.$index);}} ] } </code></pre></div> <p dir="auto">All element retrun 0. My code is wrong?</p>
<h3 dir="auto">Version</h3> <p dir="auto">2.6.10</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://github.com/meditatingdragon/starter-gridsome-vuetify">https://github.com/meditatingdragon/starter-gridsome-vuetify</a></p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Have <code class="notranslate">gridsome</code> as a dependency (or whatever depends on <code class="notranslate">vue-server-renderer</code>) and observe GitHub and Snyk.</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">No vulnerabilities</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">XSS vulnerability caused by an outdated version of <code class="notranslate">serialize-javascript</code> (i.e. older than <code class="notranslate">v2.1.1</code>).</p> <hr> <p dir="auto">I tried highlighting this issue in the discord server but it didn't seem that people cared.<br> <a href="https://npmjs.com/advisories/1426" rel="nofollow">https://npmjs.com/advisories/1426</a></p>
0
<p dir="auto">Applying an invalid style will use property from previous render. This can cause some hard to pin down bugs since you may inadvertently be applying invalid styles but not notice because the style on the previous render was fine. But then rendering later on with the same props/state will cause a different style to be applied, because of what happened on the previous render.</p> <p dir="auto">React version: 17.0.2</p> <h2 dir="auto">Steps To Reproduce</h2> <ol dir="auto"> <li>Apply a valid style property to a component (e.g <code class="notranslate">backgroundColor: red</code>)</li> <li>Apply an invalid style property to a component (for example: <code class="notranslate">backgroundColor: 5</code>)</li> <li>note: Background stays red</li> <li>Change state to apply a valid style (or no style) (e.g <code class="notranslate">backgroundColor: white</code>)</li> <li>note: background is now white</li> <li>Change state to apply an invalid style again</li> <li>Note that the background stays white, even though it has the same props as step 2 when it rendered red</li> </ol> <p dir="auto">Link to code example:</p> <p dir="auto"><a href="https://codesandbox.io/s/frosty-water-hwbj6" rel="nofollow">https://codesandbox.io/s/frosty-water-hwbj6</a><br> Click change then clear then change again to see it in action.</p> <h2 dir="auto">The current behaviour</h2> <ul dir="auto"> <li>When a style object property is invalid, it applies style property from the previous render</li> </ul> <h2 dir="auto">The expected behaviour</h2> <p dir="auto">I think the sensible thing to do would be:</p> <ul dir="auto"> <li>Display a warning in development mode if a property is invalid</li> <li>Remove any the previous style property from the element if the property passed is invalid.</li> </ul> <p dir="auto">However I think as long as it does the same thing regardless of props passed in the previous render it is acceptable.</p>
<p dir="auto">Consider, for example, a relatively generic <code class="notranslate">&lt;Field /&gt;</code> component:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var fieldCounter = 0; var Field = React.createClass({ getInitialState: function() { return { inputId: 'field-' + ++fieldCounter }; }, render: function() { var props = this.props, inputId = this.state.inputId; return ( &lt;div className='field'&gt; &lt;label htmlFor={inputId}&gt;{props.label}&lt;/label&gt; &lt;input type={props.type} id={inputId} name={props.name} value='' /&gt; &lt;/div&gt; ); } });"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">fieldCounter</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-v">Field</span> <span class="pl-c1">=</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createClass</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-en">getInitialState</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-kos">{</span> <span class="pl-c1">inputId</span>: <span class="pl-s">'field-'</span> <span class="pl-c1">+</span> <span class="pl-c1">++</span><span class="pl-s1">fieldCounter</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-en">render</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">props</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">props</span><span class="pl-kos">,</span> <span class="pl-s1">inputId</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">state</span><span class="pl-kos">.</span><span class="pl-c1">inputId</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-s">'field'</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">label</span> <span class="pl-c1">htmlFor</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">inputId</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-s1">props</span><span class="pl-kos">.</span><span class="pl-c1">label</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">label</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">input</span> <span class="pl-c1">type</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">props</span><span class="pl-kos">.</span><span class="pl-c1">type</span><span class="pl-kos">}</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">inputId</span><span class="pl-kos">}</span> <span class="pl-c1">name</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">props</span><span class="pl-kos">.</span><span class="pl-c1">name</span><span class="pl-kos">}</span> <span class="pl-c1">value</span><span class="pl-c1">=</span><span class="pl-s">''</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">In order for the <code class="notranslate">&lt;label /&gt;</code> tag to be semantically related to the <code class="notranslate">&lt;input /&gt;</code> tag, we obviously need to match the <code class="notranslate">for</code> attribute to the <code class="notranslate">&lt;input /&gt;</code> tag's <code class="notranslate">id</code> attribute. Outside of that requirement, however, we have no need of the <code class="notranslate">id</code> attribute, so a solution like the one above is convenient as it handles that all internally, with no need for a consuming component to pass in an actual <code class="notranslate">id</code> value.</p> <p dir="auto">The problem I'm running into, however, is that this causes the <code class="notranslate">id</code> attributes generated client-side to mismatch what was sent down by the server (the client-side <code class="notranslate">fieldCounter</code> restarts at <code class="notranslate">0</code> on every load, whereas the server-side reference obviously just keeps growing).</p> <p dir="auto">This mismatch then results in an error being thrown:</p> <p dir="auto"><code class="notranslate">Invariant Violation: You're trying to render a component to the document using server rendering [...]</code></p> <p dir="auto">So, my question is this: am I overlooking an obvious solution here? I would <em>like</em> for the <code class="notranslate">&lt;Field /&gt;</code> component to be able to simply internalize the <code class="notranslate">id</code> generation as an implementation detail, but I can't seem to come up with a good mechanism for then matching up that id generation client-side.</p> <p dir="auto">Thanks in advance!</p>
0
<p dir="auto">Most of the times, you define your validation rules inside of your Entities.<br> Some Forms require only a subset of data that your Entity contains, forcing you to create FormModels and copying Validator rules from one place to the code.<br> As everybody knows, copying means trouble and duplication, which means that if an update happens only at one location, you have an inconsistency in your code. In this situation, it'll be a missing validation rule.<br> To mitigate this problem, Symfony Validator component should have an ability to "import" validation rules from another location (class/property). Example:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class UserUpdateFormModel { /** * We only allow user name updates. * * @Assert\Import(from=&quot;@ICUserProfileBundle:User&quot;, property=&quot;name&quot;) */ protected $name; }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">UserUpdateFormModel</span> { <span class="pl-c">/**</span> <span class="pl-c"> * We only allow user name updates.</span> <span class="pl-c"> *</span> <span class="pl-c"> * @Assert\Import(from="@ICUserProfileBundle:User", property="name")</span> <span class="pl-c"> */</span> <span class="pl-k">protected</span> <span class="pl-c1"><span class="pl-c1">$</span>name</span>; }</pre></div> <p dir="auto">It seems to be possible already, since ClassMetadata in the validator component already has a mergeConstraints() function. What do you guys think?</p>
<p dir="auto">Hi guys,</p> <p dir="auto">Following my discussion with leonardo I implemented a form to create a new Translation linked to an existing TranslationToken or a new one (with some ajax). For now let's focus on the case where TranslationToken exists in DataBase.</p> <p dir="auto">Here is my relationship inside Translation class :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@ORM\ManyToOne(targetEntity=&quot;ACME\MyFirstBundle\Entity\TranslationToken&quot;) @ORM\JoinColumns({ @ORM\JoinColumn(name=&quot;translation_token_id&quot;, referencedColumnName=&quot;id&quot;, nullable=false) }) private $translationToken;"><pre class="notranslate"><code class="notranslate">@ORM\ManyToOne(targetEntity="ACME\MyFirstBundle\Entity\TranslationToken") @ORM\JoinColumns({ @ORM\JoinColumn(name="translation_token_id", referencedColumnName="id", nullable=false) }) private $translationToken; </code></pre></div> <p dir="auto">Here's how I embed a list of existing TranslationToken in my Translation Form :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -&gt;add('translationToken', 'entity', array( 'label' =&gt; 'translation.translationtoken.label', 'class' =&gt; ACMEMyFirstBundle:TranslationToken', 'property' =&gt; 'name', 'query_builder' =&gt; function(EntityRepository $er) { return $er-&gt;createQueryBuilder('tt') -&gt;orderBy('tt.name', 'ASC'); }, 'required' =&gt; false ))"><pre class="notranslate"><code class="notranslate"> -&gt;add('translationToken', 'entity', array( 'label' =&gt; 'translation.translationtoken.label', 'class' =&gt; ACMEMyFirstBundle:TranslationToken', 'property' =&gt; 'name', 'query_builder' =&gt; function(EntityRepository $er) { return $er-&gt;createQueryBuilder('tt') -&gt;orderBy('tt.name', 'ASC'); }, 'required' =&gt; false )) </code></pre></div> <p dir="auto">So the form works fine, TranslationToken are listed correctly and TranslationToken is well attached to Translation upon $form-&gt;getData() AND after em-&gt;persist($translation) in controller :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$translation ACME\MyFirstBundle\Entity\Translation id integer 16 language string &quot;en&quot; domain string &quot;messages&quot; message string &quot;TEST&quot; translationToken ACME\MyFirstBundle\Entity\TranslationToken id string &quot;1&quot; name string &quot;menu.home&quot; "><pre class="notranslate"><code class="notranslate">$translation ACME\MyFirstBundle\Entity\Translation id integer 16 language string "en" domain string "messages" message string "TEST" translationToken ACME\MyFirstBundle\Entity\TranslationToken id string "1" name string "menu.home" </code></pre></div> <p dir="auto">Although I select an existing TranslationToken I get the following error (maybe because the id is a string, but it's not up to me...)...</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="A new entity was found through the relationship 'ACME\MyFirstBundle\Entity\Translation#translationToken' that was not configured to cascade persist operations for entity: ACME\MyFirstBundle\Entity\TranslationToken@000000005b1c6e850000000070a7ede3. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={&quot;persist&quot;}). If you cannot find out which entity causes the problem implement 'PUC\LibBundle\Entity\TranslationToken#__toString()' to get a clue."><pre class="notranslate"><code class="notranslate">A new entity was found through the relationship 'ACME\MyFirstBundle\Entity\Translation#translationToken' that was not configured to cascade persist operations for entity: ACME\MyFirstBundle\Entity\TranslationToken@000000005b1c6e850000000070a7ede3. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem implement 'PUC\LibBundle\Entity\TranslationToken#__toString()' to get a clue. </code></pre></div> <p dir="auto">But if I persist manually the TranslationToken object or via cascade={"persist"} it would try to INSERT a new TranslationToken in database whereas the idea is to connect the existing one to my Translation record obviously... Something you see as being wrong ? I deeply looked over the web, posted on the mailing list but nothing helped... To me it's not logical.</p> <p dir="auto">BTW : $form-&gt;isValid() gives back an error as well for the joined field without deep details. I don't know why.</p> <p dir="auto">Thanks for your time and consideration.</p>
0
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>Current Behavior</strong><br> let a = {1: 'one', 2: 'two', 3:'three'};<br> const {1:val, ...aWithoutOne} = a;<br> console.log(val); // prints 'one'<br> console.log(aWithoutOne); // Expects {2:'two', 3:'three'} , gets {1: 'one', 2: 'two', 3:'three'};</p> <p dir="auto"><strong>Input Code</strong><br> Run the code above in JSBin against Javascript and ES6/Babel to see the difference.</p> <p dir="auto"><strong>Expected behavior/code</strong><br> A clear and concise description of what you expected to happen (or code).<br> The problem is because ObjectWithoutProperties uses a for(key in obj) loop and compares with the keys sent. Since the key here is a number and for..in returns string, the behavior is incorrect. It is different from a v8 implementation. Making matters worse, <code class="notranslate">val</code> is set correctly, which made it harder to debug.</p> <p dir="auto"><strong>Possible Solution</strong></p> <p dir="auto">Convert the keys to string before passing to ObjectWithoutProperties() function</p> <p dir="auto"><strong>Additional context/Screenshots</strong><br> Try the code in Babel REPL and observe the output difference in Chrome console from both side.</p>
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>Current Behavior</strong></p> <p dir="auto">This was discovered a few days ago. We were using three “newer” JavaScript features:</p> <ul dir="auto"> <li>Object destructuring</li> <li>Rest properties</li> <li>Computed property names</li> </ul> <p dir="auto">The following line (from the block below):</p> <p dir="auto"><code class="notranslate">const { [person.id]: excludedPerson, ...includedPeople } = samePeople;</code></p> <p dir="auto">... will pick off the value and place it in <code class="notranslate">excludedPerson</code>, but fail to exclude that entry in <code class="notranslate">includedPeople</code>. This is only the case if <code class="notranslate">person.id</code> is passed in as a <code class="notranslate">number</code>, but if it is cast to a <code class="notranslate">string</code> then that property is (correctly) omitted in <code class="notranslate">includedPeople</code>.</p> <p dir="auto"><strong>Input Code</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const people = { 21: { id: 21, name: 'Michelle Rodriguez', }, 22: { id: 22, name: 'Heath Ledger', }, 23: { id: 23, name: 'Jack the Ripper', }, }; const id = 21; const person = people[id]; const samePeople = { ...people }; const { [person.id]: excludedPerson, ...includedPeople } = samePeople; console.log(excludedPerson, includedPeople);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">people</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">21</span>: <span class="pl-kos">{</span> <span class="pl-c1">id</span>: <span class="pl-c1">21</span><span class="pl-kos">,</span> <span class="pl-c1">name</span>: <span class="pl-s">'Michelle Rodriguez'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">22</span>: <span class="pl-kos">{</span> <span class="pl-c1">id</span>: <span class="pl-c1">22</span><span class="pl-kos">,</span> <span class="pl-c1">name</span>: <span class="pl-s">'Heath Ledger'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">23</span>: <span class="pl-kos">{</span> <span class="pl-c1">id</span>: <span class="pl-c1">23</span><span class="pl-kos">,</span> <span class="pl-c1">name</span>: <span class="pl-s">'Jack the Ripper'</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-c1">21</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">person</span> <span class="pl-c1">=</span> <span class="pl-s1">people</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">samePeople</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> ...<span class="pl-s1">people</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">person</span><span class="pl-kos">.</span><span class="pl-c1">id</span><span class="pl-kos">]</span>: <span class="pl-s1">excludedPerson</span><span class="pl-kos">,</span> ...<span class="pl-s1">includedPeople</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">samePeople</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">excludedPerson</span><span class="pl-kos">,</span> <span class="pl-s1">includedPeople</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Expected behavior/code</strong></p> <p dir="auto">It would be expected that that the Michelle Rodriguez object would be omitted from <code class="notranslate">includedPeople</code> but it is still included in <code class="notranslate">includedPeople</code>.</p> <p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p> <p dir="auto">This can be replicated here: <a href="https://babeljs.io/repl" rel="nofollow">https://babeljs.io/repl</a></p> <p dir="auto"><strong>Environment</strong></p> <p dir="auto">This can be replicated here: <a href="https://babeljs.io/repl" rel="nofollow">https://babeljs.io/repl</a></p> <p dir="auto"><strong>Possible Solution</strong></p> <p dir="auto">Babel spits out the following code in order to omit properties from the <code class="notranslate">rest</code> object:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) &gt;= 0) continue; // Excludes properties on the prototype chain. if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">_objectWithoutProperties</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">,</span> <span class="pl-s1">keys</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">target</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">i</span> <span class="pl-k">in</span> <span class="pl-s1">obj</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">keys</span><span class="pl-kos">.</span><span class="pl-en">indexOf</span><span class="pl-kos">(</span><span class="pl-s1">i</span><span class="pl-kos">)</span> <span class="pl-c1">&gt;=</span> <span class="pl-c1">0</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span> <span class="pl-c">// Excludes properties on the prototype chain.</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-c1">!</span><span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-c1">hasOwnProperty</span><span class="pl-kos">.</span><span class="pl-en">call</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">,</span> <span class="pl-s1">i</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-k">continue</span><span class="pl-kos">;</span> <span class="pl-s1">target</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">obj</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">return</span> <span class="pl-s1">target</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">If <code class="notranslate">person.id</code> is passed as a number (i.e. just as it is), then the <code class="notranslate">keys.indexOf(i) &gt;= 0</code> check fails, since the <code class="notranslate">for..in</code> loop will return the keys as <code class="notranslate">strings</code>. The <code class="notranslate">keys</code> parameter will be an <code class="notranslate">Array</code> of just one <code class="notranslate">number</code> (as per the above code), e.g. <code class="notranslate">'21'</code> will not be found inside <code class="notranslate">[21]</code>. Therefore the property does not get excluded from <code class="notranslate">target</code> and ends up in the <code class="notranslate">rest</code> object.</p> <p dir="auto">But if I cast to a <code class="notranslate">string</code>, e.g. <code class="notranslate">`${person.id}`</code>, <code class="notranslate">String(person.id)</code>, <code class="notranslate">person.id + ''</code>, <code class="notranslate">Number(person.id).toString()</code>, then the condition goes through.</p> <p dir="auto"><strong>Additional context/Screenshots</strong></p> <p dir="auto">We ended up going with Lodash's <code class="notranslate">omit</code> in order to omit the chosen property, but a fix that worked was simply casting <code class="notranslate">person.id</code> to a <code class="notranslate">string</code>, e.g.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const id = 21; const person = people[id]; const samePeople = { ...people }; const personId = `${person.id}`; const { [personId]: excludedPerson, ...includedPeople } = samePeople;"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-c1">21</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">person</span> <span class="pl-c1">=</span> <span class="pl-s1">people</span><span class="pl-kos">[</span><span class="pl-s1">id</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">samePeople</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> ...<span class="pl-s1">people</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">personId</span> <span class="pl-c1">=</span> <span class="pl-s">`<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">person</span><span class="pl-kos">.</span><span class="pl-c1">id</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">personId</span><span class="pl-kos">]</span>: <span class="pl-s1">excludedPerson</span><span class="pl-kos">,</span> ...<span class="pl-s1">includedPeople</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">samePeople</span><span class="pl-kos">;</span></pre></div> <p dir="auto">At that point the omission works correctly.</p> <p dir="auto">The code seems to work correctly in the Chrome Console and the Node.js REPL, but fails when Babel transpiles it.</p>
1
<p dir="auto">In <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="778252891" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/8990" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/8990/hovercard" href="https://github.com/denoland/deno/pull/8990">#8990</a> we added a WPT runner, and the entire WPT test suite to the repo. We are now able to run web platform tests. Currently only a very limited amount of tests is enabled, and many tests will fail once we enable testing them. We would like to get more coverage for our built in Web APIs. I have listed all of the suites that are potentially relevant for us below.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Compression (once we add <code class="notranslate">CompressionStream</code> and <code class="notranslate">DecompressionStream</code>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Broadcast Channel API (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="878971387" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/10527" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/10527/hovercard" href="https://github.com/denoland/deno/pull/10527">#10527</a>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Console API (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="779638611" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/9013" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/9013/hovercard" href="https://github.com/denoland/deno/pull/9013">#9013</a>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> DOM APIs <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> abort/event.any.js</li> </ul> </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Encoding (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="779266674" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/9004" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/9004/hovercard" href="https://github.com/denoland/deno/pull/9004">#9004</a>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> HR Time <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> monotonic-clock.any.js</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> window-worker-timeOrigin.window.js requires blob URL support for workers</li> </ul> </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> HTML <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> webappapis/atob</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> webappapis/timers</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> webappapis/microtask-queuing</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> various tests from browsers/the-window-object</li> </ul> </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Fetch API (ignore tests related to same site policy, like CORS) <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Requires relative <code class="notranslate">fetch</code> (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="694349131" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/7369" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/7369/hovercard" href="https://github.com/denoland/deno/pull/7369">#7369</a>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Headers (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="859057995" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/10199" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/10199/hovercard" href="https://github.com/denoland/deno/pull/10199">#10199</a>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Request (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="859289842" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/10203" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/10203/hovercard" href="https://github.com/denoland/deno/pull/10203">#10203</a>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Response (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="859289842" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/10203" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/10203/hovercard" href="https://github.com/denoland/deno/pull/10203">#10203</a>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> fetch (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="859289842" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/10203" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/10203/hovercard" href="https://github.com/denoland/deno/pull/10203">#10203</a>)</li> </ul> </li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> File API</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> WHATWG Stream API</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> URL API (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="781598957" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/9046" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/9046/hovercard" href="https://github.com/denoland/deno/pull/9046">#9046</a>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> User Timing (<code class="notranslate">self.perfomance</code>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> WebGPU (once we land it)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> WebSockets</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Workers (not the SharedWorker tests)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> WASM</li> </ul> <p dir="auto">If you would like to enable one of these suites (and fix the resulting issues), please comment on the issue so we don't have multiple people working on the same suites.</p>
<p dir="auto">I'm trying to make a proxy server that analyzes the response body for each request.</p> <p dir="auto">The problem comes when using <code class="notranslate">res.clone()</code> after the request has been proxied, I try to save the body data after the server responds, and then return the response to the client like this</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const body = await res.clone().body.json().catch(console.error) await req.respond(res.clone()).catch(console.error)"><pre class="notranslate"><code class="notranslate">const body = await res.clone().body.json().catch(console.error) await req.respond(res.clone()).catch(console.error) </code></pre></div> <p dir="auto">And the server throws <code class="notranslate">error: Uncaught TypeError: Failed to execute 'clone' on 'Response': Response body is already used</code> because the body stream seems to be the same and it has finished reading.<br> I've tried <code class="notranslate">getReader()</code> too but it's not implemented yet</p> <p dir="auto">Here is a minimum reproducible <a href="https://gist.github.com/sergiga/eea389f13147c6841fe726514d390a16">gist</a></p> <p dir="auto">Meanwhile... is there any workaround of this issue?</p> <p dir="auto">Thanks!</p>
0
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=mschipperheyn" rel="nofollow">marc schipperheyn</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9418?redirect=false" rel="nofollow">SPR-9418</a></strong> and commented</p> <p dir="auto">I have been playing around with RedirectAttributes and although I like the FlashAttribute function, I don't really like the way it has been implemented.<br> For me, FlashAttributes come into play in the GET/POST/Redirect/displayStatus chain. What I don't like is that FlashAttributes aren't a transparent part of the ModelMap but instead separated through RedirectAttributes. I would prefer to say</p> <p dir="auto">model.addFlashAttribute(...) in stead of having the specify RedirectAttributes separately redirectAttributes.addFlashAttribute(...).</p> <p dir="auto">Also, when I add a FlashAttribute to a Model/RedirectAttributes and I don't redirect, I expect the FlashAttribute to be treated as a normal model attribute. and because they are separate, it isn't.</p> <p dir="auto">In the flow of a Controller, whether one redirects often depends on the context. And because RedirectAttributes are separate from ModelAttributes (when they are conceptually the same), I find myself having to duplicate certain actions, which is exactly what I want to avoid.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if(!member.isActive()){ redirectAttributes.addFlashAttribute(&quot;status&quot;,&quot;Denied&quot;,RequestUtils.getLocale(request))); model.addAttribute(&quot;status&quot;,&quot;Denied&quot;,RequestUtils.getLocale(request))); } if(group.isHiddenToNonMembers()){ return &quot;empty&quot;; }else{ return &quot;redirect:&quot; + URLUtils.getGroupUrl(group, request); }"><pre class="notranslate"><code class="notranslate">if(!member.isActive()){ redirectAttributes.addFlashAttribute("status","Denied",RequestUtils.getLocale(request))); model.addAttribute("status","Denied",RequestUtils.getLocale(request))); } if(group.isHiddenToNonMembers()){ return "empty"; }else{ return "redirect:" + URLUtils.getGroupUrl(group, request); } </code></pre></div> <p dir="auto">What I would expect is to have a single action against the ModelMap<br> model.addFlashAttribute(...)<br> if the controller redirects, it is treated as a flash attribute<br> if the controller doesn't redirect, it treated as a model attribute</p> <hr> <p dir="auto">No further details from <a href="https://jira.spring.io/browse/SPR-9418?redirect=false" rel="nofollow">SPR-9418</a></p>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=bravesirrobin" rel="nofollow">Leigh Anderson</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9176?redirect=false" rel="nofollow">SPR-9176</a></strong> and commented</p> <p dir="auto">New entries are added to dependentBeanMap and dependenciesForBean map every time that a new instance of the request-scoped bean is created. This is because the proxy object representing the HttpServletRequest has a bean name like "$Proxy10@XXXXX" where XXXXX changes for each request. These entries are never removed, and eventually fill up the old generation.</p> <p dir="auto">Attached is a web application which demonstrates the issue. Visit "<a href="http://localhost:8080/leak" rel="nofollow">http://localhost:8080/leak</a>" repeatedly and watch the count increase.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.0.5</p> <p dir="auto"><strong>Attachments:</strong></p> <ul dir="auto"> <li><a href="https://jira.spring.io/secure/attachment/19566/dridi-spring-9176-quickfix.patch" rel="nofollow">dridi-spring-9176-quickfix.patch</a> (<em>1.74 kB</em>)</li> <li><a href="https://jira.spring.io/secure/attachment/19459/request-memory-leak.tar.gz" rel="nofollow">request-memory-leak.tar.gz</a> (<em>3.41 kB</em>)</li> </ul> <p dir="auto"><strong>Sub-tasks:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398118859" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14000" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14000/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14000">#14000</a> Backport "Scoped-proxy memory leak w/ <code class="notranslate">@Resource</code> injection"</li> </ul> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398108894" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/12420" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/12420/hovercard" href="https://github.com/spring-projects/spring-framework/issues/12420">#12420</a> memory leak occurs in SpringMVC(DefaultListableBeanFactory.dependentBeanMap, DefaultListableBeanFactory.dependenciesForBeanMap) (<em><strong>"is duplicated by"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398152030" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/14261" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/14261/hovercard" href="https://github.com/spring-projects/spring-framework/issues/14261">#14261</a> Regression: scoped beans being cached too aggressively</li> </ul> <p dir="auto">3 votes, 4 watchers</p>
0
<h3 dir="auto">Feature Request</h3> <p dir="auto">OpenCV already provides its own <strong>IMPORTED</strong> library targets. For example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="opencv_calib3d opencv_core opencv_dnn opencv_features2d opencv_flann opencv_gapi opencv_highgui ..."><pre class="notranslate"><code class="notranslate">opencv_calib3d opencv_core opencv_dnn opencv_features2d opencv_flann opencv_gapi opencv_highgui ... </code></pre></div> <p dir="auto">However, I hope OpenCV can provide this form <code class="notranslate">pkg::comp</code> or <code class="notranslate">pkg::pkg</code> of <strong>IMPORTED</strong> library targets. For example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="opencv::calib3d opencv::core opencv::dnn opencv::features2d opencv::flann opencv::gapi opencv::highgui ..."><pre class="notranslate"><code class="notranslate">opencv::calib3d opencv::core opencv::dnn opencv::features2d opencv::flann opencv::gapi opencv::highgui ... </code></pre></div> <p dir="auto">Because lots of other libraries take it.</p> <h3 dir="auto">Some examples of other libraries</h3> <ul dir="auto"> <li><a href="https://github.com/fmtlib/fmt/blob/8.1.1/CMakeLists.txt#L245"><code class="notranslate">fmt::fmt</code></a></li> <li><a href="https://github.com/CLIUtils/CLI11/blob/v2.2.0/CMakeLists.txt#L156"><code class="notranslate">CLI11::CLI11</code></a></li> <li><a href="https://github.com/libevent/libevent/blob/release-2.1.12-stable/cmake/LibeventConfig.cmake.in#L30"><code class="notranslate">libevent::core</code></a></li> <li><a href="https://github.com/pocoproject/poco/blob/poco-1.11.3-release/Data/CMakeLists.txt#L21"><code class="notranslate">Poco::Data</code></a></li> <li><a href="https://github.com/gabime/spdlog/blob/v1.9.2/CMakeLists.txt#L162"><code class="notranslate">spdlog::spdlog</code></a></li> <li><a href="https://doc.qt.io/qt-6/qtcore-index.html#building-with-cmake" rel="nofollow"><code class="notranslate">Qt6::Core</code></a></li> <li><a href="https://github.com/protocolbuffers/protobuf/blob/v3.21.2/cmake/libprotobuf.cmake#L134"><code class="notranslate">protobuf::libprotobuf</code></a></li> <li><a href="https://github.com/boostorg/regex/blob/boost-1.79.0/CMakeLists.txt#L12"><code class="notranslate">Boost::regex</code></a></li> <li><a href="https://gitlab.com/libeigen/eigen/-/blob/3.4/CMakeLists.txt#L597" rel="nofollow"><code class="notranslate">Eigen3::Eigen</code></a></li> <li>...etc</li> </ul>
<p dir="auto">While the syntax <code class="notranslate">::</code> seems to be more modern and conventional in cmake, it has a obvious benefit.</p> <p dir="auto">The following won't get any error until the linking time with a undefined reference error to <code class="notranslate">cv::imshow</code>.</p> <div class="highlight highlight-source-cmake notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="find_package(OpenCV 3.3 REQUIRED COMPONENTS core) target_link_libraries(myExe opencv_core opencv_highgui)"><pre class="notranslate"><span class="pl-c1">find_package</span>(OpenCV 3.3 <span class="pl-k">REQUIRED</span> <span class="pl-k">COMPONENTS</span> core) <span class="pl-c1">target_link_libraries</span>(myExe opencv_core opencv_highgui)</pre></div> <p dir="auto">But if using <code class="notranslate">opencv::highgui</code>, we get a configuration error from cmake:</p> <div class="highlight highlight-source-cmake notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Target &quot;myExe&quot; links to target &quot;opencv::highgui&quot; but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?"><pre class="notranslate">Target <span class="pl-s">"myExe"</span> links to target <span class="pl-s">"opencv::highgui"</span> but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?</pre></div>
1
<table role="table"> <thead> <tr> <th>Q</th> <th>A</th> </tr> </thead> <tbody> <tr> <td>Bug report?</td> <td>yes</td> </tr> <tr> <td>Feature request?</td> <td>no</td> </tr> <tr> <td>BC Break report?</td> <td>no</td> </tr> <tr> <td>Symfony version</td> <td>3.3</td> </tr> </tbody> </table> <p dir="auto">I was playing with Symfony Flex when I noticed this:</p> <hr> <p dir="auto">Create a project with Symfony Flex:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ composer create-project symfony/skeleton:3.3.x-dev my_project/ $ cd my_project/ $ make serve"><pre class="notranslate">$ composer create-project symfony/skeleton:3.3.x-dev my_project/ $ <span class="pl-c1">cd</span> my_project/ $ make serve</pre></div> <p dir="auto">Browse <a href="http://localhost:8000/" rel="nofollow">http://localhost:8000/</a></p> <p dir="auto"><strong>Problem 1</strong>: I still see the old exception page design ... because TwigBundle is not installed. I'll propose a solution for this in a separate issue.</p> <hr> <p dir="auto">Install TwigBundle:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ composer req twig-bundle"><pre class="notranslate">$ composer req twig-bundle</pre></div> <p dir="auto">Browse <a href="http://localhost:8000/" rel="nofollow">http://localhost:8000/</a></p> <p dir="auto"><strong>Problem 2</strong>: I can see the new design ... but everything is broken because the JavaScript features are not enabled because we link to <code class="notranslate">src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/base_js.html.twig</code> and that file does not exist (because WebProfilerBundle is not installed).</p> <hr> <p dir="auto">Install WebProfilerBundle:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ composer req profiler"><pre class="notranslate">$ composer req profiler</pre></div> <p dir="auto">Browse <a href="http://localhost:8000/" rel="nofollow">http://localhost:8000/</a></p> <p dir="auto"><strong>Now everything works as expected</strong>.</p> <hr> <p dir="auto">TwigBundle is not "a real bundle" because is not standalone. If WebProfilerBundle is not installed too, it doesn't work.</p> <p dir="auto"><strong>Which solution do you propose?</strong> The obvious one would be duplicating the WebProfilerBundle's <code class="notranslate">base_js.html.twig</code> file in TwigBundle too. What do you think?</p>
<table role="table"> <thead> <tr> <th>Q</th> <th>A</th> </tr> </thead> <tbody> <tr> <td>Bug report?</td> <td>no</td> </tr> <tr> <td>Feature request?</td> <td>no</td> </tr> <tr> <td>BC Break report?</td> <td>no</td> </tr> <tr> <td>RFC?</td> <td>no</td> </tr> <tr> <td>Symfony version</td> <td>3.4</td> </tr> </tbody> </table> <p dir="auto">That's because of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="265562501" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/24562" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/24562/hovercard" href="https://github.com/symfony/symfony/issues/24562">#24562</a>, so this is actually a duplicate.</p> <p dir="auto">BUT, we can fix this one now, by not using FQCN ids internally. This has to be done NOW, before the release.<br> WDYT?</p>
0
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p> <p dir="auto">Bug.</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function Foo() { return 'foo'; } function Test() { return &lt;span&gt;&lt;Foo /&gt;bar&lt;/span&gt;; }"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-v">Foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">'foo'</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-v">Test</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-c1">&lt;</span><span class="pl-ent">span</span><span class="pl-c1">&gt;</span><span class="pl-c1">&lt;</span><span class="pl-ent">Foo</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span>bar<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">span</span><span class="pl-c1">&gt;</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Hydration of <code class="notranslate">&lt;Test /&gt;</code> to serverside rendered <code class="notranslate">&lt;Test /&gt;</code> produces following warning:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Warning: Text content did not match. Server: &quot;foobar&quot; Client: &quot;foo&quot;"><pre class="notranslate"><code class="notranslate">Warning: Text content did not match. Server: "foobar" Client: "foo" </code></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">No warning.</p> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong></p> <ul dir="auto"> <li>[email protected]</li> <li>[email protected]</li> </ul>
<p dir="auto">Observed this on [email protected]</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from 'react'; import { renderToString } from 'react-dom/server'; const B = () =&gt; 'b'; console.log(renderToString(&lt;div&gt;{'a'}&lt;B /&gt;{'c'}&lt;/div&gt;));"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">React</span> <span class="pl-k">from</span> <span class="pl-s">'react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">renderToString</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'react-dom/server'</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-v">B</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s">'b'</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-en">renderToString</span><span class="pl-kos">(</span><span class="pl-c1">&lt;</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-s">'a'</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-v">B</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">{</span><span class="pl-s">'c'</span><span class="pl-kos">}</span><span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">div</span><span class="pl-c1">&gt;</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">This renders as <code class="notranslate">&lt;div data-reactroot=""&gt;a&lt;!-- --&gt;bc&lt;/div&gt;</code>. If you try to hydrate this you'll get the error: Text content did not match. Server: "bc" Client: "b".</p>
1
<p dir="auto">Observed using numpy-1.11.2: If I create a masked array</p> <p dir="auto">X = np.ma.array(('a','b','c'), mask=(0,1,0))</p> <p dir="auto">then invoking X.filled() yields:</p> <p dir="auto">array(['a', 'N', 'c'], dtype='|S1')</p> <p dir="auto">Yet the documentation at <a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.ma.default_fill_value.html#numpy.ma.default_fill_value" rel="nofollow">https://docs.scipy.org/doc/numpy/reference/generated/numpy.ma.default_fill_value.html#numpy.ma.default_fill_value</a> suggests that the string filling value should be ‘N/A’. The behaviour is analogous if I create a masked array</p> <p dir="auto">Y = np.ma.array(('aa','bb','cc'), mask=(0,1,0))</p> <p dir="auto">Then invoking Y.filled() yields:</p> <p dir="auto">array(['aa', 'N/', 'cc'], dtype='|S2')</p> <p dir="auto">This behaviour is especially problematic when the non-masked entries in the array already include the respective strings 'N', 'N/'.</p>
<p dir="auto">For string arrays of type <code class="notranslate">S1</code> or <code class="notranslate">S2</code>, the default fill value in Numpy masked arrays (<code class="notranslate">N/A</code>) is not appropriate:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [1]: from numpy import ma In [2]: x = ma.array(['a', 'b', 'c'], dtype='S1', mask=[1,0,0]) In [3]: x.filled() Out[3]: array(['N', 'b', 'c'], dtype='|S1') In [4]: x.get_fill_value() Out[4]: 'N/A'"><pre class="notranslate"><code class="notranslate">In [1]: from numpy import ma In [2]: x = ma.array(['a', 'b', 'c'], dtype='S1', mask=[1,0,0]) In [3]: x.filled() Out[3]: array(['N', 'b', 'c'], dtype='|S1') In [4]: x.get_fill_value() Out[4]: 'N/A' </code></pre></div> <p dir="auto">this causes issues for codes that assume the fill value is present in the filled array and indicated masked values. It's not clear to me what the fill value <em>should</em> be, but I'd just thought I'd raise the question.</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/taldcroft/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/taldcroft">@taldcroft</a></p>
1
<p dir="auto">In pandas/pandas/io/parsers.py line 1000, np.uin8 is referred. It is an inexistent member in numpy. I suppose it's a typo for np.uint8.</p>
<p dir="auto">while using read_fwf I had a bug that had this line from parsers.py</p> <p dir="auto"><a href="https://github.com/pydata/pandas/blob/072e40b0b5beab36c2adda9e0bcbb26755e1928f/pandas/io/parsers.py#L989">https://github.com/pydata/pandas/blob/072e40b0b5beab36c2adda9e0bcbb26755e1928f/pandas/io/parsers.py#L989</a></p> <p dir="auto">in which there is a np.uin8 which I'm pretty sure should be a np.uint8</p> <p dir="auto">apologise if this has already been submitted - I did a search on uin8 and only got the offending line in the code.</p> <p dir="auto">I just fixed on my arch source code to keep working on my problem (I'm an engineer not a software guy!). I will try and find time for a patch and test (I failed on my last one)</p> <p dir="auto">CHeers</p> <p dir="auto">Rick</p>
1
<p dir="auto">Hello, I want to use TorchScript to accelerate my training, but I found my cpu memory is going up and finally blow up, but if I don't use TorchScript, everything is fine. I have no idea if it's a bug, Can you give me some advice?</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/suo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/suo">@suo</a></p>
<p dir="auto">Hello, I want to use TorchScript to accelerate my training, but I found my cpu memory is going up and finally blow up, but if I don't use TorchScript, everything is fine. I have no idea if it's a bug, Can you give me some advice?</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/suo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/suo">@suo</a></p>
1
<p dir="auto">I need to create indexes in relationship to optimize my query. Cypher not support indexes in relationship ?<br> And I cannot create the follow constraint in relationship SHARED_REACTION:<br> CREATE CONSTRAINT ON ()-[sr:SHARED_REACTION]-() ASSERT EXISTS (sr.id)<br> Neo4j returns:<br> "Unable to create CONSTRAINT.."<br> Neo.DatabaseError.Schema.ConstraintCreationFailed</p> <p dir="auto">How can I create this constraint and to use indexes in relationship SHARED_REACTION ?</p>
<p dir="auto"><em>NOTE: This description has been updated, the original description is at the bottom</em></p> <p dir="auto">While Neo4j primitives are <code class="notranslate">read committed</code>, Cypher composes these primitives together in ways that can lead to errors - notably cypher may read an entity that is subsequently deleted, and will then fail to perform some operation on it.</p> <p dir="auto">While this could be construed as a cypher issue, it is really an issue of isolation levels - we need to implement <code class="notranslate">repeatable read</code> isolation in the kernel to allow cypher to expose a single cypher statement as a read committed operation.</p> <h3 dir="auto">If you suspect an isolation issue</h3> <p dir="auto">If you believe you are hitting a problem related to transaction isolation levels, please post a comment on this ticket with:</p> <ul dir="auto"> <li>Any setup required</li> <li>All cypher statements involved</li> <li>What you expected the result to be</li> <li>What the result actually is</li> <li>Your Neo4j version, Java version and operating system</li> </ul> <h2 dir="auto">Workarounds</h2> <h3 dir="auto">Lock the read set</h3> <p dir="auto">Many (but not all) of the cases where this is an issue have a format like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;match some stuff&gt; &lt;perform some mutation&gt;"><pre class="notranslate"><code class="notranslate">&lt;match some stuff&gt; &lt;perform some mutation&gt; </code></pre></div> <p dir="auto">For this category of statements, we suffer the same problem as SQL solves with <code class="notranslate">SELECT ... FOR UPDATE</code>. Cypher does not yet support a construct like that, but it can be emulated using the following pattern:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;match some stuff&gt; &lt;set a property, for instance __lock__&gt; WITH &lt;stuff&gt; &lt;perform some mutation&gt;"><pre class="notranslate"><code class="notranslate">&lt;match some stuff&gt; &lt;set a property, for instance __lock__&gt; WITH &lt;stuff&gt; &lt;perform some mutation&gt; </code></pre></div> <p dir="auto">For example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MATCH (n:Person) SET n.__lock__ = 1 WITH n SET n.description = &quot;Some description&quot;"><pre class="notranslate"><code class="notranslate">MATCH (n:Person) SET n.__lock__ = 1 WITH n SET n.description = "Some description" </code></pre></div> <h3 dir="auto">Retry transaction</h3> <p dir="auto">Particularly for small read operations and small writes, given the transactional nature of Neo4j, you can rollback and retry any transaction where a statement fails due to this issue. A common pattern for this is to model your query as a unit of work that can be retried.</p> <h2 dir="auto">Original message</h2> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/peterneubauer/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/peterneubauer">@peterneubauer</a>: 'See <a href="https://groups.google.com/group/neo4j/browse_thread/thread/9355edd2059d70e2/a51d06c894107327?lnk=gst&amp;q=Concurrent+reading+and+deleting+on+relationships+leads+to+NotFoundException.+How+to+ignore%3F#a51d06c894107327" rel="nofollow">https://groups.google.com/group/neo4j/browse_thread/thread/9355edd2059d70e2/a51d06c894107327?lnk=gst&amp;q=Concurrent+reading+and+deleting+on+relationships+leads+to+NotFoundException.+How+to+ignore%3F#a51d06c894107327</a> for background.</p> <p dir="auto">Example code is at <a href="http://code.google.com/p/graph-query-benchmarks/source/browse/trunk/graph-query-benchmarks/src/test/nz/ac/massey/cs/graphbenchmarks/spikes/neo4j/NeoIssues.java" rel="nofollow">http://code.google.com/p/graph-query-benchmarks/source/browse/trunk/graph-query-benchmarks/src/test/nz/ac/massey/cs/graphbenchmarks/spikes/neo4j/NeoIssues.java</a>'</p>
0
<p dir="auto">Seen with Celery 3.1.20, Django 1.9</p> <p dir="auto">Steps to reproduce:</p> <ul dir="auto"> <li>Set CELERY_RESULT_BACKEND to multiple memcache servers e.g. <code class="notranslate">CELERY_RESULT_BACKEND = 'cache+memcached://127.0.0.1:11211;127.0.0.10:11211/'</code></li> <li>Start a celery worker using ./manage.py celery worker</li> </ul> <p dir="auto">Result is a crash with stacktrace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2016-02-20 14:58:41,566: ERROR/MainProcess] Unrecoverable error: ValueError(&quot;invalid literal for int() with base 10: '11211;127.0.0.10'&quot;,) Traceback (most recent call last): File &quot;/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/celery/worker/__init__.py&quot;, line 206, in start self.blueprint.start(self) File &quot;/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/celery/bootsteps.py&quot;, line 119, in start self.on_start() File &quot;/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/celery/apps/worker.py&quot;, line 170, in on_start string(self.colored.cyan(' \n', self.startup_info())), File &quot;/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/celery/apps/worker.py&quot;, line 232, in startup_info self.app.conf.CELERY_RESULT_BACKEND or 'disabled', File &quot;/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/kombu/utils/url.py&quot;, line 63, in maybe_sanitize_url return sanitize_url(url, mask) File &quot;/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/kombu/utils/url.py&quot;, line 58, in sanitize_url return as_url(*_parse_url(url), sanitize=True, mask=mask) File &quot;/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/kombu/utils/url.py&quot;, line 24, in _parse_url return (scheme, unquote(parts.hostname or '') or None, parts.port, File &quot;/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urlparse.py&quot;, line 113, in port port = int(port, 10) ValueError: invalid literal for int() with base 10: '11211;127.0.0.10'"><pre class="notranslate"><code class="notranslate">[2016-02-20 14:58:41,566: ERROR/MainProcess] Unrecoverable error: ValueError("invalid literal for int() with base 10: '11211;127.0.0.10'",) Traceback (most recent call last): File "/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/celery/worker/__init__.py", line 206, in start self.blueprint.start(self) File "/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/celery/bootsteps.py", line 119, in start self.on_start() File "/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/celery/apps/worker.py", line 170, in on_start string(self.colored.cyan(' \n', self.startup_info())), File "/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/celery/apps/worker.py", line 232, in startup_info self.app.conf.CELERY_RESULT_BACKEND or 'disabled', File "/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/kombu/utils/url.py", line 63, in maybe_sanitize_url return sanitize_url(url, mask) File "/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/kombu/utils/url.py", line 58, in sanitize_url return as_url(*_parse_url(url), sanitize=True, mask=mask) File "/Users/malcolmbox/dev/tellybug/webserver/lib/python2.7/site-packages/kombu/utils/url.py", line 24, in _parse_url return (scheme, unquote(parts.hostname or '') or None, parts.port, File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urlparse.py", line 113, in port port = int(port, 10) ValueError: invalid literal for int() with base 10: '11211;127.0.0.10' </code></pre></div> <p dir="auto">According to the documentation, this is a valid format for CELERY_RESULT_BACKEND, and this was working on previous versions of celery</p> <p dir="auto">This is happening during printing of the startup banner, so completely prevents the worker from starting.</p>
<p dir="auto">This breaks mongo backend, because of <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/33f1dc829223da5499e05e271a6d49edde7ffc68/hovercard" href="https://github.com/celery/celery/commit/33f1dc829223da5499e05e271a6d49edde7ffc68"><tt>33f1dc8</tt></a>. I believe <code class="notranslate">maybe_sanitize_url</code> doesn't play well with replica sets...</p> <p dir="auto">Full backtrace:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ValueError: invalid literal for int() with base 10: '53473,{snip}.mongolab.com' File &quot;celery/worker/__init__.py&quot;, line 206, in start self.blueprint.start(self) File &quot;celery/bootsteps.py&quot;, line 119, in start self.on_start() File &quot;celery/apps/worker.py&quot;, line 170, in on_start string(self.colored.cyan(' \n', self.startup_info())), File &quot;celery/apps/worker.py&quot;, line 232, in startup_info self.app.conf.CELERY_RESULT_BACKEND or 'disabled', File &quot;kombu/utils/url.py&quot;, line 63, in maybe_sanitize_url return sanitize_url(url, mask) File &quot;kombu/utils/url.py&quot;, line 58, in sanitize_url return as_url(*_parse_url(url), sanitize=True, mask=mask) File &quot;kombu/utils/url.py&quot;, line 24, in _parse_url return (scheme, unquote(parts.hostname or '') or None, parts.port, File &quot;python2.7/urlparse.py&quot;, line 113, in port port = int(port, 10)"><pre class="notranslate"><code class="notranslate">ValueError: invalid literal for int() with base 10: '53473,{snip}.mongolab.com' File "celery/worker/__init__.py", line 206, in start self.blueprint.start(self) File "celery/bootsteps.py", line 119, in start self.on_start() File "celery/apps/worker.py", line 170, in on_start string(self.colored.cyan(' \n', self.startup_info())), File "celery/apps/worker.py", line 232, in startup_info self.app.conf.CELERY_RESULT_BACKEND or 'disabled', File "kombu/utils/url.py", line 63, in maybe_sanitize_url return sanitize_url(url, mask) File "kombu/utils/url.py", line 58, in sanitize_url return as_url(*_parse_url(url), sanitize=True, mask=mask) File "kombu/utils/url.py", line 24, in _parse_url return (scheme, unquote(parts.hostname or '') or None, parts.port, File "python2.7/urlparse.py", line 113, in port port = int(port, 10) </code></pre></div>
1
<p dir="auto">On the v2.0.0-0.3.beta1 tag I'm currently getting abnormally large task timings (all appear slightly different but start with <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/ansible/ansible/commit/14472405efedf1a7acfdd681f698ff07a9155b84/hovercard" href="https://github.com/ansible/ansible/commit/14472405efedf1a7acfdd681f698ff07a9155b84"><tt>1447240</tt></a>...):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2015-11-11 11:32:28,585 p=6905 u=vagrant | TASK: Task 1 ------------------------1447240566.82s 2015-11-11 11:32:28,586 p=6905 u=vagrant | TASK: Task 2 ----------------------- 1447240365.34s 2015-11-11 11:32:28,586 p=6905 u=vagrant | TASK: Task 3 ----------------------- 1447240335.68s 2015-11-11 11:32:28,586 p=6905 u=vagrant | TASK: Task 4 ----------------------- 95.47s"><pre class="notranslate"><code class="notranslate">2015-11-11 11:32:28,585 p=6905 u=vagrant | TASK: Task 1 ------------------------1447240566.82s 2015-11-11 11:32:28,586 p=6905 u=vagrant | TASK: Task 2 ----------------------- 1447240365.34s 2015-11-11 11:32:28,586 p=6905 u=vagrant | TASK: Task 3 ----------------------- 1447240335.68s 2015-11-11 11:32:28,586 p=6905 u=vagrant | TASK: Task 4 ----------------------- 95.47s </code></pre></div> <p dir="auto">However some of the tasks do appear to log an accurate time. I'm running in CentOS 6.7. I've been unable to identify a pattern in terms of if it is related to a specific module or action for a given task. It almost appears to be random. Wondering if anyone else has seen this on the Dev branch?</p>
<p dir="auto">Issue Type: Bug Report (2.0 regression)<br> Ansible Version: 2.0.0 (rc1)<br> Ansible Configuration: default<br> Environment: NA<br> Summary: For 1.9 callback plugins, playbook_on_stats was only called once at the end of the playbook run, regardless of number of plays. This made it effectively useful as an "on playbook finish" callback. In 2.0, playbook_on_stats is called at the end of every play, which breaks accumulator-style callbacks.</p> <p dir="auto">Steps To Reproduce:<br> Grab sample callback plugin from <a href="https://gist.github.com/nitzmahone/90a2510226f42c7f6e49">https://gist.github.com/nitzmahone/90a2510226f42c7f6e49</a>, drop into callback_plugins. Run test_play.yml from same gist.</p> <p dir="auto">Expected Results:</p> <p dir="auto">ON STATS! should show up only once at the end of the playbook run (as it does in 1.9).</p> <p dir="auto">Actual Results:</p> <p dir="auto">ON STATS! shows up at the end of each play.</p> <p dir="auto">Filed on behalf of Callfire</p>
1
<h2 dir="auto">Bug Report</h2> <p dir="auto">Why ModeConfiguration not support config 'driverClassName'?<br> When I Use default Mode(it's Standalone and H2 database), and run my applicatin in Tomcat<br> It will throws 'No suitable driver' Exception</p> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">5.3.2</p> <h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3> <p dir="auto">ShardingSphere-JDBC</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">no Exception</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">has a Exception</p> <h3 dir="auto">Reason analyze (If you can)</h3> <p dir="auto">'HikariDataSource' will get driver by 'DriverManager',although DriverManager has 'org.h2.Driver',but it's ClassLoader is 'java.net.URLClassLoader'<br> and current ClassLoader is 'ParallelWebappClassLoader',so it can't get the driver<br> I see the 'JDBCRepositoryPropertyKey' don't has 'driverClassName' key, and JDBCRepository.init() are no settings either.<br> I think this is a BUG.</p> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<h2 dir="auto">Bug Report</h2> <h3 dir="auto">Which version of ShardingSphere did you use?</h3> <p dir="auto">master branch</p> <h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3> <p dir="auto">JDBC</p> <h3 dir="auto">Expected behavior</h3> <p dir="auto">Daily Continuous Integration pass</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto"><a href="https://github.com/apache/shardingsphere/actions/workflows/ci-daily.yml">https://github.com/apache/shardingsphere/actions/workflows/ci-daily.yml</a><br> <a href="https://github.com/apache/shardingsphere/runs/7828266864?check_suite_focus=true">https://github.com/apache/shardingsphere/runs/7828266864?check_suite_focus=true</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[INFO] Finished at: 2022-08-14T18:14:08Z [INFO] ------------------------------------------------------------------------ Error: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.3.0:jar (attach-javadocs) on project shardingsphere-cluster-mode-repository-zookeeper-curator: MavenReportException: Error while generating Javadoc: Unable to execute javadoc command: Error while executing process. Cannot run program &quot;cmd.exe&quot; (in directory &quot;D:\a\shardingsphere\shardingsphere\shardingsphere-mode\shardingsphere-mode-type\shardingsphere-cluster-mode\shardingsphere-cluster-mode-repository\shardingsphere-cluster-mode-repository-provider\shardingsphere-cluster-mode-repository-zookeeper-curator\target\apidocs&quot;): CreateProcess error=267, The directory name is invalid -&gt; [Help 1]"><pre class="notranslate"><code class="notranslate">[INFO] Finished at: 2022-08-14T18:14:08Z [INFO] ------------------------------------------------------------------------ Error: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.3.0:jar (attach-javadocs) on project shardingsphere-cluster-mode-repository-zookeeper-curator: MavenReportException: Error while generating Javadoc: Unable to execute javadoc command: Error while executing process. Cannot run program "cmd.exe" (in directory "D:\a\shardingsphere\shardingsphere\shardingsphere-mode\shardingsphere-mode-type\shardingsphere-cluster-mode\shardingsphere-cluster-mode-repository\shardingsphere-cluster-mode-repository-provider\shardingsphere-cluster-mode-repository-zookeeper-curator\target\apidocs"): CreateProcess error=267, The directory name is invalid -&gt; [Help 1] </code></pre></div> <h3 dir="auto">Reason analyze (If you can)</h3> <p dir="auto"><code class="notranslate">CreateProcess error=267, The directory name is invalid</code>. And there're javadoc passed modules.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[INFO] shardingsphere-cluster-mode-core ................... SUCCESS [ 15.147 s] [INFO] shardingsphere-cluster-mode-repository-provider .... SUCCESS [ 0.181 s] [INFO] shardingsphere-cluster-mode-repository-zookeeper-curator FAILURE [ 7.488 s] [INFO] shardingsphere-data-pipeline-core .................. SKIPPED"><pre class="notranslate"><code class="notranslate">[INFO] shardingsphere-cluster-mode-core ................... SUCCESS [ 15.147 s] [INFO] shardingsphere-cluster-mode-repository-provider .... SUCCESS [ 0.181 s] [INFO] shardingsphere-cluster-mode-repository-zookeeper-curator FAILURE [ 7.488 s] [INFO] shardingsphere-data-pipeline-core .................. SKIPPED </code></pre></div> <p dir="auto">The directory path length is 267, more than 260, maybe it's caused by path length.</p> <h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3> <h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
0
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p> <p dir="auto">because it's not mapped up front @declared_attr isn't evaluated as expected. might need the plugin to run them again.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import (declarative_base, declared_attr, AbstractConcreteBase) engine = create_engine('sqlite://', echo=True) Base = declarative_base() class Something(Base): __tablename__ = u'something' id = Column(Integer, primary_key=True) class AbstractConcreteAbstraction(AbstractConcreteBase, Base): id = Column(Integer, primary_key=True) derpa = Column(Integer) derp = Column(Integer) @declared_attr def something_id(cls): return Column(ForeignKey(Something.id)) @declared_attr def something(cls): return relationship(Something) class ConcreteConcreteAbstraction(AbstractConcreteAbstraction): __tablename__ = u'cca' __mapper_args__ = {'polymorphic_identity': 'ccb', 'concrete': True} Base.metadata.create_all(engine) session = Session(engine) print session.query(ConcreteConcreteAbstraction).filter( ConcreteConcreteAbstraction.something.has(id=1)).all() # workaround needed # AbstractConcreteAbstraction.something = relationship(Something) print session.query(AbstractConcreteAbstraction).filter( AbstractConcreteAbstraction.something.has(id=1)).all()"><pre class="notranslate"><code class="notranslate">from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import (declarative_base, declared_attr, AbstractConcreteBase) engine = create_engine('sqlite://', echo=True) Base = declarative_base() class Something(Base): __tablename__ = u'something' id = Column(Integer, primary_key=True) class AbstractConcreteAbstraction(AbstractConcreteBase, Base): id = Column(Integer, primary_key=True) derpa = Column(Integer) derp = Column(Integer) @declared_attr def something_id(cls): return Column(ForeignKey(Something.id)) @declared_attr def something(cls): return relationship(Something) class ConcreteConcreteAbstraction(AbstractConcreteAbstraction): __tablename__ = u'cca' __mapper_args__ = {'polymorphic_identity': 'ccb', 'concrete': True} Base.metadata.create_all(engine) session = Session(engine) print session.query(ConcreteConcreteAbstraction).filter( ConcreteConcreteAbstraction.something.has(id=1)).all() # workaround needed # AbstractConcreteAbstraction.something = relationship(Something) print session.query(AbstractConcreteAbstraction).filter( AbstractConcreteAbstraction.something.has(id=1)).all() </code></pre></div> <hr> <p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/2670/2670.patch">2670.patch</a></p>
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p> <p dir="auto">poc should allow us to consolidate <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384627265" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/2670" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/2670/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/2670">#2670</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384629557" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/2952" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/2952/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/2952">#2952</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384631430" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/3149" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/3149/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/3149">#3149</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384630495" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/3050" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/3050/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/3050">#3050</a>.</p> <p dir="auto">the new descriptors include the ability to cache the result per class, or to do "cascade", guarantees that the callable fn is called only once per target class, as well as to name attributes that are set up after the mapping is complete, so that relationship and column_property declared_attrs have the whole mapping to work with when they are called. and the whole thing doesn't modify any existing functionality, only adds new things we can take time to stabilize. win win win win.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base, declared_attr, has_inherited_table Base = declarative_base() class VehicleModel(Base): __tablename__ = &quot;vehicle_model&quot; id = Column(Integer, primary_key=True) name = Column(String(20)) class VehicleInfo(object): vehicle_plate_region = Column(String(5)) vehicle_plate = Column(String(20)) @declared_attr.column def vehicle_model_id(cls): return Column(Integer, ForeignKey(&quot;vehicle_model.id&quot;)) @declared_attr.property def vehicle_model(cls): # 1. called after the class is fully mapped # 2. called only once for each class assert cls.__table__ is not None and \ cls.__table__.c.vehicle_model_id.shares_lineage( cls.vehicle_model_id.__clause_element__() ) return relationship(VehicleModel, foreign_keys=[cls.vehicle_model_id]) @declared_attr.column.cascading def id(cls): if has_inherited_table(cls): return Column(Integer, ForeignKey(&quot;vehicle.id&quot;), primary_key=True) else: return Column(Integer, primary_key=True) class Vehicle(VehicleInfo, Base): __tablename__ = 'vehicle' class SubVehicle(Vehicle): __tablename__ = 'subveh' @declared_attr.property def some_other_thing(cls): # called way at the end assert cls.id.__clause_element__().references(Vehicle.__table__.c.id) return column_property(cls.id) configure_mappers() "><pre class="notranslate"><code class="notranslate">from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.ext.declarative import declarative_base, declared_attr, has_inherited_table Base = declarative_base() class VehicleModel(Base): __tablename__ = "vehicle_model" id = Column(Integer, primary_key=True) name = Column(String(20)) class VehicleInfo(object): vehicle_plate_region = Column(String(5)) vehicle_plate = Column(String(20)) @declared_attr.column def vehicle_model_id(cls): return Column(Integer, ForeignKey("vehicle_model.id")) @declared_attr.property def vehicle_model(cls): # 1. called after the class is fully mapped # 2. called only once for each class assert cls.__table__ is not None and \ cls.__table__.c.vehicle_model_id.shares_lineage( cls.vehicle_model_id.__clause_element__() ) return relationship(VehicleModel, foreign_keys=[cls.vehicle_model_id]) @declared_attr.column.cascading def id(cls): if has_inherited_table(cls): return Column(Integer, ForeignKey("vehicle.id"), primary_key=True) else: return Column(Integer, primary_key=True) class Vehicle(VehicleInfo, Base): __tablename__ = 'vehicle' class SubVehicle(Vehicle): __tablename__ = 'subveh' @declared_attr.property def some_other_thing(cls): # called way at the end assert cls.id.__clause_element__().references(Vehicle.__table__.c.id) return column_property(cls.id) configure_mappers() </code></pre></div> <p dir="auto">poc patch, however still needs integration for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384627265" data-permission-text="Title is private" data-url="https://github.com/sqlalchemy/sqlalchemy/issues/2670" data-hovercard-type="issue" data-hovercard-url="/sqlalchemy/sqlalchemy/issues/2670/hovercard" href="https://github.com/sqlalchemy/sqlalchemy/issues/2670">#2670</a>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="diff --git a/lib/sqlalchemy/ext/declarative/api.py b/lib/sqlalchemy/ext/declarative/api.py index daf8bff..251b06f 100644 --- a/lib/sqlalchemy/ext/declarative/api.py +++ b/lib/sqlalchemy/ext/declarative/api.py @@ -13,7 +13,7 @@ from ...orm import synonym as _orm_synonym, mapper,\ interfaces, properties from ...orm.util import polymorphic_union from ...orm.base import _mapper_or_none -from ...util import OrderedDict +from ...util import OrderedDict, classproperty from ... import exc import weakref @@ -164,6 +164,45 @@ class declared_attr(interfaces._MappedAttribute, property): def __get__(desc, self, cls): return desc.fget(cls) + @classproperty + def column(cls): + return _declared_column + + @classproperty + def property(cls): + return _declared_property + + defer_defer_defer = False + + +class _memoized_declared_attr(declared_attr): + def __init__(self, fget, cascading=False): + super(_memoized_declared_attr, self).__init__(fget) + self.reg = weakref.WeakKeyDictionary() + self._cascading = cascading + + def __get__(desc, self, cls): + if desc.defer_defer_defer: + return desc + elif cls in desc.reg: + return desc.reg[cls] + else: + desc.reg[cls] = obj = desc.fget(cls) + return obj + + @classproperty + def cascading(cls): + return lambda decorated: cls(decorated, cascading=True) + + +class _declared_column(_memoized_declared_attr): + pass + + +class _declared_property(_memoized_declared_attr): + defer_defer_defer = True + + def declarative_base(bind=None, metadata=None, mapper=None, cls=object, name='Base', constructor=_declarative_constructor, diff --git a/lib/sqlalchemy/ext/declarative/base.py b/lib/sqlalchemy/ext/declarative/base.py index 94baeeb..cee2263 100644 --- a/lib/sqlalchemy/ext/declarative/base.py +++ b/lib/sqlalchemy/ext/declarative/base.py @@ -33,7 +33,7 @@ def _declared_mapping_info(cls): def _as_declarative(cls, classname, dict_): - from .api import declared_attr + from .api import declared_attr, _memoized_declared_attr # dict_ will be a dictproxy, which we can't write to, and we need to! dict_ = dict(dict_) @@ -132,6 +132,14 @@ def _as_declarative(cls, classname, dict_): &quot;column_property(), relationship(), etc.) must &quot; &quot;be declared as @declared_attr callables &quot; &quot;on declarative mixin classes.&quot;) + elif isinstance(obj, _memoized_declared_attr): # and \ + if obj._cascading: + dict_[name] = ret = obj.__get__(obj, cls) + else: + dict_[name] = ret = getattr(cls, name) + if isinstance(ret, (Column, MapperProperty)) and \ + ret.doc is None: + ret.doc = obj.__doc__ elif isinstance(obj, declarative_props): dict_[name] = ret = \ column_copies[obj] = getattr(cls, name) @@ -148,6 +156,7 @@ def _as_declarative(cls, classname, dict_): clsregistry.add_class(classname, cls) our_stuff = util.OrderedDict() + add_later = util.OrderedDict() for k in list(dict_): @@ -157,7 +166,10 @@ def _as_declarative(cls, classname, dict_): value = dict_[k] if isinstance(value, declarative_props): - value = getattr(cls, k) + if value.defer_defer_defer: + add_later[k] = value + else: + value = getattr(cls, k) elif isinstance(value, QueryableAttribute) and \ value.class_ is not cls and \ @@ -324,7 +336,8 @@ def _as_declarative(cls, classname, dict_): declared_columns, column_copies, our_stuff, - mapper_args_fn) + mapper_args_fn, + add_later) if not defer_map: mt.map() @@ -339,7 +352,8 @@ class _MapperConfig(object): inherits, declared_columns, column_copies, - properties, mapper_args_fn): + properties, mapper_args_fn, + add_later): self.mapper_cls = mapper_cls self.cls = cls self.local_table = table @@ -348,6 +362,7 @@ class _MapperConfig(object): self.mapper_args_fn = mapper_args_fn self.declared_columns = declared_columns self.column_copies = column_copies + self.add_later = add_later def _prepare_mapper_arguments(self): properties = self.properties @@ -410,6 +425,8 @@ class _MapperConfig(object): self.local_table, **mapper_args ) + for k, v in self.add_later.items(): + setattr(self.cls, k, v.fget(self.cls)) class _DeferredMapperConfig(_MapperConfig): diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index f3af46c..ea8c32f 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -1161,8 +1161,10 @@ class Column(SchemaItem, ColumnClause): existing = getattr(self, 'table', None) if existing is not None and existing is not table: raise exc.ArgumentError( - &quot;Column object already assigned to Table '%s'&quot; % - existing.description) + &quot;Column object '%s' already assigned to Table '%s'&quot; % ( + self.key, + existing.description + )) if self.key in table._columns: col = table._columns.get(self.key)"><pre class="notranslate"><code class="notranslate">diff --git a/lib/sqlalchemy/ext/declarative/api.py b/lib/sqlalchemy/ext/declarative/api.py index daf8bff..251b06f 100644 --- a/lib/sqlalchemy/ext/declarative/api.py +++ b/lib/sqlalchemy/ext/declarative/api.py @@ -13,7 +13,7 @@ from ...orm import synonym as _orm_synonym, mapper,\ interfaces, properties from ...orm.util import polymorphic_union from ...orm.base import _mapper_or_none -from ...util import OrderedDict +from ...util import OrderedDict, classproperty from ... import exc import weakref @@ -164,6 +164,45 @@ class declared_attr(interfaces._MappedAttribute, property): def __get__(desc, self, cls): return desc.fget(cls) + @classproperty + def column(cls): + return _declared_column + + @classproperty + def property(cls): + return _declared_property + + defer_defer_defer = False + + +class _memoized_declared_attr(declared_attr): + def __init__(self, fget, cascading=False): + super(_memoized_declared_attr, self).__init__(fget) + self.reg = weakref.WeakKeyDictionary() + self._cascading = cascading + + def __get__(desc, self, cls): + if desc.defer_defer_defer: + return desc + elif cls in desc.reg: + return desc.reg[cls] + else: + desc.reg[cls] = obj = desc.fget(cls) + return obj + + @classproperty + def cascading(cls): + return lambda decorated: cls(decorated, cascading=True) + + +class _declared_column(_memoized_declared_attr): + pass + + +class _declared_property(_memoized_declared_attr): + defer_defer_defer = True + + def declarative_base(bind=None, metadata=None, mapper=None, cls=object, name='Base', constructor=_declarative_constructor, diff --git a/lib/sqlalchemy/ext/declarative/base.py b/lib/sqlalchemy/ext/declarative/base.py index 94baeeb..cee2263 100644 --- a/lib/sqlalchemy/ext/declarative/base.py +++ b/lib/sqlalchemy/ext/declarative/base.py @@ -33,7 +33,7 @@ def _declared_mapping_info(cls): def _as_declarative(cls, classname, dict_): - from .api import declared_attr + from .api import declared_attr, _memoized_declared_attr # dict_ will be a dictproxy, which we can't write to, and we need to! dict_ = dict(dict_) @@ -132,6 +132,14 @@ def _as_declarative(cls, classname, dict_): "column_property(), relationship(), etc.) must " "be declared as @declared_attr callables " "on declarative mixin classes.") + elif isinstance(obj, _memoized_declared_attr): # and \ + if obj._cascading: + dict_[name] = ret = obj.__get__(obj, cls) + else: + dict_[name] = ret = getattr(cls, name) + if isinstance(ret, (Column, MapperProperty)) and \ + ret.doc is None: + ret.doc = obj.__doc__ elif isinstance(obj, declarative_props): dict_[name] = ret = \ column_copies[obj] = getattr(cls, name) @@ -148,6 +156,7 @@ def _as_declarative(cls, classname, dict_): clsregistry.add_class(classname, cls) our_stuff = util.OrderedDict() + add_later = util.OrderedDict() for k in list(dict_): @@ -157,7 +166,10 @@ def _as_declarative(cls, classname, dict_): value = dict_[k] if isinstance(value, declarative_props): - value = getattr(cls, k) + if value.defer_defer_defer: + add_later[k] = value + else: + value = getattr(cls, k) elif isinstance(value, QueryableAttribute) and \ value.class_ is not cls and \ @@ -324,7 +336,8 @@ def _as_declarative(cls, classname, dict_): declared_columns, column_copies, our_stuff, - mapper_args_fn) + mapper_args_fn, + add_later) if not defer_map: mt.map() @@ -339,7 +352,8 @@ class _MapperConfig(object): inherits, declared_columns, column_copies, - properties, mapper_args_fn): + properties, mapper_args_fn, + add_later): self.mapper_cls = mapper_cls self.cls = cls self.local_table = table @@ -348,6 +362,7 @@ class _MapperConfig(object): self.mapper_args_fn = mapper_args_fn self.declared_columns = declared_columns self.column_copies = column_copies + self.add_later = add_later def _prepare_mapper_arguments(self): properties = self.properties @@ -410,6 +425,8 @@ class _MapperConfig(object): self.local_table, **mapper_args ) + for k, v in self.add_later.items(): + setattr(self.cls, k, v.fget(self.cls)) class _DeferredMapperConfig(_MapperConfig): diff --git a/lib/sqlalchemy/sql/schema.py b/lib/sqlalchemy/sql/schema.py index f3af46c..ea8c32f 100644 --- a/lib/sqlalchemy/sql/schema.py +++ b/lib/sqlalchemy/sql/schema.py @@ -1161,8 +1161,10 @@ class Column(SchemaItem, ColumnClause): existing = getattr(self, 'table', None) if existing is not None and existing is not table: raise exc.ArgumentError( - "Column object already assigned to Table '%s'" % - existing.description) + "Column object '%s' already assigned to Table '%s'" % ( + self.key, + existing.description + )) if self.key in table._columns: col = table._columns.get(self.key) </code></pre></div>
1
<p dir="auto">I'm having an issue with webpack where if I stop watching and restart, it will build just fine, but if I edit a file and save it, the incremental build fails with this error:</p> <p dir="auto"><strong>Uncaught TypeError: Cannot read property 'call' of undefined</strong></p> <p dir="auto">Hunting it down there's a module that does not get included in the incremental change build. Best guess is the path followed to re-make the bundle file is not being followed correctly. Upon re-running (stop and start), the missing module is included.</p> <p dir="auto">webpack.config.js (module names changed to protect the innocent):</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var webpack = require(&quot;webpack&quot;), path = require('path') ; module.exports = { entry: { Entry1: &quot;./app/Entry1.js&quot;, Entry2: &quot;./app/Entry2.js&quot;, Entry3: &quot;./app/Entry3.js&quot;, Entry4: &quot;./app/Entry4.js&quot;, Entry5: &quot;./app/Entry5.js&quot;, Entry6: &quot;./app/Entry6.js&quot;, Entry7: &quot;./app/Entry7.js&quot;, Entry8: &quot;./app/Entry8.js&quot;, }, output: { path: path.join(__dirname, &quot;public/js&quot;), filename: &quot;[name].bundle.js&quot;, chunkFilename: &quot;[id].chunk.js&quot; }, module: { loaders: [ {test: /\.js$/, loader: 'jsx-loader'} ] }, plugins: [ new webpack.optimize.CommonsChunkPlugin(&quot;shared.js&quot;) ] };"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">webpack</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"webpack"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-s1">path</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'path'</span><span class="pl-kos">)</span> <span class="pl-kos">;</span> <span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">entry</span>: <span class="pl-kos">{</span> <span class="pl-c1">Entry1</span>: <span class="pl-s">"./app/Entry1.js"</span><span class="pl-kos">,</span> <span class="pl-c1">Entry2</span>: <span class="pl-s">"./app/Entry2.js"</span><span class="pl-kos">,</span> <span class="pl-c1">Entry3</span>: <span class="pl-s">"./app/Entry3.js"</span><span class="pl-kos">,</span> <span class="pl-c1">Entry4</span>: <span class="pl-s">"./app/Entry4.js"</span><span class="pl-kos">,</span> <span class="pl-c1">Entry5</span>: <span class="pl-s">"./app/Entry5.js"</span><span class="pl-kos">,</span> <span class="pl-c1">Entry6</span>: <span class="pl-s">"./app/Entry6.js"</span><span class="pl-kos">,</span> <span class="pl-c1">Entry7</span>: <span class="pl-s">"./app/Entry7.js"</span><span class="pl-kos">,</span> <span class="pl-c1">Entry8</span>: <span class="pl-s">"./app/Entry8.js"</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">output</span>: <span class="pl-kos">{</span> <span class="pl-c1">path</span>: <span class="pl-s1">path</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s1">__dirname</span><span class="pl-kos">,</span> <span class="pl-s">"public/js"</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">filename</span>: <span class="pl-s">"[name].bundle.js"</span><span class="pl-kos">,</span> <span class="pl-c1">chunkFilename</span>: <span class="pl-s">"[id].chunk.js"</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">module</span>: <span class="pl-kos">{</span> <span class="pl-c1">loaders</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span><span class="pl-c1">test</span>: <span class="pl-pds"><span class="pl-c1">/</span><span class="pl-cce">\.</span>js<span class="pl-cce">$</span><span class="pl-c1">/</span></span><span class="pl-kos">,</span> <span class="pl-c1">loader</span>: <span class="pl-s">'jsx-loader'</span><span class="pl-kos">}</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c1">plugins</span>: <span class="pl-kos">[</span> <span class="pl-k">new</span> <span class="pl-s1">webpack</span><span class="pl-kos">.</span><span class="pl-c1">optimize</span><span class="pl-kos">.</span><span class="pl-c1">CommonsChunkPlugin</span><span class="pl-kos">(</span><span class="pl-s">"shared.js"</span><span class="pl-kos">)</span> <span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">I’ve run into a fairly strange, fairly specific problem when running webpack in watch mode on OS X. When using <code class="notranslate">require.context</code> in the presence of a module with a lot of dependencies in <code class="notranslate">node_modules</code> that was symlinked using <code class="notranslate">npm link</code>, webpack seems to open a <em>lot</em> of file descriptors, very quickly leading to a rapid stream of dozens of errors per second coming from OS X’s FSEvents framework:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamRelease(): failed assertion 'streamRef != NULL' 2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamRelease(): failed assertion 'streamRef != NULL' 2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamCreate: _FSEventStreamCreate: ERROR: could not open kqueue 2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamScheduleWithRunLoop(): failed assertion 'streamRef != NULL' 2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamStart(): failed assertion 'streamRef != NULL'"><pre class="notranslate"><code class="notranslate">2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamRelease(): failed assertion 'streamRef != NULL' 2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamRelease(): failed assertion 'streamRef != NULL' 2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamCreate: _FSEventStreamCreate: ERROR: could not open kqueue 2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamScheduleWithRunLoop(): failed assertion 'streamRef != NULL' 2016-04-18 11:21 node[34856] (FSEvents.framework) FSEventStreamStart(): failed assertion 'streamRef != NULL' </code></pre></div> <p dir="auto">This issue is similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="121615819" data-permission-text="Title is private" data-url="https://github.com/webpack/webpack/issues/1743" data-hovercard-type="issue" data-hovercard-url="/webpack/webpack/issues/1743/hovercard" href="https://github.com/webpack/webpack/issues/1743">#1743</a>, but I am not sure that it is actually the same, since that appears to be resolved with a chokidar fix, but I am using the latest version of chokidar and still get the error.</p> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Since this is such a specific problem, I’ve managed to reduce it to a pretty tiny, reproducible example, which you can find at <a href="https://github.com/lexi-lambda/webpack-fsevents-bug">lexi-lambda/webpack-fsevents-bug</a>. Here’s some information about my environment as well:</p> <blockquote> <p dir="auto"><strong>operating system</strong>: OS X 10.11.3<br> <strong>node version</strong>: v5.10.1<br> <strong>npm version</strong>: 3.8.3</p> </blockquote> <p dir="auto">Here’s how to reproduce the issue:</p> <ol dir="auto"> <li>Clone <a href="https://github.com/lexi-lambda/webpack-fsevents-bug">https://github.com/lexi-lambda/webpack-fsevents-bug</a> somewhere.</li> <li>Enter the <code class="notranslate">linking-test</code> directory and run <code class="notranslate">npm install</code>, then <code class="notranslate">npm link</code>.</li> <li>Enter the <code class="notranslate">main</code> directory and run <code class="notranslate">npm install</code>, then <code class="notranslate">npm link linking-test</code>.</li> <li>Run <code class="notranslate">npm run watch</code>.</li> <li>After a few seconds, you should start seeing the FSEvents errors.</li> </ol> <h1 dir="auto">More details</h1> <p dir="auto">The issue seems to specifically be related to how running webpack in watch mode interacts with <code class="notranslate">require.context</code>. If you look in <a href="https://github.com/lexi-lambda/webpack-fsevents-bug/blob/master/main/src/index.js">the single module in the whole project</a>, you’ll see the following two lines:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var context = require.context('..', false, /config\.json$/); console.log(context.keys());"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">context</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">.</span><span class="pl-en">context</span><span class="pl-kos">(</span><span class="pl-s">'..'</span><span class="pl-kos">,</span> <span class="pl-c1">false</span><span class="pl-kos">,</span> <span class="pl-pds"><span class="pl-c1">/</span>config<span class="pl-cce">\.</span>json<span class="pl-cce">$</span><span class="pl-c1">/</span></span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">keys</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">I’ve explicitly passed <code class="notranslate">false</code> to <code class="notranslate">require.context</code>, but for some reason the placement of the linked package in the <code class="notranslate">node_modules</code> subdirectory <em>clearly</em> affects how webpack handles this context. The error does not occur without the custom context.</p> <p dir="auto">I have no idea if this has anything to do with a symlinked module specifically, and it’s certainly not that simple, because it doesn’t happen if the symlinked module does not have very many dependencies. However, with a lot of dependencies, like the ones I’ve included in my sample repo, it consistently fails. It might just be caused by having a lot of files/subdirectories and have nothing to do with the symlinking—I don’t know.</p> <p dir="auto">Either way, this is a pretty hard failure that is consistently reproducible, even on different machines, and I’ve been running into it repeatedly with a particular project I’m working on. Thank you for making webpack, it’s a wonderful tool! And let me know if there’s any more information I can provide to help.</p>
0
<p dir="auto"><strong>Glide Version</strong>:</p> <p dir="auto"><strong>Integration libraries</strong>:</p> <p dir="auto"><strong>Device/Android Version</strong>:</p> <p dir="auto"><strong>Issue details / Repro steps / Use case background</strong>:</p> <p dir="auto"><strong>Glide load line / <code class="notranslate">GlideModule</code> (if any) / list Adapter code (if any)</strong>:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(iv.getContext()) .load(url) .placeholder(R.mipmap.avatar_default) .error(R.mipmap.avatar_default) .diskCacheStrategy(DiskCacheStrategy.NONE) .transform(new GlideCircleTransform(iv.getContext())) .into(iv);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">iv</span>.<span class="pl-en">getContext</span>()) .<span class="pl-en">load</span>(<span class="pl-s1">url</span>) .<span class="pl-en">placeholder</span>(<span class="pl-smi">R</span>.<span class="pl-s1">mipmap</span>.<span class="pl-s1">avatar_default</span>) .<span class="pl-en">error</span>(<span class="pl-smi">R</span>.<span class="pl-s1">mipmap</span>.<span class="pl-s1">avatar_default</span>) .<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">NONE</span>) .<span class="pl-en">transform</span>(<span class="pl-k">new</span> <span class="pl-smi">GlideCircleTransform</span>(<span class="pl-s1">iv</span>.<span class="pl-en">getContext</span>())) .<span class="pl-en">into</span>(<span class="pl-s1">iv</span>);</pre></div> <p dir="auto"><strong>Layout XML</strong>:</p> <div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;FrameLayout xmlns:android=&quot;..."><pre class="notranslate">&lt;<span class="pl-ent">FrameLayout</span> <span class="pl-e">xmlns</span><span class="pl-e">:</span><span class="pl-e">android</span>=<span class="pl-s"><span class="pl-pds">"</span>...</span></pre></div> <p dir="auto"><strong>Stack trace / LogCat</strong>:</p> <div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="paste stack trace and/or log here"><pre class="notranslate"><span class="pl-en">paste</span> <span class="pl-en">stack</span> <span class="pl-en">trace</span> <span class="pl-k">and</span>/<span class="pl-en">or</span> <span class="pl-en">log</span> <span class="pl-en">here</span></pre></div>
<p dir="auto">I get the following error when trying to load an image from assets into ImageView after app was closed and restarted:</p> <blockquote> <p dir="auto">D/skia: --- SkImageDecoder::Factory returned null</p> </blockquote> <p dir="auto">The scenario in which this issue appears:</p> <p dir="auto">Android 5.0.1 (also tried on 5.1.1 - same issue)</p> <ol dir="auto"> <li>Start app</li> <li>Load animated image from assets into ImageView (image is loaded fine)</li> <li>Make sure activity is destroyed</li> <li>Restart activity</li> <li>Try to load same image - get the above-mentioned errors</li> </ol> <p dir="auto">However (!), if I don't load image in step 2, but just close and restart app, and load image in step 5, there is no error - image is loaded fine.</p> <p dir="auto">Here is my code for loading image:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Glide.with(applicationContext) .using(new AssetUriLoader(applicationContext)) .load(Uri.parse(assetPath)) .diskCacheStrategy(DiskCacheStrategy.ALL) .into(imageView);"><pre class="notranslate"><span class="pl-smi">Glide</span>.<span class="pl-en">with</span>(<span class="pl-s1">applicationContext</span>) .<span class="pl-en">using</span>(<span class="pl-k">new</span> <span class="pl-smi">AssetUriLoader</span>(<span class="pl-s1">applicationContext</span>)) .<span class="pl-en">load</span>(<span class="pl-smi">Uri</span>.<span class="pl-en">parse</span>(<span class="pl-s1">assetPath</span>)) .<span class="pl-en">diskCacheStrategy</span>(<span class="pl-smi">DiskCacheStrategy</span>.<span class="pl-c1">ALL</span>) .<span class="pl-en">into</span>(<span class="pl-s1">imageView</span>);</pre></div> <p dir="auto">The AssetUriLoader is a custom loader suggested by vpratfr in the following ticket:</p> <p dir="auto"><a href="https://github.com/bumptech/glide/issues/155" data-hovercard-type="issue" data-hovercard-url="/bumptech/glide/issues/155/hovercard">Loading images from assets</a></p> <p dir="auto">The ImageView is created programmatically:</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(mImageViewWidth, mImageViewHeight); ImageView imageView = new ImageView(getActivity()); params.leftMargin = 100; params.topMargin = 100; rl.addView(imageView, params);"><pre class="notranslate"><span class="pl-smi">RelativeLayout</span>.<span class="pl-smi">LayoutParams</span> <span class="pl-s1">params</span> = <span class="pl-k">new</span> <span class="pl-smi">RelativeLayout</span>.<span class="pl-smi">LayoutParams</span>(<span class="pl-s1">mImageViewWidth</span>, <span class="pl-s1">mImageViewHeight</span>); <span class="pl-smi">ImageView</span> <span class="pl-s1">imageView</span> = <span class="pl-k">new</span> <span class="pl-smi">ImageView</span>(<span class="pl-en">getActivity</span>()); <span class="pl-s1">params</span>.<span class="pl-s1">leftMargin</span> = <span class="pl-c1">100</span>; <span class="pl-s1">params</span>.<span class="pl-s1">topMargin</span> = <span class="pl-c1">100</span>; <span class="pl-s1">rl</span>.<span class="pl-en">addView</span>(<span class="pl-s1">imageView</span>, <span class="pl-s1">params</span>);</pre></div> <p dir="auto">If someone had this error after app is restarted, and found a solution, help would be greatly appreciated.</p>
0
<p dir="auto">The "vertical-align: middle" style property makes the a FlatButton label un-centered</p> <ul dir="auto"> <li>[x ] I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">Based on the material design guidelines the label text of a button is meant to be in the center<br> <a href="https://material.io/guidelines/components/buttons.html#buttons-style" rel="nofollow">https://material.io/guidelines/components/buttons.html#buttons-style</a></p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">The first screenshot is a default FlatButton on the material-ui website ,<br> the distance under the label is smaller than the distance above<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5372332/30790052-e6b59330-a1ec-11e7-80e6-5958775b1c5e.png"><img src="https://user-images.githubusercontent.com/5372332/30790052-e6b59330-a1ec-11e7-80e6-5958775b1c5e.png" alt="screenshot 58" style="max-width: 100%;"></a></p> <p dir="auto">this is same element with "vertical-align: middle" turned off, now centered<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5372332/30790061-f25b496e-a1ec-11e7-909b-b5351b94be46.png"><img src="https://user-images.githubusercontent.com/5372332/30790061-f25b496e-a1ec-11e7-909b-b5351b94be46.png" alt="screenshot 59" style="max-width: 100%;"></a></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>Head to <a href="http://www.material-ui.com/#/components/flat-button" rel="nofollow">http://www.material-ui.com/#/components/flat-button</a></li> <li>inspect one of the buttons' labels in your browser</li> <li>disable "vertical-align: center"</li> </ol> <h2 dir="auto">Context</h2> <p dir="auto">Adding a border to a FlatButton made it easy to notice the label wasn't centered<br> It also affected the CircularLoading element</p> <h2 dir="auto">Your Environment</h2> <p dir="auto">Any using material-ui, including the current website (viewed 25th September 2017)</p>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/callemall/material-ui/issues">issues</a> of this repository and believe that this is not a duplicate.</li> </ul> <p dir="auto">I'd like to use the <code class="notranslate">TablePagination</code> component without a page size selector. Moreover, it would great if I can use a property like <code class="notranslate">showPageSizeSelector</code> or something like this to manage page size selector visibility. I've checked this <a href="https://material-ui-1dab0.firebaseapp.com/api/table-pagination/" rel="nofollow">article</a> but have not found such a functionality described.</p>
0
<p dir="auto">Not sure why the random state changed for non random operation like tf.constant</p> <p dir="auto"><code class="notranslate">pip freeze|grep "python\|tensorflow"</code><br> python-dateutil==2.7.2<br> tensorflow==1.5.0<br> tensorflow-tensorboard==1.5.1</p> <p dir="auto">cat test.py</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import tensorflow as tf print(tf.__version__) seed = 0 def test1(): graph = tf.Graph() with graph.as_default(): tf.set_random_seed(seed) aaa = tf.random_uniform([1]) sess = tf.Session(graph = graph) print(sess.run(aaa)) print(sess.run(aaa)) def test2(): graph = tf.Graph() with graph.as_default(): tf.set_random_seed(seed) bbb = tf.constant([1,2]) aaa = tf.random_uniform([1]) sess = tf.Session(graph = graph) print(sess.run(aaa)) print(sess.run(aaa)) if __name__ == &quot;__main__&quot;: test1() test1() test2()"><pre class="notranslate"><code class="notranslate">import tensorflow as tf print(tf.__version__) seed = 0 def test1(): graph = tf.Graph() with graph.as_default(): tf.set_random_seed(seed) aaa = tf.random_uniform([1]) sess = tf.Session(graph = graph) print(sess.run(aaa)) print(sess.run(aaa)) def test2(): graph = tf.Graph() with graph.as_default(): tf.set_random_seed(seed) bbb = tf.constant([1,2]) aaa = tf.random_uniform([1]) sess = tf.Session(graph = graph) print(sess.run(aaa)) print(sess.run(aaa)) if __name__ == "__main__": test1() test1() test2() </code></pre></div> <p dir="auto">python test.py<br> /home/tom/pyenv/anti/local/lib/python2.7/site-packages/h5py/<strong>init</strong>.py:36: FutureWarning: Conversion of the second argument of issubdtype from <code class="notranslate">float</code> to <code class="notranslate">np.floating</code> is deprecated. In future, it will be treated as <code class="notranslate">np.float64 == np.dtype(float).type</code>.<br> from ._conv import register_converters as _register_converters<br> 1.5.0<br> 2018-06-14 16:06:47.429664: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA<br> [0.3206401]<br> [0.012326]<br> [0.3206401]<br> [0.012326]<br> [0.2773143]<br> [0.92967796]</p>
<h3 dir="auto">Environment info</h3> <p dir="auto">Operating System:<br> Windows 10, 64 bit</p> <p dir="auto">Installed version of CUDA and cuDNN:<br> CUDA 8.0<br> cuDNN 5.1</p> <p dir="auto">Intalled TF by the following:<br> pip3 install --upgrade tensorflow-gpu</p> <h3 dir="auto">If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import tensorflow as tf from tensorflow.contrib import rnn seq_max_len = 6 num_hidden = 5 sample_size = 4 #print(seq_len_arr) x = tf.placeholder(tf.float32, [None, seq_max_len, sample_size], name='x') seq_len = tf.placeholder(tf.int32, [None]) lstm_cell = rnn.LSTMBlockCell(num_hidden) lstmLayers = rnn.MultiRNNCell([lstm_cell]*1) outputs, states = tf.nn.dynamic_rnn(lstmLayers, x, sequence_length=seq_len, dtype=np.float32) init_op = tf.global_variables_initializer()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span> <span class="pl-k">from</span> <span class="pl-s1">tensorflow</span>.<span class="pl-s1">contrib</span> <span class="pl-k">import</span> <span class="pl-s1">rnn</span> <span class="pl-s1">seq_max_len</span> <span class="pl-c1">=</span> <span class="pl-c1">6</span> <span class="pl-s1">num_hidden</span> <span class="pl-c1">=</span> <span class="pl-c1">5</span> <span class="pl-s1">sample_size</span> <span class="pl-c1">=</span> <span class="pl-c1">4</span> <span class="pl-c">#print(seq_len_arr)</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">placeholder</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">float32</span>, [<span class="pl-c1">None</span>, <span class="pl-s1">seq_max_len</span>, <span class="pl-s1">sample_size</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'x'</span>) <span class="pl-s1">seq_len</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">placeholder</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">int32</span>, [<span class="pl-c1">None</span>]) <span class="pl-s1">lstm_cell</span> <span class="pl-c1">=</span> <span class="pl-s1">rnn</span>.<span class="pl-v">LSTMBlockCell</span>(<span class="pl-s1">num_hidden</span>) <span class="pl-s1">lstmLayers</span> <span class="pl-c1">=</span> <span class="pl-s1">rnn</span>.<span class="pl-v">MultiRNNCell</span>([<span class="pl-s1">lstm_cell</span>]<span class="pl-c1">*</span><span class="pl-c1">1</span>) <span class="pl-s1">outputs</span>, <span class="pl-s1">states</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-s1">nn</span>.<span class="pl-en">dynamic_rnn</span>(<span class="pl-s1">lstmLayers</span>, <span class="pl-s1">x</span>, <span class="pl-s1">sequence_length</span><span class="pl-c1">=</span><span class="pl-s1">seq_len</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">float32</span>) <span class="pl-s1">init_op</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">global_variables_initializer</span>()</pre></div> <h3 dir="auto">Logs or other output that would be helpful</h3> <p dir="auto">(If logs are large, please upload as attachment or provide link).</p> <p dir="auto">I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library cublas64_80.dll locally<br> I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library cudnn64_5.dll locally<br> I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library cufft64_80.dll locally<br> I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library nvcuda.dll locally<br> I c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:135] successfully opened CUDA library curand64_80.dll locally<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "CountExtremelyRandomStats" device_type: "CPU"') for unknown op: CountExtremelyRandomStats<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "FinishedNodes" device_type: "CPU"') for unknown op: FinishedNodes<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "GrowTree" device_type: "CPU"') for unknown op: GrowTree<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ReinterpretStringToFloat" device_type: "CPU"') for unknown op: ReinterpretStringToFloat<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "SampleInputs" device_type: "CPU"') for unknown op: SampleInputs<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "ScatterAddNdim" device_type: "CPU"') for unknown op: ScatterAddNdim<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNInsert" device_type: "CPU"') for unknown op: TopNInsert<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TopNRemove" device_type: "CPU"') for unknown op: TopNRemove<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "TreePredictions" device_type: "CPU"') for unknown op: TreePredictions<br> E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\framework\op_kernel.cc:943] OpKernel ('op: "UpdateFertileSlots" device_type: "CPU"') for unknown op: UpdateFertileSlots<br> Traceback (most recent call last):<br> File "debug_lstm_zeros2.py", line 33, in <br> outputs, states = tf.nn.dynamic_rnn(lstmLayers, x, sequence_length=seq_len, dtype=np.float32)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 545, in dynamic_rnn<br> dtype=dtype)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 712, in _dynamic_rnn_loop<br> swap_memory=swap_memory)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2626, in while_loop<br> result = context.BuildLoop(cond, body, loop_vars, shape_invariants)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2459, in BuildLoop<br> pred, body, original_loop_vars, loop_vars, shape_invariants)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2409, in _BuildLoop<br> body_result = body(*packed_vars_for_body)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 695, in _time_step<br> skip_conditionals=True)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 177, in _rnn_step<br> new_output, new_state = call_cell()<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\rnn.py", line 683, in <br> call_cell = lambda: cell(input_t, state)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\rnn\python\ops\core_rnn_cell_impl.py", line 655, in <strong>call</strong><br> cur_inp, new_state = cell(cur_inp, cur_state)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\rnn\python\ops\lstm_ops.py", line 402, in <strong>call</strong><br> use_peephole=self._use_peephole)<br> File "C:\Users\jun\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\contrib\rnn\python\ops\lstm_ops.py", line 122, in _lstm_block_cell<br> return _lstm_ops_so.lstm_block_cell(<br> AttributeError: 'NoneType' object has no attribute 'lstm_block_cell'</p> <p dir="auto">Thanks a lot for your assistance!</p> <p dir="auto">Jun</p>
0
<p dir="auto">[Enter steps to reproduce below:]</p> <ol dir="auto"> <li>Create a file named 2Checkout.ts</li> <li>Rename file to checkOut.ts</li> </ol> <p dir="auto">I'm not sure if these are the steps (or which step) resulted in the error, but this is what I was doing at the time.</p> <p dir="auto">When the problem occurred, the ide opened hundreds of tabs. I was not able to work again until I had manually closed all the tabs.</p> <p dir="auto">I have noticed a couple of related(?) issues:</p> <ol dir="auto"> <li>when I rename a file in the tree, a file with the new name is created but a file with the old name remains. This only happens if the file is open in the editor (e.g. if I left-click on the tree item, then right-click and rename). If I right-click on the tree-item and rename, the file is renamed correctly.</li> <li>When I delete the old file from the tree, the file remains open in the editor, but with the 'trashed' name.</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 0.194.0<br> <strong>System</strong>: Mac OS X 10.10.3<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught Error: ENOENT: no such file or directory, open '/Users/admin/Documents/workspace/coachcommune/services/2checkoutService.ts'</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At events.js:141 Error: ENOENT: no such file or directory, open '/Users/admin/Documents/workspace/coachcommune/services/2checkoutService.ts' at Error (native) "><pre class="notranslate"><code class="notranslate">At events.js:141 Error: ENOENT: no such file or directory, open '/Users/admin/Documents/workspace/coachcommune/services/2checkoutService.ts' at Error (native) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -7:18 linter:lint (atom-text-editor.editor) -7:06.1.0 core:backspace (atom-text-editor.editor.mini) -7:05.8.0 core:confirm (atom-text-editor.editor.mini) -7:05.8.0 linter:lint (atom-text-editor.editor) -6:55.9.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-dracula-theme.theme-unity-ui) 4x -4:20.8.0 core:close (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-dracula-theme.theme-unity-ui) -2:56.9.0 core:confirm (atom-text-editor.editor.mini) -2:24.1.0 core:backspace (atom-text-editor.editor.mini) -2:18.8.0 core:cancel (atom-text-editor.editor.mini) 2x -1:52.5.0 core:confirm (atom-text-editor.editor.mini) -1:28.3.0 core:cut (atom-text-editor.editor) -1:21.9.0 core:paste (atom-text-editor.editor) -1:14.7.0 core:save (atom-text-editor.editor) 2x -1:11.9.0 linter:lint (atom-text-editor.editor) -0:07.8.0 core:save (atom-text-editor.editor) -0:07.2.0 core:close (atom-text-editor.editor)"><pre class="notranslate"><code class="notranslate"> -7:18 linter:lint (atom-text-editor.editor) -7:06.1.0 core:backspace (atom-text-editor.editor.mini) -7:05.8.0 core:confirm (atom-text-editor.editor.mini) -7:05.8.0 linter:lint (atom-text-editor.editor) -6:55.9.0 settings-view:check-for-package-updates (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-dracula-theme.theme-unity-ui) 4x -4:20.8.0 core:close (atom-workspace.workspace.scrollbars-visible-when-scrolling.theme-dracula-theme.theme-unity-ui) -2:56.9.0 core:confirm (atom-text-editor.editor.mini) -2:24.1.0 core:backspace (atom-text-editor.editor.mini) -2:18.8.0 core:cancel (atom-text-editor.editor.mini) 2x -1:52.5.0 core:confirm (atom-text-editor.editor.mini) -1:28.3.0 core:cut (atom-text-editor.editor) -1:21.9.0 core:paste (atom-text-editor.editor) -1:14.7.0 core:save (atom-text-editor.editor) 2x -1:11.9.0 linter:lint (atom-text-editor.editor) -0:07.8.0 core:save (atom-text-editor.editor) -0:07.2.0 core:close (atom-text-editor.editor) </code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;themes&quot;: [ &quot;unity-ui&quot;, &quot;dracula-theme&quot; ], &quot;disabledPackages&quot;: [ &quot;sublime-tabs&quot;, &quot;atomatigit&quot;, &quot;autocomplete-paths&quot;, &quot;autocomplete-html&quot;, &quot;language-java&quot;, &quot;language-make&quot;, &quot;language-objective-c&quot;, &quot;language-perl&quot;, &quot;language-php&quot;, &quot;language-python&quot;, &quot;language-ruby&quot;, &quot;language-ruby-on-rails&quot;, &quot;language-sass&quot;, &quot;language-sql&quot;, &quot;language-xml&quot;, &quot;dev-live-reload&quot;, &quot;language-coffee-script&quot;, &quot;language-csharp&quot;, &quot;language-go&quot;, &quot;language-toml&quot;, &quot;project-manager&quot;, &quot;merge-conflicts&quot;, &quot;color-picker&quot;, &quot;jumpy&quot;, &quot;linter&quot;, &quot;linter-tslint&quot;, &quot;angularjs&quot; ] }, &quot;editor&quot;: { &quot;invisibles&quot;: {}, &quot;showIndentGuide&quot;: true, &quot;softWrapAtPreferredLineLength&quot;: true } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: { <span class="pl-ent">"themes"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>unity-ui<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>dracula-theme<span class="pl-pds">"</span></span> ], <span class="pl-ent">"disabledPackages"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>sublime-tabs<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>atomatigit<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>autocomplete-paths<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>autocomplete-html<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-java<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-make<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-objective-c<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-perl<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-php<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-python<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-ruby<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-ruby-on-rails<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-sass<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-sql<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-xml<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>dev-live-reload<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-coffee-script<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-csharp<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-go<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>language-toml<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>project-manager<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>merge-conflicts<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>color-picker<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>jumpy<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>linter<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>linter-tslint<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>angularjs<span class="pl-pds">"</span></span> ] }, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"invisibles"</span>: {}, <span class="pl-ent">"showIndentGuide"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"softWrapAtPreferredLineLength"</span>: <span class="pl-c1">true</span> } }</pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User angularjs-styleguide-snippets, v0.7.0 atom-beautify, v0.24.1 atom-typescript, v3.0.4 autocomplete-plus, v2.12.0 dracula-theme, v0.7.6 editorconfig, v0.3.3 emmet, v2.3.8 unity-ui, v2.0.5 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> angularjs<span class="pl-k">-</span>styleguide<span class="pl-k">-</span>snippets, v0.<span class="pl-ii">7</span>.<span class="pl-ii">0</span> atom<span class="pl-k">-</span>beautify, v0.<span class="pl-ii">24</span>.<span class="pl-ii">1</span> atom<span class="pl-k">-</span>typescript, v3.<span class="pl-ii">0</span>.<span class="pl-ii">4</span> autocomplete<span class="pl-k">-</span>plus, v2.<span class="pl-ii">12</span>.<span class="pl-ii">0</span> dracula<span class="pl-k">-</span>theme, v0.<span class="pl-ii">7</span>.<span class="pl-ii">6</span> editorconfig, v0.<span class="pl-ii">3</span>.<span class="pl-ii">3</span> emmet, v2.<span class="pl-ii">3</span>.<span class="pl-ii">8</span> unity<span class="pl-k">-</span>ui, v2.<span class="pl-ii">0</span>.<span class="pl-ii">5</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
<p dir="auto">Some repro steps that I gathered from the existing issues:</p> <ol dir="auto"> <li>Have a file open in branch <code class="notranslate">something</code> that doesn't exist in branch <code class="notranslate">atom</code></li> <li><code class="notranslate">git checkout atom</code></li> <li>ENOENT <g-emoji class="g-emoji" alias="boom" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4a5.png">💥</g-emoji><br> OR</li> <li>Have a file open in Atom that will be affected by <code class="notranslate">git rebase</code></li> <li><code class="notranslate">git rebase</code></li> <li>ENOENT <g-emoji class="g-emoji" alias="-1" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f44e.png">👎</g-emoji><br> OR<br> Just simply rename a file outside of Atom that's currently open inside of Atom.</li> </ol>
1
<p dir="auto">feature request: getState, example, const [state, setState, getState] = useState(null);</p> <p dir="auto">it is ok to use the simple variable in a dependent uses effect, but not ok in not a dependant use effect.</p> <p dir="auto">the state is a simple variable. which is closure passed into functions, so it is not updated.<br> and setState with a function argument is asynchronously dispatched.<br> I suggest adding a synchronous function getState.</p> <p dir="auto">it will be useful in simple js functions that are defined in useEffect for integration with not react js</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" const [audioTrack, setAudioTrack] = useState(null); const [savedSelectedAudioTrack, setSavedSelectedAudioTrack] = useState(null); const [audioContext, setAudioContext] = useState(null); // use useEffect to run once useEffect( () =&gt;{ const handleParticipant = (participant) =&gt; { const availableTracks = Array.from( participant.tracks.values() ).filter( (publication) =&gt; publication.isSubscribed, ).map( (publication) =&gt; publication.track, ); const audioTracks = availableTracks.filter( (track) =&gt; track.kind === 'audio', ); const selectedAudioTrack = audioTracks.length === 0 ? null : audioTracks[0]; if (selectedAudioTrack !== savedSelectedAudioTrack) { // here savedSelectedAudioTrack will not work setSavedSelectedAudioTrack(selectedAudioTrack); if (audioContext) setAudioTrack( // eslint-disable-next-line prettier/prettier audioContext.MediaStreamAudioSourceNode(selectedAudioTrack) ); else setTimeout(() =&gt; handleParticipant(participant), 100); // setSelectedAudioTrack(selectedAudioTrack1); window.hasAudioTrack = true; } else { window.hasAudioTrack = false; } console.log( 'audioTracks.length:', audioTracks.length ); }; // create audiocontext and 3rd parity library and add event handler to 3rd parity library setAudioContext(createdAudioContext); 3rdParityLibrary.handleEvent=handleParticipant ; } ,[])"><pre class="notranslate"> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">audioTrack</span><span class="pl-kos">,</span> <span class="pl-s1">setAudioTrack</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">savedSelectedAudioTrack</span><span class="pl-kos">,</span> <span class="pl-s1">setSavedSelectedAudioTrack</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">audioContext</span><span class="pl-kos">,</span> <span class="pl-s1">setAudioContext</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// use useEffect to run once</span> <span class="pl-en">useEffect</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span><span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-en">handleParticipant</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">participant</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">availableTracks</span> <span class="pl-c1">=</span> <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-en">from</span><span class="pl-kos">(</span> <span class="pl-s1">participant</span><span class="pl-kos">.</span><span class="pl-c1">tracks</span><span class="pl-kos">.</span><span class="pl-en">values</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">publication</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">publication</span><span class="pl-kos">.</span><span class="pl-c1">isSubscribed</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">publication</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">publication</span><span class="pl-kos">.</span><span class="pl-c1">track</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">audioTracks</span> <span class="pl-c1">=</span> <span class="pl-s1">availableTracks</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">track</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">track</span><span class="pl-kos">.</span><span class="pl-c1">kind</span> <span class="pl-c1">===</span> <span class="pl-s">'audio'</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">selectedAudioTrack</span> <span class="pl-c1">=</span> <span class="pl-s1">audioTracks</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">===</span> <span class="pl-c1">0</span> ? <span class="pl-c1">null</span> : <span class="pl-s1">audioTracks</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">selectedAudioTrack</span> <span class="pl-c1">!==</span> <span class="pl-s1">savedSelectedAudioTrack</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// here savedSelectedAudioTrack will not work</span> <span class="pl-s1">setSavedSelectedAudioTrack</span><span class="pl-kos">(</span><span class="pl-s1">selectedAudioTrack</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">audioContext</span><span class="pl-kos">)</span> <span class="pl-s1">setAudioTrack</span><span class="pl-kos">(</span> <span class="pl-c">// eslint-disable-next-line prettier/prettier</span> <span class="pl-s1">audioContext</span><span class="pl-kos">.</span><span class="pl-en">MediaStreamAudioSourceNode</span><span class="pl-kos">(</span><span class="pl-s1">selectedAudioTrack</span><span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">else</span> <span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">handleParticipant</span><span class="pl-kos">(</span><span class="pl-s1">participant</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">100</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// setSelectedAudioTrack(selectedAudioTrack1);</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">hasAudioTrack</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">hasAudioTrack</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span> <span class="pl-s">'audioTracks.length:'</span><span class="pl-kos">,</span> <span class="pl-s1">audioTracks</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// create audiocontext and 3rd parity library and add event handler to 3rd parity library</span> <span class="pl-s1">setAudioContext</span><span class="pl-kos">(</span><span class="pl-s1">createdAudioContext</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c1">3</span><span class="pl-kos"></span><span class="pl-s1">rdParityLibrary</span><span class="pl-kos">.</span><span class="pl-c1">handleEvent</span><span class="pl-c1">=</span><span class="pl-en">handleParticipant</span> <span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">,</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span></pre></div> <p dir="auto">but the working implementation is like</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" const [audioTrack, setAudioTrack] = useState(null); const [savedSelectedAudioTrack, setSavedSelectedAudioTrack] = useState(null); const [audioContext, setAudioContext] = useState(null); // use useEffect to run once useEffect( () =&gt;{ const handleParticipant = (participant) =&gt; { setSavedSelectedAudioTrack((savedSelectedAudioTrack) =&gt; { setAudioContext((audioContext) =&gt; { const availableTracks = Array.from( participant.tracks.values() ).filter( (publication) =&gt; publication.isSubscribed, ).map( (publication) =&gt; publication.track, ); const audioTracks = availableTracks.filter( (track) =&gt; track.kind === 'audio', ); const selectedAudioTrack = audioTracks.length === 0 ? null : audioTracks[0]; if (selectedAudioTrack !== savedSelectedAudioTrack) { // here savedSelectedAudioTrack will not work setSavedSelectedAudioTrack(selectedAudioTrack); if (audioContext) // and audio context also will not work setAudioTrack( // eslint-disable-next-line prettier/prettier audioContext.MediaStreamAudioSourceNode(selectedAudioTrack) ); else setTimeout(() =&gt; handleParticipant(participant), 100); // setSelectedAudioTrack(selectedAudioTrack1); window.hasAudioTrack = true; } else { window.hasAudioTrack = false; } console.log( 'audioTracks.length:', audioTracks.length ); return audioContext; }); return savedSelectedAudioTrack; }); }; // create audiocontext and 3rd parity library and add event handler to 3rd parity library setAudioContext(createdAudioContext); 3rdParityLibrary.handleEvent=handleParticipant ; } ,[])"><pre class="notranslate"> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">audioTrack</span><span class="pl-kos">,</span> <span class="pl-s1">setAudioTrack</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">savedSelectedAudioTrack</span><span class="pl-kos">,</span> <span class="pl-s1">setSavedSelectedAudioTrack</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">audioContext</span><span class="pl-kos">,</span> <span class="pl-s1">setAudioContext</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// use useEffect to run once</span> <span class="pl-en">useEffect</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span><span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-en">handleParticipant</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">participant</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">setSavedSelectedAudioTrack</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">savedSelectedAudioTrack</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">setAudioContext</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">audioContext</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">availableTracks</span> <span class="pl-c1">=</span> <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-en">from</span><span class="pl-kos">(</span> <span class="pl-s1">participant</span><span class="pl-kos">.</span><span class="pl-c1">tracks</span><span class="pl-kos">.</span><span class="pl-en">values</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">publication</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">publication</span><span class="pl-kos">.</span><span class="pl-c1">isSubscribed</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">publication</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">publication</span><span class="pl-kos">.</span><span class="pl-c1">track</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">audioTracks</span> <span class="pl-c1">=</span> <span class="pl-s1">availableTracks</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">track</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">track</span><span class="pl-kos">.</span><span class="pl-c1">kind</span> <span class="pl-c1">===</span> <span class="pl-s">'audio'</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">selectedAudioTrack</span> <span class="pl-c1">=</span> <span class="pl-s1">audioTracks</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">===</span> <span class="pl-c1">0</span> ? <span class="pl-c1">null</span> : <span class="pl-s1">audioTracks</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">selectedAudioTrack</span> <span class="pl-c1">!==</span> <span class="pl-s1">savedSelectedAudioTrack</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// here savedSelectedAudioTrack will not work</span> <span class="pl-s1">setSavedSelectedAudioTrack</span><span class="pl-kos">(</span><span class="pl-s1">selectedAudioTrack</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">audioContext</span><span class="pl-kos">)</span> <span class="pl-c">// and audio context also will not work</span> <span class="pl-s1">setAudioTrack</span><span class="pl-kos">(</span> <span class="pl-c">// eslint-disable-next-line prettier/prettier</span> <span class="pl-s1">audioContext</span><span class="pl-kos">.</span><span class="pl-en">MediaStreamAudioSourceNode</span><span class="pl-kos">(</span><span class="pl-s1">selectedAudioTrack</span><span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">else</span> <span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">handleParticipant</span><span class="pl-kos">(</span><span class="pl-s1">participant</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">100</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// setSelectedAudioTrack(selectedAudioTrack1);</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">hasAudioTrack</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">hasAudioTrack</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span> <span class="pl-s">'audioTracks.length:'</span><span class="pl-kos">,</span> <span class="pl-s1">audioTracks</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-s1">audioContext</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-s1">savedSelectedAudioTrack</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// create audiocontext and 3rd parity library and add event handler to 3rd parity library</span> <span class="pl-s1">setAudioContext</span><span class="pl-kos">(</span><span class="pl-s1">createdAudioContext</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c1">3</span><span class="pl-kos"></span><span class="pl-s1">rdParityLibrary</span><span class="pl-kos">.</span><span class="pl-c1">handleEvent</span><span class="pl-c1">=</span><span class="pl-en">handleParticipant</span> <span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">,</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span></pre></div> <p dir="auto">i wish there was a synchronous getState.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" const [audioTrack, setAudioTrack] = useState(null); const [savedSelectedAudioTrack, setSavedSelectedAudioTrack, getSavedSelectedAudioTrack] = useState(null); const [audioContext, setAudioContext, getAudioContext] = useState(null); // use useEffect to run once useEffect( () =&gt;{ const handleParticipant = (participant) =&gt; { const availableTracks = Array.from( participant.tracks.values() ).filter( (publication) =&gt; publication.isSubscribed, ).map( (publication) =&gt; publication.track, ); const audioTracks = availableTracks.filter( (track) =&gt; track.kind === 'audio', ); const selectedAudioTrack = audioTracks.length === 0 ? null : audioTracks[0]; if (selectedAudioTrack !== getSavedSelectedAudioTrack()) { // here savedSelectedAudioTrack will not work setSavedSelectedAudioTrack(selectedAudioTrack); if (getAudioContext()) setAudioTrack( getAudioContext().MediaStreamAudioSourceNode(selectedAudioTrack) ); else setTimeout(() =&gt; handleParticipant(participant), 100); // setSelectedAudioTrack(selectedAudioTrack1); window.hasAudioTrack = true; } else { window.hasAudioTrack = false; } console.log( 'audioTracks.length:', audioTracks.length ); }; // create audiocontext and 3rd parity library and add event handler to 3rd parity library setAudioContext(createdAudioContext); 3rdParityLibrary.handleEvent=handleParticipant ; } ,[])"><pre class="notranslate"> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">audioTrack</span><span class="pl-kos">,</span> <span class="pl-s1">setAudioTrack</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">savedSelectedAudioTrack</span><span class="pl-kos">,</span> <span class="pl-s1">setSavedSelectedAudioTrack</span><span class="pl-kos">,</span> <span class="pl-s1">getSavedSelectedAudioTrack</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-kos">[</span><span class="pl-s1">audioContext</span><span class="pl-kos">,</span> <span class="pl-s1">setAudioContext</span><span class="pl-kos">,</span> <span class="pl-s1">getAudioContext</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// use useEffect to run once</span> <span class="pl-en">useEffect</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span><span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-en">handleParticipant</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">participant</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-s1">availableTracks</span> <span class="pl-c1">=</span> <span class="pl-v">Array</span><span class="pl-kos">.</span><span class="pl-en">from</span><span class="pl-kos">(</span> <span class="pl-s1">participant</span><span class="pl-kos">.</span><span class="pl-c1">tracks</span><span class="pl-kos">.</span><span class="pl-en">values</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">publication</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">publication</span><span class="pl-kos">.</span><span class="pl-c1">isSubscribed</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">publication</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">publication</span><span class="pl-kos">.</span><span class="pl-c1">track</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">audioTracks</span> <span class="pl-c1">=</span> <span class="pl-s1">availableTracks</span><span class="pl-kos">.</span><span class="pl-en">filter</span><span class="pl-kos">(</span> <span class="pl-kos">(</span><span class="pl-s1">track</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">track</span><span class="pl-kos">.</span><span class="pl-c1">kind</span> <span class="pl-c1">===</span> <span class="pl-s">'audio'</span><span class="pl-kos">,</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">selectedAudioTrack</span> <span class="pl-c1">=</span> <span class="pl-s1">audioTracks</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-c1">===</span> <span class="pl-c1">0</span> ? <span class="pl-c1">null</span> : <span class="pl-s1">audioTracks</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">selectedAudioTrack</span> <span class="pl-c1">!==</span> <span class="pl-s1">getSavedSelectedAudioTrack</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// here savedSelectedAudioTrack will not work</span> <span class="pl-s1">setSavedSelectedAudioTrack</span><span class="pl-kos">(</span><span class="pl-s1">selectedAudioTrack</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">getAudioContext</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-s1">setAudioTrack</span><span class="pl-kos">(</span> <span class="pl-s1">getAudioContext</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">MediaStreamAudioSourceNode</span><span class="pl-kos">(</span><span class="pl-s1">selectedAudioTrack</span><span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">else</span> <span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-en">handleParticipant</span><span class="pl-kos">(</span><span class="pl-s1">participant</span><span class="pl-kos">)</span><span class="pl-kos">,</span> <span class="pl-c1">100</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// setSelectedAudioTrack(selectedAudioTrack1);</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">hasAudioTrack</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-smi">window</span><span class="pl-kos">.</span><span class="pl-c1">hasAudioTrack</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span> <span class="pl-s">'audioTracks.length:'</span><span class="pl-kos">,</span> <span class="pl-s1">audioTracks</span><span class="pl-kos">.</span><span class="pl-c1">length</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-c">// create audiocontext and 3rd parity library and add event handler to 3rd parity library</span> <span class="pl-s1">setAudioContext</span><span class="pl-kos">(</span><span class="pl-s1">createdAudioContext</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c1">3</span><span class="pl-kos"></span><span class="pl-s1">rdParityLibrary</span><span class="pl-kos">.</span><span class="pl-c1">handleEvent</span><span class="pl-c1">=</span><span class="pl-en">handleParticipant</span> <span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">,</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">)</span></pre></div>
<h2 dir="auto">Steps To Reproduce</h2> <p dir="auto">Englobe code in a static class make rule bug !<br> Actually rule detect React in class, but it not true !<br> This is a pure ES6 js class with a proxi field to a React functions in scope.<br> And is not a React Class components !</p> <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface PanelProps {} class DOMAINE { static Panel : FC&lt;PanelProps&gt; = (props)=&gt; { const { children } = props; const state = useState&lt;unknown&gt;(null); useEffect(() =&gt; {}); return ( &lt;Bloc className='Panel' Flex Grow&gt; {children} &lt;/Bloc&gt; ); }; static a = class ACTIVITY { static Panel : VFC&lt;PanelProps&gt; = (props)=&gt; { const { } = props; const state = useState&lt;unknown&gt;(null); useEffect(() =&gt; {}); return ( &lt;Bloc className='Panel' Flex Grow&gt; &lt;/Bloc&gt; ); }; } } "><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">PanelProps</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">DOMAINE</span> <span class="pl-kos">{</span> <span class="pl-k">static</span> <span class="pl-c1">Panel</span> : <span class="pl-smi">FC</span><span class="pl-kos">&lt;</span><span class="pl-smi">PanelProps</span><span class="pl-kos">&gt;</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span><span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> children <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">props</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">state</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">&lt;</span><span class="pl-smi">unknown</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">useEffect</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-smi">Bloc</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-s">'Panel'</span> <span class="pl-c1">Flex</span> <span class="pl-c1">Grow</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span><span class="pl-s1">children</span><span class="pl-kos">}</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Bloc</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">static</span> <span class="pl-c1">a</span> <span class="pl-c1">=</span> <span class="pl-k">class</span> <span class="pl-smi">ACTIVITY</span> <span class="pl-kos">{</span> <span class="pl-k">static</span> <span class="pl-c1">Panel</span> : <span class="pl-smi">VFC</span><span class="pl-kos">&lt;</span><span class="pl-smi">PanelProps</span><span class="pl-kos">&gt;</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">props</span><span class="pl-kos">)</span><span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">props</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">state</span> <span class="pl-c1">=</span> <span class="pl-en">useState</span><span class="pl-kos">&lt;</span><span class="pl-smi">unknown</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">useEffect</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-smi">Bloc</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-s">'Panel'</span> <span class="pl-c1">Flex</span> <span class="pl-c1">Grow</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-smi">Bloc</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/24865815/135672118-097b4751-e6bd-4922-96ed-6b6193609c2c.png"><img src="https://user-images.githubusercontent.com/24865815/135672118-097b4751-e6bd-4922-96ed-6b6193609c2c.png" alt="image" style="max-width: 100%;"></a></p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;env&quot;: { &quot;browser&quot;: true, &quot;es2021&quot;: true, &quot;node&quot;: true }, &quot;extends&quot;: [ &quot;plugin:react/recommended&quot;, &quot;plugin:react-hooks/recommended&quot; ], &quot;parser&quot;: &quot;@typescript-eslint/parser&quot;, &quot;parserOptions&quot;: { &quot;ecmaFeatures&quot;: { &quot;jsx&quot;: true }, &quot;ecmaVersion&quot;: 12, &quot;sourceType&quot;: &quot;module&quot; }, &quot;plugins&quot;: [ &quot;react&quot;, &quot;@typescript-eslint&quot; ], &quot;rules&quot;: { &quot;array-bracket-spacing&quot;: &quot;warn&quot;, &quot;multiline-comment-style&quot;: &quot;warn&quot;, &quot;no-console&quot;: &quot;warn&quot;, &quot;comma-dangle&quot;: &quot;off&quot;, &quot;no-var&quot;: &quot;warn&quot;, &quot;no-duplicate-imports&quot;: &quot;error&quot; } }"><pre class="notranslate">{ <span class="pl-ent">"env"</span>: { <span class="pl-ent">"browser"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"es2021"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"node"</span>: <span class="pl-c1">true</span> }, <span class="pl-ent">"extends"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>plugin:react/recommended<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>plugin:react-hooks/recommended<span class="pl-pds">"</span></span> ], <span class="pl-ent">"parser"</span>: <span class="pl-s"><span class="pl-pds">"</span>@typescript-eslint/parser<span class="pl-pds">"</span></span>, <span class="pl-ent">"parserOptions"</span>: { <span class="pl-ent">"ecmaFeatures"</span>: { <span class="pl-ent">"jsx"</span>: <span class="pl-c1">true</span> }, <span class="pl-ent">"ecmaVersion"</span>: <span class="pl-c1">12</span>, <span class="pl-ent">"sourceType"</span>: <span class="pl-s"><span class="pl-pds">"</span>module<span class="pl-pds">"</span></span> }, <span class="pl-ent">"plugins"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>react<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>@typescript-eslint<span class="pl-pds">"</span></span> ], <span class="pl-ent">"rules"</span>: { <span class="pl-ent">"array-bracket-spacing"</span>: <span class="pl-s"><span class="pl-pds">"</span>warn<span class="pl-pds">"</span></span>, <span class="pl-ent">"multiline-comment-style"</span>: <span class="pl-s"><span class="pl-pds">"</span>warn<span class="pl-pds">"</span></span>, <span class="pl-ent">"no-console"</span>: <span class="pl-s"><span class="pl-pds">"</span>warn<span class="pl-pds">"</span></span>, <span class="pl-ent">"comma-dangle"</span>: <span class="pl-s"><span class="pl-pds">"</span>off<span class="pl-pds">"</span></span>, <span class="pl-ent">"no-var"</span>: <span class="pl-s"><span class="pl-pds">"</span>warn<span class="pl-pds">"</span></span>, <span class="pl-ent">"no-duplicate-imports"</span>: <span class="pl-s"><span class="pl-pds">"</span>error<span class="pl-pds">"</span></span> } }</pre></div> <p dir="auto">Link to code example: <a href="https://codesandbox.io/s/currying-https-9v064?file=/src/App.js" rel="nofollow">https://codesandbox.io/s/currying-https-9v064?file=/src/App.js</a></p> <h2 dir="auto">The current behavior</h2> <p dir="auto">Rule think we use hooks inside a react Class !</p> <h2 dir="auto">The expected behavior</h2> <p dir="auto">Rule should not emit error about hooks for this structure</p>
0
<h1 dir="auto">Environment</h1> <p dir="auto">OS:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0"><pre lang="none" class="notranslate"><code class="notranslate">Platform ServicePack Version VersionString -------- ----------- ------- ------------- Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0 </code></pre></div> <p dir="auto">Terminal:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; get-appxpackage Microsoft.WindowsTerminal Name : Microsoft.WindowsTerminal Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US Architecture : X64 ResourceId : Version : 0.6.2951.0 PackageFullName : Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe IsFramework : False PackageFamilyName : Microsoft.WindowsTerminal_8wekyb3d8bbwe PublisherId : 8wekyb3d8bbwe IsResourcePackage : False IsBundle : False IsDevelopmentMode : False NonRemovable : False Dependencies : {Microsoft.VCLibs.140.00_14.0.27323.0_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00.UWPDesktop_14.0.27629.0_x64__8wekyb3d8bbwe} IsPartiallyStaged : False SignatureKind : Store Status : Ok"><pre lang="none" class="notranslate"><code class="notranslate">&gt; get-appxpackage Microsoft.WindowsTerminal Name : Microsoft.WindowsTerminal Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US Architecture : X64 ResourceId : Version : 0.6.2951.0 PackageFullName : Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe InstallLocation : C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe IsFramework : False PackageFamilyName : Microsoft.WindowsTerminal_8wekyb3d8bbwe PublisherId : 8wekyb3d8bbwe IsResourcePackage : False IsBundle : False IsDevelopmentMode : False NonRemovable : False Dependencies : {Microsoft.VCLibs.140.00_14.0.27323.0_x64__8wekyb3d8bbwe, Microsoft.VCLibs.140.00.UWPDesktop_14.0.27629.0_x64__8wekyb3d8bbwe} IsPartiallyStaged : False SignatureKind : Store Status : Ok </code></pre></div> <p dir="auto">I suspect I'm seeing the crash mentioned in PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="501218993" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/3027" data-hovercard-type="pull_request" data-hovercard-url="/microsoft/terminal/pull/3027/hovercard" href="https://github.com/microsoft/terminal/pull/3027">#3027</a>. While I can't recall the specific build number for Terminal that I first installed on this particular machine, it was one of the 0.5 releases. all versions I've tried from that first one to the version listed above by <code class="notranslate">get-appxpackage</code> have failed this same way (though I can't faithfully recall if it's been the same Event Viewer entry as reported below). I have used Feedback hub twice, I believe with different versions.</p> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Click <code class="notranslate">Windows Terminal (Preview)</code> in Start menu</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Application launches</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Empty Window frame is drawn, then closes. This is in <em>Event Viewer</em> under <em>Windows Logs &gt; Application</em></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Faulting application name: WindowsTerminal.exe, version: 1.0.1910.22001, time stamp: 0x5daf7ab2 Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.356, time stamp: 0x0825b5b0 Exception code: 0xc000027b Fault offset: 0x0000000000712cf0 Faulting process id: 0x2b68 Faulting application start time: 0x01d58f6c56566369 Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll Report Id: 86621d0f-a0dd-4c17-9530-85a0b42ed873 Faulting package full name: Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App"><pre lang="none" class="notranslate"><code class="notranslate">Faulting application name: WindowsTerminal.exe, version: 1.0.1910.22001, time stamp: 0x5daf7ab2 Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.356, time stamp: 0x0825b5b0 Exception code: 0xc000027b Fault offset: 0x0000000000712cf0 Faulting process id: 0x2b68 Faulting application start time: 0x01d58f6c56566369 Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll Report Id: 86621d0f-a0dd-4c17-9530-85a0b42ed873 Faulting package full name: Microsoft.WindowsTerminal_0.6.2951.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App </code></pre></div>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: 1903 18362.267 Windows Terminal version (if applicable): 0.3.2142.0"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 1903 18362.267 Windows Terminal version (if applicable): 0.3.2142.0 </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <p dir="auto">Window Terminal have to be possible to use internationally.<br> "international localization" is the keyword which have to remember.</p> <p dir="auto">Cant give chars @ $ £ { [ ] } because keymapping ctrl+alt+1-9 kill those keys ex. in swedish, finnish, ... keyboards.</p> <ul dir="auto"> <li>@ = AltGr+2</li> <li>$ = AltGr+4</li> <li>...</li> </ul> <h1 dir="auto">Expected behavior</h1> <p dir="auto">After I changed those tabbing keymapping ex. ctrl+shift+1, ctrl+shift+2, ... I got those important shell level characters from my keyboard as they have been since 199x.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="441319503" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/521" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/521/hovercard" href="https://github.com/microsoft/terminal/issues/521">#521</a> has been same problem, but it looks that this is not same, low level problem has fixed.</p> <p dir="auto">Problem is same: AltGr not work. Current problem is easier to fix: Don't kill AltGr in default configuration using ctrl+alt+N (N=1-9) key mapping.</p>
0
<p dir="auto">Angular 2 is a great piece of software, but its biggest problem is that it's overly verbose. Has implicitly requesting a component's sibling template/css been discussed?</p> <p dir="auto">component<br> - component.js<br> - component.html<br> - component.css</p> <p dir="auto">I know it's less explicit, but it would encourage a standard pattern for organizing components. I think you're going to lose a lot of people with the verbosity as is. Unless we're going to go full hog and start writing CSS directly in our components, using an inline template string is an awful anti-pattern IMO.</p>
<p dir="auto">I'm using <a href="https://github.com/mgechev/angular2-seed">angular2-seed</a> and throughout my project each component has <code class="notranslate">html</code> and <code class="notranslate">css</code> file with the same name as component <code class="notranslate">ts</code> file.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="├── about │   ├── about.html │   ├── about.ts │   └── about.css"><pre class="notranslate"><code class="notranslate">├── about │   ├── about.html │   ├── about.ts │   └── about.css </code></pre></div> <p dir="auto">where component <code class="notranslate">ts</code> file is:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import {Component} from 'angular2/angular2'; @Component({ selector: 'about', templateUrl: './components/about/about.html', styleUrls: ['./components/about/about/about.css'] }) export class About {}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span><span class="pl-smi">Component</span><span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'angular2/angular2'</span><span class="pl-kos">;</span> @<span class="pl-smi">Component</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">selector</span>: <span class="pl-s">'about'</span><span class="pl-kos">,</span> <span class="pl-c1">templateUrl</span>: <span class="pl-s">'./components/about/about.html'</span><span class="pl-kos">,</span> <span class="pl-c1">styleUrls</span>: <span class="pl-kos">[</span><span class="pl-s">'./components/about/about/about.css'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">About</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div> <p dir="auto">Can you make <code class="notranslate">templateUrl</code> and <code class="notranslate">styleUrls</code> to be optional and if either of that field is absent the default value is generated for template/css, but only in case the file with that name exists. I.e.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let file = &quot;'&quot; + &lt;component file name&gt; + '.html'&quot;; if(hasFile(file)) templateUrl = file; // templateUrl: ['component file name.html']"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">file</span> <span class="pl-c1">=</span> <span class="pl-s">"'"</span> <span class="pl-c1">+</span> <span class="pl-kos">&lt;</span><span class="pl-smi">component</span> <span class="pl-s1">file</span> <span class="pl-s1">name</span><span class="pl-kos">&gt;</span> <span class="pl-c1">+</span> <span class="pl-s">'.html'</span>"<span class="pl-kos">;</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-en">hasFile</span><span class="pl-kos">(</span><span class="pl-s1">file</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-s1">templateUrl</span> <span class="pl-c1">=</span> <span class="pl-s1">file</span><span class="pl-kos">;</span> <span class="pl-c">// templateUrl: ['component file name.html']</span></pre></div> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="let file = &quot;'&quot; + &lt;component file name&gt; + '.html'&quot;; if(hasFile(file)) styleUrls = file; // styleUrls: ['component file name.css']"><pre class="notranslate"><span class="pl-k">let</span> <span class="pl-s1">file</span> <span class="pl-c1">=</span> <span class="pl-s">"'"</span> <span class="pl-c1">+</span> <span class="pl-kos">&lt;</span><span class="pl-smi">component</span> <span class="pl-s1">file</span> <span class="pl-s1">name</span><span class="pl-kos">&gt;</span> <span class="pl-c1">+</span> <span class="pl-s">'.html'</span>"<span class="pl-kos">;</span> <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-en">hasFile</span><span class="pl-kos">(</span><span class="pl-s1">file</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-s1">styleUrls</span> <span class="pl-c1">=</span> <span class="pl-s1">file</span><span class="pl-kos">;</span> <span class="pl-c">// styleUrls: ['component file name.css']</span></pre></div> <p dir="auto">Having these fields be optional will save a lot of dummy typings and make components code look clearer.</p> <p dir="auto">What do you think?</p>
1
<p dir="auto">I have an app design requirement to pick images on a custom layout, I can't have the native picker dialog pop-up.<br> So I need access to just the uris of all photos and videos in library, to implement my custom picker layout.<br> Therefore I'm requesting a method to return a list of the uris for all pictures/videos in the gallery, instead of the current one that opens a native picker dialog.<br> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/collinjackson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/collinjackson">@collinjackson</a> hopefully you can agree with me that this is a common designer request, hence it is a useful extension to your plugin, specially since it allows the modularizing of the logic from the layout</p>
<p dir="auto">Right now the picker defaults to single mode, it would be nice to be able to have a multi-mode, by passing a parameter when you launch it, then an array is returned of files instead of just one.</p> <p dir="auto">for android this might help speed things up<br> unique code</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);"><pre class="notranslate"><span class="pl-s1">intent</span>.<span class="pl-en">putExtra</span>(<span class="pl-smi">Intent</span>.<span class="pl-c1">EXTRA_ALLOW_MULTIPLE</span>, <span class="pl-c1">true</span>);</pre></div> <p dir="auto">full example</p> <div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Intent intent = new Intent(); intent.setType(&quot;image/*&quot;); intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(Intent.createChooser(intent,&quot;Select Picture&quot;), 1);"><pre class="notranslate"><span class="pl-smi">Intent</span> <span class="pl-s1">intent</span> = <span class="pl-k">new</span> <span class="pl-smi">Intent</span>(); <span class="pl-s1">intent</span>.<span class="pl-en">setType</span>(<span class="pl-s">"image/*"</span>); <span class="pl-s1">intent</span>.<span class="pl-en">putExtra</span>(<span class="pl-smi">Intent</span>.<span class="pl-c1">EXTRA_ALLOW_MULTIPLE</span>, <span class="pl-c1">true</span>); <span class="pl-s1">intent</span>.<span class="pl-en">setAction</span>(<span class="pl-smi">Intent</span>.<span class="pl-c1">ACTION_GET_CONTENT</span>); <span class="pl-en">startActivityForResult</span>(<span class="pl-smi">Intent</span>.<span class="pl-en">createChooser</span>(<span class="pl-s1">intent</span>,<span class="pl-s">"Select Picture"</span>), <span class="pl-c1">1</span>);</pre></div> <p dir="auto">for iOS I think maybe using this library might help, and seems up to date.</p> <p dir="auto"><a href="https://github.com/hackiftekhar/IQMediaPickerController">https://github.com/hackiftekhar/IQMediaPickerController</a></p>
1
<p dir="auto">I encountered this issue at build time while testing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="618615191" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/16246" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/16246/hovercard" href="https://github.com/numpy/numpy/pull/16246">#16246</a> on a Haswell-based CPU supporting AVX2.</p> <p dir="auto">This is due to a confirmed bug in GCC that is fixed since GCC 8.4: <a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782" rel="nofollow">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65782</a></p> <p dir="auto">One suggested workaround on <a href="https://stackoverflow.com/a/53999574/982257" rel="nofollow">Stack Overflow</a> was to pass a number of <code class="notranslate">-ffixed-&lt;reg&gt;</code> flags to prevent GCC from producing code using the unsupported registers:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-ffixed-xmm16 -ffixed-xmm17 -ffixed-xmm18 -ffixed-xmm19 -ffixed-xmm20 -ffixed-xmm21 -ffixed-xmm22 -ffixed-xmm23 -ffixed-xmm24 -ffixed-xmm25 -ffixed-xmm26 -ffixed-xmm27 -ffixed-xmm28 -ffixed-xmm29 -ffixed-xmm30 -ffixed-xmm31"><pre class="notranslate"><code class="notranslate">-ffixed-xmm16 -ffixed-xmm17 -ffixed-xmm18 -ffixed-xmm19 -ffixed-xmm20 -ffixed-xmm21 -ffixed-xmm22 -ffixed-xmm23 -ffixed-xmm24 -ffixed-xmm25 -ffixed-xmm26 -ffixed-xmm27 -ffixed-xmm28 -ffixed-xmm29 -ffixed-xmm30 -ffixed-xmm31 </code></pre></div> <p dir="auto">I found that this workaround worked for me. So a possible workaround in Numpy would be to automatically add these flags to <code class="notranslate">CFLAGS</code>, at least on Cygwin and GCC &lt; 8.4 (does Numpy's build system have an existing routine to check the compiler version?)</p> <h3 dir="auto">Error message:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="numpy/core/src/umath/loops.c.src:3058:1: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi] } ^ numpy/core/src/umath/loops.c.src:3058:1: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi] {standard input}: Assembler messages: {standard input}:9023: Error: invalid register for .seh_savexmm {standard input}:9025: Error: invalid register for .seh_savexmm {standard input}:9027: Error: invalid register for .seh_savexmm ... several more similar lines ..."><pre class="notranslate"><code class="notranslate">numpy/core/src/umath/loops.c.src:3058:1: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi] } ^ numpy/core/src/umath/loops.c.src:3058:1: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi] {standard input}: Assembler messages: {standard input}:9023: Error: invalid register for .seh_savexmm {standard input}:9025: Error: invalid register for .seh_savexmm {standard input}:9027: Error: invalid register for .seh_savexmm ... several more similar lines ... </code></pre></div> <h3 dir="auto">Numpy/Python version information:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.20.0.dev0+7f7d19d 3.6.8 (default, Feb 14 2019, 22:09:48) [GCC 7.4.0]"><pre class="notranslate"><code class="notranslate">1.20.0.dev0+7f7d19d 3.6.8 (default, Feb 14 2019, 22:09:48) [GCC 7.4.0] </code></pre></div>
<p dir="auto">Attempting to install numpy 1.17.3 on cygwin fails, with the only reported error message being <code class="notranslate">invalid register for .seh_savexmm</code>.<br> I can't figure out where this would be getting called, since the reported file is <code class="notranslate">standard input</code> and grepping the source for <code class="notranslate">savexmm</code> does not produce any obvious clues.</p> <h3 dir="auto">Reproducing code example:</h3> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="python3 -m pip install numpy==1.17.3"><pre class="notranslate">python3 -m pip install numpy==1.17.3</pre></div> <h3 dir="auto">Error message:</h3> <h4 dir="auto">Error message on third and subsequent compilations</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="... gcc: build/src.cygwin-3.0.7-x86_64-3.5/numpy/core/src/umath/loops.c {standard input}: Assembler messages: {standard input}:4612: Error: invalid register for .seh_savexmm {standard input}:4614: Error: invalid register for .seh_savexmm {standard input}:4616: Error: invalid register for .seh_savexmm {standard input}:4618: Error: invalid register for .seh_savexmm {standard input}:4620: Error: invalid register for .seh_savexmm {standard input}:4622: Error: invalid register for .seh_savexmm {standard input}:6493: Error: invalid register for .seh_savexmm {standard input}:6495: Error: invalid register for .seh_savexmm {standard input}:6497: Error: invalid register for .seh_savexmm {standard input}:6499: Error: invalid register for .seh_savexmm {standard input}:6501: Error: invalid register for .seh_savexmm {standard input}:6503: Error: invalid register for .seh_savexmm {standard input}:6505: Error: invalid register for .seh_savexmm numpy/core/src/umath/loops.c.src: In function ‘PyUFunc_e_e’: numpy/core/src/umath/loops.c.src:77:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] } ^ ... numpy/core/src/umath/loops.c.src: In function ‘OBJECT_sign’: numpy/core/src/umath/loops.c.src:2919:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] } ^ error: Command &quot;gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/usr/src/ports/python36/python36-3.6.9-1.x86_64/build=/usr/src/debug/python36-3.6.9-1 -fdebug-prefix-map=/usr/src/ports/python36/python36-3.6.9-1.x86_64/src/Python-3.6.9=/usr/src/debug/python36-3.6.9-1 -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/usr/src/ports/python36/python36-3.6.9-1.x86_64/build=/usr/src/debug/python36-3.6.9-1 -fdebug-prefix-map=/usr/src/ports/python36/python36-3.6.9-1.x86_64/src/Python-3.6.9=/usr/src/debug/python36-3.6.9-1 -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -I/usr/local/include -I/usr/include -I/usr/include/suitesparse -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/umath -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/npymath -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/common -Inumpy/core/include -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.6m -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/common -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/npymath -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/common -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/npymath -c build/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/umath/loops.c -o build/temp.cygwin-3.0.7-x86_64-3.6/build/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/umath/loops.o -MMD -MF build/temp.cygwin-3.0.7-x86_64-3.6/build/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/umath/loops.o.d&quot; failed with exit status 1 ..."><pre class="notranslate"><code class="notranslate">... gcc: build/src.cygwin-3.0.7-x86_64-3.5/numpy/core/src/umath/loops.c {standard input}: Assembler messages: {standard input}:4612: Error: invalid register for .seh_savexmm {standard input}:4614: Error: invalid register for .seh_savexmm {standard input}:4616: Error: invalid register for .seh_savexmm {standard input}:4618: Error: invalid register for .seh_savexmm {standard input}:4620: Error: invalid register for .seh_savexmm {standard input}:4622: Error: invalid register for .seh_savexmm {standard input}:6493: Error: invalid register for .seh_savexmm {standard input}:6495: Error: invalid register for .seh_savexmm {standard input}:6497: Error: invalid register for .seh_savexmm {standard input}:6499: Error: invalid register for .seh_savexmm {standard input}:6501: Error: invalid register for .seh_savexmm {standard input}:6503: Error: invalid register for .seh_savexmm {standard input}:6505: Error: invalid register for .seh_savexmm numpy/core/src/umath/loops.c.src: In function ‘PyUFunc_e_e’: numpy/core/src/umath/loops.c.src:77:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] } ^ ... numpy/core/src/umath/loops.c.src: In function ‘OBJECT_sign’: numpy/core/src/umath/loops.c.src:2919:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] } ^ error: Command "gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/usr/src/ports/python36/python36-3.6.9-1.x86_64/build=/usr/src/debug/python36-3.6.9-1 -fdebug-prefix-map=/usr/src/ports/python36/python36-3.6.9-1.x86_64/src/Python-3.6.9=/usr/src/debug/python36-3.6.9-1 -ggdb -O2 -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -fdebug-prefix-map=/usr/src/ports/python36/python36-3.6.9-1.x86_64/build=/usr/src/debug/python36-3.6.9-1 -fdebug-prefix-map=/usr/src/ports/python36/python36-3.6.9-1.x86_64/src/Python-3.6.9=/usr/src/debug/python36-3.6.9-1 -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DNO_ATLAS_INFO=1 -DHAVE_CBLAS -I/usr/local/include -I/usr/include -I/usr/include/suitesparse -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/umath -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/npymath -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/common -Inumpy/core/include -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/include/numpy -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.6m -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/common -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/npymath -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/common -Ibuild/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/npymath -c build/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/umath/loops.c -o build/temp.cygwin-3.0.7-x86_64-3.6/build/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/umath/loops.o -MMD -MF build/temp.cygwin-3.0.7-x86_64-3.6/build/src.cygwin-3.0.7-x86_64-3.6/numpy/core/src/umath/loops.o.d" failed with exit status 1 ... </code></pre></div> <p dir="auto">The first and second compilations produce different output before the block of errors, but are otherwise identical.</p> <h3 dir="auto">Numpy/Python version information:</h3> <p dir="auto">Compiling numpy 1.17.3 on python 3.5.7 fails as described above.</p> <p dir="auto">Compiling numpy 1.17.0 on python 3.7.4 fails in the manner described above.<br> Numpy 1.16.5 built just fine and passed most tests.</p> <p dir="auto">How would I go about debugging this?</p>
1
<p dir="auto"><strong>Migrated issue, originally created by Daniel Kassen</strong></p> <p dir="auto">Below is a snippet of code that defines a Parent class and a Child class which is abstract and used for inheritance. Classes that inherit from Child do not automatically populate if the entry exists in the database. By that, I mean the proper query is not performed to automatically pull that object out from the database even though it exists, causing duplicate entry errors when commit()'ing the session.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="class Parent(Base): __tablename__ = 'parent' id = Column(Integer, primary_key=true) name = Column(String(100, collation='utf8_bin'), nullable=False, unique=True) class Child(Base): __abstract__ = True @classmethod def _classname(cls): return cls.__name__ @delcared_attr def __tablename__(self): return self._classname().lower() @delcared_attr def id(self): return Column(Integer, ForeignKey(Parent.id), primary_key=True) @declared_attr def parent(self): return relationship(Parent)"><pre class="notranslate"><code class="notranslate">class Parent(Base): __tablename__ = 'parent' id = Column(Integer, primary_key=true) name = Column(String(100, collation='utf8_bin'), nullable=False, unique=True) class Child(Base): __abstract__ = True @classmethod def _classname(cls): return cls.__name__ @delcared_attr def __tablename__(self): return self._classname().lower() @delcared_attr def id(self): return Column(Integer, ForeignKey(Parent.id), primary_key=True) @declared_attr def parent(self): return relationship(Parent) </code></pre></div> <p dir="auto">Creating a factory that declares a class with the same attributes as are declared above in the Child class actually works, which is why this isn't very high priority, but it does make my code much less pythonic. Classes created from the factory below auto-populate as they should.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def create_child(name): class Child(Base): __tablename__ = name.lower() id = Column(Serial, ForeignKey(Parent.id), primary_key=True) parent = relationship(Parent) Child.__name__ = name return Child"><pre class="notranslate"><code class="notranslate">def create_child(name): class Child(Base): __tablename__ = name.lower() id = Column(Serial, ForeignKey(Parent.id), primary_key=True) parent = relationship(Parent) Child.__name__ = name return Child </code></pre></div>
<h3 dir="auto">Describe the bug</h3> <p dir="auto">I try to build the documentation into <code class="notranslate">epub</code> format to be able to read the docs on my ebook reader, as I couldn't find the pre-built <code class="notranslate">epub</code> anywhere on the <a href="https://www.sqlalchemy.org/" rel="nofollow">https://www.sqlalchemy.org/</a>.</p> <p dir="auto">Unfortunately, this fails with the error.</p> <p dir="auto">I tried <code class="notranslate">make html</code> to see if that's a general issue or only an issue with <code class="notranslate">epub</code>, and the <code class="notranslate">make html</code> works successfully.</p> <h3 dir="auto">To Reproduce</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ git clone [email protected]:sqlalchemy/sqlalchemy.git $ cd sqlalchemy/doc/build/ $ git checkout rel_1_4_31 $ python3.10 -m venv venv $ . venv/bin/activate $ python --version Python 3.10.0 $ pip install -r requirements.txt $ pip install sphinx $ pip freeze alabaster==0.7.12 Babel==2.9.1 certifi==2021.10.8 changelog==0.5.8 charset-normalizer==2.0.12 docutils==0.17.1 idna==3.3 imagesize==1.3.0 Jinja2==3.0.3 libsass==0.21.0 Mako==1.1.6 MarkupSafe==2.1.0 packaging==21.3 Pygments==2.11.2 pyparsing==3.0.7 pytz==2021.3 requests==2.27.1 six==1.16.0 snowballstemmer==2.2.0 Sphinx==4.4.0 sphinx-paramlinks @ git+https://github.com/sqlalchemyorg/sphinx-paramlinks.git@acedb03149e3f87ff599174b033754c2f58f1c95 sphinxcontrib-applehelp==1.0.2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.0 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 urllib3==1.26.8 zzzeeksphinx @ git+https://github.com/sqlalchemyorg/zzzeeksphinx.git@715c91f45c7b46e7c39528cae964f0d0891b421a $ make epub"><pre class="notranslate">$ <span class="pl-s1">git</span> <span class="pl-s1">clone</span> <span class="pl-s1">git</span>@<span class="pl-s1">github</span>.<span class="pl-s1">com</span>:<span class="pl-s1">sqlalchemy</span><span class="pl-c1">/</span><span class="pl-s1">sqlalchemy</span>.<span class="pl-s1">git</span> $ <span class="pl-s1">cd</span> <span class="pl-s1">sqlalchemy</span><span class="pl-c1">/</span><span class="pl-s1">doc</span><span class="pl-c1">/</span><span class="pl-s1">build</span><span class="pl-c1">/</span> $ <span class="pl-s1">git</span> <span class="pl-s1">checkout</span> <span class="pl-s1">rel_1_4_31</span> $ <span class="pl-s1">python3</span>.<span class="pl-c1">10</span> <span class="pl-c1">-</span><span class="pl-s1">m</span> <span class="pl-s1">venv</span> <span class="pl-s1">venv</span> $ . <span class="pl-s1">venv</span><span class="pl-c1">/</span><span class="pl-s1">bin</span><span class="pl-c1">/</span><span class="pl-s1">activate</span> $ <span class="pl-s1">python</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-s1">version</span> <span class="pl-v">Python</span> <span class="pl-c1">3.10</span><span class="pl-c1">.0</span> $ <span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-c1">-</span><span class="pl-s1">r</span> <span class="pl-s1">requirements</span>.<span class="pl-s1">txt</span> $ <span class="pl-s1">pip</span> <span class="pl-s1">install</span> <span class="pl-s1">sphinx</span> $ <span class="pl-s1">pip</span> <span class="pl-s1">freeze</span> <span class="pl-s1">alabaster</span><span class="pl-c1">==</span><span class="pl-c1">0.7</span>.<span class="pl-c1">12</span> <span class="pl-v">Babel</span><span class="pl-c1">==</span><span class="pl-c1">2.9</span>.<span class="pl-c1">1</span> <span class="pl-s1">certifi</span><span class="pl-c1">==</span><span class="pl-c1">2021.10</span>.<span class="pl-c1">8</span> <span class="pl-s1">changelog</span><span class="pl-c1">==</span><span class="pl-c1">0.5</span>.<span class="pl-c1">8</span> <span class="pl-s1">charset</span><span class="pl-c1">-</span><span class="pl-s1">normalizer</span><span class="pl-c1">==</span><span class="pl-c1">2.0</span>.<span class="pl-c1">12</span> <span class="pl-s1">docutils</span><span class="pl-c1">==</span><span class="pl-c1">0.17</span>.<span class="pl-c1">1</span> <span class="pl-s1">idna</span><span class="pl-c1">==</span><span class="pl-c1">3.3</span> <span class="pl-s1">imagesize</span><span class="pl-c1">==</span><span class="pl-c1">1.3</span>.<span class="pl-c1">0</span> <span class="pl-v">Jinja2</span><span class="pl-c1">==</span><span class="pl-c1">3.0</span>.<span class="pl-c1">3</span> <span class="pl-s1">libsass</span><span class="pl-c1">==</span><span class="pl-c1">0.21</span>.<span class="pl-c1">0</span> <span class="pl-v">Mako</span><span class="pl-c1">==</span><span class="pl-c1">1.1</span>.<span class="pl-c1">6</span> <span class="pl-v">MarkupSafe</span><span class="pl-c1">==</span><span class="pl-c1">2.1</span>.<span class="pl-c1">0</span> <span class="pl-s1">packaging</span><span class="pl-c1">==</span><span class="pl-c1">21.3</span> <span class="pl-v">Pygments</span><span class="pl-c1">==</span><span class="pl-c1">2.11</span>.<span class="pl-c1">2</span> <span class="pl-s1">pyparsing</span><span class="pl-c1">==</span><span class="pl-c1">3.0</span>.<span class="pl-c1">7</span> <span class="pl-s1">pytz</span><span class="pl-c1">==</span><span class="pl-c1">2021.3</span> <span class="pl-s1">requests</span><span class="pl-c1">==</span><span class="pl-c1">2.27</span>.<span class="pl-c1">1</span> <span class="pl-s1">six</span><span class="pl-c1">==</span><span class="pl-c1">1.16</span>.<span class="pl-c1">0</span> <span class="pl-s1">snowballstemmer</span><span class="pl-c1">==</span><span class="pl-c1">2.2</span>.<span class="pl-c1">0</span> <span class="pl-v">Sphinx</span><span class="pl-c1">==</span><span class="pl-c1">4.4</span>.<span class="pl-c1">0</span> <span class="pl-s1">sphinx</span><span class="pl-c1">-</span><span class="pl-s1">paramlinks</span> @ <span class="pl-s1">git</span><span class="pl-c1">+</span><span class="pl-s1">https</span>:<span class="pl-c1">//</span><span class="pl-s1">github</span>.<span class="pl-s1">com</span><span class="pl-c1">/</span><span class="pl-s1">sqlalchemyorg</span><span class="pl-c1">/</span><span class="pl-s1">sphinx</span><span class="pl-c1">-</span><span class="pl-s1">paramlinks</span>.<span class="pl-s1">git</span>@<span class="pl-s1">acedb03149e3f87ff599174b033754c2f58f1c95</span> <span class="pl-s1">sphinxcontrib</span><span class="pl-c1">-</span><span class="pl-s1">applehelp</span><span class="pl-c1">==</span><span class="pl-c1">1.0</span>.<span class="pl-c1">2</span> <span class="pl-s1">sphinxcontrib</span><span class="pl-c1">-</span><span class="pl-s1">devhelp</span><span class="pl-c1">==</span><span class="pl-c1">1.0</span>.<span class="pl-c1">2</span> <span class="pl-s1">sphinxcontrib</span><span class="pl-c1">-</span><span class="pl-s1">htmlhelp</span><span class="pl-c1">==</span><span class="pl-c1">2.0</span>.<span class="pl-c1">0</span> <span class="pl-s1">sphinxcontrib</span><span class="pl-c1">-</span><span class="pl-s1">jsmath</span><span class="pl-c1">==</span><span class="pl-c1">1.0</span>.<span class="pl-c1">1</span> <span class="pl-s1">sphinxcontrib</span><span class="pl-c1">-</span><span class="pl-s1">qthelp</span><span class="pl-c1">==</span><span class="pl-c1">1.0</span>.<span class="pl-c1">3</span> <span class="pl-s1">sphinxcontrib</span><span class="pl-c1">-</span><span class="pl-s1">serializinghtml</span><span class="pl-c1">==</span><span class="pl-c1">1.1</span>.<span class="pl-c1">5</span> <span class="pl-s1">urllib3</span><span class="pl-c1">==</span><span class="pl-c1">1.26</span>.<span class="pl-c1">8</span> <span class="pl-s1">zzzeeksphinx</span> @ <span class="pl-s1">git</span><span class="pl-c1">+</span><span class="pl-s1">https</span>:<span class="pl-c1">//</span><span class="pl-s1">github</span>.<span class="pl-s1">com</span><span class="pl-c1">/</span><span class="pl-s1">sqlalchemyorg</span><span class="pl-c1">/</span><span class="pl-s1">zzzeeksphinx</span>.<span class="pl-s1">git</span>@<span class="pl-c1">715</span><span class="pl-s1">c91f45c7b46e7c39528cae964f0d0891b421a</span> $ <span class="pl-s1">make</span> <span class="pl-s1">epub</span></pre></div> <h3 dir="auto">Error</h3> <p dir="auto">After <code class="notranslate">$ make epub</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sphinx-build -b epub -d output/doctrees -T -j auto . output/epub Running Sphinx v4.4.0 making output directory... done building [mo]: targets for 0 po files that are out of date building [epub]: targets for 168 source files that are out of date updating environment: [new config] 168 added, 0 changed, 0 removed reading sources... [100%] tutorial/engine .. venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module waiting for workers... reading changelog note files (version 1.3.25)...[100%] 6392.rst reading changelog note files (version 1.3.25)...[100%] 6392.rst /Users/dstasczak/tmp/sqlalchemy/doc/build/tutorial/tutorial_nav_include.rst:9: ERROR: Undefined substitution referenced: &quot;prev&quot;. /Users/dstasczak/tmp/sqlalchemy/doc/build/tutorial/tutorial_nav_include.rst:9: ERROR: Undefined substitution referenced: &quot;next&quot;. /Users/dstasczak/tmp/sqlalchemy/doc/build/tutorial/tutorial_nav_include.rst:13: ERROR: Undefined substitution referenced: &quot;next&quot;. /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/base.rst:3: ERROR: Error in &quot;currentmodule&quot; directive: maximum 1 argument(s) allowed, 3 supplied. .. currentmodule:: {{ module }} /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/class.rst:3: ERROR: Error in &quot;currentmodule&quot; directive: maximum 1 argument(s) allowed, 3 supplied. .. currentmodule:: {{ module }} WARNING: invalid signature for autoclass ('{{ objname }}') WARNING: don't know which module to import for autodocumenting '{{ objname }}' (try placing a &quot;module&quot; or &quot;currentmodule&quot; directive in the document, or giving an explicit module name) WARNING: invalid signature for automodule ('{{ fullname }}') WARNING: don't know which module to import for autodocumenting '{{ fullname }}' (try placing a &quot;module&quot; or &quot;currentmodule&quot; directive in the document, or giving an explicit module name) /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module.rst:53: ERROR: Unknown directive type &quot;autosummary&quot;. .. autosummary:: :toctree: :recursive: /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module.rst:56: WARNING: Explicit markup ends without a blank line; unexpected unindent. /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module.rst:58: WARNING: Definition list ends without a blank line; unexpected unindent. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/ext/asyncio/scoping.py:docstring of sqlalchemy.ext.asyncio.session.connection:12: WARNING: Inline strong start-string without end-string. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/ext/asyncio/scoping.py:docstring of sqlalchemy.ext.asyncio.session.stream:4: WARNING: Explicit markup ends without a blank line; unexpected unindent. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/ext/asyncio/session.py:docstring of sqlalchemy.ext.asyncio.session.AsyncSession.connection:8: WARNING: Inline strong start-string without end-string. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/orm/collections.py:docstring of sqlalchemy.orm.collections.collection:1: WARNING: duplicate object description of sqlalchemy.orm.collections.collection, other instance in orm/collections, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/doc/build/orm/contextual.rst:4: WARNING: Duplicate explicit target name: &quot;threading.local()&quot;. /Users/dstasczak/tmp/sqlalchemy/doc/build/orm/extensions/mypy.rst:4: WARNING: Duplicate explicit target name: &quot;mypy&quot;. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in orm/internals, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in core/foundation, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in core/metadata, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/doc/build/core/reflection.rst:142: ERROR: Unknown interpreted text role &quot;method&quot;. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in core/metadata, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in core/selectable, use :noindex: for one of them docstring of sqlalchemy.sql.expression.LABEL_STYLE_TABLENAME_PLUS_COL:6: WARNING: Inline literal start-string without end-string. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.CHAR:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.CHAR, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.NCHAR:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.NCHAR, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.NVARCHAR:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.NVARCHAR, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.TEXT:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.TEXT, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.VARCHAR:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.VARCHAR, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.BINARY:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.BINARY, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.BLOB:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.BLOB, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.BOOLEAN:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.BOOLEAN, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.DATE:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.DATE, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.VARBINARY:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.VARBINARY, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.REAL:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.REAL, other instance in core/type_basics, use :noindex: for one of them changelog/changelog_07.rst:5: WARNING: Explicit markup ends without a blank line; unexpected unindent. /Users/dstasczak/tmp/sqlalchemy/doc/build/changelog/changelog_11.rst:1: WARNING: Inline emphasis start-string without end-string. looking for now-outdated files... none found pickling environment... done checking consistency... /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/Jinja2-3.0.3.dist-info/LICENSE.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/MarkupSafe-2.1.0.dist-info/LICENSE.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/alabaster-0.7.12.dist-info/DESCRIPTION.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/imagesize-1.3.0.dist-info/LICENSE.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/base.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/class.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module.rst: WARNING: document isn't included in any toctree done preparing documents... done The name of the builder is: epubThe name of the builder is: epub Traceback (most recent call last): File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/mako/lookup.py&quot;, line 249, in get_template return self._check(uri, self._collection[uri]) KeyError: 'page.mako' During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/html/__init__.py&quot;, line 1055, in handle_page output = self.templates.render(templatename, ctx) File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/zzzeeksphinx/mako.py&quot;, line 102, in render return self.lookup.get_template(template).render_unicode(**context) File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/mako/lookup.py&quot;, line 262, in get_template raise exceptions.TopLevelLookupException( mako.exceptions.TopLevelLookupException: Cant locate template for uri 'page.mako' The above exception was the direct cause of the following exception: Traceback (most recent call last): File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/cmd/build.py&quot;, line 284, in build_main app.build(args.force_all, filenames) File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/application.py&quot;, line 337, in build self.builder.build_update() File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py&quot;, line 294, in build_update self.build(to_build, File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py&quot;, line 358, in build self.write(docnames, list(updated_docnames), method) File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py&quot;, line 529, in write self._write_parallel(sorted(docnames), File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py&quot;, line 556, in _write_parallel self.write_doc(firstname, doctree) File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/_epub_base.py&quot;, line 374, in write_doc super().write_doc(docname, doctree) File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/html/__init__.py&quot;, line 632, in write_doc self.handle_page(docname, ctx, event_arg=doctree) File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/_epub_base.py&quot;, line 467, in handle_page super().handle_page(pagename, addctx, templatename, outfilename, event_arg) File &quot;/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/html/__init__.py&quot;, line 1062, in handle_page raise ThemeError(__(&quot;An error happened in rendering the page %s.\nReason: %r&quot;) % sphinx.errors.ThemeError: An error happened in rendering the page changelog/changelog_01. Reason: TopLevelLookupException(&quot;Cant locate template for uri 'page.mako'&quot;) Theme error: An error happened in rendering the page changelog/changelog_01. Reason: TopLevelLookupException(&quot;Cant locate template for uri 'page.mako'&quot;) make: *** [epub] Error 2"><pre class="notranslate"><code class="notranslate">sphinx-build -b epub -d output/doctrees -T -j auto . output/epub Running Sphinx v4.4.0 making output directory... done building [mo]: targets for 0 po files that are out of date building [epub]: targets for 168 source files that are out of date updating environment: [new config] 168 added, 0 changed, 0 removed reading sources... [100%] tutorial/engine .. venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module waiting for workers... reading changelog note files (version 1.3.25)...[100%] 6392.rst reading changelog note files (version 1.3.25)...[100%] 6392.rst /Users/dstasczak/tmp/sqlalchemy/doc/build/tutorial/tutorial_nav_include.rst:9: ERROR: Undefined substitution referenced: "prev". /Users/dstasczak/tmp/sqlalchemy/doc/build/tutorial/tutorial_nav_include.rst:9: ERROR: Undefined substitution referenced: "next". /Users/dstasczak/tmp/sqlalchemy/doc/build/tutorial/tutorial_nav_include.rst:13: ERROR: Undefined substitution referenced: "next". /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/base.rst:3: ERROR: Error in "currentmodule" directive: maximum 1 argument(s) allowed, 3 supplied. .. currentmodule:: {{ module }} /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/class.rst:3: ERROR: Error in "currentmodule" directive: maximum 1 argument(s) allowed, 3 supplied. .. currentmodule:: {{ module }} WARNING: invalid signature for autoclass ('{{ objname }}') WARNING: don't know which module to import for autodocumenting '{{ objname }}' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name) WARNING: invalid signature for automodule ('{{ fullname }}') WARNING: don't know which module to import for autodocumenting '{{ fullname }}' (try placing a "module" or "currentmodule" directive in the document, or giving an explicit module name) /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module.rst:53: ERROR: Unknown directive type "autosummary". .. autosummary:: :toctree: :recursive: /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module.rst:56: WARNING: Explicit markup ends without a blank line; unexpected unindent. /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module.rst:58: WARNING: Definition list ends without a blank line; unexpected unindent. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/ext/asyncio/scoping.py:docstring of sqlalchemy.ext.asyncio.session.connection:12: WARNING: Inline strong start-string without end-string. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/ext/asyncio/scoping.py:docstring of sqlalchemy.ext.asyncio.session.stream:4: WARNING: Explicit markup ends without a blank line; unexpected unindent. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/ext/asyncio/session.py:docstring of sqlalchemy.ext.asyncio.session.AsyncSession.connection:8: WARNING: Inline strong start-string without end-string. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/orm/collections.py:docstring of sqlalchemy.orm.collections.collection:1: WARNING: duplicate object description of sqlalchemy.orm.collections.collection, other instance in orm/collections, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/doc/build/orm/contextual.rst:4: WARNING: Duplicate explicit target name: "threading.local()". /Users/dstasczak/tmp/sqlalchemy/doc/build/orm/extensions/mypy.rst:4: WARNING: Duplicate explicit target name: "mypy". /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in orm/internals, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in core/foundation, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in core/metadata, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/doc/build/core/reflection.rst:142: ERROR: Unknown interpreted text role "method". /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in core/metadata, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/util/langhelpers.py:docstring of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute:1: WARNING: duplicate object description of sqlalchemy.util.langhelpers.HasMemoized.memoized_attribute, other instance in core/selectable, use :noindex: for one of them docstring of sqlalchemy.sql.expression.LABEL_STYLE_TABLENAME_PLUS_COL:6: WARNING: Inline literal start-string without end-string. /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.CHAR:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.CHAR, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.NCHAR:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.NCHAR, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.NVARCHAR:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.NVARCHAR, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.TEXT:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.TEXT, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.VARCHAR:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.VARCHAR, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.BINARY:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.BINARY, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.BLOB:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.BLOB, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.BOOLEAN:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.BOOLEAN, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.DATE:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.DATE, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.VARBINARY:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.VARBINARY, other instance in core/type_basics, use :noindex: for one of them /Users/dstasczak/tmp/sqlalchemy/lib/sqlalchemy/sql/sqltypes.py:docstring of sqlalchemy.sql.sqltypes.REAL:1: WARNING: duplicate object description of sqlalchemy.sql.sqltypes.REAL, other instance in core/type_basics, use :noindex: for one of them changelog/changelog_07.rst:5: WARNING: Explicit markup ends without a blank line; unexpected unindent. /Users/dstasczak/tmp/sqlalchemy/doc/build/changelog/changelog_11.rst:1: WARNING: Inline emphasis start-string without end-string. looking for now-outdated files... none found pickling environment... done checking consistency... /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/Jinja2-3.0.3.dist-info/LICENSE.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/MarkupSafe-2.1.0.dist-info/LICENSE.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/alabaster-0.7.12.dist-info/DESCRIPTION.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/imagesize-1.3.0.dist-info/LICENSE.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/base.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/class.rst: WARNING: document isn't included in any toctree /Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/ext/autosummary/templates/autosummary/module.rst: WARNING: document isn't included in any toctree done preparing documents... done The name of the builder is: epubThe name of the builder is: epub Traceback (most recent call last): File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/mako/lookup.py", line 249, in get_template return self._check(uri, self._collection[uri]) KeyError: 'page.mako' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 1055, in handle_page output = self.templates.render(templatename, ctx) File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/zzzeeksphinx/mako.py", line 102, in render return self.lookup.get_template(template).render_unicode(**context) File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/mako/lookup.py", line 262, in get_template raise exceptions.TopLevelLookupException( mako.exceptions.TopLevelLookupException: Cant locate template for uri 'page.mako' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/cmd/build.py", line 284, in build_main app.build(args.force_all, filenames) File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/application.py", line 337, in build self.builder.build_update() File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 294, in build_update self.build(to_build, File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 358, in build self.write(docnames, list(updated_docnames), method) File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 529, in write self._write_parallel(sorted(docnames), File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 556, in _write_parallel self.write_doc(firstname, doctree) File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/_epub_base.py", line 374, in write_doc super().write_doc(docname, doctree) File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 632, in write_doc self.handle_page(docname, ctx, event_arg=doctree) File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/_epub_base.py", line 467, in handle_page super().handle_page(pagename, addctx, templatename, outfilename, event_arg) File "/Users/dstasczak/tmp/sqlalchemy/doc/build/venv/lib/python3.10/site-packages/sphinx/builders/html/__init__.py", line 1062, in handle_page raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") % sphinx.errors.ThemeError: An error happened in rendering the page changelog/changelog_01. Reason: TopLevelLookupException("Cant locate template for uri 'page.mako'") Theme error: An error happened in rendering the page changelog/changelog_01. Reason: TopLevelLookupException("Cant locate template for uri 'page.mako'") make: *** [epub] Error 2 </code></pre></div> <h3 dir="auto">Versions</h3> <ul dir="auto"> <li>OS: macOS Mojave Version 10.14.6 (18G9323)</li> <li>Python: 3.10.0</li> <li>SQLAlchemy: <code class="notranslate">rel_1_4_31</code></li> <li>Database: None</li> <li>DBAPI (eg: psycopg, cx_oracle, mysqlclient): None</li> </ul> <h3 dir="auto">Additional context</h3> <p dir="auto"><em>No response</em></p>
0
<p dir="auto">Hi,</p> <p dir="auto">First, thank you for your effort and hard work for creating this great react component!<br> I have an issue with the recently released beta-22 version.<br> I had an page displaying background image using the following style:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pageBackground: { background: { image: `url(${backgroundImg})`, repeat: 'no-repeat', size: 'cover', position: 'center' }, height: '100% !important' }"><pre class="notranslate"><code class="notranslate">pageBackground: { background: { image: `url(${backgroundImg})`, repeat: 'no-repeat', size: 'cover', position: 'center' }, height: '100% !important' } </code></pre></div> <p dir="auto">The background image was simply do not show anything (blank), and there are no error in the console as well. This was working fine in version beta-21. Tested using Chrome, Firefox, and Edge<br> Using react version 16.2.0</p> <p dir="auto">Here is the sandbox for reproducing the issue:<br> <a href="https://codesandbox.io/s/vyl4jqmyx0" rel="nofollow">https://codesandbox.io/s/vyl4jqmyx0</a></p> <p dir="auto">Thanks!</p>
<p dir="auto">Since JSS comes bundled in material-ui I am guessing that the problem is with your fork.</p> <p dir="auto">When I do</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const styles = theme =&gt; ({ main: { margin: [100, 50] } })"><pre class="notranslate"><code class="notranslate">const styles = theme =&gt; ({ main: { margin: [100, 50] } }) </code></pre></div> <p dir="auto">I get <code class="notranslate">margin: 100px, 50px;</code> Notice the comma between the values.</p> <p dir="auto">If id do just</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const styles = theme =&gt; ({ main: { margin: 100 } })"><pre class="notranslate"><code class="notranslate">const styles = theme =&gt; ({ main: { margin: 100 } }) </code></pre></div> <p dir="auto">it works fine</p>
1
<h3 dir="auto">Describe your issue.</h3> <p dir="auto"><code class="notranslate">scipy.spatial.KDTree()</code> throws Segmentation fault on given input.</p> <h3 dir="auto">Reproducing Code Example</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np from scipy.spatial import KDTree data = [ [456., 9.], [572., 10.], [555., 15.], [604., 16.], [547., 29.], [34., 41.], [490., 44.], [590., 46.], [566., 49.], [38., 53.], [519., 66.], [535., 66.], [512., 67.], [572., 70.], [104., 73.], [47., 74.], [559., 79.], [617., 79.], [136., 87.], [206., 89.], [545., 93.], [573., 93.], [510., 95.], [149., 99.], [96., 102.], [504., 105.], [119., 108.], [100., 110.], [526., 113.], [598., 113.], [493., 115.], [487., 122.], [473., 132.], [521., 137.], [477., 145.], [405., 149.], [451., 150.], [490., 153.], [420., 155.], [406., 157.], [386., 162.], [508., 162.], [377., 163.], [366., 166.], [357., 168.], [397., 172.], [371., 173.], [322., 174.], [424., 174.], [376., 175.], [405., 176.], [346., 177.], [296., 179.], [339., 180.], [353., 182.], [323., 183.], [382., 183.], [255., 186.], [290., 186.], [331., 186.], [276., 187.], [405., 187.], [302., 189.], [316., 189.], [336., 190.], [393., 191.], [230., 192.], [285., 193.], [214., 194.], [262., 194.], [302., 194.], [209., 195.], [293., 195.], [276., 197.], [197., 198.], [244., 198.], [251., 198.], [302., 199.], [404., 199.], [230., 200.], [182., 201.], [215., 202.], [168., 203.], [225., 204.], [253., 204.], [259., 205.], [152., 206.], [281., 206.], [235., 207.], [380., 208.], [391., 208.], [138., 209.], [200., 210.], [126., 211.], [186., 213.], [218., 213.], [229., 213.], [171., 215.], [210., 215.], [238., 215.], [157., 219.], [131., 220.], [181., 220.], [74., 221.], [141., 221.], [238., 221.], [404., 221.], [115., 222.], [285., 224.], [133., 226.], [152., 226.], [208., 227.], [37., 228.], [138., 228.], [143., 228.], [192., 230.], [81., 231.], [120., 233.], [177., 233.], [240., 234.], [216., 238.], [222., 238.], [361., 238.], [381., 238.], [85., 239.], [145., 240.], [288., 240.], [206., 241.], [350., 242.], [189., 244.], [365., 244.], [404., 245.], [113., 246.], [458., 247.], [172., 248.], [246., 248.], [314., 249.], [239., 250.], [92., 251.], [356., 251.], [403., 252.], [223., 253.], [452., 253.], [291., 254.], [137., 255.], [216., 255.], [335., 256.], [392., 256.], [269., 257.], [403., 257.], [465., 257.], [203., 258.], [318., 260.], [378., 260.], [184., 262.], [290., 263.], [99., 264.], [364., 264.], [166., 266.], [449., 266.], [348., 267.], [403., 267.], [279., 268.], [343., 268.], [239., 269.], [338., 269.], [143., 271.], [254., 272.], [324., 273.], [128., 274.], [218., 274.], [454., 274.], [462., 274.], [372., 277.], [199., 278.], [304., 278.], [108., 279.], [239., 282.], [404., 282.], [178., 283.], [283., 283.], [448., 285.], [159., 287.], [264., 287.], [330., 288.], [379., 288.], [256., 289.], [455., 289.], [460., 290.], [240., 293.], [355., 294.], [117., 295.], [285., 296.], [55., 298.], [215., 299.], [335., 299.], [117., 300.], [447., 300.], [139., 302.], [195., 303.], [458., 303.], [390., 304.], [119., 305.], [311., 305.], [111., 306.], [125., 306.], [176., 308.], [171., 309.], [445., 310.], [288., 311.], [149., 314.], [342., 315.], [450., 316.], [264., 317.], [456., 317.], [401., 319.], [192., 320.], [112., 323.], [240., 323.], [55., 324.], [101., 325.], [292., 326.], [376., 326.], [93., 327.], [371., 327.], [216., 329.], [349., 333.], [190., 335.], [324., 340.], [167., 341.], [82., 342.], [241., 343.], [296., 347.], [137., 348.], [75., 352.], [89., 353.], [187., 353.], [270., 354.], [263., 356.], [359., 356.], [82., 358.], [99., 359.], [241., 362.], [83., 363.], [216., 368.], [403., 368.], [130., 369.], [301., 369.], [302., 374.], [183., 377.], [368., 378.], [241., 387.], [335., 388.], [122., 393.], [307., 396.], [108., 397.], [179., 401.], [379., 403.], [272., 406.], [117., 408.], [381., 408.], [383., 413.], [242., 415.], [311., 416.], [140., 419.], [15., 421.], [126., 422.], [211., 423.], [313., 424.], [147., 425.], [314., 429.], [134., 433.], [315., 434.], [173., 435.], [316., 439.], [398., 441.], [142., 444.], [380., 447.], [243., 450.], [400., 455.], [349., 457.], [322., 466.], [373., 470.], [303., 471.], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan], [np.nan, np.nan]] KDTree(data)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">spatial</span> <span class="pl-k">import</span> <span class="pl-v">KDTree</span> <span class="pl-s1">data</span> <span class="pl-c1">=</span> [ [<span class="pl-c1">456.</span>, <span class="pl-c1">9.</span>], [<span class="pl-c1">572.</span>, <span class="pl-c1">10.</span>], [<span class="pl-c1">555.</span>, <span class="pl-c1">15.</span>], [<span class="pl-c1">604.</span>, <span class="pl-c1">16.</span>], [<span class="pl-c1">547.</span>, <span class="pl-c1">29.</span>], [<span class="pl-c1">34.</span>, <span class="pl-c1">41.</span>], [<span class="pl-c1">490.</span>, <span class="pl-c1">44.</span>], [<span class="pl-c1">590.</span>, <span class="pl-c1">46.</span>], [<span class="pl-c1">566.</span>, <span class="pl-c1">49.</span>], [<span class="pl-c1">38.</span>, <span class="pl-c1">53.</span>], [<span class="pl-c1">519.</span>, <span class="pl-c1">66.</span>], [<span class="pl-c1">535.</span>, <span class="pl-c1">66.</span>], [<span class="pl-c1">512.</span>, <span class="pl-c1">67.</span>], [<span class="pl-c1">572.</span>, <span class="pl-c1">70.</span>], [<span class="pl-c1">104.</span>, <span class="pl-c1">73.</span>], [<span class="pl-c1">47.</span>, <span class="pl-c1">74.</span>], [<span class="pl-c1">559.</span>, <span class="pl-c1">79.</span>], [<span class="pl-c1">617.</span>, <span class="pl-c1">79.</span>], [<span class="pl-c1">136.</span>, <span class="pl-c1">87.</span>], [<span class="pl-c1">206.</span>, <span class="pl-c1">89.</span>], [<span class="pl-c1">545.</span>, <span class="pl-c1">93.</span>], [<span class="pl-c1">573.</span>, <span class="pl-c1">93.</span>], [<span class="pl-c1">510.</span>, <span class="pl-c1">95.</span>], [<span class="pl-c1">149.</span>, <span class="pl-c1">99.</span>], [<span class="pl-c1">96.</span>, <span class="pl-c1">102.</span>], [<span class="pl-c1">504.</span>, <span class="pl-c1">105.</span>], [<span class="pl-c1">119.</span>, <span class="pl-c1">108.</span>], [<span class="pl-c1">100.</span>, <span class="pl-c1">110.</span>], [<span class="pl-c1">526.</span>, <span class="pl-c1">113.</span>], [<span class="pl-c1">598.</span>, <span class="pl-c1">113.</span>], [<span class="pl-c1">493.</span>, <span class="pl-c1">115.</span>], [<span class="pl-c1">487.</span>, <span class="pl-c1">122.</span>], [<span class="pl-c1">473.</span>, <span class="pl-c1">132.</span>], [<span class="pl-c1">521.</span>, <span class="pl-c1">137.</span>], [<span class="pl-c1">477.</span>, <span class="pl-c1">145.</span>], [<span class="pl-c1">405.</span>, <span class="pl-c1">149.</span>], [<span class="pl-c1">451.</span>, <span class="pl-c1">150.</span>], [<span class="pl-c1">490.</span>, <span class="pl-c1">153.</span>], [<span class="pl-c1">420.</span>, <span class="pl-c1">155.</span>], [<span class="pl-c1">406.</span>, <span class="pl-c1">157.</span>], [<span class="pl-c1">386.</span>, <span class="pl-c1">162.</span>], [<span class="pl-c1">508.</span>, <span class="pl-c1">162.</span>], [<span class="pl-c1">377.</span>, <span class="pl-c1">163.</span>], [<span class="pl-c1">366.</span>, <span class="pl-c1">166.</span>], [<span class="pl-c1">357.</span>, <span class="pl-c1">168.</span>], [<span class="pl-c1">397.</span>, <span class="pl-c1">172.</span>], [<span class="pl-c1">371.</span>, <span class="pl-c1">173.</span>], [<span class="pl-c1">322.</span>, <span class="pl-c1">174.</span>], [<span class="pl-c1">424.</span>, <span class="pl-c1">174.</span>], [<span class="pl-c1">376.</span>, <span class="pl-c1">175.</span>], [<span class="pl-c1">405.</span>, <span class="pl-c1">176.</span>], [<span class="pl-c1">346.</span>, <span class="pl-c1">177.</span>], [<span class="pl-c1">296.</span>, <span class="pl-c1">179.</span>], [<span class="pl-c1">339.</span>, <span class="pl-c1">180.</span>], [<span class="pl-c1">353.</span>, <span class="pl-c1">182.</span>], [<span class="pl-c1">323.</span>, <span class="pl-c1">183.</span>], [<span class="pl-c1">382.</span>, <span class="pl-c1">183.</span>], [<span class="pl-c1">255.</span>, <span class="pl-c1">186.</span>], [<span class="pl-c1">290.</span>, <span class="pl-c1">186.</span>], [<span class="pl-c1">331.</span>, <span class="pl-c1">186.</span>], [<span class="pl-c1">276.</span>, <span class="pl-c1">187.</span>], [<span class="pl-c1">405.</span>, <span class="pl-c1">187.</span>], [<span class="pl-c1">302.</span>, <span class="pl-c1">189.</span>], [<span class="pl-c1">316.</span>, <span class="pl-c1">189.</span>], [<span class="pl-c1">336.</span>, <span class="pl-c1">190.</span>], [<span class="pl-c1">393.</span>, <span class="pl-c1">191.</span>], [<span class="pl-c1">230.</span>, <span class="pl-c1">192.</span>], [<span class="pl-c1">285.</span>, <span class="pl-c1">193.</span>], [<span class="pl-c1">214.</span>, <span class="pl-c1">194.</span>], [<span class="pl-c1">262.</span>, <span class="pl-c1">194.</span>], [<span class="pl-c1">302.</span>, <span class="pl-c1">194.</span>], [<span class="pl-c1">209.</span>, <span class="pl-c1">195.</span>], [<span class="pl-c1">293.</span>, <span class="pl-c1">195.</span>], [<span class="pl-c1">276.</span>, <span class="pl-c1">197.</span>], [<span class="pl-c1">197.</span>, <span class="pl-c1">198.</span>], [<span class="pl-c1">244.</span>, <span class="pl-c1">198.</span>], [<span class="pl-c1">251.</span>, <span class="pl-c1">198.</span>], [<span class="pl-c1">302.</span>, <span class="pl-c1">199.</span>], [<span class="pl-c1">404.</span>, <span class="pl-c1">199.</span>], [<span class="pl-c1">230.</span>, <span class="pl-c1">200.</span>], [<span class="pl-c1">182.</span>, <span class="pl-c1">201.</span>], [<span class="pl-c1">215.</span>, <span class="pl-c1">202.</span>], [<span class="pl-c1">168.</span>, <span class="pl-c1">203.</span>], [<span class="pl-c1">225.</span>, <span class="pl-c1">204.</span>], [<span class="pl-c1">253.</span>, <span class="pl-c1">204.</span>], [<span class="pl-c1">259.</span>, <span class="pl-c1">205.</span>], [<span class="pl-c1">152.</span>, <span class="pl-c1">206.</span>], [<span class="pl-c1">281.</span>, <span class="pl-c1">206.</span>], [<span class="pl-c1">235.</span>, <span class="pl-c1">207.</span>], [<span class="pl-c1">380.</span>, <span class="pl-c1">208.</span>], [<span class="pl-c1">391.</span>, <span class="pl-c1">208.</span>], [<span class="pl-c1">138.</span>, <span class="pl-c1">209.</span>], [<span class="pl-c1">200.</span>, <span class="pl-c1">210.</span>], [<span class="pl-c1">126.</span>, <span class="pl-c1">211.</span>], [<span class="pl-c1">186.</span>, <span class="pl-c1">213.</span>], [<span class="pl-c1">218.</span>, <span class="pl-c1">213.</span>], [<span class="pl-c1">229.</span>, <span class="pl-c1">213.</span>], [<span class="pl-c1">171.</span>, <span class="pl-c1">215.</span>], [<span class="pl-c1">210.</span>, <span class="pl-c1">215.</span>], [<span class="pl-c1">238.</span>, <span class="pl-c1">215.</span>], [<span class="pl-c1">157.</span>, <span class="pl-c1">219.</span>], [<span class="pl-c1">131.</span>, <span class="pl-c1">220.</span>], [<span class="pl-c1">181.</span>, <span class="pl-c1">220.</span>], [<span class="pl-c1">74.</span>, <span class="pl-c1">221.</span>], [<span class="pl-c1">141.</span>, <span class="pl-c1">221.</span>], [<span class="pl-c1">238.</span>, <span class="pl-c1">221.</span>], [<span class="pl-c1">404.</span>, <span class="pl-c1">221.</span>], [<span class="pl-c1">115.</span>, <span class="pl-c1">222.</span>], [<span class="pl-c1">285.</span>, <span class="pl-c1">224.</span>], [<span class="pl-c1">133.</span>, <span class="pl-c1">226.</span>], [<span class="pl-c1">152.</span>, <span class="pl-c1">226.</span>], [<span class="pl-c1">208.</span>, <span class="pl-c1">227.</span>], [<span class="pl-c1">37.</span>, <span class="pl-c1">228.</span>], [<span class="pl-c1">138.</span>, <span class="pl-c1">228.</span>], [<span class="pl-c1">143.</span>, <span class="pl-c1">228.</span>], [<span class="pl-c1">192.</span>, <span class="pl-c1">230.</span>], [<span class="pl-c1">81.</span>, <span class="pl-c1">231.</span>], [<span class="pl-c1">120.</span>, <span class="pl-c1">233.</span>], [<span class="pl-c1">177.</span>, <span class="pl-c1">233.</span>], [<span class="pl-c1">240.</span>, <span class="pl-c1">234.</span>], [<span class="pl-c1">216.</span>, <span class="pl-c1">238.</span>], [<span class="pl-c1">222.</span>, <span class="pl-c1">238.</span>], [<span class="pl-c1">361.</span>, <span class="pl-c1">238.</span>], [<span class="pl-c1">381.</span>, <span class="pl-c1">238.</span>], [<span class="pl-c1">85.</span>, <span class="pl-c1">239.</span>], [<span class="pl-c1">145.</span>, <span class="pl-c1">240.</span>], [<span class="pl-c1">288.</span>, <span class="pl-c1">240.</span>], [<span class="pl-c1">206.</span>, <span class="pl-c1">241.</span>], [<span class="pl-c1">350.</span>, <span class="pl-c1">242.</span>], [<span class="pl-c1">189.</span>, <span class="pl-c1">244.</span>], [<span class="pl-c1">365.</span>, <span class="pl-c1">244.</span>], [<span class="pl-c1">404.</span>, <span class="pl-c1">245.</span>], [<span class="pl-c1">113.</span>, <span class="pl-c1">246.</span>], [<span class="pl-c1">458.</span>, <span class="pl-c1">247.</span>], [<span class="pl-c1">172.</span>, <span class="pl-c1">248.</span>], [<span class="pl-c1">246.</span>, <span class="pl-c1">248.</span>], [<span class="pl-c1">314.</span>, <span class="pl-c1">249.</span>], [<span class="pl-c1">239.</span>, <span class="pl-c1">250.</span>], [<span class="pl-c1">92.</span>, <span class="pl-c1">251.</span>], [<span class="pl-c1">356.</span>, <span class="pl-c1">251.</span>], [<span class="pl-c1">403.</span>, <span class="pl-c1">252.</span>], [<span class="pl-c1">223.</span>, <span class="pl-c1">253.</span>], [<span class="pl-c1">452.</span>, <span class="pl-c1">253.</span>], [<span class="pl-c1">291.</span>, <span class="pl-c1">254.</span>], [<span class="pl-c1">137.</span>, <span class="pl-c1">255.</span>], [<span class="pl-c1">216.</span>, <span class="pl-c1">255.</span>], [<span class="pl-c1">335.</span>, <span class="pl-c1">256.</span>], [<span class="pl-c1">392.</span>, <span class="pl-c1">256.</span>], [<span class="pl-c1">269.</span>, <span class="pl-c1">257.</span>], [<span class="pl-c1">403.</span>, <span class="pl-c1">257.</span>], [<span class="pl-c1">465.</span>, <span class="pl-c1">257.</span>], [<span class="pl-c1">203.</span>, <span class="pl-c1">258.</span>], [<span class="pl-c1">318.</span>, <span class="pl-c1">260.</span>], [<span class="pl-c1">378.</span>, <span class="pl-c1">260.</span>], [<span class="pl-c1">184.</span>, <span class="pl-c1">262.</span>], [<span class="pl-c1">290.</span>, <span class="pl-c1">263.</span>], [<span class="pl-c1">99.</span>, <span class="pl-c1">264.</span>], [<span class="pl-c1">364.</span>, <span class="pl-c1">264.</span>], [<span class="pl-c1">166.</span>, <span class="pl-c1">266.</span>], [<span class="pl-c1">449.</span>, <span class="pl-c1">266.</span>], [<span class="pl-c1">348.</span>, <span class="pl-c1">267.</span>], [<span class="pl-c1">403.</span>, <span class="pl-c1">267.</span>], [<span class="pl-c1">279.</span>, <span class="pl-c1">268.</span>], [<span class="pl-c1">343.</span>, <span class="pl-c1">268.</span>], [<span class="pl-c1">239.</span>, <span class="pl-c1">269.</span>], [<span class="pl-c1">338.</span>, <span class="pl-c1">269.</span>], [<span class="pl-c1">143.</span>, <span class="pl-c1">271.</span>], [<span class="pl-c1">254.</span>, <span class="pl-c1">272.</span>], [<span class="pl-c1">324.</span>, <span class="pl-c1">273.</span>], [<span class="pl-c1">128.</span>, <span class="pl-c1">274.</span>], [<span class="pl-c1">218.</span>, <span class="pl-c1">274.</span>], [<span class="pl-c1">454.</span>, <span class="pl-c1">274.</span>], [<span class="pl-c1">462.</span>, <span class="pl-c1">274.</span>], [<span class="pl-c1">372.</span>, <span class="pl-c1">277.</span>], [<span class="pl-c1">199.</span>, <span class="pl-c1">278.</span>], [<span class="pl-c1">304.</span>, <span class="pl-c1">278.</span>], [<span class="pl-c1">108.</span>, <span class="pl-c1">279.</span>], [<span class="pl-c1">239.</span>, <span class="pl-c1">282.</span>], [<span class="pl-c1">404.</span>, <span class="pl-c1">282.</span>], [<span class="pl-c1">178.</span>, <span class="pl-c1">283.</span>], [<span class="pl-c1">283.</span>, <span class="pl-c1">283.</span>], [<span class="pl-c1">448.</span>, <span class="pl-c1">285.</span>], [<span class="pl-c1">159.</span>, <span class="pl-c1">287.</span>], [<span class="pl-c1">264.</span>, <span class="pl-c1">287.</span>], [<span class="pl-c1">330.</span>, <span class="pl-c1">288.</span>], [<span class="pl-c1">379.</span>, <span class="pl-c1">288.</span>], [<span class="pl-c1">256.</span>, <span class="pl-c1">289.</span>], [<span class="pl-c1">455.</span>, <span class="pl-c1">289.</span>], [<span class="pl-c1">460.</span>, <span class="pl-c1">290.</span>], [<span class="pl-c1">240.</span>, <span class="pl-c1">293.</span>], [<span class="pl-c1">355.</span>, <span class="pl-c1">294.</span>], [<span class="pl-c1">117.</span>, <span class="pl-c1">295.</span>], [<span class="pl-c1">285.</span>, <span class="pl-c1">296.</span>], [<span class="pl-c1">55.</span>, <span class="pl-c1">298.</span>], [<span class="pl-c1">215.</span>, <span class="pl-c1">299.</span>], [<span class="pl-c1">335.</span>, <span class="pl-c1">299.</span>], [<span class="pl-c1">117.</span>, <span class="pl-c1">300.</span>], [<span class="pl-c1">447.</span>, <span class="pl-c1">300.</span>], [<span class="pl-c1">139.</span>, <span class="pl-c1">302.</span>], [<span class="pl-c1">195.</span>, <span class="pl-c1">303.</span>], [<span class="pl-c1">458.</span>, <span class="pl-c1">303.</span>], [<span class="pl-c1">390.</span>, <span class="pl-c1">304.</span>], [<span class="pl-c1">119.</span>, <span class="pl-c1">305.</span>], [<span class="pl-c1">311.</span>, <span class="pl-c1">305.</span>], [<span class="pl-c1">111.</span>, <span class="pl-c1">306.</span>], [<span class="pl-c1">125.</span>, <span class="pl-c1">306.</span>], [<span class="pl-c1">176.</span>, <span class="pl-c1">308.</span>], [<span class="pl-c1">171.</span>, <span class="pl-c1">309.</span>], [<span class="pl-c1">445.</span>, <span class="pl-c1">310.</span>], [<span class="pl-c1">288.</span>, <span class="pl-c1">311.</span>], [<span class="pl-c1">149.</span>, <span class="pl-c1">314.</span>], [<span class="pl-c1">342.</span>, <span class="pl-c1">315.</span>], [<span class="pl-c1">450.</span>, <span class="pl-c1">316.</span>], [<span class="pl-c1">264.</span>, <span class="pl-c1">317.</span>], [<span class="pl-c1">456.</span>, <span class="pl-c1">317.</span>], [<span class="pl-c1">401.</span>, <span class="pl-c1">319.</span>], [<span class="pl-c1">192.</span>, <span class="pl-c1">320.</span>], [<span class="pl-c1">112.</span>, <span class="pl-c1">323.</span>], [<span class="pl-c1">240.</span>, <span class="pl-c1">323.</span>], [<span class="pl-c1">55.</span>, <span class="pl-c1">324.</span>], [<span class="pl-c1">101.</span>, <span class="pl-c1">325.</span>], [<span class="pl-c1">292.</span>, <span class="pl-c1">326.</span>], [<span class="pl-c1">376.</span>, <span class="pl-c1">326.</span>], [<span class="pl-c1">93.</span>, <span class="pl-c1">327.</span>], [<span class="pl-c1">371.</span>, <span class="pl-c1">327.</span>], [<span class="pl-c1">216.</span>, <span class="pl-c1">329.</span>], [<span class="pl-c1">349.</span>, <span class="pl-c1">333.</span>], [<span class="pl-c1">190.</span>, <span class="pl-c1">335.</span>], [<span class="pl-c1">324.</span>, <span class="pl-c1">340.</span>], [<span class="pl-c1">167.</span>, <span class="pl-c1">341.</span>], [<span class="pl-c1">82.</span>, <span class="pl-c1">342.</span>], [<span class="pl-c1">241.</span>, <span class="pl-c1">343.</span>], [<span class="pl-c1">296.</span>, <span class="pl-c1">347.</span>], [<span class="pl-c1">137.</span>, <span class="pl-c1">348.</span>], [<span class="pl-c1">75.</span>, <span class="pl-c1">352.</span>], [<span class="pl-c1">89.</span>, <span class="pl-c1">353.</span>], [<span class="pl-c1">187.</span>, <span class="pl-c1">353.</span>], [<span class="pl-c1">270.</span>, <span class="pl-c1">354.</span>], [<span class="pl-c1">263.</span>, <span class="pl-c1">356.</span>], [<span class="pl-c1">359.</span>, <span class="pl-c1">356.</span>], [<span class="pl-c1">82.</span>, <span class="pl-c1">358.</span>], [<span class="pl-c1">99.</span>, <span class="pl-c1">359.</span>], [<span class="pl-c1">241.</span>, <span class="pl-c1">362.</span>], [<span class="pl-c1">83.</span>, <span class="pl-c1">363.</span>], [<span class="pl-c1">216.</span>, <span class="pl-c1">368.</span>], [<span class="pl-c1">403.</span>, <span class="pl-c1">368.</span>], [<span class="pl-c1">130.</span>, <span class="pl-c1">369.</span>], [<span class="pl-c1">301.</span>, <span class="pl-c1">369.</span>], [<span class="pl-c1">302.</span>, <span class="pl-c1">374.</span>], [<span class="pl-c1">183.</span>, <span class="pl-c1">377.</span>], [<span class="pl-c1">368.</span>, <span class="pl-c1">378.</span>], [<span class="pl-c1">241.</span>, <span class="pl-c1">387.</span>], [<span class="pl-c1">335.</span>, <span class="pl-c1">388.</span>], [<span class="pl-c1">122.</span>, <span class="pl-c1">393.</span>], [<span class="pl-c1">307.</span>, <span class="pl-c1">396.</span>], [<span class="pl-c1">108.</span>, <span class="pl-c1">397.</span>], [<span class="pl-c1">179.</span>, <span class="pl-c1">401.</span>], [<span class="pl-c1">379.</span>, <span class="pl-c1">403.</span>], [<span class="pl-c1">272.</span>, <span class="pl-c1">406.</span>], [<span class="pl-c1">117.</span>, <span class="pl-c1">408.</span>], [<span class="pl-c1">381.</span>, <span class="pl-c1">408.</span>], [<span class="pl-c1">383.</span>, <span class="pl-c1">413.</span>], [<span class="pl-c1">242.</span>, <span class="pl-c1">415.</span>], [<span class="pl-c1">311.</span>, <span class="pl-c1">416.</span>], [<span class="pl-c1">140.</span>, <span class="pl-c1">419.</span>], [<span class="pl-c1">15.</span>, <span class="pl-c1">421.</span>], [<span class="pl-c1">126.</span>, <span class="pl-c1">422.</span>], [<span class="pl-c1">211.</span>, <span class="pl-c1">423.</span>], [<span class="pl-c1">313.</span>, <span class="pl-c1">424.</span>], [<span class="pl-c1">147.</span>, <span class="pl-c1">425.</span>], [<span class="pl-c1">314.</span>, <span class="pl-c1">429.</span>], [<span class="pl-c1">134.</span>, <span class="pl-c1">433.</span>], [<span class="pl-c1">315.</span>, <span class="pl-c1">434.</span>], [<span class="pl-c1">173.</span>, <span class="pl-c1">435.</span>], [<span class="pl-c1">316.</span>, <span class="pl-c1">439.</span>], [<span class="pl-c1">398.</span>, <span class="pl-c1">441.</span>], [<span class="pl-c1">142.</span>, <span class="pl-c1">444.</span>], [<span class="pl-c1">380.</span>, <span class="pl-c1">447.</span>], [<span class="pl-c1">243.</span>, <span class="pl-c1">450.</span>], [<span class="pl-c1">400.</span>, <span class="pl-c1">455.</span>], [<span class="pl-c1">349.</span>, <span class="pl-c1">457.</span>], [<span class="pl-c1">322.</span>, <span class="pl-c1">466.</span>], [<span class="pl-c1">373.</span>, <span class="pl-c1">470.</span>], [<span class="pl-c1">303.</span>, <span class="pl-c1">471.</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], [<span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>]] <span class="pl-v">KDTree</span>(<span class="pl-s1">data</span>)</pre></div> <h3 dir="auto">Error message</h3> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Thread 1 &quot;python&quot; received signal SIGSEGV, Segmentation fault. 0x00007fffb862de57 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/slamsup/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so --------GDB backtrace-------- #0 0x00007fffb862de57 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #1 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #2 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #3 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #4 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #5 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #6 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #7 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #8 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #9 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #10 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #11 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #12 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #13 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #14 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so ... #15870 0x00007fffb862e550 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #15871 0x00007fffb862e550 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #15872 0x00007fffb862e550 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #15873 0x00007fffb862e550 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #15874 0x00007fffb862effe in build_ckdtree(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #15875 0x00007fffb8619d9a in __pyx_pf_5scipy_7spatial_7ckdtree_7cKDTree_2__init__(__pyx_obj_5scipy_7spatial_7ckdtree_cKDTree*, _object*, long, _object*, _object*, _object*, _object*) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #15876 0x00007fffb861d372 in __pyx_pw_5scipy_7spatial_7ckdtree_7cKDTree_3__init__(_object*, _object*, _object*) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so #15877 0x00005555556e6414 in wrap_init (kwds=0x0, wrapped=&lt;optimized out&gt;, args=&lt;optimized out&gt;, self=0x7fffb6d34040) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/typeobject.c:6189 #15878 wrapperdescr_raw_call.isra.8 (kwds=0x0, args=&lt;optimized out&gt;, self=0x7fffb6d34040) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/descrobject.c:510 #15879 wrapper_call (wp=&lt;optimized out&gt;, args=&lt;optimized out&gt;, kwds=0x0) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/descrobject.c:1384 #15880 0x000055555568fcaf in _PyObject_MakeTpCall (tstate=0x55555591eae0, callable=0x7ffff73f3640, args=&lt;optimized out&gt;, nargs=&lt;optimized out&gt;, keywords=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:191 #15881 0x000055555572dd89 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=&lt;optimized out&gt;, args=0x7fffb7184bf8, callable=&lt;optimized out&gt;, tstate=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Include/cpython/abstract.h:116 #15882 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1649141344976/work/Include/cpython/abstract.h:127 #15883 call_function (kwnames=0x0, oparg=&lt;optimized out&gt;, pp_stack=&lt;synthetic pointer&gt;, tstate=0x55555591eae0) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:5077 #15884 _PyEval_EvalFrameDefault (tstate=&lt;optimized out&gt;, f=0x7fffb7184a40, throwflag=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:3489 #15885 0x00005555556ea663 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1649141344976/work/Include/internal/pycore_ceval.h:40 #15886 _PyEval_EvalCode (tstate=&lt;optimized out&gt;, _co=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, locals=&lt;optimized out&gt;, args=&lt;optimized out&gt;, argcount=&lt;optimized out&gt;, kwnames=0x0, kwargs=0x7fffffffd900, kwcount=&lt;optimized out&gt;, kwstep=1, defs=0x7fffb86a50a8, defcount=5, kwdefs=0x0, closure=0x7fffb86a98e0, name=&lt;optimized out&gt;, qualname=0x7fffb86a4130) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:4329 #15887 0x00005555556eb354 in _PyFunction_Vectorcall (func=&lt;optimized out&gt;, stack=0x7fffffffd8f0, nargsf=&lt;optimized out&gt;, kwnames=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:396 #15888 0x00005555556d5eca in _PyObject_FastCallDictTstate (tstate=0x55555591eae0, callable=0x7fffb7daea60, args=&lt;optimized out&gt;, nargsf=&lt;optimized out&gt;, kwargs=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:118 #15889 0x00005555556dfb79 in _PyObject_Call_Prepend (kwargs=0x0, args=0x7ffff75f8a60, obj=&lt;optimized out&gt;, callable=0x7fffb7daea60, tstate=0x55555591eae0) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:489 #15890 slot_tp_init (self=&lt;optimized out&gt;, args=0x7ffff75f8a60, kwds=0x0) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/typeobject.c:6969 #15891 0x000055555568fd5f in type_call (kwds=0x0, args=0x7ffff75f8a60, type=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/typeobject.c:1026 #15892 _PyObject_MakeTpCall (tstate=0x55555591eae0, callable=0x555555e64660, args=&lt;optimized out&gt;, nargs=&lt;optimized out&gt;, keywords=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:191 #15893 0x000055555572dd89 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=&lt;optimized out&gt;, args=0x555555a23238, callable=&lt;optimized out&gt;, tstate=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Include/cpython/abstract.h:116 #15894 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1649141344976/work/Include/cpython/abstract.h:127 #15895 call_function (kwnames=0x0, oparg=&lt;optimized out&gt;, pp_stack=&lt;synthetic pointer&gt;, tstate=0x55555591eae0) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:5077 #15896 _PyEval_EvalFrameDefault (tstate=&lt;optimized out&gt;, f=0x555555a230c0, throwflag=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:3489 #15897 0x00005555556ea663 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1649141344976/work/Include/internal/pycore_ceval.h:40 #15898 _PyEval_EvalCode (tstate=&lt;optimized out&gt;, _co=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, locals=&lt;optimized out&gt;, args=&lt;optimized out&gt;, argcount=&lt;optimized out&gt;, kwnames=0x0, kwargs=0x0, kwcount=&lt;optimized out&gt;, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=&lt;optimized out&gt;, qualname=0x0) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:4329 #15899 0x000055555579745c in _PyEval_EvalCodeWithName (qualname=0x0, name=0x0, closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwstep=2, kwcount=0, kwargs=&lt;optimized out&gt;, kwnames=&lt;optimized out&gt;, argcount=&lt;optimized out&gt;, args=&lt;optimized out&gt;, locals=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, _co=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:4361 #15900 PyEval_EvalCodeEx (_co=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, locals=&lt;optimized out&gt;, args=&lt;optimized out&gt;, argcount=&lt;optimized out&gt;, kws=&lt;optimized out&gt;, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:4377 #15901 0x00005555556eb45b in PyEval_EvalCode (co=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, locals=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:828 #15902 0x000055555579750b in run_eval_code_obj (tstate=0x55555591eae0, co=0x7ffff7607870, globals=0x7ffff75fae80, locals=0x7ffff75fae80) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:1221 #15903 0x00005555557c7f75 in run_mod (mod=&lt;optimized out&gt;, filename=&lt;optimized out&gt;, globals=0x7ffff75fae80, locals=0x7ffff75fae80, flags=&lt;optimized out&gt;, arena=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:1242 #15904 0x0000555555668987 in pyrun_file (fp=0x55555591e700, filename=0x7ffff7532330, start=&lt;optimized out&gt;, globals=0x7ffff75fae80, locals=0x7ffff75fae80, closeit=1, flags=0x7fffffffdd68) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:1140 #15905 0x00005555557cda2f in pyrun_simple_file (flags=0x7fffffffdd68, closeit=1, filename=0x7ffff7532330, fp=0x55555591e700) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:450 #15906 PyRun_SimpleFileExFlags (fp=0x55555591e700, filename=&lt;optimized out&gt;, closeit=1, flags=0x7fffffffdd68) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:483 #15907 0x00005555557ce10b in pymain_run_file (cf=0x7fffffffdd68, config=0x55555591f650) at /opt/conda/conda-bld/python-split_1649141344976/work/Modules/main.c:379 #15908 pymain_run_python (exitcode=0x7fffffffdd60) at /opt/conda/conda-bld/python-split_1649141344976/work/Modules/main.c:604 #15909 Py_RunMain () at /opt/conda/conda-bld/python-split_1649141344976/work/Modules/main.c:683 #15910 0x00005555557ce309 in Py_BytesMain (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Modules/main.c:1129 #15911 0x00007ffff7c62083 in __libc_start_main (main=0x5555556754a0 &lt;main&gt;, argc=2, argv=0x7fffffffdf68, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7fffffffdf58) at ../csu/libc-start.c:308 #15912 0x00005555557550a0 in _start ()"><pre class="notranslate">Thread 1 <span class="pl-s"><span class="pl-pds">"</span>python<span class="pl-pds">"</span></span> received signal SIGSEGV, Segmentation fault. 0x00007fffb862de57 <span class="pl-k">in</span> build(ckdtree<span class="pl-k">*</span>, long, long, double<span class="pl-k">*</span>, double<span class="pl-k">*</span>, int, <span class="pl-en">int)</span> () from /home/dasongg/miniconda3/envs/slamsup/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so --------GDB backtrace-------- <span class="pl-c"><span class="pl-c">#</span>0 0x00007fffb862de57 in build(ckdtree*, long, long, double*, double*, int, int) ()</span> from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so <span class="pl-c"><span class="pl-c">#</span>1 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) ()</span> from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so <span class="pl-c"><span class="pl-c">#</span>2 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) ()</span> from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so <span class="pl-c"><span class="pl-c">#</span>3 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) ()</span> from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so <span class="pl-c"><span class="pl-c">#</span>4 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) ()</span> from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so <span class="pl-c"><span class="pl-c">#</span>5 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) ()</span> from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so <span class="pl-c"><span class="pl-c">#</span>6 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) ()</span> from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so <span class="pl-c"><span class="pl-c">#</span>7 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) ()</span> from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so <span class="pl-c"><span class="pl-c">#</span>8 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) ()</span> from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so <span class="pl-c"><span class="pl-c">#</span>9 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>10 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>11 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>12 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>13 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>14 0x00007fffb862e9ef in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> ... <span class="pl-c"><span class="pl-c">#</span>15870 0x00007fffb862e550 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>15871 0x00007fffb862e550 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>15872 0x00007fffb862e550 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>15873 0x00007fffb862e550 in build(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>15874 0x00007fffb862effe in build_ckdtree(ckdtree*, long, long, double*, double*, int, int) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>15875 0x00007fffb8619d9a in __pyx_pf_5scipy_7spatial_7ckdtree_7cKDTree_2__init__(__pyx_obj_5scipy_7spatial_7ckdtree_cKDTree*, _object*, long, _object*, _object*, _object*, _object*) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>15876 0x00007fffb861d372 in __pyx_pw_5scipy_7spatial_7ckdtree_7cKDTree_3__init__(_object*, _object*, _object*) () from /home/dasongg/miniconda3/envs/py39/lib/python3.9/site-packages/scipy/spatial/ckdtree.cpython-39-x86_64-linux-gnu.so</span> <span class="pl-c"><span class="pl-c">#</span>15877 0x00005555556e6414 in wrap_init (kwds=0x0, wrapped=&lt;optimized out&gt;, args=&lt;optimized out&gt;, self=0x7fffb6d34040) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/typeobject.c:6189</span> <span class="pl-c"><span class="pl-c">#</span>15878 wrapperdescr_raw_call.isra.8 (kwds=0x0, args=&lt;optimized out&gt;, self=0x7fffb6d34040) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/descrobject.c:510</span> <span class="pl-c"><span class="pl-c">#</span>15879 wrapper_call (wp=&lt;optimized out&gt;, args=&lt;optimized out&gt;, kwds=0x0) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/descrobject.c:1384</span> <span class="pl-c"><span class="pl-c">#</span>15880 0x000055555568fcaf in _PyObject_MakeTpCall (tstate=0x55555591eae0, callable=0x7ffff73f3640, args=&lt;optimized out&gt;, nargs=&lt;optimized out&gt;, keywords=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:191</span> <span class="pl-c"><span class="pl-c">#</span>15881 0x000055555572dd89 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=&lt;optimized out&gt;, args=0x7fffb7184bf8, callable=&lt;optimized out&gt;, tstate=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Include/cpython/abstract.h:116</span> <span class="pl-c"><span class="pl-c">#</span>15882 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1649141344976/work/Include/cpython/abstract.h:127</span> <span class="pl-c"><span class="pl-c">#</span>15883 call_function (kwnames=0x0, oparg=&lt;optimized out&gt;, pp_stack=&lt;synthetic pointer&gt;, tstate=0x55555591eae0) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:5077</span> <span class="pl-c"><span class="pl-c">#</span>15884 _PyEval_EvalFrameDefault (tstate=&lt;optimized out&gt;, f=0x7fffb7184a40, throwflag=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:3489</span> <span class="pl-c"><span class="pl-c">#</span>15885 0x00005555556ea663 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1649141344976/work/Include/internal/pycore_ceval.h:40</span> <span class="pl-c"><span class="pl-c">#</span>15886 _PyEval_EvalCode (tstate=&lt;optimized out&gt;, _co=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, locals=&lt;optimized out&gt;, args=&lt;optimized out&gt;, argcount=&lt;optimized out&gt;, kwnames=0x0, kwargs=0x7fffffffd900, kwcount=&lt;optimized out&gt;, kwstep=1, defs=0x7fffb86a50a8, defcount=5, kwdefs=0x0, closure=0x7fffb86a98e0, name=&lt;optimized out&gt;, qualname=0x7fffb86a4130) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:4329</span> <span class="pl-c"><span class="pl-c">#</span>15887 0x00005555556eb354 in _PyFunction_Vectorcall (func=&lt;optimized out&gt;, stack=0x7fffffffd8f0, nargsf=&lt;optimized out&gt;, kwnames=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:396</span> <span class="pl-c"><span class="pl-c">#</span>15888 0x00005555556d5eca in _PyObject_FastCallDictTstate (tstate=0x55555591eae0, callable=0x7fffb7daea60, args=&lt;optimized out&gt;, nargsf=&lt;optimized out&gt;, kwargs=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:118</span> <span class="pl-c"><span class="pl-c">#</span>15889 0x00005555556dfb79 in _PyObject_Call_Prepend (kwargs=0x0, args=0x7ffff75f8a60, obj=&lt;optimized out&gt;, callable=0x7fffb7daea60, tstate=0x55555591eae0) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:489</span> <span class="pl-c"><span class="pl-c">#</span>15890 slot_tp_init (self=&lt;optimized out&gt;, args=0x7ffff75f8a60, kwds=0x0) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/typeobject.c:6969</span> <span class="pl-c"><span class="pl-c">#</span>15891 0x000055555568fd5f in type_call (kwds=0x0, args=0x7ffff75f8a60, type=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/typeobject.c:1026</span> <span class="pl-c"><span class="pl-c">#</span>15892 _PyObject_MakeTpCall (tstate=0x55555591eae0, callable=0x555555e64660, args=&lt;optimized out&gt;, nargs=&lt;optimized out&gt;, keywords=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Objects/call.c:191</span> <span class="pl-c"><span class="pl-c">#</span>15893 0x000055555572dd89 in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=&lt;optimized out&gt;, args=0x555555a23238, callable=&lt;optimized out&gt;, tstate=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Include/cpython/abstract.h:116</span> <span class="pl-c"><span class="pl-c">#</span>15894 PyObject_Vectorcall () at /opt/conda/conda-bld/python-split_1649141344976/work/Include/cpython/abstract.h:127</span> <span class="pl-c"><span class="pl-c">#</span>15895 call_function (kwnames=0x0, oparg=&lt;optimized out&gt;, pp_stack=&lt;synthetic pointer&gt;, tstate=0x55555591eae0) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:5077</span> <span class="pl-c"><span class="pl-c">#</span>15896 _PyEval_EvalFrameDefault (tstate=&lt;optimized out&gt;, f=0x555555a230c0, throwflag=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:3489</span> <span class="pl-c"><span class="pl-c">#</span>15897 0x00005555556ea663 in _PyEval_EvalFrame () at /opt/conda/conda-bld/python-split_1649141344976/work/Include/internal/pycore_ceval.h:40</span> <span class="pl-c"><span class="pl-c">#</span>15898 _PyEval_EvalCode (tstate=&lt;optimized out&gt;, _co=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, locals=&lt;optimized out&gt;, args=&lt;optimized out&gt;, argcount=&lt;optimized out&gt;, kwnames=0x0, kwargs=0x0, kwcount=&lt;optimized out&gt;, kwstep=2, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0, name=&lt;optimized out&gt;, qualname=0x0) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:4329</span> <span class="pl-c"><span class="pl-c">#</span>15899 0x000055555579745c in _PyEval_EvalCodeWithName (qualname=0x0, name=0x0, closure=0x0, kwdefs=0x0, defcount=0, defs=0x0, kwstep=2, kwcount=0, kwargs=&lt;optimized out&gt;, kwnames=&lt;optimized out&gt;, argcount=&lt;optimized out&gt;, args=&lt;optimized out&gt;, locals=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, _co=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:4361</span> <span class="pl-c"><span class="pl-c">#</span>15900 PyEval_EvalCodeEx (_co=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, locals=&lt;optimized out&gt;, args=&lt;optimized out&gt;, argcount=&lt;optimized out&gt;, kws=&lt;optimized out&gt;, kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:4377</span> <span class="pl-c"><span class="pl-c">#</span>15901 0x00005555556eb45b in PyEval_EvalCode (co=&lt;optimized out&gt;, globals=&lt;optimized out&gt;, locals=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/ceval.c:828</span> <span class="pl-c"><span class="pl-c">#</span>15902 0x000055555579750b in run_eval_code_obj (tstate=0x55555591eae0, co=0x7ffff7607870, globals=0x7ffff75fae80, locals=0x7ffff75fae80) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:1221</span> <span class="pl-c"><span class="pl-c">#</span>15903 0x00005555557c7f75 in run_mod (mod=&lt;optimized out&gt;, filename=&lt;optimized out&gt;, globals=0x7ffff75fae80, locals=0x7ffff75fae80, flags=&lt;optimized out&gt;, arena=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:1242</span> <span class="pl-c"><span class="pl-c">#</span>15904 0x0000555555668987 in pyrun_file (fp=0x55555591e700, filename=0x7ffff7532330, start=&lt;optimized out&gt;, globals=0x7ffff75fae80, locals=0x7ffff75fae80, closeit=1, flags=0x7fffffffdd68) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:1140</span> <span class="pl-c"><span class="pl-c">#</span>15905 0x00005555557cda2f in pyrun_simple_file (flags=0x7fffffffdd68, closeit=1, filename=0x7ffff7532330, fp=0x55555591e700) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:450</span> <span class="pl-c"><span class="pl-c">#</span>15906 PyRun_SimpleFileExFlags (fp=0x55555591e700, filename=&lt;optimized out&gt;, closeit=1, flags=0x7fffffffdd68) at /opt/conda/conda-bld/python-split_1649141344976/work/Python/pythonrun.c:483</span> <span class="pl-c"><span class="pl-c">#</span>15907 0x00005555557ce10b in pymain_run_file (cf=0x7fffffffdd68, config=0x55555591f650) at /opt/conda/conda-bld/python-split_1649141344976/work/Modules/main.c:379</span> <span class="pl-c"><span class="pl-c">#</span>15908 pymain_run_python (exitcode=0x7fffffffdd60) at /opt/conda/conda-bld/python-split_1649141344976/work/Modules/main.c:604</span> <span class="pl-c"><span class="pl-c">#</span>15909 Py_RunMain () at /opt/conda/conda-bld/python-split_1649141344976/work/Modules/main.c:683</span> <span class="pl-c"><span class="pl-c">#</span>15910 0x00005555557ce309 in Py_BytesMain (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at /opt/conda/conda-bld/python-split_1649141344976/work/Modules/main.c:1129</span> <span class="pl-c"><span class="pl-c">#</span>15911 0x00007ffff7c62083 in __libc_start_main (main=0x5555556754a0 &lt;main&gt;, argc=2, argv=0x7fffffffdf68, init=&lt;optimized out&gt;, fini=&lt;optimized out&gt;, rtld_fini=&lt;optimized out&gt;, stack_end=0x7fffffffdf58) at ../csu/libc-start.c:308</span> <span class="pl-c"><span class="pl-c">#</span>15912 0x00005555557550a0 in _start ()</span></pre></div> <h3 dir="auto">SciPy/NumPy/Python version information</h3> <p dir="auto">1.7.3 1.21.2 sys.version_info(major=3, minor=9, micro=12, releaselevel='final', serial=0)</p>
<p dir="auto">When running the code below (boiled down from the original producer) I get a segmentation fault.</p> <h4 dir="auto">Reproducing code example:</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np from scipy.spatial import KDTree points = np.arange(34.).reshape(-1, 2) points[0] = np.nan points[8] = np.nan KDTree(points)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">from</span> <span class="pl-s1">scipy</span>.<span class="pl-s1">spatial</span> <span class="pl-k">import</span> <span class="pl-v">KDTree</span> <span class="pl-s1">points</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">34.</span>).<span class="pl-en">reshape</span>(<span class="pl-c1">-</span><span class="pl-c1">1</span>, <span class="pl-c1">2</span>) <span class="pl-s1">points</span>[<span class="pl-c1">0</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">nan</span> <span class="pl-s1">points</span>[<span class="pl-c1">8</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">nan</span> <span class="pl-v">KDTree</span>(<span class="pl-s1">points</span>)</pre></div> <h4 dir="auto">Error message:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="❯ python test_crash.py [1] 89987 segmentation fault python test_crash.py"><pre class="notranslate"><code class="notranslate">❯ python test_crash.py [1] 89987 segmentation fault python test_crash.py </code></pre></div> <h4 dir="auto">Scipy/Numpy/Python version information:</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.7.1 1.21.1 sys.version_info(major=3, minor=9, micro=6, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">1.7.1 1.21.1 sys.version_info(major=3, minor=9, micro=6, releaselevel='final', serial=0) </code></pre></div> <p dir="auto">I'm running this locally on macOS 11.5 (x86_64), but original issue was seen on Ubuntu 20.04.2 (GitHub Actions). The MetPy test that now segfaults passes fine with Scipy 1.7.0.</p>
1
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=matw" rel="nofollow">Mathew Wyatt</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-4054?redirect=false" rel="nofollow">SPR-4054</a></strong> and commented</p> <p dir="auto">When i have a "prototype" (defined as prototype in the spring-config) bean which implements the ApplicationContextAware interface, it is eagerly instantiated when the application context is loaded. Which means i have a bean floating around in space which i can not get reference to. It seems poor practice to have a floating unreferenced (unreferenced by me explicitly) bean floating around?... In my case, the floating bean is throwing runtime exceptions, because of dependencies on a swing ancestor component...</p> <p dir="auto">see post - <a href="http://forum.springframework.org/showthread.php?t=44522&amp;highlight=ApplicationContextAware" rel="nofollow">http://forum.springframework.org/showthread.php?t=44522&amp;highlight=ApplicationContextAware</a></p> <hr> <p dir="auto"><strong>Affects:</strong> 2.0.7</p> <p dir="auto"><strong>Issue Links:</strong></p> <ul dir="auto"> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398082679" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/8790" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/8790/hovercard" href="https://github.com/spring-projects/spring-framework/issues/8790">#8790</a> ApplicationListeners cannot be lazy initialized (<em><strong>"is duplicated by"</strong></em>)</li> <li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="398091587" data-permission-text="Title is private" data-url="https://github.com/spring-projects/spring-framework/issues/9921" data-hovercard-type="issue" data-hovercard-url="/spring-projects/spring-framework/issues/9921/hovercard" href="https://github.com/spring-projects/spring-framework/issues/9921">#9921</a> Prototype beans that implement ApplicationListener shouldn't be created during container initialization</li> </ul>
<p dir="auto"><strong><a href="https://jira.spring.io/secure/ViewProfile.jspa?name=cert" rel="nofollow">Pavel Nemec</a></strong> opened <strong><a href="https://jira.spring.io/browse/SPR-9839?redirect=false" rel="nofollow">SPR-9839</a></strong> and commented</p> <p dir="auto">Detail description is on forum(see Reference URL)</p> <p dir="auto">use case: Custom RequestParamMethodArgumentResolver that would parse and validate serialized object received in request parameter.</p> <p dir="auto">found problems:<br> 1)As opposed to default resolvers, custom resolver can't obtain messageConverters in constructor, because it's created before RequestMappingHandlerAdapter that registers custom resolvers and messageConverters.</p> <p dir="auto">2)HandlerMethodArgumentResolverComposite doesn't provide any way to place custom resolver before catch-all resolvers.</p> <p dir="auto">3)HttpMessageConverter doesn't provide any way to get instructed to read message from parameter instead of request body.</p> <p dir="auto">There is a workaround for all issues but one must dig in framework source code to find a solution.</p> <hr> <p dir="auto"><strong>Affects:</strong> 3.1.2</p> <p dir="auto"><strong>Reference URL:</strong> <a href="http://forum.springsource.org/showthread.php?130618-Custom-HandlerMethodArgumentResolver-that-uses-messageConverters" rel="nofollow">http://forum.springsource.org/showthread.php?130618-Custom-HandlerMethodArgumentResolver-that-uses-messageConverters</a></p>
0
<p dir="auto">Rogue kubelets can make N failure events (e.g., out of disk, can't mount secret, can't garbage collect) every poll loop, which can completely overload a kube-apiserver. We should rate limit these.</p>
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):<br> Raising this bug after discussing with gmarek.</p> <p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p> <hr> <p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):<br> Bug Report</p> <p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p> <p dir="auto">Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"ec7364b6e3b155e78086018aa644057edbe196e5", GitTreeState:"clean"}<br> Server Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.0", GitCommit:"ec7364b6e3b155e78086018aa644057edbe196e5", GitTreeState:"clean"}</p> <p dir="auto"><strong>Environment</strong>:</p> <ul dir="auto"> <li><strong>Cloud provider or hardware configuration</strong>: x86_64</li> <li><strong>OS</strong> (e.g. from /etc/os-release): RHEL 7.2</li> <li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): 3.10.0-327.el7.x86_64</li> <li><strong>Install tools</strong>:</li> <li><strong>Others</strong>:</li> </ul> <p dir="auto"><strong>What happened</strong>:<br> I'm trying to run density tests using the following command : go run hack/e2e.go -v --test --test_args="--ginkgo.focus="Density"" and observed the following error - 'GetSigner(...) not implemented for skeleton'"}</p> <p dir="auto"><strong>What you expected to happen</strong>:<br> skeleton implementation required</p> <p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br> go run hack/e2e.go -v --test --test_args="--ginkgo.focus="Density""</p> <p dir="auto"><strong>Anything else do we need to know</strong>:<br> After my discussion with Gmarek, I came to know that skeleton is not implemented in the following function - function name : func GetSigner(provider string) (ssh.Signer, <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/error/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/error">@error</a>) . Hence raising this bug.<br> Additionally this is being run on a local cluster and I have attached the logs as well.</p> <p dir="auto"><a href="https://github.com/kubernetes/kubernetes/files/552937/nohup.txt">nohup.txt</a></p> <p dir="auto">Thanks</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gmarek/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gmarek">@gmarek</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/wojtek-t/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/wojtek-t">@wojtek-t</a> and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/dchen1107/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/dchen1107">@dchen1107</a></p>
0
<h3 dir="auto">Preflight Checklist</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the <a href="https://github.com/electron/electron/blob/master/CONTRIBUTING.md">Contributing Guidelines</a> for this project.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow the <a href="https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md">Code of Conduct</a> that this project adheres to.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://www.github.com/electron/electron/issues">issue tracker</a> for a feature request that matches the one I want to file, without success.</li> </ul> <h3 dir="auto">Electron Version</h3> <p dir="auto">10.4.0</p> <h3 dir="auto">What operating system are you using?</h3> <p dir="auto">Windows</p> <h3 dir="auto">Operating System Version</h3> <p dir="auto">windows 7</p> <h3 dir="auto">What arch are you using?</h3> <p dir="auto">x64</p> <h3 dir="auto">Last Known Working Electron version</h3> <p dir="auto">10.4.0</p> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">我希望 所有 electron 打包的客户端 不要产生白屏</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">当前偶发性的 electron 打包的客户端在开启的时候界面全部白屏 并且有错误输出 Exception thrown during bootstrapping<br> Error installing extension 'extensions::SafeBuiltins'.<br> [6108:0730/163552.511:FATAL:v8_initializer.cc(95)]<br> [4840:0730/163552.836:ERROR:CONSOLE(1)] "Uncaught TypeError: Cannot read propert<br> y 'instance' of undefined", source: devtools://devtools/bundled/devtools_app.htm<br> l?remoteBase=<a href="https://chrome-devtools-frontend.appspot.com/serve_file/@85104d2dfc" rel="nofollow">https://chrome-devtools-frontend.appspot.com/serve_file/@85104d2dfc</a><br> 96eac92da3f8019998debdcc240d0d/&amp;can_dock=true&amp;toolbarColor=rgba(223,223,223,1)&amp;t<br> extColor=rgba(0,0,0,1)&amp;experiments=true (1)</p> <h3 dir="auto">Testcase Gist URL</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Additional Information</h3> <p dir="auto">相关环境 vue 2.0 webpack</p>
<h3 dir="auto">Expected behavior</h3> <p dir="auto">Should be able to develope andoid apps using electron</p>
0
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">gather_facts</p> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.3.0.0 config file = configured module search path = Default w/o overrides python version = 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609]"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0 config file = configured module search path = Default w/o overrides python version = 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">Default configuration (no local ansible.cfg)</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">OS = Ubuntu 16.04.2 LTS</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">If a playbook consists of multiple play, each of which affects distinct set of hosts, when only a subset of play is selected for running, Ansible still tries to gather facts from unaffected hosts. This might be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="208196466" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/21528" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/21528/hovercard" href="https://github.com/ansible/ansible/issues/21528">#21528</a></p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <p dir="auto">Run the following playbook <code class="notranslate">ansible-playbook -i dev sample.yml --tags=db</code></p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--- - hosts: mysql tags: db tasks: - debug: msg=hello - hosts: app tags: app tasks: - debug: msg=world"><pre class="notranslate">--- - <span class="pl-ent">hosts</span>: <span class="pl-s">mysql</span> <span class="pl-ent">tags</span>: <span class="pl-s">db</span> <span class="pl-ent">tasks</span>: - <span class="pl-ent">debug</span>: <span class="pl-s">msg=hello</span> - <span class="pl-ent">hosts</span>: <span class="pl-s">app</span> <span class="pl-ent">tags</span>: <span class="pl-s">app</span> <span class="pl-ent">tasks</span>: - <span class="pl-ent">debug</span>: <span class="pl-s">msg=world</span></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Facts are not gathered for <code class="notranslate">app</code> hosts</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">Facts are gathered for all hosts</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="PLAY [mysql] ****************************************************************************************************************************************************************************************************** TASK [Gathering Facts] ******************************************************************************************************************************************************************************************** ok: [172.31.2.4] TASK [debug] ****************************************************************************************************************************************************************************************************** ok: [172.31.2.4] =&gt; { &quot;changed&quot;: false, &quot;msg&quot;: &quot;hello&quot; } PLAY [app] ******************************************************************************************************************************************************************************************************** TASK [Gathering Facts] ******************************************************************************************************************************************************************************************** ok: [172.31.1.4] PLAY RECAP ******************************************************************************************************************************************************************************************************** 172.31.1.4 : ok=1 changed=0 unreachable=0 failed=0 172.31.2.4 : ok=2 changed=0 unreachable=0 failed=0 "><pre class="notranslate"><code class="notranslate">PLAY [mysql] ****************************************************************************************************************************************************************************************************** TASK [Gathering Facts] ******************************************************************************************************************************************************************************************** ok: [172.31.2.4] TASK [debug] ****************************************************************************************************************************************************************************************************** ok: [172.31.2.4] =&gt; { "changed": false, "msg": "hello" } PLAY [app] ******************************************************************************************************************************************************************************************************** TASK [Gathering Facts] ******************************************************************************************************************************************************************************************** ok: [172.31.1.4] PLAY RECAP ******************************************************************************************************************************************************************************************************** 172.31.1.4 : ok=1 changed=0 unreachable=0 failed=0 172.31.2.4 : ok=2 changed=0 unreachable=0 failed=0 </code></pre></div>
<p dir="auto">FreeBSD seems very fond of "rc-style" configuration files, which have the following format:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Comment SOMETHING=somevalue"><pre class="notranslate"><code class="notranslate"># Comment SOMETHING=somevalue </code></pre></div> <p dir="auto">Examples of this are make.conf, sysctl.conf, rc.conf and many others.</p> <p dir="auto">The format is close, but not exactly the INI-format, which makes the ini_file module unusable. The lineinfile module works but is wordy and makes the playbook look cumbersome.</p> <p dir="auto">I'd like to see an rc_file module, that would help in configuring values for such files.</p> <p dir="auto">I'm nearly volunteering to write one myself, but there is a gotcha. At least the service module contains code that manipulates rc.conf directly to set (some of the values) there. Would it be important to refactor that code into a centralized location and if so, what would that place be? I am not overly familiar with Ansible internals.</p>
0
<p dir="auto"><em>bug</em></p> <p dir="auto">After updating from 15.3.2 to 15.4.0, the error is showing up in previously working code. The app fails to load in <strong>IE11 on Win 7</strong> with the following error:</p> <p dir="auto"><code class="notranslate">SCRIPT5022: Objects are not valid as a React child (found: object with keys {$$typeof, type, key, ref, props, _owner, _store}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of </code>App<code class="notranslate">. File: bundle.js, Line: 13847, Column: 6</code></p> <p dir="auto">It continues to work fine in all other browsers.</p> <p dir="auto">Thanks</p>
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br> BUG</p> <p dir="auto"><strong>What is the current behavior?</strong><br> App doesn't render in IE11 and below.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via <a href="https://jsfiddle.net" rel="nofollow">https://jsfiddle.net</a> or similar (template: <a href="https://jsfiddle.net/reactjs/69z2wepo/" rel="nofollow">https://jsfiddle.net/reactjs/69z2wepo/</a>).</strong></p> <ul dir="auto"> <li>Build React app with Webpack</li> <li>Launch IE11 or below (not an emulator)</li> <li>You will see a blank screen or half-compiled React app with the following error:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1647596/20527736/7b9075a8-b097-11e6-8ccb-d205b1908f31.png"><img src="https://cloud.githubusercontent.com/assets/1647596/20527736/7b9075a8-b097-11e6-8ccb-d205b1908f31.png" alt="24f8f6e8-afde-11e6-9a6f-a3cc6355f55c" style="max-width: 100%;"></a></li> </ul> <p dir="auto"><strong>What is the expected behavior?</strong></p> <ul dir="auto"> <li>To render as it does in Chrome, Firefox, etc.</li> </ul> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong><br> We've temporarily shrink-wrapped our dependencies so that we can continue to serve our app. We're starting to believe that it's coming from a dependency that <code class="notranslate">react</code>, <code class="notranslate">apollo</code> or <code class="notranslate">webpack</code> may be relying on...</p> <p dir="auto">Shrink-wrapped versions of our dependencies (left is the new one that's broken and the right one is the old one that continues to work across all browsers) <a href="https://www.diffchecker.com/SyaJUcsk" rel="nofollow">https://www.diffchecker.com/SyaJUcsk</a></p>
1
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p> <p dir="auto">Report a possible bug</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">When Component A renders Component B with a children prop that is a react component / JSX fragment any render of component A will recreate said children prop</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via <a href="https://jsfiddle.net" rel="nofollow">https://jsfiddle.net</a> or similar (template: <a href="https://jsfiddle.net/reactjs/69z2wepo/" rel="nofollow">https://jsfiddle.net/reactjs/69z2wepo/</a>).</strong></p> <p dir="auto">Example Code:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import React from 'react'; class ComponentWithChildren extends React.PureComponent { render() { console.log(&quot;RENDER COMP&quot;) return &lt;span&gt;Hello{this.props.children}&lt;/span&gt; } } class Children extends React.PureComponent { render() { return ( &lt;div&gt; these are children &lt;span&gt;nested&lt;/span&gt; &lt;/div&gt; ) } } class App extends React.PureComponent { update = () =&gt; this.setState({ count: this.state.count + 1 }) state = { count: 0 } render() { console.log(&quot;RENDER APP&quot;) return ( &lt;div&gt; &lt;button onClick={this.update}&gt;Update&lt;/button&gt; &lt;ComponentWithChildren&gt; &lt;Children /&gt; &lt;/ComponentWithChildren&gt; &lt;/div&gt; ) } } export default App;"><pre class="notranslate"><code class="notranslate">import React from 'react'; class ComponentWithChildren extends React.PureComponent { render() { console.log("RENDER COMP") return &lt;span&gt;Hello{this.props.children}&lt;/span&gt; } } class Children extends React.PureComponent { render() { return ( &lt;div&gt; these are children &lt;span&gt;nested&lt;/span&gt; &lt;/div&gt; ) } } class App extends React.PureComponent { update = () =&gt; this.setState({ count: this.state.count + 1 }) state = { count: 0 } render() { console.log("RENDER APP") return ( &lt;div&gt; &lt;button onClick={this.update}&gt;Update&lt;/button&gt; &lt;ComponentWithChildren&gt; &lt;Children /&gt; &lt;/ComponentWithChildren&gt; &lt;/div&gt; ) } } export default App; </code></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">I would expect ComponentWithChildren not to re-render because none of its props actually changed</p> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong></p> <p dir="auto">React 15.4.1</p>
<p dir="auto">If you have</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="componentWillReceiveProps: function() { this.setState({x: this.state.x + 1}); this.setState({x: this.state.x + 1}); }"><pre class="notranslate"><code class="notranslate">componentWillReceiveProps: function() { this.setState({x: this.state.x + 1}); this.setState({x: this.state.x + 1}); } </code></pre></div> <p dir="auto">then <code class="notranslate">x</code> will only be incremented once because the new state will just be stored in <code class="notranslate">_pendingState</code> until <code class="notranslate">receiveProps</code> finishes. After my refactoring in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15792495" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/115" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/115/hovercard" href="https://github.com/facebook/react/pull/115">#115</a>, this will never increment twice, which is probably confusing.</p> <p dir="auto">Maybe this isn't a bug. We can fix this behavior by instead updating this.state immediately (but still updating the UI later). Right now I can't think of any situations where having this.state out of sync with the UI is a problem.</p> <p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vjeux/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vjeux">@vjeux</a> suggested I open an issue, so here I am. Probably easiest for me to fix while updating <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15792495" data-permission-text="Title is private" data-url="https://github.com/facebook/react/issues/115" data-hovercard-type="pull_request" data-hovercard-url="/facebook/react/pull/115/hovercard" href="https://github.com/facebook/react/pull/115">#115</a> though.</p>
0