text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<p dir="auto">There's no e2e test for dynamic volume provisioning AFAICT.</p> <p dir="auto">Also, on Ubernetes-Lite, we should verify that a dynamically provisioned volume gets zone labels.</p>
<p dir="auto">I'm excited to see that auto-provisioned volumes are going to be in 1.2 (even if in alpha), but AFAICT there's no e2e coverage yet.</p>
1
<h4 dir="auto">Describe the bug</h4> <p dir="auto">There is an issue when using <code class="notranslate">SimpleImputer</code> with a new Pandas dataframe, specifically if it has a column that is of type <code class="notranslate">Int64</code> and has a <code class="notranslate">NA</code> value in the training data.</p> <h4 dir="auto">Code to Reproduce</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def test_simple_imputer_with_Int64_column(): index = pd.Index(['A', 'B', 'C'], name='group') df = pd.DataFrame({ 'att-1': [10, 20, np.nan], 'att-2': [30, 40, 30] }, index=index) # TODO: This line breaks the test! Comment out and it works df = df.astype('Int64') imputer = SimpleImputer() imputer.fit(df) imputed = imputer.transform(df) df_imputed = pd.DataFrame(imputed, columns=['att-1', 'att-2'], index=index) assert df_imputed.loc['C', 'att-1'] == 15"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-en">test_simple_imputer_with_Int64_column</span>(): <span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Index</span>([<span class="pl-s">'A'</span>, <span class="pl-s">'B'</span>, <span class="pl-s">'C'</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'group'</span>) <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({ <span class="pl-s">'att-1'</span>: [<span class="pl-c1">10</span>, <span class="pl-c1">20</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], <span class="pl-s">'att-2'</span>: [<span class="pl-c1">30</span>, <span class="pl-c1">40</span>, <span class="pl-c1">30</span>] }, <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">index</span>) <span class="pl-c"># TODO: This line breaks the test! Comment out and it works</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">astype</span>(<span class="pl-s">'Int64'</span>) <span class="pl-s1">imputer</span> <span class="pl-c1">=</span> <span class="pl-v">SimpleImputer</span>() <span class="pl-s1">imputer</span>.<span class="pl-en">fit</span>(<span class="pl-s1">df</span>) <span class="pl-s1">imputed</span> <span class="pl-c1">=</span> <span class="pl-s1">imputer</span>.<span class="pl-en">transform</span>(<span class="pl-s1">df</span>) <span class="pl-s1">df_imputed</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">imputed</span>, <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">'att-1'</span>, <span class="pl-s">'att-2'</span>], <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">index</span>) <span class="pl-k">assert</span> <span class="pl-s1">df_imputed</span>.<span class="pl-s1">loc</span>[<span class="pl-s">'C'</span>, <span class="pl-s">'att-1'</span>] <span class="pl-c1">==</span> <span class="pl-c1">15</span></pre></div> <h4 dir="auto">Expected Results</h4> <p dir="auto">Correct value is imputed</p> <h4 dir="auto">Actual Results</h4> <p dir="auto">Exception raised:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError: float() argument must be a string or a number, not 'NAType'"><pre class="notranslate"><code class="notranslate">TypeError: float() argument must be a string or a number, not 'NAType' </code></pre></div> <h4 dir="auto">Versions</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="System: python: 3.7.4 (default, Aug 13 2019, 15:17:50) [Clang 4.0.1 (tags/RELEASE_401/final)] executable: &lt;path-to-my-project&gt;/.venv/bin/python machine: Darwin-19.3.0-x86_64-i386-64bit Python dependencies: pip: 19.3.1 setuptools: 42.0.2 sklearn: 0.22.1 numpy: 1.18.1 scipy: 1.4.1 Cython: None pandas: 1.0.1 matplotlib: None joblib: 0.14.1 Built with OpenMP: True"><pre class="notranslate"><code class="notranslate">System: python: 3.7.4 (default, Aug 13 2019, 15:17:50) [Clang 4.0.1 (tags/RELEASE_401/final)] executable: &lt;path-to-my-project&gt;/.venv/bin/python machine: Darwin-19.3.0-x86_64-i386-64bit Python dependencies: pip: 19.3.1 setuptools: 42.0.2 sklearn: 0.22.1 numpy: 1.18.1 scipy: 1.4.1 Cython: None pandas: 1.0.1 matplotlib: None joblib: 0.14.1 Built with OpenMP: True </code></pre></div>
<h4 dir="auto">Describe the bug</h4> <p dir="auto"><a href="https://pandas.pydata.org/pandas-docs/stable/user_guide/missing_data.html#missing-data-na" rel="nofollow">Starting from pandas 1.0, an experimental pd.NA value (singleton) is available to represent scalar missing values. At this moment, it is used in the nullable integer, boolean and dedicated string data types as the missing value indicator.<br> </a></p> <p dir="auto">I get the error <code class="notranslate">TypeError: float() argument must be a string or a number, not 'NAType'</code> when transfer integer data containing NaN in the form of a pandas dataframe to preprocessing module, in particular QuantileTransformer and StandardScaler after updating pandas to the current version.</p> <h4 dir="auto">Steps/Code to Reproduce</h4> <p dir="auto">Example:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd import numpy as np from sklearn.preprocessing import StandardScaler df = pd.DataFrame({'a': [1,2,3, np.nan, np.nan], 'b': [np.nan, np.nan, 8, 4, 6]}, dtype = pd.Int64Dtype()) scaler = StandardScaler() scaler.fit_transform(df)"><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">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span> <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">preprocessing</span> <span class="pl-k">import</span> <span class="pl-v">StandardScaler</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</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-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>], <span class="pl-s">'b'</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-c1">8</span>, <span class="pl-c1">4</span>, <span class="pl-c1">6</span>]}, <span class="pl-s1">dtype</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">Int64Dtype</span>()) <span class="pl-s1">scaler</span> <span class="pl-c1">=</span> <span class="pl-v">StandardScaler</span>() <span class="pl-s1">scaler</span>.<span class="pl-en">fit_transform</span>(<span class="pl-s1">df</span>)</pre></div> <h4 dir="auto">Expected Results</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="array([[-1.22474487, nan], [ 0. , nan], [ 1.22474487, 1.22474487], [ nan, -1.22474487], [ nan, 0. ]])"><pre class="notranslate"><code class="notranslate">array([[-1.22474487, nan], [ 0. , nan], [ 1.22474487, 1.22474487], [ nan, -1.22474487], [ nan, 0. ]]) </code></pre></div> <h4 dir="auto">Actual Results</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TypeError Traceback (most recent call last) &lt;ipython-input-42-2104609ef9c0&gt; in &lt;module&gt; 7 print(df) 8 scaler = StandardScaler() ----&gt; 9 scaler.fit_transform(df) /anaconda3/lib/python3.6/site-packages/sklearn/base.py in fit_transform(self, X, y, **fit_params) 569 if y is None: 570 # fit method of arity 1 (unsupervised transformation) --&gt; 571 return self.fit(X, **fit_params).transform(X) 572 else: 573 # fit method of arity 2 (supervised transformation) /anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/_data.py in fit(self, X, y) 667 # Reset internal state before fitting 668 self._reset() --&gt; 669 return self.partial_fit(X, y) 670 671 def partial_fit(self, X, y=None): /anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/_data.py in partial_fit(self, X, y) 698 X = check_array(X, accept_sparse=('csr', 'csc'), 699 estimator=self, dtype=FLOAT_DTYPES, --&gt; 700 force_all_finite='allow-nan') 701 702 # Even in the case of `with_mean=False`, we update the mean anyway /anaconda3/lib/python3.6/site-packages/sklearn/utils/validation.py in check_array(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, warn_on_dtype, estimator) 529 array = array.astype(dtype, casting=&quot;unsafe&quot;, copy=False) 530 else: --&gt; 531 array = np.asarray(array, order=order, dtype=dtype) 532 except ComplexWarning: 533 raise ValueError(&quot;Complex data not supported\n&quot; /anaconda3/lib/python3.6/site-packages/numpy/core/_asarray.py in asarray(a, dtype, order) 83 84 &quot;&quot;&quot; ---&gt; 85 return array(a, dtype, copy=False, order=order) 86 87 TypeError: float() argument must be a string or a number, not 'NAType'"><pre class="notranslate"><code class="notranslate">TypeError Traceback (most recent call last) &lt;ipython-input-42-2104609ef9c0&gt; in &lt;module&gt; 7 print(df) 8 scaler = StandardScaler() ----&gt; 9 scaler.fit_transform(df) /anaconda3/lib/python3.6/site-packages/sklearn/base.py in fit_transform(self, X, y, **fit_params) 569 if y is None: 570 # fit method of arity 1 (unsupervised transformation) --&gt; 571 return self.fit(X, **fit_params).transform(X) 572 else: 573 # fit method of arity 2 (supervised transformation) /anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/_data.py in fit(self, X, y) 667 # Reset internal state before fitting 668 self._reset() --&gt; 669 return self.partial_fit(X, y) 670 671 def partial_fit(self, X, y=None): /anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/_data.py in partial_fit(self, X, y) 698 X = check_array(X, accept_sparse=('csr', 'csc'), 699 estimator=self, dtype=FLOAT_DTYPES, --&gt; 700 force_all_finite='allow-nan') 701 702 # Even in the case of `with_mean=False`, we update the mean anyway /anaconda3/lib/python3.6/site-packages/sklearn/utils/validation.py in check_array(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, warn_on_dtype, estimator) 529 array = array.astype(dtype, casting="unsafe", copy=False) 530 else: --&gt; 531 array = np.asarray(array, order=order, dtype=dtype) 532 except ComplexWarning: 533 raise ValueError("Complex data not supported\n" /anaconda3/lib/python3.6/site-packages/numpy/core/_asarray.py in asarray(a, dtype, order) 83 84 """ ---&gt; 85 return array(a, dtype, copy=False, order=order) 86 87 TypeError: float() argument must be a string or a number, not 'NAType' </code></pre></div> <h4 dir="auto">Versions</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="System: python: 3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 15:01:53) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] executable: /anaconda3/bin/python machine: Darwin-17.7.0-x86_64-i386-64bit Python dependencies: pip: 20.0.2 setuptools: 45.2.0.post20200210 sklearn: 0.22.1 numpy: 1.18.1 scipy: 1.4.1 Cython: None pandas: 1.0.1 matplotlib: 3.1.3 joblib: 0.14.1 Built with OpenMP: True"><pre class="notranslate"><code class="notranslate">System: python: 3.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 15:01:53) [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] executable: /anaconda3/bin/python machine: Darwin-17.7.0-x86_64-i386-64bit Python dependencies: pip: 20.0.2 setuptools: 45.2.0.post20200210 sklearn: 0.22.1 numpy: 1.18.1 scipy: 1.4.1 Cython: None pandas: 1.0.1 matplotlib: 3.1.3 joblib: 0.14.1 Built with OpenMP: True </code></pre></div>
1
<h3 dir="auto">Describe the issue:</h3> <p dir="auto">numpy 1.20 <a href="https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations" rel="nofollow">encouraged</a> specifying plain <code class="notranslate">bool</code> as a dtype as an equivalent to <code class="notranslate">np.bool_</code>, but these aliases don't behave the same as the explicit numpy versions. mypy infers the dtype as "Any" instead. See the example below, where I expected both lines to output the same type.</p> <h3 dir="auto">Reproduce the 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 def what_the() -&gt; None: reveal_type(np.arange(10, dtype=bool)) reveal_type(np.arange(10, dtype=np.bool_))"><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">def</span> <span class="pl-en">what_the</span>() <span class="pl-c1">-&gt;</span> <span class="pl-c1">None</span>: <span class="pl-en">reveal_type</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">bool</span>)) <span class="pl-en">reveal_type</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">bool_</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="No error, but output from mypy 0.961: show_type2.py:4: note: Revealed type is &quot;numpy.ndarray[Any, numpy.dtype[Any]]&quot; show_type2.py:5: note: Revealed type is &quot;numpy.ndarray[Any, numpy.dtype[numpy.bool_]]&quot;"><pre class="notranslate">No error, but output from mypy 0.961: show_type2.py:4: note: Revealed <span class="pl-c1">type</span> is <span class="pl-s"><span class="pl-pds">"</span>numpy.ndarray[Any, numpy.dtype[Any]]<span class="pl-pds">"</span></span> show_type2.py:5: note: Revealed <span class="pl-c1">type</span> is <span class="pl-s"><span class="pl-pds">"</span>numpy.ndarray[Any, numpy.dtype[numpy.bool_]]<span class="pl-pds">"</span></span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ### NumPy/Python version information: 1.23.0 3.10.5 (main, Jun 11 2022, 16:53:24) [GCC 9.4.0]"><pre class="notranslate"><code class="notranslate"> ### NumPy/Python version information: 1.23.0 3.10.5 (main, Jun 11 2022, 16:53:24) [GCC 9.4.0] </code></pre></div>
<p dir="auto">Back in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="737189661" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/17719" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/17719/hovercard" href="https://github.com/numpy/numpy/pull/17719">#17719</a> the first steps were taken into introducing static typing support for array dtypes.</p> <p dir="auto">Since the dtype has a substantial effect on the semantics of an array, there is a lot of type-safety<br> to be gained if the various function-annotations in numpy can actually utilize this information.<br> Examples of this would be the rejection of string-arrays for arithmetic operations, or inferring the<br> output dtype of mixed float/integer operations.</p> <h2 dir="auto">The Plan</h2> <p dir="auto">With this in mind I'd ideally like to implement some basic dtype support throughout the main numpy<br> namespace (xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="635526762" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/16546" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/16546/hovercard" href="https://github.com/numpy/numpy/issues/16546">#16546</a>) before the release of 1.22.</p> <p dir="auto">Now, what does "basic" mean in this context? Namely, any array-/dtype-like that can be parametrized<br> w.r.t. <code class="notranslate">np.generic</code>. Notably this excludes builtin scalar types and character codes (literal strings), as the<br> only way of implementing the latter two is via excessive use of overloads.</p> <p dir="auto">With this in mind, I realistically only expect dtype-support for builtin scalar types (<em>e.g.</em> <code class="notranslate">func(..., dtype=float)</code>)<br> to-be added with the help of a mypy plugin, <em>e.g.</em> via injecting a type-check-only method into the likes of<br> <code class="notranslate">builtins.int</code> that holds some sort of explicit reference to <code class="notranslate">np.int_</code>.</p> <h2 dir="auto">Examples</h2> <p dir="auto">Two examples wherein the dtype can be automatically inferred:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from typing import TYPE_CHECKING import numpy as np AR_1 = np.array(np.float64(1)) AR_2 = np.array(1, dtype=np.float64) if TYPE_CHECKING: reveal_type(AR_1) # note: Revealed type is &quot;numpy.ndarray[Any, numpy.dtype[numpy.floating*[numpy.typing._64Bit*]]]&quot; reveal_type(AR_2) # note: Revealed type is &quot;numpy.ndarray[Any, numpy.dtype[numpy.floating*[numpy.typing._64Bit*]]]&quot;"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">TYPE_CHECKING</span> <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-v">AR_1</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-s1">np</span>.<span class="pl-en">float64</span>(<span class="pl-c1">1</span>)) <span class="pl-v">AR_2</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-c1">1</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">np</span>.<span class="pl-s1">float64</span>) <span class="pl-k">if</span> <span class="pl-v">TYPE_CHECKING</span>: <span class="pl-en">reveal_type</span>(<span class="pl-v">AR_1</span>) <span class="pl-c"># note: Revealed type is "numpy.ndarray[Any, numpy.dtype[numpy.floating*[numpy.typing._64Bit*]]]"</span> <span class="pl-en">reveal_type</span>(<span class="pl-v">AR_2</span>) <span class="pl-c"># note: Revealed type is "numpy.ndarray[Any, numpy.dtype[numpy.floating*[numpy.typing._64Bit*]]]"</span></pre></div> <p dir="auto">Three examples wherein dtype-support is substantially more difficult to implement.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="AR_3 = np.array(1.0) AR_4 = np.array(1, dtype=float) AR_5 = np.array(1, dtype=&quot;f8&quot;) if TYPE_CHECKING: reveal_type(AR_3) # note: Revealed type is &quot;numpy.ndarray[Any, numpy.dtype[Any]]&quot; reveal_type(AR_4) # note: Revealed type is &quot;numpy.ndarray[Any, numpy.dtype[Any]]&quot; reveal_type(AR_5) # note: Revealed type is &quot;numpy.ndarray[Any, numpy.dtype[Any]]&quot;"><pre class="notranslate"><span class="pl-v">AR_3</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-c1">1.0</span>) <span class="pl-v">AR_4</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-c1">1</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s1">float</span>) <span class="pl-v">AR_5</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-c1">1</span>, <span class="pl-s1">dtype</span><span class="pl-c1">=</span><span class="pl-s">"f8"</span>) <span class="pl-k">if</span> <span class="pl-v">TYPE_CHECKING</span>: <span class="pl-en">reveal_type</span>(<span class="pl-v">AR_3</span>) <span class="pl-c"># note: Revealed type is "numpy.ndarray[Any, numpy.dtype[Any]]"</span> <span class="pl-en">reveal_type</span>(<span class="pl-v">AR_4</span>) <span class="pl-c"># note: Revealed type is "numpy.ndarray[Any, numpy.dtype[Any]]"</span> <span class="pl-en">reveal_type</span>(<span class="pl-v">AR_5</span>) <span class="pl-c"># note: Revealed type is "numpy.ndarray[Any, numpy.dtype[Any]]"</span></pre></div> <p dir="auto">In the latter three cases one can always manually declare the dtype of the array:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy.typing as npt AR_6: npt.NDArray[np.float64] = np.array(1.0) if TYPE_CHECKING: reveal_type(AR_6) # note: Revealed type is &quot;numpy.ndarray[Any, numpy.dtype[numpy.floating*[numpy.typing._64Bit*]]]&quot;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span>.<span class="pl-s1">typing</span> <span class="pl-k">as</span> <span class="pl-s1">npt</span> <span class="pl-v">AR_6</span>: <span class="pl-s1">npt</span>.<span class="pl-v">NDArray</span>[<span class="pl-s1">np</span>.<span class="pl-s1">float64</span>] <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>(<span class="pl-c1">1.0</span>) <span class="pl-k">if</span> <span class="pl-v">TYPE_CHECKING</span>: <span class="pl-en">reveal_type</span>(<span class="pl-v">AR_6</span>) <span class="pl-c"># note: Revealed type is "numpy.ndarray[Any, numpy.dtype[numpy.floating*[numpy.typing._64Bit*]]]"</span></pre></div>
1
<p dir="auto">When I run <code class="notranslate">flutter test --coverage</code> on <code class="notranslate">https://github.com/dnfield/flutter_svg</code>, I eventually get this output over and over again:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="unhandled error during test: /Users/dnfield/src/flutter_svg/test/xml_svg_test.dart Bad state: Couldn't find line and column for token 2529 in file:///b/build/slave/Linux_Engine/build/src/third_party/dart/sdk/lib/collection/list.dart. #0 VMScript._lineAndColumn (package:vm_service_client/src/script.dart:243:5) #1 _ScriptLocation._ensureLineAndColumn (package:vm_service_client/src/script.dart:314:26) #2 _ScriptLocation.line (package:vm_service_client/src/script.dart:295:5) #3 _getCoverageJson (package:coverage/src/collect.dart:103:46) &lt;asynchronous suspension&gt; #4 _getAllCoverage (package:coverage/src/collect.dart:51:26) &lt;asynchronous suspension&gt; #5 collect (package:coverage/src/collect.dart:35:18) &lt;asynchronous suspension&gt; #6 CoverageCollector.collectCoverage (package:flutter_tools/src/test/coverage_collector.dart:55:45) &lt;asynchronous suspension&gt; #7 CoverageCollector.handleFinishedTest (package:flutter_tools/src/test/coverage_collector.dart:27:11) &lt;asynchronous suspension&gt; #8 _FlutterPlatform._startTest (package:flutter_tools/src/test/flutter_platform.dart:650:30) &lt;asynchronous suspension&gt; #9 _FlutterPlatform.loadChannel (package:flutter_tools/src/test/flutter_platform.dart:408:36) #10 PlatformPlugin.load (package:test/src/runner/plugin/platform.dart:65:19) &lt;asynchronous suspension&gt; #11 Loader.loadFile.&lt;anonymous closure&gt; (package:test/src/runner/loader.dart:248:36) &lt;asynchronous suspension&gt; #12 new LoadSuite.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/runner/load_suite.dart:92:31) &lt;asynchronous suspension&gt; #13 invoke (package:test/src/utils.dart:241:5) #14 new LoadSuite.&lt;anonymous closure&gt; (package:test/src/runner/load_suite.dart:91:7) #15 Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:404:25) &lt;asynchronous suspension&gt; #16 new Future.&lt;anonymous closure&gt; (dart:async/future.dart:176:37) #17 StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15) #18 StackZoneSpecification._registerCallback.&lt;anonymous closure&gt; (package:stack_trace/src/stack_zone_specification.dart:119:48) #19 _rootRun (dart:async/zone.dart:1120:38) #20 _CustomZone.run (dart:async/zone.dart:1021:19) #21 _CustomZone.runGuarded (dart:async/zone.dart:923:7) #22 _CustomZone.bindCallbackGuarded.&lt;anonymous closure&gt; (dart:async/zone.dart:963:23) #23 StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15) #24 StackZoneSpecification._registerCallback.&lt;anonymous closure&gt; (package:stack_trace/src/stack_zone_specification.dart:119:48) #25 _rootRun (dart:async/zone.dart:1124:13) #26 _CustomZone.run (dart:async/zone.dart:1021:19) #27 _CustomZone.bindCallback.&lt;anonymous closure&gt; (dart:async/zone.dart:947:23) #28 Timer._createTimer.&lt;anonymous closure&gt; (dart:async/runtime/libtimer_patch.dart:21:15) #29 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19) #30 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5) #31 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12) 00:16 +14 -1: loading /Users/dnfield/src/flutter_svg/test/xml_svg_test.dart [E] Bad state: Couldn't find line and column for token 2529 in file:///b/build/slave/Linux_Engine/build/src/third_party/dart/sdk/lib/collection/list.dart. package:vm_service_client/src/script.dart 243:5 VMScript._lineAndColumn package:vm_service_client/src/script.dart 314:26 _ScriptLocation._ensureLineAndColumn package:vm_service_client/src/script.dart 295:5 _ScriptLocation.line package:coverage/src/collect.dart 103:46 _getCoverageJson ===== asynchronous gap =========================== dart:async/future_impl.dart 22:43 _Completer.completeError dart:async/runtime/libasync_patch.dart 40:18 _AsyncAwaitCompleter.completeError package:coverage/src/collect.dart _getCoverageJson ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:coverage/src/collect.dart _getCoverageJson package:coverage/src/collect.dart 51:26 _getAllCoverage ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:coverage/src/collect.dart _getAllCoverage package:coverage/src/collect.dart 35:18 collect ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:coverage/src/collect.dart collect package:flutter_tools/src/test/coverage_collector.dart 55:45 CoverageCollector.collectCoverage ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:flutter_tools/src/test/flutter_platform.dart _FlutterPlatform._startTest package:flutter_tools/src/test/flutter_platform.dart 408:36 _FlutterPlatform.loadChannel package:test/src/runner/plugin/platform.dart 65:19 PlatformPlugin.load ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:test/src/runner/loader.dart Loader.loadFile.&lt;fn&gt; package:test/src/runner/load_suite.dart 92:31 new LoadSuite.&lt;fn&gt;.&lt;fn&gt; ===== asynchronous gap =========================== dart:async/zone.dart 1045:19 _CustomZone.registerCallback dart:async/zone.dart 962:22 _CustomZone.bindCallbackGuarded dart:async/timer.dart 52:45 new Timer dart:async/timer.dart 87:9 Timer.run dart:async/future.dart 174:11 new Future package:test/src/backend/invoker.dart 403:15 Invoker._onRun.&lt;fn&gt;.&lt;fn&gt;.&lt;fn&gt;"><pre class="notranslate"><code class="notranslate">unhandled error during test: /Users/dnfield/src/flutter_svg/test/xml_svg_test.dart Bad state: Couldn't find line and column for token 2529 in file:///b/build/slave/Linux_Engine/build/src/third_party/dart/sdk/lib/collection/list.dart. #0 VMScript._lineAndColumn (package:vm_service_client/src/script.dart:243:5) #1 _ScriptLocation._ensureLineAndColumn (package:vm_service_client/src/script.dart:314:26) #2 _ScriptLocation.line (package:vm_service_client/src/script.dart:295:5) #3 _getCoverageJson (package:coverage/src/collect.dart:103:46) &lt;asynchronous suspension&gt; #4 _getAllCoverage (package:coverage/src/collect.dart:51:26) &lt;asynchronous suspension&gt; #5 collect (package:coverage/src/collect.dart:35:18) &lt;asynchronous suspension&gt; #6 CoverageCollector.collectCoverage (package:flutter_tools/src/test/coverage_collector.dart:55:45) &lt;asynchronous suspension&gt; #7 CoverageCollector.handleFinishedTest (package:flutter_tools/src/test/coverage_collector.dart:27:11) &lt;asynchronous suspension&gt; #8 _FlutterPlatform._startTest (package:flutter_tools/src/test/flutter_platform.dart:650:30) &lt;asynchronous suspension&gt; #9 _FlutterPlatform.loadChannel (package:flutter_tools/src/test/flutter_platform.dart:408:36) #10 PlatformPlugin.load (package:test/src/runner/plugin/platform.dart:65:19) &lt;asynchronous suspension&gt; #11 Loader.loadFile.&lt;anonymous closure&gt; (package:test/src/runner/loader.dart:248:36) &lt;asynchronous suspension&gt; #12 new LoadSuite.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/runner/load_suite.dart:92:31) &lt;asynchronous suspension&gt; #13 invoke (package:test/src/utils.dart:241:5) #14 new LoadSuite.&lt;anonymous closure&gt; (package:test/src/runner/load_suite.dart:91:7) #15 Invoker._onRun.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt;.&lt;anonymous closure&gt; (package:test/src/backend/invoker.dart:404:25) &lt;asynchronous suspension&gt; #16 new Future.&lt;anonymous closure&gt; (dart:async/future.dart:176:37) #17 StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15) #18 StackZoneSpecification._registerCallback.&lt;anonymous closure&gt; (package:stack_trace/src/stack_zone_specification.dart:119:48) #19 _rootRun (dart:async/zone.dart:1120:38) #20 _CustomZone.run (dart:async/zone.dart:1021:19) #21 _CustomZone.runGuarded (dart:async/zone.dart:923:7) #22 _CustomZone.bindCallbackGuarded.&lt;anonymous closure&gt; (dart:async/zone.dart:963:23) #23 StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15) #24 StackZoneSpecification._registerCallback.&lt;anonymous closure&gt; (package:stack_trace/src/stack_zone_specification.dart:119:48) #25 _rootRun (dart:async/zone.dart:1124:13) #26 _CustomZone.run (dart:async/zone.dart:1021:19) #27 _CustomZone.bindCallback.&lt;anonymous closure&gt; (dart:async/zone.dart:947:23) #28 Timer._createTimer.&lt;anonymous closure&gt; (dart:async/runtime/libtimer_patch.dart:21:15) #29 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19) #30 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5) #31 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12) 00:16 +14 -1: loading /Users/dnfield/src/flutter_svg/test/xml_svg_test.dart [E] Bad state: Couldn't find line and column for token 2529 in file:///b/build/slave/Linux_Engine/build/src/third_party/dart/sdk/lib/collection/list.dart. package:vm_service_client/src/script.dart 243:5 VMScript._lineAndColumn package:vm_service_client/src/script.dart 314:26 _ScriptLocation._ensureLineAndColumn package:vm_service_client/src/script.dart 295:5 _ScriptLocation.line package:coverage/src/collect.dart 103:46 _getCoverageJson ===== asynchronous gap =========================== dart:async/future_impl.dart 22:43 _Completer.completeError dart:async/runtime/libasync_patch.dart 40:18 _AsyncAwaitCompleter.completeError package:coverage/src/collect.dart _getCoverageJson ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:coverage/src/collect.dart _getCoverageJson package:coverage/src/collect.dart 51:26 _getAllCoverage ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:coverage/src/collect.dart _getAllCoverage package:coverage/src/collect.dart 35:18 collect ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:coverage/src/collect.dart collect package:flutter_tools/src/test/coverage_collector.dart 55:45 CoverageCollector.collectCoverage ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:flutter_tools/src/test/flutter_platform.dart _FlutterPlatform._startTest package:flutter_tools/src/test/flutter_platform.dart 408:36 _FlutterPlatform.loadChannel package:test/src/runner/plugin/platform.dart 65:19 PlatformPlugin.load ===== asynchronous gap =========================== dart:async/zone.dart 1053:19 _CustomZone.registerUnaryCallback dart:async/runtime/libasync_patch.dart 77:23 _asyncThenWrapperHelper package:test/src/runner/loader.dart Loader.loadFile.&lt;fn&gt; package:test/src/runner/load_suite.dart 92:31 new LoadSuite.&lt;fn&gt;.&lt;fn&gt; ===== asynchronous gap =========================== dart:async/zone.dart 1045:19 _CustomZone.registerCallback dart:async/zone.dart 962:22 _CustomZone.bindCallbackGuarded dart:async/timer.dart 52:45 new Timer dart:async/timer.dart 87:9 Timer.run dart:async/future.dart 174:11 new Future package:test/src/backend/invoker.dart 403:15 Invoker._onRun.&lt;fn&gt;.&lt;fn&gt;.&lt;fn&gt; </code></pre></div> <p dir="auto">It eventually causes the process to hang and CI to timeout. It's reproducing locally as well. Upstream dart issue?</p>
0
<p dir="auto">You need to double-transpose vectors to make them into 1-column matrices so that<br> you can add them to 1-column matrices or multiply them with one-row matrices (on<br> either side).</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; X = [ i^2 - j | i=1:10, j=1:10 ]; julia&gt; typeof(X) Array{Int64,2} julia&gt; X[:,1] 10x1 Int64 Array 0 3 8 15 24 35 48 63 80 99 "><pre class="notranslate"><code class="notranslate">julia&gt; X = [ i^2 - j | i=1:10, j=1:10 ]; julia&gt; typeof(X) Array{Int64,2} julia&gt; X[:,1] 10x1 Int64 Array 0 3 8 15 24 35 48 63 80 99 </code></pre></div>
1
<p dir="auto">React v16.3 context provided in <code class="notranslate">pages/_app.js</code> can be consumed and rendered in pages on the client, but is undefined in SSR. This causes React SSR markup mismatch errors.</p> <p dir="auto">Note that context can be universally provided/consumed <em>within</em> <code class="notranslate">pages/_app.js</code>, the issue is specifically when providing context in <code class="notranslate">pages/_app.js</code> and consuming it in a page such as <code class="notranslate">pages/index.js</code>.</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/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">Context provided in <code class="notranslate">pages/_app.js</code> should be consumable in pages both on the server for SSR and when browser rendering.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Context provided in <code class="notranslate">pages/_app.js</code> is undefined when consumed in pages for SSR. It can only be consumed for client rendering.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">In <code class="notranslate">pages/_app.js</code>:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import App, { Container } from 'next/app' import React from 'react' import TestContext from '../context' export default class MyApp extends App { render () { const { Component, pageProps } = this.props return ( &lt;Container&gt; &lt;TestContext.Provider value=&quot;Test value.&quot;&gt; &lt;Component {...pageProps} /&gt; &lt;/TestContext.Provider&gt; &lt;/Container&gt; ) } }"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">App</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-v">Container</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'next/app'</span> <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-k">import</span> <span class="pl-v">TestContext</span> <span class="pl-k">from</span> <span class="pl-s">'../context'</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">MyApp</span> <span class="pl-k">extends</span> <span class="pl-v">App</span> <span class="pl-kos">{</span> <span class="pl-en">render</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-kos">{</span> Component<span class="pl-kos">,</span> pageProps <span class="pl-kos">}</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-k">return</span> <span class="pl-kos">(</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Container</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-v">TestContext</span><span class="pl-kos">.</span><span class="pl-v">Provider</span> <span class="pl-c1">value</span><span class="pl-c1">=</span><span class="pl-s">"Test value."</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Component</span> <span class="pl-kos">{</span>...<span class="pl-s1">pageProps</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-v">TestContext</span><span class="pl-kos">.</span><span class="pl-v">Provider</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Container</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">In <code class="notranslate">pages/index.js</code>:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import TestContext from '../context' export default () =&gt; ( &lt;TestContext.Consumer&gt; {value =&gt; value} &lt;/TestContext.Consumer&gt; )"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">TestContext</span> <span class="pl-k">from</span> <span class="pl-s">'../context'</span> <span class="pl-k">export</span> <span class="pl-k">default</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-c1">&lt;</span><span class="pl-v">TestContext</span><span class="pl-kos">.</span><span class="pl-v">Consumer</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span><span class="pl-s1">value</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">value</span><span class="pl-kos">}</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-v">TestContext</span><span class="pl-kos">.</span><span class="pl-v">Consumer</span><span class="pl-c1">&gt;</span> <span class="pl-kos">)</span></pre></div> <p dir="auto">In <code class="notranslate">context.js</code>:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import React from 'react' export default React.createContext()"><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-k">export</span> <span class="pl-k">default</span> <span class="pl-v">React</span><span class="pl-kos">.</span><span class="pl-en">createContext</span><span class="pl-kos">(</span><span class="pl-kos">)</span></pre></div> <p dir="auto">Will result in:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1754873/39107043-d45bd2a6-4702-11e8-85a8-f04ef11bcb4b.png"><img width="570" alt="screen shot 2018-04-23 at 2 29 29 pm" src="https://user-images.githubusercontent.com/1754873/39107043-d45bd2a6-4702-11e8-85a8-f04ef11bcb4b.png" style="max-width: 100%;"></a></p> <h2 dir="auto">Context</h2> <p dir="auto">A large motivation for the <code class="notranslate">pages/_app.js</code> feature is to be able to provide context persistently available across pages. It's unfortunate the current implementation does not support this basic use case.</p> <p dir="auto">I'm attempting to isomorphically provide the cookie in context so that <a href="https://github.com/jaydenseric/graphql-react"><code class="notranslate">graphql-react</code></a> <code class="notranslate">&lt;Query /&gt;</code> components can get the user's access token to make GraphQL API requests. This approach used to work with separately decorated pages.</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>v6.0.0-canary.5</td> </tr> <tr> <td>node</td> <td>v9.11.1</td> </tr> </tbody> </table>
<p dir="auto">Relates to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="240012766" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/2438" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/2438/hovercard" href="https://github.com/vercel/next.js/issues/2438">#2438</a> .</p> <p dir="auto">If we add the same <code class="notranslate">&lt;link /&gt;</code> tag multiples in different <code class="notranslate">&lt;Head /&gt;</code>, they are duplicated in the rendered the DOM</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/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">multiple <code class="notranslate">&lt;link /&gt;</code> tags with exactly the same attributes should be du-duped when rendering HTML <code class="notranslate">&lt;head&gt;</code> elements</p> <p dir="auto">e.g.<br> component1.js</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Head from 'next/head' &lt;Head&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;/static/style.css&quot; /&gt; &lt;/Head&gt;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Head</span> <span class="pl-k">from</span> <span class="pl-s">'next/head'</span><span class="pl-kos"></span> <span class="pl-c1">&lt;</span><span class="pl-ent">Head</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">link</span> <span class="pl-c1">rel</span><span class="pl-c1">=</span><span class="pl-s">"stylesheet"</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-s">"/static/style.css"</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">Head</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">component2.js</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Head from 'next/head' &lt;Head&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;/static/style.css&quot; /&gt; &lt;/Head&gt;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Head</span> <span class="pl-k">from</span> <span class="pl-s">'next/head'</span><span class="pl-kos"></span> <span class="pl-c1">&lt;</span><span class="pl-ent">Head</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">link</span> <span class="pl-c1">rel</span><span class="pl-c1">=</span><span class="pl-s">"stylesheet"</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-s">"/static/style.css"</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">Head</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">Then the rendered HTML should be, where duplicated tags are unique'd</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;html&gt; &lt;head&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;/static/style.css&quot; class=&quot;next-head&quot; /&gt; &lt;/head&gt; &lt;/html&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">link</span> <span class="pl-c1">rel</span>="<span class="pl-s">stylesheet</span>" <span class="pl-c1">href</span>="<span class="pl-s">/static/style.css</span>" <span class="pl-c1">class</span>="<span class="pl-s">next-head</span>" /&gt; <span class="pl-kos">&lt;/</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span></pre></div> <h2 dir="auto">Current Behavior</h2> <p dir="auto">There will be duplicated tags rendered</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;html&gt; &lt;head&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;/static/style.css&quot; class=&quot;next-head&quot; /&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;/static/style.css&quot; class=&quot;next-head&quot; /&gt; &lt;/head&gt; &lt;/html&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">link</span> <span class="pl-c1">rel</span>="<span class="pl-s">stylesheet</span>" <span class="pl-c1">href</span>="<span class="pl-s">/static/style.css</span>" <span class="pl-c1">class</span>="<span class="pl-s">next-head</span>" /&gt; <span class="pl-kos">&lt;</span><span class="pl-ent">link</span> <span class="pl-c1">rel</span>="<span class="pl-s">stylesheet</span>" <span class="pl-c1">href</span>="<span class="pl-s">/static/style.css</span>" <span class="pl-c1">class</span>="<span class="pl-s">next-head</span>" /&gt; <span class="pl-kos">&lt;/</span><span class="pl-ent">head</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">html</span><span class="pl-kos">&gt;</span></pre></div> <h2 dir="auto">Context</h2> <p dir="auto">I am currently working on a solution with <code class="notranslate">react-apollo</code> which allows the data be pre-fetched before a new page is rendered at client side, the example <a href="https://github.com/zeit/next.js/tree/canary/examples/with-apollo-and-redux">with-apollo-redux</a> only supports prefetching data at server side, therefore, at client side I have to walk through the whole component tree again and do data fetching if one node from the component tree has been wrapped by the <code class="notranslate">graphql</code> HOC.</p> <p dir="auto">Since the component tree contains <code class="notranslate">&lt;Head /&gt;</code> tags that produces side effects while going through the tree, so duplicated <code class="notranslate">&lt;link /&gt;</code> tags get inserted in the DOM. I was supposed to call <code class="notranslate">Head.rewind()</code> but it is not allowed at client side.</p> <p dir="auto">As I know <a href="https://github.com/nfl/react-helmet">react-helmet</a> will not generate duplicated <code class="notranslate">&lt;link /&gt;</code> tags</p> <p dir="auto">I know we should leave user the liberty of inserting duplicated <code class="notranslate">&lt;link /&gt;</code> tags if it is desired. But I believe in most cases user doesn't want it. So I am wondering if it would be OK by adding a <code class="notranslate">unique</code> flag on the tags so the <a href="https://github.com/zeit/next.js/blob/2ec397b3564d5dbca933e8def9cd0801ebd3a2b5/lib/head.js#L50">head.js</a> would de-dupe tags with <code class="notranslate">unique</code> specified.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Head from 'next/head' &lt;Head&gt; &lt;link rel=&quot;stylesheet&quot; href=&quot;/static/style.css&quot; unique /&gt; &lt;/Head&gt;"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-v">Head</span> <span class="pl-k">from</span> <span class="pl-s">'next/head'</span><span class="pl-kos"></span> <span class="pl-c1">&lt;</span><span class="pl-ent">Head</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">link</span> <span class="pl-c1">rel</span><span class="pl-c1">=</span><span class="pl-s">"stylesheet"</span> <span class="pl-c1">href</span><span class="pl-c1">=</span><span class="pl-s">"/static/style.css"</span> <span class="pl-c1">unique</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">Head</span><span class="pl-c1">&gt;</span></pre></div>
0
<p dir="auto">In Bootstrap 3.0.3, when I use the "table table-condensed table-bordered table-striped" classes on a table, the table-striped defeats all the table contextual classes (.success, .warning, .danger, .active) in its rows or cells.</p> <p dir="auto">When only the table-striped class is removed, the contextual classes then work perfectly within the rest of the table-level classes listed above.</p> <p dir="auto">I tried substituting the BS CSS "table-striped" rule so it would colorize the even rows instead of the odd, but it still fails.</p> <p dir="auto">Is this a bug or by design?</p>
<p dir="auto">i have table with class .table-striped. it has 3 rows with tr.danger. only the middle one is red, the other two are default color.</p> <p dir="auto">when i remove .table-striped, it works correctly</p>
1
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">1.9.0-dev / nightly (1.9.0-dev.20160311)</p> <p dir="auto"><strong>Code</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class ModelA&lt;T extends BaseData&gt; { public prop : T; public constructor($prop : T) { } public Foo&lt;TData, TModel&gt;( $fn1 : ($x : T) =&gt; TData, $fn2 : ($x : TData) =&gt; TModel) { } public Foo1&lt;TData, TModel extends ModelA&lt;any&gt;&gt;( $fn1 : ($x : T) =&gt; TData, $fn2 : ($x : TData) =&gt; TModel) { } public Foo2&lt;TData extends BaseData, TModel extends ModelA&lt;TData&gt;&gt;( $fn1 : ($x : T) =&gt; TData, $fn2 : ($x : TData) =&gt; TModel) { } } class ModelB extends ModelA&lt;Data&gt; { } class BaseData { public a : string; } class Data extends BaseData { public b : Data; } class P { public static Run() { var modelA = new ModelA&lt;Data&gt;(new Data()); modelA.Foo(x1 =&gt; x1.b, x2 =&gt; new ModelB(x2)); modelA.Foo1(x1 =&gt; x1.b, x2 =&gt; new ModelB(x2)); // Why is this not working??? inferred type for x2 : BaseData modelA.Foo2(x1 =&gt; x1.b, x2 =&gt; new ModelB(x2)); // Error } }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">ModelA</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span> <span class="pl-k">extends</span> <span class="pl-smi">BaseData</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">prop</span> : <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-k">public</span> <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">$prop</span> : <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-k">public</span> <span class="pl-en">Foo</span><span class="pl-c1">&lt;</span><span class="pl-smi">TData</span><span class="pl-kos">,</span> <span class="pl-smi">TModel</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span> <span class="pl-s1">$fn1</span> : <span class="pl-kos">(</span><span class="pl-s1">$x</span> : <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">TData</span><span class="pl-kos">,</span> <span class="pl-s1">$fn2</span> : <span class="pl-kos">(</span><span class="pl-s1">$x</span> : <span class="pl-smi">TData</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">TModel</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-k">public</span> <span class="pl-en">Foo1</span><span class="pl-c1">&lt;</span><span class="pl-smi">TData</span><span class="pl-kos">,</span> <span class="pl-smi">TModel</span> <span class="pl-k">extends</span> <span class="pl-smi">ModelA</span><span class="pl-kos">&lt;</span><span class="pl-smi">any</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span> <span class="pl-s1">$fn1</span> : <span class="pl-kos">(</span><span class="pl-s1">$x</span> : <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">TData</span><span class="pl-kos">,</span> <span class="pl-s1">$fn2</span> : <span class="pl-kos">(</span><span class="pl-s1">$x</span> : <span class="pl-smi">TData</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">TModel</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-k">public</span> <span class="pl-en">Foo2</span><span class="pl-c1">&lt;</span><span class="pl-smi">TData</span> <span class="pl-k">extends</span> <span class="pl-smi">BaseData</span><span class="pl-kos">,</span> <span class="pl-smi">TModel</span> <span class="pl-k">extends</span> <span class="pl-smi">ModelA</span><span class="pl-kos">&lt;</span><span class="pl-smi">TData</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span> <span class="pl-s1">$fn1</span> : <span class="pl-kos">(</span><span class="pl-s1">$x</span> : <span class="pl-smi">T</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">TData</span><span class="pl-kos">,</span> <span class="pl-s1">$fn2</span> : <span class="pl-kos">(</span><span class="pl-s1">$x</span> : <span class="pl-smi">TData</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-smi">TModel</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">class</span> <span class="pl-smi">ModelB</span> <span class="pl-k">extends</span> <span class="pl-smi">ModelA</span><span class="pl-kos">&lt;</span><span class="pl-smi">Data</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">BaseData</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">a</span> : <span class="pl-smi">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">Data</span> <span class="pl-k">extends</span> <span class="pl-smi">BaseData</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-c1">b</span> : <span class="pl-smi">Data</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">class</span> <span class="pl-smi">P</span> <span class="pl-kos">{</span> <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-en">Run</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">modelA</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-smi">ModelA</span><span class="pl-kos">&lt;</span><span class="pl-smi">Data</span><span class="pl-kos">&gt;</span><span class="pl-kos">(</span><span class="pl-k">new</span> <span class="pl-smi">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-s1">modelA</span><span class="pl-kos">.</span><span class="pl-en">Foo</span><span class="pl-kos">(</span><span class="pl-s1">x1</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">x1</span><span class="pl-kos">.</span><span class="pl-c1">b</span><span class="pl-kos">,</span> <span class="pl-s1">x2</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">new</span> <span class="pl-smi">ModelB</span><span class="pl-kos">(</span><span class="pl-s1">x2</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">modelA</span><span class="pl-kos">.</span><span class="pl-en">Foo1</span><span class="pl-kos">(</span><span class="pl-s1">x1</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">x1</span><span class="pl-kos">.</span><span class="pl-c1">b</span><span class="pl-kos">,</span> <span class="pl-s1">x2</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">new</span> <span class="pl-smi">ModelB</span><span class="pl-kos">(</span><span class="pl-s1">x2</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Why is this not working??? inferred type for x2 : BaseData</span> <span class="pl-s1">modelA</span><span class="pl-kos">.</span><span class="pl-en">Foo2</span><span class="pl-kos">(</span><span class="pl-s1">x1</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">x1</span><span class="pl-kos">.</span><span class="pl-c1">b</span><span class="pl-kos">,</span> <span class="pl-s1">x2</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">new</span> <span class="pl-smi">ModelB</span><span class="pl-kos">(</span><span class="pl-s1">x2</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// Error</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><strong>Expected behavior:</strong><br> modelA.Foo2 call should infer the type.</p> <p dir="auto"><strong>Actual behavior:</strong><br> Is not inferring the actual type.</p>
<p dir="auto"><strong>TypeScript Version:</strong></p> <p dir="auto">1.8.0</p> <p dir="auto"><strong>Code</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Class&lt;T&gt; { new(): T; } declare function create1&lt;T&gt;(ctor: Class&lt;T&gt;): T; declare function create2&lt;T, C extends Class&lt;T&gt;&gt;(ctor: C): T; class A {} let a1 = create1(A); // a: A --&gt; OK let a2 = create2(A); // a: {} --&gt; Should be A"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Class</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">declare</span> <span class="pl-k">function</span> <span class="pl-s1">create1</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">ctor</span>: <span class="pl-smi">Class</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-kos">)</span>: <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-k">declare</span> <span class="pl-k">function</span> <span class="pl-s1">create2</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">C</span> <span class="pl-k">extends</span> <span class="pl-smi">Class</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">ctor</span>: <span class="pl-smi">C</span><span class="pl-kos">)</span>: <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-k">class</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-k">let</span> <span class="pl-s1">a1</span> <span class="pl-c1">=</span> <span class="pl-en">create1</span><span class="pl-kos">(</span><span class="pl-smi">A</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// a: A --&gt; OK</span> <span class="pl-k">let</span> <span class="pl-s1">a2</span> <span class="pl-c1">=</span> <span class="pl-en">create2</span><span class="pl-kos">(</span><span class="pl-smi">A</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// a: {} --&gt; Should be A</span></pre></div> <p dir="auto"><strong>Context</strong></p> <p dir="auto">The example above is simplified to illustrate the difference between <code class="notranslate">create1</code> and <code class="notranslate">create2</code>. I need both type parameters for the use case I have in mind (React) because it returns a type which is parameterized by both <code class="notranslate">T</code> and <code class="notranslate">C</code>:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare function createElement&lt;T, C extends Class&lt;T&gt;&gt;(type: C): Element&lt;T, C&gt;; var e = createElement(A); // e: Element&lt;{}, typeof A&gt; --&gt; Should be Element&lt;A, typeof A&gt; declare function render&lt;T&gt;(e: Element&lt;T, any&gt;): T; var a = render(e); // a: {} --&gt; Should be A"><pre class="notranslate"><span class="pl-k">declare</span> <span class="pl-k">function</span> <span class="pl-s1">createElement</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">C</span> <span class="pl-k">extends</span> <span class="pl-smi">Class</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">type</span>: <span class="pl-smi">C</span><span class="pl-kos">)</span>: <span class="pl-smi">Element</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">C</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">e</span> <span class="pl-c1">=</span> <span class="pl-en">createElement</span><span class="pl-kos">(</span><span class="pl-smi">A</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// e: Element&lt;{}, typeof A&gt; --&gt; Should be Element&lt;A, typeof A&gt;</span> <span class="pl-k">declare</span> <span class="pl-k">function</span> <span class="pl-s1">render</span><span class="pl-c1">&lt;</span><span class="pl-smi">T</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-s1">e</span>: <span class="pl-smi">Element</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">any</span><span class="pl-kos">&gt;</span><span class="pl-kos">)</span>: <span class="pl-smi">T</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-en">render</span><span class="pl-kos">(</span><span class="pl-s1">e</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// a: {} --&gt; Should be A</span></pre></div> <p dir="auto">Again, this is simplified, but the motivation is to improve the return type inference of <code class="notranslate">ReactDOM.render</code>.</p>
1
<h2 dir="auto">Steps to Reproduce</h2> <p dir="auto">Ran the Hello World guide, the app crashes when i run it in debug mode. But then i can start app the app normally and everything works fine, but i could not find a way to attach a debugger.</p> <p dir="auto">I am using a tablet: Lenovo TB3 710I</p> <h2 dir="auto">Logs</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception from flutter run: FormatException: Bad UTF-8 encoding 0xb4 dart:convert/utf.dart 558 _Utf8Decoder.convert dart:convert/string_conversion.dart 333 _Utf8ConversionSink.addSlice dart:convert/string_conversion.dart 329 _Utf8ConversionSink.add dart:convert/chunked_conversion.dart 92 _ConverterStreamEventSink.add dart:async/stream_transformers.dart 119 _SinkTransformerStreamSubscription._handleData package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt;.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt;.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt; dart:async/zone.dart 1158 _rootRunUnary dart:async/zone.dart 1037 _CustomZone.runUnary dart:async/zone.dart 932 _CustomZone.runUnaryGuarded dart:async/stream_impl.dart 331 _BufferingStreamSubscription._sendData dart:async/stream_impl.dart 258 _BufferingStreamSubscription._add dart:async/stream_controller.dart 768 _StreamController&amp;&amp;_SyncStreamControllerDispatch._sendData dart:async/stream_controller.dart 635 _StreamController._add dart:async/stream_controller.dart 581 _StreamController.add dart:io-patch/socket_patch.dart 1680 _Socket._onData package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt;.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt;.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt; dart:async/zone.dart 1162 _rootRunUnary dart:async/zone.dart 1037 _CustomZone.runUnary dart:async/zone.dart 932 _CustomZone.runUnaryGuarded dart:async/stream_impl.dart 331 _BufferingStreamSubscription._sendData dart:async/stream_impl.dart 258 _BufferingStreamSubscription._add dart:async/stream_controller.dart 768 _StreamController&amp;&amp;_SyncStreamControllerDispatch._sendData dart:async/stream_controller.dart 635 _StreamController._add dart:async/stream_controller.dart 581 _StreamController.add dart:io-patch/socket_patch.dart 1247 _RawSocket._RawSocket.&lt;fn&gt; dart:io-patch/socket_patch.dart 781 _NativeSocket.issueReadEvent.issue dart:async/schedule_microtask.dart 41 _microtaskLoop dart:async/schedule_microtask.dart 50 _startMicrotaskLoop dart:isolate-patch/isolate_patch.dart 96 _runPendingImmediateCallback dart:isolate-patch/isolate_patch.dart 149 _RawReceivePortImpl._handleMessage"><pre class="notranslate"><code class="notranslate">Exception from flutter run: FormatException: Bad UTF-8 encoding 0xb4 dart:convert/utf.dart 558 _Utf8Decoder.convert dart:convert/string_conversion.dart 333 _Utf8ConversionSink.addSlice dart:convert/string_conversion.dart 329 _Utf8ConversionSink.add dart:convert/chunked_conversion.dart 92 _ConverterStreamEventSink.add dart:async/stream_transformers.dart 119 _SinkTransformerStreamSubscription._handleData package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt;.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt;.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt; dart:async/zone.dart 1158 _rootRunUnary dart:async/zone.dart 1037 _CustomZone.runUnary dart:async/zone.dart 932 _CustomZone.runUnaryGuarded dart:async/stream_impl.dart 331 _BufferingStreamSubscription._sendData dart:async/stream_impl.dart 258 _BufferingStreamSubscription._add dart:async/stream_controller.dart 768 _StreamController&amp;&amp;_SyncStreamControllerDispatch._sendData dart:async/stream_controller.dart 635 _StreamController._add dart:async/stream_controller.dart 581 _StreamController.add dart:io-patch/socket_patch.dart 1680 _Socket._onData package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt;.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt;.&lt;fn&gt; package:stack_trace/src/stack_zone_specification.dart 185 StackZoneSpecification._run package:stack_trace/src/stack_zone_specification.dart 107 StackZoneSpecification._registerUnaryCallback.&lt;fn&gt; dart:async/zone.dart 1162 _rootRunUnary dart:async/zone.dart 1037 _CustomZone.runUnary dart:async/zone.dart 932 _CustomZone.runUnaryGuarded dart:async/stream_impl.dart 331 _BufferingStreamSubscription._sendData dart:async/stream_impl.dart 258 _BufferingStreamSubscription._add dart:async/stream_controller.dart 768 _StreamController&amp;&amp;_SyncStreamControllerDispatch._sendData dart:async/stream_controller.dart 635 _StreamController._add dart:async/stream_controller.dart 581 _StreamController.add dart:io-patch/socket_patch.dart 1247 _RawSocket._RawSocket.&lt;fn&gt; dart:io-patch/socket_patch.dart 781 _NativeSocket.issueReadEvent.issue dart:async/schedule_microtask.dart 41 _microtaskLoop dart:async/schedule_microtask.dart 50 _startMicrotaskLoop dart:isolate-patch/isolate_patch.dart 96 _runPendingImmediateCallback dart:isolate-patch/isolate_patch.dart 149 _RawReceivePortImpl._handleMessage </code></pre></div> <h2 dir="auto">Flutter Doctor</h2> <p dir="auto">I cant run any flutter command from the IntelliJ terminal.<br> output:<br> flutter: command not found</p> <p dir="auto">Flutter --version output:</p> <p dir="auto">Flutter • channel master • <a href="https://github.com/flutter/flutter.git">https://github.com/flutter/flutter.git</a><br> Framework • revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/3150e3fbd477e9dc21a9f027f14a32cdae5d79f7/hovercard" href="https://github.com/flutter/flutter/commit/3150e3fbd477e9dc21a9f027f14a32cdae5d79f7"><tt>3150e3f</tt></a> (2 hours ago) • 2017-01-13 12:46:13<br> Engine • revision <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/flutter/flutter/commit/b3ed79122edd7172327ce415688ef674d6a7fa5d/hovercard" href="https://github.com/flutter/flutter/commit/b3ed79122edd7172327ce415688ef674d6a7fa5d"><tt>b3ed791</tt></a><br> Tools • Dart 1.21.</p>
<h2 dir="auto">Steps to Reproduce</h2> <ol dir="auto"> <li>cd <code class="notranslate">/examples/hello_world/</code></li> <li>connect a physical Android device</li> <li><code class="notranslate">flutter run</code></li> </ol> <p dir="auto">Output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="mit-macbookpro2:hello_world mit$ flutter run -d 00ca05b380789730 Launching lib/main.dart on Nexus 5X in debug mode... Exception from flutter run: FormatException: Bad UTF-8 encoding 0xff dart:isolate _RawReceivePortImpl._handleMessage Building APK in debug mode (android-arm)... 5081ms Installing build/app.apk... 2435ms Syncing files to device... 3968ms"><pre class="notranslate"><code class="notranslate">mit-macbookpro2:hello_world mit$ flutter run -d 00ca05b380789730 Launching lib/main.dart on Nexus 5X in debug mode... Exception from flutter run: FormatException: Bad UTF-8 encoding 0xff dart:isolate _RawReceivePortImpl._handleMessage Building APK in debug mode (android-arm)... 5081ms Installing build/app.apk... 2435ms Syncing files to device... 3968ms </code></pre></div> <p dir="auto">Running on an Android or iOS simulator does not throw the exception!</p> <h2 dir="auto">Flutter Doctor</h2> <p dir="auto">Paste the output of running <code class="notranslate">flutter doctor</code> here.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ flutter doctor [✓] Flutter (on Mac OS, channel master) • Flutter at /Users/mit/dev/github/flutter • Framework revision 3a43fc88b6 (5 hours ago), 2017-01-31 23:32:10 • Engine revision 2d54edf0f9 • Tools Dart version 1.22.0-dev.9.1 [✓] Android toolchain - develop for Android devices (Android SDK 25.0.0) • Android SDK at /Users/mit/Library/Android/sdk • Platform android-25, build-tools 25.0.0 • ANDROID_HOME = /Users/mit/Library/Android/sdk • Java(TM) SE Runtime Environment (build 1.8.0_112-b16) [✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1) • XCode at /Applications/Xcode.app/Contents/Developer • Xcode 8.2.1, Build version 8C1002 [✓] IntelliJ IDEA Ultimate Edition (version 2016.3.4) • Dart plugin version 163.12753 • Flutter plugin version 0.1.8.1 [✓] Connected devices • Nexus 5X • 00ca05b380789730 • android-arm • Android 7.0 (API 24) • Android SDK built for x86 • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator) $"><pre class="notranslate"><code class="notranslate">$ flutter doctor [✓] Flutter (on Mac OS, channel master) • Flutter at /Users/mit/dev/github/flutter • Framework revision 3a43fc88b6 (5 hours ago), 2017-01-31 23:32:10 • Engine revision 2d54edf0f9 • Tools Dart version 1.22.0-dev.9.1 [✓] Android toolchain - develop for Android devices (Android SDK 25.0.0) • Android SDK at /Users/mit/Library/Android/sdk • Platform android-25, build-tools 25.0.0 • ANDROID_HOME = /Users/mit/Library/Android/sdk • Java(TM) SE Runtime Environment (build 1.8.0_112-b16) [✓] iOS toolchain - develop for iOS devices (Xcode 8.2.1) • XCode at /Applications/Xcode.app/Contents/Developer • Xcode 8.2.1, Build version 8C1002 [✓] IntelliJ IDEA Ultimate Edition (version 2016.3.4) • Dart plugin version 163.12753 • Flutter plugin version 0.1.8.1 [✓] Connected devices • Nexus 5X • 00ca05b380789730 • android-arm • Android 7.0 (API 24) • Android SDK built for x86 • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator) $ </code></pre></div>
1
<p dir="auto">deno: 0.21.0<br> v8: 7.9.304<br> typescript: 3.6.3</p> <p dir="auto">Run this code in both node.js and deno:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let o = {}; o.a = 1; o.b = 2; o.c = 3; o.d = 4; o.e = 5; o.f = 6; console.log(o);"><pre class="notranslate"><code class="notranslate">let o = {}; o.a = 1; o.b = 2; o.c = 3; o.d = 4; o.e = 5; o.f = 6; console.log(o); </code></pre></div> <p dir="auto">Node.js output: { a: 1, b: 2, c: 3, d: 4, e: 5, f: 6 }<br> deno output: { a, b, c, d, e, f }</p> <p dir="auto">So, if there are six or more properties, deno's console.log doesn't show the property values.</p>
<p dir="auto">Match colors and semantics.</p> <p dir="auto">node's stringify has been tweaked and optimized over many years, changing anything is likely surprising in a bad way.</p>
1
<p dir="auto">Julia has kick ass features for computation.<br> However what is the point of computing so much if the data cannot be visualized/inspected ?</p> <p dir="auto">Current 2d plotting capabilities are nice, but no real matlab/scilab/scipy competitor would be credible without some kind of 3d plotting.</p> <p dir="auto">One way of going would be to "port" mayavi to Julia.<br> <a href="http://github.enthought.com/mayavi/mayavi/auto/examples.html" rel="nofollow">http://github.enthought.com/mayavi/mayavi/auto/examples.html</a></p> <p dir="auto">Mayavi builds on top of VTK, so the 3d system itself would not be reinvented from scratch.</p> <p dir="auto">I think this would be relevant feature to have for release 2.0...</p> <p dir="auto">ps: 2d or 3d plotting systems in Julia should have SVG/PDF output, so it can be used in scientific publishing...</p>
<p dir="auto">I would like to discuss moving the Julia buildbots to something more maintainable than <code class="notranslate">buildbot</code>. It's worked well for us for many years, but the siloing of configuration into a separate repository, combined with the realtively slow pace of development as compared to many other competitors (and also the amount of cruft we've built up to get it as far as it is today) means it's time to move to something new.</p> <p dir="auto">Anything we use must have the following features:</p> <ul dir="auto"> <li> <p dir="auto">Multi-platform; it <em>must</em> support runners on all platforms Julia itself is built on. This encompasses:</p> <ul dir="auto"> <li>Linux: <code class="notranslate">x86_64</code> (<code class="notranslate">glibc</code> and <code class="notranslate">musl</code>), <code class="notranslate">i686</code>, <code class="notranslate">armv7l</code>, <code class="notranslate">aarch64</code>, <code class="notranslate">ppc64le</code></li> <li>Windows: <code class="notranslate">x86_64</code>, <code class="notranslate">i686</code></li> <li>MacOS: <code class="notranslate">x86_64</code>, <code class="notranslate">aarch64</code></li> <li>FreeBSD: <code class="notranslate">x86_64</code></li> </ul> </li> <li> <p dir="auto">I would like the build configuration to live in an easily-modifiable format, such as a <code class="notranslate">.yml</code> file in the Julia repository. It's nice if we can test out different configurations just by making a PR against a repository somewhere.</p> </li> </ul> <p dir="auto">Possible options include:</p> <ul dir="auto"> <li> <p dir="auto"><a href="https://docs.gitlab.com/ee/ci/" rel="nofollow">GitLab CI</a> (Note: currently missing <a href="https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1344" rel="nofollow">linux ppc64le support</a>)</p> </li> <li> <p dir="auto"><a href="https://buildkite.com/" rel="nofollow">buildkite</a></p> </li> <li> <p dir="auto"><a href="https://azure.microsoft.com/en-us/services/devops/pipelines/" rel="nofollow">Azure Pipelines</a> (Note: incomplete runner support)</p> </li> <li> <p dir="auto"><a href="https://github.com/features/actions">GitHub Actions</a> (Note: incomplete runner support)</p> </li> </ul> <p dir="auto">I unfortunately likely won't have time to do this all by myself, but if we could get 1-2 community members interested in learning more about CI/CD and who want to help have a hand in bringing the Julia CI story into a better age, I'll be happy to work alongside them.</p>
0
<p dir="auto">Hi,</p> <p dir="auto">If I use a custom distDir:</p> <ul dir="auto"> <li>the following error appears in the console: <code class="notranslate">http://myUrl/_next/-/page/_error</code> / 404 not found</li> <li>hot reloading does not work properly anymore</li> </ul> <p dir="auto">If I go back to the default, it goes away.</p> <p dir="auto">my <code class="notranslate">next.config.js</code> file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// see source file server/config.js module.exports = { webpack: null, poweredByHeader: false, distDir: '.build', assetPrefix: '' }"><pre class="notranslate"><code class="notranslate">// see source file server/config.js module.exports = { webpack: null, poweredByHeader: false, distDir: '.build', assetPrefix: '' } </code></pre></div> <p dir="auto">Thanks,<br> Paul</p>
<p dir="auto">I cannot get the custom distDir to work. Whenever I add a next.config.js file and set the distDir as described in the documentation</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = { distDir: 'build' };"><pre class="notranslate"><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">distDir</span>: <span class="pl-s">'build'</span> <span class="pl-kos">}</span><span class="pl-kos">;</span></pre></div> <p dir="auto">the build is created in that directory, but there is always an exception being thrown in the browser when loading the page.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error when loading route: /_error Error: Error when loading route: /_error at HTMLScriptElement.script.onerror"><pre class="notranslate"><code class="notranslate">Error when loading route: /_error Error: Error when loading route: /_error at HTMLScriptElement.script.onerror </code></pre></div> <p dir="auto">What am I missing? This is reproducible with the simple hello world example.</p>
1
<p dir="auto">Worked around in CI by pinning to 1.8.5, see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="426708741" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/9987" data-hovercard-type="pull_request" data-hovercard-url="/scipy/scipy/pull/9987/hovercard" href="https://github.com/scipy/scipy/pull/9987">gh-9987</a></p> <p dir="auto">For the issue, see e.g. <a href="https://circleci.com/gh/scipy/scipy/12334" rel="nofollow">https://circleci.com/gh/scipy/scipy/12334</a>. It ends with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ./scipy-ref.tex:25: fontspec error: &quot;font-not-found&quot; ! ! The font &quot;FreeSerif&quot; cannot be found. ! ! See the fontspec documentation for further information. ! ! For immediate help type H &lt;return&gt;. !............................................... l.25 ] No pages of output. Transcript written on scipy-ref.log. Latexmk: Log file says no output from latex Latexmk: For rule 'pdflatex', no output was made Latexmk: Errors, so I did not complete making targets Collected error summary (may duplicate other messages): pdflatex: Command for 'pdflatex' gave return code 256 Latexmk: Use the -f option to force complete processing, unless error was exceeding maximum runs of latex/pdflatex. Makefile:32: recipe for target 'scipy-ref.pdf' failed make: *** [scipy-ref.pdf] Error 12 make: Leaving directory '/home/circleci/repo/doc/build/latex' Exited with code 2"><pre class="notranslate"><code class="notranslate"> !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ./scipy-ref.tex:25: fontspec error: "font-not-found" ! ! The font "FreeSerif" cannot be found. ! ! See the fontspec documentation for further information. ! ! For immediate help type H &lt;return&gt;. !............................................... l.25 ] No pages of output. Transcript written on scipy-ref.log. Latexmk: Log file says no output from latex Latexmk: For rule 'pdflatex', no output was made Latexmk: Errors, so I did not complete making targets Collected error summary (may duplicate other messages): pdflatex: Command for 'pdflatex' gave return code 256 Latexmk: Use the -f option to force complete processing, unless error was exceeding maximum runs of latex/pdflatex. Makefile:32: recipe for target 'scipy-ref.pdf' failed make: *** [scipy-ref.pdf] Error 12 make: Leaving directory '/home/circleci/repo/doc/build/latex' Exited with code 2 </code></pre></div>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1889" rel="nofollow">http://projects.scipy.org/scipy/ticket/1889</a> on 2013-04-10 by trac user avneesh, assigned to unknown.</em></p> <p dir="auto">Hello all,</p> <p dir="auto">I notice a somewhat bizarre issue when constructing sparse matrices by initializing with 3-tuples (row index, column index, value).</p> <p dir="auto">The following is a slight abstraction to what my exact code is, but it shows the behavior:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kNN = 10 dataset_size = 1661165 rowIdx = np.empty((kNN+1)*dataset_size) colIdx = np.empty((kNN+1)*dataset_size) vals = np.empty((kNN+1)*dataset_size) for i, line in enumerate(data): #perform certain operations print vals.size, colIdx.size, rowIdx.size print vals[np.nonzero(vals)].size W = sp.csc_matrix((vals, (rowIdx, colIdx)), shape=(dataset_size, dataset_size)) print W.nnz"><pre class="notranslate"><code class="notranslate">kNN = 10 dataset_size = 1661165 rowIdx = np.empty((kNN+1)*dataset_size) colIdx = np.empty((kNN+1)*dataset_size) vals = np.empty((kNN+1)*dataset_size) for i, line in enumerate(data): #perform certain operations print vals.size, colIdx.size, rowIdx.size print vals[np.nonzero(vals)].size W = sp.csc_matrix((vals, (rowIdx, colIdx)), shape=(dataset_size, dataset_size)) print W.nnz </code></pre></div> <p dir="auto">The printed outputs I get are the following:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="18272815 18272815 18272815 18272815 18272465"><pre class="notranslate"><code class="notranslate">18272815 18272815 18272815 18272815 18272465 </code></pre></div> <p dir="auto">Therefore, as you can see, there is a difference of 18272815-18272465 = 350 elements that should be non-zero in the resulting sparse matrix, but are not.</p> <p dir="auto">I have verified in the rowIdx and colIdx arrays that there are no duplicates, i.e., a given (rowIdx, colIdx) pair does not appear twice (otherwise two values would map to the same position in the sparse matrix). As per my understanding, I should get 18272815 elements in the resulting sparse matrix, but I fall 350 elements short.</p> <p dir="auto">Is this expected behavior? Am I doing something wrong?</p> <p dir="auto">I am running Linux x86-64-bit OpenSuSE 11.4, NumPy version 1.5.1, SciPy version 0.9.0, Python 2.7.</p>
0
<p dir="auto">With version 3.1.0, the HintManagerHolder.clear method is executed each time SQL is executed?</p> <p dir="auto">When using HintShardingAlgorithm, you need to set HintManagerHolder before executing SQL. I execute multiple SQL in Dao, or execute multiple Dao methods in a service. I want to set HintManagerHolder in the form of AOP interception before calling the method. Execute clear after the end, there is no way to achieve</p>
<h2 dir="auto">Question</h2> <p dir="auto">Why DriverJDBCExecutor#executor do not handle the error result of branch thread execution?<br> DriverJDBCExecutor#executor:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/43204877/177512854-6437ce45-89f5-431a-9365-e899755c8555.png"><img src="https://user-images.githubusercontent.com/43204877/177512854-6437ce45-89f5-431a-9365-e899755c8555.png" alt="image" style="max-width: 100%;"></a><br> JDBCExecutorCallback#execute:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/43204877/177512621-edf3fba5-1801-4d0d-846a-eece36fbb9dc.png"><img src="https://user-images.githubusercontent.com/43204877/177512621-edf3fba5-1801-4d0d-846a-eece36fbb9dc.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">In this way, the result of the overall sql execution is inconsistent with the expected result.</p> <p dir="auto">eg:<br> insert into xx_table (id,xxx,xxx) values (1,xx,xxx),(2,xxx,xxx);</p> <p dir="auto">This statement will route to two datasources, ds0, ds1.</p> <p dir="auto">If there is a row with primary key 1 in ds1, it will throw exception: Duplicate entry '1' for key 'PRIMARY';<br> The final result is: the sql routed to ds0 is successfully executed, and the sql execution of ds1 fails.</p> <p dir="auto">Why is it not processed as all failures, which leads to data inconsistency, and distributed transactions will not be rolled back</p>
0
<p dir="auto">Hi</p> <p dir="auto">I have a select box that has to contain the following options. Mention the same label for the options "audi" and "ford".</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;select&gt; &lt;option value=&quot;volvo&quot;&gt;Volvo&lt;/option&gt; &lt;option value=&quot;saab&quot;&gt;Saab&lt;/option&gt; &lt;option value=&quot;opel&quot;&gt;Opel&lt;/option&gt; &lt;option value=&quot;audi&quot;&gt;Audi&lt;/option&gt; &lt;option value=&quot;ford&quot;&gt;Audi&lt;/option&gt; &lt;/select&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">select</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">volvo</span>"<span class="pl-kos">&gt;</span>Volvo<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">saab</span>"<span class="pl-kos">&gt;</span>Saab<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">opel</span>"<span class="pl-kos">&gt;</span>Opel<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">audi</span>"<span class="pl-kos">&gt;</span>Audi<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">ford</span>"<span class="pl-kos">&gt;</span>Audi<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">select</span><span class="pl-kos">&gt;</span></pre></div> <p dir="auto">When I try to render this in Symfony 2.7, my FormType looks like this.</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$builder-&gt;add('brand', 'choice', array( 'choices' =&gt; array( 'volvo' =&gt; 'Volvo', 'saab' =&gt; 'Saab', 'opel' =&gt; 'Opel', 'audi' =&gt; 'Audi', 'ford' =&gt; 'Audi' ) ));"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>builder</span>-&gt;<span class="pl-en">add</span>(<span class="pl-s">'brand'</span>, <span class="pl-s">'choice'</span>, <span class="pl-en">array</span>( <span class="pl-s">'choices'</span> =&gt; <span class="pl-en">array</span>( <span class="pl-s">'volvo'</span> =&gt; <span class="pl-s">'Volvo'</span>, <span class="pl-s">'saab'</span> =&gt; <span class="pl-s">'Saab'</span>, <span class="pl-s">'opel'</span> =&gt; <span class="pl-s">'Opel'</span>, <span class="pl-s">'audi'</span> =&gt; <span class="pl-s">'Audi'</span>, <span class="pl-s">'ford'</span> =&gt; <span class="pl-s">'Audi'</span> ) ));</pre></div> <p dir="auto">I would assume all 5 fields are going to get rendered. In fact, only 4 get rendered and the view looks like this:</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;select id=&quot;...&quot;&gt; &lt;option value=&quot;volvo&quot;&gt;Volvo&lt;/option&gt; &lt;option value=&quot;saab&quot;&gt;Saab&lt;/option&gt; &lt;option value=&quot;opel&quot;&gt;Opel&lt;/option&gt; &lt;option value=&quot;ford&quot;&gt;Audi&lt;/option&gt; &lt;/select&gt;"><pre class="notranslate"><span class="pl-kos">&lt;</span><span class="pl-ent">select</span> <span class="pl-c1">id</span>="<span class="pl-s">...</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">volvo</span>"<span class="pl-kos">&gt;</span>Volvo<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">saab</span>"<span class="pl-kos">&gt;</span>Saab<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">opel</span>"<span class="pl-kos">&gt;</span>Opel<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">option</span> <span class="pl-c1">value</span>="<span class="pl-s">ford</span>"<span class="pl-kos">&gt;</span>Audi<span class="pl-kos">&lt;/</span><span class="pl-ent">option</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">select</span><span class="pl-kos">&gt;</span></pre></div> <p dir="auto">It seems the option with value "audi" is overriden by the option with value "ford". I don't know if this is standard behaviour or a bug, but it's quite annoying. Can any of you help me?</p> <p dir="auto">Thanks in advance!</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>yes</td> </tr> <tr> <td>BC Break report?</td> <td>?</td> </tr> <tr> <td>RFC?</td> <td>?</td> </tr> <tr> <td>Symfony version</td> <td>3.2.7</td> </tr> </tbody> </table> <p dir="auto">In the <a href="http://symfony.com/doc/current/form/data_transformers.html#creating-the-transformer" rel="nofollow">documentation for data transformers</a>, the input is validated in the IssueToNumberTransformer class, and the error message is set in the TaskType class. What if there are multiple types of invalid input, can there be a way to have multiple error messages?</p> <p dir="auto">I know this can be done with Symfony\Component\Validator\Constraints in the Entity class, but since validation must also take place in the data transformer, I think there should be a way to have more control over the error messages.</p>
0
<p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p> <p dir="auto">System information</p> <p dir="auto">OS : Windows 10<br> TensorFlow installed from (source or binary): from pip<br> TensorFlow version: 1.11.0<br> Python version: 3.6<br> Installed using virtualenv? pip? conda?: conda<br> Bazel version (if compiling from source): No<br> GCC/Compiler version (if compiling from source):<br> CUDA/cuDNN version: 10<br> GPU model and memory: Nvidia 1050Ti</p> <p dir="auto"><strong>Describe the problem</strong><br> Recently I tried updating my tensor flow and later on, my tensorflow-gpu stopped working.<br> Now I have downgraded to 1.11.0 but then still my tensorflow-gpu is not working.</p> <p dir="auto">nvidia-smi is working fine.<br> +-----------------------------------------------------------------------------+<br> | NVIDIA-SMI 416.34 Driver Version: 416.34 CUDA Version: 10.0 |<br> |-------------------------------+----------------------+----------------------+<br> | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |<br> | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |<br> |===============================+======================+======================|<br> | 0 GeForce GTX 105... WDDM | 00000000:01:00.0 Off | N/A |<br> | N/A 48C P8 N/A / N/A | 78MiB / 4096MiB | 0% Default |<br> +-------------------------------+----------------------+----------------------+</p> <p dir="auto">+-----------------------------------------------------------------------------+<br> | Processes: GPU Memory |<br> | GPU PID Type Process name Usage |<br> |==================================================|<br> | No running processes found |<br> +-----------------------------------------------------------------------------+</p> <p dir="auto">tf.test.is_gpu_available(<br> cuda_only=False,<br> min_cuda_compute_capability=None<br> )</p> <p dir="auto">I ran this, its coming false</p> <p dir="auto">then ,<br> I ran this sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))<br> Device mapping: no known devices.<br> 2018-11-26 17:27:10.277030: I tensorflow/core/common_runtime/direct_session.cc:291] Device mapping:</p> <p dir="auto">it's coming empty, I read lot of threads usually people had error with cuda, by installing that it worked for lot of people.</p> <p dir="auto">But then in my case things were working fine earlier, now it got messed up and cuda is installed properly.</p> <p dir="auto">why should I do?</p>
<p dir="auto">Hi:<br> my program have bug in these code line:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" word_embeddings = tf.scatter_nd_update(var_output, error_word_f, sum_all) word_embeddings_2 = tf.nn.dropout(word_embeddings, self.dropout_pl)"><pre class="notranslate"><code class="notranslate"> word_embeddings = tf.scatter_nd_update(var_output, error_word_f, sum_all) word_embeddings_2 = tf.nn.dropout(word_embeddings, self.dropout_pl) </code></pre></div> <h1 dir="auto">The error hint as follows:<br> ValueError: Tensor conversion requested dtype float32_ref for Tensor with dtype float32: 'Tensor("dropout:0", shape=(), dtype=float32)</h1> <p dir="auto">it looks like word_embeddings 's dtype is float32_ref but actual the function tf.nn.dropout need word_embeddings dtype float32 ,how can i convert word_embeddings's dtype float32_ref to float32 before run tf.nn.dropout(word_embeddings, self.dropout_pl)?</p>
0
<p dir="auto"><a href="https://babeljs.io/repl/#?experimental=true&amp;evaluate=true&amp;loose=false&amp;spec=false&amp;playground=false&amp;code=%40test(()%20%3D%3E%20123)%0Aclass%20A%20%7B%7D%0A%0A%40test(()%20%3D%3E%20%7B%20return%20123%20%7D)%0Aclass%20B%20%7B%7D%0A%0A%40test(function()%20%7B%20return%20123%20%7D)%0Aclass%20%D0%A1%20%7B%7D" rel="nofollow">https://babeljs.io/repl/#?experimental=true&amp;evaluate=true&amp;loose=false&amp;spec=false&amp;playground=false&amp;code=%40test(()%20%3D%3E%20123)%0Aclass%20A%20%7B%7D%0A%0A%40test(()%20%3D%3E%20%7B%20return%20123%20%7D)%0Aclass%20B%20%7B%7D%0A%0A%40test(function()%20%7B%20return%20123%20%7D)%0Aclass%20%D0%A1%20%7B%7D</a></p>
<p dir="auto">Compare the output of these two to show the difference.</p> <p dir="auto"><a href="https://babeljs.io/repl/#?experimental=true&amp;evaluate=true&amp;loose=false&amp;spec=false&amp;code=%40decorate((arg)%20%3D%3E%20null)%0Aclass%20Example1%20%7B%0A%7D%0A%0A%40decorate(arg%20%3D%3E%20null)%0Aclass%20Example2%20%7B%0A%7D" rel="nofollow">https://babeljs.io/repl/#?experimental=true&amp;evaluate=true&amp;loose=false&amp;spec=false&amp;code=%40decorate((arg)%20%3D%3E%20null)%0Aclass%20Example1%20%7B%0A%7D%0A%0A%40decorate(arg%20%3D%3E%20null)%0Aclass%20Example2%20%7B%0A%7D</a></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@decorate((arg) =&gt; null) class Example1 { } @decorate(arg =&gt; null) class Example2 { }"><pre class="notranslate">@<span class="pl-en">decorate</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-s1">arg</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">null</span><span class="pl-kos">)</span> <span class="pl-k">class</span> <span class="pl-v">Example1</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span> @<span class="pl-en">decorate</span><span class="pl-kos">(</span><span class="pl-s1">arg</span> <span class="pl-c1">=&gt;</span> <span class="pl-c1">null</span><span class="pl-kos">)</span> <span class="pl-k">class</span> <span class="pl-v">Example2</span> <span class="pl-kos">{</span> <span class="pl-kos">}</span></pre></div>
1
<p dir="auto">Challenge <a href="http://beta.freecodecamp.com/en/challenges/css-flexbox/using-the-justifycontent-property-in-the-tweet-embed" rel="nofollow">using-the-justifycontent-property-in-the-tweet-embed</a> has an issue.<br> User Agent is: <code class="notranslate">Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36</code>.<br> Please describe how to reproduce this issue, and include links to screenshots if possible.<br> It makes me pass the challenge even if I have not inserted the css statement<br> justify-content:center;</p> <div class="highlight highlight-text-html-basic notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" &lt;style&gt; body { font-family: Arial, sans-serif; } header, footer { display: flex; flex-direction: row; } header .profile-thumbnail { width: 50px; height: 50px; border-radius: 4px; } header .profile-name { display: flex; flex-direction: column; margin-left: 10px; } header .follow-btn { display: flex; margin: 0 0 0 auto; } header .follow-btn button { border: 0; border-radius: 3px; padding: 5px; } header h3, header h4 { display: flex; margin: 0; } #inner p { margin-bottom: 10px; font-size: 20px; } #inner hr { margin: 20px 0; border-style: solid; opacity: 0.1; } footer .stats { display: flex; font-size: 15px; } footer .stats strong { font-size: 18px; } footer .stats .likes { margin-left: 10px; } footer .cta { margin-left: auto; } footer .cta button { border: 0; background: transparent; } &lt;/style&gt; &lt;header&gt; &lt;img src=&quot;https://pbs.twimg.com/profile_images/378800000147359764/54dc9a5c34e912f34db8662d53d16a39_400x400.png&quot; alt=&quot;Quincy Larson's profile picture&quot; class=&quot;profile-thumbnail&quot;&gt; &lt;div class=&quot;profile-name&quot;&gt; &lt;h3&gt;Quincy Larson&lt;/h3&gt; &lt;h4&gt;@ossia&lt;/h4&gt; &lt;/div&gt; &lt;div class=&quot;follow-btn&quot;&gt; &lt;button&gt;Follow&lt;/button&gt; &lt;/div&gt; &lt;/header&gt; &lt;div id=&quot;inner&quot;&gt; &lt;p&gt;How would you describe to a layperson the relationship between Node, Express, and npm in a single tweet? An analogy would be helpful.&lt;/p&gt; &lt;span class=&quot;date&quot;&gt;7:24 PM - 17 Aug 2016&lt;/span&gt; &lt;hr&gt; &lt;/div&gt; &lt;footer&gt; &lt;div class=&quot;stats&quot;&gt; &lt;div class=&quot;retweets&quot;&gt; &lt;strong&gt;56,203&lt;/strong&gt; RETWEETS &lt;/div&gt; &lt;div class=&quot;likes&quot;&gt; &lt;strong&gt;84,703&lt;/strong&gt; LIKES &lt;/div&gt; &lt;/div&gt; &lt;div class=&quot;cta&quot;&gt; &lt;button class=&quot;share-btn&quot;&gt;Share&lt;/button&gt; &lt;button class=&quot;retweet-btn&quot;&gt;Retweet&lt;/button&gt; &lt;button class=&quot;like-btn&quot;&gt;Like&lt;/button&gt; &lt;/div&gt; &lt;/footer&gt; ``` "><pre class="notranslate"> <span class="pl-kos">&lt;</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> <span class="pl-ent">body</span> { <span class="pl-c1">font-family</span><span class="pl-kos">:</span> Arial<span class="pl-kos">,</span> sans-serif; } <span class="pl-ent">header</span><span class="pl-kos">,</span> <span class="pl-ent">footer</span> { <span class="pl-c1">display</span><span class="pl-kos">:</span> flex; <span class="pl-c1">flex-direction</span><span class="pl-kos">:</span> row; } <span class="pl-ent">header</span> .<span class="pl-c1">profile-thumbnail</span> { <span class="pl-c1">width</span><span class="pl-kos">:</span> <span class="pl-c1">50<span class="pl-smi">px</span></span>; <span class="pl-c1">height</span><span class="pl-kos">:</span> <span class="pl-c1">50<span class="pl-smi">px</span></span>; <span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">4<span class="pl-smi">px</span></span>; } <span class="pl-ent">header</span> .<span class="pl-c1">profile-name</span> { <span class="pl-c1">display</span><span class="pl-kos">:</span> flex; <span class="pl-c1">flex-direction</span><span class="pl-kos">:</span> column; <span class="pl-c1">margin-left</span><span class="pl-kos">:</span> <span class="pl-c1">10<span class="pl-smi">px</span></span>; } <span class="pl-ent">header</span> .<span class="pl-c1">follow-btn</span> { <span class="pl-c1">display</span><span class="pl-kos">:</span> flex; <span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span> <span class="pl-c1">0</span> auto; } <span class="pl-ent">header</span> .<span class="pl-c1">follow-btn</span> <span class="pl-ent">button</span> { <span class="pl-c1">border</span><span class="pl-kos">:</span> <span class="pl-c1">0</span>; <span class="pl-c1">border-radius</span><span class="pl-kos">:</span> <span class="pl-c1">3<span class="pl-smi">px</span></span>; <span class="pl-c1">padding</span><span class="pl-kos">:</span> <span class="pl-c1">5<span class="pl-smi">px</span></span>; } <span class="pl-ent">header</span> <span class="pl-ent">h3</span><span class="pl-kos">,</span> <span class="pl-ent">header</span> <span class="pl-ent">h4</span> { <span class="pl-c1">display</span><span class="pl-kos">:</span> flex; <span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">0</span>; } <span class="pl-kos">#</span><span class="pl-c1">inner</span> <span class="pl-ent">p</span> { <span class="pl-c1">margin-bottom</span><span class="pl-kos">:</span> <span class="pl-c1">10<span class="pl-smi">px</span></span>; <span class="pl-c1">font-size</span><span class="pl-kos">:</span> <span class="pl-c1">20<span class="pl-smi">px</span></span>; } <span class="pl-kos">#</span><span class="pl-c1">inner</span> <span class="pl-ent">hr</span> { <span class="pl-c1">margin</span><span class="pl-kos">:</span> <span class="pl-c1">20<span class="pl-smi">px</span></span> <span class="pl-c1">0</span>; <span class="pl-c1">border-style</span><span class="pl-kos">:</span> solid; <span class="pl-c1">opacity</span><span class="pl-kos">:</span> <span class="pl-c1">0.1</span>; } <span class="pl-ent">footer</span> .<span class="pl-c1">stats</span> { <span class="pl-c1">display</span><span class="pl-kos">:</span> flex; <span class="pl-c1">font-size</span><span class="pl-kos">:</span> <span class="pl-c1">15<span class="pl-smi">px</span></span>; } <span class="pl-ent">footer</span> .<span class="pl-c1">stats</span> <span class="pl-ent">strong</span> { <span class="pl-c1">font-size</span><span class="pl-kos">:</span> <span class="pl-c1">18<span class="pl-smi">px</span></span>; } <span class="pl-ent">footer</span> .<span class="pl-c1">stats</span> .<span class="pl-c1">likes</span> { <span class="pl-c1">margin-left</span><span class="pl-kos">:</span> <span class="pl-c1">10<span class="pl-smi">px</span></span>; } <span class="pl-ent">footer</span> .<span class="pl-c1">cta</span> { <span class="pl-c1">margin-left</span><span class="pl-kos">:</span> auto; } <span class="pl-ent">footer</span> .<span class="pl-c1">cta</span> <span class="pl-ent">button</span> { <span class="pl-c1">border</span><span class="pl-kos">:</span> <span class="pl-c1">0</span>; <span class="pl-c1">background</span><span class="pl-kos">:</span> transparent; } <span class="pl-kos">&lt;/</span><span class="pl-ent">style</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">header</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">img</span> <span class="pl-c1">src</span>="<span class="pl-s">https://pbs.twimg.com/profile_images/378800000147359764/54dc9a5c34e912f34db8662d53d16a39_400x400.png</span>" <span class="pl-c1">alt</span>="<span class="pl-s">Quincy Larson's profile picture</span>" <span class="pl-c1">class</span>="<span class="pl-s">profile-thumbnail</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">profile-name</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h3</span><span class="pl-kos">&gt;</span>Quincy Larson<span class="pl-kos">&lt;/</span><span class="pl-ent">h3</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span>@ossia<span class="pl-kos">&lt;/</span><span class="pl-ent">h4</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">follow-btn</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span>Follow<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">header</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">id</span>="<span class="pl-s">inner</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span>How would you describe to a layperson the relationship between Node, Express, and npm in a single tweet? An analogy would be helpful.<span class="pl-kos">&lt;/</span><span class="pl-ent">p</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">span</span> <span class="pl-c1">class</span>="<span class="pl-s">date</span>"<span class="pl-kos">&gt;</span>7:24 PM - 17 Aug 2016<span class="pl-kos">&lt;/</span><span class="pl-ent">span</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">hr</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">footer</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">stats</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">retweets</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">strong</span><span class="pl-kos">&gt;</span>56,203<span class="pl-kos">&lt;/</span><span class="pl-ent">strong</span><span class="pl-kos">&gt;</span> RETWEETS <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">likes</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">strong</span><span class="pl-kos">&gt;</span>84,703<span class="pl-kos">&lt;/</span><span class="pl-ent">strong</span><span class="pl-kos">&gt;</span> LIKES <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">div</span> <span class="pl-c1">class</span>="<span class="pl-s">cta</span>"<span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">share-btn</span>"<span class="pl-kos">&gt;</span>Share<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">retweet-btn</span>"<span class="pl-kos">&gt;</span>Retweet<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;</span><span class="pl-ent">button</span> <span class="pl-c1">class</span>="<span class="pl-s">like-btn</span>"<span class="pl-kos">&gt;</span>Like<span class="pl-kos">&lt;/</span><span class="pl-ent">button</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">div</span><span class="pl-kos">&gt;</span> <span class="pl-kos">&lt;/</span><span class="pl-ent">footer</span><span class="pl-kos">&gt;</span> ``` </pre></div>
<p dir="auto">Challenge [Steamroller](<a href="https://www.freecodecamp.com/challenges/steamroller" rel="nofollow">https://www.freecodecamp.com/challenges/steamroller</a> has an issue.</p> <p dir="auto"><strong>User Agent is</strong>:<br> <code class="notranslate">Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36</code>.</p> <p dir="auto"><strong>Issue Description</strong> :<br> Global Variables value is not getting flushed.</p> <p dir="auto">My code:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var tempArr = []; function steamrollArray(arr) { // I'm a steamroller, baby tempArr = []; // To fix the global var issue , we need to reset that global var arr = arr.map(function(val,index){ return checkForArray(val); }); console.log('tempArr',tempArr); return tempArr; } function checkForArray(val_arr){ if(!Array.isArray(val_arr)) {tempArr.push(val_arr);return val_arr;} val_arr.map(function(val,index){ if(Array.isArray(val)){ return checkForArray(val); } else { tempArr.push(val); return val; } }); } steamrollArray([1, {}, [3, [[4]]]]);"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">tempArr</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">function</span> <span class="pl-en">steamrollArray</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">// I'm a steamroller, baby</span> <span class="pl-s1">tempArr</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span> <span class="pl-c">// To fix the global var issue , we need to reset that global var</span> <span class="pl-s1">arr</span> <span class="pl-c1">=</span> <span class="pl-s1">arr</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">,</span><span class="pl-s1">index</span><span class="pl-kos">)</span><span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-en">checkForArray</span><span class="pl-kos">(</span><span class="pl-s1">val</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'tempArr'</span><span class="pl-kos">,</span><span class="pl-s1">tempArr</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-s1">tempArr</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">function</span> <span class="pl-en">checkForArray</span><span class="pl-kos">(</span><span class="pl-s1">val_arr</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-v">Array</span><span class="pl-kos">.</span><span class="pl-en">isArray</span><span class="pl-kos">(</span><span class="pl-s1">val_arr</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-s1">tempArr</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">val_arr</span><span class="pl-kos">)</span><span class="pl-kos">;</span><span class="pl-k">return</span> <span class="pl-s1">val_arr</span><span class="pl-kos">;</span><span class="pl-kos">}</span> <span class="pl-s1">val_arr</span><span class="pl-kos">.</span><span class="pl-en">map</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">,</span><span class="pl-s1">index</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-v">Array</span><span class="pl-kos">.</span><span class="pl-en">isArray</span><span class="pl-kos">(</span><span class="pl-s1">val</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-en">checkForArray</span><span class="pl-kos">(</span><span class="pl-s1">val</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-kos">{</span> <span class="pl-s1">tempArr</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">val</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-s1">val</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">steamrollArray</span><span class="pl-kos">(</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-kos">}</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-kos">[</span><span class="pl-kos">[</span><span class="pl-c1">4</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>
0
<p dir="auto">Hi,</p> <p dir="auto">Just installed deno and try to run welcome.ts file which is mentioned in docs, i am facing this issue. Details are below.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="D:\deno&gt;deno run https://deno.land/welcome.ts Downloading https://deno.land/welcome.ts WARN RS - Sending fatal alert BadCertificate an error occurred trying to connect: invalid certificate: UnknownIssuer an error occurred trying to connect: invalid certificate: UnknownIssuer"><pre class="notranslate"><code class="notranslate">D:\deno&gt;deno run https://deno.land/welcome.ts Downloading https://deno.land/welcome.ts WARN RS - Sending fatal alert BadCertificate an error occurred trying to connect: invalid certificate: UnknownIssuer an error occurred trying to connect: invalid certificate: UnknownIssuer </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="D:\deno&gt;deno version deno: 0.4.0 v8: 7.6.53 typescript: 3.4.1"><pre class="notranslate"><code class="notranslate">D:\deno&gt;deno version deno: 0.4.0 v8: 7.6.53 typescript: 3.4.1 </code></pre></div> <p dir="auto">Anybody faced this issue.</p>
<p dir="auto">There should be a way to allow insecure https requests, using <code class="notranslate">window.fetch()</code> for example.<br> It should disable certificate validation for all requests made from the program.</p> <p dir="auto">As of implementation, there are two optoins that come to my mind: environment variable and flag. Below are some examples of how it's done in other web-related software, so we can come up with intuitive name and approach.</p> <p dir="auto">Examples:</p> <ul dir="auto"> <li>In NodeJS, <a href="https://github.com/nodejs/node/blob/2cb8f247512d611d3dfe81c2441e8028bfb0e8f0/doc/api/cli.md#node_tls_reject_unauthorizedvalue">there is</a> a <code class="notranslate">NODE_TLS_REJECT_UNAUTHORIZED</code> environment variable that can be set to <code class="notranslate">0</code> to disable TLS certificate validation. It takes name from <a href="https://nodejs.org/docs/latest/api/tls.html#tls_tls_connect_options_callback" rel="nofollow">tls.connect options.rejectUnauthorized</a></li> <li>In curl, there's a <code class="notranslate">-k</code> or <code class="notranslate">--insecure</code> flag, which allows insecure server connections when using SSL</li> <li>In Chrome, there's a <code class="notranslate">--unsafely-treat-insecure-origin-as-secure="https://example.com"</code> for the same purposes</li> <li>For WebDrivers, there's <a href="https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/acceptInsecureCerts" rel="nofollow">acceptInsecureCerts</a> capability. It can allow self-signed or otherwise invalid certificates to be implicitly trusted by the browser.</li> </ul> <p dir="auto">That said, I'd like to see <code class="notranslate">--accept-insecure-certs</code> flag option, because deno already uses flags for a lot of things, including permissions.</p> <hr> <p dir="auto">My use-case: I'm using a corporate Windows laptop with network monitoring. AFAIK, all https requests are also monitored, so there's a custom SSL-certificate installed system-wide. So, most of the software, that uses system CA storage, works just fine. But some uses custom or bundled CA, and it seems like it's a case with deno. Anyway, it downloads deps just fine, but fails to perfprm any https request.</p> <p dir="auto">Issue created as a follow up to gitter conversation: <a href="https://gitter.im/denolife/Lobby?at=5c1965a79f431114186027c0" rel="nofollow">December 18, 2018 1:24 PM</a></p>
1
<h3 dir="auto">Problem description</h3> <p dir="auto">When props.animated is true, Popover calls setState from within a setTimeout.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// in componentWillReceiveProps if (nextProps.animated) { this.setState({ closing: true }); this.timeout = setTimeout(function () { _this2.setState({ open: false }); }, 500); }"><pre class="notranslate"><span class="pl-c">// in componentWillReceiveProps</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">nextProps</span><span class="pl-kos">.</span><span class="pl-c1">animated</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">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">closing</span>: <span class="pl-c1">true</span> <span class="pl-kos">}</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-c1">timeout</span> <span class="pl-c1">=</span> <span class="pl-en">setTimeout</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-s1">_this2</span><span class="pl-kos">.</span><span class="pl-en">setState</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">open</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-kos">,</span> <span class="pl-c1">500</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">Because <a href="https://facebook.github.io/react/blog/2016/01/08/A-implies-B-does-not-imply-B-implies-A.html" rel="nofollow">componentWillReceiveProps doesn't mean that props changed</a>, Popover has the potential to call setState from within the setTimeout multiple times, when no props have changed. For me, this is consistently causing an error where setState is called on an unmounted component.</p> <h3 dir="auto">Steps to reproduce</h3> <p dir="auto">Rapidly re-render Popover (animated=true) after having changed open to false.</p> <h3 dir="auto">Versions</h3> <ul dir="auto"> <li>Material-UI: 0.15.3</li> <li>React: 15.3.0</li> <li>Browser: Chrome Version 52.0.2743.116 (64-bit)</li> </ul>
<h2 dir="auto">Problem Description</h2> <p dir="auto">On occasion clicking the SelectField will result in the label text disappearing and the dropdown menu not displaying. Clicking the SelectField again will cause the label text to reappear and clicking again brings up the dropdown menu as expected. The dropdown seems to briefly load before disappearing.</p> <p dir="auto">I'm encountering this issue on both my own app and the <a href="http://www.material-ui.com/#/components/select-field" rel="nofollow">material-ui examples</a> for the SelectField component. I've attached a gif of the bug on the material-ui examples.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/5589795/15032719/c68e541c-1218-11e6-89e6-a7a2c13fa0dd.gif"><img src="https://cloud.githubusercontent.com/assets/5589795/15032719/c68e541c-1218-11e6-89e6-a7a2c13fa0dd.gif" alt="select field bug" data-animated-image="" style="max-width: 100%;"></a></p> <h2 dir="auto">Versions</h2> <ul dir="auto"> <li>Material-UI: 0.14.4</li> <li>React: 0.14.8</li> <li>Browser: Chrome 50.0.2661.94 (64-bit) and Safari 9.1</li> </ul>
1
<p dir="auto">We need a shorcut for move windows aplications to another virtual desktop. I use MoveToDesktop by Eun: <a href="github.com/Eun/MoveToDesktop">MoveToDesktop</a>, <del>but it cannot be configured</del>.</p> <p dir="auto">This tool provide combination for move application to next virtual desktop using "win+alt+arrow" powerstroke.</p>
<p dir="auto">Such as press twice 'Alt' to open PowerToys Run, Alfred can do this, this is powerful, and will help people who want to migrate from MacOS just like me, thanks.</p>
0
<h4 dir="auto">Twitch TV challenge</h4> <p dir="auto"><a href="https://www.freecodecamp.com/challenges/use-the-twitchtv-json-api" rel="nofollow">https://www.freecodecamp.com/challenges/use-the-twitchtv-json-api</a></p> <h4 dir="auto">Issue Description</h4> <p dir="auto">Your example site <a href="https://codepen.io/FreeCodeCamp/full/Myvqmo/" rel="nofollow">https://codepen.io/FreeCodeCamp/full/Myvqmo/</a> is not working. link to each Twitch Channel is 404. Also, channel information is not displayed properley - it just says "Account Closed" for all the channels.</p> <h4 dir="auto">Browser Information</h4> <p dir="auto">Chrome on MAC desktop</p>
<h4 dir="auto">Challenge Name</h4> <p dir="auto"><a href="https://www.freecodecamp.com/challenges/use-the-twitchtv-json-api" rel="nofollow">https://www.freecodecamp.com/challenges/use-the-twitchtv-json-api</a></p> <h4 dir="auto">Issue Description</h4> <p dir="auto">JSONP calls to the channels API result in a bad request. This is due to an update to the Twitchtv API which now requires a client id, which means creating an account and registering your application with the service. Details can be read from the official developer blog:</p> <p dir="auto"><a href="https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843#.pm46cq40d" rel="nofollow">https://blog.twitch.tv/client-id-required-for-kraken-api-calls-afbb8e95f843#.pm46cq40d</a></p> <p dir="auto">I confirmed this by console logging the response object from the channels API on my application and comparing it with the example provided by Free Code Camp (see screenshots).</p> <h4 dir="auto">Browser Information</h4> <p dir="auto">N/A</p> <h4 dir="auto">Your Code</h4> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" "><pre class="notranslate"></pre></div> <h4 dir="auto">Screenshot</h4> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6819989/18536972/f54ebea2-7acf-11e6-9745-eba5e79136d3.png"><img src="https://cloud.githubusercontent.com/assets/6819989/18536972/f54ebea2-7acf-11e6-9745-eba5e79136d3.png" alt="screen shot 2016-09-14 at 10 44 41 pm" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/6819989/18536976/fcf2e7d2-7acf-11e6-81fc-39571f44818c.png"><img src="https://cloud.githubusercontent.com/assets/6819989/18536976/fcf2e7d2-7acf-11e6-81fc-39571f44818c.png" alt="screen shot 2016-09-14 at 10 45 05 pm" style="max-width: 100%;"></a></p>
1
<h2 dir="auto">Bug Report</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I would like to work on a fix!</li> </ul> <p dir="auto"><strong>Current behavior</strong><br> A clear and concise description of the behavior.</p> <p dir="auto"><code class="notranslate">generate()</code> produces incorrect code for arrow function expression.</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const generate = require('@babel/generator').default; const node = t.arrowFunctionExpression( [], t.objectExpression( [] ) ); console.log( generate( node ) );"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">generate</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'@babel/generator'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">default</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">node</span> <span class="pl-c1">=</span> <span class="pl-s1">t</span><span class="pl-kos">.</span><span class="pl-en">arrowFunctionExpression</span><span class="pl-kos">(</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-s1">t</span><span class="pl-kos">.</span><span class="pl-en">objectExpression</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span> <span class="pl-s1">generate</span><span class="pl-kos">(</span> <span class="pl-s1">node</span> <span class="pl-kos">)</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Output:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="() =&gt; {}"><pre class="notranslate"><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></pre></div> <p dir="auto">Output should be:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="() =&gt; ({})"><pre class="notranslate"><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></pre></div> <p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong></p> <p dir="auto">No config used. The above is the complete reproduction case.</p> <p dir="auto"><strong>Environment</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="System: OS: macOS Mojave 10.14.6 Binaries: Node: 14.9.0 - ~/.nvm/versions/node/v14.9.0/bin/node npm: 6.14.8 - ~/.nvm/versions/node/v14.9.0/bin/npm npmPackages: @babel/core: ^7.11.6 =&gt; 7.11.6 @babel/generator: ^7.11.6 =&gt; 7.11.6 @babel/helper-module-transforms: ^7.11.0 =&gt; 7.11.0 @babel/parser: ^7.11.5 =&gt; 7.11.5 @babel/plugin-transform-modules-commonjs: ^7.10.4 =&gt; 7.10.4 @babel/plugin-transform-react-jsx: ^7.10.4 =&gt; 7.10.4 @babel/register: ^7.11.5 =&gt; 7.11.5 @babel/traverse: ^7.11.5 =&gt; 7.11.5 @babel/types: ^7.11.5 =&gt; 7.11.5 babel-jest: ^26.3.0 =&gt; 26.3.0 babel-plugin-dynamic-import-node: ^2.3.3 =&gt; 2.3.3 eslint: ^7.8.1 =&gt; 7.8.1 jest: ^26.4.2 =&gt; 26.4.2"><pre class="notranslate"><code class="notranslate">System: OS: macOS Mojave 10.14.6 Binaries: Node: 14.9.0 - ~/.nvm/versions/node/v14.9.0/bin/node npm: 6.14.8 - ~/.nvm/versions/node/v14.9.0/bin/npm npmPackages: @babel/core: ^7.11.6 =&gt; 7.11.6 @babel/generator: ^7.11.6 =&gt; 7.11.6 @babel/helper-module-transforms: ^7.11.0 =&gt; 7.11.0 @babel/parser: ^7.11.5 =&gt; 7.11.5 @babel/plugin-transform-modules-commonjs: ^7.10.4 =&gt; 7.10.4 @babel/plugin-transform-react-jsx: ^7.10.4 =&gt; 7.10.4 @babel/register: ^7.11.5 =&gt; 7.11.5 @babel/traverse: ^7.11.5 =&gt; 7.11.5 @babel/types: ^7.11.5 =&gt; 7.11.5 babel-jest: ^26.3.0 =&gt; 26.3.0 babel-plugin-dynamic-import-node: ^2.3.3 =&gt; 2.3.3 eslint: ^7.8.1 =&gt; 7.8.1 jest: ^26.4.2 =&gt; 26.4.2 </code></pre></div>
<blockquote> <p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/also/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/also">@also</a></p> </blockquote> <h3 dir="auto">Bug information</h3> <ul dir="auto"> <li><strong>Babel version:</strong> 6.2.0</li> <li><strong>Node version:</strong> 4.1.2</li> <li><strong>npm version:</strong> 3.4.1</li> </ul> <h3 dir="auto">Options</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="none"><pre class="notranslate"><code class="notranslate">none </code></pre></div> <h3 dir="auto">Input code</h3> <p dir="auto">Dependencies in package.json:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;dependencies&quot;: { &quot;babel-runtime&quot;: &quot;6.2.0&quot; }, &quot;devDependencies&quot;: { &quot;babel-cli&quot;: &quot;6.2.0&quot;, &quot;babel-plugin-transform-runtime&quot;: &quot;6.1.18&quot;, &quot;babel-preset-es2015&quot;: &quot;6.1.18&quot; } }"><pre class="notranslate"><code class="notranslate">{ "dependencies": { "babel-runtime": "6.2.0" }, "devDependencies": { "babel-cli": "6.2.0", "babel-plugin-transform-runtime": "6.1.18", "babel-preset-es2015": "6.1.18" } } </code></pre></div> <h3 dir="auto">Description</h3> <p dir="auto">I have a relatively simple <code class="notranslate">package.json</code> (<a href="https://github.com/also/babel-6-runtime-test/blob/ca958aa2f5881a0590a97f7a4216cd4be89dc4cc/package.json">here</a>).</p> <p dir="auto">Using npm 3.4 and Node.js 4.1, <code class="notranslate">babel-doctor</code> complains about 43 duplicate <code class="notranslate">babel-runtime</code> packages, even after running <code class="notranslate">npm dedupe</code>.</p> <p dir="auto"><a href="https://travis-ci.org/also/babel-6-runtime-test/builds/92763739" rel="nofollow">Output from Travis CI</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ babel-doctor Babel Doctor Running sanity checks on your system. This may take a few minutes... ✔ Found config at /home/travis/build/also/babel-6-runtime-test/.babelrc ✖ Found these duplicate packages: - babel-runtime x 43 Recommend running `npm dedupe` ✔ All babel packages appear to be up to date ✔ You're on npm &gt;=3.3.0 Found potential issues on your machine :("><pre class="notranslate"><code class="notranslate">$ babel-doctor Babel Doctor Running sanity checks on your system. This may take a few minutes... ✔ Found config at /home/travis/build/also/babel-6-runtime-test/.babelrc ✖ Found these duplicate packages: - babel-runtime x 43 Recommend running `npm dedupe` ✔ All babel packages appear to be up to date ✔ You're on npm &gt;=3.3.0 Found potential issues on your machine :( </code></pre></div> <p dir="auto">It seems that it is possible to work around the issue by switching to the version of <code class="notranslate">babel-runtime</code> being duplicated, currently <code class="notranslate">5.8.34</code>.</p>
0
<p dir="auto">Hello,</p> <p dir="auto">I've been creating notifications with <a href="https://github.com/electron/electron/blob/master/docs/tutorial/desktop-environment-integration.md#notifications-windows-linux-macos">https://github.com/electron/electron/blob/master/docs/tutorial/desktop-environment-integration.md#notifications-windows-linux-macos</a></p> <p dir="auto">Can someone please confirm what I suspect:</p> <ul dir="auto"> <li>There is no way to bind some kind of click handler to a notification, all clicking ever does it close the notification</li> <li>There is no way to add actions/buttons to a notification.</li> </ul> <p dir="auto">If these are true then I think as they stand, notifications are not very useful. If this functionality is not possible to implement, maybe it would be better to provide a standardised BrowserWindow implementation?</p> <p dir="auto">As an aside - can anyone recommend a third party package for implementing cross-platform rich notifications?</p> <p dir="auto">Thanks!</p>
<p dir="auto">It would be really great if Electron supported the "notification actions" feature added in Chrome 48:</p> <p dir="auto"><a href="https://www.chromestatus.com/features/5906566364528640" rel="nofollow">https://www.chromestatus.com/features/5906566364528640</a><br> <a href="https://developers.google.com/web/updates/2016/01/notification-actions?hl=en" rel="nofollow">https://developers.google.com/web/updates/2016/01/notification-actions?hl=en</a></p> <p dir="auto">Essentially, you say:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="new Notification(&quot;123&quot;, {title: &quot;123&quot;, silent: true, actions: [{action: 'A', title: 'A'}, {action: 'B', title: 'B'}]})"><pre class="notranslate"><code class="notranslate">new Notification("123", {title: "123", silent: true, actions: [{action: 'A', title: 'A'}, {action: 'B', title: 'B'}]}) </code></pre></div> <p dir="auto">To show the notification, and then listen for 'notificationclick' DOM event, which gives you the name of the chosen action.</p>
1
<h3 dir="auto">Description</h3> <p dir="auto">Ability to clear or mark task groups as success/failure and have that propagate to the tasks within that task group. Sometimes there is a need to adjust the status of tasks within a task group, which can get unwieldy depending on the number of tasks in that task group. A great quality of life upgrade, and something that seems like an intuitive feature, would be the ability to clear or change the status of all tasks at their taskgroup level through the UI.</p> <h3 dir="auto">Use case/motivation</h3> <p dir="auto">In the event a large number of tasks, or a whole task group in this case, need to be cleared or their status set to success/failure this would be a great improvement. For example, a manual DAG run triggered through the UI or the API that has a number of task sensors or tasks that otherwise don't matter for that DAG run - instead of setting each one as success by hand, doing so for each task group would be great.</p> <h3 dir="auto">Related issues</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Are you willing to submit a PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
<h3 dir="auto">Description</h3> <p dir="auto">Hi,</p> <p dir="auto">It would be very interesting to be able to filter DagRuns by using the state field. That would affect the following methods:</p> <ul dir="auto"> <li>/api/v1/dags/{dag_id}/dagRuns</li> <li>/api/v1/dags/~/dagRuns/list</li> </ul> <p dir="auto">Currently accepting the following query/body filter parameters:</p> <ul dir="auto"> <li>execution_date_gte</li> <li>execution_date_lte</li> <li>start_date_gte</li> <li>start_date_lte</li> <li>end_date_gte</li> <li>end_date_lte</li> </ul> <p dir="auto">Our proposal is to add the state parameter ("queued", "running", "success", "failed") to be able to filter by the field "state" of the DagRun.</p> <p dir="auto">Thanks.</p> <h3 dir="auto">Use case/motivation</h3> <p dir="auto">Being able to filter DagRuns by their state value.</p> <h3 dir="auto">Related issues</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Are you willing to submit a PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
0
<pre class="notranslate">Profiling vet on a large corpus shows about &gt;10% time spent in syscalls initiated by gcimporter.(*parser).next. Many of these reads are avoidable; there is high import overlap across packages, particularly within a given project. Concretely, instrumenting calls to Import (in gcimporter.go) and then running 'go vet' on camlistore yields these top duplicate imports: 153 fmt.a 147 testing.a 120 io.a 119 strings.a 113 os.a 108 bytes.a 99 time.a 97 errors.a 82 io/ioutil.a 80 log.a 76 sync.a 70 strconv.a 64 net/http.a 56 path/filepath.a 51 camlistore.org/pkg/blob.a 44 runtime.a 39 sort.a 39 flag.a 35 reflect.a 35 net/url.a These 20 account for 1627 of the 2750 import reads. Hacking in a quick LRU that simply caches the raw data in the files cuts 'go vet' user time for camlistore by ~10%. I'm not sure that that is the right long-term approach, though.</pre>
<pre class="notranslate">Currently gc generates the following code: var s1 string 400c19: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) 400c22: 48 c7 44 24 10 00 00 movq $0x0,0x10(%rsp) s2 := "" 400c2b: 48 8d 1c 25 20 63 42 lea 0x426320,%rbx 400c33: 48 8b 2b mov (%rbx),%rbp 400c36: 48 89 6c 24 18 mov %rbp,0x18(%rsp) 400c3b: 48 8b 6b 08 mov 0x8(%rbx),%rbp 400c3f: 48 89 6c 24 20 mov %rbp,0x20(%rsp) s3 = "" 400c44: 48 8d 1c 25 20 63 42 lea 0x426320,%rbx 400c4c: 48 8b 2b mov (%rbx),%rbp 400c4f: 48 89 2c 25 f0 34 46 mov %rbp,0x4634f0 400c57: 48 8b 6b 08 mov 0x8(%rbx),%rbp 400c5b: 48 89 2c 25 f8 34 46 mov %rbp,0x4634f8 Ideally it is: var s1 string 400c19: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) 400c22: 48 c7 44 24 10 00 00 movq $0x0,0x10(%rsp) s2 := "" 400c19: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) 400c22: 48 c7 44 24 10 00 00 movq $0x0,0x10(%rsp) s3 = "" 400c19: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) 400c22: 48 c7 44 24 10 00 00 movq $0x0,0x10(%rsp) For := "", compiler can just remove the initializer. For = "", compiler can recognize "" and store zeros.</pre>
0
<p dir="auto">In the bonfire problem, it states:</p> <blockquote> <p dir="auto">Return the number of total permutations of the provided string that don't have repeated consecutive letters.<br> For example, 'aab' should return 2 because it has 6 total permutations, but only 2 of them don't have the same letter (in this case 'a') repeating.</p> </blockquote> <p dir="auto">I believe this is incorrect.</p> <p dir="auto">The possible permutations of 'aab' are 'aab' 'aba' and 'baa' which should be calculated as 3! / 2! (= 3), not 3! (= 6) as what was done in the description. The total number of permutations should be 3 not 6. Then you want to eliminate cases wherein identical letters are adjacent, namely, 'aab' and 'baa'. This leaves 'aba' which means the answer ought to be 1, not 2.</p> <p dir="auto">Let me give another example. For the string 'aabb', the possible permutations ought not be calculated as 4! (=24) then eliminate the ones with adjacent identical characters. This leads to an incorrect answer of 8.</p> <p dir="auto">The possible permutations of 'aabb' is actually just 6, namely 'aabb', 'abab', 'baba', 'bbaa', 'abba', 'baab'. This can also be calculated 4! / (2! * 2!) (=6). Then when the strings wherein there are adjacent identical characters are eliminated, this leaves 'abab' and 'baba' which means the answer is 2 (not 8 as the test case indicates).</p> <p dir="auto">Please advise. Apologies if this is deemed a spam</p>
<p dir="auto">I selected the buttons as checked but the waypoint is not noticing that the buttons are checked.</p>
0
<p dir="auto">Typscript typings for ChipProps includes tabIndex of type: number | string which is incompartible with the overriding tabIndex property extended from HTMLElement via HTMLDivElement.</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> <h2 dir="auto">Expected Behavior</h2> <p dir="auto">No error. Property tabIndex?: number | string on interface ChipProps should either be tabIndex?: number or removed completely since its inherited by virtue of extension.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Receive the error message<br> <code class="notranslate">ERROR in &lt;path-to-project-root&gt;/node_modules/material-ui/Chip/Chip.d.ts (4,18): error TS2430: Interface 'ChipProps' incorrectly extends interface 'HTMLAttributes&lt;HTMLDivElement&gt;'. Types of property 'tabIndex' are incompatible. Type 'ReactText' is not assignable to type 'number'. Type 'string' is not assignable to type 'number'.</code></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto">Add Chip to any typescript project and compile with tsc</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>1.0.0-beta.9</td> </tr> <tr> <td>React</td> <td>15.6.1</td> </tr> </tbody> </table>
<p dir="auto">When use the Card component and also SSR, React 16 gives the following message:</p> <blockquote> <p dir="auto">Did not expect server HTML to contain a &lt;div&gt; in &lt;div&gt;.</p> </blockquote> <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">Expected Behavior</h2> <p dir="auto">A Card component should render on the serve side, so the client side doesn't have to do anything with it and should return no warning.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">When I use the Card component with React 16 like this:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;Card className={classes.card}&gt; &lt;CardContent&gt; &lt;Typography type=&quot;headline&quot; component=&quot;h2&quot; &gt; Login &lt;/Typography&gt; &lt;TextField id=&quot;username&quot; label=&quot;Username&quot; autoComplete=&quot;username&quot; className={classes.input} /&gt; &lt;TextField id=&quot;password&quot; label=&quot;Password&quot; type=&quot;password&quot; autoComplete=&quot;current-password&quot; margin=&quot;normal&quot; className={classes.input} /&gt; &lt;/CardContent&gt; &lt;CardActions className={classes.cardActions}&gt; &lt;Button onClick={() =&gt; props.handleLogin()}&gt;Login&lt;/Button&gt; &lt;/CardActions&gt; &lt;/Card&gt;"><pre class="notranslate"><span class="pl-c1">&lt;</span><span class="pl-ent">Card</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">classes</span><span class="pl-kos">.</span><span class="pl-c1">card</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">CardContent</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Typography</span> <span class="pl-c1">type</span><span class="pl-c1">=</span><span class="pl-s">"headline"</span> <span class="pl-c1">component</span><span class="pl-c1">=</span><span class="pl-s">"h2"</span> <span class="pl-c1">&gt;</span> Login <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Typography</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">TextField</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"username"</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"Username"</span> <span class="pl-c1">autoComplete</span><span class="pl-c1">=</span><span class="pl-s">"username"</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">classes</span><span class="pl-kos">.</span><span class="pl-c1">input</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-ent">TextField</span> <span class="pl-c1">id</span><span class="pl-c1">=</span><span class="pl-s">"password"</span> <span class="pl-c1">label</span><span class="pl-c1">=</span><span class="pl-s">"Password"</span> <span class="pl-c1">type</span><span class="pl-c1">=</span><span class="pl-s">"password"</span> <span class="pl-c1">autoComplete</span><span class="pl-c1">=</span><span class="pl-s">"current-password"</span> <span class="pl-c1">margin</span><span class="pl-c1">=</span><span class="pl-s">"normal"</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">classes</span><span class="pl-kos">.</span><span class="pl-c1">input</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">CardContent</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">CardActions</span> <span class="pl-c1">className</span><span class="pl-c1">=</span><span class="pl-kos">{</span><span class="pl-s1">classes</span><span class="pl-kos">.</span><span class="pl-c1">cardActions</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-ent">Button</span> <span class="pl-c1">onClick</span><span class="pl-c1">=</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-s1">props</span><span class="pl-kos">.</span><span class="pl-en">handleLogin</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">}</span><span class="pl-c1">&gt;</span>Login<span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Button</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">CardActions</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&lt;</span><span class="pl-c1">/</span><span class="pl-ent">Card</span><span class="pl-c1">&gt;</span></pre></div> <p dir="auto">it gives the following error on hydration:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Warning: Did not expect server HTML to contain a &lt;div&gt; in &lt;div&gt;. printWarning @ bundle.js:sourcemap:423 warning @ bundle.js:sourcemap:447 warnForDeletedHydratableElement$1 @ bundle.js:sourcemap:16895 didNotHydrateInstance @ bundle.js:sourcemap:17573 deleteHydratableInstance @ bundle.js:sourcemap:11892 popHydrationState @ bundle.js:sourcemap:12099 completeWork @ bundle.js:sourcemap:11067 completeUnitOfWork @ bundle.js:sourcemap:12568 performUnitOfWork @ bundle.js:sourcemap:12670 workLoop @ bundle.js:sourcemap:12724 callCallback @ bundle.js:sourcemap:2978 invokeGuardedCallbackDev @ bundle.js:sourcemap:3017 invokeGuardedCallback @ bundle.js:sourcemap:2874 renderRoot @ bundle.js:sourcemap:12802 performWorkOnRoot @ bundle.js:sourcemap:13450 performWork @ bundle.js:sourcemap:13403 requestWork @ bundle.js:sourcemap:13314 scheduleWorkImpl @ bundle.js:sourcemap:13168 scheduleWork @ bundle.js:sourcemap:13125 scheduleTopLevelUpdate @ bundle.js:sourcemap:13629 updateContainer @ bundle.js:sourcemap:13667 (anonymous) @ bundle.js:sourcemap:17658 unbatchedUpdates @ bundle.js:sourcemap:13538 renderSubtreeIntoContainer @ bundle.js:sourcemap:17657 hydrate @ bundle.js:sourcemap:17719 (anonymous) @ bundle.js:sourcemap:66465"><pre class="notranslate"><code class="notranslate">Warning: Did not expect server HTML to contain a &lt;div&gt; in &lt;div&gt;. printWarning @ bundle.js:sourcemap:423 warning @ bundle.js:sourcemap:447 warnForDeletedHydratableElement$1 @ bundle.js:sourcemap:16895 didNotHydrateInstance @ bundle.js:sourcemap:17573 deleteHydratableInstance @ bundle.js:sourcemap:11892 popHydrationState @ bundle.js:sourcemap:12099 completeWork @ bundle.js:sourcemap:11067 completeUnitOfWork @ bundle.js:sourcemap:12568 performUnitOfWork @ bundle.js:sourcemap:12670 workLoop @ bundle.js:sourcemap:12724 callCallback @ bundle.js:sourcemap:2978 invokeGuardedCallbackDev @ bundle.js:sourcemap:3017 invokeGuardedCallback @ bundle.js:sourcemap:2874 renderRoot @ bundle.js:sourcemap:12802 performWorkOnRoot @ bundle.js:sourcemap:13450 performWork @ bundle.js:sourcemap:13403 requestWork @ bundle.js:sourcemap:13314 scheduleWorkImpl @ bundle.js:sourcemap:13168 scheduleWork @ bundle.js:sourcemap:13125 scheduleTopLevelUpdate @ bundle.js:sourcemap:13629 updateContainer @ bundle.js:sourcemap:13667 (anonymous) @ bundle.js:sourcemap:17658 unbatchedUpdates @ bundle.js:sourcemap:13538 renderSubtreeIntoContainer @ bundle.js:sourcemap:17657 hydrate @ bundle.js:sourcemap:17719 (anonymous) @ bundle.js:sourcemap:66465 </code></pre></div> <p dir="auto">The description of the warning does not say much, so I couldn't investigate further. However, when I change the above code to a simple <code class="notranslate">&lt;div&gt;</code> tag, the warning disappears, so I suspect that there is something wrong with the sever-side rendering of the Card component.</p> <p dir="auto">If there's a way to get more information about the warning I could look into it, I just have no idea how :).</p> <h2 dir="auto">Context</h2> <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>1.0.0-beta.25</td> </tr> <tr> <td>React</td> <td>16.2.0</td> </tr> <tr> <td>browser</td> <td>Google Chrome 63.0.3239.108 (Official Build) (64-bit)</td> </tr> </tbody> </table>
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 issue tracker for an issue that matches the one I want to file, without success.</li> </ul> <h3 dir="auto">Issue Details</h3> <ul dir="auto"> <li><strong>Electron Version:</strong> <ul dir="auto"> <li>9.1.0</li> </ul> </li> <li><strong>Operating System:</strong> <ul dir="auto"> <li>Windows 10 (19041, 18363, 18362, 16299)</li> </ul> </li> <li><strong>Last Known Working Electron version:</strong> <ul dir="auto"> <li>N/A</li> </ul> </li> </ul> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">The application should not crash.</p> <h3 dir="auto">Actual Behavior</h3> <p dir="auto">The application crashes.</p> <h3 dir="auto">To Reproduce</h3> <p dir="auto">This seems happening sporadically when application exits (all windows get closed, destroyed and app is quit).<br> It happens only on Windows, MacOS does not seem to affected.<br> My code snippet:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" app.removeAllListeners('window-all-closed') BrowserWindow.getAllWindows().forEach((browserWindow) =&gt; { browserWindow.close() browserWindow.destroy() }) app.quit()"><pre class="notranslate"><code class="notranslate"> app.removeAllListeners('window-all-closed') BrowserWindow.getAllWindows().forEach((browserWindow) =&gt; { browserWindow.close() browserWindow.destroy() }) app.quit() </code></pre></div> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Pastebin: <a href="https://pastebin.com/raw/MYvbpWe2" rel="nofollow">https://pastebin.com/raw/MYvbpWe2</a><br> Snippet:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ Thread 10196 Crashed: 0 MyApp.exe 0x7ff75f43a632 [inlined] base::internal::UncheckedObserverAdapter::IsEqual (observer_list_internal.h:30) 1 MyApp.exe 0x7ff75f43a632 [inlined] base::ObserverList&lt;T&gt;::RemoveObserver::&lt;T&gt;::operator() (observer_list.h:283) 2 MyApp.exe 0x7ff75f43a632 [inlined] std::__1::find_if (algorithm:933) 3 MyApp.exe 0x7ff75f43a632 base::ObserverList&lt;T&gt;::RemoveObserver (observer_list.h:281) 4 MyApp.exe 0x7ff76101f28c extensions::ProcessManager::Shutdown (process_manager.cc:289) 5 MyApp.exe 0x7ff761e3a08d [inlined] DependencyManager::ShutdownFactoriesInOrder (dependency_manager.cc:127) 6 MyApp.exe 0x7ff761e3a08d DependencyManager::DestroyContextServices (dependency_manager.cc:83) 7 MyApp.exe 0x7ff75f2e8de6 electron::ElectronBrowserContext::~ElectronBrowserContext (electron_browser_context.cc:158) 8 MyApp.exe 0x7ff75f2e9abf electron::ElectronBrowserContext::~ElectronBrowserContext (electron_browser_context.cc:154) 9 MyApp.exe 0x7ff75f287a9d [inlined] base::RefCountedDeleteOnSequence&lt;T&gt;::Release (ref_counted_delete_on_sequence.h:52) 10 MyApp.exe 0x7ff75f287a9d [inlined] scoped_refptr&lt;T&gt;::Release (scoped_refptr.h:322) 11 MyApp.exe 0x7ff75f287a9d [inlined] scoped_refptr&lt;T&gt;::~scoped_refptr (scoped_refptr.h:224) 12 MyApp.exe 0x7ff75f287a9d electron::api::Session::~Session (electron_api_session.cc:313) 13 MyApp.exe 0x7ff75f28cdaf electron::api::Session::~Session (electron_api_session.cc:294) 14 MyApp.exe 0x7ff75f2eb641 [inlined] base::OnceCallback&lt;T&gt;::Run (callback.h:98) 15 MyApp.exe 0x7ff75f2eb641 electron::ElectronBrowserMainParts::PostMainMessageLoopRun (electron_browser_main_parts.cc:545) 16 MyApp.exe 0x7ff760a01750 content::BrowserMainLoop::ShutdownThreadsAndCleanUp (browser_main_loop.cc:1095) 17 MyApp.exe 0x7ff760a031a6 content::BrowserMainRunnerImpl::Shutdown (browser_main_runner_impl.cc:178) 18 MyApp.exe 0x7ff7609fee69 content::BrowserMain (browser_main.cc:49) 19 MyApp.exe 0x7ff76090405c content::RunBrowserProcessMain (content_main_runner_impl.cc:530) 20 MyApp.exe 0x7ff760904c00 content::ContentMainRunnerImpl::RunServiceManager (content_main_runner_impl.cc:980) 21 MyApp.exe 0x7ff7609048c2 content::ContentMainRunnerImpl::Run (content_main_runner_impl.cc:879) 22 MyApp.exe 0x7ff761870252 service_manager::Main (main.cc:454) 23 MyApp.exe 0x7ff75fcd8265 content::ContentMain (content_main.cc:19) 24 MyApp.exe 0x7ff75f23140a wWinMain (electron_main.cc:210) 25 MyApp.exe 0x7ff7646a6e91 [inlined] invoke_main (exe_common.inl:118) 26 MyApp.exe 0x7ff7646a6e91 __scrt_common_main_seh (exe_common.inl:288) 27 KERNEL32.DLL 0x7ffed8a97033 BaseThreadInitThunk 28 ntdll.dll 0x7ffed97dcec0 RtlUserThreadStart"><pre class="notranslate"><code class="notranslate">Fatal Error: EXCEPTION_ACCESS_VIOLATION_READ Thread 10196 Crashed: 0 MyApp.exe 0x7ff75f43a632 [inlined] base::internal::UncheckedObserverAdapter::IsEqual (observer_list_internal.h:30) 1 MyApp.exe 0x7ff75f43a632 [inlined] base::ObserverList&lt;T&gt;::RemoveObserver::&lt;T&gt;::operator() (observer_list.h:283) 2 MyApp.exe 0x7ff75f43a632 [inlined] std::__1::find_if (algorithm:933) 3 MyApp.exe 0x7ff75f43a632 base::ObserverList&lt;T&gt;::RemoveObserver (observer_list.h:281) 4 MyApp.exe 0x7ff76101f28c extensions::ProcessManager::Shutdown (process_manager.cc:289) 5 MyApp.exe 0x7ff761e3a08d [inlined] DependencyManager::ShutdownFactoriesInOrder (dependency_manager.cc:127) 6 MyApp.exe 0x7ff761e3a08d DependencyManager::DestroyContextServices (dependency_manager.cc:83) 7 MyApp.exe 0x7ff75f2e8de6 electron::ElectronBrowserContext::~ElectronBrowserContext (electron_browser_context.cc:158) 8 MyApp.exe 0x7ff75f2e9abf electron::ElectronBrowserContext::~ElectronBrowserContext (electron_browser_context.cc:154) 9 MyApp.exe 0x7ff75f287a9d [inlined] base::RefCountedDeleteOnSequence&lt;T&gt;::Release (ref_counted_delete_on_sequence.h:52) 10 MyApp.exe 0x7ff75f287a9d [inlined] scoped_refptr&lt;T&gt;::Release (scoped_refptr.h:322) 11 MyApp.exe 0x7ff75f287a9d [inlined] scoped_refptr&lt;T&gt;::~scoped_refptr (scoped_refptr.h:224) 12 MyApp.exe 0x7ff75f287a9d electron::api::Session::~Session (electron_api_session.cc:313) 13 MyApp.exe 0x7ff75f28cdaf electron::api::Session::~Session (electron_api_session.cc:294) 14 MyApp.exe 0x7ff75f2eb641 [inlined] base::OnceCallback&lt;T&gt;::Run (callback.h:98) 15 MyApp.exe 0x7ff75f2eb641 electron::ElectronBrowserMainParts::PostMainMessageLoopRun (electron_browser_main_parts.cc:545) 16 MyApp.exe 0x7ff760a01750 content::BrowserMainLoop::ShutdownThreadsAndCleanUp (browser_main_loop.cc:1095) 17 MyApp.exe 0x7ff760a031a6 content::BrowserMainRunnerImpl::Shutdown (browser_main_runner_impl.cc:178) 18 MyApp.exe 0x7ff7609fee69 content::BrowserMain (browser_main.cc:49) 19 MyApp.exe 0x7ff76090405c content::RunBrowserProcessMain (content_main_runner_impl.cc:530) 20 MyApp.exe 0x7ff760904c00 content::ContentMainRunnerImpl::RunServiceManager (content_main_runner_impl.cc:980) 21 MyApp.exe 0x7ff7609048c2 content::ContentMainRunnerImpl::Run (content_main_runner_impl.cc:879) 22 MyApp.exe 0x7ff761870252 service_manager::Main (main.cc:454) 23 MyApp.exe 0x7ff75fcd8265 content::ContentMain (content_main.cc:19) 24 MyApp.exe 0x7ff75f23140a wWinMain (electron_main.cc:210) 25 MyApp.exe 0x7ff7646a6e91 [inlined] invoke_main (exe_common.inl:118) 26 MyApp.exe 0x7ff7646a6e91 __scrt_common_main_seh (exe_common.inl:288) 27 KERNEL32.DLL 0x7ffed8a97033 BaseThreadInitThunk 28 ntdll.dll 0x7ffed97dcec0 RtlUserThreadStart </code></pre></div> <h3 dir="auto">Additional Information</h3> <p dir="auto">This seems a crash on shutdown/destroy of windows (from <code class="notranslate">base::Process::Terminate (process_win.cc)</code>, not sure if it's chromium-related (<a href="https://chromium.googlesource.com/chromium/src/+/master/docs/shutdown.md" rel="nofollow">https://chromium.googlesource.com/chromium/src/+/master/docs/shutdown.md</a>)</p>
<p dir="auto">Detected in CI: <a href="https://app.circleci.com/pipelines/github/electron/electron/31161/workflows/e022a2a8-d5fb-47b4-806f-84f69ecf0a8a/jobs/686542" rel="nofollow">https://app.circleci.com/pipelines/github/electron/electron/31161/workflows/e022a2a8-d5fb-47b4-806f-84f69ecf0a8a/jobs/686542</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Received signal 11 SEGV_MAPERR ffffffffffffffff 0 Electron Framework 0x0000000114bcb869 base::debug::CollectStackTrace(void**, unsigned long) + 9 1 Electron Framework 0x0000000114ac6203 base::debug::StackTrace::StackTrace() + 19 2 Electron Framework 0x0000000114bcb731 base::debug::(anonymous namespace)::StackDumpSignalHandler(int, __siginfo*, void*) + 2385 3 libsystem_platform.dylib 0x00007fff6fcda5fd _sigtramp + 29 4 ??? 0x00007ff9fa10d6e0 0x0 + 140711618991840 5 Electron Framework 0x0000000114710a51 extensions::ProcessManager::Shutdown() + 33 6 Electron Framework 0x000000011651d4fc DependencyManager::DestroyContextServices(void*) + 140 7 Electron Framework 0x000000010f34d708 electron::ElectronBrowserContext::~ElectronBrowserContext() + 184 8 Electron Framework 0x000000010f34d9fe electron::ElectronBrowserContext::~ElectronBrowserContext() + 14 9 Electron Framework 0x000000010f35160d std::__1::__tree&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, std::__1::__map_value_compare&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, std::__1::less&lt;electron::ElectronBrowserContext::PartitionKey&gt;, true&gt;, std::__1::allocator&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt; &gt; &gt;::destroy(std::__1::__tree_node&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, void*&gt;*) + 61 10 Electron Framework 0x000000010f3515f6 std::__1::__tree&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, std::__1::__map_value_compare&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, std::__1::less&lt;electron::ElectronBrowserContext::PartitionKey&gt;, true&gt;, std::__1::allocator&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt; &gt; &gt;::destroy(std::__1::__tree_node&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, void*&gt;*) + 38 11 Electron Framework 0x000000010f35121b electron::ElectronBrowserMainParts::PostMainMessageLoopRun() + 219 12 Electron Framework 0x00000001134a7477 content::BrowserMainLoop::ShutdownThreadsAndCleanUp() + 647 13 Electron Framework 0x00000001134a9510 content::BrowserMainRunnerImpl::Shutdown() + 224 14 Electron Framework 0x00000001134a3c57 content::BrowserMain(content::MainFunctionParams const&amp;) + 279 15 Electron Framework 0x00000001132bd757 content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&amp;, bool) + 1191 16 Electron Framework 0x00000001132bd283 content::ContentMainRunnerImpl::Run(bool) + 467 17 Electron Framework 0x00000001110e92be content::RunContentProcess(content::ContentMainParams const&amp;, content::ContentMainRunner*) + 2782 18 Electron Framework 0x00000001110e93ac content::ContentMain(content::ContentMainParams const&amp;) + 44 19 Electron Framework 0x000000010f2285a9 ElectronMain + 137 20 Electron 0x0000000108e99631 main + 289 21 libdyld.dylib 0x00007fff6faddcc9 start + 1 [end of stack trace]"><pre class="notranslate"><code class="notranslate">Received signal 11 SEGV_MAPERR ffffffffffffffff 0 Electron Framework 0x0000000114bcb869 base::debug::CollectStackTrace(void**, unsigned long) + 9 1 Electron Framework 0x0000000114ac6203 base::debug::StackTrace::StackTrace() + 19 2 Electron Framework 0x0000000114bcb731 base::debug::(anonymous namespace)::StackDumpSignalHandler(int, __siginfo*, void*) + 2385 3 libsystem_platform.dylib 0x00007fff6fcda5fd _sigtramp + 29 4 ??? 0x00007ff9fa10d6e0 0x0 + 140711618991840 5 Electron Framework 0x0000000114710a51 extensions::ProcessManager::Shutdown() + 33 6 Electron Framework 0x000000011651d4fc DependencyManager::DestroyContextServices(void*) + 140 7 Electron Framework 0x000000010f34d708 electron::ElectronBrowserContext::~ElectronBrowserContext() + 184 8 Electron Framework 0x000000010f34d9fe electron::ElectronBrowserContext::~ElectronBrowserContext() + 14 9 Electron Framework 0x000000010f35160d std::__1::__tree&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, std::__1::__map_value_compare&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, std::__1::less&lt;electron::ElectronBrowserContext::PartitionKey&gt;, true&gt;, std::__1::allocator&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt; &gt; &gt;::destroy(std::__1::__tree_node&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, void*&gt;*) + 61 10 Electron Framework 0x000000010f3515f6 std::__1::__tree&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, std::__1::__map_value_compare&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, std::__1::less&lt;electron::ElectronBrowserContext::PartitionKey&gt;, true&gt;, std::__1::allocator&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt; &gt; &gt;::destroy(std::__1::__tree_node&lt;std::__1::__value_type&lt;electron::ElectronBrowserContext::PartitionKey, std::__1::unique_ptr&lt;electron::ElectronBrowserContext, std::__1::default_delete&lt;electron::ElectronBrowserContext&gt; &gt; &gt;, void*&gt;*) + 38 11 Electron Framework 0x000000010f35121b electron::ElectronBrowserMainParts::PostMainMessageLoopRun() + 219 12 Electron Framework 0x00000001134a7477 content::BrowserMainLoop::ShutdownThreadsAndCleanUp() + 647 13 Electron Framework 0x00000001134a9510 content::BrowserMainRunnerImpl::Shutdown() + 224 14 Electron Framework 0x00000001134a3c57 content::BrowserMain(content::MainFunctionParams const&amp;) + 279 15 Electron Framework 0x00000001132bd757 content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&amp;, bool) + 1191 16 Electron Framework 0x00000001132bd283 content::ContentMainRunnerImpl::Run(bool) + 467 17 Electron Framework 0x00000001110e92be content::RunContentProcess(content::ContentMainParams const&amp;, content::ContentMainRunner*) + 2782 18 Electron Framework 0x00000001110e93ac content::ContentMain(content::ContentMainParams const&amp;) + 44 19 Electron Framework 0x000000010f2285a9 ElectronMain + 137 20 Electron 0x0000000108e99631 main + 289 21 libdyld.dylib 0x00007fff6faddcc9 start + 1 [end of stack trace] </code></pre></div>
1
<p dir="auto">I am trying to figure out how to center an item in the navbar. I would essentially like to be able to have two navs, one left and one right. Then have an element (logo or CSS styled div) in the middle of the nav. It would be nice to have something similar to .pull-right, a .pull-center or something to assist with this. I have been trying to override the css and write it in myself, but for the life of me can't get it to work right.</p>
1
<p dir="auto">Is there a supported way to write an image using the <a href="https://github.com/atom/atom-shell/blob/master/docs/api/clipboard.md"><code class="notranslate">clipboard</code></a> API? I've tried writing a data URL using <code class="notranslate">writeText</code> (similar to <a href="https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/clipboard" rel="nofollow">this</a>) but that isn't cutting it. Perhaps the <code class="notranslate">type</code> parameter is involved but the documentation isn't clear as to what that should be.</p>
<p dir="auto">Is it possible to use <code class="notranslate">clipboard.read()</code> to access an image copied to OS X's pasteboard?</p>
1
<pre class="notranslate">Hi, again a bug which doesn't need fixing right now, but in a long run. It would be good to be more FHS and distributions friendly, that means at least: - honor libexecdir (binary architecture files) and datadir (documentation, etc.) - allow to have standard library files to be read only (mostly goinstall issues) - install additional packages to /usr/local/golang (f.e.) - allow to have more than one path in $GOROOT (something like $PYTHONPATH, etc.), so the users can install packages/libraries to their home directories (and godoc, goinstall, etc. would know about that). There's probably more, but it will probably pop-up during the time.</pre>
<pre class="notranslate">What steps will reproduce the problem? 1. visit the documentation for any type (e.g. <a href="http://golang.org/pkg/net/http/#CanonicalHeaderKey)" rel="nofollow">http://golang.org/pkg/net/http/#CanonicalHeaderKey)</a> 2. click on the title of the section, to go see the corresponding code What is the expected output? What do you see instead? I expect to get to a page where I can directly see the code for the clicked element. Instead I get to the first line of the file containing the code I'm interested in. Please use labels and text to provide additional information.</pre>
0
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">Destructuring DefinePlugin variables causes runtime error <code class="notranslate">Uncaught ReferenceError: process is not defined</code></p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <ol dir="auto"> <li>have DefinePlugin plugin defined in the webpack config like this:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) }) ]"><pre class="notranslate"><code class="notranslate"> plugins: [ new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV) }) ] </code></pre></div> <ol start="2" dir="auto"> <li>try to access <code class="notranslate">NODE_ENV</code> via destructuring: <code class="notranslate">const { NODE_ENV } = process.env;</code></li> <li>you get runtime failure <code class="notranslate">Uncaught ReferenceError: process is not defined</code></li> </ol> <p dir="auto">However!</p> <p dir="auto">if you access NODE_ENV like <code class="notranslate">const NODE_ENV = process.env.NODE_ENV;</code> instead of <code class="notranslate">const { NODE_ENV } = process.env;</code> you don't get runtime error and everything works like expected.</p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">Both ways of accessing the variable should be equal and should not cause runtime error.</p> <p dir="auto">It is pretty confusing and hard to debug problem and also problematic due to widely used <code class="notranslate">prefer-destructuring</code> eslint rule.</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 5.64.4<br> Node.js version: v16.13.0<br> Operating System: MacOS Big Sur<br> Additional tools:</p>
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">Hi, I am working with webpack 4 and yarn berry workspaces.</p> <p dir="auto">whenever I try to import a "package (workspace)" the browser console gives me a warning:</p> <p dir="auto">"export 'IAppError' was not found in './src/reduce_request_error'</p> <p dir="auto">The app however works, and no other places throw this warning. It happens to all of the packages that we import and export in our index files <code class="notranslate">index.ts</code></p> <p dir="auto">Thanks,<br> Best regards.<br> TC</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16632552/87426951-53f2f900-c5e0-11ea-81eb-ac6ffdeaf921.png"><img width="770" alt="Zrzut ekranu 2020-07-14 o 14 38 23" src="https://user-images.githubusercontent.com/16632552/87426951-53f2f900-c5e0-11ea-81eb-ac6ffdeaf921.png" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16632552/87426956-55bcbc80-c5e0-11ea-8605-dbe164fa6971.png"><img width="684" alt="Zrzut ekranu 2020-07-14 o 14 38 43" src="https://user-images.githubusercontent.com/16632552/87426956-55bcbc80-c5e0-11ea-8605-dbe164fa6971.png" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16632552/87426959-56555300-c5e0-11ea-98f7-fc8a33aab800.png"><img width="609" alt="Zrzut ekranu 2020-07-14 o 14 39 09" src="https://user-images.githubusercontent.com/16632552/87426959-56555300-c5e0-11ea-98f7-fc8a33aab800.png" style="max-width: 100%;"></a></p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">No warnings... because app works.</p> <p dir="auto">Do you think its an issue on your side?<br> Thanks in advance,<br> best regards,<br> TC</p> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: "^4.43.0",<br> Node.js version: 12.10<br> Operating System: macos<br> Additional tools: yarn berry</p>
0
<p dir="auto"><strong>Context:</strong></p> <ul dir="auto"> <li>Playwright Version: playwright-chromium@1.2.1</li> <li>Operating System: Windows 10 Build 18363.900</li> <li>Node.js version: 12.18.3</li> <li>Browser: MS Edge Chromium Version 84.0.522.52 (Official build) (64-bit)</li> </ul> <p dir="auto"><strong>Code Snippet</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const EDGE_PATH = require(&quot;edge-paths&quot;).getEdgePath(); const chromium = require('playwright-chromium').chromium; const test = async () =&gt; { console.warn('Starting browser'); const browser = await chromium.launch({ executablePath: EDGE_PATH, headless: true, // logger: { // isEnabled: (name, severity) =&gt; { // return name === 'protocol'; // }, // log: (name, severity, message, args) =&gt; console.log(`${name} [${severity}] ${message}`) // } }); const pageUrl = 'https://google.com'; const closeBrowser = async timeout =&gt; { return new Promise(resolve =&gt; { setTimeout(async () =&gt; { console.log('Closing browser'); await browser.close(); resolve(); }, timeout); }); }; const context = await browser.newContext(); const page = await context.newPage(); await page.goto(pageUrl); await closeBrowser(1000); }; test();"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-c1">EDGE_PATH</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"edge-paths"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">getEdgePath</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">chromium</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'playwright-chromium'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">chromium</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-en">test</span> <span class="pl-c1">=</span> <span class="pl-k">async</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">warn</span><span class="pl-kos">(</span><span class="pl-s">'Starting browser'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">browser</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">chromium</span><span class="pl-kos">.</span><span class="pl-en">launch</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">executablePath</span>: <span class="pl-c1">EDGE_PATH</span><span class="pl-kos">,</span> <span class="pl-c1">headless</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c">// logger: {</span> <span class="pl-c">// isEnabled: (name, severity) =&gt; {</span> <span class="pl-c">// return name === 'protocol';</span> <span class="pl-c">// },</span> <span class="pl-c">// log: (name, severity, message, args) =&gt; console.log(`${name} [${severity}] ${message}`)</span> <span class="pl-c">// }</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">pageUrl</span> <span class="pl-c1">=</span> <span class="pl-s">'https://google.com'</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-en">closeBrowser</span> <span class="pl-c1">=</span> <span class="pl-k">async</span> <span class="pl-s1">timeout</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-v">Promise</span><span class="pl-kos">(</span><span class="pl-s1">resolve</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-k">async</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-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'Closing browser'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">resolve</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-s1">timeout</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-k">const</span> <span class="pl-s1">context</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">newContext</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">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s1">pageUrl</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-en">closeBrowser</span><span class="pl-kos">(</span><span class="pl-c1">1000</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">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">Hi!<br> When I tried to use MS Edge Chromium for testing it crashes on browser closing.<br> I provided simple script that reproduces my problem.</p> <p dir="auto">After browser closing I have console error. This error is due to the "...\AppData\Local\Temp\playwright_chromiumdev_profile-8VPUjL\CrashpadMetrics-active.pma" can't be unlinked.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[Error: EPERM: operation not permitted, unlink '....\AppData\Local\Temp\playwright_chromiumdev_profile-8VPUjL\CrashpadMetrics-active.pma'] { errno: -4048, code: 'EPERM', syscall: 'unlink', path: '....\\AppData\\Local\\Temp\\playwright_chromiumdev_profile-8VPUjL\\CrashpadMetrics-active.pma' }"><pre class="notranslate"><code class="notranslate">[Error: EPERM: operation not permitted, unlink '....\AppData\Local\Temp\playwright_chromiumdev_profile-8VPUjL\CrashpadMetrics-active.pma'] { errno: -4048, code: 'EPERM', syscall: 'unlink', path: '....\\AppData\\Local\\Temp\\playwright_chromiumdev_profile-8VPUjL\\CrashpadMetrics-active.pma' } </code></pre></div> <p dir="auto">I suppose when playwright-chromium cleans temp folder MS Edge writes crash report there.<br> The same error appears when browser running in headless mode inside Windows Docker container.<br> Additionally I see system window with error. This window sais that MS Edge has stopped working.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/69156424/89279960-ac05a400-d650-11ea-9fe2-df0098dfd0d9.png"><img src="https://user-images.githubusercontent.com/69156424/89279960-ac05a400-d650-11ea-9fe2-df0098dfd0d9.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">In case when browser is started with headless=false this problem is not reproduced.</p> <p dir="auto">Other interesting thing: when logger with 'protocol' level is attached to the playwright, code often stops on the page.goto() command without any errors.</p>
<p dir="auto"><strong>Context:</strong></p> <ul dir="auto"> <li> <p dir="auto">Playwright Version: tested on versions 1.6.1, 1.3.0 and 1.4.0</p> </li> <li> <p dir="auto">Operating System:<br> Edition Windows 10 Enterprise<br> Version 20H2<br> Installed on ‎8/‎20/‎2020<br> OS build 19042.630<br> Experience Windows Feature Experience Pack 120.2212.31.0</p> </li> <li> <p dir="auto">Node.js version: v12.10.0</p> </li> <li> <p dir="auto">Browser: MS Edge Chromium Version 86.0.622.69</p> </li> <li> <p dir="auto">Extra: Jest v. 23.6 on Visual Studio Code</p> </li> </ul> <p dir="auto"><strong>Code Snippet</strong></p> <p dir="auto">Help us help you! Put down a short code snippet that illustrates your bug and<br> that we can run and debug locally. For example:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { chromium } from &quot;playwright&quot;; import { getEdgePath } from &quot;edge-paths&quot;; jest.setTimeout(10000); test(&quot;Basic Test&quot;, async () =&gt; { const browser = await chromium.launch({ headless: false, executablePath: getEdgePath() }); const context = await browser.newContext(); const page = await context.newPage(); await page.goto(&quot;https://www.google.com&quot;); await page.close(); await context.close(); await browser.close(); });"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">chromium</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"playwright"</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">getEdgePath</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">"edge-paths"</span><span class="pl-kos">;</span> <span class="pl-s1">jest</span><span class="pl-kos">.</span><span class="pl-en">setTimeout</span><span class="pl-kos">(</span><span class="pl-c1">10000</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">"Basic Test"</span><span class="pl-kos">,</span> <span class="pl-k">async</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-s1">browser</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">chromium</span><span class="pl-kos">.</span><span class="pl-en">launch</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">headless</span>: <span class="pl-c1">false</span><span class="pl-kos">,</span> <span class="pl-c1">executablePath</span>: <span class="pl-en">getEdgePath</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">context</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">newContext</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">page</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">newPage</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">goto</span><span class="pl-kos">(</span><span class="pl-s">"https://www.google.com"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">page</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">context</span><span class="pl-kos">.</span><span class="pl-en">close</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-s1">browser</span><span class="pl-kos">.</span><span class="pl-en">close</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"><strong>Describe the bug</strong><br> If you run this test it will pass but then you will see<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/54561656/99342064-ebdb4a80-283f-11eb-9b36-7e59aa001a67.png"><img src="https://user-images.githubusercontent.com/54561656/99342064-ebdb4a80-283f-11eb-9b36-7e59aa001a67.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">console.error node_modules/playwright/lib/server/helper.js:59<br> [Error: EPERM: operation not permitted, unlink '[userpath]\AppData\Local\Temp\playwright_chromiumdev_profile-IAueWz\CrashpadMetrics-active.pma'] {<br> errno: -4048,<br> code: 'EPERM',<br> syscall: 'unlink',<br> path: '[userpath]\AppData\Local\Temp\playwright_chromiumdev_profile-IAueWz\CrashpadMetrics-active.pma'<br> }<br> This error won't occur if you run the test in head mode.</p> <p dir="auto"><em>And if you open task manager you will see two msedge.exe processes that haven't ended</em> &lt;-- This issue is specific to Edge browser I believe</p>
1
<p dir="auto">I'm not super awesome at Python, so I'd appreciate any help you can provide to help nail down this issue.</p> <p dir="auto">Newer versions of Python 3 on Windows appear to have an issue when doing an ssl handshake. This appears to be a problem with urllib3 on Windows python packages only. I was able to successfully use Python 3.3.2 and 3.2.4 on Ubuntu without this issue.</p> <p dir="auto">Effected Versions: Windows Python 3.3.x, 3.2.x</p> <p dir="auto">Works in: Non-Windows Python 3.3.x, 3.2.x, Windows 3.1.x</p> <p dir="auto">While I'm almost certain here the bug is actually in Python's urllib3 and not Requests, I'm not super experienced, so I feel a little over my head. Of course, this bug effects anyone who uses Requests too. It appears related to this bug: <a href="http://bugs.python.org/issue16361" rel="nofollow">http://bugs.python.org/issue16361</a></p> <p dir="auto">In order to communicate with the server, I am using Lantern: <a href="https://github.com/dechols/lantern">https://github.com/dechols/lantern</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" v = lantern.AbstractAPI(username, password) v.get_app_list()"><pre class="notranslate"><code class="notranslate"> v = lantern.AbstractAPI(username, password) v.get_app_list() </code></pre></div> <p dir="auto">Which causes the failure.</p> <p dir="auto">But even using a very simple GET with requests directly, causes the same issue:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" r = requests.get(url=&quot;https://analysiscenter.veracode.com/api/4.0/getapplist.do&quot;, auth=(username, password))"><pre class="notranslate"><code class="notranslate"> r = requests.get(url="https://analysiscenter.veracode.com/api/4.0/getapplist.do", auth=(username, password)) </code></pre></div> <p dir="auto">Please help! I'd love to get this fixed, where-ever it might need fixing.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py&quot;, line 428, in urlopen body=body, headers=headers) File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py&quot;, line 280, in _make_request conn.request(method, url, **httplib_request_kw) File &quot;C:\Python33\lib\http\client.py&quot;, line 1061, in request self._send_request(method, url, body, headers) File &quot;C:\Python33\lib\http\client.py&quot;, line 1099, in _send_request self.endheaders(body) File &quot;C:\Python33\lib\http\client.py&quot;, line 1057, in endheaders self._send_output(message_body) File &quot;C:\Python33\lib\http\client.py&quot;, line 902, in _send_output self.send(msg) File &quot;C:\Python33\lib\http\client.py&quot;, line 840, in send self.connect() File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py&quot;, line 107, in connect ssl_version=resolved_ssl_version) File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\util.py&quot;, line 369, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File &quot;C:\Python33\lib\ssl.py&quot;, line 210, in wrap_socket _context=self) File &quot;C:\Python33\lib\ssl.py&quot;, line 310, in __init__ raise x File &quot;C:\Python33\lib\ssl.py&quot;, line 306, in __init__ self.do_handshake() File &quot;C:\Python33\lib\ssl.py&quot;, line 513, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;C:\Python33\lib\site-packages\requests\adapters.py&quot;, line 292, in send timeout=timeout File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py&quot;, line 474, in urlopen raise MaxRetryError(self, url, e) [Finished in 61.3s with exit code 1]requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='analysiscenter.veracode.com', port=443): Max retries exceeded with url: /api/4.0/getapplist.do (Caused by &lt;class 'ConnectionResetError'&gt;: [WinError 10054] An existing connection was forcibly closed by the remote host) During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;C:\tfs\Vertafore_TFSDev\CQ\veracode\pythontestscriptonation.py&quot;, line 11, in &lt;module&gt; r = requests.get(url=&quot;https://analysiscenter.veracode.com/api/4.0/getapplist.do&quot;, auth=(username, password)) File &quot;C:\Python33\lib\site-packages\requests\api.py&quot;, line 55, in get return request('get', url, **kwargs) File &quot;C:\Python33\lib\site-packages\requests\api.py&quot;, line 44, in request return session.request(method=method, url=url, **kwargs) File &quot;C:\Python33\lib\site-packages\requests\sessions.py&quot;, line 335, in request resp = self.send(prep, **send_kwargs) File &quot;C:\Python33\lib\site-packages\requests\sessions.py&quot;, line 438, in send r = adapter.send(request, **kwargs) File &quot;C:\Python33\lib\site-packages\requests\adapters.py&quot;, line 327, in send raise ConnectionError(e) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='analysiscenter.veracode.com', port=443): Max retries exceeded with url: /api/4.0/getapplist.do (Caused by &lt;class 'ConnectionResetError'&gt;: [WinError 10054] An existing connection was forcibly closed by the remote host)"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 428, in urlopen body=body, headers=headers) File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 280, in _make_request conn.request(method, url, **httplib_request_kw) File "C:\Python33\lib\http\client.py", line 1061, in request self._send_request(method, url, body, headers) File "C:\Python33\lib\http\client.py", line 1099, in _send_request self.endheaders(body) File "C:\Python33\lib\http\client.py", line 1057, in endheaders self._send_output(message_body) File "C:\Python33\lib\http\client.py", line 902, in _send_output self.send(msg) File "C:\Python33\lib\http\client.py", line 840, in send self.connect() File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 107, in connect ssl_version=resolved_ssl_version) File "C:\Python33\lib\site-packages\requests\packages\urllib3\util.py", line 369, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Python33\lib\ssl.py", line 210, in wrap_socket _context=self) File "C:\Python33\lib\ssl.py", line 310, in __init__ raise x File "C:\Python33\lib\ssl.py", line 306, in __init__ self.do_handshake() File "C:\Python33\lib\ssl.py", line 513, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python33\lib\site-packages\requests\adapters.py", line 292, in send timeout=timeout File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 474, in urlopen raise MaxRetryError(self, url, e) [Finished in 61.3s with exit code 1]requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='analysiscenter.veracode.com', port=443): Max retries exceeded with url: /api/4.0/getapplist.do (Caused by &lt;class 'ConnectionResetError'&gt;: [WinError 10054] An existing connection was forcibly closed by the remote host) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\tfs\Vertafore_TFSDev\CQ\veracode\pythontestscriptonation.py", line 11, in &lt;module&gt; r = requests.get(url="https://analysiscenter.veracode.com/api/4.0/getapplist.do", auth=(username, password)) File "C:\Python33\lib\site-packages\requests\api.py", line 55, in get return request('get', url, **kwargs) File "C:\Python33\lib\site-packages\requests\api.py", line 44, in request return session.request(method=method, url=url, **kwargs) File "C:\Python33\lib\site-packages\requests\sessions.py", line 335, in request resp = self.send(prep, **send_kwargs) File "C:\Python33\lib\site-packages\requests\sessions.py", line 438, in send r = adapter.send(request, **kwargs) File "C:\Python33\lib\site-packages\requests\adapters.py", line 327, in send raise ConnectionError(e) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='analysiscenter.veracode.com', port=443): Max retries exceeded with url: /api/4.0/getapplist.do (Caused by &lt;class 'ConnectionResetError'&gt;: [WinError 10054] An existing connection was forcibly closed by the remote host) </code></pre></div>
<p dir="auto">I'm getting a strange error when using Requests in Python 3.3 (other flavors of Python 3 do not get this error):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py&quot;, line 421, in urlopen body=body, headers=headers) File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py&quot;, line 273, in _make_request conn.request(method, url, **httplib_request_kw) File &quot;C:\Python33\lib\http\client.py&quot;, line 1049, in request self._send_request(method, url, body, headers) File &quot;C:\Python33\lib\http\client.py&quot;, line 1087, in _send_request self.endheaders(body) File &quot;C:\Python33\lib\http\client.py&quot;, line 1045, in endheaders self._send_output(message_body) File &quot;C:\Python33\lib\http\client.py&quot;, line 890, in _send_output self.send(msg) File &quot;C:\Python33\lib\http\client.py&quot;, line 828, in send self.connect() File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py&quot;, line 104, in connect ssl_version=resolved_ssl_version) File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\util.py&quot;, line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File &quot;C:\Python33\lib\ssl.py&quot;, line 210, in wrap_socket _context=self) File &quot;C:\Python33\lib\ssl.py&quot;, line 310, in __init__ raise x File &quot;C:\Python33\lib\ssl.py&quot;, line 306, in __init__ self.do_handshake() File &quot;C:\Python33\lib\ssl.py&quot;, line 513, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;C:\Python33\lib\site-packages\requests\adapters.py&quot;, line 211, in send timeout=timeout File &quot;C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py&quot;, line 465, in urlopen raise MaxRetryError(self, url, e) requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='analysiscenter.veracode.com', port=443): Max retries exceeded with url: /api/2.0/getappbuilds.do (Caused by &lt;class 'ConnectionResetError'&gt;: [WinError 10054] An existing connection was forcibly closed by the remote host) During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;C:\tfs\Vertafore_TFSDev\CQ\python\veracode\pythontestscriptonation.py&quot;, line 33, in &lt;module&gt; print(v.get_app_builds()) File &quot;C:\tfs\Vertafore_TFSDev\CQ\python\veracode\apiwrapper.py&quot;, line 184, in get_app_builds {} File &quot;C:\tfs\Vertafore_TFSDev\CQ\python\veracode\apiwrapper.py&quot;, line 57, in request r = requests.get(URL, params=data, auth=username_password) File &quot;C:\Python33\lib\site-packages\requests\api.py&quot;, line 55, in get return request('get', url, **kwargs) File &quot;C:\Python33\lib\site-packages\requests\api.py&quot;, line 44, in request return session.request(method=method, url=url, **kwargs) File &quot;C:\Python33\lib\site-packages\requests\sessions.py&quot;, line 354, in request resp = self.send(prep, **send_kwargs) File &quot;C:\Python33\lib\site-packages\requests\sessions.py&quot;, line 460, in send r = adapter.send(request, **kwargs) File &quot;C:\Python33\lib\site-packages\requests\adapters.py&quot;, line 246, in send raise ConnectionError(e) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='analysiscenter.veracode.com', port=443): Max retries exceeded with url: /api/2.0/getappbuilds.do (Caused by &lt;class 'ConnectionResetError'&gt;: [WinError 10054] An existing connection was forcibly closed by the remote host) [Finished in 61.0s with exit code 1]"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 421, in urlopen body=body, headers=headers) File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 273, in _make_request conn.request(method, url, **httplib_request_kw) File "C:\Python33\lib\http\client.py", line 1049, in request self._send_request(method, url, body, headers) File "C:\Python33\lib\http\client.py", line 1087, in _send_request self.endheaders(body) File "C:\Python33\lib\http\client.py", line 1045, in endheaders self._send_output(message_body) File "C:\Python33\lib\http\client.py", line 890, in _send_output self.send(msg) File "C:\Python33\lib\http\client.py", line 828, in send self.connect() File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 104, in connect ssl_version=resolved_ssl_version) File "C:\Python33\lib\site-packages\requests\packages\urllib3\util.py", line 329, in ssl_wrap_socket return context.wrap_socket(sock, server_hostname=server_hostname) File "C:\Python33\lib\ssl.py", line 210, in wrap_socket _context=self) File "C:\Python33\lib\ssl.py", line 310, in __init__ raise x File "C:\Python33\lib\ssl.py", line 306, in __init__ self.do_handshake() File "C:\Python33\lib\ssl.py", line 513, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Python33\lib\site-packages\requests\adapters.py", line 211, in send timeout=timeout File "C:\Python33\lib\site-packages\requests\packages\urllib3\connectionpool.py", line 465, in urlopen raise MaxRetryError(self, url, e) requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='analysiscenter.veracode.com', port=443): Max retries exceeded with url: /api/2.0/getappbuilds.do (Caused by &lt;class 'ConnectionResetError'&gt;: [WinError 10054] An existing connection was forcibly closed by the remote host) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\tfs\Vertafore_TFSDev\CQ\python\veracode\pythontestscriptonation.py", line 33, in &lt;module&gt; print(v.get_app_builds()) File "C:\tfs\Vertafore_TFSDev\CQ\python\veracode\apiwrapper.py", line 184, in get_app_builds {} File "C:\tfs\Vertafore_TFSDev\CQ\python\veracode\apiwrapper.py", line 57, in request r = requests.get(URL, params=data, auth=username_password) File "C:\Python33\lib\site-packages\requests\api.py", line 55, in get return request('get', url, **kwargs) File "C:\Python33\lib\site-packages\requests\api.py", line 44, in request return session.request(method=method, url=url, **kwargs) File "C:\Python33\lib\site-packages\requests\sessions.py", line 354, in request resp = self.send(prep, **send_kwargs) File "C:\Python33\lib\site-packages\requests\sessions.py", line 460, in send r = adapter.send(request, **kwargs) File "C:\Python33\lib\site-packages\requests\adapters.py", line 246, in send raise ConnectionError(e) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='analysiscenter.veracode.com', port=443): Max retries exceeded with url: /api/2.0/getappbuilds.do (Caused by &lt;class 'ConnectionResetError'&gt;: [WinError 10054] An existing connection was forcibly closed by the remote host) [Finished in 61.0s with exit code 1] </code></pre></div> <p dir="auto">This automation has run for months on Python 3.2 and these errors have never occurred. I don't really know enough about requests to investigate this issue, but I'd be happy to help recreate the issue or debug if someone else can. Perhaps there's a bug in how Requests is handling HTTPS requests with Python 3.3? (Did 3.3 change how urllib works?...I don't know offhand...)</p> <p dir="auto">Again, I'm not getting any of these issues in Python 3.2 or Python 3.1. Please help! :)</p>
1
<p dir="auto">The current implementation of autowiring seems to force unnecessary coupling and to be instable in case of change in a vendor's service implementation.</p> <p dir="auto">Example 1:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="interface IA interface IB extends IA *service* class C implemets IB"><pre class="notranslate"><code class="notranslate">interface IA interface IB extends IA *service* class C implemets IB </code></pre></div> <p dir="auto">I can autowire using the type hint <code class="notranslate">IB</code>, but not <code class="notranslate">IA</code>.</p> <p dir="auto">Example 2:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="interface I class CA implements I *service* class CB extends CA"><pre class="notranslate"><code class="notranslate">interface I class CA implements I *service* class CB extends CA </code></pre></div> <p dir="auto">I cannot type hint on <code class="notranslate">I</code>.</p> <p dir="auto">This means, autowiring would break if an intermediary interface or an abstract class were added. Nothing in the documentation (<a href="http://symfony.com/doc/current/components/dependency_injection/autowiring.html" rel="nofollow">http://symfony.com/doc/current/components/dependency_injection/autowiring.html</a>) mentions this limitation and it seems highly counter-intuitive.</p> <p dir="auto">If you agree this should be addressed, I am ready to provide a PR to fix this.</p>
<p dir="auto">With a fresh 4.1.1 install, I override the framework's router:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="namespace App\Service; use Symfony\Bundle\FrameworkBundle\Routing\Router; class AdminRouter extends Router { }"><pre class="notranslate"><code class="notranslate">namespace App\Service; use Symfony\Bundle\FrameworkBundle\Routing\Router; class AdminRouter extends Router { } </code></pre></div> <p dir="auto">And make a service with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="App\Service\AdminRouter: arguments: $resource: 'resource' $options: []"><pre class="notranslate"><code class="notranslate">App\Service\AdminRouter: arguments: $resource: 'resource' $options: [] </code></pre></div> <p dir="auto">Which generates a rather ominous error message:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="The service &quot;.service_locator.G69Xsbl.App\Service\AdminRouter&quot; has a dependency on a non-existent service &quot;Symfony\Component\Config\Loader\LoaderInterface&quot;."><pre class="notranslate"><code class="notranslate">The service ".service_locator.G69Xsbl.App\Service\AdminRouter" has a dependency on a non-existent service "Symfony\Component\Config\Loader\LoaderInterface". </code></pre></div> <p dir="auto">LoaderInterface? Where the heck does that come from? Looking at the framework's router:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Symfony\Bundle\FrameworkBundle\Routing\Router; public function __construct( ContainerInterface $container, $resource, array $options = array(), RequestContext $context = null, ContainerInterface $parameters = null, LoggerInterface $logger = null) {"><pre class="notranslate"><code class="notranslate"># Symfony\Bundle\FrameworkBundle\Routing\Router; public function __construct( ContainerInterface $container, $resource, array $options = array(), RequestContext $context = null, ContainerInterface $parameters = null, LoggerInterface $logger = null) { </code></pre></div> <p dir="auto">Notice the two ContainerInterfaces. Someone got a bit "clever" with the parameters injection.</p> <p dir="auto">Changing the service definition fixes the problem:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="App\Service\AdminRouter: arguments: $container: '@service_container' $parameters: '@service_container' $resource: 'resource' $options: []"><pre class="notranslate"><code class="notranslate">App\Service\AdminRouter: arguments: $container: '@service_container' $parameters: '@service_container' $resource: 'resource' $options: [] </code></pre></div> <p dir="auto">Is this a bug or some sort of feature? Obviously injecting the same type twice is a fairly rare thing. If it is a bug then is it even worth fixing?</p>
0
<h3 dir="auto">Describe your issue.</h3> <p dir="auto">When the <code class="notranslate">hybr</code> method doesn't converge, it may sometimes report erroneously <code class="notranslate">success = True</code>. For example, looking at the function <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="4bb54094887c3081cfb9a4e58bed962d">$f(x) = x^2-2x$</math-renderer> for initial value <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="4bb54094887c3081cfb9a4e58bed962d">$x_0=1$</math-renderer> (or values very close to <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="4bb54094887c3081cfb9a4e58bed962d">$1$</math-renderer>), this method reports convergence on <code class="notranslate">1.01</code> .</p> <p dir="auto">When looking at other methods available in <code class="notranslate">root</code>, <code class="notranslate">hybr</code> is the only one to falsely report success while being clearly not converged.</p> <p dir="auto">I would propose adding a last function call to <code class="notranslate">hybr</code> and setting <code class="notranslate">success</code> accordingly</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="&gt;&gt;&gt; root(lambda x: x**2-2*x, x0=1.) fjac: array([[-1.]]) fun: array([-0.9999]) message: 'The solution converged.' nfev: 6 qtf: array([0.9999]) r: array([-0.02000001]) status: 1 success: True x: array([1.01]) &gt;&gt;&gt; methods = ['hybr', 'lm', 'broyden1', 'broyden2', ... 'anderson', 'linearmixing', 'diagbroyden', 'excitingmixing', ... 'krylov', 'df-sane'] &gt;&gt;&gt; for m in methods: ... r = root(lambda x: x**2-2*x, x0=1., method=m) ... print(f&quot;{m}: {r.success = }, {r.x = }&quot;) ... hybr: r.success = True, r.x = array([1.01]) lm: r.success = True, r.x = array([2.]) broyden1: r.success = True, r.x = array(4.46196389e-07) broyden2: r.success = True, r.x = array(4.46196389e-07) anderson: r.success = True, r.x = array(1.4289777e-06) linearmixing: r.success = True, r.x = array(4.65661287e-10) diagbroyden: r.success = True, r.x = array(4.46196389e-07) excitingmixing: r.success = True, r.x = array(1.18976516e-07) krylov: r.success = False, r.x = array(1.) df-sane: r.success = True, r.x = array(2.)"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">root</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-s1">x</span><span class="pl-c1">**</span><span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">*</span><span class="pl-s1">x</span>, <span class="pl-s1">x0</span><span class="pl-c1">=</span><span class="pl-c1">1.</span>) <span class="pl-s1">fjac</span>: <span class="pl-en">array</span>([[<span class="pl-c1">-</span><span class="pl-c1">1.</span>]]) <span class="pl-s1">fun</span>: <span class="pl-en">array</span>([<span class="pl-c1">-</span><span class="pl-c1">0.9999</span>]) <span class="pl-s1">message</span>: <span class="pl-s">'The solution converged.'</span> <span class="pl-s1">nfev</span>: <span class="pl-c1">6</span> <span class="pl-s1">qtf</span>: <span class="pl-en">array</span>([<span class="pl-c1">0.9999</span>]) <span class="pl-s1">r</span>: <span class="pl-en">array</span>([<span class="pl-c1">-</span><span class="pl-c1">0.02000001</span>]) <span class="pl-s1">status</span>: <span class="pl-c1">1</span> <span class="pl-s1">success</span>: <span class="pl-c1">True</span> <span class="pl-s1">x</span>: <span class="pl-en">array</span>([<span class="pl-c1">1.01</span>]) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">methods</span> <span class="pl-c1">=</span> [<span class="pl-s">'hybr'</span>, <span class="pl-s">'lm'</span>, <span class="pl-s">'broyden1'</span>, <span class="pl-s">'broyden2'</span>, ... <span class="pl-s">'anderson'</span>, <span class="pl-s">'linearmixing'</span>, <span class="pl-s">'diagbroyden'</span>, <span class="pl-s">'excitingmixing'</span>, ... <span class="pl-s">'krylov'</span>, <span class="pl-s">'df-sane'</span>] <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">for</span> <span class="pl-s1">m</span> <span class="pl-c1">in</span> <span class="pl-s1">methods</span>: ... <span class="pl-s1">r</span> <span class="pl-c1">=</span> <span class="pl-en">root</span>(<span class="pl-k">lambda</span> <span class="pl-s1">x</span>: <span class="pl-s1">x</span><span class="pl-c1">**</span><span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">*</span><span class="pl-s1">x</span>, <span class="pl-s1">x0</span><span class="pl-c1">=</span><span class="pl-c1">1.</span>, <span class="pl-s1">method</span><span class="pl-c1">=</span><span class="pl-s1">m</span>) ... <span class="pl-s1">print</span>(<span class="pl-s">f"<span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">m</span><span class="pl-kos">}</span></span>: <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-kos">}</span></span>, <span class="pl-s1"><span class="pl-kos">{</span><span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-kos">}</span></span>"</span>) ... <span class="pl-s1">hybr</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>([<span class="pl-c1">1.01</span>]) <span class="pl-s1">lm</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>([<span class="pl-c1">2.</span>]) <span class="pl-s1">broyden1</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>(<span class="pl-c1">4.46196389e-07</span>) <span class="pl-s1">broyden2</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>(<span class="pl-c1">4.46196389e-07</span>) <span class="pl-s1">anderson</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>(<span class="pl-c1">1.4289777e-06</span>) <span class="pl-s1">linearmixing</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>(<span class="pl-c1">4.65661287e-10</span>) <span class="pl-s1">diagbroyden</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>(<span class="pl-c1">4.46196389e-07</span>) <span class="pl-s1">excitingmixing</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>(<span class="pl-c1">1.18976516e-07</span>) <span class="pl-s1">krylov</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">False</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>(<span class="pl-c1">1.</span>) <span class="pl-s1">df</span><span class="pl-c1">-</span><span class="pl-s1">sane</span>: <span class="pl-s1">r</span>.<span class="pl-s1">success</span> <span class="pl-c1">=</span> <span class="pl-c1">True</span>, <span class="pl-s1">r</span>.<span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-en">array</span>(<span class="pl-c1">2.</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="-"><pre class="notranslate">-</pre></div> <h3 dir="auto">SciPy/NumPy/Python version information</h3> <p dir="auto">1.9.3 1.23.4 sys.version_info(major=3, minor=10, micro=6, releaselevel='final', serial=0)</p>
<p dir="auto">Running</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from scipy.optimize import root print(root(lambda x: (x - 1) ** 2 - 1, 1)) print(root(lambda x: (x - 1.6667898)**2 - 2, 1.66678977))"><pre class="notranslate"><code class="notranslate">from scipy.optimize import root print(root(lambda x: (x - 1) ** 2 - 1, 1)) print(root(lambda x: (x - 1.6667898)**2 - 2, 1.66678977)) </code></pre></div> <p dir="auto">gives the ridiculous results</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" fjac: array([[-1.]]) fun: array([-0.9999]) message: 'The solution converged.' nfev: 6 qtf: array([ 0.9999]) r: array([-0.02000001]) status: 1 success: True x: array([ 1.01])"><pre class="notranslate"><code class="notranslate"> fjac: array([[-1.]]) fun: array([-0.9999]) message: 'The solution converged.' nfev: 6 qtf: array([ 0.9999]) r: array([-0.02000001]) status: 1 success: True x: array([ 1.01]) </code></pre></div> <p dir="auto">and</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" fjac: array([[-1.]]) fun: array([-1.99985602]) message: 'The solution converged.' nfev: 6 qtf: array([ 1.99985602]) r: array([ 0.02399826]) status: 1 success: True x: array([ 1.65479065])"><pre class="notranslate"><code class="notranslate"> fjac: array([[-1.]]) fun: array([-1.99985602]) message: 'The solution converged.' nfev: 6 qtf: array([ 1.99985602]) r: array([ 0.02399826]) status: 1 success: True x: array([ 1.65479065]) </code></pre></div> <p dir="auto">These should not happen.</p> <h3 dir="auto">Scipy/Numpy/Python version information:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="0.19.0, 1.12.1, version_info(major=2, minor=7, micro=13, releaselevel='final', serial=0)"><pre class="notranslate"><code class="notranslate">0.19.0, 1.12.1, version_info(major=2, minor=7, micro=13, releaselevel='final', serial=0) </code></pre></div>
1
<h5 dir="auto">Description of the problem</h5> <p dir="auto">There seems to be a bug when copying from a buffer geometry into another existing buffer geometry, which causes groups to be appended, instead of replaced.<br> I don't think this is working as intended.<br> <a href="https://github.com/mrdoob/three.js/blob/master/src/core/BufferGeometry.js#L1017-L1024">Problematic code</a></p> <p dir="auto">I think this needs a clearGroups() call before starting to add groups.</p> <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" checked=""> r82</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"> 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>
<p dir="auto">I was loading an .obj with ~70k vertices, and it was taking ~20s to load the model. The slowness was being caused by <code class="notranslate">mergeVertices</code> call here:</p> <p dir="auto"><a href="https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/OBJMTLLoader.js#L101">https://github.com/mrdoob/three.js/blob/master/examples/js/loaders/OBJMTLLoader.js#L101</a></p> <p dir="auto">I commented it out just to see what would happen, and it took about ~1s to load the model and there was no visible change. Any ideas?</p>
0
<p dir="auto">I think this should be marked as feature request, but it's not as much a request as a curious question (and a scream of pain, yes). From now on I'm going to talk about neo4j-embedded API, not Cypher.</p> <p dir="auto">Since most methods on most entities return Iterables or Iterators, further processing of the results turns into a fairly painful procedure. I don't know whether I'm one from just a few or there are a lot of people with the same problem, but if you could, please consider (if not replacing, at least providing along) some methods that return Streams. Wouldn't it be great if end-users could so something like this:<br> <code class="notranslate">node.getRelationships(type, direction).map(mapper).collect(collector)</code>?</p> <p dir="auto">IMHO, switching to Stream API might even turn out to be a good choice since there all kinds of facilities: lazy loading of huge amounts of data, short-circuiting on some operations and so on.</p> <p dir="auto">Currently we are using helpers like the following across out neo4j projects:<br> <code class="notranslate">StreamSupport.stream(iterable.spliterator(), false);</code><br> It works, but introduces some amount of boilerplate and duplicated code and, what's more important, it's just a trivial wrapper. Knowing that Stream API provides a fair amount of additional <code class="notranslate">Characteristic</code>s for optimizing operations on streams, it seems to me that bringing this functionality to neo4j kernel would be more effective.</p> <p dir="auto">P.S. By the way, let me thank you for being that close to community. Seeing as your developers kindly address issues here and on stackoverflow/google groups and closely communicating with user base is quite an inspiration, really.</p> <p dir="auto">P.P.S. This it <em>totally</em> unrelated, but is there any possibility of introducing a typed <code class="notranslate">getProperty()</code> method that could infer it's return type? Now we have just this:<code class="notranslate">String s = (String)node.getProperty("key")</code>, but it would be (again, not that important, but probably just nice) <code class="notranslate">String s = node.getProperty("key")</code> or (dummy example) <code class="notranslate">System.out.println(node.&lt;String&gt;getProperty(someKey))</code>. Here's an excerpt from the code we use for this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="public &lt;T&gt; T getProperty(final String key, final T deflt) { Objects.requireNonNull(key); return (T)node.getProperty(key, deflt); }"><pre class="notranslate"><code class="notranslate">public &lt;T&gt; T getProperty(final String key, final T deflt) { Objects.requireNonNull(key); return (T)node.getProperty(key, deflt); } </code></pre></div>
<p dir="auto">when our neo4j backup runs daily, it seems to be generating inconsistency checker report files in the /root folder filling up space</p> <p dir="auto"><strong>Neo4j Version:</strong> 3.5.7<br> <strong>Operating System:</strong> Ubuntu 18.04.2 LTS</p> <h3 dir="auto">Steps to reproduce</h3> <ol dir="auto"> <li>Install neo4j 3.5.7</li> <li>Take backups nightly until problems arise</li> </ol> <h3 dir="auto">Expected behavior</h3> <p dir="auto">Backups should work, consistency checker should not be getting NullPointerExceptions</p> <h3 dir="auto">Actual behavior</h3> <p dir="auto">/root/ filling up with these NullPointerExceptions<br> Example:<br> <code class="notranslate">ERROR: Failed to check record: java.lang.NullPointerException at org.neo4j.consistency.checking.full.PropertyReader.propertyValue(PropertyReader.java:107) at org.neo4j.consistency.checking.full.PropertyAndNodeIndexedCheck.getPropertyValues(PropertyAndNodeIndexedCheck.java:217) at org.neo4j.consistency.checking.full.PropertyAndNodeIndexedCheck.matchIndexesToNode(PropertyAndNodeIndexedCheck.java:117) at org.neo4j.consistency.checking.full.PropertyAndNodeIndexedCheck.check(PropertyAndNodeIndexedCheck.java:83) at org.neo4j.consistency.checking.full.PropertyAndNodeIndexedCheck.check(PropertyAndNodeIndexedCheck.java:59) at org.neo4j.consistency.report.ConsistencyReporter.dispatch(ConsistencyReporter.java:116) at org.neo4j.consistency.report.ConsistencyReporter.forNode(ConsistencyReporter.java:384) at org.neo4j.consistency.checking.full.PropertyAndNode2LabelIndexProcessor.process(PropertyAndNode2LabelIndexProcessor.java:63) at org.neo4j.consistency.checking.full.PropertyAndNode2LabelIndexProcessor.process(PropertyAndNode2LabelIndexProcessor.java:39) at org.neo4j.consistency.checking.full.RecordCheckWorker.run(RecordCheckWorker.java:77) at</code></p> <p dir="auto">Note that prior to some date, around Nov 19, we are seeing much smaller "inconsistency" report files containing details such as <code class="notranslate">Node[6042535,used=true,rel=-1,prop=13355857,labels=Inline(0x1000000002:[2]),light,secondaryUnitId=-1] ERROR: The property chain contains multiple properties that have the same property key id, which means that the entity has at least one duplicate property.</code> and at around Nov 19 the NullPointerException appears which causes growth in file sizes on the disk<br> Not aware of any process that may have changed</p>
0
<p dir="auto">I have simple dropdown buttons we built with 2.04</p> <p dir="auto">links are A tags, proper quotes, href='#'</p> <p dir="auto">Used to work fine.</p> <p dir="auto">Upgraded today to 2.1 and the links in any dropdown button don't work. The dropdown menu opens, but clicking on a link closes the menu without any action. tested on Android 2.3 and iOS 5</p> <p dir="auto">Rolledback to 2.04 and everything works again. Anyone else has this issue?</p>
<p dir="auto">Heya!</p> <p dir="auto">We downloaded the server backend for the custom bootstrap builds. I would like to add a custom prefix as a field to the customizer frontend.</p> <p dir="auto">In general, would you merge a PR for the customizer frontend and the node backend with the possibility to prefix the css classes?</p>
0
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.2.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.2.0 config file = /etc/ansible/ansible.cfg configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <p dir="auto">No changes to default ansible.cfg</p> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Ubuntu</p> <p dir="auto">Directory Structure:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="devops ansible farscape group_vars all qa qa-ui inventories ec2.ini ec2.py qa security keys platform qa key.pem qa-ui ansible site.yml roles qa-ui"><pre class="notranslate"><code class="notranslate">devops ansible farscape group_vars all qa qa-ui inventories ec2.ini ec2.py qa security keys platform qa key.pem qa-ui ansible site.yml roles qa-ui </code></pre></div> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Ansible can't connect to host after upgrading from 2.1.0.0 to 2.1.2.0.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="site.yml: - name: Test Ping hosts: &quot;{{ hosts }}&quot; gather_facts: no tags: test tasks: - name: Test Ping ping: qa group var file: ansible_ssh_user: ubuntu ansible_ssh_private_key_file: ../../../security/keys/platform/qa/key.pem Executed from the devops -&gt; ansible -&gt; farscape directory (see directory structure above): ansible-playbook -i inventories/ ../../../qa-ui/ansible/site.yml -t test -e &quot;hosts=qa-ui&quot;"><pre class="notranslate"><code class="notranslate">site.yml: - name: Test Ping hosts: "{{ hosts }}" gather_facts: no tags: test tasks: - name: Test Ping ping: qa group var file: ansible_ssh_user: ubuntu ansible_ssh_private_key_file: ../../../security/keys/platform/qa/key.pem Executed from the devops -&gt; ansible -&gt; farscape directory (see directory structure above): ansible-playbook -i inventories/ ../../../qa-ui/ansible/site.yml -t test -e "hosts=qa-ui" </code></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Successful connection and ping result.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Using /etc/ansible/ansible.cfg as config file Loaded callback default of type stdout, v2.0 PLAYBOOK: site.yml ************************************************* 2 plays in ../../../qa-ui/ansible/site.yml PLAY [Test Ping] *************************************************************** TASK [Test Ping] *************************************************************** task path: /opt/teamcity-agent/work/56ef8995252d7315/qa-ui/ansible/site.yml:6 &lt;10.2.10.13&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;10.2.10.12&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;10.2.10.13&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r 10.2.10.13 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-100845165082436 `&quot; &amp;&amp; echo ansible-tmp-1477325466.67-100845165082436=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-100845165082436 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;'' &lt;10.2.10.12&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r 10.2.10.12 '/bin/sh -c '&quot;'&quot;'( umask 77 &amp;&amp; mkdir -p &quot;` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-37577927945882 `&quot; &amp;&amp; echo ansible-tmp-1477325466.67-37577927945882=&quot;` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-37577927945882 `&quot; ) &amp;&amp; sleep 0'&quot;'&quot;'' fatal: [10.2.10.13]: UNREACHABLE! =&gt; {&quot;changed&quot;: false, &quot;msg&quot;: &quot;Failed to connect to the host via ssh.&quot;, &quot;unreachable&quot;: true} fatal: [10.2.10.12]: UNREACHABLE! =&gt; {&quot;changed&quot;: false, &quot;msg&quot;: &quot;Failed to connect to the host via ssh.&quot;, &quot;unreachable&quot;: true} PLAY RECAP ********************************************************************* 10.2.10.12 : ok=0 changed=0 unreachable=1 failed=0 10.2.10.13 : ok=0 changed=0 unreachable=1 failed=0 "><pre class="notranslate"><code class="notranslate">Using /etc/ansible/ansible.cfg as config file Loaded callback default of type stdout, v2.0 PLAYBOOK: site.yml ************************************************* 2 plays in ../../../qa-ui/ansible/site.yml PLAY [Test Ping] *************************************************************** TASK [Test Ping] *************************************************************** task path: /opt/teamcity-agent/work/56ef8995252d7315/qa-ui/ansible/site.yml:6 &lt;10.2.10.13&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;10.2.10.12&gt; ESTABLISH SSH CONNECTION FOR USER: None &lt;10.2.10.13&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r 10.2.10.13 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-100845165082436 `" &amp;&amp; echo ansible-tmp-1477325466.67-100845165082436="` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-100845165082436 `" ) &amp;&amp; sleep 0'"'"'' &lt;10.2.10.12&gt; SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r 10.2.10.12 '/bin/sh -c '"'"'( umask 77 &amp;&amp; mkdir -p "` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-37577927945882 `" &amp;&amp; echo ansible-tmp-1477325466.67-37577927945882="` echo $HOME/.ansible/tmp/ansible-tmp-1477325466.67-37577927945882 `" ) &amp;&amp; sleep 0'"'"'' fatal: [10.2.10.13]: UNREACHABLE! =&gt; {"changed": false, "msg": "Failed to connect to the host via ssh.", "unreachable": true} fatal: [10.2.10.12]: UNREACHABLE! =&gt; {"changed": false, "msg": "Failed to connect to the host via ssh.", "unreachable": true} PLAY RECAP ********************************************************************* 10.2.10.12 : ok=0 changed=0 unreachable=1 failed=0 10.2.10.13 : ok=0 changed=0 unreachable=1 failed=0 </code></pre></div> <p dir="auto">This error happens across all our ansible tasks after upgrading from 2.1.0.0 to 2.1.2.0.</p>
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">ec2_group</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 = /home/con5cience/git/Ansible/ansible.cfg configured module search path = [u'/usr/share/ansible', u'library'] python version = 2.7.13 (default, Jan 12 2017, 17:59:37) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]"><pre class="notranslate"><code class="notranslate">ansible 2.3.0.0 config file = /home/con5cience/git/Ansible/ansible.cfg configured module search path = [u'/usr/share/ansible', u'library'] python version = 2.7.13 (default, Jan 12 2017, 17:59:37) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[defaults] inventory=inventory library=/usr/share/ansible:library roles_path=roles vault_password_file = vault_pass forks=20 ask_sudo_pass=yes nocows=0 cow_selection = random host_key_checking = False [ssh_connection] pipelining=True ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=30m control_path = ~/.ssh/ansible-%%r@%%h:%%p"><pre class="notranslate"><code class="notranslate">[defaults] inventory=inventory library=/usr/share/ansible:library roles_path=roles vault_password_file = vault_pass forks=20 ask_sudo_pass=yes nocows=0 cow_selection = random host_key_checking = False [ssh_connection] pipelining=True ssh_args = -o ForwardAgent=yes -o ControlMaster=auto -o ControlPersist=30m control_path = ~/.ssh/ansible-%%r@%%h:%%p </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">From: Fedora 25<br> To: Amazon EC2 API</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Managing the rules of EC2 security groups using the <code class="notranslate">ec2_group</code> module is not idempotent.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <ol dir="auto"> <li>Use Ansible to configure a security group and add rules to the group.</li> <li>Run Ansible again.</li> </ol> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" ec2_group: name: &quot;{{ security_group_name|default( inventory_hostname ~ '-' ~ env ~ '-security-group' ) }}&quot; description: &quot;{{ security_group_name|default( inventory_hostname ~ '-' ~ env ~ 'Security Group' ) }}&quot; vpc_id: &quot;{{ ec2_vpc_id }}&quot; region: &quot;{{ ec2_region }}&quot; rules: &quot;{{ common_rules_ingress + rules_ingress }}&quot; rules_egress: &quot;{{ common_rules_egress + rules_egress }}&quot; delegate_to: localhost"><pre class="notranslate"> <span class="pl-ent">ec2_group</span>: <span class="pl-ent">name</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ security_group_name|default( inventory_hostname ~ '-' ~ env ~ '-security-group' ) }}<span class="pl-pds">"</span></span> <span class="pl-ent">description</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ security_group_name|default( inventory_hostname ~ '-' ~ env ~ 'Security Group' ) }}<span class="pl-pds">"</span></span> <span class="pl-ent">vpc_id</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ ec2_vpc_id }}<span class="pl-pds">"</span></span> <span class="pl-ent">region</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ ec2_region }}<span class="pl-pds">"</span></span> <span class="pl-ent">rules</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ common_rules_ingress + rules_ingress }}<span class="pl-pds">"</span></span> <span class="pl-ent">rules_egress</span>: <span class="pl-s"><span class="pl-pds">"</span>{{ common_rules_egress + rules_egress }}<span class="pl-pds">"</span></span> <span class="pl-ent">delegate_to</span>: <span class="pl-s">localhost</span></pre></div> <p dir="auto">Where <code class="notranslate">common_rules_ingress</code>, <code class="notranslate">common_rules_egress</code>, <code class="notranslate">rules_ingress</code>, and <code class="notranslate">rules_egress</code> are lists of port rules in the style of:</p> <div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" - proto: tcp from_port: 443 to_port: 443 cidr_ip: 0.0.0.0/0 - proto: tcp from_port: 80 to_port: 80 cidr_ip: 0.0.0.0/0"><pre class="notranslate"> - <span class="pl-ent">proto</span>: <span class="pl-s">tcp</span> <span class="pl-ent">from_port</span>: <span class="pl-c1">443</span> <span class="pl-ent">to_port</span>: <span class="pl-c1">443</span> <span class="pl-ent">cidr_ip</span>: <span class="pl-s">0.0.0.0/0</span> - <span class="pl-ent">proto</span>: <span class="pl-s">tcp</span> <span class="pl-ent">from_port</span>: <span class="pl-c1">80</span> <span class="pl-ent">to_port</span>: <span class="pl-c1">80</span> <span class="pl-ent">cidr_ip</span>: <span class="pl-s">0.0.0.0/0</span></pre></div> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">Task exits with 0 and playbook continues if the rule already exists and no changes are made.</p> <h5 dir="auto">ACTUAL RESULTS</h5> <p dir="auto">Task exits with 1 (or 2, not entirely sure) and playbook run immediately bails when a rule already exists and no changes are made.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="The full traceback is: Traceback (most recent call last): File &quot;/tmp/ansible_em0SmM/ansible_module_ec2_group.py&quot;, line 487, in &lt;module&gt; main() File &quot;/tmp/ansible_em0SmM/ansible_module_ec2_group.py&quot;, line 439, in main cidr_ip=thisip) File &quot;/usr/lib/python2.7/site-packages/boto/ec2/connection.py&quot;, line 3245, in authorize_security_group_egress params, verb='POST') File &quot;/usr/lib/python2.7/site-packages/boto/connection.py&quot;, line 1227, in get_status raise self.ResponseError(response.status, response.reason, body) boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidPermission.Duplicate&lt;/Code&gt;&lt;Message&gt;the specified rule &quot;peer: 0.0.0.0/0, TCP, from port: 443, to port: 443, ALLOW&quot; already exists&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;871be7ab-957c-4c41-8982-706e7a5dc64c&lt;/RequestID&gt;&lt;/Response&gt; fatal: [remotehost -&gt; localhost]: FAILED! =&gt; { &quot;changed&quot;: false, &quot;failed&quot;: true, &quot;module_stderr&quot;: &quot;Traceback (most recent call last):\n File \&quot;/tmp/ansible_em0SmM/ansible_module_ec2_group.py\&quot;, line 487, in &lt;module&gt;\n main()\n File \&quot;/tmp/ansible_em0SmM/ansible_module_ec2_group.py\&quot;, line 439, in main\n cidr_ip=thisip)\n File \&quot;/usr/lib/python2.7/site-packages/boto/ec2/connection.py\&quot;, line 3245, in authorize_security_group_egress\n params, verb='POST')\n File \&quot;/usr/lib/python2.7/site-packages/boto/connection.py\&quot;, line 1227, in get_status\n raise self.ResponseError(response.status, response.reason, body)\nboto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request\n&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;UTF-8\&quot;?&gt;\n&lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidPermission.Duplicate&lt;/Code&gt;&lt;Message&gt;the specified rule \&quot;peer: 0.0.0.0/0, TCP, from port: 443, to port: 443, ALLOW\&quot; already exists&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;871be7ab-957c-4c41-8982-706e7a5dc64c&lt;/RequestID&gt;&lt;/Response&gt;\n&quot;, &quot;module_stdout&quot;: &quot;&quot;, &quot;msg&quot;: &quot;MODULE FAILURE&quot;, &quot;rc&quot;: 1 }"><pre class="notranslate"><code class="notranslate">The full traceback is: Traceback (most recent call last): File "/tmp/ansible_em0SmM/ansible_module_ec2_group.py", line 487, in &lt;module&gt; main() File "/tmp/ansible_em0SmM/ansible_module_ec2_group.py", line 439, in main cidr_ip=thisip) File "/usr/lib/python2.7/site-packages/boto/ec2/connection.py", line 3245, in authorize_security_group_egress params, verb='POST') File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1227, in get_status raise self.ResponseError(response.status, response.reason, body) boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidPermission.Duplicate&lt;/Code&gt;&lt;Message&gt;the specified rule "peer: 0.0.0.0/0, TCP, from port: 443, to port: 443, ALLOW" already exists&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;871be7ab-957c-4c41-8982-706e7a5dc64c&lt;/RequestID&gt;&lt;/Response&gt; fatal: [remotehost -&gt; localhost]: FAILED! =&gt; { "changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_em0SmM/ansible_module_ec2_group.py\", line 487, in &lt;module&gt;\n main()\n File \"/tmp/ansible_em0SmM/ansible_module_ec2_group.py\", line 439, in main\n cidr_ip=thisip)\n File \"/usr/lib/python2.7/site-packages/boto/ec2/connection.py\", line 3245, in authorize_security_group_egress\n params, verb='POST')\n File \"/usr/lib/python2.7/site-packages/boto/connection.py\", line 1227, in get_status\n raise self.ResponseError(response.status, response.reason, body)\nboto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request\n&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;\n&lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidPermission.Duplicate&lt;/Code&gt;&lt;Message&gt;the specified rule \"peer: 0.0.0.0/0, TCP, from port: 443, to port: 443, ALLOW\" already exists&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;871be7ab-957c-4c41-8982-706e7a5dc64c&lt;/RequestID&gt;&lt;/Response&gt;\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 1 } </code></pre></div> <p dir="auto">See also:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="25713612" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/5643" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible/issues/5643/hovercard" href="https://github.com/ansible/ansible/issues/5643">#5643</a> (arbitrarily closed)<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="119304341" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-core/issues/2576" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-core/issues/2576/hovercard" href="https://github.com/ansible/ansible-modules-core/issues/2576">ansible/ansible-modules-core#2576</a> (open but in locked repo)</p>
0
<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.19041.264 PowerToys version: 0.18.2 PowerToy module for which you are reporting the bug (if applicable): FanzyZones (Keyboard Manager?)"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.19041.264 PowerToys version: 0.18.2 PowerToy module for which you are reporting the bug (if applicable): FanzyZones (Keyboard Manager?) </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>In FancyZones enable "Override Windows Snap hotkeys (Win + arrow) to move windows between zones"</li> <li>In Keyboard Manager use "Remap a key" to swap Alt (Left) and Win (Left), by mapping: <ul dir="auto"> <li>Win (Left) to Alt (Left)</li> <li>Alt (Left) to Win (Left)</li> </ul> </li> <li>Hold <code class="notranslate">Alt (Left)</code> (mapped to Win) press <code class="notranslate">Left</code> (arrow key).</li> </ol> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Window moves between zones.</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Window uses normal Windows Snap behavior.</p> <h1 dir="auto">Additional test scenario</h1> <p dir="auto">This re-binding of Win (Left) to another key seems to cascade to mapped shortcuts as well.</p> <h2 dir="auto">Steps to reproduce</h2> <ol dir="auto"> <li>Follow steps to reproduce described above</li> <li>In Keyboard Manager use "Remap shortcuts" to give a VIM style movement binding: <ul dir="auto"> <li>Win (Left), Shift (Left), H to Win (Left), Left</li> </ul> </li> <li>Hold <code class="notranslate">Alt (Left)</code> (mapped to Win Left) and <code class="notranslate">Shift (Left)</code> then press <code class="notranslate">H</code> key</li> </ol> <h2 dir="auto">Expected behavior</h2> <p dir="auto">Window moves between zones.</p> <h2 dir="auto">Actual behavior</h2> <p dir="auto">Window uses normal Windows Snap behavior.</p> <h1 dir="auto">Work around</h1> <p dir="auto">Now that I understand the issue, I'm working around this by leaving Win/Alt unmodified and instead creating shortcut mappings for any hotkeys I'd like to use with the key next to spacebar. This seems to work well enough and means I can do things such as map Alt-L which was not possible with Win-L.</p> <p dir="auto">If the issue reported isn't reasonably achievable, my request would be to put a note in Keyboard Manager that rebinding Win (Left) may cause unpredictable behavior.</p>
<p dir="auto">KBM currently does not always work consistenly with FZ and Shortcut guide if the Win key is remapped. The current workaround for a user would be to disable and enable KBM (since this will restart the hook), however we should automatically do this for v1.</p>
1
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Bug Report</li> </ul> <h5 dir="auto">ANSIBLE VERSION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ansible 2.1.0.0 config file = /path/to/whatever/ansible.cfg configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.1.0.0 config file = /path/to/whatever/ansible.cfg configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ssh_connection] pipelining=True"><pre class="notranslate"><code class="notranslate">[ssh_connection] pipelining=True </code></pre></div> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">N/A</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">Unix domain socket created by ansible was too long, therefore ssh fails.<br> The error message is very vague:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="this-is-a-long-hostname.example.org | UNREACHABLE! =&gt; { &quot;changed&quot;: false, &quot;msg&quot;: &quot;Failed to connect to the host via ssh.&quot;, &quot;unreachable&quot;: true }"><pre class="notranslate"><code class="notranslate">this-is-a-long-hostname.example.org | UNREACHABLE! =&gt; { "changed": false, "msg": "Failed to connect to the host via ssh.", "unreachable": true } </code></pre></div> <p dir="auto">Giving the same ssh command as ansible, the error was more descriptive:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="unix_listener: &quot;/Users/user12/.ansible/cp/ansible-ssh-this-is-a-long-hostname.example.org-1022-user12345.ulAxrSDBy3jA13KO&quot; too long for Unix domain socket"><pre class="notranslate"><code class="notranslate">unix_listener: "/Users/user12/.ansible/cp/ansible-ssh-this-is-a-long-hostname.example.org-1022-user12345.ulAxrSDBy3jA13KO" too long for Unix domain socket </code></pre></div> <p dir="auto">I was able to solve this by putting in my <code class="notranslate">ansible.cfg</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="control_path = %(directory)s/%%h-%%r"><pre class="notranslate"><code class="notranslate">control_path = %(directory)s/%%h-%%r </code></pre></div> <p dir="auto">The socket name that ansible sets is clearly way too long. This means that, as of now, long hostnames don't work with Ansible, and it can be quite restricting.</p> <h5 dir="auto">STEPS TO REPRODUCE</h5> <ul dir="auto"> <li>Have a long hostname in your inventory (e.g. <code class="notranslate">this-is-a-long-hostname.example.org</code>)</li> <li>Try a simple ping command (with <code class="notranslate">ansible -vvvvvvvvvvvvv -m ping</code> to that host)</li> </ul> <h5 dir="auto">EXPECTED RESULTS</h5> <p dir="auto">You can connect to the machine</p> <h5 dir="auto">ACTUAL RESULTS</h5> <ul dir="auto"> <li>You cannot connect to the machine</li> <li>SSH error is very vague (maybe addressed by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="164580976" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible/issues/16649" data-hovercard-type="pull_request" data-hovercard-url="/ansible/ansible/pull/16649/hovercard" href="https://github.com/ansible/ansible/pull/16649">#16649</a> )</li> </ul>
<h5 dir="auto">ISSUE TYPE</h5> <p dir="auto">Feature Idea</p> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">ssh control persist</p> <h5 dir="auto">ANSIBLE VERSION</h5> <p dir="auto">2.0</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">When trying to use the ec2 plugin, ssh fails with this error:</p> <p dir="auto"><code class="notranslate">SSH Error: unix_listener: "/Users/luke/.ansible/cp/ansible-ssh-ec2-255-255-255-255.compute-1.amazonaws.com-22-ubuntu.CErvOvRE5U0urCgm" too long for Unix domain socket</code></p> <p dir="auto">Here's the full example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible -vvvv -i ec2.py -u ubuntu us-east-1 -m ping &lt;ec2-255-255-255-255.compute-1.amazonaws.com&gt; ESTABLISH CONNECTION FOR USER: ubuntu &lt;ec2-255-255-255-255.compute-1.amazonaws.com&gt; REMOTE_MODULE ping &lt;ec2-255-255-255-255.compute-1.amazonaws.com&gt; EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath=&quot;/Users/luke/.ansible/cp/ansible-ssh-%h-%p-%r&quot; -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 ec2-255-255-255-255.compute-1.amazonaws.com /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1436458336.4-21039895766180 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1436458336.4-21039895766180 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1436458336.4-21039895766180' ec2-255-255-255-255.compute-1.amazonaws.com | FAILED =&gt; SSH Error: unix_listener: &quot;/Users/luke/.ansible/cp/ansible-ssh-ec2-255-255-255-255.compute-1.amazonaws.com-22-ubuntu.CErvOvRE5U0urCgm&quot; too long for Unix domain socket while connecting to 255.255.255.255:22 It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue."><pre class="notranslate"><code class="notranslate">$ ansible -vvvv -i ec2.py -u ubuntu us-east-1 -m ping &lt;ec2-255-255-255-255.compute-1.amazonaws.com&gt; ESTABLISH CONNECTION FOR USER: ubuntu &lt;ec2-255-255-255-255.compute-1.amazonaws.com&gt; REMOTE_MODULE ping &lt;ec2-255-255-255-255.compute-1.amazonaws.com&gt; EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/Users/luke/.ansible/cp/ansible-ssh-%h-%p-%r" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o ConnectTimeout=10 ec2-255-255-255-255.compute-1.amazonaws.com /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1436458336.4-21039895766180 &amp;&amp; chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1436458336.4-21039895766180 &amp;&amp; echo $HOME/.ansible/tmp/ansible-tmp-1436458336.4-21039895766180' ec2-255-255-255-255.compute-1.amazonaws.com | FAILED =&gt; SSH Error: unix_listener: "/Users/luke/.ansible/cp/ansible-ssh-ec2-255-255-255-255.compute-1.amazonaws.com-22-ubuntu.CErvOvRE5U0urCgm" too long for Unix domain socket while connecting to 255.255.255.255:22 It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue. </code></pre></div> <p dir="auto">I've changed some of the sensitive info in here like the IP etc.</p>
1
<p dir="auto">Currently applications are not staying in the fancy zones, when the monitor is powered off and on again.<br> All applications pile up in the upper left corner.</p> <p dir="auto">Would be nice to keep the state/position of the applications after the screen is powered again. Same as when the computer is returning from sleep mode.</p>
<p dir="auto">This was mentioned in the README so I'm creating the issue as it sounds like a neat idea to me</p> <p dir="auto">I'm assuming this would allow for more flexible window arrangements than the current quadrant snapping, etc.</p>
1
<h3 dir="auto">What problem does this feature solve?</h3> <p dir="auto">Allow resolution of promises inside templates.</p> <h3 dir="auto">What does the proposed API look like?</h3> <p dir="auto"><code class="notranslate">{{ await someFunction(value) }}</code></p>
<h3 dir="auto">Version</h3> <p dir="auto">2.3.4</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://github.com/geekdada/vue-hackernews-2.0">https://github.com/geekdada/vue-hackernews-2.0</a></p> <h3 dir="auto">Steps to reproduce</h3> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ yarn $ MICRO_CACHE=false node --expose-gc --inspect server $ ab -n 50 -c 20 http://127.0.0.1:8080/"><pre class="notranslate">$ yarn $ MICRO_CACHE=false node --expose-gc --inspect server $ ab -n 50 -c 20 http://127.0.0.1:8080/</pre></div> <p dir="auto">Stimulate a garbage collection before dump memory heap.</p> <h3 dir="auto">What is expected?</h3> <p dir="auto">All <code class="notranslate">Vue$3</code> instances not being in use are garbage collected.</p> <h3 dir="auto">What is actually happening?</h3> <p dir="auto">As opposite.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/6577a292b1bbe7ffdf032ea91b847dc4e2ae45630ad81f305c9a7b8ac7ae11f6/687474703a2f2f642e70722f692f5456727052422b"><img src="https://camo.githubusercontent.com/6577a292b1bbe7ffdf032ea91b847dc4e2ae45630ad81f305c9a7b8ac7ae11f6/687474703a2f2f642e70722f692f5456727052422b" alt="" data-canonical-src="http://d.pr/i/TVrpRB+" style="max-width: 100%;"></a></p> <hr> <p dir="auto">My heap dump file can be found here: <a href="http://d.pr/f/H0ypK" rel="nofollow">http://d.pr/f/H0ypK</a></p>
0
<p dir="auto">I hit an ICE - I've reduced a reproducible test case here: <a href="http://is.gd/M5LB6P" rel="nofollow">http://is.gd/M5LB6P</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pub struct Foo&lt;T, P&gt; where P: DerefMut&lt;Target=Bar&lt;T&gt;&gt; { bar: P, } pub struct Bar&lt;T&gt; { nzp: NonZero&lt;*mut Option&lt;T&gt;&gt; } impl&lt;T, P&gt; Foo&lt;T, P&gt; where P: DerefMut&lt;Target=Bar&lt;T&gt;&gt; { fn fun(&amp;mut self) { let p: *mut Option&lt;T&gt; = *self.bar.nzp; match unsafe {*p} { None =&gt; (), Some(t) =&gt; (), } } }"><pre class="notranslate"><code class="notranslate">pub struct Foo&lt;T, P&gt; where P: DerefMut&lt;Target=Bar&lt;T&gt;&gt; { bar: P, } pub struct Bar&lt;T&gt; { nzp: NonZero&lt;*mut Option&lt;T&gt;&gt; } impl&lt;T, P&gt; Foo&lt;T, P&gt; where P: DerefMut&lt;Target=Bar&lt;T&gt;&gt; { fn fun(&amp;mut self) { let p: *mut Option&lt;T&gt; = *self.bar.nzp; match unsafe {*p} { None =&gt; (), Some(t) =&gt; (), } } } </code></pre></div> <p dir="auto">error is</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;anon&gt;:22:23: 22:25 error: internal compiler error: this path should not cause illegal move &lt;anon&gt;:22 match unsafe {*p} { ^~"><pre class="notranslate"><code class="notranslate">&lt;anon&gt;:22:23: 22:25 error: internal compiler error: this path should not cause illegal move &lt;anon&gt;:22 match unsafe {*p} { ^~ </code></pre></div> <p dir="auto">I'm not even sure what the workaround for this is. Any ideas?</p>
<p dir="auto">Input:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct T(u8); fn t() -&gt; *mut T { unsafe { 0u8 as *mut T } } fn main() { let a = unsafe { *t() }; }"><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-smi">T</span><span class="pl-kos">(</span><span class="pl-smi">u8</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">t</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; <span class="pl-c1">*</span><span class="pl-k">mut</span> <span class="pl-smi">T</span> <span class="pl-kos">{</span> <span class="pl-k">unsafe</span> <span class="pl-kos">{</span> <span class="pl-c1">0u8</span> <span class="pl-k">as</span> <span class="pl-c1">*</span><span class="pl-k">mut</span> <span class="pl-smi">T</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">fn</span> <span class="pl-en">main</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> a = <span class="pl-k">unsafe</span> <span class="pl-kos">{</span> <span class="pl-c1">*</span><span class="pl-en">t</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">Output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc ../test.rs ../test.rs:9:19: 9:23 error: internal compiler error: this path should not cause illegal move ../test.rs:9 let a = unsafe { *t() }; ^~~~ note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/John/Documents/dev/rust/src/libsyntax/diagnostic.rs:123 stack backtrace: 1: 0x10f825b75 - sys::backtrace::write::h757d4037fec4513elCt 2: 0x10f84800f - failure::on_fail::he99e1d2cd81a67a80Hz 3: 0x10f7b3c8a - rt::unwind::begin_unwind_inner::hede15ebc165353e0Qpz 4: 0x10d508707 - rt::unwind::begin_unwind::h5150449308391082809 5: 0x10d50869c - diagnostic::SpanHandler::span_bug::h1cc7aa850b4525b9nQF 6: 0x10c93bc1d - session::Session::span_bug::h9dff6f0c981e0b95mRq 7: 0x10c547999 - borrowck::build_borrowck_dataflow_data::hbfab9f3785e58ec8QRe 8: 0x10c5432fb - borrowck::borrowck_fn::h9d4d5a57ec1e26a2cPe 9: 0x10c5440f2 - borrowck::borrowck_item::hd3de64f0b51b624a9Ne 10: 0x10c54461f - borrowck::check_crate::hab49ad1d67fb67e9ZIe 11: 0x10c09e8aa - driver::phase_3_run_analysis_passes::h3bf5eb3f470c8788gwa 12: 0x10c082d90 - driver::compile_input::h63293298907e332cxba 13: 0x10c14e7ba - monitor::unboxed_closure.22558 14: 0x10c14cf15 - thunk::F.Invoke&lt;A, R&gt;::invoke::h15985566512806182469 15: 0x10c14bcf0 - rt::unwind::try::try_fn::h5957420952141477940 16: 0x10f8b1189 - rust_try_inner 17: 0x10f8b1176 - rust_try 18: 0x10c14c3ec - thunk::F.Invoke&lt;A, R&gt;::invoke::h12578415658120090831 19: 0x10f835814 - sys::thread::thread_start::he6c5dcba45c95bf2drw 20: 0x7fff933e22fc - _pthread_body 21: 0x7fff933e2279 - _pthread_body"><pre class="notranslate"><code class="notranslate">$ rustc ../test.rs ../test.rs:9:19: 9:23 error: internal compiler error: this path should not cause illegal move ../test.rs:9 let a = unsafe { *t() }; ^~~~ note: the compiler unexpectedly panicked. this is a bug. note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html note: run with `RUST_BACKTRACE=1` for a backtrace thread 'rustc' panicked at 'Box&lt;Any&gt;', /Users/John/Documents/dev/rust/src/libsyntax/diagnostic.rs:123 stack backtrace: 1: 0x10f825b75 - sys::backtrace::write::h757d4037fec4513elCt 2: 0x10f84800f - failure::on_fail::he99e1d2cd81a67a80Hz 3: 0x10f7b3c8a - rt::unwind::begin_unwind_inner::hede15ebc165353e0Qpz 4: 0x10d508707 - rt::unwind::begin_unwind::h5150449308391082809 5: 0x10d50869c - diagnostic::SpanHandler::span_bug::h1cc7aa850b4525b9nQF 6: 0x10c93bc1d - session::Session::span_bug::h9dff6f0c981e0b95mRq 7: 0x10c547999 - borrowck::build_borrowck_dataflow_data::hbfab9f3785e58ec8QRe 8: 0x10c5432fb - borrowck::borrowck_fn::h9d4d5a57ec1e26a2cPe 9: 0x10c5440f2 - borrowck::borrowck_item::hd3de64f0b51b624a9Ne 10: 0x10c54461f - borrowck::check_crate::hab49ad1d67fb67e9ZIe 11: 0x10c09e8aa - driver::phase_3_run_analysis_passes::h3bf5eb3f470c8788gwa 12: 0x10c082d90 - driver::compile_input::h63293298907e332cxba 13: 0x10c14e7ba - monitor::unboxed_closure.22558 14: 0x10c14cf15 - thunk::F.Invoke&lt;A, R&gt;::invoke::h15985566512806182469 15: 0x10c14bcf0 - rt::unwind::try::try_fn::h5957420952141477940 16: 0x10f8b1189 - rust_try_inner 17: 0x10f8b1176 - rust_try 18: 0x10c14c3ec - thunk::F.Invoke&lt;A, R&gt;::invoke::h12578415658120090831 19: 0x10f835814 - sys::thread::thread_start::he6c5dcba45c95bf2drw 20: 0x7fff933e22fc - _pthread_body 21: 0x7fff933e2279 - _pthread_body </code></pre></div>
1
<h2 dir="auto">Feature request</h2> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">The documentation says that</p> <blockquote> <p dir="auto">The <code class="notranslate">[contenthash]</code> substitution will add a unique hash based on the content of an asset. When the asset's content changes, <code class="notranslate">[contenthash]</code> will change as well.</p> </blockquote> <p dir="auto">However, the <code class="notranslate">[contenthash]</code> does <strong>not</strong> actually match the hash of the file, i.e. the result you would get if you ran <code class="notranslate">md5sum</code> or <code class="notranslate">sha256sum</code> on the file.</p> <p dir="auto">This <a href="https://stackoverflow.com/questions/50224845/why-is-the-contenthash-different-in-webpack" rel="nofollow">StackOverflow answer</a> explains why: the <code class="notranslate">[contenthash]</code> is computed before minification.</p> <p dir="auto">The feature request is to compute the <code class="notranslate">[contenthash]</code> <em>after</em> minification/any other post-processing steps, or at least provide an option to do so.</p> <p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong></p> <p dir="auto">This would have nice properties, such as allowing proxies to validate the integrity of a file just by comparing its hash to the filename.</p> <p dir="auto"><strong>How should this be implemented in your opinion?</strong></p> <p dir="auto">Change the point in the process where the <code class="notranslate">[contenthash]</code> is computed. I don't know anything about webpack's architecture so I have no idea how hard this is.</p> <p dir="auto"><strong>Are you willing to work on this yourself?</strong></p> <p dir="auto">I'm not a webpack developer but if there was some guidance from an expert I could take a stab at it.</p>
<h2 dir="auto">Feature request</h2> <p dir="auto">Please natively support output chunk hashing that is based on chunks <em>output</em> rather than their <em>input</em> (i.e., <code class="notranslate">output.filename = "[name]-[chunkhash].js"</code>).</p> <p dir="auto"><em>Why?</em> you may ask? Because hashing is mainly used for production asset caching. Right now, there are at least three ways the content of a chunk can change, and only one of those causes the <code class="notranslate">[chunkhash]</code> value to change.</p> <p dir="auto">When you deploy a new version of your code, you want browsers not to use old, stale assets. In theory, hashes should be based on the content of the files, such that when the files changes, the hash changes, and you can leverage the asset manifest to write out a new <code class="notranslate">&lt;script&gt;</code> or <code class="notranslate">&lt;link&gt;</code> tag with the new hash. And obviously, the advantage of <code class="notranslate">[chunkhash]</code> vs <code class="notranslate">[hash]</code> is that if you make a change that only changes a single chunk, you do not "invalidate" the cache of unchanged chunks, thus improving the performance for end users who have already downloaded unchanged chunks.</p> <p dir="auto">Going back to those three ways a chunk's content can change:</p> <ol dir="auto"> <li>You make a change to your entrypoint or its dependencies.</li> <li>You make a change to the webpack config (e.g. adding/removing/changing a plugin/loader).</li> <li>You upgrade a loader/plugin version.</li> </ol> <p dir="auto">Right now, only <strong>1</strong> is supported, which leaves a pretty glaring hole. You may, say, add source maps (<strong>2</strong>) only to discover that your CDN is still serving a stale version of your code without source maps because the <code class="notranslate">[chunkhash]</code> was not updated.</p> <p dir="auto">It seems like tools like <a href="https://github.com/erm0l0v/webpack-md5-hash">https://github.com/erm0l0v/webpack-md5-hash</a> <em>may</em> address this, but this seems like a pretty huge flaw in the expected behavior out-of-the-box.</p> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">The expected behavior is that when the content of a chunk changes, the hash for that chunk should change too.</p> <p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong></p> <p dir="auto">As explained above, the motivation is the principle of least surprise. Right now, it's surprising that changing configuration, which may have profound effects on the output, silently slips by as an output asset with the same name as a stale version of the asset.</p> <p dir="auto"><strong>How should this be implemented in your opinion?</strong></p> <p dir="auto">I think there are a few options:</p> <ol dir="auto"> <li>Reimplement <code class="notranslate">[chunkhash]</code>, though I seem to remember reading issues about challenges with sourcemaps.</li> <li>Implement a new token value (e.g. <code class="notranslate">output.filename = "[name]-[chunkhash]-[webpackhash].js"</code>) such that changing anything about your webpack config or its dependencies allows you to bust the cache.</li> </ol> <p dir="auto"><strong>Other Considerations</strong></p> <p dir="auto">To hack around this in the mean time, I've employed a custom hashing function that uses the final JSONified value of the webpack config as hash salt:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// webpack.config.js const config = {}; class Hasher { constructor() { const hash = require(&quot;crypto&quot;).createHash(&quot;sha256&quot;); hash.update(JSON.stringify(config)); return hash; } } Object.assign(config, { output: { filename: isProd ? &quot;[name]-[chunkhash].js&quot; : &quot;[name].js&quot;, hashFunction: Hasher }, ... }) module.exports = config;"><pre class="notranslate"><span class="pl-c">// webpack.config.js</span> <span class="pl-k">const</span> <span class="pl-s1">config</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">class</span> <span class="pl-v">Hasher</span> <span class="pl-kos">{</span> <span class="pl-en">constructor</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">hash</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"crypto"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">createHash</span><span class="pl-kos">(</span><span class="pl-s">"sha256"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-s1">hash</span><span class="pl-kos">.</span><span class="pl-en">update</span><span class="pl-kos">(</span><span class="pl-c1">JSON</span><span class="pl-kos">.</span><span class="pl-en">stringify</span><span class="pl-kos">(</span><span class="pl-s1">config</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">hash</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">assign</span><span class="pl-kos">(</span><span class="pl-s1">config</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">filename</span>: <span class="pl-s1">isProd</span> ? <span class="pl-s">"[name]-[chunkhash].js"</span> : <span class="pl-s">"[name].js"</span><span class="pl-kos">,</span> <span class="pl-c1">hashFunction</span>: <span class="pl-v">Hasher</span> <span class="pl-kos">}</span><span class="pl-kos">,</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-s1">config</span><span class="pl-kos">;</span></pre></div> <p dir="auto">This creates a custom hashing function that injects a JSONified version of the webpack config such that changes to webpack's configuration cause the hash to change. In theory, we could use <code class="notranslate">output.hashSalt</code>, but that cannot be lazily evaluated once the entire webpack config has been constructed. Furthermore, output.hashSalt does not get used for MiniCssExtractPlugin's [contenthash], but (confusingly) output.hashFunction does. Finally, this only accounts for changes in the webpack config itself—it does not account for underlying changes in plugins/loaders due to, e.g., version upgrades.</p> <p dir="auto"><strong>Are you willing to work on this yourself?</strong><br> Yes! But I think I need help.</p>
1
<h2 dir="auto">Environment info</h2> <ul dir="auto"> <li>Python 3.7.7 (default, Mar 26 2020, 15:48:22)</li> <li>[GCC 7.3.0] :: Anaconda, Inc. on linux</li> <li>Operating System: Ubuntu 16.04.6 LTS / running on Docker</li> <li>CPU/GPU model: CPU Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz</li> <li>C++ compiler version:</li> <li>CMake version:</li> </ul> <h4 dir="auto">Steps/Code to Reproduce</h4> <p dir="auto">Suppose you create a class like the following to store variables passed in arguments as temporary local attributes for later use.</p> <p dir="auto">At version <code class="notranslate">scikit-learn==0.22.2.post1</code>, this original estimator <code class="notranslate">MyClass</code> print works fine.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; from sklearn.base import BaseEstimator &gt;&gt;&gt; &gt;&gt;&gt; class MyClass(BaseEstimator): ... def __init__(self, objective='logloss', **kwrgs): ... self.objective = objective ... self._other_params = kwrgs ... ... def get_params(self, deep=True): ... params = super().get_params(deep) ... params.update(self._other_params) ... return params ... &gt;&gt;&gt; clf = MyClass(metric='auc') &gt;&gt;&gt; &gt;&gt;&gt; print(clf) MyClass(metric='auc', objective='logloss')"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">base</span> <span class="pl-k">import</span> <span class="pl-v">BaseEstimator</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">class</span> <span class="pl-v">MyClass</span>(<span class="pl-v">BaseEstimator</span>): ... <span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">objective</span><span class="pl-c1">=</span><span class="pl-s">'logloss'</span>, <span class="pl-c1">**</span><span class="pl-s1">kwrgs</span>): ... <span class="pl-s1">self</span>.<span class="pl-s1">objective</span> <span class="pl-c1">=</span> <span class="pl-s1">objective</span> ... <span class="pl-s1">self</span>.<span class="pl-s1">_other_params</span> <span class="pl-c1">=</span> <span class="pl-s1">kwrgs</span> ... ... <span class="pl-k">def</span> <span class="pl-en">get_params</span>(<span class="pl-s1">self</span>, <span class="pl-s1">deep</span><span class="pl-c1">=</span><span class="pl-c1">True</span>): ... <span class="pl-s1">params</span> <span class="pl-c1">=</span> <span class="pl-en">super</span>().<span class="pl-en">get_params</span>(<span class="pl-s1">deep</span>) ... <span class="pl-s1">params</span>.<span class="pl-en">update</span>(<span class="pl-s1">self</span>.<span class="pl-s1">_other_params</span>) ... <span class="pl-k">return</span> <span class="pl-s1">params</span> ... <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">clf</span> <span class="pl-c1">=</span> <span class="pl-v">MyClass</span>(<span class="pl-s1">metric</span><span class="pl-c1">=</span><span class="pl-s">'auc'</span>) <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">print</span>(<span class="pl-s1">clf</span>) <span class="pl-v">MyClass</span>(<span class="pl-s1">metric</span><span class="pl-c1">=</span><span class="pl-s">'auc'</span>, <span class="pl-s1">objective</span><span class="pl-c1">=</span><span class="pl-s">'logloss'</span>)</pre></div> <p dir="auto">But In scikit-learn==0.23.0, I got the following <code class="notranslate">KeyError</code> that the instance has not metric key.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="KeyErrorTraceback (most recent call last) &lt;ipython-input-31-2e0afdc6afe0&gt; in &lt;module&gt; 14 clf = MyClass(metric='auc') 15 ---&gt; 16 print(clf) /opt/conda/lib/python3.7/site-packages/sklearn/base.py in __repr__(self, N_CHAR_MAX) 277 n_max_elements_to_show=N_MAX_ELEMENTS_TO_SHOW) 278 --&gt; 279 repr_ = pp.pformat(self) 280 281 # Use bruteforce ellipsis when there are a lot of non-blank characters /opt/conda/lib/python3.7/pprint.py in pformat(self, object) 142 def pformat(self, object): 143 sio = _StringIO() --&gt; 144 self._format(object, sio, 0, 0, {}, 0) 145 return sio.getvalue() 146 /opt/conda/lib/python3.7/pprint.py in _format(self, object, stream, indent, allowance, context, level) 159 self._readable = False 160 return --&gt; 161 rep = self._repr(object, context, level) 162 max_width = self._width - indent - allowance 163 if len(rep) &gt; max_width: /opt/conda/lib/python3.7/pprint.py in _repr(self, object, context, level) 391 def _repr(self, object, context, level): 392 repr, readable, recursive = self.format(object, context.copy(), --&gt; 393 self._depth, level) 394 if not readable: 395 self._readable = False /opt/conda/lib/python3.7/site-packages/sklearn/utils/_pprint.py in format(self, object, context, maxlevels, level) 168 def format(self, object, context, maxlevels, level): 169 return _safe_repr(object, context, maxlevels, level, --&gt; 170 changed_only=self._changed_only) 171 172 def _pprint_estimator(self, object, stream, indent, allowance, context, /opt/conda/lib/python3.7/site-packages/sklearn/utils/_pprint.py in _safe_repr(object, context, maxlevels, level, changed_only) 412 recursive = False 413 if changed_only: --&gt; 414 params = _changed_params(object) 415 else: 416 params = object.get_params(deep=False) /opt/conda/lib/python3.7/site-packages/sklearn/utils/_pprint.py in _changed_params(estimator) 96 init_params = {name: param.default for name, param in init_params.items()} 97 for k, v in params.items(): ---&gt; 98 if (repr(v) != repr(init_params[k]) and 99 not (is_scalar_nan(init_params[k]) and is_scalar_nan(v))): 100 filtered_params[k] = v KeyError: 'metric'"><pre class="notranslate"><code class="notranslate">KeyErrorTraceback (most recent call last) &lt;ipython-input-31-2e0afdc6afe0&gt; in &lt;module&gt; 14 clf = MyClass(metric='auc') 15 ---&gt; 16 print(clf) /opt/conda/lib/python3.7/site-packages/sklearn/base.py in __repr__(self, N_CHAR_MAX) 277 n_max_elements_to_show=N_MAX_ELEMENTS_TO_SHOW) 278 --&gt; 279 repr_ = pp.pformat(self) 280 281 # Use bruteforce ellipsis when there are a lot of non-blank characters /opt/conda/lib/python3.7/pprint.py in pformat(self, object) 142 def pformat(self, object): 143 sio = _StringIO() --&gt; 144 self._format(object, sio, 0, 0, {}, 0) 145 return sio.getvalue() 146 /opt/conda/lib/python3.7/pprint.py in _format(self, object, stream, indent, allowance, context, level) 159 self._readable = False 160 return --&gt; 161 rep = self._repr(object, context, level) 162 max_width = self._width - indent - allowance 163 if len(rep) &gt; max_width: /opt/conda/lib/python3.7/pprint.py in _repr(self, object, context, level) 391 def _repr(self, object, context, level): 392 repr, readable, recursive = self.format(object, context.copy(), --&gt; 393 self._depth, level) 394 if not readable: 395 self._readable = False /opt/conda/lib/python3.7/site-packages/sklearn/utils/_pprint.py in format(self, object, context, maxlevels, level) 168 def format(self, object, context, maxlevels, level): 169 return _safe_repr(object, context, maxlevels, level, --&gt; 170 changed_only=self._changed_only) 171 172 def _pprint_estimator(self, object, stream, indent, allowance, context, /opt/conda/lib/python3.7/site-packages/sklearn/utils/_pprint.py in _safe_repr(object, context, maxlevels, level, changed_only) 412 recursive = False 413 if changed_only: --&gt; 414 params = _changed_params(object) 415 else: 416 params = object.get_params(deep=False) /opt/conda/lib/python3.7/site-packages/sklearn/utils/_pprint.py in _changed_params(estimator) 96 init_params = {name: param.default for name, param in init_params.items()} 97 for k, v in params.items(): ---&gt; 98 if (repr(v) != repr(init_params[k]) and 99 not (is_scalar_nan(init_params[k]) and is_scalar_nan(v))): 100 filtered_params[k] = v KeyError: 'metric' </code></pre></div> <p dir="auto">Such a mechanism is also used in other famous libraries such as lightGBM. Concretely, it is used to apply aliases to variable names at fit method. (ex. convert metric -&gt; metrics)</p> <p dir="auto">You can refer the detail description in lightgbm case I reported at the url.<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="620648513" data-permission-text="Title is private" data-url="https://github.com/microsoft/LightGBM/issues/3100" data-hovercard-type="issue" data-hovercard-url="/microsoft/LightGBM/issues/3100/hovercard" href="https://github.com/microsoft/LightGBM/issues/3100">microsoft/LightGBM#3100</a></p> <p dir="auto">Since the error cause only when you print or eval as string and there are no bad effect at fit (predict) method, I think it might be a good idea that the print behavior revert to the older version's.</p>
<p dir="auto">I'm opening the issue just to have a reference</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from sklearn import set_config from lightgbm import LGBMClassifier set_config(print_changed_only=True) print(LGBMClassifier(metric='auc'))"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">sklearn</span> <span class="pl-k">import</span> <span class="pl-s1">set_config</span> <span class="pl-k">from</span> <span class="pl-s1">lightgbm</span> <span class="pl-k">import</span> <span class="pl-v">LGBMClassifier</span> <span class="pl-en">set_config</span>(<span class="pl-s1">print_changed_only</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-en">print</span>(<span class="pl-v">LGBMClassifier</span>(<span class="pl-s1">metric</span><span class="pl-c1">=</span><span class="pl-s">'auc'</span>))</pre></div> <p dir="auto">will fail because <code class="notranslate">metric</code> is not part of the signature of init, it's part of a kwargs parameter.</p> <p dir="auto">Arguably, that's LightGBM not being super complient, but there's nothing in our docs explicitly preventing this.</p> <p dir="auto">Fixed by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="617388983" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/17205" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/17205/hovercard" href="https://github.com/scikit-learn/scikit-learn/pull/17205">#17205</a></p>
1
<p dir="auto">[root@pcbsd-7889] /home/jc/atom# script/build<br> Node: v0.10.32<br> npm: v1.4.28<br> Installing build modules...<br> Installing apm...</p> <p dir="auto">events.js:72<br> throw er; // Unhandled 'error' event<br> ^<br> Error: incorrect header check<br> at Zlib._binding.onerror (zlib.js:295:17)</p> <p dir="auto">npm ERR! atom-package-manager@0.133.0 install: <code class="notranslate">node ./script/download-node.js</code><br> npm ERR! Exit status 8<br> npm ERR!<br> npm ERR! Failed at the atom-package-manager@0.133.0 install script.<br> npm ERR! This is most likely a problem with the atom-package-manager package,<br> npm ERR! not with npm itself.<br> npm ERR! Tell the author that this fails on your system:<br> npm ERR! node ./script/download-node.js<br> npm ERR! You can get their info via:<br> npm ERR! npm owner ls atom-package-manager<br> npm ERR! There is likely additional logging output above.<br> npm ERR! System FreeBSD 10.1-RELEASE-p8<br> npm ERR! command "node" "/usr/home/jc/atom/build/node_modules/.bin/npm" "--userconfig=/usr/home/jc/atom/.npmrc" "install" "--loglevel" "error"<br> npm ERR! cwd /usr/home/jc/atom/apm<br> npm ERR! node -v v0.10.32<br> npm ERR! npm -v 1.4.28<br> npm ERR! code ELIFECYCLE<br> npm ERR! not ok code 0</p> <p dir="auto">Any Idea on how to solve this?</p>
<p dir="auto">I followed the build instructions given for the FreeBSD (10.0 x86_64) here- <a href="https://github.com/atom/atom/blob/master/docs/build-instructions/freebsd.md">https://github.com/atom/atom/blob/master/docs/build-instructions/freebsd.md</a></p> <p dir="auto">I compiled node and npm from sources (FreeBSD ports) but still no luck. Here is the full error log:<br> <a href="http://pastebin.com/WQx8UXWs" rel="nofollow">http://pastebin.com/WQx8UXWs</a></p>
1
<p dir="auto"><strong>Description</strong></p> <p dir="auto">Add the option for the celery worker to create a new virtual env, install some packages, and run airflow run command inside it (based on <code class="notranslate">executor_config</code> params).<br> Really nice to have - have reusable virtual env that can be shared between tasks with the same param (based on user configuration).</p> <p dir="auto"><strong>Use case / motivation</strong></p> <p dir="auto">Once getting to a point when you want to create cluster for different types of python tasks and you've multiple teams working on the same cluster, you need to start splitting into different python packages the business login code to allow better versioning control and avoid the need of restarting the workers when deploying new util code.<br> I think it would be amazing if we can allow creating new virtual envs as part of Airflow and control the package versions.</p> <p dir="auto">I know that <code class="notranslate">PythonVirtualenvOperator</code> exists, but:</p> <ol dir="auto"> <li>Creating env related thing feels like an executor job to me, the coder should not use specific operators for it.</li> <li>The big downside to it is that if I want to use <code class="notranslate">ShortCircuitOperator</code> or <code class="notranslate">BranchPythonOperator</code> or any kind of new python based operator, I've to create a new operator that will inherit from <code class="notranslate">PythonVirtualenvOperator</code> and duplicate the desired functionality.</li> </ol> <p dir="auto"><strong>Are you willing to submit a PR?</strong></p> <p dir="auto">Yes, would love to.</p> <p dir="auto"><strong>Related Issues</strong></p> <p dir="auto">Not that I can find.</p>
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.3.0 (latest released)</p> <h3 dir="auto">What happened</h3> <p dir="auto">After upgrading Airflow from 2.2.4 to 2.3.0, the Airflow webserver encounters the following errors:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2022-05-10 05:04:43,530] {manager.py:543} INFO - Removed Permission View: can_create on Users [2022-05-10 05:04:43,639] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin [2022-05-10 05:04:43,645] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin [2022-05-10 05:04:43,650] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions [2022-05-10 05:04:43,656] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions [2022-05-10 05:04:43,718] {manager.py:508} INFO - Created Permission View: menu access on Permissions [2022-05-10 05:04:43,727] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin [2022-05-10 05:04:43,728] {manager.py:570} ERROR - Add Permission to Role Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint &quot;ab_permission_view_role_permission_view_id_role_id_key&quot; DETAIL: Key (permission_view_id, role_id)=(410, 1) already exists. [SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id] [parameters: {'permission_view_id': 410, 'role_id': 1}] (Background on this error at: http://sqlalche.me/e/14/gkpj) [2022-05-10 05:04:45,666] {manager.py:508} INFO - Created Permission View: can create on Users [2022-05-10 05:04:45,666] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint &quot;ab_permission_view_permission_id_view_menu_id_key&quot; DETAIL: Key (permission_id, view_menu_id)=(5, 51) already exists. [SQL: INSERT INTO ab_permission_view (id, permission_id, view_menu_id) VALUES (nextval('ab_permission_view_id_seq'), %(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id] [parameters: {'permission_id': 5, 'view_menu_id': 51}] (Background on this error at: http://sqlalche.me/e/14/gkpj) [2022-05-10 05:04:45 -0400] [650935] [ERROR] Exception in worker process Traceback (most recent call last): File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1705, in _execute_context self.dialect.do_execute( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/default.py&quot;, line 716, in do_execute cursor.execute(statement, parameters) psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint &quot;ab_permission_view_role_permission_view_id_role_id_key&quot; DETAIL: Key (permission_view_id, role_id)=(412, 1) already exists. The above exception was the direct cause of the following exception: Traceback (most recent call last): File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 589, in spawn_worker worker.init_process() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/workers/base.py&quot;, line 134, in init_process self.load_wsgi() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/workers/base.py&quot;, line 146, in load_wsgi self.wsgi = self.app.wsgi() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/base.py&quot;, line 67, in wsgi self.callable = self.load() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py&quot;, line 58, in load return self.load_wsgiapp() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py&quot;, line 48, in load_wsgiapp return util.import_app(self.app_uri) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/util.py&quot;, line 412, in import_app app = app(*args, **kwargs) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py&quot;, line 158, in cached_app app = create_app(config=config, testing=testing) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py&quot;, line 146, in create_app sync_appbuilder_roles(flask_app) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py&quot;, line 68, in sync_appbuilder_roles flask_app.appbuilder.sm.sync_roles() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/security.py&quot;, line 580, in sync_roles self.update_admin_permission() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/security.py&quot;, line 562, in update_admin_permission self.get_session.commit() File &quot;&lt;string&gt;&quot;, line 2, in commit File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 1423, in commit self._transaction.commit(_to_root=self.future) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 829, in commit self._prepare_impl() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 808, in _prepare_impl self.session.flush() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 3255, in flush self._flush(objects) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 3395, in _flush transaction.rollback(_capture_exception=True) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 70, in __exit__ compat.raise_( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/compat.py&quot;, line 211, in raise_ raise exception File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 3355, in _flush flush_context.execute() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py&quot;, line 453, in execute rec.execute(self) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py&quot;, line 576, in execute self.dependency_processor.process_saves(uow, states) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/dependency.py&quot;, line 1182, in process_saves self._run_crud( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/dependency.py&quot;, line 1245, in _run_crud connection.execute(statement, secondary_insert) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1200, in execute return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/sql/elements.py&quot;, line 313, in _execute_on_connection return connection._execute_clauseelement( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1389, in _execute_clauseelement ret = self._execute_context( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1748, in _execute_context self._handle_dbapi_exception( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1929, in _handle_dbapi_exception util.raise_( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/compat.py&quot;, line 211, in raise_ raise exception File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1705, in _execute_context self.dialect.do_execute( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/default.py&quot;, line 716, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint &quot;ab_permission_view_role_permission_view_id_role_id_key&quot; DETAIL: Key (permission_view_id, role_id)=(412, 1) already exists. [SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id] [parameters: {'permission_view_id': 412, 'role_id': 1}] (Background on this error at: http://sqlalche.me/e/14/gkpj) [2022-05-10 05:04:45 -0400] [650935] [INFO] Worker exiting (pid: 650935) [2022-05-10 05:04:45 -0400] [650934] [ERROR] Exception in worker process Traceback (most recent call last): File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1705, in _execute_context self.dialect.do_execute( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/default.py&quot;, line 716, in do_execute cursor.execute(statement, parameters) psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint &quot;ab_permission_view_role_permission_view_id_role_id_key&quot; DETAIL: Key (permission_view_id, role_id)=(412, 1) already exists. The above exception was the direct cause of the following exception: Traceback (most recent call last): File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 589, in spawn_worker worker.init_process() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/workers/base.py&quot;, line 134, in init_process self.load_wsgi() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/workers/base.py&quot;, line 146, in load_wsgi self.wsgi = self.app.wsgi() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/base.py&quot;, line 67, in wsgi self.callable = self.load() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py&quot;, line 58, in load return self.load_wsgiapp() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py&quot;, line 48, in load_wsgiapp return util.import_app(self.app_uri) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/util.py&quot;, line 412, in import_app app = app(*args, **kwargs) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py&quot;, line 158, in cached_app app = create_app(config=config, testing=testing) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py&quot;, line 146, in create_app sync_appbuilder_roles(flask_app) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py&quot;, line 68, in sync_appbuilder_roles flask_app.appbuilder.sm.sync_roles() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/security.py&quot;, line 580, in sync_roles self.update_admin_permission() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/security.py&quot;, line 562, in update_admin_permission self.get_session.commit() File &quot;&lt;string&gt;&quot;, line 2, in commit File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 1423, in commit self._transaction.commit(_to_root=self.future) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 829, in commit self._prepare_impl() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 808, in _prepare_impl self.session.flush() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 3255, in flush self._flush(objects) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 3395, in _flush transaction.rollback(_capture_exception=True) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py&quot;, line 70, in __exit__ compat.raise_( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/compat.py&quot;, line 211, in raise_ raise exception File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py&quot;, line 3355, in _flush flush_context.execute() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py&quot;, line 453, in execute rec.execute(self) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py&quot;, line 576, in execute self.dependency_processor.process_saves(uow, states) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/dependency.py&quot;, line 1182, in process_saves self._run_crud( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/dependency.py&quot;, line 1245, in _run_crud connection.execute(statement, secondary_insert) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1200, in execute return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/sql/elements.py&quot;, line 313, in _execute_on_connection return connection._execute_clauseelement( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1389, in _execute_clauseelement ret = self._execute_context( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1748, in _execute_context self._handle_dbapi_exception( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1929, in _handle_dbapi_exception util.raise_( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/compat.py&quot;, line 211, in raise_ raise exception File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py&quot;, line 1705, in _execute_context self.dialect.do_execute( File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/default.py&quot;, line 716, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint &quot;ab_permission_view_role_permission_view_id_role_id_key&quot; DETAIL: Key (permission_view_id, role_id)=(412, 1) already exists. [SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id] [parameters: {'permission_view_id': 412, 'role_id': 1}] (Background on this error at: http://sqlalche.me/e/14/gkpj) [2022-05-10 05:04:45 -0400] [650934] [INFO] Worker exiting (pid: 650934) [2022-05-10 05:04:46 -0400] [650932] [INFO] Worker exiting (pid: 650932) [2022-05-10 05:04:46 -0400] [650933] [INFO] Worker exiting (pid: 650933) Traceback (most recent call last): File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 209, in run self.sleep() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 357, in sleep ready = select.select([self.PIPE[0]], [], [], 1.0) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 242, in handle_chld self.reap_workers() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 525, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: &lt;HaltServer 'Worker failed to boot.' 3&gt; During handling of the above exception, another exception occurred: Traceback (most recent call last): File &quot;/usr/lib/python3.8/runpy.py&quot;, line 194, in _run_module_as_main return _run_code(code, main_globals, None, File &quot;/usr/lib/python3.8/runpy.py&quot;, line 87, in _run_code exec(code, run_globals) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/__main__.py&quot;, line 7, in &lt;module&gt; run() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py&quot;, line 67, in run WSGIApplication(&quot;%(prog)s [OPTIONS] [APP_MODULE]&quot;).run() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/base.py&quot;, line 231, in run super().run() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/base.py&quot;, line 72, in run Arbiter(self).run() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 229, in run self.halt(reason=inst.reason, exit_status=inst.exit_status) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 342, in halt self.stop() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 393, in stop time.sleep(0.1) File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 242, in handle_chld self.reap_workers() File &quot;/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py&quot;, line 525, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: &lt;HaltServer 'Worker failed to boot.' 3&gt;"><pre lang="home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/persistence.py:1461" class="notranslate"><code class="notranslate">[2022-05-10 05:04:43,530] {manager.py:543} INFO - Removed Permission View: can_create on Users [2022-05-10 05:04:43,639] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin [2022-05-10 05:04:43,645] {manager.py:585} INFO - Removed Permission menu access on Permissions to role Admin [2022-05-10 05:04:43,650] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions [2022-05-10 05:04:43,656] {manager.py:543} INFO - Removed Permission View: menu_access on Permissions [2022-05-10 05:04:43,718] {manager.py:508} INFO - Created Permission View: menu access on Permissions [2022-05-10 05:04:43,727] {manager.py:568} INFO - Added Permission menu access on Permissions to role Admin [2022-05-10 05:04:43,728] {manager.py:570} ERROR - Add Permission to Role Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_role_permission_view_id_role_id_key" DETAIL: Key (permission_view_id, role_id)=(410, 1) already exists. [SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id] [parameters: {'permission_view_id': 410, 'role_id': 1}] (Background on this error at: http://sqlalche.me/e/14/gkpj) [2022-05-10 05:04:45,666] {manager.py:508} INFO - Created Permission View: can create on Users [2022-05-10 05:04:45,666] {manager.py:511} ERROR - Creation of Permission View Error: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_permission_id_view_menu_id_key" DETAIL: Key (permission_id, view_menu_id)=(5, 51) already exists. [SQL: INSERT INTO ab_permission_view (id, permission_id, view_menu_id) VALUES (nextval('ab_permission_view_id_seq'), %(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id] [parameters: {'permission_id': 5, 'view_menu_id': 51}] (Background on this error at: http://sqlalche.me/e/14/gkpj) [2022-05-10 05:04:45 -0400] [650935] [ERROR] Exception in worker process Traceback (most recent call last): File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_context self.dialect.do_execute( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 716, in do_execute cursor.execute(statement, parameters) psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "ab_permission_view_role_permission_view_id_role_id_key" DETAIL: Key (permission_view_id, role_id)=(412, 1) already exists. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/util.py", line 412, in import_app app = app(*args, **kwargs) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py", line 158, in cached_app app = create_app(config=config, testing=testing) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py", line 146, in create_app sync_appbuilder_roles(flask_app) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py", line 68, in sync_appbuilder_roles flask_app.appbuilder.sm.sync_roles() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/security.py", line 580, in sync_roles self.update_admin_permission() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/security.py", line 562, in update_admin_permission self.get_session.commit() File "&lt;string&gt;", line 2, in commit File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1423, in commit self._transaction.commit(_to_root=self.future) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 829, in commit self._prepare_impl() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 808, in _prepare_impl self.session.flush() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 3255, in flush self._flush(objects) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 3395, in _flush transaction.rollback(_capture_exception=True) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ compat.raise_( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 211, in raise_ raise exception File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 3355, in _flush flush_context.execute() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 453, in execute rec.execute(self) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 576, in execute self.dependency_processor.process_saves(uow, states) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/dependency.py", line 1182, in process_saves self._run_crud( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/dependency.py", line 1245, in _run_crud connection.execute(statement, secondary_insert) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1200, in execute return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 313, in _execute_on_connection return connection._execute_clauseelement( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1389, in _execute_clauseelement ret = self._execute_context( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1748, in _execute_context self._handle_dbapi_exception( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1929, in _handle_dbapi_exception util.raise_( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 211, in raise_ raise exception File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_context self.dialect.do_execute( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 716, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_role_permission_view_id_role_id_key" DETAIL: Key (permission_view_id, role_id)=(412, 1) already exists. [SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id] [parameters: {'permission_view_id': 412, 'role_id': 1}] (Background on this error at: http://sqlalche.me/e/14/gkpj) [2022-05-10 05:04:45 -0400] [650935] [INFO] Worker exiting (pid: 650935) [2022-05-10 05:04:45 -0400] [650934] [ERROR] Exception in worker process Traceback (most recent call last): File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_context self.dialect.do_execute( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 716, in do_execute cursor.execute(statement, parameters) psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint "ab_permission_view_role_permission_view_id_role_id_key" DETAIL: Key (permission_view_id, role_id)=(412, 1) already exists. The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker worker.init_process() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/workers/base.py", line 134, in init_process self.load_wsgi() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi self.wsgi = self.app.wsgi() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/util.py", line 412, in import_app app = app(*args, **kwargs) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py", line 158, in cached_app app = create_app(config=config, testing=testing) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py", line 146, in create_app sync_appbuilder_roles(flask_app) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/app.py", line 68, in sync_appbuilder_roles flask_app.appbuilder.sm.sync_roles() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/security.py", line 580, in sync_roles self.update_admin_permission() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/airflow/www/security.py", line 562, in update_admin_permission self.get_session.commit() File "&lt;string&gt;", line 2, in commit File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 1423, in commit self._transaction.commit(_to_root=self.future) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 829, in commit self._prepare_impl() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 808, in _prepare_impl self.session.flush() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 3255, in flush self._flush(objects) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 3395, in _flush transaction.rollback(_capture_exception=True) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ compat.raise_( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 211, in raise_ raise exception File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/session.py", line 3355, in _flush flush_context.execute() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 453, in execute rec.execute(self) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/unitofwork.py", line 576, in execute self.dependency_processor.process_saves(uow, states) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/dependency.py", line 1182, in process_saves self._run_crud( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/orm/dependency.py", line 1245, in _run_crud connection.execute(statement, secondary_insert) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1200, in execute return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/sql/elements.py", line 313, in _execute_on_connection return connection._execute_clauseelement( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1389, in _execute_clauseelement ret = self._execute_context( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1748, in _execute_context self._handle_dbapi_exception( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1929, in _handle_dbapi_exception util.raise_( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 211, in raise_ raise exception File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/base.py", line 1705, in _execute_context self.dialect.do_execute( File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/sqlalchemy/engine/default.py", line 716, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) duplicate key value violates unique constraint "ab_permission_view_role_permission_view_id_role_id_key" DETAIL: Key (permission_view_id, role_id)=(412, 1) already exists. [SQL: INSERT INTO ab_permission_view_role (id, permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'), %(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id] [parameters: {'permission_view_id': 412, 'role_id': 1}] (Background on this error at: http://sqlalche.me/e/14/gkpj) [2022-05-10 05:04:45 -0400] [650934] [INFO] Worker exiting (pid: 650934) [2022-05-10 05:04:46 -0400] [650932] [INFO] Worker exiting (pid: 650932) [2022-05-10 05:04:46 -0400] [650933] [INFO] Worker exiting (pid: 650933) Traceback (most recent call last): File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 209, in run self.sleep() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 357, in sleep ready = select.select([self.PIPE[0]], [], [], 1.0) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld self.reap_workers() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: &lt;HaltServer 'Worker failed to boot.' 3&gt; During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/__main__.py", line 7, in &lt;module&gt; run() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 67, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/base.py", line 231, in run super().run() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/app/base.py", line 72, in run Arbiter(self).run() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 229, in run self.halt(reason=inst.reason, exit_status=inst.exit_status) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 342, in halt self.stop() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 393, in stop time.sleep(0.1) File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 242, in handle_chld self.reap_workers() File "/home/etlprod/venv/airflow-3141031@1652080547/lib/python3.8/site-packages/gunicorn/arbiter.py", line 525, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: &lt;HaltServer 'Worker failed to boot.' 3&gt; </code></pre></div> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto">Obviously, the Airflow webserver is trying to fix some permissions issues, every time it starts.<br> Unfortunately, when this process fails, it leaves the webserver hanging without any active gunicorn workers, thus preventing it from serving the UI</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">upgrade from 2.2.4 to 2.3.0</p> <h3 dir="auto">Operating System</h3> <p dir="auto">Ubuntu 20.04.3 LTS</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="apache-airflow-providers-amazon @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_amazon-3.3.0-py3-none-any.whl apache-airflow-providers-ftp @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_ftp-2.1.2-py3-none-any.whl apache-airflow-providers-http @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_http-2.1.2-py3-none-any.whl apache-airflow-providers-imap @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_imap-2.2.3-py3-none-any.whl apache-airflow-providers-mongo @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_mongo-2.3.3-py3-none-any.whl apache-airflow-providers-mysql @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_mysql-2.2.3-py3-none-any.whl apache-airflow-providers-pagerduty @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_pagerduty-2.1.3-py3-none-any.whl apache-airflow-providers-postgres @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_postgres-4.1.0-py3-none-any.whl apache-airflow-providers-sendgrid @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_sendgrid-2.0.4-py3-none-any.whl apache-airflow-providers-slack @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_slack-4.2.3-py3-none-any.whl apache-airflow-providers-sqlite @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_sqlite-2.1.3-py3-none-any.whl apache-airflow-providers-ssh @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_ssh-2.4.3-py3-none-any.whl apache-airflow-providers-vertica @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_vertica-2.1.3-py3-none-any.whl"><pre lang="apache-airflow" class="notranslate"><code class="notranslate">apache-airflow-providers-amazon @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_amazon-3.3.0-py3-none-any.whl apache-airflow-providers-ftp @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_ftp-2.1.2-py3-none-any.whl apache-airflow-providers-http @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_http-2.1.2-py3-none-any.whl apache-airflow-providers-imap @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_imap-2.2.3-py3-none-any.whl apache-airflow-providers-mongo @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_mongo-2.3.3-py3-none-any.whl apache-airflow-providers-mysql @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_mysql-2.2.3-py3-none-any.whl apache-airflow-providers-pagerduty @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_pagerduty-2.1.3-py3-none-any.whl apache-airflow-providers-postgres @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_postgres-4.1.0-py3-none-any.whl apache-airflow-providers-sendgrid @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_sendgrid-2.0.4-py3-none-any.whl apache-airflow-providers-slack @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_slack-4.2.3-py3-none-any.whl apache-airflow-providers-sqlite @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_sqlite-2.1.3-py3-none-any.whl apache-airflow-providers-ssh @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_ssh-2.4.3-py3-none-any.whl apache-airflow-providers-vertica @ file:///home/airflow/deploy/wheelfreeze/wheels/apache_airflow_providers_vertica-2.1.3-py3-none-any.whl </code></pre></div> <h3 dir="auto">Deployment</h3> <p dir="auto">Virtualenv installation</p> <h3 dir="auto">Deployment details</h3> <p dir="auto">python 3.8.10</p> <h3 dir="auto">Anything else</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Are you willing to submit PR?</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Yes I am willing to submit a PR!</li> </ul> <h3 dir="auto">Code of Conduct</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I agree to follow this project's <a href="https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a></li> </ul>
0
<p dir="auto">include: playbook.yml a=2 b=3 c=4</p> <p dir="auto">we can do it with tasks, why not?</p> <p dir="auto">see also: handlers</p> <p dir="auto">make sure with_items also works with these includes as it now works with task includes</p>
<p dir="auto">Unable to connect to ec2-host (errors with permission denied errors) in AWS.</p> <ol dir="auto"> <li>Have the following entry in inventory file</li> <li>Following command was executed<br> ansible -vvv test_ansible --user ansible --private-key=/home/ansible/.ssh/id_rsa -m ping --become-user=ansible</li> </ol> <p dir="auto">It is trying to connect as ec2-user@ec2_remotehost |FAILED&gt; SSH Error: Permission denied (publickey).<br> while connecting to ec2_remotehost:22</p> <p dir="auto">If this is already fixed, let me know the bug number and I can close this as duplicate.</p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="dat = pd.DataFrame( {'number': [2, 2, 3], 'string': ['a', 'a', 'b']}, index=pd.date_range('2018-01-01', periods=3, freq='1s') ) dat.rolling('2min').apply(lambda x: len(np.unique(x))) number string 2018-01-01 00:00:00 1.0 a 2018-01-01 00:00:01 1.0 a 2018-01-01 00:00:02 2.0 b"><pre class="notranslate"><code class="notranslate">dat = pd.DataFrame( {'number': [2, 2, 3], 'string': ['a', 'a', 'b']}, index=pd.date_range('2018-01-01', periods=3, freq='1s') ) dat.rolling('2min').apply(lambda x: len(np.unique(x))) number string 2018-01-01 00:00:00 1.0 a 2018-01-01 00:00:01 1.0 a 2018-01-01 00:00:02 2.0 b </code></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">What I am trying to do is counting how many unique values in a rolling window. This works well for the numeric column <em>dat.number</em> but the string column <em>dat.string</em> simply only returns what it was.</p> <p dir="auto">In the above example, I expect to see the two columns in the output are the same as the number of unique values are 1, 1, 2 starting from the first row. However the string column returns a, a, b.</p> <h4 dir="auto">Expected Output</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" number string 2018-01-01 00:00:00 1.0 1.0 2018-01-01 00:00:01 1.0 1.0 2018-01-01 00:00:02 2.0 2.0"><pre class="notranslate"><code class="notranslate"> number string 2018-01-01 00:00:00 1.0 1.0 2018-01-01 00:00:01 1.0 1.0 2018-01-01 00:00:02 2.0 2.0 </code></pre></div> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.5.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.13.0-38-generic<br> machine: x86_64<br> processor: x86_64<br> byteorder: little<br> LC_ALL: None<br> LANG: en_AU.UTF-8<br> LOCALE: en_AU.UTF-8</p> <p dir="auto">pandas: 0.22.0<br> pytest: None<br> pip: 9.0.3<br> setuptools: 39.0.1<br> Cython: None<br> numpy: 1.14.2<br> scipy: 1.0.1<br> pyarrow: None<br> xarray: None<br> IPython: 6.3.0<br> sphinx: 1.7.2<br> patsy: 0.5.0<br> dateutil: 2.7.2<br> pytz: 2018.3<br> blosc: None<br> bottleneck: None<br> tables: 3.4.2<br> numexpr: 2.6.4<br> feather: None<br> matplotlib: 2.2.2<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: 1.0.1<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.10<br> s3fs: None<br> fastparquet: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<p dir="auto">Hi the <code class="notranslate">Pandas</code> dream team.</p> <p dir="auto">I think it would be nice if <code class="notranslate">rolling</code> could accept <code class="notranslate">strings</code> as well (see <a href="https://stackoverflow.com/questions/52657429/rolling-with-string-variables" rel="nofollow">https://stackoverflow.com/questions/52657429/rolling-with-string-variables</a>)</p> <p dir="auto">With the abundance of textual data nowadays, we want <code class="notranslate">Pandas</code> to stay at the top of the curve!</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import pandas as pd import numpy as np df = pd.DataFrame({'mytime' : [pd.to_datetime('2018-01-01 14:34:12.340'), pd.to_datetime('2018-01-01 14:34:13.0'), pd.to_datetime('2018-01-01 14:34:15.342'), pd.to_datetime('2018-01-01 14:34:16.42'), pd.to_datetime('2018-01-01 14:34:28.742')], 'myvalue' : [1,2,np.NaN,3,1], 'mychart' : ['a','b','c','d','e']}) df.set_index('mytime', inplace = True) df Out[15]: mychart myvalue mytime 2018-01-01 14:34:12.340 a 1.0 2018-01-01 14:34:13.000 b 2.0 2018-01-01 14:34:15.342 c NaN 2018-01-01 14:34:16.420 d 3.0 2018-01-01 14:34:28.742 e 1.0"><pre class="notranslate"><code class="notranslate">import pandas as pd import numpy as np df = pd.DataFrame({'mytime' : [pd.to_datetime('2018-01-01 14:34:12.340'), pd.to_datetime('2018-01-01 14:34:13.0'), pd.to_datetime('2018-01-01 14:34:15.342'), pd.to_datetime('2018-01-01 14:34:16.42'), pd.to_datetime('2018-01-01 14:34:28.742')], 'myvalue' : [1,2,np.NaN,3,1], 'mychart' : ['a','b','c','d','e']}) df.set_index('mytime', inplace = True) df Out[15]: mychart myvalue mytime 2018-01-01 14:34:12.340 a 1.0 2018-01-01 14:34:13.000 b 2.0 2018-01-01 14:34:15.342 c NaN 2018-01-01 14:34:16.420 d 3.0 2018-01-01 14:34:28.742 e 1.0 </code></pre></div> <p dir="auto">Here I want to concatenate the strings in mychart using the values in the last 2 seconds (not the last two observations).</p> <p dir="auto">Unfortunately, both attempts below fail miserably</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" df.mychart.rolling(window = '2s', closed = 'right').apply(lambda x: ' '.join(x), raw = False) df.mychart.rolling(window = '2s', closed = 'right').apply(lambda x: (x + ' ').cumsum(), raw = False) TypeError: cannot handle this type -&gt; object"><pre class="notranslate"><code class="notranslate"> df.mychart.rolling(window = '2s', closed = 'right').apply(lambda x: ' '.join(x), raw = False) df.mychart.rolling(window = '2s', closed = 'right').apply(lambda x: (x + ' ').cumsum(), raw = False) TypeError: cannot handle this type -&gt; object </code></pre></div> <p dir="auto">What do you think?<br> Thanks!</p>
1
<p dir="auto"><strong>Steps to reproduce:</strong></p> <ol dir="auto"> <li>Start Terminal.</li> <li>Press <kbd>Win</kbd>+<kbd>Left</kbd> key to dock Terminal window to the left half of my monitor. The Terminal window starts at (0|0) left top position.</li> <li>Exit Terminal.</li> <li>Start Terminal.</li> </ol> <p dir="auto"><strong>Actual results:</strong></p> <p dir="auto">After step 4, the Terminal window starts at some probably random (X|Y) position.</p> <p dir="auto">Now I have to repeat above step 2:</p> <ol dir="auto"> <li>Press <kbd>Win</kbd>+<kbd>Left</kbd> key to dock the Terminal window to the left half of my monitor.</li> </ol> <p dir="auto">This is really annoying.</p> <p dir="auto"><strong>Expected results:</strong></p> <p dir="auto">The Terminal window should start pixel perfect at the very same position where I closed it the last time. No offset or anything. Just start with the same <strong>size</strong> and the same <strong>position</strong>. No matter whether I manually resized the window or whether being docked before.</p> <p dir="auto">Google Chrome does this very well, Microsoft Edge based on Chromium does this very well, too, same does e.g. Visual Studio Code. I hope Terminal can do better, too.</p> <p dir="auto"><strong>Additional information:</strong></p> <p dir="auto">I've described a <a href="https://superuser.com/q/659585/11720" rel="nofollow">similar issue some years back over at Super User</a>, together with some UI mockups.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">When the window is closed, remember its position/size for next time, either automatically or with some sort of explicit "remember" option.</p> <p dir="auto">Alternatively, as a minimal implementation, be able to manually specify initial position (similar to how you already can with column and row size). Already covered by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="449498408" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/1043" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/1043/hovercard" href="https://github.com/microsoft/terminal/issues/1043">#1043</a>.</p>
1
<p dir="auto">Firstly, thanks for such an awesome project!</p> <p dir="auto">When trying to add Javascript to customise onClick, Tooltips, etc. in the deck.gl visualisations, the text box in which you enter the code text behaves erratically. It is also unclear what is actually persisted onto the visualisation, it doesn't appear to be the code as entered.</p> <h4 dir="auto">How to reproduce the bug</h4> <p dir="auto">(I've given instructions for the deck.gl Scatterplot, but seems to apply to all deck.gl visualisations)</p> <ol dir="auto"> <li>Go to Charts, Add new chart</li> <li>Select a dataset with spatial attributes, choose deck.gl Scatterplot, click on Create New Chart</li> <li>Configure Chart to display some data (i.e. configure the Lat-Long values)</li> <li>Under Data configuration pane on left of screen, expand the "Advanced" collapse. Attempt to enter text in the "Javascript Tooltip Generator". It should enter duplicate values.</li> <li>In the browser console, there should be <code class="notranslate">Uncaught TypeError: (validationErrors || []).forEach is not a function</code></li> </ol> <h3 dir="auto">Expected results</h3> <p dir="auto">Text typed in the Javascipt fields in deck.gl visualisations to appear as typed. For the code entered to be executed in the context of the visualisation.</p> <h3 dir="auto">Actual results</h3> <p dir="auto">Text appearing in field does not match what was typed. Custom JS code doesn't appear to be executed in map.</p> <p dir="auto">Following error appearing in browser console per character typing:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="explore.fd9dbc001a8d2b732fc9.entry.js:624 Uncaught TypeError: (validationErrors || []).forEach is not a function at Object.SET_FIELD_VALUE (explore.fd9dbc001a8d2b732fc9.entry.js:624:32) at exploreReducer (explore.fd9dbc001a8d2b732fc9.entry.js:694:39) at combination (vendors.866d9853ec9ca701f3b8.entry.js:198222:29) at dispatch (vendors.866d9853ec9ca701f3b8.entry.js:197988:22) at 3236.54993c7b99382ace8b98.entry.js:242:12 at 1844.8922f8dcb86356245bf9.entry.js:1075:16 at vendors.866d9853ec9ca701f3b8.entry.js:198240:12 at Object.onChange (7173.0ceb268407a17642e1ec.entry.js:12551:61) at ReactAce.push.93946.ReactAce.onChange (437abb94798b28dd8787.chunk.js:25959:24) at Editor.EventEmitter._signal (600b0291f89941e46ffa.chunk.js:3870:21)"><pre class="notranslate"><code class="notranslate">explore.fd9dbc001a8d2b732fc9.entry.js:624 Uncaught TypeError: (validationErrors || []).forEach is not a function at Object.SET_FIELD_VALUE (explore.fd9dbc001a8d2b732fc9.entry.js:624:32) at exploreReducer (explore.fd9dbc001a8d2b732fc9.entry.js:694:39) at combination (vendors.866d9853ec9ca701f3b8.entry.js:198222:29) at dispatch (vendors.866d9853ec9ca701f3b8.entry.js:197988:22) at 3236.54993c7b99382ace8b98.entry.js:242:12 at 1844.8922f8dcb86356245bf9.entry.js:1075:16 at vendors.866d9853ec9ca701f3b8.entry.js:198240:12 at Object.onChange (7173.0ceb268407a17642e1ec.entry.js:12551:61) at ReactAce.push.93946.ReactAce.onChange (437abb94798b28dd8787.chunk.js:25959:24) at Editor.EventEmitter._signal (600b0291f89941e46ffa.chunk.js:3870:21) </code></pre></div> <h4 dir="auto">Screenshots</h4> <p dir="auto">This is what appeared after typing a single <code class="notranslate">d</code> character:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1272984/159888427-0441936c-0b60-4e2a-910b-cf177a508bb7.png"><img src="https://user-images.githubusercontent.com/1272984/159888427-0441936c-0b60-4e2a-910b-cf177a508bb7.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">This is after typing <code class="notranslate">d =&gt;</code>:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1272984/159888547-dc49cfcf-441e-45ea-8d81-9679dae7be89.png"><img src="https://user-images.githubusercontent.com/1272984/159888547-dc49cfcf-441e-45ea-8d81-9679dae7be89.png" alt="image" style="max-width: 100%;"></a></p> <h3 dir="auto">Environment</h3> <ul dir="auto"> <li>browser type and version: <ul dir="auto"> <li>Mozilla Firefox 98.0 (64-bit)</li> <li>Google Chrome Version 99.0.4844.51 (Official Build) (64-bit)</li> </ul> </li> </ul> <p dir="auto">(built off <code class="notranslate">apache/superset:1.4.0</code> Docker image tag)</p> <ul dir="auto"> <li>superset version: <code class="notranslate">1.4.0</code></li> <li>python version: <code class="notranslate">python 3.8.12</code></li> <li>node.js version: <em>sorry, not sure how to get the node version inside the running docker container</em>?</li> <li>any feature flags active: <ul dir="auto"> <li><code class="notranslate">ENABLE_TEMPLATE_PROCESSING</code></li> <li><code class="notranslate">ALERT_REPORTS</code></li> <li><code class="notranslate">THUMBNAILS</code></li> <li><code class="notranslate">LISTVIEWS_DEFAULT_CARD_VIEW</code></li> <li><code class="notranslate">DASHBOARD_NATIVE_FILTERS</code></li> <li><code class="notranslate">ENABLE_JAVASCRIPT_CONTROLS</code> (in <code class="notranslate">tooltips</code> config section)</li> </ul> </li> </ul> <h3 dir="auto">Checklist</h3> <p dir="auto">Make sure to follow these steps before submitting your issue - thank you!</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the superset logs for python stacktraces and included it here as text if there are any.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reproduced the issue with at least the latest released version of superset.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the issue tracker for the same issue and I haven't found one similar.</li> </ul> <h3 dir="auto">Additional context</h3> <p dir="auto">I'm aware this functionality is fairly old (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="286867552" data-permission-text="Title is private" data-url="https://github.com/apache/superset/issues/4173" data-hovercard-type="pull_request" data-hovercard-url="/apache/superset/pull/4173/hovercard" href="https://github.com/apache/superset/pull/4173">#4173</a>), so I wonder if maybe a subsequent change has broken the in-browser JS parsing?</p>
<p dir="auto">Current size of dashboard.entry.js is aroung 7+ MB which causes slight sluggishness in rendering.<br> Are there any optimizations that I can do to reduce its size and improve overall rendering speed?</p>
0
<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> <hr> <p dir="auto"><strong>Previous Behavior</strong><br> In version 1.0.0.beta31, you could put anything inside a <code class="notranslate">&lt;Fade&gt;</code> component and it would get faded.</p> <p dir="auto"><strong>Current Behavior</strong><br> As of version 1.0.0.beta32, it seems that <code class="notranslate">Fade</code> relies on the child component doing the right thing with the <code class="notranslate">style</code> prop.</p> <p dir="auto">Here's a CodeSandbox example:<br> <a href="https://codesandbox.io/s/7j8y2rqyn6" rel="nofollow">https://codesandbox.io/s/7j8y2rqyn6</a></p> <p dir="auto">I am not sure if this is intended behavior or not, but the change caught me off guard and I figured I should mention it.</p>
<ul dir="auto"> <li>[y] 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 have multiple <code class="notranslate">Paper</code> components, and each of them need to have a different background color.</p> <p dir="auto">Do i simply wrap each of the components around a <code class="notranslate">MuiThemeProvider</code> with custom theme? Is there any major disadvantage to this approach?</p> <p dir="auto">Or is <code class="notranslate">MuiThemeProvider</code> meant to be one per application (like Redux)? If so, what's the easiest way to meet my requirement?</p>
0
<p dir="auto">So Babel is compiling a <code class="notranslate">for of</code> loop into code that uses Symbol - which is an <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility" rel="nofollow">ES6 specific feature</a>. Example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for (let i of x) { console.log(i) }"><pre class="notranslate"><code class="notranslate">for (let i of x) { console.log(i) } </code></pre></div> <p dir="auto">Babel output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;use strict&quot;; var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = x[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var i = _step.value; console.log(i); } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion &amp;&amp; _iterator[&quot;return&quot;]) { _iterator[&quot;return&quot;](); } } finally { if (_didIteratorError) { throw _iteratorError; } } }"><pre class="notranslate"><code class="notranslate">"use strict"; var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = x[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var i = _step.value; console.log(i); } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion &amp;&amp; _iterator["return"]) { _iterator["return"](); } } finally { if (_didIteratorError) { throw _iteratorError; } } } </code></pre></div>
<p dir="auto">I have some code like:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="for (var n of geoHashes) { console.log(n); }"><pre class="notranslate"><code class="notranslate">for (var n of geoHashes) { console.log(n); } </code></pre></div> <p dir="auto">Only in firefox it throws an error: ReferenceError: Symbol is not defined</p>
1
<p dir="auto">The select component in <code class="notranslate">1.0-beta.27</code> does not change selection to when you type</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">Expected Behavior</h2> <p dir="auto">When you have a select field selected and begin to type, it should change selection to match what you typed.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Typing while a select is open does nothing.</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto"><a href="https://codesandbox.io/s/20xx3owq8n" rel="nofollow">https://codesandbox.io/s/20xx3owq8n</a></p> <h2 dir="auto">Context</h2> <p dir="auto">Need to be able to quickly select from a large list</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>1.0-beta.27</td> </tr> <tr> <td>React</td> <td>15,6</td> </tr> <tr> <td>browser</td> <td>Chrome (latest)</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 expect native and non-native Selects to left justify their text with the same text indent as an Input.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Currently on firefox on Windows and Linux the native select (the middle one in the screenshot below) has a text indent where the others don't:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7705060/32286596-e442d288-bf25-11e7-9f75-e425839e7d6c.png"><img src="https://user-images.githubusercontent.com/7705060/32286596-e442d288-bf25-11e7-9f75-e425839e7d6c.png" alt="screenshot-2017-11-1 sandbox - codesandbox 1" style="max-width: 100%;"></a></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <p dir="auto"><a href="https://codesandbox.io/s/zn4k1yq153" rel="nofollow">https://codesandbox.io/s/zn4k1yq153</a></p> <h2 dir="auto">Context</h2> <p dir="auto">I'm making lists of Inputs and native Selects, and it looks odd when they have different text indents</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>1.0.0 beta 19</td> </tr> <tr> <td>React</td> <td>15.5.3</td> </tr> <tr> <td>browser</td> <td>firefox</td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<p dir="auto">I just updated to the latest version of webpack. Running <code class="notranslate">webpack -h</code> cuts off halfway through the process. Previous versions had more options and output.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2992789/15552628/51f89d98-2289-11e6-9269-139e1a64b19a.png"><img width="1037" alt="image 2016-05-25 at 2 57 02 pm" src="https://cloud.githubusercontent.com/assets/2992789/15552628/51f89d98-2289-11e6-9269-139e1a64b19a.png" style="max-width: 100%;"></a></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1094697/15363804/8eb8e284-1d4c-11e6-9f10-08c60b6819a8.png"><img src="https://cloud.githubusercontent.com/assets/1094697/15363804/8eb8e284-1d4c-11e6-9f10-08c60b6819a8.png" alt="image" style="max-width: 100%;"></a></p> <p dir="auto">And I found the <a href="https://nodejs.org/api/process.html#process_process_exit_code" rel="nofollow">official node manual</a> not recommend to use:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="if (someConditionNotMet()) { printUsageToStdout(); process.exit(1); }"><pre class="notranslate"><code class="notranslate">if (someConditionNotMet()) { printUsageToStdout(); process.exit(1); } </code></pre></div> <p dir="auto">I think this is the reason why the help message was truncated.</p>
1
<p dir="auto">I was just messing around with some toy problems and discovered that you could create multiple methods with the same signature when using concrete types in parametric methods:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; foo(a::Int64, b::Int64) = a + b foo (generic function with 1 method) julia&gt; foo{T&lt;:Int64}(a::T, b::T) = a - b foo (generic function with 2 methods) julia&gt; foo{A&lt;:Int64,B&lt;:Int64}(a::A, b::B) = a * b foo (generic function with 3 methods) julia&gt; methods(foo) #3 methods for generic function &quot;foo&quot;: foo{T&lt;:Int64}(a::T, b::T) at none:1 foo{A&lt;:Int64,B&lt;:Int64}(a::A, b::B) at none:1 foo(a::Int64, b::Int64) at none:1"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-en">foo</span>(a<span class="pl-k">::</span><span class="pl-c1">Int64</span>, b<span class="pl-k">::</span><span class="pl-c1">Int64</span>) <span class="pl-k">=</span> a <span class="pl-k">+</span> b foo (generic <span class="pl-k">function</span> with <span class="pl-c1">1</span> method) julia<span class="pl-k">&gt;</span> <span class="pl-en">foo</span><span class="pl-c1">{T&lt;:Int64}</span>(a<span class="pl-k">::</span><span class="pl-c1">T</span>, b<span class="pl-k">::</span><span class="pl-c1">T</span>) <span class="pl-k">=</span> a <span class="pl-k">-</span> b foo (generic <span class="pl-k">function</span> with <span class="pl-c1">2</span> methods) julia<span class="pl-k">&gt;</span> <span class="pl-en">foo</span><span class="pl-c1">{A&lt;:Int64,B&lt;:Int64}</span>(a<span class="pl-k">::</span><span class="pl-c1">A</span>, b<span class="pl-k">::</span><span class="pl-c1">B</span>) <span class="pl-k">=</span> a <span class="pl-k">*</span> b foo (generic <span class="pl-k">function</span> with <span class="pl-c1">3</span> methods) julia<span class="pl-k">&gt;</span> <span class="pl-c1">methods</span>(foo) <span class="pl-c"><span class="pl-c">#</span>3 methods for generic function "foo":</span> <span class="pl-c1">foo</span><span class="pl-c1">{T&lt;:Int64}</span>(a<span class="pl-k">::</span><span class="pl-c1">T</span>, b<span class="pl-k">::</span><span class="pl-c1">T</span>) at none<span class="pl-k">:</span><span class="pl-c1">1</span> <span class="pl-c1">foo</span><span class="pl-c1">{A&lt;:Int64,B&lt;:Int64}</span>(a<span class="pl-k">::</span><span class="pl-c1">A</span>, b<span class="pl-k">::</span><span class="pl-c1">B</span>) at none<span class="pl-k">:</span><span class="pl-c1">1</span> <span class="pl-c1">foo</span>(a<span class="pl-k">::</span><span class="pl-c1">Int64</span>, b<span class="pl-k">::</span><span class="pl-c1">Int64</span>) at none<span class="pl-k">:</span><span class="pl-c1">1</span></pre></div> <p dir="auto">If a parametric type variable uses a concrete type shouldn't that type replace the type variable in the signature?</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jakebolewski/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jakebolewski">@jakebolewski</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/jiahao/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/jiahao">@jiahao</a> and I have been thinking through some type system improvements and things are starting to materialize. I believe this will consist of:</p> <ul dir="auto"> <li>Use <code class="notranslate">DataType</code> to implement tuple types, which will allow for more efficient tuples, and make tuple types less of a special case in various places. This might also open the door for user-defined covariant types in the future. (DONE)</li> <li>Add <code class="notranslate">UnionAll</code> types around all uses of TypeVars. Each <code class="notranslate">UnionAll</code> will bind one TypeVar, and we will nest them to allow for triangular dispatch. So far we've experimented with just sticking TypeVars wherever, and it has not really worked. We don't have a great syntax for this yet, but for now will probably use <code class="notranslate">@UnionAll T&lt;:Int Array{T}</code>. These are mostly equivalent to existential types.</li> <li>Unspecialized parametric types will actually be UnionAll types. For example <code class="notranslate">Complex</code> will be bound to <code class="notranslate">@UnionAll T&lt;:Real _Complex{T}</code> where <code class="notranslate">_Complex</code> is an internal type constructor.</li> <li>Technically, <code class="notranslate">(Int,String)</code> could be a subtype of <code class="notranslate">@UnionAll T (T,T)</code> if <code class="notranslate">T</code> were <code class="notranslate">Union(Int,String)</code>, or <code class="notranslate">Any</code>. However dispatch doesn't work this way because it's not very useful. We effectively have a rule that if a method parameter <code class="notranslate">T</code> only appears in covariant position, it ranges over only concrete types. We should apply this rule explicitly by marking TypeVars as appropriate. So far this is the best way I can think of to model this behavior, but suggestions are sought.</li> <li>TypeVars should only be compared by identity, and are not types themselves. We will not have syntax for introducing lone TypeVars; <code class="notranslate">@UnionAll</code> should suffice.</li> </ul> <p dir="auto">This is being prototyped in <code class="notranslate">examples/juliatypes.jl</code>. I hope this will fix most of the following issues:</p> <p dir="auto">method lookup and sorting issues:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48251774" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8959" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8959/hovercard" href="https://github.com/JuliaLang/julia/issues/8959">#8959</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="47931924" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8915" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8915/hovercard" href="https://github.com/JuliaLang/julia/issues/8915">#8915</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35488206" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/7221" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/7221/hovercard" href="https://github.com/JuliaLang/julia/issues/7221">#7221</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="41309903" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8163" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8163/hovercard" href="https://github.com/JuliaLang/julia/issues/8163">#8163</a></p> <p dir="auto">method ambiguity issues:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="45544896" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8652" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8652/hovercard" href="https://github.com/JuliaLang/julia/issues/8652">#8652</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="40533177" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8045" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8045/hovercard" href="https://github.com/JuliaLang/julia/issues/8045">#8045</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="30722042" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6383" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/6383/hovercard" href="https://github.com/JuliaLang/julia/issues/6383">#6383</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="29564512" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6190" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/6190/hovercard" href="https://github.com/JuliaLang/julia/issues/6190">#6190</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="29553275" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6187" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/6187/hovercard" href="https://github.com/JuliaLang/julia/issues/6187">#6187</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="28717551" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6048" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/6048/hovercard" href="https://github.com/JuliaLang/julia/issues/6048">#6048</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="25982771" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/5460" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/5460/hovercard" href="https://github.com/JuliaLang/julia/issues/5460">#5460</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="25496985" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/5384" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/5384/hovercard" href="https://github.com/JuliaLang/julia/issues/5384">#5384</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="13984573" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/3025" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/3025/hovercard" href="https://github.com/JuliaLang/julia/issues/3025">#3025</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="8801943" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/1631" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/1631/hovercard" href="https://github.com/JuliaLang/julia/issues/1631">#1631</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2410267" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/270" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/270/hovercard" href="https://github.com/JuliaLang/julia/issues/270">#270</a></p> <p dir="auto">misc. type system:<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="48007404" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8920" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8920/hovercard" href="https://github.com/JuliaLang/julia/issues/8920">#8920</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="45260829" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8625" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8625/hovercard" href="https://github.com/JuliaLang/julia/issues/8625">#8625</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="34342669" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6984" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/6984/hovercard" href="https://github.com/JuliaLang/julia/issues/6984">#6984</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="32709131" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6721" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/6721/hovercard" href="https://github.com/JuliaLang/julia/issues/6721">#6721</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="16852507" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/3738" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/3738/hovercard" href="https://github.com/JuliaLang/julia/issues/3738">#3738</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="11944347" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/2552" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/2552/hovercard" href="https://github.com/JuliaLang/julia/issues/2552">#2552</a> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="43838745" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8470" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8470/hovercard" href="https://github.com/JuliaLang/julia/issues/8470">#8470</a></p> <p dir="auto">In particular, type intersection needs to be trustworthy enough that we can remove the ambiguity warning and generate a runtime error instead.</p>
1
<p dir="auto">I don't know who's making the bug, so reporting here. I'll move to correct repo if someone helps me debug it.<br> <strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong><br> Bug<br> <strong>What is the current behavior?</strong><br> Please watch below screencast:<br> <a href="https://drive.google.com/file/d/1KMP44qsZ4y3MwrLLDdnOzPZ8z5mMElFP/view" rel="nofollow">https://drive.google.com/file/d/1KMP44qsZ4y3MwrLLDdnOzPZ8z5mMElFP/view</a></p> <ol dir="auto"> <li>Goto <a href="https://react-devtools-tutorial.now.sh/editing-props-and-state" rel="nofollow">https://react-devtools-tutorial.now.sh/editing-props-and-state</a></li> <li>Change the last ListItem prop to isComplete from <code class="notranslate">false</code> to <code class="notranslate">true</code>.</li> <li>Click the checkbox in the view to change the state again from <code class="notranslate">true</code> to <code class="notranslate">false</code>.<br> <strong>What is the expected behavior?</strong><br> It should just change the state of that ListItem. Instead, it's adding 3 more in the list with duplicate keys.</li> </ol> <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">Latest React.<br> Mac, Chrome Version 75.0.3770.142 (Official Build) (64-bit)</p>
<p dir="auto">Where does proptypes doc live? It's confusing it's still on React object but inaccessible from the website through search or table of contents. Let's either reinstantiate it or move it fully to the standalone repo. Also it's confusing we're deprecating createClass but it still lives in the docs ("React without ES6") whereas we're just "moving" PropTypes but they're gone from the docs.</p>
0
<p dir="auto">(This may well be a duplicate, but I didn't find a specific duplicate and I'm not clueful enough to figure out if it's included in any of the others.)</p> <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.18945.1001 Windows Terminal version (if applicable): 0.3.2142.0 Any other software? Reproduced using Debian Buster; also, font in use in both Terminal and console is Consolas."><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18945.1001 Windows Terminal version (if applicable): 0.3.2142.0 Any other software? Reproduced using Debian Buster; also, font in use in both Terminal and console is Consolas. </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Ensure that you are configured to use the UTF-8 locale and UTF-8 codeset; i.e., that the output of the <code class="notranslate">locale</code> command is as follows:</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_CTYPE=&quot;en_US.UTF-8&quot; LC_NUMERIC=&quot;en_US.UTF-8&quot; LC_TIME=&quot;en_US.UTF-8&quot; LC_COLLATE=&quot;en_US.UTF-8&quot; LC_MONETARY=&quot;en_US.UTF-8&quot; LC_MESSAGES=&quot;en_US.UTF-8&quot; LC_PAPER=&quot;en_US.UTF-8&quot; LC_NAME=&quot;en_US.UTF-8&quot; LC_ADDRESS=&quot;en_US.UTF-8&quot; LC_TELEPHONE=&quot;en_US.UTF-8&quot; LC_MEASUREMENT=&quot;en_US.UTF-8&quot; LC_IDENTIFICATION=&quot;en_US.UTF-8&quot; LC_ALL=en_US.UTF-8 "><pre class="notranslate"><code class="notranslate">LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=en_US.UTF-8 </code></pre></div> <ol start="2" dir="auto"> <li>Run <code class="notranslate">pstree</code>, or another command which detects and uses UTF-8 line-drawing characters.</li> </ol> <p dir="auto">Note that this is not the default configuration of Debian for the en_US.UTF-8 locale, which leaves LC_ALL set to C; <code class="notranslate">sudo update-locale LC_ALL=en_US.UTF-8</code> is required.</p> <h1 dir="auto">Expected behavior</h1> <h1 dir="auto">Actual behavior</h1> <p dir="auto">Expected behavior is line-drawing characters, as seen in console on the right. Actual behavior is all such characters rendering as "underline", as seen in Terminal on the left.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/371623/62431251-72235a00-b6eb-11e9-9d7f-77682dbd8fcb.jpg"><img src="https://user-images.githubusercontent.com/371623/62431251-72235a00-b6eb-11e9-9d7f-77682dbd8fcb.jpg" alt="bad-linedrawing" style="max-width: 100%;"></a></p>
<h1 dir="auto">Environment</h1> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Microsoft Windows [Version 10.0.18362.267] Windows Terminal version (if applicable): 0.3.2171.0 Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18362.267] Windows Terminal version (if applicable): 0.3.2171.0 Any other software? </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Edit config.</li> <li>For any keybinding, add an additional key definition to the "keys" list.</li> <li>Close and re-open Terminal</li> <li>See that the entire command has been removed from the "keybindings" section of the config</li> </ol> <p dir="auto">In my case, I was trying to add shift+insert as an additional paste keybinding. At first, I though the problem was an incorrect key specification on my part, but using "shift+insert" as the sole keybinding worked fine.</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">At the very least, I would expect both the keybinding element, and the first item in the "keys" list, to be maintained.</p> <p dir="auto">Ideally, all keybindings in the list would work to activate the function (assuming no conflicts with keybindings in other functions).</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">The entire keybinding element is removed</p>
0
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import pandas as pd df = pd.DataFrame({ 'Foo64': [1.2, 2.4, 7.24], }) df['Foo32'] = df['Foo64'].astype('float32') df.eval('-1 + Foo64') # Works df.eval('-1 + Foo32') # Throws Exception"><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-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({ <span class="pl-s">'Foo64'</span>: [<span class="pl-c1">1.2</span>, <span class="pl-c1">2.4</span>, <span class="pl-c1">7.24</span>], }) <span class="pl-s1">df</span>[<span class="pl-s">'Foo32'</span>] <span class="pl-c1">=</span> <span class="pl-s1">df</span>[<span class="pl-s">'Foo64'</span>].<span class="pl-en">astype</span>(<span class="pl-s">'float32'</span>) <span class="pl-s1">df</span>.<span class="pl-en">eval</span>(<span class="pl-s">'-1 + Foo64'</span>) <span class="pl-c"># Works</span> <span class="pl-s1">df</span>.<span class="pl-en">eval</span>(<span class="pl-s">'-1 + Foo32'</span>) <span class="pl-c"># Throws Exception</span></pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;C:\Users\vmuriart\Desktop\bug_eval.py&quot;, line 10, in &lt;module&gt; df.eval('-1 + Foo32') # Throws Exception File &quot;C:\Anaconda\lib\site-packages\pandas\core\frame.py&quot;, line 2186, in eval return _eval(expr, inplace=inplace, **kwargs) File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\eval.py&quot;, line 262, in eval truediv=truediv) File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py&quot;, line 727, in __init__ self.terms = self.parse() File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py&quot;, line 744, in parse return self._visitor.visit(self.expr) File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py&quot;, line 313, in visit return visitor(node, **kwargs) File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py&quot;, line 319, in visit_Module return self.visit(expr, **kwargs) File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py&quot;, line 313, in visit return visitor(node, **kwargs) File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py&quot;, line 322, in visit_Expr return self.visit(node.value, **kwargs) File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py&quot;, line 313, in visit return visitor(node, **kwargs) File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py&quot;, line 417, in visit_BinOp left, right = self._maybe_downcast_constants(left, right) File &quot;C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py&quot;, line 365, in _maybe_downcast_constants name = self.env.add_tmp(np.float32(left.value)) AttributeError: 'UnaryOp' object has no attribute 'value' "><pre class="notranslate"><span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>): <span class="pl-v">File</span> <span class="pl-s">"C:\Users<span class="pl-cce">\v</span>muriart\Desktop<span class="pl-cce">\b</span>ug_eval.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">10</span>, <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>.<span class="pl-en">eval</span>(<span class="pl-s">'-1 + Foo32'</span>) <span class="pl-c"># Throws Exception</span> <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core<span class="pl-cce">\f</span>rame.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">2186</span>, <span class="pl-s1">in</span> <span class="pl-s1">eval</span> <span class="pl-k">return</span> <span class="pl-en">_eval</span>(<span class="pl-s1">expr</span>, <span class="pl-s1">inplace</span><span class="pl-c1">=</span><span class="pl-s1">inplace</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\eval.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">262</span>, <span class="pl-s1">in</span> <span class="pl-s1">eval</span> <span class="pl-s1">truediv</span><span class="pl-c1">=</span><span class="pl-s1">truediv</span>) <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">727</span>, <span class="pl-s1">in</span> <span class="pl-s1">__init__</span> <span class="pl-s1">self</span>.<span class="pl-s1">terms</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">parse</span>() <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">744</span>, <span class="pl-s1">in</span> <span class="pl-s1">parse</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-s1">_visitor</span>.<span class="pl-en">visit</span>(<span class="pl-s1">self</span>.<span class="pl-s1">expr</span>) <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">313</span>, <span class="pl-s1">in</span> <span class="pl-s1">visit</span> <span class="pl-k">return</span> <span class="pl-en">visitor</span>(<span class="pl-s1">node</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">319</span>, <span class="pl-s1">in</span> <span class="pl-s1">visit_Module</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">visit</span>(<span class="pl-s1">expr</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">313</span>, <span class="pl-s1">in</span> <span class="pl-s1">visit</span> <span class="pl-k">return</span> <span class="pl-en">visitor</span>(<span class="pl-s1">node</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">322</span>, <span class="pl-s1">in</span> <span class="pl-s1">visit_Expr</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">visit</span>(<span class="pl-s1">node</span>.<span class="pl-s1">value</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">313</span>, <span class="pl-s1">in</span> <span class="pl-s1">visit</span> <span class="pl-k">return</span> <span class="pl-en">visitor</span>(<span class="pl-s1">node</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">417</span>, <span class="pl-s1">in</span> <span class="pl-s1">visit_BinOp</span> <span class="pl-s1">left</span>, <span class="pl-s1">right</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_maybe_downcast_constants</span>(<span class="pl-s1">left</span>, <span class="pl-s1">right</span>) <span class="pl-v">File</span> <span class="pl-s">"C:\Anaconda\lib\site-packages\pandas\core\computation\expr.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">365</span>, <span class="pl-s1">in</span> <span class="pl-s1">_maybe_downcast_constants</span> <span class="pl-s1">name</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">env</span>.<span class="pl-en">add_tmp</span>(<span class="pl-s1">np</span>.<span class="pl-en">float32</span>(<span class="pl-s1">left</span>.<span class="pl-s1">value</span>)) <span class="pl-v">AttributeError</span>: <span class="pl-s">'UnaryOp'</span> <span class="pl-s1">object</span> <span class="pl-s1">has</span> <span class="pl-s1">no</span> <span class="pl-s1">attribute</span> <span class="pl-s">'value'</span></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto"><code class="notranslate">df.eval(...)</code> operations fail if one of the columns involved is of type <code class="notranslate">float32</code> and some <code class="notranslate">unary</code> operations are involved. In the example above <code class="notranslate">df.eval('-1 + Foo32')</code> failed, but <code class="notranslate">df.eval('-Foo32')</code> will succeed, and <code class="notranslate">df.eval('-1*Foo32')</code> will also fail.</p> <p dir="auto">Originally I tested fixing this by just adding <code class="notranslate">self.value = operand.value</code> to the <code class="notranslate">UnaryOp</code> <a href="https://github.com/pandas-dev/pandas/blob/master/pandas/core/computation/ops.py#L497">object</a>, before I realized that this issue only affects <code class="notranslate">float32</code> objects. I haven't looked to see where the code branches off to cause this misbehavior.</p> <p dir="auto">This was tested and reproduced on both <code class="notranslate">0.20.3</code> and <code class="notranslate">0.22.0</code></p> <h4 dir="auto">Expected Output</h4> <p dir="auto">No exception thrown.</p> <h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4> <details> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.6.3.final.0<br> python-bits: 64<br> OS: Windows<br> OS-release: 10<br> machine: AMD64<br> processor: Intel64 Family 6 Model 79 Stepping 1, GenuineIntel<br> byteorder: little<br> LC_ALL: None<br> LANG: None<br> LOCALE: None.None</p> <p dir="auto">pandas: 0.22.0<br> pytest: 3.2.1<br> pip: 9.0.1<br> setuptools: 36.5.0.post20170921<br> Cython: 0.26.1<br> numpy: 1.12.1<br> scipy: 0.19.1<br> pyarrow: 0.7.1<br> xarray: None<br> IPython: 6.1.0<br> sphinx: 1.6.3<br> patsy: 0.4.1<br> dateutil: 2.6.1<br> pytz: 2017.2<br> blosc: None<br> bottleneck: 1.2.1<br> tables: 3.4.2<br> numexpr: 2.6.2<br> feather: None<br> matplotlib: 2.1.0<br> openpyxl: 2.4.8<br> xlrd: 1.1.0<br> xlwt: 1.3.0<br> xlsxwriter: 1.0.2<br> lxml: 4.1.0<br> bs4: 4.6.0<br> html5lib: 0.999999999<br> sqlalchemy: 1.1.13<br> pymysql: None<br> psycopg2: None<br> jinja2: 2.9.6<br> s3fs: None<br> fastparquet: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def test_unary(): df = pd.DataFrame({'x': np.array([0.11, 0], dtype=np.float32)}) res = df.eval('(x &gt; 0.1) | (x &lt; -0.1)') assert np.array_equal(res, np.array([True, False])), res"><pre class="notranslate"><code class="notranslate">def test_unary(): df = pd.DataFrame({'x': np.array([0.11, 0], dtype=np.float32)}) res = df.eval('(x &gt; 0.1) | (x &lt; -0.1)') assert np.array_equal(res, np.array([True, False])), res </code></pre></div> <h4 dir="auto">Problem description</h4> <p dir="auto">This is related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="109686658" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/11235" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/11235/hovercard" href="https://github.com/pandas-dev/pandas/issues/11235">#11235</a>.<br> on python 3.6, pandas 20.1, this raises an error the traceback ends with:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File &quot;.../envs/py3/lib/python3.6/site-packages/pandas/core/computation/expr.py&quot;, line 370, in _maybe_downcast_constants name = self.env.add_tmp(np.float32(right.value)) AttributeError: 'UnaryOp' object has no attribute 'value'"><pre class="notranslate"><code class="notranslate"> File ".../envs/py3/lib/python3.6/site-packages/pandas/core/computation/expr.py", line 370, in _maybe_downcast_constants name = self.env.add_tmp(np.float32(right.value)) AttributeError: 'UnaryOp' object has no attribute 'value' </code></pre></div> <p dir="auto">In that case the right is -(0.1)</p> <details> INSTALLED VERSIONS ------------------ commit: None python: 3.6.1.final.0 python-bits: 64 OS: Linux OS-release: 4.8.0-49-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 <p dir="auto">pandas: 0.20.1<br> pytest: None<br> pip: 9.0.1<br> setuptools: 27.2.0<br> Cython: 0.25.2<br> numpy: 1.12.1<br> scipy: 0.19.0<br> xarray: None<br> IPython: 6.0.0<br> sphinx: None<br> patsy: None<br> dateutil: 2.6.0<br> pytz: 2017.2<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> feather: None<br> matplotlib: 2.0.2<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: None<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: None<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: None</p> </details> <p dir="auto">Another example:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; df = pd.DataFrame({'x':[1,2,3,4,5]}) &gt;&gt;&gt; df.eval('x.shift(-1)')"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'x'</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">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">df</span>.<span class="pl-en">eval</span>(<span class="pl-s">'x.shift(-1)'</span>)</pre></div>
1
<p dir="auto">This is a regression from 0.6.2 which affects DataFramesMeta (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294832054" data-permission-text="Title is private" data-url="https://github.com/JuliaData/DataFramesMeta.jl/issues/88" data-hovercard-type="issue" data-hovercard-url="/JuliaData/DataFramesMeta.jl/issues/88/hovercard" href="https://github.com/JuliaData/DataFramesMeta.jl/issues/88">JuliaData/DataFramesMeta.jl#88</a>). Under some very particular circumstances, expression interpolation reverses the order of keys in a dictionary, compared with the order obtained in other places inside the same function. This is a problem when the function relies on the order of keys matching that of values (as with DataFrames macros).</p> <p dir="auto">In the following example, <code class="notranslate">:a</code> appears before <code class="notranslate">:b</code> in the two first lines inside the quoted block, but that's the contrary for the third line.</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function with_helper() membernames = Dict{Symbol,Int}(:a =&gt; 1, :b =&gt; 2) quote $(keys(membernames)...) $(map(key -&gt; :($key), keys(membernames))...) $(map(key -&gt; :(somedict[$key]), keys(membernames))...) end end julia&gt; with_helper() quote #= REPL[1]:4 =# a b #= REPL[1]:5 =# a b #= REPL[1]:6 =# somedict[b] somedict[a] end"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">with_helper</span>() membernames <span class="pl-k">=</span> <span class="pl-c1">Dict</span><span class="pl-c1">{Symbol,Int}</span>(<span class="pl-c1">:a</span> <span class="pl-k">=&gt;</span> <span class="pl-c1">1</span>, <span class="pl-c1">:b</span> <span class="pl-k">=&gt;</span> <span class="pl-c1">2</span>) <span class="pl-k">quote</span> <span class="pl-k">$</span>(<span class="pl-c1">keys</span>(membernames)<span class="pl-k">...</span>) <span class="pl-k">$</span>(<span class="pl-c1">map</span>(key <span class="pl-k">-&gt;</span> :(<span class="pl-k">$</span>key), <span class="pl-c1">keys</span>(membernames))<span class="pl-k">...</span>) <span class="pl-k">$</span>(<span class="pl-c1">map</span>(key <span class="pl-k">-&gt;</span> :(somedict[<span class="pl-k">$</span>key]), <span class="pl-c1">keys</span>(membernames))<span class="pl-k">...</span>) <span class="pl-k">end</span> <span class="pl-k">end</span> julia<span class="pl-k">&gt;</span> <span class="pl-c1">with_helper</span>() <span class="pl-k">quote</span> <span class="pl-c"><span class="pl-c">#=</span> REPL[1]:4 <span class="pl-c">=#</span></span> a b <span class="pl-c"><span class="pl-c">#=</span> REPL[1]:5 <span class="pl-c">=#</span></span> a b <span class="pl-c"><span class="pl-c">#=</span> REPL[1]:6 <span class="pl-c">=#</span></span> somedict[b] somedict[a] <span class="pl-k">end</span></pre></div>
<p dir="auto">When computing the matrix product of a transposed real matrix with a complex matrix, I encountered a performance issue.</p> <p dir="auto">Consider the following computations:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; A=randn(1000,1000); julia&gt; B=randn(1000,1000); julia&gt; Z=complex(randn(1000,1000),randn(1000,1000)); julia&gt; # pre-compiling julia&gt; A'*B; julia&gt; A'*Z; julia&gt; complex(A'*real(Z),A'*imag(Z)); julia&gt; # timing julia&gt; @time A'*B; 0.025224 seconds (130 allocations: 7.637 MB) julia&gt; @time A'*Z; 1.899244 seconds (6 allocations: 15.259 MB) julia&gt; @time complex(A'*real(Z),A'*imag(Z)); 0.062084 seconds (16 allocations: 45.777 MB, 8.73% gc time)"><pre class="notranslate"><code class="notranslate">julia&gt; A=randn(1000,1000); julia&gt; B=randn(1000,1000); julia&gt; Z=complex(randn(1000,1000),randn(1000,1000)); julia&gt; # pre-compiling julia&gt; A'*B; julia&gt; A'*Z; julia&gt; complex(A'*real(Z),A'*imag(Z)); julia&gt; # timing julia&gt; @time A'*B; 0.025224 seconds (130 allocations: 7.637 MB) julia&gt; @time A'*Z; 1.899244 seconds (6 allocations: 15.259 MB) julia&gt; @time complex(A'*real(Z),A'*imag(Z)); 0.062084 seconds (16 allocations: 45.777 MB, 8.73% gc time) </code></pre></div> <p dir="auto">The latter two computations are mathematically identical, however the last (more complex) expression is ~30x faster (and only ~2 times slower than the corresponding real-real product, as one would expect) than the straightforward expression <code class="notranslate">A'*Z</code>. Shouldn't both expressions be comparable in performance?</p> <p dir="auto">I am running Julia 0.5.2 on Ubuntu 14.04.</p> <p dir="auto">sysinfo() output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Julia Version 0.5.2 Commit f4c6c9d4bb (2017-05-06 16:34 UTC) Platform Info: OS: Linux (x86_64-linux-gnu) CPU: Intel(R) Core(TM) i7-4702HQ CPU @ 2.20GHz WORD_SIZE: 64 BLAS: libopenblas (NO_LAPACK NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell) LAPACK: liblapack.so.3 LIBM: libopenlibm LLVM: libLLVM-3.7.1 (ORCJIT, haswell)"><pre class="notranslate"><code class="notranslate">Julia Version 0.5.2 Commit f4c6c9d4bb (2017-05-06 16:34 UTC) Platform Info: OS: Linux (x86_64-linux-gnu) CPU: Intel(R) Core(TM) i7-4702HQ CPU @ 2.20GHz WORD_SIZE: 64 BLAS: libopenblas (NO_LAPACK NO_LAPACKE DYNAMIC_ARCH NO_AFFINITY Haswell) LAPACK: liblapack.so.3 LIBM: libopenlibm LLVM: libLLVM-3.7.1 (ORCJIT, haswell) </code></pre></div>
0
<p dir="auto">Continuing <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="12049172" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/3059" data-hovercard-type="pull_request" data-hovercard-url="/pandas-dev/pandas/pull/3059/hovercard" href="https://github.com/pandas-dev/pandas/pull/3059">#3059</a>.<br> See also <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="12194544" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/3092" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/3092/hovercard" href="https://github.com/pandas-dev/pandas/issues/3092">#3092</a></p> <ul dir="auto"> <li>allow dupe columns when they are in the same block/dtype</li> <li>Perhaps figure out a way to handle that case as well.</li> </ul>
<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; import pandas as pd &gt;&gt;&gt; s = pd.Series() &gt;&gt;&gt; ts = pd.Timestamp('2016-01-01') &gt;&gt;&gt; s['a'] = None &gt;&gt;&gt; s['b'] = ts &gt;&gt;&gt; s a None b 1451606400000000000 dtype: object"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; import pandas as pd &gt;&gt;&gt; s = pd.Series() &gt;&gt;&gt; ts = pd.Timestamp('2016-01-01') &gt;&gt;&gt; s['a'] = None &gt;&gt;&gt; s['b'] = ts &gt;&gt;&gt; s a None b 1451606400000000000 dtype: object </code></pre></div> <p dir="auto">OK, no worries, we got coerced to integer. Now let's just redo the <strong>same assignment</strong>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; s['b'] = ts &gt;&gt;&gt; s a None b 2016-01-01 00:00:00 dtype: object"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; s['b'] = ts &gt;&gt;&gt; s a None b 2016-01-01 00:00:00 dtype: object </code></pre></div> <p dir="auto">That's ... suprising. This is probably just an unfortunate feature of a type inference algorithm, but it's awfully shocking.</p> <h4 dir="auto">Related examples for testing</h4> <p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="275727906" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/18410" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/18410/hovercard" href="https://github.com/pandas-dev/pandas/issues/18410">#18410</a><br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="324713954" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/21143" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/21143/hovercard" href="https://github.com/pandas-dev/pandas/issues/21143">#21143</a></p> <h4 dir="auto">Expected Output</h4> <p dir="auto">The two outputs above would be identical; I'd prefer that they were both the second form (with timestamp information preserved), but anything consistent would be better than the current state.</p> <h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; pd.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.11.final.0 python-bits: 64 OS: Darwin OS-release: 15.6.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 pandas: 0.18.1 nose: None pip: 8.1.2 setuptools: 25.1.4 Cython: None numpy: 1.11.1 scipy: None statsmodels: None xarray: None IPython: None sphinx: None patsy: None dateutil: 2.5.3 pytz: 2016.6.1 blosc: None bottleneck: None tables: None numexpr: None matplotlib: None openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: None boto: None pandas_datareader: None"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; pd.show_versions() INSTALLED VERSIONS ------------------ commit: None python: 2.7.11.final.0 python-bits: 64 OS: Darwin OS-release: 15.6.0 machine: x86_64 processor: i386 byteorder: little LC_ALL: None LANG: en_US.UTF-8 pandas: 0.18.1 nose: None pip: 8.1.2 setuptools: 25.1.4 Cython: None numpy: 1.11.1 scipy: None statsmodels: None xarray: None IPython: None sphinx: None patsy: None dateutil: 2.5.3 pytz: 2016.6.1 blosc: None bottleneck: None tables: None numexpr: None matplotlib: None openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: None httplib2: None apiclient: None sqlalchemy: None pymysql: None psycopg2: None jinja2: None boto: None pandas_datareader: None </code></pre></div>
0
<p dir="auto">Trying to implement a tree-like structure:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="extern mod core(vers = &quot;0.5&quot;); priv struct Node&lt;K, V&gt; { left: core::Option&lt;Node&lt;K, V&gt;&gt; }"><pre class="notranslate"><code class="notranslate">extern mod core(vers = "0.5"); priv struct Node&lt;K, V&gt; { left: core::Option&lt;Node&lt;K, V&gt;&gt; } </code></pre></div> <p dir="auto">I hit the following compiler error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rust: task 7f3b6c105dd0 ran out of stack /usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7f3b73b0e45b] /usr/local/bin/../lib/librustrt.so(_ZN9rust_task9new_stackEm+0x158)[0x7f3b73b0e928] /usr/local/bin/../lib/librustrt.so(+0x30229)[0x7f3b73b22229] /usr/local/bin/../lib/librustrt.so(upcall_new_stack+0x280)[0x7f3b73b12040] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x767fa2)[0x7f3b742bbfa2] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2f2c59)[0x7f3b73e46c59] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty14__extensions__10meth_3526010iter_bytes15_abfbbb3dea17df3_05E+0xc3f)[0x7f3b73e1bc3f] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty14__extensions__10meth_3525510iter_bytes15_abfbbb3dea17df3_05E+0x85)[0x7f3b73e1adb5] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2d6ebf)[0x7f3b73e2aebf] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2d62ef)[0x7f3b73e2a2ef] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty9mk_struct16_beb59be6919256b3_05E+0x11e)[0x7f3b73e311de] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty19fold_regions_and_ty17_4c9b12843e648dc73_05E+0x93a)[0x7f3b73e33dfa] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2e1f54)[0x7f3b73e35f54] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x111321)[0x7f3b73c65321] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2e03ea)[0x7f3b73e343ea] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty19fold_regions_and_ty17_4c9b12843e648dc73_05E+0x26a)[0x7f3b73e3372a] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2e1f54)[0x7f3b73e35f54] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty5subst16_b2fc4a1db6bca5d3_05E+0x2fb)[0x7f3b73d0772b] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty17lookup_field_type17_f6b5a6d1e0e9fa5f3_05E+0x1bb)[0x7f3b73d6472b]"><pre class="notranslate"><code class="notranslate">rust: task 7f3b6c105dd0 ran out of stack /usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_m+0x4b)[0x7f3b73b0e45b] /usr/local/bin/../lib/librustrt.so(_ZN9rust_task9new_stackEm+0x158)[0x7f3b73b0e928] /usr/local/bin/../lib/librustrt.so(+0x30229)[0x7f3b73b22229] /usr/local/bin/../lib/librustrt.so(upcall_new_stack+0x280)[0x7f3b73b12040] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x767fa2)[0x7f3b742bbfa2] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2f2c59)[0x7f3b73e46c59] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty14__extensions__10meth_3526010iter_bytes15_abfbbb3dea17df3_05E+0xc3f)[0x7f3b73e1bc3f] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty14__extensions__10meth_3525510iter_bytes15_abfbbb3dea17df3_05E+0x85)[0x7f3b73e1adb5] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2d6ebf)[0x7f3b73e2aebf] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2d62ef)[0x7f3b73e2a2ef] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty9mk_struct16_beb59be6919256b3_05E+0x11e)[0x7f3b73e311de] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty19fold_regions_and_ty17_4c9b12843e648dc73_05E+0x93a)[0x7f3b73e33dfa] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2e1f54)[0x7f3b73e35f54] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x111321)[0x7f3b73c65321] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2e03ea)[0x7f3b73e343ea] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty19fold_regions_and_ty17_4c9b12843e648dc73_05E+0x26a)[0x7f3b73e3372a] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(+0x2e1f54)[0x7f3b73e35f54] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty5subst16_b2fc4a1db6bca5d3_05E+0x2fb)[0x7f3b73d0772b] /usr/local/bin/../lib/librustc-c84825241471686d-0.5.so(_ZN6middle2ty17lookup_field_type17_f6b5a6d1e0e9fa5f3_05E+0x1bb)[0x7f3b73d6472b] </code></pre></div>
<p dir="auto">This is an ICE on some obviously bogus input code.</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="struct A&lt;X&gt;; fn foo&lt;I:A&lt;&amp;'self int&gt;&gt;() { } fn main() { }"><pre class="notranslate"><span class="pl-k">struct</span> <span class="pl-smi">A</span><span class="pl-kos">&lt;</span><span class="pl-smi">X</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">&lt;</span><span class="pl-smi">I</span><span class="pl-kos">:</span><span class="pl-smi">A</span><span class="pl-kos">&lt;</span><span class="pl-c1">&amp;</span><span class="pl-c1">'</span><span class="pl-ent">self</span> <span class="pl-smi">int</span><span class="pl-kos">&gt;</span><span class="pl-kos">&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">fn</span> <span class="pl-en">main</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">Transcript:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="% RUST_LOG=rustc=1 rustc --version /tmp/baz2.rs /Users/pnkfelix/opt/rust-dbg/bin/rustc 0.8-pre (dd5c737 2013-09-08 12:05:55 -0700) host: x86_64-apple-darwin % RUST_LOG=rustc=1 rustc /tmp/baz2.rs task &lt;unnamed&gt; failed at 'assertion failed: rp.is_none()', /Users/pnkfelix/Dev/Mozilla/rust.git/src/librustc/middle/typeck/collect.rs:1108 error: internal compiler error: unexpected failure note: the compiler hit an unexpected failure path. this is a bug note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues task &lt;unnamed&gt; failed at 'explicit failure', /Users/pnkfelix/Dev/Mozilla/rust.git/src/librustc/rustc.rs:376 % "><pre class="notranslate"><code class="notranslate">% RUST_LOG=rustc=1 rustc --version /tmp/baz2.rs /Users/pnkfelix/opt/rust-dbg/bin/rustc 0.8-pre (dd5c737 2013-09-08 12:05:55 -0700) host: x86_64-apple-darwin % RUST_LOG=rustc=1 rustc /tmp/baz2.rs task &lt;unnamed&gt; failed at 'assertion failed: rp.is_none()', /Users/pnkfelix/Dev/Mozilla/rust.git/src/librustc/middle/typeck/collect.rs:1108 error: internal compiler error: unexpected failure note: the compiler hit an unexpected failure path. this is a bug note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues task &lt;unnamed&gt; failed at 'explicit failure', /Users/pnkfelix/Dev/Mozilla/rust.git/src/librustc/rustc.rs:376 % </code></pre></div>
0