text1
stringlengths
0
536k
text2
stringlengths
0
536k
label
int64
0
1
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 3.4.1</li> <li>Operating System / Platform =&gt; Ubuntu 16.04 amd64</li> <li>Compiler =&gt; g++ 5.4</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">I try to use cudacodec VideoReader to read a mkv :<br> <code class="notranslate">cudacodec::createVideoReader("file.mkv")</code></p> <p dir="auto">OpenCV throws this error :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="OpenCV(3.4.1) Error: The function/feature is not implemented (The called functionality is disabled for current build or platform) in throw_no_cuda, file /home/damien/code/lib/opencv-3.4.1/opencv-3.4.1/modules/core/include/opencv2/core/private.cuda.hpp, line 111 terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(3.4.1) /home/damien/code/lib/opencv-3.4.1/opencv-3.4.1/modules/core/include/opencv2/core/private.cuda.hpp:111: error: (-213) The called functionality is disabled for current build or platform in function throw_no_cuda"><pre class="notranslate"><code class="notranslate">OpenCV(3.4.1) Error: The function/feature is not implemented (The called functionality is disabled for current build or platform) in throw_no_cuda, file /home/damien/code/lib/opencv-3.4.1/opencv-3.4.1/modules/core/include/opencv2/core/private.cuda.hpp, line 111 terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(3.4.1) /home/damien/code/lib/opencv-3.4.1/opencv-3.4.1/modules/core/include/opencv2/core/private.cuda.hpp:111: error: (-213) The called functionality is disabled for current build or platform in function throw_no_cuda </code></pre></div> <p dir="auto">I compile OpenCV with external cuda-enabled ffmpeg :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ffmpeg ffmpeg version n3.4.2-6-g1b9b469 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609 configuration: --enable-cuda --enable-nvenc --enable-cuvid --enable-nonfree --extra-cflags='-I/usr/local/cuda/include -I/home/damien/code/lib/Video_Codec_SDK_8.1.24/Samples/NvCodec/NvEncoder' --extra-ldflags=-L/usr/local/cuda/lib64 --enable-shared --disable-static libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 Hyper fast Audio and Video encoder"><pre class="notranslate"><code class="notranslate">$ ffmpeg ffmpeg version n3.4.2-6-g1b9b469 Copyright (c) 2000-2018 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.9) 20160609 configuration: --enable-cuda --enable-nvenc --enable-cuvid --enable-nonfree --extra-cflags='-I/usr/local/cuda/include -I/home/damien/code/lib/Video_Codec_SDK_8.1.24/Samples/NvCodec/NvEncoder' --extra-ldflags=-L/usr/local/cuda/lib64 --enable-shared --disable-static libavutil 55. 78.100 / 55. 78.100 libavcodec 57.107.100 / 57.107.100 libavformat 57. 83.100 / 57. 83.100 libavdevice 57. 10.100 / 57. 10.100 libavfilter 6.107.100 / 6.107.100 libswscale 4. 8.100 / 4. 8.100 libswresample 2. 9.100 / 2. 9.100 Hyper fast Audio and Video encoder </code></pre></div> <p dir="auto">I compile OpenCV with this cmake :<br> <code class="notranslate">cmake --enable-shared -D WITH_NVCUVID</code><br> Giving me this OpenCV configuration :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="General configuration for OpenCV 3.4.1 ===================================== Version control: unknown Extra modules: Location (extra): /home/damien/code/lib/opencv-3.4.1/opencv_contrib-3.4.1/modules Version control (extra): unknown Platform: Timestamp: 2018-04-03T15:40:15Z Host: Linux 4.13.0-37-generic x86_64 ... Video I/O: DC1394: YES (ver 2.2.4) FFMPEG: YES avcodec: YES (ver 57.107.100) avformat: YES (ver 57.83.100) avutil: YES (ver 55.78.100) swscale: YES (ver 4.8.100) avresample: NO ... NVIDIA CUDA: YES (ver 9.1, CUFFT CUBLAS) NVIDIA GPU arch: 30 35 37 50 52 60 61 70 NVIDIA PTX archs: OpenCL: YES (no extra features) Include path: /home/damien/code/lib/opencv-3.4.1/opencv-3.4.1/3rdparty/include/opencl/1.2 Link libraries: Dynamic load ..."><pre class="notranslate"><code class="notranslate">General configuration for OpenCV 3.4.1 ===================================== Version control: unknown Extra modules: Location (extra): /home/damien/code/lib/opencv-3.4.1/opencv_contrib-3.4.1/modules Version control (extra): unknown Platform: Timestamp: 2018-04-03T15:40:15Z Host: Linux 4.13.0-37-generic x86_64 ... Video I/O: DC1394: YES (ver 2.2.4) FFMPEG: YES avcodec: YES (ver 57.107.100) avformat: YES (ver 57.83.100) avutil: YES (ver 55.78.100) swscale: YES (ver 4.8.100) avresample: NO ... NVIDIA CUDA: YES (ver 9.1, CUFFT CUBLAS) NVIDIA GPU arch: 30 35 37 50 52 60 61 70 NVIDIA PTX archs: OpenCL: YES (no extra features) Include path: /home/damien/code/lib/opencv-3.4.1/opencv-3.4.1/3rdparty/include/opencl/1.2 Link libraries: Dynamic load ... </code></pre></div> <p dir="auto">After taking a look at the source code, I see that :</p> <p dir="auto">Using cudacodec VideoReader needs the HAVE_NVCUVID envvar to be set :<br> <a href="https://github.com/opencv/opencv/blob/3.4.1/modules/cudacodec/src/video_reader.cpp#L49-L54">https://github.com/opencv/opencv/blob/3.4.1/modules/cudacodec/src/video_reader.cpp#L49-L54</a></p> <p dir="auto">This envvar is set only if CUDA_nvcuvid_LIBRARY is set :<br> <a href="https://github.com/opencv/opencv/blob/3.4.1/cmake/OpenCVDetectCUDA.cmake#L36-L38">https://github.com/opencv/opencv/blob/3.4.1/cmake/OpenCVDetectCUDA.cmake#L36-L38</a></p> <p dir="auto">And this variable is set only when we are on WIN32 :<br> <a href="https://github.com/opencv/opencv/blob/3.4.1/cmake/FindCUDA.cmake#L792-L794">https://github.com/opencv/opencv/blob/3.4.1/cmake/FindCUDA.cmake#L792-L794</a></p> <p dir="auto">So I think that there is no way to enable NVCUVID. Do I miss something ? If not, I think that it should be fixed.</p> <p dir="auto">Furthermore, I don't want to use the CuvidVideoSource, but I want to use the shared FFMPEG lib that already can use cuvid, with the FFmpegVideoSource. And I think that there is no need for OpenCV to link to cuvid to use this ffmpeg backend. So the FFMPEG backend should be available event if HAVE_NVCUVID is not defined. Is it ?</p> <p dir="auto">I can do these changes, but I think that having a confirmation before working on could be interresting.</p> <h5 dir="auto">Steps to reproduce</h5> <ul dir="auto"> <li> <p dir="auto">Compile OpenCV 3.4.1 with CUDA 9.1, NVCUVID</p> </li> <li> <p dir="auto">try to open a mkv :</p> <div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="cudacodec::createVideoReader(&quot;file.mkv&quot;)"><pre class="notranslate"><span class="pl-en">cudacodec::createVideoReader</span>(<span class="pl-s"><span class="pl-pds">"</span>file.mkv<span class="pl-pds">"</span></span>)</pre></div> </li> </ul> <p dir="auto">More informations about this problem : <a href="http://answers.opencv.org/question/188525/enable-cudacodecvideoreader/" rel="nofollow">http://answers.opencv.org/question/188525/enable-cudacodecvideoreader/</a></p>
<h5 dir="auto">System information (version)</h5> <ul dir="auto"> <li>OpenCV =&gt; 3.4.3</li> <li>CMake =&gt; 3.12.3</li> <li>Operating System / Platform =&gt; OSX 10.13.6</li> <li>Compiler =&gt; clang(?)</li> </ul> <h5 dir="auto">Detailed description</h5> <p dir="auto">When configuring my OpenCV project, I get the following error:<br> <code class="notranslate">CMake Error at /Library/Frameworks/opencv2.framework/OpenCVConfig.cmake:96: Parse error. Expected a command name, got unquoted argument with text "@CUDA_CONFIGCMAKE@". Call Stack (most recent call first): CMakeLists.txt:3 (find_package)</code></p> <h5 dir="auto">Steps to reproduce</h5> <p dir="auto">I downloaded the OpenCV ios pack and dragged the framework to my User Library. I installed CMake using the .dmg. My most recent error was that there was no OpenCVConfig.cmake file in my OpenCV_DIR path, so I added the one I found here on GitHub (without the ".in" suffix) to the folder Library/Frameworks/opencv2.framework.</p> <p dir="auto">my project directory:<br> <code class="notranslate">/OpenCV_Setup</code><br> <code class="notranslate">----/OpenCV_Setup</code><br> <code class="notranslate">--------/main.cpp</code><br> <code class="notranslate">----/OpenCV_Setup.xcodeproj</code><br> <code class="notranslate">----/CMakeLists.txt</code></p> <p dir="auto">Here is my CMakeLists.txt:<br> <code class="notranslate">cmake_minimum_required(VERSION 3.0)</code><br> <code class="notranslate">project( DisplayImage )</code><br> <code class="notranslate">find_package( OpenCV REQUIRED )</code><br> <code class="notranslate">target_link_libraries(MY_TARGET_NAME ${OpenCV_LIBS})</code><br> <code class="notranslate">add_executable( DisplayImage DisplayImage.cpp)</code><br> <code class="notranslate">target_link_libraries( DisplayImage ${OpenCV_LIBS})</code></p> <p dir="auto">I have tried it with minimum required version as 3.12 as well, with the same result.</p> <p dir="auto">I've seen that some people solved similar errors by detecting non-printing characters using a hex editor, and while I can see the hex version of this code in Sublime Text... understanding it is beyond me at the moment.</p> <p dir="auto">I'm looking forward to starting to study OpenCV as soon as possible. I'll keep trying to figure this out on my own as well, but any help would be greatly appreciated.</p>
0
<h2 dir="auto">Bug Report</h2> <p dir="auto"><strong>Current Behavior</strong><br> Set up a TypeScript repository with Babel and <a href="https://babeljs.io/docs/en/babel-plugin-transform-typescript/" rel="nofollow">plugin-transform-typescript</a>. Add this code:</p> <p dir="auto"><strong>Input Code</strong></p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export enum Foo { a, b, c, d } export namespace Foo { export function bar() { return &quot;bar&quot; } }"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">enum</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-c1">a</span><span class="pl-kos">,</span> <span class="pl-c1">b</span><span class="pl-kos">,</span> <span class="pl-c1">c</span><span class="pl-kos">,</span> <span class="pl-c1">d</span> <span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">namespace</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"bar"</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto"><strong>Expected behavior/code</strong><br> It should compile just fine. In TypeScript this just works: <a href="https://www.typescriptlang.org/play/?ssl=1&amp;ssc=1&amp;pln=27&amp;pc=1#code/KYDwDg9gTgLgBMAdgVwLZwGIQgWAFADe+cJcAhgDRwBGVAxlQCb4C+++oksciZqwAZzBk6wTNnxE8JTtHgAzZIjowAlhEQ0yUABQBKYnCmk4UYDGRRNAInnZrhtnifs8s7r35CRYgELbJQ3cFJRV1TWptfUNjUjMLKzhrSKgHaTgnFzdwOQQUdH8oQPSSShp6JlZ8IA" rel="nofollow">Playground Link</a></p> <p dir="auto"><strong>Actual behavior</strong><br> The compiler throws a <strong>very misguiding</strong> error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./src/Foo.ts SyntaxError: Foo.ts: Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript 4 | } 5 | &gt; 6 | export namespace Foo | ^^^ 7 | { 8 | export function bar() 9 | {"><pre class="notranslate"><code class="notranslate">./src/Foo.ts SyntaxError: Foo.ts: Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript 4 | } 5 | &gt; 6 | export namespace Foo | ^^^ 7 | { 8 | export function bar() 9 | { </code></pre></div> <p dir="auto">Changing the order of <code class="notranslate">enum</code> and <code class="notranslate">namespace</code> declarations results in this error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="./src/Foo.ts TypeError: Foo.ts: Duplicate declaration &quot;Foo&quot; 8 | } 9 | &gt; 10 | export enum Foo | ^^^ 11 | { 12 | a, b, c, d 13 | }"><pre class="notranslate"><code class="notranslate">./src/Foo.ts TypeError: Foo.ts: Duplicate declaration "Foo" 8 | } 9 | &gt; 10 | export enum Foo | ^^^ 11 | { 12 | a, b, c, d 13 | } </code></pre></div> <p dir="auto"><strong>Babel Configuration</strong></p> <ul dir="auto"> <li>The repository was created with:</li> </ul> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="yarn create react-app --template=typescript yarn add @babel/plugin-transform-typescript react-app-rewired customize-cra"><pre class="notranslate">yarn create react-app --template=typescript yarn add @babel/plugin-transform-typescript react-app-rewired customize-cra</pre></div> <p dir="auto">Then add this to <code class="notranslate">config-overrides.js</code>:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { override, addExternalBabelPlugin } = require(&quot;customize-cra&quot;); module.exports = override( addBabelPlugin([ &quot;@babel/plugin-transform-typescript&quot;, { allowNamespaces: true } ]) );"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> override<span class="pl-kos">,</span> addExternalBabelPlugin <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">"customize-cra"</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-en">override</span><span class="pl-kos">(</span> <span class="pl-en">addBabelPlugin</span><span class="pl-kos">(</span><span class="pl-kos">[</span> <span class="pl-s">"@babel/plugin-transform-typescript"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">allowNamespaces</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-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Environment</strong></p> <ul dir="auto"> <li>Babel version(s): v7.9.0</li> <li>Node/npm version: v13.13.0</li> <li>OS: elementary</li> <li>Monorepo: no</li> <li>How you are using Babel: via <code class="notranslate">react-scripts</code>, <code class="notranslate">webpack</code></li> </ul> <p dir="auto"><strong>Walkaround</strong><br> If you need to keep the exact structure in your project, you can do this:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export enum Foo_ { a, b, c, d } export type Foo = Foo_ export namespace Foo { export const a = Foo_.a export const b = Foo_.b export const c = Foo_.c export const d = Foo_.d export function bar() { return &quot;bar&quot; } }"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">enum</span> <span class="pl-smi">Foo_</span> <span class="pl-kos">{</span> <span class="pl-c1">a</span><span class="pl-kos">,</span> <span class="pl-c1">b</span><span class="pl-kos">,</span> <span class="pl-c1">c</span><span class="pl-kos">,</span> <span class="pl-c1">d</span> <span class="pl-kos">}</span> <span class="pl-k">export</span> <span class="pl-k">type</span> <span class="pl-smi">Foo</span> <span class="pl-c1">=</span> <span class="pl-smi">Foo_</span> <span class="pl-k">export</span> <span class="pl-k">namespace</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-smi">Foo_</span><span class="pl-kos">.</span><span class="pl-c1">a</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-smi">Foo_</span><span class="pl-kos">.</span><span class="pl-c1">b</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">c</span> <span class="pl-c1">=</span> <span class="pl-smi">Foo_</span><span class="pl-kos">.</span><span class="pl-c1">c</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">d</span> <span class="pl-c1">=</span> <span class="pl-smi">Foo_</span><span class="pl-kos">.</span><span class="pl-c1">d</span> <span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">bar</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s">"bar"</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">(We can't use a destructuring assignment because of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="604329925" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/11461" data-hovercard-type="issue" data-hovercard-url="/babel/babel/issues/11461/hovercard" href="https://github.com/babel/babel/issues/11461">#11461</a>)</p> <p dir="auto"><strong>Proposed Solution</strong><br> At least the misleading errors should be fixed as soon as possible. Thinking that the plugin loaded incorrectly caused me a lot of pain and several wasted hours. However, the feature itself is important too and I'd really love to see it implemented.</p>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/TheLarkInn/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/TheLarkInn">@TheLarkInn</a> asked, and it seems like a discussion worth having.</p> <p dir="auto">Leaving it off by default would lead to people being more likely to get errors in things like Node by default, but it would potentially make the workflow easier for people using Webpack, since it's usually easier to add additional plugins than it is to remove them, since opting out first is more verbose, so people could do</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ presets: ['@babel/env'], env: { test: { plugins: ['@babel/transform-modules-commonjs'], } } }"><pre class="notranslate"><code class="notranslate">{ presets: ['@babel/env'], env: { test: { plugins: ['@babel/transform-modules-commonjs'], } } } </code></pre></div> <p dir="auto">which is a lot nicer than</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ presets: [['@babel/env', { modules: false }]], env: { test: { plugins: ['@babel/transform-modules-commonjs'], } } }"><pre class="notranslate"><code class="notranslate">{ presets: [['@babel/env', { modules: false }]], env: { test: { plugins: ['@babel/transform-modules-commonjs'], } } } </code></pre></div> <p dir="auto">or even</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ presets: [['@babel/env', { modules: false }]], env: { test: { presets: ['@babel/env'], } } }"><pre class="notranslate"><code class="notranslate">{ presets: [['@babel/env', { modules: false }]], env: { test: { presets: ['@babel/env'], } } } </code></pre></div> <p dir="auto">at least in my view?</p>
0
<p dir="auto">This happened after I switched branches in git, and had folder open, which was unavailable in branch that I switched to.<br> Atom was open in background, GitHub app was on top.</p>
<p dir="auto">Right-click in the tree view to rename a file (which is currently open in the editor) and the file gets copied/duplicated to the new name while the old file remains open. They are not symlinked as editing one does not produce changes in the other after closing/reopening.</p> <p dir="auto">Renaming a directory (containing a file open in the editor) has similar effect. The old directory remains, including any files currently open in the editor. Everything else is moved to the new directory, including copies of open files.</p> <p dir="auto">Atom 0.170 on OS X 10.10. Has been happening for a while, and happens even when all plugins are disabled. I tested by opening my Desktop folder in Atom, creating a folder and some files, and renaming the folder while with some files open.</p>
0
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p> <p dir="auto">Bug</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">When importing an undefined named import, it doesn't produce any warning or error in build, but fail at runtime. I am using babel-preset-env, with <code class="notranslate">modules: false</code>.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce.</strong></p> <p dir="auto">a.js</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { getDef, getUndef } from './b.js'; getDef(); // works getUndef(); // throws"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">getDef</span><span class="pl-kos">,</span> <span class="pl-s1">getUndef</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./b.js'</span><span class="pl-kos">;</span> <span class="pl-en">getDef</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// works</span> <span class="pl-en">getUndef</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// throws</span></pre></div> <p dir="auto">b.js</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export const getDef = () =&gt; 'defined';"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-en">getDef</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s">'defined'</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">I would expect webpack to produce an error, because the named import doesn't exist.</p> <p dir="auto"><strong>If this is a feature request, what is motivation or use case for changing the behavior?</strong></p> <p dir="auto">Got bit by this many times, and I think it should be a build check instead of a runtime check.</p> <p dir="auto"><strong>Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.</strong></p> <p dir="auto">OS: MacOSX 10.13.2<br> Node: 8.10.3<br> Webpack: 3.10.0<br> babel/preset-env: 7.0.0-beta.34</p> <p dir="auto">Thanks in advance!</p>
<p dir="auto"><strong>I'm submitting a feature request</strong><br> <strong>Webpack version:</strong><br> 2.1.0-beta.21</p> <p dir="auto"><strong>Please tell us about your environment:</strong><br> Linux</p> <p dir="auto"><strong>Current behavior:</strong><br> When I try to import a named import, it fails silently if the name import does not exist. I wish webpack would fail loudly when it cannot find the import at build time</p> <p dir="auto">For example:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// file1.js const var1 = 'var1' export { var1 }"><pre class="notranslate"><code class="notranslate">// file1.js const var1 = 'var1' export { var1 } </code></pre></div> <p dir="auto">and</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// file2.js import { var2 } from './file1' // at this point, var2 is undefined at runtime because it was never exported from file1.js"><pre class="notranslate"><code class="notranslate">// file2.js import { var2 } from './file1' // at this point, var2 is undefined at runtime because it was never exported from file1.js </code></pre></div> <p dir="auto"><strong>Desired behavior:</strong><br> Instead, I want it to fail at build time. Is there a webpack option or some other technique I can use to catch this error sooner?</p> <ul dir="auto"> <li><strong>What is the motivation / use case for changing the behavior?</strong><br> This will catch typos at build time, and prevent a lot of headaches caused by undefined imports.</li> <li><strong>Browser:</strong> [all ]</li> <li><strong>Language:</strong> [ES6/7]</li> </ul>
1
<p dir="auto">In <a href="http://getbootstrap.com/customize/#less-variables" rel="nofollow">http://getbootstrap.com/customize/#less-variables</a>, the nav bar on the left eases navigation in the page. However, when there is too much content and the height of the screen is too low, it becomes impossible to see the content at the end of the nav bar.</p>
<p dir="auto">On the <strong>Components</strong> page of the Bootstrap docs, the sidebar becomes too tall for the viewport when <code class="notranslate">scrollspy</code> causes the sidebar subheadings to show.</p> <p dir="auto">The sidebar cannot be scrolled or manipulated to show content below the viewport.</p> <p dir="auto">See here: <a href="http://getbootstrap.com/components/#glyphicons" rel="nofollow">http://getbootstrap.com/components/#glyphicons</a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/95439b4a35416da72571a4370430e75ce3537082bd569e0307adc41876c1c985/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f333135343431352f3939313132322f31333836323763632d303935322d313165332d396239652d3562356337373934356263622e706e67"><img src="https://camo.githubusercontent.com/95439b4a35416da72571a4370430e75ce3537082bd569e0307adc41876c1c985/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f333135343431352f3939313132322f31333836323763632d303935322d313165332d396239652d3562356337373934356263622e706e67" alt="screen shot 2013-08-20 at 12 35 55" data-canonical-src="https://f.cloud.github.com/assets/3154415/991122/138627cc-0952-11e3-9b9e-5b5c77945bcb.png" style="max-width: 100%;"></a></p>
1
<p dir="auto"><code class="notranslate">sum(skipmissing(x))</code> is reasonably fast, but since <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="333568119" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/27651" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/27651/hovercard" href="https://github.com/JuliaLang/julia/pull/27651">#27651</a> a naive implementation of <code class="notranslate">sum</code> is even faster (up to 5×). This is particularly clear when the input array does contain missing values, probably because the naive sum uses masked SIMD instructions while <code class="notranslate">skipmissing</code> relies on branching (and the presence of missing values kills prediction).</p> <p dir="auto">I haven't investigated this deeply, but IIUC <code class="notranslate">sum(skipmissing(x))</code> dispatches to <code class="notranslate">mapfoldl</code>, which uses the iteration protocol to go over the input. This means we lose the benefit of <code class="notranslate">@inbounds</code> and of <code class="notranslate">@simd</code>. Maybe something like <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="328740892" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/27384" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/27384/hovercard" href="https://github.com/JuliaLang/julia/issues/27384">#27384</a> would help with <code class="notranslate">@inbounds</code> at least?</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function mysum(X) s = zero(eltype(X)) @inbounds @simd for x in X if x !== missing s += x end end s end # With Vector{Int} X1 = rand(Int, 10_000_000); X2 = Vector{Union{Missing,Int}}(X1); X3 = ifelse.(rand(length(X2)) .&lt; 0.9, X2, missing); julia&gt; @btime mysum(X1); 5.594 ms (1 allocation: 16 bytes) julia&gt; @btime mysum(X2); 5.791 ms (1 allocation: 16 bytes) julia&gt; @btime mysum(X3); 5.681 ms (1 allocation: 16 bytes) julia&gt; @btime sum(skipmissing(X1)); 7.316 ms (2 allocations: 32 bytes) julia&gt; @btime sum(skipmissing(X2)); 18.175 ms (2 allocations: 32 bytes) julia&gt; @btime sum(skipmissing(X3)); 28.240 ms (2 allocations: 32 bytes) # With Vector{Float64} Y1 = rand(Float64, 10_000_000); Y2 = Vector{Union{Missing,Float64}}(Y1); Y3 = ifelse.(rand(length(Y2)) .&lt; 0.9, Y2, missing); julia&gt; @btime mysum(Y1); 5.860 ms (1 allocation: 16 bytes) julia&gt; @btime mysum(Y2); 13.849 ms (1 allocation: 16 bytes) julia&gt; @btime mysum(Y3); 17.428 ms (1 allocation: 16 bytes) julia&gt; @btime sum(skipmissing(Y1)); 13.816 ms (2 allocations: 32 bytes) julia&gt; @btime sum(skipmissing(Y2)); 18.254 ms (2 allocations: 32 bytes) julia&gt; @btime sum(skipmissing(Y3)); 28.430 ms (2 allocations: 32 bytes) "><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">mysum</span>(X) s <span class="pl-k">=</span> <span class="pl-c1">zero</span>(<span class="pl-c1">eltype</span>(X)) <span class="pl-c1">@inbounds</span> <span class="pl-c1">@simd</span> <span class="pl-k">for</span> x <span class="pl-k">in</span> X <span class="pl-k">if</span> x <span class="pl-k">!==</span> <span class="pl-c1">missing</span> s <span class="pl-k">+=</span> x <span class="pl-k">end</span> <span class="pl-k">end</span> s <span class="pl-k">end</span> <span class="pl-c"><span class="pl-c">#</span> With Vector{Int}</span> X1 <span class="pl-k">=</span> <span class="pl-c1">rand</span>(Int, <span class="pl-c1">10_000_000</span>); X2 <span class="pl-k">=</span> <span class="pl-c1">Vector</span><span class="pl-c1">{Union{Missing,Int}}</span>(X1); X3 <span class="pl-k">=</span> <span class="pl-c1">ifelse</span>.(<span class="pl-c1">rand</span>(<span class="pl-c1">length</span>(X2)) <span class="pl-k">.&lt;</span> <span class="pl-c1">0.9</span>, X2, <span class="pl-c1">missing</span>); julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">mysum</span>(X1); <span class="pl-c1">5.594</span> ms (<span class="pl-c1">1</span> allocation<span class="pl-k">:</span> <span class="pl-c1">16</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">mysum</span>(X2); <span class="pl-c1">5.791</span> ms (<span class="pl-c1">1</span> allocation<span class="pl-k">:</span> <span class="pl-c1">16</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">mysum</span>(X3); <span class="pl-c1">5.681</span> ms (<span class="pl-c1">1</span> allocation<span class="pl-k">:</span> <span class="pl-c1">16</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">sum</span>(<span class="pl-c1">skipmissing</span>(X1)); <span class="pl-c1">7.316</span> ms (<span class="pl-c1">2</span> allocations<span class="pl-k">:</span> <span class="pl-c1">32</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">sum</span>(<span class="pl-c1">skipmissing</span>(X2)); <span class="pl-c1">18.175</span> ms (<span class="pl-c1">2</span> allocations<span class="pl-k">:</span> <span class="pl-c1">32</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">sum</span>(<span class="pl-c1">skipmissing</span>(X3)); <span class="pl-c1">28.240</span> ms (<span class="pl-c1">2</span> allocations<span class="pl-k">:</span> <span class="pl-c1">32</span> bytes) <span class="pl-c"><span class="pl-c">#</span> With Vector{Float64}</span> Y1 <span class="pl-k">=</span> <span class="pl-c1">rand</span>(Float64, <span class="pl-c1">10_000_000</span>); Y2 <span class="pl-k">=</span> <span class="pl-c1">Vector</span><span class="pl-c1">{Union{Missing,Float64}}</span>(Y1); Y3 <span class="pl-k">=</span> <span class="pl-c1">ifelse</span>.(<span class="pl-c1">rand</span>(<span class="pl-c1">length</span>(Y2)) <span class="pl-k">.&lt;</span> <span class="pl-c1">0.9</span>, Y2, <span class="pl-c1">missing</span>); julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">mysum</span>(Y1); <span class="pl-c1">5.860</span> ms (<span class="pl-c1">1</span> allocation<span class="pl-k">:</span> <span class="pl-c1">16</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">mysum</span>(Y2); <span class="pl-c1">13.849</span> ms (<span class="pl-c1">1</span> allocation<span class="pl-k">:</span> <span class="pl-c1">16</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">mysum</span>(Y3); <span class="pl-c1">17.428</span> ms (<span class="pl-c1">1</span> allocation<span class="pl-k">:</span> <span class="pl-c1">16</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">sum</span>(<span class="pl-c1">skipmissing</span>(Y1)); <span class="pl-c1">13.816</span> ms (<span class="pl-c1">2</span> allocations<span class="pl-k">:</span> <span class="pl-c1">32</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">sum</span>(<span class="pl-c1">skipmissing</span>(Y2)); <span class="pl-c1">18.254</span> ms (<span class="pl-c1">2</span> allocations<span class="pl-k">:</span> <span class="pl-c1">32</span> bytes) julia<span class="pl-k">&gt;</span> <span class="pl-c1">@btime</span> <span class="pl-c1">sum</span>(<span class="pl-c1">skipmissing</span>(Y3)); <span class="pl-c1">28.430</span> ms (<span class="pl-c1">2</span> allocations<span class="pl-k">:</span> <span class="pl-c1">32</span> bytes) </pre></div>
<p dir="auto">Unfortunately, the impressive speed boosts that were made for Julia on Linux seem to have been lost in translation. On the same machine, I get ~0.6 secs on Linux vs. ~6 on Windows.</p>
0
<p dir="auto"><strong>Elasticsearch version</strong>: 5.0.0-alpha5<br> <strong>Plugins installed</strong>: []</p> <p dir="auto"><strong>JVM version</strong>: openjdk version "1.8.0_91"</p> <p dir="auto"><strong>OS version</strong>: Linux 4.4.0-28-generic <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="142524" data-permission-text="Title is private" data-url="https://github.com/elastic/elasticsearch/issues/47" data-hovercard-type="issue" data-hovercard-url="/elastic/elasticsearch/issues/47/hovercard" href="https://github.com/elastic/elasticsearch/issues/47">#47</a>-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux</p> <p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br> when trying to load template with command:<br> <code class="notranslate">curl -v -XPUT http://localhost:9200/_template/template_esb -d @/path/to/template_esb.json</code></p> <p dir="auto">I got empty response from server in case template file &gt;1024 bytes.<br> In ES I got:<br> <code class="notranslate">[2016-08-11 14:19:10,657][WARN ][http.netty4 ] [7o-5HeP] caught exception while handling client http traffic, closing connection [id: 0x83358c12, L:/127.0.0.1:9200 - R:/127.0.0.1:39434] java.lang.UnsupportedOperationException: unsupported message type: DefaultFullHttpResponse (expected: ByteBuf, FileRegion)</code></p> <p dir="auto">If I cut file to be less than 1024 bytes then template created successfully.<br> The same template works fine in 5.0.0-alpha1</p> <p dir="auto"><strong>Steps to reproduce</strong>:</p> <ol dir="auto"> <li>start ES</li> <li>prepare template file with size &gt;1024 bytes</li> <li>curl -XPUT <a href="http://localhost:9200/_template/template_esb" rel="nofollow">http://localhost:9200/_template/template_esb</a> -d @/path/to/template_esb.json</li> </ol> <p dir="auto"><strong>Provide logs (if relevant)</strong>:<br> <code class="notranslate">[2016-08-11 14:19:10,657][WARN ][http.netty4 ] [7o-5HeP] caught exception while handling client http traffic, closing connection [id: 0x83358c12, L:/127.0.0.1:9200 - R:/127.0.0.1:39434] java.lang.UnsupportedOperationException: unsupported message type: DefaultFullHttpResponse (expected: ByteBuf, FileRegion) at io.netty.channel.nio.AbstractNioByteChannel.filterOutboundMessage(AbstractNioByteChannel.java:260) at io.netty.channel.AbstractChannel$AbstractUnsafe.write(AbstractChannel.java:799) at io.netty.channel.DefaultChannelPipeline$HeadContext.write(DefaultChannelPipeline.java:1291) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:748) at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:811) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:824) at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:804) at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:841) at io.netty.handler.codec.MessageAggregator.decode(MessageAggregator.java:222) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:571) at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:474) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:428) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:398) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877) at java.lang.Thread.run(Thread.java:745)</code></p> <p dir="auto"><strong>Describe the feature</strong>:</p>
<p dir="auto">When using Netty4 HTTP transport type I have the following issue:</p> <h4 dir="auto">Netty4</h4> <p dir="auto">Starting master using <code class="notranslate">http.type: netty4</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bin/elasticsearch --E http.type=netty4"><pre class="notranslate"><code class="notranslate">bin/elasticsearch --E http.type=netty4 </code></pre></div> <p dir="auto">Creating a document with a medium size JSON document using cUrl (sample document is <a href="https://gist.github.com/tlrx/5df7b9fe79e076b98c731e07d877650d">here</a>):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -v -XPOST 'localhost:9200/samples/sample/0' -d '{ &quot;title&quot;:&quot;My awesome book&quot;, &quot;pages&quot;:456, &quot;price&quot;:27.99, &quot;timestamp&quot;:1428582942867, ..... 30 other fields... }'"><pre class="notranslate"><code class="notranslate">curl -v -XPOST 'localhost:9200/samples/sample/0' -d '{ "title":"My awesome book", "pages":456, "price":27.99, "timestamp":1428582942867, ..... 30 other fields... }' </code></pre></div> <p dir="auto">Here is the curl output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 9200 (#0) &gt; POST /samples/sample/0 HTTP/1.1 &gt; Host: localhost:9200 &gt; User-Agent: curl/7.47.0 &gt; Accept: */* &gt; Content-Length: 1681 &gt; Content-Type: application/x-www-form-urlencoded &gt; Expect: 100-continue &gt; * Empty reply from server * Connection #0 to host localhost left intact curl: (52) Empty reply from server"><pre class="notranslate"><code class="notranslate"> Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 9200 (#0) &gt; POST /samples/sample/0 HTTP/1.1 &gt; Host: localhost:9200 &gt; User-Agent: curl/7.47.0 &gt; Accept: */* &gt; Content-Length: 1681 &gt; Content-Type: application/x-www-form-urlencoded &gt; Expect: 100-continue &gt; * Empty reply from server * Connection #0 to host localhost left intact curl: (52) Empty reply from server </code></pre></div> <p dir="auto">And the elasticsearch logs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" [2016-08-05 17:46:13,354][WARN ][http.netty4 ] [UqG1hcq] caught exception while handling client http traffic, closing connection [id: 0x0ca9a8ca, L:/127.0.0.1:9200 - R:/127.0.0.1:43208] java.lang.UnsupportedOperationException: unsupported message type: DefaultFullHttpResponse (expected: ByteBuf, FileRegion) at io.netty.channel.nio.AbstractNioByteChannel.filterOutboundMessage(AbstractNioByteChannel.java:260) at io.netty.channel.AbstractChannel$AbstractUnsafe.write(AbstractChannel.java:799) at io.netty.channel.DefaultChannelPipeline$HeadContext.write(DefaultChannelPipeline.java:1291) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:748) at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:811) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:824) at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:804) at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:841) at io.netty.handler.codec.MessageAggregator.decode(MessageAggregator.java:222) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:571) at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:474) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:428) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:398) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877) at java.lang.Thread.run(Thread.java:745)"><pre class="notranslate"><code class="notranslate"> [2016-08-05 17:46:13,354][WARN ][http.netty4 ] [UqG1hcq] caught exception while handling client http traffic, closing connection [id: 0x0ca9a8ca, L:/127.0.0.1:9200 - R:/127.0.0.1:43208] java.lang.UnsupportedOperationException: unsupported message type: DefaultFullHttpResponse (expected: ByteBuf, FileRegion) at io.netty.channel.nio.AbstractNioByteChannel.filterOutboundMessage(AbstractNioByteChannel.java:260) at io.netty.channel.AbstractChannel$AbstractUnsafe.write(AbstractChannel.java:799) at io.netty.channel.DefaultChannelPipeline$HeadContext.write(DefaultChannelPipeline.java:1291) at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:748) at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:811) at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:824) at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:804) at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:841) at io.netty.handler.codec.MessageAggregator.decode(MessageAggregator.java:222) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:571) at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:474) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:428) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:398) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877) at java.lang.Thread.run(Thread.java:745) </code></pre></div> <p dir="auto">Update: as a workaround for users, forcing the <code class="notranslate">Expect</code> header to empty makes the request succeed:</p> <p dir="auto"><code class="notranslate">curl -v -H "Expect:" -XPOST 'localhost:9200/samples/sample/0' -d '...'</code></p> <h4 dir="auto">Netty3</h4> <p dir="auto">It works fine with <code class="notranslate">http.type: netty3</code></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bin/elasticsearch --E http.type=netty3"><pre class="notranslate"><code class="notranslate">bin/elasticsearch --E http.type=netty3 </code></pre></div> <p dir="auto">Creating the document:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="curl -v -XPOST 'localhost:9200/samples/sample/0' -d '{ &quot;title&quot;:&quot;My awesome book&quot;, &quot;pages&quot;:456, &quot;price&quot;:27.99, &quot;timestamp&quot;:1428582942867, ..... 30 other fields... }'"><pre class="notranslate"><code class="notranslate">curl -v -XPOST 'localhost:9200/samples/sample/0' -d '{ "title":"My awesome book", "pages":456, "price":27.99, "timestamp":1428582942867, ..... 30 other fields... }' </code></pre></div> <p dir="auto">Here is the curl output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 9200 (#0) &gt; POST /samples/sample/0 HTTP/1.1 &gt; Host: localhost:9200 &gt; User-Agent: curl/7.47.0 &gt; Accept: */* &gt; Content-Length: 1681 &gt; Content-Type: application/x-www-form-urlencoded &gt; Expect: 100-continue &gt; &lt; HTTP/1.1 100 Continue * We are completely uploaded and fine &lt; HTTP/1.1 201 Created &lt; Location: /samples/sample/0 &lt; Content-Type: application/json; charset=UTF-8 &lt; Content-Length: 142 &lt; * Connection #0 to host localhost left intact {&quot;_index&quot;:&quot;samples&quot;,&quot;_type&quot;:&quot;sample&quot;,&quot;_id&quot;:&quot;0&quot;,&quot;_version&quot;:1,&quot;result&quot;:&quot;created&quot;,&quot;_shards&quot;:{&quot;total&quot;:2,&quot;successful&quot;:1,&quot;failed&quot;:0},&quot;created&quot;:true}% "><pre class="notranslate"><code class="notranslate"> Note: Unnecessary use of -X or --request, POST is already inferred. * Trying 127.0.0.1... * Connected to localhost (127.0.0.1) port 9200 (#0) &gt; POST /samples/sample/0 HTTP/1.1 &gt; Host: localhost:9200 &gt; User-Agent: curl/7.47.0 &gt; Accept: */* &gt; Content-Length: 1681 &gt; Content-Type: application/x-www-form-urlencoded &gt; Expect: 100-continue &gt; &lt; HTTP/1.1 100 Continue * We are completely uploaded and fine &lt; HTTP/1.1 201 Created &lt; Location: /samples/sample/0 &lt; Content-Type: application/json; charset=UTF-8 &lt; Content-Length: 142 &lt; * Connection #0 to host localhost left intact {"_index":"samples","_type":"sample","_id":"0","_version":1,"result":"created","_shards":{"total":2,"successful":1,"failed":0},"created":true}% </code></pre></div>
1
<p dir="auto">Version 0.10.10</p> <p dir="auto">In previous versions formatting was adding space in anonymous function like this:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function() {}"><pre class="notranslate"><code class="notranslate">function() {} </code></pre></div> <p dir="auto">Became:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function () {}"><pre class="notranslate"><code class="notranslate">function () {} </code></pre></div> <p dir="auto">Now it works vice versa. Is there any way to configure it?</p>
<p dir="auto">Hi</p> <p dir="auto">I was wondering if there's any option to change the JavaScript code formatting rules used?</p> <p dir="auto">I'm a big fan of code formatting but when VS code formats my code to insert spaces after my anonymous function keywords then it can really upset people that I work with who have OCD.</p> <p dir="auto">And thanks for the continued efforts guys!</p>
1
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; a = rpad(&quot;\u2003&quot;, 5) &quot;  &quot; julia&gt; length(a) #4 in 0.4-dev, 5 in 0.3.7 4 julia&gt; map(x-&gt;convert(Uint32, x), collect(a)) #0.4-dev has one fewer space 4-element Array{UInt32,1}: 0x00002003 0x00000020 0x00000020 0x00000020 help?&gt; rpad search: rpad repeated macroexpand isdirpath tryparse normpath repmat repeat replace workspace realpath redisplay AbstractSparseArray Base.rpad(string, n, p) Make a string at least &quot;n&quot; characters long by padding on the right with copies of &quot;p&quot;. help?&gt; charwidth search: charwidth Base.charwidth(c) Gives the number of columns needed to print a character."><pre class="notranslate">julia<span class="pl-k">&gt;</span> a <span class="pl-k">=</span> <span class="pl-c1">rpad</span>(<span class="pl-s"><span class="pl-pds">"</span><span class="pl-cce">\u</span>2003<span class="pl-pds">"</span></span>, <span class="pl-c1">5</span>) <span class="pl-s"><span class="pl-pds">"</span>  <span class="pl-pds">"</span></span> julia<span class="pl-k">&gt;</span> <span class="pl-c1">length</span>(a) <span class="pl-c"><span class="pl-c">#</span>4 in 0.4-dev, 5 in 0.3.7</span> <span class="pl-c1">4</span> julia<span class="pl-k">&gt;</span> <span class="pl-c1">map</span>(x<span class="pl-k">-&gt;</span><span class="pl-c1">convert</span>(Uint32, x), <span class="pl-c1">collect</span>(a)) <span class="pl-c"><span class="pl-c">#</span>0.4-dev has one fewer space</span> <span class="pl-c1">4</span><span class="pl-k">-</span>element Array{UInt32,<span class="pl-c1">1</span>}<span class="pl-k">:</span> <span class="pl-c1">0x00002003</span> <span class="pl-c1">0x00000020</span> <span class="pl-c1">0x00000020</span> <span class="pl-c1">0x00000020</span> help?<span class="pl-k">&gt;</span> rpad search<span class="pl-k">:</span> rpad repeated macroexpand isdirpath tryparse normpath repmat repeat replace workspace realpath redisplay AbstractSparseArray Base<span class="pl-k">.</span><span class="pl-c1">rpad</span>(string, n, p) Make a string at least <span class="pl-s"><span class="pl-pds">"</span>n<span class="pl-pds">"</span></span> characters long by padding on the right with copies of <span class="pl-s"><span class="pl-pds">"</span>p<span class="pl-pds">"</span></span>. help?<span class="pl-k">&gt;</span> charwidth search<span class="pl-k">:</span> charwidth Base<span class="pl-k">.</span><span class="pl-c1">charwidth</span>(c) Gives the number of columns needed to print a character.</pre></div>
<p dir="auto">Julia compiles OpenBLAS to <code class="notranslate">libopenblas.so</code>. This may be a problem for calling libraries that link to a system <code class="notranslate">libopenblas.so</code>, because the runtime linker may substitute Julia's version instead. The problem is that Julia's version is compiled with a 64-bit interface, which is not the default, and so if an external library calls it expecting a 32-bit interface, a crash may result.</p> <p dir="auto">We encountered what appears to have been this problem n <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/alanedelman/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/alanedelman">@alanedelman</a>'s machine (julia.mit.edu). He recently started experiencing crashes in <code class="notranslate">PyPlot.plot</code> that, with the help of valgrind, I tracked down to apparently:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="==17855== Use of uninitialised value of size 8 ==17855== at 0xA8B6890: dgemm_beta_NEHALEM (in /home/edelman/julia/usr/lib/libopenblas.so) ==17855== by 0xA082D72: dgemm_nn (in /home/edelman/julia/usr/lib/libopenblas.so) ==17855== by 0x9F558C8: cblas_dgemm (in /home/edelman/julia/usr/lib/libopenblas.so) ==17855== by 0x16430CA5: dotblas_matrixproduct (_dotblas.c:809) ==17855== by 0x14BAB5D4: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0)"><pre class="notranslate"><code class="notranslate">==17855== Use of uninitialised value of size 8 ==17855== at 0xA8B6890: dgemm_beta_NEHALEM (in /home/edelman/julia/usr/lib/libopenblas.so) ==17855== by 0xA082D72: dgemm_nn (in /home/edelman/julia/usr/lib/libopenblas.so) ==17855== by 0x9F558C8: cblas_dgemm (in /home/edelman/julia/usr/lib/libopenblas.so) ==17855== by 0x16430CA5: dotblas_matrixproduct (_dotblas.c:809) ==17855== by 0x14BAB5D4: PyEval_EvalFrameEx (in /usr/lib/libpython2.7.so.1.0) </code></pre></div> <p dir="auto">Apparently, Matplotlib is calling OpenBLAS (via NumPy: <code class="notranslate">_dotblas.c</code> is a NumPy file) with the 32-bit interface, but is getting linked at runtime into Julia's openblas library, which is compiled with a 64-bit interface. Recompiling Julia and openblas with <code class="notranslate">USE_BLAS64=0</code> worked around the problem, but it would be better to avoid the conflict.</p> <p dir="auto">Can we just rename our <code class="notranslate">libopenblas.so</code> file to avoid any possible conflict in the runtime linker?</p>
0
<p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="294607323" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/10528" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/10528/hovercard" href="https://github.com/numpy/numpy/issues/10528">#10528</a>, but for <code class="notranslate">np.dtype</code> instead of <code class="notranslate">np.array</code></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import ctypes class PackedStructure(ctypes.Structure): _pack_ = 1 _fields_ = [ ('a', ctypes.c_uint8), ('b', ctypes.c_uint16) ] actual = np.dtype(PackedStructure) expected = np.dtype([ ('a', np.uint8), ('b', np.uint16) ])"><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">import</span> <span class="pl-s1">ctypes</span> <span class="pl-k">class</span> <span class="pl-v">PackedStructure</span>(<span class="pl-s1">ctypes</span>.<span class="pl-v">Structure</span>): <span class="pl-s1">_pack_</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span> <span class="pl-s1">_fields_</span> <span class="pl-c1">=</span> [ (<span class="pl-s">'a'</span>, <span class="pl-s1">ctypes</span>.<span class="pl-s1">c_uint8</span>), (<span class="pl-s">'b'</span>, <span class="pl-s1">ctypes</span>.<span class="pl-s1">c_uint16</span>) ] <span class="pl-s1">actual</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">dtype</span>(<span class="pl-v">PackedStructure</span>) <span class="pl-s1">expected</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">dtype</span>([ (<span class="pl-s">'a'</span>, <span class="pl-s1">np</span>.<span class="pl-s1">uint8</span>), (<span class="pl-s">'b'</span>, <span class="pl-s1">np</span>.<span class="pl-s1">uint16</span>) ])</pre></div>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Foo(ctypes.Structure): _fields_ = [('one', ctypes.c_uint8), ('two', ctypes.c_uint32)] _pack_ = 2"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Foo</span>(<span class="pl-s1">ctypes</span>.<span class="pl-v">Structure</span>): <span class="pl-s1">_fields_</span> <span class="pl-c1">=</span> [(<span class="pl-s">'one'</span>, <span class="pl-s1">ctypes</span>.<span class="pl-s1">c_uint8</span>), (<span class="pl-s">'two'</span>, <span class="pl-s1">ctypes</span>.<span class="pl-s1">c_uint32</span>)] <span class="pl-s1">_pack_</span> <span class="pl-c1">=</span> <span class="pl-c1">2</span></pre></div> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; ctypes.sizeof(Foo()) # packed to alignment 2 6 &gt;&gt;&gt; np.dtype(Foo).itemsize # default alignment incorrectly used 8"><pre class="notranslate"><span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">ctypes</span>.<span class="pl-en">sizeof</span>(<span class="pl-v">Foo</span>()) <span class="pl-c"># packed to alignment 2</span> <span class="pl-c1">6</span> <span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">np</span>.<span class="pl-en">dtype</span>(<span class="pl-v">Foo</span>).<span class="pl-s1">itemsize</span> <span class="pl-c"># default alignment incorrectly used</span> <span class="pl-c1">8</span></pre></div> <p dir="auto">Fix should be fairly straightforward by changing:</p> <p dir="auto"></p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/numpy/numpy/blob/44810f07ec6a281d96d6a69c105ce6ae59aec718/numpy/core/_dtype_ctypes.py#L35-L46">numpy/numpy/core/_dtype_ctypes.py</a> </p> <p class="mb-0 color-fg-muted"> Lines 35 to 46 in <a data-pjax="true" class="commit-tease-sha" href="/numpy/numpy/commit/44810f07ec6a281d96d6a69c105ce6ae59aec718">44810f0</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L35" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="35"></td> <td id="LC35" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">def</span> <span class="pl-en">_from_ctypes_structure</span>(<span class="pl-s1">t</span>): </td> </tr> <tr class="border-0"> <td id="L36" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="36"></td> <td id="LC36" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"># TODO: gh-10533, gh-10532</span> </td> </tr> <tr class="border-0"> <td id="L37" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="37"></td> <td id="LC37" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">fields</span> <span class="pl-c1">=</span> [] </td> </tr> <tr class="border-0"> <td id="L38" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="38"></td> <td id="LC38" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">for</span> <span class="pl-s1">item</span> <span class="pl-c1">in</span> <span class="pl-s1">t</span>.<span class="pl-s1">_fields_</span>: </td> </tr> <tr class="border-0"> <td id="L39" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="39"></td> <td id="LC39" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">if</span> <span class="pl-en">len</span>(<span class="pl-s1">item</span>) <span class="pl-c1">&gt;</span> <span class="pl-c1">2</span>: </td> </tr> <tr class="border-0"> <td id="L40" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="40"></td> <td id="LC40" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">raise</span> <span class="pl-v">TypeError</span>( </td> </tr> <tr class="border-0"> <td id="L41" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="41"></td> <td id="LC41" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">"ctypes bitfields have no dtype equivalent"</span>) </td> </tr> <tr class="border-0"> <td id="L42" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="42"></td> <td id="LC42" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">fname</span>, <span class="pl-s1">ftyp</span> <span class="pl-c1">=</span> <span class="pl-s1">item</span> </td> </tr> <tr class="border-0"> <td id="L43" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="43"></td> <td id="LC43" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">fields</span>.<span class="pl-en">append</span>((<span class="pl-s1">fname</span>, <span class="pl-en">dtype_from_ctypes_type</span>(<span class="pl-s1">ftyp</span>))) </td> </tr> <tr class="border-0"> <td id="L44" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="44"></td> <td id="LC44" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> </td> </tr> <tr class="border-0"> <td id="L45" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="45"></td> <td id="LC45" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-c"># by default, ctypes structs are aligned</span> </td> </tr> <tr class="border-0"> <td id="L46" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="46"></td> <td id="LC46" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-k">return</span> <span class="pl-s1">np</span>.<span class="pl-en">dtype</span>(<span class="pl-s1">fields</span>, <span class="pl-s1">align</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) </td> </tr> </tbody></table> </div> </div> <p></p>
1
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: v1.31</li> <li>Operating System: All</li> <li>Browser: All</li> </ul> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto"><strong>Config file</strong></p> <p dir="auto"><strong>Test file (self-contained)</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test as base } from '@playwright/test'; export const test = base.extend&lt;{ foo: never }&gt;({ foo: [ async ({}, use) =&gt; { // Some stuff here await use(); // TS error: Expected 1 arguments, but got 0. // Other stuff here }, { auto: true } ], });"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span> <span class="pl-k">as</span> <span class="pl-s1">base</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">test</span> <span class="pl-c1">=</span> <span class="pl-s1">base</span><span class="pl-kos">.</span><span class="pl-c1">extend</span><span class="pl-c1">&lt;</span><span class="pl-kos">{</span> <span class="pl-c1">foo</span>: <span class="pl-s1">never</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-c1">foo</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-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">use</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-c">// Some stuff here</span> <span class="pl-k">await</span> <span class="pl-s1">use</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// TS error: Expected 1 arguments, but got 0.</span> <span class="pl-c">// Other stuff here</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">auto</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-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">Allowing <code class="notranslate">use</code> to be called without arguments, as demonstrated in the docs under <a href="https://playwright.dev/docs/test-fixtures#automatic-fixtures" rel="nofollow">Automatic Fixtures</a>.</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto"><code class="notranslate">Expected 1 arguments, but got 0.</code></p>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.31.2]</li> </ul> <h3 dir="auto">Source code</h3> <p dir="auto">I am having trouble with TS errors when trying to use parameterized projects following the the <a href="https://playwright.dev/docs/test-parameterize#parameterized-projects" rel="nofollow">official documentation</a></p> <p dir="auto"><strong>Config file</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import type { defineConfig } from '@playwright/test'; import { TestOptions } from './my-test'; export default defineConfig({ projects: [ { name: 'alice', use: { person: 'Alice' }, } ] });"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">type</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-v">TestOptions</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./my-test'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">projects</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'alice'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> <span class="pl-c1">person</span>: <span class="pl-s">'Alice'</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></pre></div> <p dir="auto"><strong>Test file (self-contained)</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// my-test.ts import { test as base } from '@playwright/test'; export type TestOptions = { person: string; }; export const test = base.extend&lt;TestOptions&gt;({ // Define an option and provide a default value. // We can later override it in the config. person: ['John', { option: true }], });"><pre class="notranslate"><span class="pl-c">// my-test.ts</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span> <span class="pl-k">as</span> <span class="pl-s1">base</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-s1">type</span> <span class="pl-v">TestOptions</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">person</span>: <span class="pl-s1">string</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">const</span> <span class="pl-s1">test</span> <span class="pl-c1">=</span> <span class="pl-s1">base</span><span class="pl-kos">.</span><span class="pl-c1">extend</span><span class="pl-c1">&lt;</span><span class="pl-v">TestOptions</span><span class="pl-c1">&gt;</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c">// Define an option and provide a default value.</span> <span class="pl-c">// We can later override it in the config.</span> <span class="pl-c1">person</span>: <span class="pl-kos">[</span><span class="pl-s">'John'</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">option</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-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// example.spec.ts import { test } from './my-test'; test('test 1', async ({ person }) =&gt; { console.log(person) });"><pre class="notranslate"><span class="pl-c">// example.spec.ts</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'./my-test'</span><span class="pl-kos">;</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'test 1'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> person <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-s1">person</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>Steps</strong></p> <ol dir="auto"> <li> <p dir="auto">Open <code class="notranslate">playwright.config.ts</code> and notice the TypeScript error on <code class="notranslate">defineConfig</code> :<br> <code class="notranslate">TS1361: 'defineConfig' cannot be used as a value because it was imported using 'import type'.</code></p> </li> <li> <p dir="auto">Run the test and notice the following error:<br> <code class="notranslate">ReferenceError: defineConfig is not defined</code></p> </li> <li> <p dir="auto">Looking at other examples of Playwright documentation, it seems like that using the keyword <code class="notranslate">type</code> in the imports in <code class="notranslate">playwright.config.ts</code> is not necessary, so I remove that.</p> </li> <li> <p dir="auto">Now there is another TS error in <code class="notranslate">playwright.config.ts</code> on <code class="notranslate">person: 'Alice'</code>:</p> </li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="No overload matches this call. Overload 1 of 3, '(config: PlaywrightTestConfig&lt;{}, {}&gt;): PlaywrightTestConfig&lt;{}, {}&gt;', gave the following error. Type '{ person: string; }' is not assignable to type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;{}&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;{}&gt;&gt;'. Object literal may only specify known properties, and 'person' does not exist in type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;{}&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;{}&gt;&gt;'. Overload 2 of 3, '(config: PlaywrightTestConfig&lt;unknown, {}&gt;): PlaywrightTestConfig&lt;unknown, {}&gt;', gave the following error. Type '{ person: string; }' is not assignable to type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;unknown&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;{}&gt;&gt;'. Object literal may only specify known properties, and 'person' does not exist in type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;unknown&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;{}&gt;&gt;'. Overload 3 of 3, '(config: PlaywrightTestConfig&lt;unknown, unknown&gt;): PlaywrightTestConfig&lt;unknown, unknown&gt;', gave the following error. Type '{ person: string; }' is not assignable to type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;unknown&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;unknown&gt;&gt;'. "><pre class="notranslate"><code class="notranslate">No overload matches this call. Overload 1 of 3, '(config: PlaywrightTestConfig&lt;{}, {}&gt;): PlaywrightTestConfig&lt;{}, {}&gt;', gave the following error. Type '{ person: string; }' is not assignable to type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;{}&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;{}&gt;&gt;'. Object literal may only specify known properties, and 'person' does not exist in type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;{}&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;{}&gt;&gt;'. Overload 2 of 3, '(config: PlaywrightTestConfig&lt;unknown, {}&gt;): PlaywrightTestConfig&lt;unknown, {}&gt;', gave the following error. Type '{ person: string; }' is not assignable to type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;unknown&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;{}&gt;&gt;'. Object literal may only specify known properties, and 'person' does not exist in type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;unknown&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;{}&gt;&gt;'. Overload 3 of 3, '(config: PlaywrightTestConfig&lt;unknown, unknown&gt;): PlaywrightTestConfig&lt;unknown, unknown&gt;', gave the following error. Type '{ person: string; }' is not assignable to type 'UseOptions&lt;PlaywrightTestOptions &amp; CustomProperties&lt;unknown&gt;, PlaywrightWorkerOptions &amp; CustomProperties&lt;unknown&gt;&gt;'. </code></pre></div> <ol start="5" dir="auto"> <li>Try running the test again and notice that the parameterization is working, despite error in step 4.</li> </ol>
0
<p dir="auto">I couldn't find an existing tracking issue for this feature, please mark as a duplicate if I've missed anything.</p> <p dir="auto">This is something that would be required for jspm support in Babel CLI, where we'd want to use dynamic <code class="notranslate">import()</code> to reference plugins directly, and so would need some kind of promise support in the configuration.</p> <p dir="auto">Currently an asynchronous configuration gives the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Error: You appear to be using an async configuration, which your current version of Babel does not support. We may add support for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synchronously return your config."><pre class="notranslate"><code class="notranslate">Error: You appear to be using an async configuration, which your current version of Babel does not support. We may add support for this in the future, but if you're on the most recent version of @babel/core and still seeing this error, then you'll need to synchronously return your config. </code></pre></div> <p dir="auto">And an asynchronous plugin gives the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="You appear to be using an async plugin, which your current version of Babel does not support.If you're using a published plugin, you may need to upgrade your @babel/core version."><pre class="notranslate"><code class="notranslate">You appear to be using an async plugin, which your current version of Babel does not support.If you're using a published plugin, you may need to upgrade your @babel/core version. </code></pre></div> <p dir="auto">Either or both of these features would be really great to support.</p> <p dir="auto">The async plugin case effectively provides parity with top-level await workflows in future too. Happy to discuss further as well.</p>
<p dir="auto">Today I came across what looks like a bug.</p> <p dir="auto">If you try to destructure arguments to a function that's within an array it silently fails instead of giving a SyntaxError.</p> <p dir="auto">The failing code looks like:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const doesntCompileProperly = [ ...args =&gt; console.log(args) ];"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">doesntCompileProperly</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span> ...<span class="pl-s1">args</span> <span class="pl-c1">=&gt;</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">args</span><span class="pl-kos">)</span> <span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div> <p dir="auto">and compiles to:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var doesntCompileProperly = [].concat(_toConsumableArray(function (args) { return console.log(args); }));"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">doesntCompileProperly</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">concat</span><span class="pl-kos">(</span><span class="pl-en">_toConsumableArray</span><span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">args</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</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">args</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">Here's a link to a few other examples in the Babel repl: <a href="http://babeljs.io/repl/#?experimental=false&amp;evaluate=true&amp;loose=false&amp;spec=false&amp;code=const%20compilesAsExpected%20%3D%20%5B%0A%20%20%28...args%29%20%3D%3E%20console.log%28args%29%0A%5D%3B%0A%0Aconst%20doesntCompileProperly%20%3D%20%5B%0A%20%20...args%20%3D%3E%20console.log%28args%29%0A%5D%3B%0A%0A%2F%2F%20const%20syntaxErrorInObject%20%3D%20%7B%0A%2F%2F%20%20%20something%3A%20...args%20%3D%3E%20console.log%28args%29%0A%2F%2F%20%7D%3B%0A%0A%2F%2F%20const%20syntaxErrorByItself%20%3D%20...args%20%3D%3E%20console.log%28args%29" rel="nofollow">babeljs.io repl link</a></p>
0
<h3 dir="auto">Describe the workflow you want to enable</h3> <p dir="auto">Currently the GeneralizedLinearRegressor module only allows a scalar <code class="notranslate">alpha</code> regularization parameter to be used for all parameters. However, sometimes the modeler would like to input different amounts of regularization on certain parameters, either for interpretation or some other prior knowledge.</p> <h3 dir="auto">Describe your proposed solution</h3> <p dir="auto">The alpha parameter can take either a scalar value or an iterable of the same length as the number of parameters in the input matrix.</p> <p dir="auto">The optimization algorithm will then flow as normal with the line below in glm.py naturally doing a vector to vector dot product instead of a scalar vector multiplication.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="coef_scaled = alpha * coef[offset:]"><pre class="notranslate"><code class="notranslate">coef_scaled = alpha * coef[offset:] </code></pre></div> <p dir="auto">I believe the alpha parameter passed to <code class="notranslate">scipy.optimize.minimize</code> in the <code class="notranslate">args</code> parameter isn't being used anywhere.</p> <p dir="auto">For QA, I plan to output regression results in R or statsmodels for the same data and model specs</p> <h3 dir="auto">Describe alternatives you've considered, if relevant</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Additional context</h3> <p dir="auto">I modified this as part of my dayjob and also doing this as part of my programming work at my university. This is my first PR so please let me know if I'm missing anything.</p>
<h4 dir="auto">Description</h4> <p dir="auto">This is a feature request in allow flexibility in elastic net, which allows the user to apply separate penalties to each coefficient of the L1 term. The default value of this penalty factor is 1, meaning the regular elastic net behavior. If the penalty factor of a feature is Zero, it means it's not penalized at all, and that the user wants this feature to be always there in the model.</p> <p dir="auto">This feature is very useful in Bioinformatics and systems biology (that's why it is in Stanford's R package glmnet). With this feature, the user can run feature selection on a set of genes while making sure some genes stay in the system and not penalized (because of prior knowledge that they are involvid the system).</p> <p dir="auto">Here is glmnet documentation explaining the penalty factor. Mainly, it's controlling the selection weight on the lasso term:</p> <p dir="auto"><a href="https://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html#lin" rel="nofollow">https://web.stanford.edu/~hastie/glmnet/glmnet_alpha.html#lin</a></p> <p dir="auto">This feature is used in several papers, I've implemented in it in one of mine in scikit-learn. I've requests from other biologists to use this method in Python without having to recompile scikit-learn. I can do a pull request with this feature.</p> <p dir="auto">Papers using this feature:</p> <ul dir="auto"> <li>Altarawy, Doaa, Fatma-Elzahraa Eid, and Lenwood S. Heath. "PEAK: Integrating Curated and Noisy Prior Knowledge in Gene Regulatory Network Inference." Journal of Computational Biology 24.9 (2017): 863-873.</li> <li>Greenfield, Alex, Christoph Hafemeister, and Richard Bonneau. "Robust data-driven incorporation of prior knowledge into the inference of dynamic regulatory networks." Bioinformatics 29.8 (2013): 1060-1067.</li> <li>Friedman, Jerome, Trevor Hastie, and Rob Tibshirani. "Regularization paths for generalized linear models via coordinate descent." Journal of statistical software 33.1 (2010): 1.</li> </ul>
1
<p dir="auto">I'm setting up a <a href="http://kubernetes.io/v1.0/docs/getting-started-guides/docker-multinode.html" rel="nofollow">docker-multinode</a> k8s. I'm trying to mount a volume (in this case, a secret). Originally, I was getting this issue:<br> <code class="notranslate">Unable to mount volumes for pod "service-registry-eccye_default": exit status 32</code><br> I was on Slack yesterday, and <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cjcullen/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cjcullen">@cjcullen</a> pointed out that I should be running the kubelet with the <code class="notranslate">--containerized</code> flag. I have added it and restarted the server and now I'm having this error:<br> <code class="notranslate">Unable to mount volumes for pod "service-registry-4b682_default": fork/exec /nsenter: no such file or directory</code></p> <p dir="auto">It looks like this issue was brought up in the past (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="79865554" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/8734" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/8734/hovercard" href="https://github.com/kubernetes/kubernetes/issues/8734">#8734</a>), but never resolved.</p>
<p dir="auto">When I try to create a pod which mounts secret volumes I get a <code class="notranslate">Unable to mount volumes for pod: exit status 1</code> error. For instance, when trying to create the example pod from <a href="https://github.com/kubernetes/kubernetes/tree/master/docs/user-guide/secrets">https://github.com/kubernetes/kubernetes/tree/master/docs/user-guide/secrets</a> :</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ curl -s https://raw.githubusercontent.com/kubernetes/kubernetes/master/docs/user-guide/secrets/secret.yaml | kubectl create -f - secrets/test-secret $ curl -s https://raw.githubusercontent.com/kubernetes/kubernetes/master/docs/user-guide/secrets/secret-pod.yaml | kubectl create -f - pods/secret-test-pod $ kubectl describe pod secret-test-pod [...] Events: FirstSeen LastSeen Count From SubobjectPath Reason Message Fri, 30 Oct 2015 10:56:30 +0000 Fri, 30 Oct 2015 10:56:30 +0000 1 {scheduler } scheduled Successfully assigned secret-test-pod to 127.0.0.1 Fri, 30 Oct 2015 10:56:30 +0000 Fri, 30 Oct 2015 11:31:37 +0000 211 {kubelet 127.0.0.1} failedMount Unable to mount volumes for pod &quot;secret-test-pod_default&quot;: exit status 1 Fri, 30 Oct 2015 10:56:30 +0000 Fri, 30 Oct 2015 11:31:37 +0000 211 {kubelet 127.0.0.1} failedSync Error syncing pod, skipping: exit status 1"><pre class="notranslate"><code class="notranslate">$ curl -s https://raw.githubusercontent.com/kubernetes/kubernetes/master/docs/user-guide/secrets/secret.yaml | kubectl create -f - secrets/test-secret $ curl -s https://raw.githubusercontent.com/kubernetes/kubernetes/master/docs/user-guide/secrets/secret-pod.yaml | kubectl create -f - pods/secret-test-pod $ kubectl describe pod secret-test-pod [...] Events: FirstSeen LastSeen Count From SubobjectPath Reason Message Fri, 30 Oct 2015 10:56:30 +0000 Fri, 30 Oct 2015 10:56:30 +0000 1 {scheduler } scheduled Successfully assigned secret-test-pod to 127.0.0.1 Fri, 30 Oct 2015 10:56:30 +0000 Fri, 30 Oct 2015 11:31:37 +0000 211 {kubelet 127.0.0.1} failedMount Unable to mount volumes for pod "secret-test-pod_default": exit status 1 Fri, 30 Oct 2015 10:56:30 +0000 Fri, 30 Oct 2015 11:31:37 +0000 211 {kubelet 127.0.0.1} failedSync Error syncing pod, skipping: exit status 1 </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ kubectl get secrets NAME TYPE DATA default-token-vjaxy kubernetes.io/service-account-token 2 test-secret Opaque 2"><pre class="notranslate"><code class="notranslate">$ kubectl get secrets NAME TYPE DATA default-token-vjaxy kubernetes.io/service-account-token 2 test-secret Opaque 2 </code></pre></div> <p dir="auto">This is a single node containerized k8s cluster for local development (based on <a href="https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md">https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md</a> ).</p> <p dir="auto">Here is how I specifically create the cluster and the definition of the master pod: <a href="https://gist.github.com/2opremio/12eafc0c2485d8d13f2a">https://gist.github.com/2opremio/12eafc0c2485d8d13f2a</a></p> <p dir="auto">I am running Docker <code class="notranslate">version 1.8.2, build 0a8c2e3</code></p> <p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="112676337" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/16055" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/16055/hovercard" href="https://github.com/kubernetes/kubernetes/issues/16055">#16055</a> (I get a different error, though) and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="79865554" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/8734" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/8734/hovercard" href="https://github.com/kubernetes/kubernetes/issues/8734">#8734</a> (but I do provide the --contenerized flag see <a href="https://gist.github.com/2opremio/12eafc0c2485d8d13f2a#file-create_cluster-sh-L27">https://gist.github.com/2opremio/12eafc0c2485d8d13f2a#file-create_cluster-sh-L27</a> ) and and somehow similar to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="87107241" data-permission-text="Title is private" data-url="https://github.com/openshift/origin/issues/3072" data-hovercard-type="issue" data-hovercard-url="/openshift/origin/issues/3072/hovercard" href="https://github.com/openshift/origin/issues/3072">openshift/origin#3072</a></p>
1
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/sjudd/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/sjudd">@sjudd</a> Can I work on this?</p>
<p dir="auto">I'm using 4.0.0-RC0, I added it by Gradle:</p> <blockquote> <p dir="auto">repositories {<br>  mavenCentral() // jcenter() works as well because it pulls from Maven Central<br> }<br> dependencies {<br>  compile 'com.android.support:appcompat-v7:25.3.1'<br>  compile 'com.github.bumptech.glide:glide:4.0.0-RC0'<br>  compile 'com.android.support:support-v4:25.3.1'<br>  annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'<br> }</p> </blockquote> <p dir="auto">I followed the here: <a href="https://github.com/bumptech/glide/tree/master/samples/svg/src/main/java/com/bumptech/glide/samples/svg">https://github.com/bumptech/glide/tree/master/samples/svg/src/main/java/com/bumptech/glide/samples/svg</a><br> But when i try load SVG file to ImageView, i get error message: cannot resolve symbol 'GlideApp'<br> I think GlideApp class was not generated.<br> My source:</p> <blockquote> <p dir="auto">package com.example.quangson.glidesvg;<br> import android.graphics.Color;<br> import android.graphics.drawable.Drawable;<br> import android.support.v7.app.AppCompatActivity;<br> import android.os.Bundle;<br> import static com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions.withCrossFade;<br> import android.graphics.drawable.PictureDrawable;<br> import android.net.Uri;<br> import android.util.Log;<br> import android.view.View;<br> import android.view.ViewGroup;<br> import android.widget.ImageView;<br> import android.widget.LinearLayout;<br> import android.widget.TextView;<br> import com.bumptech.glide.RequestBuilder;<br> import com.caverock.androidsvg.SVGImageView;<br> import com.example.quangson.glidesvg.glide.SvgSoftwareLayerSetter;<br> public class MainActivity extends AppCompatActivity {<br>  private static final String TAG = "SVGActivity";<br>  private ImageView imageViewRes;<br>  private ImageView imageViewNet;<br>  private RequestBuilder requestBuilder;<br>  <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/OverRide/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/OverRide">@OverRide</a><br>  protected void onCreate(Bundle savedInstanceState) {<br>   super.onCreate(savedInstanceState);<br>   setContentView(R.layout.activity_main);<br>   imageViewRes = (ImageView) findViewById(R.id.svg_image_view1);<br>   imageViewNet = (ImageView) findViewById(R.id.svg_image_view2);<br>   requestBuilder = GlideApp.with(this)<br>     .as(PictureDrawable.class)<br>     .placeholder(R.drawable.image_loading)<br>     .error(R.drawable.image_error)<br>     .transition(withCrossFade())<br>     .listener(new SvgSoftwareLayerSetter());<br>   Uri uri = Uri.parse("<a href="http://www.clker.com/cliparts/u/Z/2/b/a/6/android-toy-h.svg" rel="nofollow">http://www.clker.com/cliparts/u/Z/2/b/a/6/android-toy-h.svg</a>");<br>   requestBuilder.load(uri).into(imageViewNet);<br>  }<br> }</p> </blockquote> <p dir="auto">How to generate GlideApp class?<br> Please help</p>
0
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">It crashes on Mac Osx.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib import pyplot as plt plt.figure()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-03-07 11:14:39.220 python[13951:2853154] -[QNSApplication _setup:]: unrecognized selector sent to instance 0x7fc9418afd10 2019-03-07 11:14:39.222 python[13951:2853154] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QNSApplication _setup:]: unrecognized selector sent to instance 0x7fc9418afd10' *** First throw call stack:"><pre class="notranslate"><code class="notranslate">2019-03-07 11:14:39.220 python[13951:2853154] -[QNSApplication _setup:]: unrecognized selector sent to instance 0x7fc9418afd10 2019-03-07 11:14:39.222 python[13951:2853154] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[QNSApplication _setup:]: unrecognized selector sent to instance 0x7fc9418afd10' *** First throw call stack: </code></pre></div> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: OSX 10.13.6</li> <li>Matplotlib version: 3.0.3</li> <li>Matplotlib backend (<code class="notranslate">TkAgg</code>):</li> <li>Python version: 3.6.5</li> <li>Jupyter version (if applicable):</li> <li>Other libraries:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I installed Matplotlib by pip"><pre class="notranslate"><code class="notranslate">I installed Matplotlib by pip </code></pre></div>
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto"><code class="notranslate">plt.plot()</code> fails with error</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="libc++abi.dylib: terminating with uncaught exception of type NSException"><pre class="notranslate"><code class="notranslate">libc++abi.dylib: terminating with uncaught exception of type NSException </code></pre></div> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib import pyplot as plt plt.plot()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>()</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-02-11 22:09:09.936 python[17037:389239] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fab105e6460 2019-02-11 22:09:09.937 python[17037:389239] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fab105e6460' *** First throw call stack: ( 0 CoreFoundation 0x00007fff43503ded __exceptionPreprocess + 256 1 libobjc.A.dylib 0x00007fff6f5cf720 objc_exception_throw + 48 2 CoreFoundation 0x00007fff43581195 -[NSObject(NSObject) __retain_OA] + 0 3 CoreFoundation 0x00007fff434a5a60 ___forwarding___ + 1486 4 CoreFoundation 0x00007fff434a5408 _CF_forwarding_prep_0 + 120 5 libtk8.6.dylib 0x0000000122c6531d TkpInit + 413 6 libtk8.6.dylib 0x0000000122bbd17e Initialize + 2622 7 _tkinter.cpython-37m-darwin.so 0x00000001229e5a0f _tkinter_create + 1183 8 python 0x000000010eb5a8b6 _PyMethodDef_RawFastCallKeywords + 230 9 python 0x000000010ec9ab47 call_function + 247 10 python 0x000000010ec98684 _PyEval_EvalFrameDefault + 45284 11 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 12 python 0x000000010eb59577 _PyFunction_FastCallDict + 231 13 python 0x000000010ebdd0b1 slot_tp_init + 193 14 python 0x000000010ebe7091 type_call + 241 15 python 0x000000010eb5a283 _PyObject_FastCallKeywords + 179 16 python 0x000000010ec9abe4 call_function + 404 17 python 0x000000010ec98778 _PyEval_EvalFrameDefault + 45528 18 python 0x000000010eb5a078 function_code_fastcall + 120 19 python 0x000000010ec9aafe call_function + 174 20 python 0x000000010ec98684 _PyEval_EvalFrameDefault + 45284 21 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 22 python 0x000000010eb59577 _PyFunction_FastCallDict + 231 23 python 0x000000010eb5d4a2 method_call + 130 24 python 0x000000010eb5aef2 PyObject_Call + 130 25 python 0x000000010ec988cf _PyEval_EvalFrameDefault + 45871 26 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 27 python 0x000000010eb5a783 _PyFunction_FastCallKeywords + 195 28 python 0x000000010ec9aafe call_function + 174 29 python 0x000000010ec986bf _PyEval_EvalFrameDefault + 45343 30 python 0x000000010eb5a078 function_code_fastcall + 120 31 python 0x000000010ec9aafe call_function + 174 32 python 0x000000010ec986bf _PyEval_EvalFrameDefault + 45343 33 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 34 python 0x000000010eb5a783 _PyFunction_FastCallKeywords + 195 35 python 0x000000010ec9aafe call_function + 174 36 python 0x000000010ec986bf _PyEval_EvalFrameDefault + 45343 37 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 38 python 0x000000010eb5a783 _PyFunction_FastCallKeywords + 195 39 python 0x000000010ec9aafe call_function + 174 40 python 0x000000010ec98684 _PyEval_EvalFrameDefault + 45284 41 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 42 python 0x000000010ecf0c40 PyRun_FileExFlags + 256 43 python 0x000000010ecf00b7 PyRun_SimpleFileExFlags + 391 44 python 0x000000010ed1c7ec pymain_main + 9564 45 python 0x000000010eb2ca9d main + 125 46 libdyld.dylib 0x00007fff7069ded9 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException"><pre class="notranslate"><code class="notranslate">2019-02-11 22:09:09.936 python[17037:389239] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fab105e6460 2019-02-11 22:09:09.937 python[17037:389239] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fab105e6460' *** First throw call stack: ( 0 CoreFoundation 0x00007fff43503ded __exceptionPreprocess + 256 1 libobjc.A.dylib 0x00007fff6f5cf720 objc_exception_throw + 48 2 CoreFoundation 0x00007fff43581195 -[NSObject(NSObject) __retain_OA] + 0 3 CoreFoundation 0x00007fff434a5a60 ___forwarding___ + 1486 4 CoreFoundation 0x00007fff434a5408 _CF_forwarding_prep_0 + 120 5 libtk8.6.dylib 0x0000000122c6531d TkpInit + 413 6 libtk8.6.dylib 0x0000000122bbd17e Initialize + 2622 7 _tkinter.cpython-37m-darwin.so 0x00000001229e5a0f _tkinter_create + 1183 8 python 0x000000010eb5a8b6 _PyMethodDef_RawFastCallKeywords + 230 9 python 0x000000010ec9ab47 call_function + 247 10 python 0x000000010ec98684 _PyEval_EvalFrameDefault + 45284 11 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 12 python 0x000000010eb59577 _PyFunction_FastCallDict + 231 13 python 0x000000010ebdd0b1 slot_tp_init + 193 14 python 0x000000010ebe7091 type_call + 241 15 python 0x000000010eb5a283 _PyObject_FastCallKeywords + 179 16 python 0x000000010ec9abe4 call_function + 404 17 python 0x000000010ec98778 _PyEval_EvalFrameDefault + 45528 18 python 0x000000010eb5a078 function_code_fastcall + 120 19 python 0x000000010ec9aafe call_function + 174 20 python 0x000000010ec98684 _PyEval_EvalFrameDefault + 45284 21 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 22 python 0x000000010eb59577 _PyFunction_FastCallDict + 231 23 python 0x000000010eb5d4a2 method_call + 130 24 python 0x000000010eb5aef2 PyObject_Call + 130 25 python 0x000000010ec988cf _PyEval_EvalFrameDefault + 45871 26 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 27 python 0x000000010eb5a783 _PyFunction_FastCallKeywords + 195 28 python 0x000000010ec9aafe call_function + 174 29 python 0x000000010ec986bf _PyEval_EvalFrameDefault + 45343 30 python 0x000000010eb5a078 function_code_fastcall + 120 31 python 0x000000010ec9aafe call_function + 174 32 python 0x000000010ec986bf _PyEval_EvalFrameDefault + 45343 33 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 34 python 0x000000010eb5a783 _PyFunction_FastCallKeywords + 195 35 python 0x000000010ec9aafe call_function + 174 36 python 0x000000010ec986bf _PyEval_EvalFrameDefault + 45343 37 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 38 python 0x000000010eb5a783 _PyFunction_FastCallKeywords + 195 39 python 0x000000010ec9aafe call_function + 174 40 python 0x000000010ec98684 _PyEval_EvalFrameDefault + 45284 41 python 0x000000010ec8c2d2 _PyEval_EvalCodeWithName + 418 42 python 0x000000010ecf0c40 PyRun_FileExFlags + 256 43 python 0x000000010ecf00b7 PyRun_SimpleFileExFlags + 391 44 python 0x000000010ed1c7ec pymain_main + 9564 45 python 0x000000010eb2ca9d main + 125 46 libdyld.dylib 0x00007fff7069ded9 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException </code></pre></div> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: macOS 10.14.3 (Mojave)</li> <li>Matplotlib version: 3.0.2</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): TkAgg</li> <li>Python version: 3.7.1</li> </ul> <p dir="auto"><code class="notranslate">miniconda</code> installed using the <a href="https://docs.conda.io/en/latest/miniconda.html" rel="nofollow">bash script</a> (version 4.6.3).</p> <p dir="auto">Python environment created with <code class="notranslate">conda</code>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="conda create -n py37 python=3.7 conda activate py37"><pre class="notranslate"><code class="notranslate">conda create -n py37 python=3.7 conda activate py37 </code></pre></div> <p dir="auto"><code class="notranslate">matrplotlib</code> installed using conda</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="conda install matplotlib"><pre class="notranslate"><code class="notranslate">conda install matplotlib </code></pre></div> <p dir="auto">The same error is obtained in the <code class="notranslate">base</code> environment (<code class="notranslate">matrplotlib</code> installed in the same way). Everything installed from a fresh <code class="notranslate">miniconda</code> installation, using the default channel.</p> <p dir="auto">I've seen a bunch of open/closed similar issues, but none seem to solve the problem.</p>
1
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/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 flow errors</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">Internal error: merge_job exception: Utils_js.Key_not_found("LeaderHeap", "/my_project/node_modules/material-ui/styles/index.js.flow") Raised at file "map.ml", line 122, characters 16-25</p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li>npm install flow-bin@latest</li> <li>change Atom Nuclide settings to Use the Flow binary included in each project's flow bin</li> <li>open any Atom .js file in your flow project that imports from material-ui</li> <li>see diagnostics panel for error</li> </ol> <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.0-beta.6</td> </tr> <tr> <td>React</td> <td>^15.5.4</td> </tr> <tr> <td>browser</td> <td>Chrome</td> </tr> <tr> <td>flow-bin</td> <td>^0.56.0</td> </tr> </tbody> </table>
<ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> 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 want the color and font of the text in the header row of the table to be editable in material-ui 0.19.4.</p> <h2 dir="auto">Current Behavior</h2> <p dir="auto">I found the headerStyle property to change the default style but it doesn't seem to work.Can anyone suggest the properties in headerStyle that has to be overridden to make this requirement work. Sample codes would help..my sample code: <a href="https://stackblitz.com/edit/react-emfcf1?file=TableComponent.js" rel="nofollow">https://stackblitz.com/edit/react-emfcf1?file=TableComponent.js</a></p> <h2 dir="auto">Steps to Reproduce (for bugs)</h2> <ol dir="auto"> <li></li> <li></li> <li></li> <li></li> </ol> <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>0.19.4</td> </tr> <tr> <td>React</td> <td>15.6.1</td> </tr> <tr> <td>browser</td> <td></td> </tr> <tr> <td>etc</td> <td></td> </tr> </tbody> </table>
0
<p dir="auto">Hi, guys!<br> This is actually a duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="5680068" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/4958" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/4958/hovercard" href="https://github.com/symfony/symfony/issues/4958">#4958</a> and the issue description could be found there.<br> But the problem still exists.<br> Why after upgrading to symfony-2.1.0-beta4 aliasing of classes stopped working?<br> More about environment:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="PHP 5.4.4-2 (cli) (built: Jun 20 2012 09:52:11) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies with XCache v2.0.0, Copyright (c) 2005-2012, by mOo"><pre class="notranslate">PHP 5.4.4-2 (cli) (built: Jun 20 2012 09:52:11) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies with XCache v2.0.0, Copyright (c) 2005-2012, by mOo</pre></div>
<p dir="auto">Now paths to files with translations adds when container compiles <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L407">https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L407</a> . Sometimes needed change way to locate translation file, for example when there are themes, wich can override translations from bundle.</p>
0
<p dir="auto">Currently making a Cypher request over the REST API returns results as nested arrays that contain maps instead of just an array of maps. This makes it harder to decode. I currently read the entire response and then do string replaces to fix it up before decoding it. If the format was more standard (especially if I could get the desired results shown below) I could easily do a streaming decode which would be a lot more efficient.</p> <p dir="auto">MATCH (u:User)<br> RETURN {name: u.name, email: u.email} AS r</p> <p dir="auto">Actual Results</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;columns&quot;: [&quot;r&quot;], &quot;data&quot;:[ [{&quot;name&quot;:&quot;foo&quot;, &quot;email&quot;: &quot;[email protected]&quot;}], [{&quot;name&quot;:&quot;bat&quot;, &quot;email&quot;: &quot;[email protected]&quot;}] // note the extra brackets ] }"><pre class="notranslate"><code class="notranslate">{ "columns": ["r"], "data":[ [{"name":"foo", "email": "[email protected]"}], [{"name":"bat", "email": "[email protected]"}] // note the extra brackets ] } </code></pre></div> <p dir="auto">Expected Results</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{ &quot;columns&quot;: [&quot;r&quot;], &quot;data&quot;:[ {&quot;name&quot;:&quot;foo&quot;, &quot;email&quot;: &quot;[email protected]&quot;}, {&quot;name&quot;:&quot;bat&quot;, &quot;email&quot;: &quot;[email protected]&quot;} ] }"><pre class="notranslate"><code class="notranslate">{ "columns": ["r"], "data":[ {"name":"foo", "email": "[email protected]"}, {"name":"bat", "email": "[email protected]"} ] } </code></pre></div> <p dir="auto">Desired results:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ {&quot;name&quot;:&quot;foo&quot;, &quot;email&quot;: &quot;[email protected]&quot;}, {&quot;name&quot;:&quot;bat&quot;, &quot;email&quot;: &quot;[email protected]&quot;} ]"><pre class="notranslate"><code class="notranslate">[ {"name":"foo", "email": "[email protected]"}, {"name":"bat", "email": "[email protected]"} ] </code></pre></div> <p dir="auto">Is there any way to get to the expected or desired results with Cypher 2.0?</p>
<p dir="auto">Suppose I have this node:</p> <p dir="auto">(n:person {name: "Bob Smith", city: "Boston"})-[:brother]-(n:person {name: "Dave Smith"})</p> <p dir="auto">and this node:</p> <p dir="auto">(n:person {name: "Bob Smith", haircolor: "brown"})-[:brother]-(n:person {name: "Frank Smith"})</p> <p dir="auto">It would be great to have an automatic way of combining them, to get:</p> <p dir="auto">(n:person {name: "Frank Smith"})-[:brother]-(n:person {name: "Bob Smith", city: "Boston", haircolor:"brown"})-[:brother]-(n:person {name: "Dave Smith"})</p> <p dir="auto">Right now I'm doing this manually, by taking one node's properties and relationships, inserting them with MERGE into the other node, and then deleting the redundant first node, but this is clunky and requires multiple round-trips between neo4j and the server. One person suggested using MERGE to avoid duplicates, but unfortunately I can only detect them with a complex machine learning algorithm, so there's no real way to screen them out in advance.</p> <p dir="auto">Relevant StackOverflow thread: <a href="http://stackoverflow.com/questions/23376881/neo4j-merge-2-or-multiple-duplicate-nodes" rel="nofollow">http://stackoverflow.com/questions/23376881/neo4j-merge-2-or-multiple-duplicate-nodes</a></p>
0
<p dir="auto">We recently added a <a href="http://scikit-learn.org/dev/glossary.html" rel="nofollow">Glossary</a> to our documentation, which describes common parameters among other things. We should now replace descriptions of <code class="notranslate">random_state</code> parameters to make them more concise and informative (see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="286625544" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/10415" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/10415/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/10415">#10415</a>). For example, instead of</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" random_state : int, RandomState instance or None, optional, default: None If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by `np.random`."><pre class="notranslate"><code class="notranslate"> random_state : int, RandomState instance or None, optional, default: None If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by `np.random`. </code></pre></div> <p dir="auto">in both KMeans and MiniBatchKMeans, we might have:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="KMeans: random_state : int, RandomState instance, default=None Determines random number generation for centroid initialization. Pass an int for reproducible results across multiple function calls. See :term:`Glossary &lt;random_state&gt;`. MiniBatchKMeans: random_state : int, RandomState instance, default=None Determines random number generation for centroid initialization and random reassignment. Pass an int for reproducible results across multiple function calls. See :term:`Glossary &lt;random_state&gt;`."><pre class="notranslate"><code class="notranslate">KMeans: random_state : int, RandomState instance, default=None Determines random number generation for centroid initialization. Pass an int for reproducible results across multiple function calls. See :term:`Glossary &lt;random_state&gt;`. MiniBatchKMeans: random_state : int, RandomState instance, default=None Determines random number generation for centroid initialization and random reassignment. Pass an int for reproducible results across multiple function calls. See :term:`Glossary &lt;random_state&gt;`. </code></pre></div> <p dir="auto"><strong>Therefore, the description should focus on what is the impact of <code class="notranslate">random_state</code> on the algorithm.</strong></p> <p dir="auto">Contributors interested in contributing this change should take on one module at a time, initially.</p> <p dir="auto">The list of estimators to be modified is the following:</p> <p dir="auto">List of files to modify using <a href="https://github.com/kwinata">kwinata</a> <a href="https://github.com/scikit-learn/scikit-learn/issues/14228#issuecomment-534841015" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/14228/hovercard">script</a></p> <ul class="contains-task-list"> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/dummy.py">sklearn/dummy.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/dummy.py#L59">59</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/multioutput.py">sklearn/multioutput.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/multioutput.py#L578">578</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/multioutput.py#L738">738</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/kernel_approximation.py">sklearn/kernel_approximation.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/kernel_approximation.py#L41">41</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/kernel_approximation.py#L143">143</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/kernel_approximation.py#L470">470</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/multiclass.py">sklearn/multiclass.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/multiclass.py#L687">687</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/random_projection.py">sklearn/random_projection.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/random_projection.py#L178">178</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/random_projection.py#L245">245</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/random_projection.py#L464">464</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/random_projection.py#L586">586</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_extraction/image.py">sklearn/feature_extraction/image.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_extraction/image.py#L368">368</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_extraction/image.py#L502">502</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/random.py">sklearn/utils/random.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/random.py#L39">39</a> open <a href="https://github.com/scikit-learn/scikit-learn/pull/15576" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/15576/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/extmath.py">sklearn/utils/extmath.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/extmath.py#L185">185</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/extmath.py#L297">297</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py">sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py#L736">736</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_hist_gradient_boosting/gradient_boosting.py#L918">918</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_hist_gradient_boosting/binning.py">sklearn/ensemble/_hist_gradient_boosting/binning.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_hist_gradient_boosting/binning.py#L37">37</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_hist_gradient_boosting/binning.py#L112">112</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_bagging.py">sklearn/ensemble/_bagging.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_bagging.py#L503">503</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_bagging.py#L902">902</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_gb.py">sklearn/ensemble/_gb.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_gb.py#L887">887</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_gb.py#L1360">1360</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_forest.py">sklearn/ensemble/_forest.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_forest.py#L965">965</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_forest.py#L1282">1282</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_forest.py#L1559">1559</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_forest.py#L1868">1868</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_forest.py#L2103">2103</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_iforest.py">sklearn/ensemble/_iforest.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_iforest.py#L109">109</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_base.py">sklearn/ensemble/_base.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_base.py#L52">52</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_weight_boosting.py">sklearn/ensemble/_weight_boosting.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_weight_boosting.py#L188">188</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_weight_boosting.py#L324">324</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_weight_boosting.py#L479">479</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_weight_boosting.py#L900">900</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/ensemble/_weight_boosting.py#L1022">1022</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_truncated_svd.py">sklearn/decomposition/_truncated_svd.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_truncated_svd.py#L59">59</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11902" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11902/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_kernel_pca.py">sklearn/decomposition/_kernel_pca.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_kernel_pca.py#L79">79</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11902" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11902/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_dict_learning.py">sklearn/decomposition/_dict_learning.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_dict_learning.py#L364">364</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_dict_learning.py#L485">485</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_dict_learning.py#L692">692</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_dict_learning.py#L1135">1135</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_dict_learning.py#L1325">1325</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11902" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11902/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_fastica.py">sklearn/decomposition/_fastica.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_fastica.py#L205">205</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_fastica.py#L344">344</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11902" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11902/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_nmf.py">sklearn/decomposition/_nmf.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_nmf.py#L290">290</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_nmf.py#L475">475</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_nmf.py#L966">966</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_nmf.py#L1159">1159</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11902" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11902/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_pca.py">sklearn/decomposition/_pca.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_pca.py#L192">192</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11902" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11902/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_sparse_pca.py">sklearn/decomposition/_sparse_pca.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_sparse_pca.py#L82">82</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_sparse_pca.py#L285">285</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11902" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11902/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_lda.py">sklearn/decomposition/_lda.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_lda.py#L60">60</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_lda.py#L79">79</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_lda.py#L225">225</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11902" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11902/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_factor_analysis.py">sklearn/decomposition/_factor_analysis.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/decomposition/_factor_analysis.py#L92">92</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11902" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11902/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_kmeans.py">sklearn/cluster/_kmeans.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_kmeans.py#L56">56</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_kmeans.py#L241">241</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_kmeans.py#L380">380</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_kmeans.py#L583">583</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_kmeans.py#L700">700</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_kmeans.py#L1150">1150</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_kmeans.py#L1370">1370</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_spectral.py">sklearn/cluster/_spectral.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_spectral.py#L41">41</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_spectral.py#L197">197</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_spectral.py#L313">313</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_bicluster.py">sklearn/cluster/_bicluster.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_bicluster.py#L236">236</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_bicluster.py#L383">383</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_mean_shift.py">sklearn/cluster/_mean_shift.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/cluster/_mean_shift.py#L48">48</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/preprocessing/_data.py">sklearn/preprocessing/_data.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/preprocessing/_data.py#L2178">2178</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/preprocessing/_data.py#L2607">2607</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/impute/_iterative.py">sklearn/impute/_iterative.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/impute/_iterative.py#L125">125</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_ransac.py">sklearn/linear_model/_ransac.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_ransac.py#L152">152</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11900" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11900/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_coordinate_descent.py">sklearn/linear_model/_coordinate_descent.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_coordinate_descent.py#L580">580</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_coordinate_descent.py#L860">860</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_coordinate_descent.py#L1313">1313</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_coordinate_descent.py#L1487">1487</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_coordinate_descent.py#L1665">1665</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_coordinate_descent.py#L1851">1851</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_coordinate_descent.py#L2016">2016</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_coordinate_descent.py#L2192">2192</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11900" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11900/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_sag.py">sklearn/linear_model/_sag.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_sag.py#L154">154</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11900" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11900/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_perceptron.py">sklearn/linear_model/_perceptron.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_perceptron.py#L55">55</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11900" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11900/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_passive_aggressive.py">sklearn/linear_model/_passive_aggressive.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_passive_aggressive.py#L76">76</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_passive_aggressive.py#L322">322</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11900" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11900/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_logistic.py">sklearn/linear_model/_logistic.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_logistic.py#L587">587</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_logistic.py#L924">924</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_logistic.py#L1100">1100</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_logistic.py#L1658">1658</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/15729" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/15729/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_base.py">sklearn/linear_model/_base.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_base.py#L65">65</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_stochastic_gradient.py">sklearn/linear_model/_stochastic_gradient.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_stochastic_gradient.py#L369">369</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_stochastic_gradient.py#L811">811</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_stochastic_gradient.py#L1419">1419</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11900" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11900/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_theil_sen.py">sklearn/linear_model/_theil_sen.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_theil_sen.py#L243">243</a> Open <a href="https://github.com/scikit-learn/scikit-learn/pull/11900" data-hovercard-type="pull_request" data-hovercard-url="/scikit-learn/scikit-learn/pull/11900/hovercard">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_ridge.py">sklearn/linear_model/_ridge.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_ridge.py#L325">325</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_ridge.py#L693">693</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/_ridge.py#L853">853</a> Open <a href="#15728">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/_classes.py">sklearn/tree/_classes.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/_classes.py#L653">653</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/_classes.py#L1033">1033</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/_classes.py#L1322">1322</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/_classes.py#L1552">1552</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_selection/_mutual_info.py">sklearn/feature_selection/_mutual_info.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_selection/_mutual_info.py#L226">226</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_selection/_mutual_info.py#L335">335</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/feature_selection/_mutual_info.py#L414">414</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/metrics/cluster/_unsupervised.py">sklearn/metrics/cluster/_unsupervised.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/metrics/cluster/_unsupervised.py#L80">80</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/_classes.py">sklearn/svm/_classes.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/_classes.py#L90">90</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/_classes.py#L312">312</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/_classes.py#L546">546</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/_classes.py#L752">752</a> Open <a href="#15300">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/_base.py">sklearn/svm/_base.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/svm/_base.py#L853">853</a> Open <a href="#15300">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/inspection/_permutation_importance.py">sklearn/inspection/_permutation_importance.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/inspection/_permutation_importance.py#L81">81</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/gaussian_process/_gpr.py">sklearn/gaussian_process/_gpr.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/gaussian_process/_gpr.py#L109">109</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/gaussian_process/_gpr.py#L382">382</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/gaussian_process/_gpc.py">sklearn/gaussian_process/_gpc.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/gaussian_process/_gpc.py#L110">110</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/gaussian_process/_gpc.py#L537">537</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_spectral_embedding.py">sklearn/manifold/_spectral_embedding.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_spectral_embedding.py#L171">171</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_spectral_embedding.py#L387">387</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_locally_linear.py">sklearn/manifold/_locally_linear.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_locally_linear.py#L146">146</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_locally_linear.py#L252">252</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_locally_linear.py#L584">584</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_t_sne.py">sklearn/manifold/_t_sne.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_t_sne.py#L558">558</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_mds.py">sklearn/manifold/_mds.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_mds.py#L51">51</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_mds.py#L198">198</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/manifold/_mds.py#L314">314</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/_testing.py">sklearn/utils/_testing.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/_testing.py#L521">521</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/__init__.py">sklearn/utils/<strong>init</strong>.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/__init__.py#L478">478</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/utils/__init__.py#L623">623</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_kddcup99.py">sklearn/datasets/_kddcup99.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_kddcup99.py#L79">79</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_covtype.py">sklearn/datasets/_covtype.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_covtype.py#L69">69</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_rcv1.py">sklearn/datasets/_rcv1.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_rcv1.py#L114">114</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py">sklearn/datasets/_samples_generator.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L127">127</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L323">323</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L440">440</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L531">531</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L618">618</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L688">688</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L767">767</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L904">904</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L965">965</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1030">1030</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1106">1106</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1159">1159</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1218">1218</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1258">1258</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1307">1307</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1368">1368</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1420">1420</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1483">1483</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1571">1571</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_samples_generator.py#L1662">1662</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_olivetti_faces.py">sklearn/datasets/_olivetti_faces.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_olivetti_faces.py#L64">64</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_base.py">sklearn/datasets/_base.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_base.py#L157">157</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_twenty_newsgroups.py">sklearn/datasets/_twenty_newsgroups.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/datasets/_twenty_newsgroups.py#L187">187</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/mixture/_bayesian_mixture.py">sklearn/mixture/_bayesian_mixture.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/mixture/_bayesian_mixture.py#L166">166</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/mixture/_base.py">sklearn/mixture/_base.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/mixture/_base.py#L139">139</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/mixture/_gaussian_mixture.py">sklearn/mixture/_gaussian_mixture.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/mixture/_gaussian_mixture.py#L504">504</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_validation.py">sklearn/model_selection/_validation.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_validation.py#L1006">1006</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_validation.py#L1176">1176</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py">sklearn/model_selection/_split.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py#L382">382</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py#L588">588</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py#L1091">1091</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py#L1196">1196</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py#L1250">1250</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py#L1390">1390</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py#L1492">1492</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py#L1605">1605</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_split.py#L2049">2049</a> Open <a href="#15575">PR</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_search.py">sklearn/model_selection/_search.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_search.py#L207">207</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/model_selection/_search.py#L1299">1299</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/neural_network/_multilayer_perceptron.py">sklearn/neural_network/_multilayer_perceptron.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/neural_network/_multilayer_perceptron.py#L782">782</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/neural_network/_multilayer_perceptron.py#L1174">1174</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/neural_network/_rbm.py">sklearn/neural_network/_rbm.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/neural_network/_rbm.py#L59">59</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/neighbors/_kde.py">sklearn/neighbors/_kde.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/neighbors/_kde.py#L233">233</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/neighbors/_nca.py">sklearn/neighbors/_nca.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/neighbors/_nca.py#L112">112</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/covariance/_robust_covariance.py">sklearn/covariance/_robust_covariance.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/covariance/_robust_covariance.py#L63">63</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/covariance/_robust_covariance.py#L233">233</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/covariance/_robust_covariance.py#L328">328</a>, <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/covariance/_robust_covariance.py#L545">545</a></p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/covariance/_elliptic_envelope.py">sklearn/covariance/_elliptic_envelope.py</a> - <a href="https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/covariance/_elliptic_envelope.py#L40">40</a></p> </li> </ul>
<h4 dir="auto">Description</h4> <p dir="auto">With TSNE from sklearn v0.19.2 python 3.6 with mahalanobis metric I am getting following error<br> ValueError: Must provide either V or VI for Mahalanobis distance<br> How to provide an <strong>method_parameters</strong> for the Mahalanobis distance?</p> <h4 dir="auto">Steps/Code to Reproduce</h4> <p dir="auto">from sklearn.manifold import TSNE<br> tsne = TSNE( verbose=1, perplexity=40, n_iter=250,learning_rate=50, random_state=0,metric='mahalanobis')<br> pt=data.sample(frac=0.1).values<br> tsne_results = tsne.fit_transform(pt)</p> <h4 dir="auto">Expected Results</h4> <p dir="auto">no error and metricless calculation:)</p>
0
<p dir="auto"><em>Please make sure that this is a bug. 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:bug_template</em></p> <p dir="auto"><strong>System information</strong></p> <ul dir="auto"> <li> <p dir="auto">Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No</p> </li> <li> <p dir="auto">OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04</p> </li> <li> <p dir="auto">Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:</p> </li> <li> <p dir="auto">TensorFlow installed from (source or binary): binary</p> </li> <li> <p dir="auto">TensorFlow version (use command below): r1.13</p> </li> <li> <p dir="auto">Python version: 3.6</p> </li> <li> <p dir="auto">Bazel version (if compiling from source):</p> </li> <li> <p dir="auto">GCC/Compiler version (if compiling from source):</p> </li> <li> <p dir="auto">CUDA/cuDNN version:</p> </li> <li> <p dir="auto">GPU model and memory:</p> </li> </ul> <p dir="auto">You can collect some of this information using our environment capture<br> <a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">script</a><br> You can also obtain the TensorFlow version with: 1. TF 1.0: <code class="notranslate">python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"</code> 2. TF 2.0: <code class="notranslate">python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"</code></p> <p dir="auto"><strong>Describe the current behavior</strong></p> <p dir="auto">I have created <code class="notranslate">.tflite</code> with single <code class="notranslate">ADD</code> op. It has two inputs and one output.<br> When reading this <code class="notranslate">.tflite</code> with interpreter(e.g. <code class="notranslate">tensorflow.lite.python</code>)</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import sys import numpy as np from tensorflow.lite.python import interpreter as interpreter_wrapper interpreter = interpreter_wrapper.Interpreter(model_path=sys.argv[1]) interpreter.allocate_tensors() input_details = interpreter.get_input_details() output_details = interpreter.get_output_details() print(input_details) print(output_details)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">sys</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">tensorflow</span>.<span class="pl-s1">lite</span>.<span class="pl-s1">python</span> <span class="pl-k">import</span> <span class="pl-s1">interpreter</span> <span class="pl-k">as</span> <span class="pl-s1">interpreter_wrapper</span> <span class="pl-s1">interpreter</span> <span class="pl-c1">=</span> <span class="pl-s1">interpreter_wrapper</span>.<span class="pl-v">Interpreter</span>(<span class="pl-s1">model_path</span><span class="pl-c1">=</span><span class="pl-s1">sys</span>.<span class="pl-s1">argv</span>[<span class="pl-c1">1</span>]) <span class="pl-s1">interpreter</span>.<span class="pl-en">allocate_tensors</span>() <span class="pl-s1">input_details</span> <span class="pl-c1">=</span> <span class="pl-s1">interpreter</span>.<span class="pl-en">get_input_details</span>() <span class="pl-s1">output_details</span> <span class="pl-c1">=</span> <span class="pl-s1">interpreter</span>.<span class="pl-en">get_output_details</span>() <span class="pl-en">print</span>(<span class="pl-s1">input_details</span>) <span class="pl-en">print</span>(<span class="pl-s1">output_details</span>)</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[{'name': 'input0', 'index': 0, 'shape': array([2, 5], dtype=int32), 'dtype': &lt;class 'numpy.float32'&gt;, 'quantization': (0.0, 0)}, {'name': 'input1', 'index': 1, 'shape': array([2, 5], dtype=int32), 'dtype': &lt;class 'numpy.float32'&gt;, 'quantization': (0.0, 0)}] [{'name': 'output0', 'index': 2, 'shape': array([2, 5], dtype=int32), 'dtype': &lt;class 'numpy.float32'&gt;, 'quantization': (0.0, 0)}, {'name': 'output0', 'index': 2, 'shape': array([2, 5], dtype=int32), 'dtype': &lt;class 'numpy.float32'&gt;, 'quantization': (0.0, 0)}]"><pre class="notranslate"><code class="notranslate">[{'name': 'input0', 'index': 0, 'shape': array([2, 5], dtype=int32), 'dtype': &lt;class 'numpy.float32'&gt;, 'quantization': (0.0, 0)}, {'name': 'input1', 'index': 1, 'shape': array([2, 5], dtype=int32), 'dtype': &lt;class 'numpy.float32'&gt;, 'quantization': (0.0, 0)}] [{'name': 'output0', 'index': 2, 'shape': array([2, 5], dtype=int32), 'dtype': &lt;class 'numpy.float32'&gt;, 'quantization': (0.0, 0)}, {'name': 'output0', 'index': 2, 'shape': array([2, 5], dtype=int32), 'dtype': &lt;class 'numpy.float32'&gt;, 'quantization': (0.0, 0)}] </code></pre></div> <p dir="auto">Code using C++ interpreter also reports duplicated outputs(2 2), even though outout of ADD(builtin code 0) shows one output.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Interpreter has 3 tensors and 1 nodes Inputs: 0 1 Outputs: 2 2 Tensor 0 input0 kTfLiteFloat32 kTfLiteArenaRw 40 bytes ( 0.0 MB) 2 5 Tensor 1 input1 kTfLiteFloat32 kTfLiteArenaRw 40 bytes ( 0.0 MB) 2 5 Tensor 2 output0 kTfLiteFloat32 kTfLiteArenaRw 40 bytes ( 0.0 MB) 2 5 Node 0 Operator Builtin Code 0 Inputs: 0 1 Outputs: 2"><pre class="notranslate"><code class="notranslate">Interpreter has 3 tensors and 1 nodes Inputs: 0 1 Outputs: 2 2 Tensor 0 input0 kTfLiteFloat32 kTfLiteArenaRw 40 bytes ( 0.0 MB) 2 5 Tensor 1 input1 kTfLiteFloat32 kTfLiteArenaRw 40 bytes ( 0.0 MB) 2 5 Tensor 2 output0 kTfLiteFloat32 kTfLiteArenaRw 40 bytes ( 0.0 MB) 2 5 Node 0 Operator Builtin Code 0 Inputs: 0 1 Outputs: 2 </code></pre></div> <p dir="auto"><strong>Describe the expected behavior</strong></p> <p dir="auto"><code class="notranslate">get_output_details()</code> returns unique list of outputs.</p> <p dir="auto"><strong>Code to reproduce the issue</strong></p> <p dir="auto">Use attached <code class="notranslate">.tflite</code> file to reproduce the issue.</p> <p dir="auto"><a href="https://github.com/tensorflow/tensorflow/files/3124805/add.tflite.zip">add.tflite.zip</a></p>
<p dir="auto">Installed nightly build using</p> <blockquote> <p dir="auto">pip3 install tensorflow-1.1.0rc0-cp35-cp35m-win_amd64.whl<br> on Windows 7 Professional x64. Simple run gives warning that the libs were not compiled to use SSE, SSE2, SSE3, SSE4.1, SSE4.2 and AVX instructions even though available.</p> </blockquote> <p dir="auto">c:\python<br> Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32<br> Type "help", "copyright", "credits" or "license" for more information.</p> <blockquote> <blockquote> <blockquote> <p dir="auto">import tensorflow as tf<br> print( tf.<strong>version</strong>)<br> 1.1.0-rc0<br> hello = tf.constant('Hello, TensorFlow!')<br> sess = tf.Session()<br> 2017-03-30 15:20:06.126686: W c:\tf_jenkins\home\workspace\nightly-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_<br> tions, but these are available on your machine and could speed up CPU computations.<br> &lt;<br> print(sess.run(hello))<br> b'Hello, TensorFlow!'</p> </blockquote> </blockquote> </blockquote>
0
<p dir="auto">In a few documentation places<br> <a href="http://getbootstrap.com/css/#helper-classes-clearfix" rel="nofollow">http://getbootstrap.com/css/#helper-classes-clearfix</a><br> <a href="http://getbootstrap.com/css/#less-mixins-vendor" rel="nofollow">http://getbootstrap.com/css/#less-mixins-vendor</a> (scroll to Transformation)<br> and a few more</p> <p dir="auto">a curly bracket is highlighted with red by using class="err"</p> <p dir="auto">Sounds like a bug in {% highlight css %}</p>
<p dir="auto">Just like less code in <a href="http://getbootstrap.com/css/#grid-less" rel="nofollow">CSS#Less Mixins</a></p> <p dir="auto">It should be less format, not css format.</p> <p dir="auto">But I can't find the html template with a <code class="notranslate">{ highlight less }</code> format.</p> <p dir="auto">Here are the screenshots.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/d0d6feac90153ad05c43b1dc48dbb8f8704c8e550a091693bd59348f1e7962e6/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3230363834382f313831303632312f32643833343232382d366532642d313165332d386263362d3339623965363266383232332e706e67"><img src="https://camo.githubusercontent.com/d0d6feac90153ad05c43b1dc48dbb8f8704c8e550a091693bd59348f1e7962e6/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3230363834382f313831303632312f32643833343232382d366532642d313165332d386263362d3339623965363266383232332e706e67" alt="2013-12-26 8 55 49" data-canonical-src="https://f.cloud.github.com/assets/206848/1810621/2d834228-6e2d-11e3-8bc6-39b9e62f8223.png" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/89d0e58b489de7665b9fb7b85a22d5870d469bf793b14f4f5d15ad2370cbac6f/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3230363834382f313831303632322f32643833383736612d366532642d313165332d383832302d3964346261383836633836622e706e67"><img src="https://camo.githubusercontent.com/89d0e58b489de7665b9fb7b85a22d5870d469bf793b14f4f5d15ad2370cbac6f/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3230363834382f313831303632322f32643833383736612d366532642d313165332d383832302d3964346261383836633836622e706e67" alt="2013-12-26 8 56 11" data-canonical-src="https://f.cloud.github.com/assets/206848/1810622/2d83876a-6e2d-11e3-8820-9d4ba886c86b.png" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/d954d264be755e76321c5af4cfb3c096cab3ff93ddbc92ef725ee7c700a7c6c6/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3230363834382f313831303632332f32643836666132362d366532642d313165332d393439352d6430613062353064323831312e706e67"><img src="https://camo.githubusercontent.com/d954d264be755e76321c5af4cfb3c096cab3ff93ddbc92ef725ee7c700a7c6c6/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f3230363834382f313831303632332f32643836666132362d366532642d313165332d393439352d6430613062353064323831312e706e67" alt="2013-12-26 8 56 25" data-canonical-src="https://f.cloud.github.com/assets/206848/1810623/2d86fa26-6e2d-11e3-9495-d0a0b50d2811.png" style="max-width: 100%;"></a></p>
1
<ul dir="auto"> <li>VSCode Version: 0.10.11</li> <li>OS Version: Fedora 23, 64bit</li> </ul> <p dir="auto">It would be great if there's an option for (auto-completion):</p> <ul dir="auto"> <li>Pressing <kbd>Tab</kbd> will replace the rest.</li> <li>Pressing <kbd>Enter</kbd> will insert into current caret position.</li> </ul> <p dir="auto">Or vice-versa.</p> <p dir="auto">Thanks,</p>
<ul dir="auto"> <li>VSCode Version: 1.4.0</li> <li>OS Version: Windows 10</li> </ul> <p dir="auto">Steps to Reproduce:</p> <ol dir="auto"> <li>Create a method called <code class="notranslate">methodOne</code></li> <li>Write some code that calls this method as <code class="notranslate">methodTwo()</code></li> <li>Place the cursor between the <code class="notranslate">d</code> and <code class="notranslate">T</code> and invoke completion</li> <li>Select <code class="notranslate">methodOne</code> from the completion list</li> </ol> <p dir="auto">You would expect <code class="notranslate">methodTwo</code> to be replaced with <code class="notranslate">methodOne</code> but you end up with <code class="notranslate">methodOneTwo</code>.</p>
1
<h3 dir="auto">Apache Airflow version</h3> <p dir="auto">2.5.3</p> <h3 dir="auto">What happened</h3> <p dir="auto">Pleas consider the following scenario</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from typing import TYPE_CHECKING if TYPE_CHECKING: from my_package import MyClass @task def foo(a: int, b: str, c: &quot;MyClass&quot;): pass"><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">if</span> <span class="pl-v">TYPE_CHECKING</span>: <span class="pl-k">from</span> <span class="pl-s1">my_package</span> <span class="pl-k">import</span> <span class="pl-v">MyClass</span> <span class="pl-en">@<span class="pl-s1">task</span></span> <span class="pl-k">def</span> <span class="pl-en">foo</span>(<span class="pl-s1">a</span>: <span class="pl-s1">int</span>, <span class="pl-s1">b</span>: <span class="pl-s1">str</span>, <span class="pl-s1">c</span>: <span class="pl-s">"MyClass"</span>): <span class="pl-k">pass</span></pre></div> <p dir="auto">In this case, the DAG parsing will fail with a NameError from the <code class="notranslate">_infer_multiple_outputs</code> method of <code class="notranslate">_TaskDecorator</code> class in <code class="notranslate">airflow/decorators/base.py</code>.</p> <p dir="auto">Please note that this is a common pattern when managing multiple tasks with varying dependencies and docker containers, and <code class="notranslate">my_package</code> might not be available in some of them.</p> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto">The problem relies in the following method using typing_extensions.get_type_hints:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@multiple_outputs.default def _infer_multiple_outputs(self): try: return_type = typing_extensions.get_type_hints(self.function).get(&quot;return&quot;, Any) except TypeError: # Can't evaluate return type. return False ttype = getattr(return_type, &quot;__origin__&quot;, return_type) return ttype == dict or ttype == Dict"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">multiple_outputs</span>.<span class="pl-s1">default</span></span> <span class="pl-k">def</span> <span class="pl-en">_infer_multiple_outputs</span>(<span class="pl-s1">self</span>): <span class="pl-k">try</span>: <span class="pl-s1">return_type</span> <span class="pl-c1">=</span> <span class="pl-s1">typing_extensions</span>.<span class="pl-en">get_type_hints</span>(<span class="pl-s1">self</span>.<span class="pl-s1">function</span>).<span class="pl-en">get</span>(<span class="pl-s">"return"</span>, <span class="pl-v">Any</span>) <span class="pl-k">except</span> <span class="pl-v">TypeError</span>: <span class="pl-c"># Can't evaluate return type.</span> <span class="pl-k">return</span> <span class="pl-c1">False</span> <span class="pl-s1">ttype</span> <span class="pl-c1">=</span> <span class="pl-en">getattr</span>(<span class="pl-s1">return_type</span>, <span class="pl-s">"__origin__"</span>, <span class="pl-s1">return_type</span>) <span class="pl-k">return</span> <span class="pl-s1">ttype</span> <span class="pl-c1">==</span> <span class="pl-s1">dict</span> <span class="pl-c1">or</span> <span class="pl-s1">ttype</span> <span class="pl-c1">==</span> <span class="pl-v">Dict</span></pre></div> <p dir="auto">which will result in the following error at DAG parse time:<br> <code class="notranslate">E NameError: name 'MyClass' is not defined</code></p> <p dir="auto">To fix this, the method could just use the <code class="notranslate">__annotations__</code> attribute of <code class="notranslate">self.function</code> instead which does not complain about the existence of the annotated types, like so:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="@multiple_outputs.default def _infer_multiple_outputs(self): try: return_type = self.function.__annotations__.get(&quot;return&quot;, Any) except TypeError: # Can't evaluate return type. return False ttype = getattr(return_type, &quot;__origin__&quot;, return_type) return ttype == dict or ttype == Dict"><pre class="notranslate"><span class="pl-en">@<span class="pl-s1">multiple_outputs</span>.<span class="pl-s1">default</span></span> <span class="pl-k">def</span> <span class="pl-en">_infer_multiple_outputs</span>(<span class="pl-s1">self</span>): <span class="pl-k">try</span>: <span class="pl-s1">return_type</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">function</span>.<span class="pl-s1">__annotations__</span>.<span class="pl-en">get</span>(<span class="pl-s">"return"</span>, <span class="pl-v">Any</span>) <span class="pl-k">except</span> <span class="pl-v">TypeError</span>: <span class="pl-c"># Can't evaluate return type.</span> <span class="pl-k">return</span> <span class="pl-c1">False</span> <span class="pl-s1">ttype</span> <span class="pl-c1">=</span> <span class="pl-en">getattr</span>(<span class="pl-s1">return_type</span>, <span class="pl-s">"__origin__"</span>, <span class="pl-s1">return_type</span>) <span class="pl-k">return</span> <span class="pl-s1">ttype</span> <span class="pl-c1">==</span> <span class="pl-s1">dict</span> <span class="pl-c1">or</span> <span class="pl-s1">ttype</span> <span class="pl-c1">==</span> <span class="pl-v">Dict</span></pre></div> <p dir="auto">This should work fine since we are interested in the return type annotation anyway.</p> <p dir="auto">One quick fix for the programmers having this issue could simply be to add an <code class="notranslate">else</code> clause to their <code class="notranslate">if TYPE_CHECKING</code> statement, like so:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if TYPE_CHECKING: from my_package import MyClass else: from typing import Any as MyClass"><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-v">TYPE_CHECKING</span>: <span class="pl-k">from</span> <span class="pl-s1">my_package</span> <span class="pl-k">import</span> <span class="pl-v">MyClass</span> <span class="pl-k">else</span>: <span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">Any</span> <span class="pl-k">as</span> <span class="pl-v">MyClass</span></pre></div> <h3 dir="auto">How to reproduce</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from airflow.annotations import task from typing import TYPE_CHECKING if TYPE_CHECKING: from my_package import MyClass @task def foo(a: int, b: str, c: &quot;MyClass&quot;): pass"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">annotations</span> <span class="pl-k">import</span> <span class="pl-s1">task</span> <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">if</span> <span class="pl-v">TYPE_CHECKING</span>: <span class="pl-k">from</span> <span class="pl-s1">my_package</span> <span class="pl-k">import</span> <span class="pl-v">MyClass</span> <span class="pl-en">@<span class="pl-s1">task</span></span> <span class="pl-k">def</span> <span class="pl-en">foo</span>(<span class="pl-s1">a</span>: <span class="pl-s1">int</span>, <span class="pl-s1">b</span>: <span class="pl-s1">str</span>, <span class="pl-s1">c</span>: <span class="pl-s">"MyClass"</span>): <span class="pl-k">pass</span></pre></div> <h3 dir="auto">Operating System</h3> <p dir="auto">Linux Mint 21</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Deployment</h3> <p dir="auto">Official Apache Airflow Helm Chart</p> <h3 dir="auto">Deployment details</h3> <p dir="auto"><em>No response</em></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" checked=""> 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">Apache Airflow version</h3> <p dir="auto">2.5.1</p> <h3 dir="auto">What happened</h3> <p dir="auto">When using the TaskFlow API, I like to generally keep a good practice of adding type annotations in the TaskFlow functions so others reading the DAG and task code have better context around inputs/outputs, keep imports solely used for typing behind <code class="notranslate">typing.TYPE_CHECKING</code>, and utilize PEP 563 for forwarding annotation evaluations. Unfortunately, when using <del>PEP 563 <em>and</em> <code class="notranslate">TYPE_CHECKING</code></del> just TYPE_CHECKING, DAG import errors occur with a "NameError: is not defined." exception.</p> <h3 dir="auto">What you think should happen instead</h3> <p dir="auto">Users should be free to use <del>PEP 563 and</del> <code class="notranslate">TYPE_CHECKING</code> when using the TaskFlow API and not hit DAG import errors along the way.</p> <h3 dir="auto">How to reproduce</h3> <p dir="auto">Using a straightforward use case of transforming a DataFrame, let's assume this toy example:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from __future__ import annotations from typing import TYPE_CHECKING, Any from pendulum import datetime from airflow.decorators import dag, task if TYPE_CHECKING: from pandas import DataFrame @dag(start_date=datetime(2023, 1, 1), schedule=None) def multiple_outputs(): @task() def transform(df: DataFrame) -&gt; dict[str, Any]: ... transform() multiple_outputs()"><pre class="notranslate"><span class="pl-k">from</span> __future__ <span class="pl-k">import</span> <span class="pl-s1">annotations</span> <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-v">Any</span> <span class="pl-k">from</span> <span class="pl-s1">pendulum</span> <span class="pl-k">import</span> <span class="pl-s1">datetime</span> <span class="pl-k">from</span> <span class="pl-s1">airflow</span>.<span class="pl-s1">decorators</span> <span class="pl-k">import</span> <span class="pl-s1">dag</span>, <span class="pl-s1">task</span> <span class="pl-k">if</span> <span class="pl-v">TYPE_CHECKING</span>: <span class="pl-k">from</span> <span class="pl-s1">pandas</span> <span class="pl-k">import</span> <span class="pl-v">DataFrame</span> <span class="pl-en">@<span class="pl-en">dag</span>(<span class="pl-s1">start_date</span><span class="pl-c1">=</span><span class="pl-en">datetime</span>(<span class="pl-c1">2023</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>), <span class="pl-s1">schedule</span><span class="pl-c1">=</span><span class="pl-c1">None</span>)</span> <span class="pl-k">def</span> <span class="pl-en">multiple_outputs</span>(): <span class="pl-en">@<span class="pl-en">task</span>()</span> <span class="pl-k">def</span> <span class="pl-en">transform</span>(<span class="pl-s1">df</span>: <span class="pl-v">DataFrame</span>) <span class="pl-c1">-&gt;</span> <span class="pl-s1">dict</span>[<span class="pl-s1">str</span>, <span class="pl-v">Any</span>]: ... <span class="pl-en">transform</span>() <span class="pl-en">multiple_outputs</span>()</pre></div> <p dir="auto">Add this DAG to your DAGS_FOLDER and the following import error should be observed:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/48934154/217713685-ec29d5cc-4a48-4049-8dfa-56cbd76cddc3.png"><img width="641" alt="image" src="https://user-images.githubusercontent.com/48934154/217713685-ec29d5cc-4a48-4049-8dfa-56cbd76cddc3.png" style="max-width: 100%;"></a></p> <h3 dir="auto">Operating System</h3> <p dir="auto">Debian GNU/Linux</p> <h3 dir="auto">Versions of Apache Airflow Providers</h3> <p dir="auto">apache-airflow-providers-amazon==6.2.0<br> apache-airflow-providers-apache-hive==5.1.1<br> apache-airflow-providers-apache-livy==3.2.0<br> apache-airflow-providers-celery==3.1.0<br> apache-airflow-providers-cncf-kubernetes==5.1.1<br> apache-airflow-providers-common-sql==1.3.3<br> apache-airflow-providers-databricks==4.0.0<br> apache-airflow-providers-dbt-cloud==2.3.1<br> apache-airflow-providers-elasticsearch==4.3.3<br> apache-airflow-providers-ftp==3.3.0<br> apache-airflow-providers-google==8.8.0<br> apache-airflow-providers-http==4.1.1<br> apache-airflow-providers-imap==3.1.1<br> apache-airflow-providers-microsoft-azure==5.1.0<br> apache-airflow-providers-postgres==5.4.0<br> apache-airflow-providers-redis==3.1.0<br> apache-airflow-providers-sftp==4.2.1<br> apache-airflow-providers-snowflake==4.0.2<br> apache-airflow-providers-sqlite==3.3.1<br> apache-airflow-providers-ssh==3.4.0<br> astronomer-providers==1.14.0</p> <h3 dir="auto">Deployment</h3> <p dir="auto">Astronomer</p> <h3 dir="auto">Deployment details</h3> <p dir="auto">OOTB local Airflow install with LocalExecutor built with the Astro CLI.</p> <h3 dir="auto">Anything else</h3> <ul dir="auto"> <li>This behavior/error was not observed using Airflow 2.4.3.</li> <li>As a workaround, <code class="notranslate">multiple_outputs</code> can be explicitly set on the TaskFlow function to skip the inferral.</li> </ul> <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" checked=""> 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>
1
<p dir="auto">I think we should add support for that.<br> Though it's still tricky when using it in grid-search because that requires a custom scorer (via make_scorer) every time :-/</p>
<p dir="auto">to reproduce:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np np.random.seed(13) classes = np.array(['yes', 'no']) y = classes[np.random.randint(2, size=10)] t = classes[np.random.randint(2, size=10)] from sklearn.metrics import roc_auc_score from sklearn.metrics import accuracy_score roc_auc_score(t, y)"><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-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">seed</span>(<span class="pl-c1">13</span>) <span class="pl-s1">classes</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-s">'yes'</span>, <span class="pl-s">'no'</span>]) <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">classes</span>[<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">2</span>, <span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)] <span class="pl-s1">t</span> <span class="pl-c1">=</span> <span class="pl-s1">classes</span>[<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randint</span>(<span class="pl-c1">2</span>, <span class="pl-s1">size</span><span class="pl-c1">=</span><span class="pl-c1">10</span>)] <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">metrics</span> <span class="pl-k">import</span> <span class="pl-s1">roc_auc_score</span> <span class="pl-k">from</span> <span class="pl-s1">sklearn</span>.<span class="pl-s1">metrics</span> <span class="pl-k">import</span> <span class="pl-s1">accuracy_score</span> <span class="pl-en">roc_auc_score</span>(<span class="pl-s1">t</span>, <span class="pl-s1">y</span>)</pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ValueError: Data is not binary and pos_label is not specified"><pre class="notranslate"><code class="notranslate">ValueError: Data is not binary and pos_label is not specified </code></pre></div>
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> I have a <code class="notranslate">. browserlistrc</code> file that contains the <code class="notranslate">defaults</code> query. I don't have <code class="notranslate">targets</code> option defined in babel-preset-env options. With that setup, the preset includes 148 core-js imports.</p> <p dir="auto">If I change this setup and define the <code class="notranslate">targets</code> option to <code class="notranslate">defaults</code> I would expect the output to be the same. It is not. The preset includes 129 core-js imports.</p> <p dir="auto">Note that this happens only with the <code class="notranslate">defaults</code> query. If I target for instance <code class="notranslate">Chrome 75</code>, both setups work the same.</p> <p dir="auto"><strong>Input Code</strong><br> See:<br> <a href="https://github.com/htulipe/bug-babel-preset-env">https://github.com/htulipe/bug-babel-preset-env</a></p> <p dir="auto">In <code class="notranslate">lib</code> you'll find a file compiled without the <code class="notranslate">targets</code> option and another with the option defined.</p> <p dir="auto"><strong>Expected behavior/code</strong></p> <p dir="auto">I would expect that defining <code class="notranslate">defaults</code> in .browserslistrc or in the preset options to ouput the same result.</p> <p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong></p> <p dir="auto">See sample repo</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 10.15.2 Binaries: Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node Yarn: 1.21.1 - /usr/local/bin/yarn npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm npmPackages: @babel/cli: ^7.7.7 =&gt; 7.7.7 @babel/core: ^7.7.7 =&gt; 7.7.7 @babel/preset-env: ^7.7.7 =&gt; 7.7.7"><pre class="notranslate"><code class="notranslate"> System: OS: macOS 10.15.2 Binaries: Node: 12.13.1 - ~/.nvm/versions/node/v12.13.1/bin/node Yarn: 1.21.1 - /usr/local/bin/yarn npm: 6.12.1 - ~/.nvm/versions/node/v12.13.1/bin/npm npmPackages: @babel/cli: ^7.7.7 =&gt; 7.7.7 @babel/core: ^7.7.7 =&gt; 7.7.7 @babel/preset-env: ^7.7.7 =&gt; 7.7.7 </code></pre></div>
<p dir="auto"><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="371619167" data-permission-text="Title is private" data-url="https://github.com/babel/babel/issues/8897" data-hovercard-type="pull_request" data-hovercard-url="/babel/babel/pull/8897/hovercard?comment_id=490659840&amp;comment_type=issue_comment" href="https://github.com/babel/babel/pull/8897#issuecomment-490659840">#8897 (comment)</a></p> <blockquote> <p dir="auto">I guess the best solution would be to check ourself if there is a browserlist config in the fs if there are not targets specified. We could do this with <code class="notranslate">browserlist.findConfig(from)</code>. If we find one we do not change defaults. But that would also be a breaking change so I guess we would need to wait for v8. <a href="https://github.com/browserslist/browserslist/blob/master/node.js#L238">https://github.com/browserslist/browserslist/blob/master/node.js#L238</a></p> </blockquote>
1
<h3 dir="auto">What problem does this feature solve?</h3> <p dir="auto"><code class="notranslate">v-model.lazy</code> on component is ignored and wasted, while <code class="notranslate">.number</code> and <code class="notranslate">.trim</code> are effective.</p> <h3 dir="auto">What does the proposed API look like?</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="options: { model: { prop?: string,// = 'value' event?: string,// = 'input' lazyEvent?: string,// = 'change' } }"><pre class="notranslate"><code class="notranslate">options: { model: { prop?: string,// = 'value' event?: string,// = 'input' lazyEvent?: string,// = 'change' } } </code></pre></div>
<h3 dir="auto">Version</h3> <p dir="auto">2.6.11</p> <h3 dir="auto">Reproduction link</h3> <p dir="auto"><a href="https://codesandbox.io/s/naughty-shape-p1plw?fontsize=14&amp;hidenavigation=1&amp;theme=dark" rel="nofollow">https://codesandbox.io/s/naughty-shape-p1plw?fontsize=14&amp;hidenavigation=1&amp;theme=dark</a></p> <h3 dir="auto">Steps to reproduce</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm install vue-server-renderer npm audit"><pre class="notranslate"><code class="notranslate">npm install vue-server-renderer npm audit </code></pre></div> <h3 dir="auto">What is expected?</h3> <p dir="auto">Audit passes</p> <h3 dir="auto">What is actually happening?</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="┌──────────────────────────────────────────────────────────────────────────────┐ │ Manual Review │ │ Some vulnerabilities require your attention to resolve │ │ │ │ Visit https://go.npm.me/audit-guide for additional guidance │ └──────────────────────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ High │ Remote Code Execution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ serialize-javascript │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ &gt;=3.1.0 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ vue-server-renderer │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ vue-server-renderer &gt; serialize-javascript │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/1548 │"><pre class="notranslate"><code class="notranslate">┌──────────────────────────────────────────────────────────────────────────────┐ │ Manual Review │ │ Some vulnerabilities require your attention to resolve │ │ │ │ Visit https://go.npm.me/audit-guide for additional guidance │ └──────────────────────────────────────────────────────────────────────────────┘ ┌───────────────┬──────────────────────────────────────────────────────────────┐ │ High │ Remote Code Execution │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Package │ serialize-javascript │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Patched in │ &gt;=3.1.0 │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Dependency of │ vue-server-renderer │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ Path │ vue-server-renderer &gt; serialize-javascript │ ├───────────────┼──────────────────────────────────────────────────────────────┤ │ More info │ https://npmjs.com/advisories/1548 │ </code></pre></div>
0
<h3 dir="auto">Describe the bug</h3> <p dir="auto">XGBRegressors accepts nan values. Which is defined in the tag <code class="notranslate">force_all_finite='allow-nan</code><br> But if define</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="RegressorChain(XGBRegressor())"><pre class="notranslate"><span class="pl-v">RegressorChain</span>(<span class="pl-v">XGBRegressor</span>())</pre></div> <p dir="auto">Then raises the error</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File &quot;C:\\lib\site-packages\sklearn\multioutput.py&quot;, line 556, in fit X, Y = self._validate_data(X, Y, multi_output=True, accept_sparse=True, File &quot;C:\\lib\site-packages\sklearn\base.py&quot;, line 581, in _validate_data X, y = check_X_y(X, y, **check_params) File &quot;C:\\lib\site-packages\sklearn\utils\validation.py&quot;, line 964, in check_X_y X = check_array( File &quot;C:\\lib\site-packages\sklearn\utils\validation.py&quot;, line 800, in check_array _assert_all_finite(array, allow_nan=force_all_finite == &quot;allow-nan&quot;) File &quot;C:\\lib\site-packages\sklearn\utils\validation.py&quot;, line 114, in _assert_all_finite raise ValueError( ValueError: Input contains NaN, infinity or a value too large for dtype('float64')."><pre class="notranslate"><code class="notranslate"> File "C:\\lib\site-packages\sklearn\multioutput.py", line 556, in fit X, Y = self._validate_data(X, Y, multi_output=True, accept_sparse=True, File "C:\\lib\site-packages\sklearn\base.py", line 581, in _validate_data X, y = check_X_y(X, y, **check_params) File "C:\\lib\site-packages\sklearn\utils\validation.py", line 964, in check_X_y X = check_array( File "C:\\lib\site-packages\sklearn\utils\validation.py", line 800, in check_array _assert_all_finite(array, allow_nan=force_all_finite == "allow-nan") File "C:\\lib\site-packages\sklearn\utils\validation.py", line 114, in _assert_all_finite raise ValueError( ValueError: Input contains NaN, infinity or a value too large for dtype('float64'). </code></pre></div> <p dir="auto">In file "C:\lib\site-packages\sklearn\multioutput.py", line 556, in _BaseChain.fit, doing something like</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class _BaseChain(BaseEstimator, metaclass=ABCMeta): (...) def fit(): (...) allow_nan = self.base_estimator._get_tags()['allow_nan'] force_all_finite = 'allow-nan' if allow_nan else True X, Y = self._validate_data(X, Y, multi_output=True, accept_sparse=True, force_all_finite=force_all_finite)"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-s1">_BaseChain</span>(<span class="pl-v">BaseEstimator</span>, <span class="pl-s1">metaclass</span><span class="pl-c1">=</span><span class="pl-v">ABCMeta</span>): (...) <span class="pl-k">def</span> <span class="pl-en">fit</span>(): (...) <span class="pl-s1">allow_nan</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">base_estimator</span>.<span class="pl-en">_get_tags</span>()[<span class="pl-s">'allow_nan'</span>] <span class="pl-s1">force_all_finite</span> <span class="pl-c1">=</span> <span class="pl-s">'allow-nan'</span> <span class="pl-k">if</span> <span class="pl-s1">allow_nan</span> <span class="pl-k">else</span> <span class="pl-c1">True</span> <span class="pl-v">X</span>, <span class="pl-v">Y</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_validate_data</span>(<span class="pl-v">X</span>, <span class="pl-v">Y</span>, <span class="pl-s1">multi_output</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">accept_sparse</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">force_all_finite</span><span class="pl-c1">=</span><span class="pl-s1">force_all_finite</span>)</pre></div> <p dir="auto">would solve the problem</p> <h3 dir="auto">Steps/Code to Reproduce</h3> <p dir="auto">import numpy as np<br> from sklearn.datasets import make_regression<br> from sklearn.multioutput import RegressorChain<br> from xgboost import XGBRegressor</p> <p dir="auto">model = RegressorChain(XGBRegressor())<br> scoring = 'neg_root_mean_squared_error'<br> X, y = make_regression(n_targets=2)<br> X[0, 0] = np.nan<br> model.fit(X, y)<br> print(model.score(X,y))</p> <h3 dir="auto">Expected Results</h3> <p dir="auto"><code class="notranslate">fit</code>works, and score = 0.9999</p> <h3 dir="auto">Actual Results</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" File &quot;C:\\lib\site-packages\sklearn\multioutput.py&quot;, line 556, in fit X, Y = self._validate_data(X, Y, multi_output=True, accept_sparse=True, File &quot;C:\\lib\site-packages\sklearn\base.py&quot;, line 581, in _validate_data X, y = check_X_y(X, y, **check_params) File &quot;C:\\lib\site-packages\sklearn\utils\validation.py&quot;, line 964, in check_X_y X = check_array( File &quot;C:\\lib\site-packages\sklearn\utils\validation.py&quot;, line 800, in check_array _assert_all_finite(array, allow_nan=force_all_finite == &quot;allow-nan&quot;) File &quot;C:\\lib\site-packages\sklearn\utils\validation.py&quot;, line 114, in _assert_all_finite raise ValueError( ValueError: Input contains NaN, infinity or a value too large for dtype('float64')."><pre class="notranslate"><code class="notranslate"> File "C:\\lib\site-packages\sklearn\multioutput.py", line 556, in fit X, Y = self._validate_data(X, Y, multi_output=True, accept_sparse=True, File "C:\\lib\site-packages\sklearn\base.py", line 581, in _validate_data X, y = check_X_y(X, y, **check_params) File "C:\\lib\site-packages\sklearn\utils\validation.py", line 964, in check_X_y X = check_array( File "C:\\lib\site-packages\sklearn\utils\validation.py", line 800, in check_array _assert_all_finite(array, allow_nan=force_all_finite == "allow-nan") File "C:\\lib\site-packages\sklearn\utils\validation.py", line 114, in _assert_all_finite raise ValueError( ValueError: Input contains NaN, infinity or a value too large for dtype('float64'). </code></pre></div> <h3 dir="auto">Versions</h3> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="System: python: 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] executable: C:\MyProgramFiles\venv\ds-ltv\Scripts\python.exe machine: Windows-10-10.0.19043-SP0 Python dependencies: pip: 22.0.4 setuptools: 57.0.0 sklearn: 1.0.2 numpy: 1.22.3 scipy: 1.8.0 Cython: None pandas: 1.4.2 matplotlib: 3.5.1 joblib: 1.1.0 threadpoolctl: 3.1.0 Built with OpenMP: True"><pre class="notranslate">System: python: 3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021, 18:08:50) [MSC v.1929 64 bit (AMD64)] executable: C:<span class="pl-cce">\M</span>yProgramFiles<span class="pl-cce">\v</span>env<span class="pl-cce">\d</span>s-ltv<span class="pl-cce">\S</span>cripts<span class="pl-cce">\p</span>ython.exe machine: Windows-10-10.0.19043-SP0 Python dependencies: pip: 22.0.4 setuptools: 57.0.0 sklearn: 1.0.2 numpy: 1.22.3 scipy: 1.8.0 Cython: None pandas: 1.4.2 matplotlib: 3.5.1 joblib: 1.1.0 threadpoolctl: 3.1.0 Built with OpenMP: True</pre></div>
<h4 dir="auto">Describe the bug</h4> <p dir="auto">I can't seem to get the <code class="notranslate">RegressorChain</code> working with pipelines that include a <code class="notranslate">ColumnTransformer</code>. I posted an issue on StackOverflow with more: <a href="https://stackoverflow.com/questions/68430993/sklearn-using-regressorchain-with-columntransformer-in-pipelines" rel="nofollow">https://stackoverflow.com/questions/68430993/sklearn-using-regressorchain-with-columntransformer-in-pipelines</a> .</p> <p dir="auto">Somewhere in <code class="notranslate">__init__.py / _get_column_indices(X, key)</code> this call fails: <code class="notranslate">all_columns = X.columns</code> saying <code class="notranslate">'numpy.ndarray' object has no attribute 'columns'</code>. Because this is a known issue with <code class="notranslate">ColumnTransformer</code>, I suspect the <code class="notranslate">RegressorChain</code> can't be used with it.</p> <p dir="auto">I'm not sure if this is a supported scenario, but the documentation for RegressorChain (<a href="https://scikit-learn.org/stable/modules/generated/sklearn.multioutput.RegressorChain.html" rel="nofollow">https://scikit-learn.org/stable/modules/generated/sklearn.multioutput.RegressorChain.html</a>), for <code class="notranslate">set_params</code>, includes this:</p> <p dir="auto">"The method works on simple estimators <strong>as well as on nested objects (such as Pipeline)</strong>. The latter have parameters of the form __ so that it’s possible to update each component of a nested object."</p> <p dir="auto">So I was led to assume it would also work with Pipelines including the column transformer.</p> <h4 dir="auto">Steps/Code to Reproduce</h4> <p dir="auto">Any example with a Pipeline containing a ColumnTransformer and a Regressor. The StackOverflow link I included above has my code.</p> <h4 dir="auto">Expected Results</h4> <p dir="auto">Fitted pipeline.</p> <h4 dir="auto">Actual Results</h4> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- AttributeError Traceback (most recent call last) C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\utils\__init__.py in _get_column_indices(X, key) 373 try: --&gt; 374 all_columns = X.columns 375 except AttributeError: AttributeError: 'numpy.ndarray' object has no attribute 'columns' During handling of the above exception, another exception occurred: ValueError Traceback (most recent call last) &lt;ipython-input-181-24da1e03388c&gt; in &lt;module&gt; 3 4 chain_regressor = RegressorChain(base_estimator=chain_pipeline) #, order=[1,0,2]) ----&gt; 5 chain_regressor.fit(X, y) 6 7 C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\multioutput.py in fit(self, X, Y, **fit_params) 840 self : object 841 &quot;&quot;&quot; --&gt; 842 super().fit(X, Y, **fit_params) 843 return self 844 C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\multioutput.py in fit(self, X, Y, **fit_params) 507 for chain_idx, estimator in enumerate(self.estimators_): 508 y = Y[:, self.order_[chain_idx]] --&gt; 509 estimator.fit(X_aug[:, :(X.shape[1] + chain_idx)], y, 510 **fit_params) 511 if self.cv is not None and chain_idx &lt; len(self.estimators_) - 1: C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\compose\_target.py in fit(self, X, y, **fit_params) 205 self.regressor_ = clone(self.regressor) 206 --&gt; 207 self.regressor_.fit(X, y_trans, **fit_params) 208 209 return self C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\pipeline.py in fit(self, X, y, **fit_params) 339 &quot;&quot;&quot; 340 fit_params_steps = self._check_fit_params(**fit_params) --&gt; 341 Xt = self._fit(X, y, **fit_params_steps) 342 with _print_elapsed_time('Pipeline', 343 self._log_message(len(self.steps) - 1)): C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\pipeline.py in _fit(self, X, y, **fit_params_steps) 301 cloned_transformer = clone(transformer) 302 # Fit or load from cache the current transformer --&gt; 303 X, fitted_transformer = fit_transform_one_cached( 304 cloned_transformer, X, y, None, 305 message_clsname='Pipeline', C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\joblib\memory.py in __call__(self, *args, **kwargs) 350 351 def __call__(self, *args, **kwargs): --&gt; 352 return self.func(*args, **kwargs) 353 354 def call_and_shelve(self, *args, **kwargs): C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\pipeline.py in _fit_transform_one(transformer, X, y, weight, message_clsname, message, **fit_params) 752 with _print_elapsed_time(message_clsname, message): 753 if hasattr(transformer, 'fit_transform'): --&gt; 754 res = transformer.fit_transform(X, y, **fit_params) 755 else: 756 res = transformer.fit(X, y, **fit_params).transform(X) C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\compose\_column_transformer.py in fit_transform(self, X, y) 503 self._validate_transformers() 504 self._validate_column_callables(X) --&gt; 505 self._validate_remainder(X) 506 507 result = self._fit_transform(X, y, _fit_transform_one) C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\compose\_column_transformer.py in _validate_remainder(self, X) 330 cols = [] 331 for columns in self._columns: --&gt; 332 cols.extend(_get_column_indices(X, columns)) 333 334 remaining_idx = sorted(set(range(self._n_features)) - set(cols)) C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\utils\__init__.py in _get_column_indices(X, key) 374 all_columns = X.columns 375 except AttributeError: --&gt; 376 raise ValueError(&quot;Specifying the columns using strings is only &quot; 377 &quot;supported for pandas DataFrames&quot;) 378 if isinstance(key, str): ValueError: Specifying the columns using strings is only supported for pandas DataFrames"><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">AttributeError</span> <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">C</span>:\P<span class="pl-s1">rogramData</span>\A<span class="pl-s1">naconda3</span>\e<span class="pl-s1">nvs</span>\p<span class="pl-s1">y38aml</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">klearn</span>\u<span class="pl-s1">tils</span>\_<span class="pl-s1">_init__</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_get_column_indices</span>(<span class="pl-v">X</span>, <span class="pl-s1">key</span>) <span class="pl-c1">373</span> <span class="pl-k">try</span>: <span class="pl-c1">-</span><span class="pl-c1">-&gt;</span> <span class="pl-c1">374</span> <span class="pl-s1">all_columns</span> <span class="pl-c1">=</span> <span class="pl-v">X</span>.<span class="pl-s1">columns</span> <span class="pl-c1">375</span> <span class="pl-k">except</span> <span class="pl-v">AttributeError</span>: <span class="pl-v">AttributeError</span>: <span class="pl-s">'numpy.ndarray'</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">'columns'</span> <span class="pl-v">During</span> <span class="pl-s1">handling</span> <span class="pl-s1">of</span> <span class="pl-s1">the</span> <span class="pl-s1">above</span> <span class="pl-s1">exception</span>, <span class="pl-s1">another</span> <span class="pl-s1">exception</span> <span class="pl-s1">occurred</span>: <span class="pl-v">ValueError</span> <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-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">181</span><span class="pl-c1">-</span><span class="pl-c1">24</span><span class="pl-s1">da1e03388c</span><span class="pl-c1">&gt;</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-c1">3</span> <span class="pl-c1">4</span> <span class="pl-s1">chain_regressor</span> <span class="pl-c1">=</span> <span class="pl-v">RegressorChain</span>(<span class="pl-s1">base_estimator</span><span class="pl-c1">=</span><span class="pl-s1">chain_pipeline</span>) <span class="pl-c">#, order=[1,0,2])</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">5</span> <span class="pl-s1">chain_regressor</span>.<span class="pl-en">fit</span>(<span class="pl-v">X</span>, <span class="pl-s1">y</span>) <span class="pl-c1">6</span> <span class="pl-c1">7</span> <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\A<span class="pl-s1">naconda3</span>\e<span class="pl-s1">nvs</span>\p<span class="pl-s1">y38aml</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">klearn</span>\m<span class="pl-s1">ultioutput</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">fit</span>(<span class="pl-s1">self</span>, <span class="pl-v">X</span>, <span class="pl-v">Y</span>, <span class="pl-c1">**</span><span class="pl-s1">fit_params</span>) <span class="pl-c1">840</span> <span class="pl-s1">self</span> : <span class="pl-s1">object</span> <span class="pl-c1">841</span> <span class="pl-s">"""</span> <span class="pl-s">--&gt; 842 super().fit(X, Y, **fit_params)</span> <span class="pl-s"> 843 return self</span> <span class="pl-s"> 844 </span> <span class="pl-s"></span> <span class="pl-s">C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\multioutput.py in fit(self, X, Y, **fit_params)</span> <span class="pl-s"> 507 for chain_idx, estimator in enumerate(self.estimators_):</span> <span class="pl-s"> 508 y = Y[:, self.order_[chain_idx]]</span> <span class="pl-s">--&gt; 509 estimator.fit(X_aug[:, :(X.shape[1] + chain_idx)], y,</span> <span class="pl-s"> 510 **fit_params)</span> <span class="pl-s"> 511 if self.cv is not None and chain_idx &lt; len(self.estimators_) - 1:</span> <span class="pl-s"></span> <span class="pl-s">C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\compose\_target.py in fit(self, X, y, **fit_params)</span> <span class="pl-s"> 205 self.regressor_ = clone(self.regressor)</span> <span class="pl-s"> 206 </span> <span class="pl-s">--&gt; 207 self.regressor_.fit(X, y_trans, **fit_params)</span> <span class="pl-s"> 208 </span> <span class="pl-s"> 209 return self</span> <span class="pl-s"></span> <span class="pl-s">C:\ProgramData\Anaconda3\envs\py38aml\lib\site-packages\sklearn\pipeline.py in fit(self, X, y, **fit_params)</span> <span class="pl-s"> 339 """</span> <span class="pl-c1">340</span> <span class="pl-s1">fit_params_steps</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_check_fit_params</span>(<span class="pl-c1">**</span><span class="pl-s1">fit_params</span>) <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">341</span> <span class="pl-v">Xt</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_fit</span>(<span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-c1">**</span><span class="pl-s1">fit_params_steps</span>) <span class="pl-c1">342</span> <span class="pl-k">with</span> <span class="pl-en">_print_elapsed_time</span>(<span class="pl-s">'Pipeline'</span>, <span class="pl-c1">343</span> <span class="pl-s1">self</span>.<span class="pl-en">_log_message</span>(<span class="pl-en">len</span>(<span class="pl-s1">self</span>.<span class="pl-s1">steps</span>) <span class="pl-c1">-</span> <span class="pl-c1">1</span>)): <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\A<span class="pl-s1">naconda3</span>\e<span class="pl-s1">nvs</span>\p<span class="pl-s1">y38aml</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">klearn</span>\p<span class="pl-s1">ipeline</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_fit</span>(<span class="pl-s1">self</span>, <span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-c1">**</span><span class="pl-s1">fit_params_steps</span>) <span class="pl-c1">301</span> <span class="pl-s1">cloned_transformer</span> <span class="pl-c1">=</span> <span class="pl-en">clone</span>(<span class="pl-s1">transformer</span>) <span class="pl-c1">302</span> <span class="pl-c"># Fit or load from cache the current transformer</span> <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">303</span> <span class="pl-v">X</span>, <span class="pl-s1">fitted_transformer</span> <span class="pl-c1">=</span> <span class="pl-s1">fit_transform_one_cached</span>( <span class="pl-c1">304</span> <span class="pl-s1">cloned_transformer</span>, <span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-c1">None</span>, <span class="pl-c1">305</span> <span class="pl-s1">message_clsname</span><span class="pl-c1">=</span><span class="pl-s">'Pipeline'</span>, <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\A<span class="pl-s1">naconda3</span>\e<span class="pl-s1">nvs</span>\p<span class="pl-s1">y38aml</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\j<span class="pl-s1">oblib</span>\m<span class="pl-s1">emory</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">350</span> <span class="pl-c1">351</span> <span class="pl-k">def</span> <span class="pl-en">__call__</span>(<span class="pl-s1">self</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>): <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">352</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">func</span>(<span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">353</span> <span class="pl-c1">354</span> <span class="pl-k">def</span> <span class="pl-en">call_and_shelve</span>(<span class="pl-s1">self</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>): <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\A<span class="pl-s1">naconda3</span>\e<span class="pl-s1">nvs</span>\p<span class="pl-s1">y38aml</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">klearn</span>\p<span class="pl-s1">ipeline</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_fit_transform_one</span>(<span class="pl-s1">transformer</span>, <span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-s1">weight</span>, <span class="pl-s1">message_clsname</span>, <span class="pl-s1">message</span>, <span class="pl-c1">**</span><span class="pl-s1">fit_params</span>) <span class="pl-c1">752</span> <span class="pl-k">with</span> <span class="pl-s1">_print_elapsed_time</span>(<span class="pl-s1">message_clsname</span>, <span class="pl-s1">message</span>): <span class="pl-c1">753</span> <span class="pl-k">if</span> <span class="pl-en">hasattr</span>(<span class="pl-s1">transformer</span>, <span class="pl-s">'fit_transform'</span>): <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">754</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">transformer</span>.<span class="pl-en">fit_transform</span>(<span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-c1">**</span><span class="pl-s1">fit_params</span>) <span class="pl-c1">755</span> <span class="pl-k">else</span>: <span class="pl-c1">756</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">transformer</span>.<span class="pl-en">fit</span>(<span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-c1">**</span><span class="pl-s1">fit_params</span>).<span class="pl-en">transform</span>(<span class="pl-v">X</span>) <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\A<span class="pl-s1">naconda3</span>\e<span class="pl-s1">nvs</span>\p<span class="pl-s1">y38aml</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">klearn</span>\c<span class="pl-s1">ompose</span>\_<span class="pl-s1">column_transformer</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">fit_transform</span>(<span class="pl-s1">self</span>, <span class="pl-v">X</span>, <span class="pl-s1">y</span>) <span class="pl-c1">503</span> <span class="pl-s1">self</span>.<span class="pl-en">_validate_transformers</span>() <span class="pl-c1">504</span> <span class="pl-s1">self</span>.<span class="pl-en">_validate_column_callables</span>(<span class="pl-v">X</span>) <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">505</span> <span class="pl-s1">self</span>.<span class="pl-en">_validate_remainder</span>(<span class="pl-v">X</span>) <span class="pl-c1">506</span> <span class="pl-c1">507</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_fit_transform</span>(<span class="pl-v">X</span>, <span class="pl-s1">y</span>, <span class="pl-s1">_fit_transform_one</span>) <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\A<span class="pl-s1">naconda3</span>\e<span class="pl-s1">nvs</span>\p<span class="pl-s1">y38aml</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">klearn</span>\c<span class="pl-s1">ompose</span>\_<span class="pl-s1">column_transformer</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_validate_remainder</span>(<span class="pl-s1">self</span>, <span class="pl-v">X</span>) <span class="pl-c1">330</span> <span class="pl-s1">cols</span> <span class="pl-c1">=</span> [] <span class="pl-c1">331</span> <span class="pl-s1">for</span> <span class="pl-s1">columns</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">_columns</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">332</span> <span class="pl-s1">cols</span>.<span class="pl-en">extend</span>(<span class="pl-en">_get_column_indices</span>(<span class="pl-v">X</span>, <span class="pl-s1">columns</span>)) <span class="pl-c1">333</span> <span class="pl-c1">334</span> <span class="pl-s1">remaining_idx</span> <span class="pl-c1">=</span> <span class="pl-en">sorted</span>(<span class="pl-en">set</span>(<span class="pl-en">range</span>(<span class="pl-s1">self</span>.<span class="pl-s1">_n_features</span>)) <span class="pl-c1">-</span> <span class="pl-en">set</span>(<span class="pl-s1">cols</span>)) <span class="pl-v">C</span>:\P<span class="pl-s1">rogramData</span>\A<span class="pl-s1">naconda3</span>\e<span class="pl-s1">nvs</span>\p<span class="pl-s1">y38aml</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\s<span class="pl-s1">klearn</span>\u<span class="pl-s1">tils</span>\_<span class="pl-s1">_init__</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_get_column_indices</span>(<span class="pl-v">X</span>, <span class="pl-s1">key</span>) <span class="pl-c1">374</span> <span class="pl-s1">all_columns</span> <span class="pl-c1">=</span> <span class="pl-v">X</span>.<span class="pl-s1">columns</span> <span class="pl-c1">375</span> <span class="pl-k">except</span> <span class="pl-v">AttributeError</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">376</span> <span class="pl-s1">raise</span> <span class="pl-v">ValueError</span>(<span class="pl-s">"Specifying the columns using strings is only "</span> <span class="pl-c1">377</span> <span class="pl-s">"supported for pandas DataFrames"</span>) <span class="pl-c1">378</span> <span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">key</span>, <span class="pl-s1">str</span>): <span class="pl-v">ValueError</span>: <span class="pl-v">Specifying</span> <span class="pl-s1">the</span> <span class="pl-s1">columns</span> <span class="pl-s1">using</span> <span class="pl-s1">strings</span> <span class="pl-c1">is</span> <span class="pl-s1">only</span> <span class="pl-s1">supported</span> <span class="pl-k">for</span> <span class="pl-s1">pandas</span> <span class="pl-v">DataFrames</span></pre></div> <h4 dir="auto">Versions</h4> <p dir="auto">System:<br> python: 3.8.10 (default, May 19 2021, 13:12:57) [MSC v.1916 64 bit (AMD64)]<br> executable: C:\ProgramData\Anaconda3\envs\py38aml\python.exe<br> machine: Windows-10-10.0.22000-SP0</p> <p dir="auto">Python dependencies:<br> pip: 21.1.3<br> setuptools: 52.0.0.post20210125<br> sklearn: 0.24.2<br> numpy: 1.20.2<br> scipy: 1.6.2<br> Cython: None<br> pandas: 1.2.5<br> matplotlib: 3.3.4<br> joblib: 1.0.1<br> threadpoolctl: 2.2.0</p> <p dir="auto">Built with OpenMP: True</p>
1
<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>no</td> </tr> <tr> <td>RFC?</td> <td>no</td> </tr> <tr> <td>Symfony version</td> <td>4.1</td> </tr> </tbody> </table> <p dir="auto">What about add constraint on unique elements collection?<br> I think it will be named as Assert\UniqueCollection.<br> It is partly linked with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="24860629" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/9888" data-hovercard-type="issue" data-hovercard-url="/symfony/symfony/issues/9888/hovercard" href="https://github.com/symfony/symfony/issues/9888">#9888</a><br> What do you think? I'd be happy to send a PR after it's discussed.</p>
<p dir="auto">I propose to add the following constraints for validating <code class="notranslate">Traversable</code> instances and arrays:</p> <ul dir="auto"> <li><code class="notranslate">Each</code>: Validates that each entry satisfies some constraint (replaces <code class="notranslate">All</code>, which should be deprecated).</li> <li><code class="notranslate">Some</code>: Validates that at least one entry satisfies some constraint. The lower limit (default 1) and upper limit (default <code class="notranslate">null</code>, i.e. unbounded) can be configured. Alternatively, a precise number of matches can be given.</li> <li><code class="notranslate">None</code>: Validates that 0 entries satisfy some constraint (alias for <code class="notranslate">Some(exactly = 0, ...)</code>)</li> <li><code class="notranslate">Unique</code>: Validates that the collection does not contain duplicates.</li> </ul> <p dir="auto">Example:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/** * @Each(@GreaterThan(6)) */ private $numbers. /** * @Some(@GreaterThan(6)) */ private $numbers. /** * @Some(@GreaterThan(6), min = 2, max = 5) */ private $numbers. /** * @Some(@GreaterThan(6), exactly = 3) */ private $numbers. /** * @None(@GreaterThan(6)) */ private $numbers. /** * @Unique */ private $numbers."><pre class="notranslate"><span class="pl-c">/**</span> <span class="pl-c"> * @Each(@GreaterThan(6))</span> <span class="pl-c"> */</span> <span class="pl-k">private</span> <span class="pl-s1"><span class="pl-c1">$</span>numbers</span>. <span class="pl-c">/**</span> <span class="pl-c"> * @Some(@GreaterThan(6))</span> <span class="pl-c"> */</span> private <span class="pl-s1"><span class="pl-c1">$</span>numbers</span>. <span class="pl-c">/**</span> <span class="pl-c"> * @Some(@GreaterThan(6), min = 2, max = 5)</span> <span class="pl-c"> */</span> private <span class="pl-s1"><span class="pl-c1">$</span>numbers</span>. <span class="pl-c">/**</span> <span class="pl-c"> * @Some(@GreaterThan(6), exactly = 3)</span> <span class="pl-c"> */</span> private <span class="pl-s1"><span class="pl-c1">$</span>numbers</span>. <span class="pl-c">/**</span> <span class="pl-c"> * @None(@GreaterThan(6))</span> <span class="pl-c"> */</span> private <span class="pl-s1"><span class="pl-c1">$</span>numbers</span>. <span class="pl-c">/**</span> <span class="pl-c"> * @Unique</span> <span class="pl-c"> */</span> private <span class="pl-s1"><span class="pl-c1">$</span>numbers</span>.</pre></div> <p dir="auto">Each constraint should expect either a single constraint or an array of constraints to be given. That means you can also do:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="/** * @Each({ * @NotNull, * @GreaterThan(6) * }) */ private $numbers."><pre class="notranslate"><span class="pl-c">/**</span> <span class="pl-c"> * @Each({</span> <span class="pl-c"> * @NotNull,</span> <span class="pl-c"> * @GreaterThan(6)</span> <span class="pl-c"> * })</span> <span class="pl-c"> */</span> <span class="pl-k">private</span> <span class="pl-s1"><span class="pl-c1">$</span>numbers</span>.</pre></div> <p dir="auto">"min" or "max" and "exactly" must not be given at the same time:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// ConstraintDefinitionException new Some(array( 'constraints' =&gt; array(...), 'min' =&gt; 2, 'exactly' =&gt; 2, ));"><pre class="notranslate"><span class="pl-c">// ConstraintDefinitionException</span> <span class="pl-k">new</span> <span class="pl-v">Some</span>(<span class="pl-en">array</span>( <span class="pl-s">'constraints'</span> =&gt; <span class="pl-en">array</span>(...), <span class="pl-s">'min'</span> =&gt; <span class="pl-c1">2</span>, <span class="pl-s">'exactly'</span> =&gt; <span class="pl-c1">2</span>, ));</pre></div> <p dir="auto">Groups on inner constraints should be supported (ref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="4807960" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/4453" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/4453/hovercard" href="https://github.com/symfony/symfony/pull/4453">#4453</a>).</p> <ul dir="auto"> <li> <p dir="auto">If a collection constraint has explicit groups given, it should call <code class="notranslate">addImplicitGroupName()</code> on the nested constraints with each of these groups (except "Default").</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="new Each(array( 'groups' =&gt; array('Default', 'Strict'), 'constraints' =&gt; new GreaterThan(6), // implicitly group &quot;Default&quot; and &quot;Strict&quot; ));"><pre class="notranslate"><span class="pl-k">new</span> <span class="pl-v">Each</span>(<span class="pl-en">array</span>( <span class="pl-s">'groups'</span> =&gt; <span class="pl-en">array</span>(<span class="pl-s">'Default'</span>, <span class="pl-s">'Strict'</span>), <span class="pl-s">'constraints'</span> =&gt; <span class="pl-k">new</span> <span class="pl-v">GreaterThan</span>(<span class="pl-c1">6</span>), <span class="pl-c">// implicitly group "Default" and "Strict"</span> ));</pre></div> </li> <li> <p dir="auto">If a collection constraint has no explicit group given, its groups should be the merged result of all nested groups.</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="new Each(array( 'constraints' =&gt; array( new GreaterThan(array( 'value' =&gt; 6, 'groups' =&gt; array('Default', 'Strict'), )), new NotNull(array('groups' =&gt; 'Filled')), ), // implicitly group &quot;Default&quot;, &quot;Strict&quot; and &quot;Filled&quot; ));"><pre class="notranslate"><span class="pl-k">new</span> <span class="pl-v">Each</span>(<span class="pl-en">array</span>( <span class="pl-s">'constraints'</span> =&gt; <span class="pl-en">array</span>( <span class="pl-k">new</span> <span class="pl-v">GreaterThan</span>(<span class="pl-en">array</span>( <span class="pl-s">'value'</span> =&gt; <span class="pl-c1">6</span>, <span class="pl-s">'groups'</span> =&gt; <span class="pl-en">array</span>(<span class="pl-s">'Default'</span>, <span class="pl-s">'Strict'</span>), )), <span class="pl-k">new</span> <span class="pl-v">NotNull</span>(<span class="pl-en">array</span>(<span class="pl-s">'groups'</span> =&gt; <span class="pl-s">'Filled'</span>)), ), <span class="pl-c">// implicitly group "Default", "Strict" and "Filled"</span> ));</pre></div> </li> <li> <p dir="auto">If both the collection constraint and a nested constraint have explicit groups given, the groups of the nested constraint need to be a subset of the groups of the outer constraint.</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// ok new Each(array( 'groups' =&gt; array('Default', 'Strict'), 'constraints' =&gt; new GreaterThan(array( 'value' =&gt; 6, 'groups' =&gt; array('Default', 'Strict'), )), )); // ok new Each(array( 'groups' =&gt; array('Default', 'Strict'), 'constraints' =&gt; new GreaterThan(array( 'value' =&gt; 6, 'groups' =&gt; 'Strict', )), )); // ConstraintDefinitionException new Each(array( 'groups' =&gt; array('Default', 'Strict'), 'constraints' =&gt; new GreaterThan(array( 'value' =&gt; 6, 'groups' =&gt; array('Strict', 'Sales'), )), ));"><pre class="notranslate"><span class="pl-c">// ok</span> <span class="pl-k">new</span> <span class="pl-v">Each</span>(<span class="pl-en">array</span>( <span class="pl-s">'groups'</span> =&gt; <span class="pl-en">array</span>(<span class="pl-s">'Default'</span>, <span class="pl-s">'Strict'</span>), <span class="pl-s">'constraints'</span> =&gt; <span class="pl-k">new</span> <span class="pl-v">GreaterThan</span>(<span class="pl-en">array</span>( <span class="pl-s">'value'</span> =&gt; <span class="pl-c1">6</span>, <span class="pl-s">'groups'</span> =&gt; <span class="pl-en">array</span>(<span class="pl-s">'Default'</span>, <span class="pl-s">'Strict'</span>), )), )); <span class="pl-c">// ok</span> <span class="pl-k">new</span> <span class="pl-v">Each</span>(<span class="pl-en">array</span>( <span class="pl-s">'groups'</span> =&gt; <span class="pl-en">array</span>(<span class="pl-s">'Default'</span>, <span class="pl-s">'Strict'</span>), <span class="pl-s">'constraints'</span> =&gt; <span class="pl-k">new</span> <span class="pl-v">GreaterThan</span>(<span class="pl-en">array</span>( <span class="pl-s">'value'</span> =&gt; <span class="pl-c1">6</span>, <span class="pl-s">'groups'</span> =&gt; <span class="pl-s">'Strict'</span>, )), )); <span class="pl-c">// ConstraintDefinitionException</span> <span class="pl-k">new</span> <span class="pl-v">Each</span>(<span class="pl-en">array</span>( <span class="pl-s">'groups'</span> =&gt; <span class="pl-en">array</span>(<span class="pl-s">'Default'</span>, <span class="pl-s">'Strict'</span>), <span class="pl-s">'constraints'</span> =&gt; <span class="pl-k">new</span> <span class="pl-v">GreaterThan</span>(<span class="pl-en">array</span>( <span class="pl-s">'value'</span> =&gt; <span class="pl-c1">6</span>, <span class="pl-s">'groups'</span> =&gt; <span class="pl-en">array</span>(<span class="pl-s">'Strict'</span>, <span class="pl-s">'Sales'</span>), )), ));</pre></div> </li> <li> <p dir="auto">Calls to <code class="notranslate">addImplicitGroupName()</code> on the collection constraint should be propagated to nested constraints.</p> </li> </ul>
1
<h3 dir="auto">System information</h3> <ul dir="auto"> <li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>:<br> Yes.</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>:<br> Linux Ubuntu 16.04.3</li> <li><strong>TensorFlow installed from (source or binary)</strong>:<br> Binary.</li> <li><strong>TensorFlow version (use command below)</strong>:<br> 1.3.0</li> <li><strong>Python version</strong>:<br> 2.7.12</li> <li><strong>CUDA/cuDNN version</strong>:<br> CUDA Version 8.0.61</li> <li><strong>GPU model and memory</strong>:<br> NVIDIA GTX 1080Ti 12G</li> </ul> <h3 dir="auto">Describe the problem</h3> <p dir="auto">If I import cv2, " tf.global_variables_initializer() " will be very slow, about 143s. You can run my test code below, when " import cv2 " is commented out, the time is about 5s. The version of opencv is 2.4.13.4.</p> <h3 dir="auto">Source code / logs</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import tensorflow as tf import time import cv2 weight = tf.Variable(tf.truncated_normal([5,5,1,32], stddev=0.1)) ot = time.time() init_op = tf.global_variables_initializer() with tf.Session() as sess: sess.run(init_op) nt = time.time() print('time: {:.3f}'.format(nt-ot))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span> <span class="pl-k">import</span> <span class="pl-s1">time</span> <span class="pl-k">import</span> <span class="pl-s1">cv2</span> <span class="pl-s1">weight</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-v">Variable</span>(<span class="pl-s1">tf</span>.<span class="pl-en">truncated_normal</span>([<span class="pl-c1">5</span>,<span class="pl-c1">5</span>,<span class="pl-c1">1</span>,<span class="pl-c1">32</span>], <span class="pl-s1">stddev</span><span class="pl-c1">=</span><span class="pl-c1">0.1</span>)) <span class="pl-s1">ot</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-en">time</span>() <span class="pl-s1">init_op</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">global_variables_initializer</span>() <span class="pl-k">with</span> <span class="pl-s1">tf</span>.<span class="pl-v">Session</span>() <span class="pl-k">as</span> <span class="pl-s1">sess</span>: <span class="pl-s1">sess</span>.<span class="pl-en">run</span>(<span class="pl-s1">init_op</span>) <span class="pl-s1">nt</span> <span class="pl-c1">=</span> <span class="pl-s1">time</span>.<span class="pl-en">time</span>() <span class="pl-en">print</span>(<span class="pl-s">'time: {:.3f}'</span>.<span class="pl-en">format</span>(<span class="pl-s1">nt</span><span class="pl-c1">-</span><span class="pl-s1">ot</span>))</pre></div>
<p dir="auto">Please go to Stack Overflow for help and support:</p> <p dir="auto"><a href="https://stackoverflow.com/questions/tagged/tensorflow" rel="nofollow">https://stackoverflow.com/questions/tagged/tensorflow</a></p> <p dir="auto">If you open a GitHub issue, here is our policy:</p> <ol dir="auto"> <li>It must be a bug, a feature request, or a significant problem with documentation (for small docs fixes please send a PR instead).</li> <li>The form below must be filled out.</li> <li>It shouldn't be a TensorBoard issue. Those go <a href="https://github.com/tensorflow/tensorboard/issues">here</a>.</li> </ol> <p dir="auto"><strong>Here's why we have that policy</strong>: TensorFlow developers respond to issues. We want to focus on work that benefits the whole community, e.g., fixing bugs and adding features. Support only helps individuals. GitHub also notifies thousands of people when issues are filed. We want them to see you communicating an interesting problem, rather than being redirected to Stack Overflow.</p> <hr> <h3 dir="auto">System information</h3> <ul dir="auto"> <li><strong>Have I written custom code (as opposed to using a stock example script provided in TensorFlow)</strong>: N/A</li> <li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: OS 10.13.4</li> <li><strong>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device</strong>: N/A</li> <li><strong>TensorFlow installed from (source or binary)</strong>: source (whole package)</li> <li><strong>TensorFlow version (use command below)</strong>: 1.10.1</li> <li><strong>Python version</strong>: 3.7</li> <li><strong>Bazel version (if compiling from source)</strong>: N/A</li> <li><strong>GCC/Compiler version (if compiling from source)</strong>:</li> </ul> <p dir="auto">Apple LLVM version 9.1.0 (clang-902.0.39.1)<br> Target: x86_64-apple-darwin17.5.0<br> Thread model: posix<br> InstalledDir: /Library/Developer/CommandLineTools/usr/bin</p> <ul dir="auto"> <li> <p dir="auto"><strong>CUDA/cuDNN version</strong>: N/A</p> </li> <li> <p dir="auto"><strong>GPU model and memory</strong>: N/A</p> </li> <li> <p dir="auto"><strong>Exact command to reproduce</strong>:</p> </li> </ul> <p dir="auto">run the following below:</p> <p dir="auto">import numpy as np<br> import tensorflow as tf<br> import tensorflow</p> <p dir="auto">from tensorflow import keras<br> from keras.models import Sequential<br> from keras.layers import Embedding</p> <p dir="auto">model = Sequential()<br> model.add(Embedding(5, 2, input_length=5))</p> <p dir="auto">You can collect some of this information using our environment capture script:</p> <p dir="auto"><a href="https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh">https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh</a></p> <p dir="auto">You can obtain the TensorFlow version with:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="python -c &quot;import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)&quot;"><pre class="notranslate">python -c <span class="pl-s"><span class="pl-pds">"</span>import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)<span class="pl-pds">"</span></span></pre></div> <h3 dir="auto">Describe the problem</h3> <p dir="auto">Describe the problem clearly here. Be sure to convey here why it's a bug in TensorFlow or a feature request.</p> <p dir="auto">So it appears Tensorflow doesn't play nicely with Python 3.7 - there is a source issue when I run ANY tensorflow or keras command using python 3.7 (but runs perfectly fine with earlier versions of python - reverted back and everything ran perfectly fine).</p> <p dir="auto">Here are all the relevant files with environment (it actually errors out when running in p3.7)</p> <p dir="auto">files using 3.7:</p> <p dir="auto"><a href="https://github.com/tensorflow/tensorflow/files/2488938/broken-old-tf_env.txt">broken-old-tf_env.txt</a><br> <a href="https://github.com/tensorflow/tensorflow/files/2488939/broken-tf_env.txt">broken-tf_env.txt</a></p> <p dir="auto">normal env:</p> <p dir="auto"><a href="https://github.com/tensorflow/tensorflow/files/2488954/old-tf_env.txt">old-tf_env.txt</a><br> <a href="https://github.com/tensorflow/tensorflow/files/2488958/tf_env.txt">tf_env.txt</a></p> <h3 dir="auto">Source code / logs</h3> <p dir="auto">Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.</p> <p dir="auto">Here is the trace error message - this exact message occurs when attempting to run ANY keras or tf command using python 3.7:</p> <p dir="auto">(for test case, honestly even the most simple lines will cause the break - try;</p> <p dir="auto">embeddings = tf.Variable(tf.random_uniform([vocabulary_size, embedding_size], -1.0, 1.0))</p> <p dir="auto">Or for keras:</p> <p dir="auto">model = Sequential()<br> model.add(Embedding(10000, 50, input_length=3334))</p> <h2 dir="auto">Error message:</h2> <p dir="auto">UnboundLocalError Traceback (most recent call last)<br> in ()<br> 6 embedding_size = 100<br> 7<br> ----&gt; 8 embeddings = tf.Variable(tf.random_uniform([vocabulary_size, embedding_size], -1.0, 1.0))<br> 9 nce_weights = tf.Variable(tf.truncated_normal([vocabulary_size, embedding_size], stddev=1.0 / math.sqrt(embedding_size)))<br> 10 nce_biases = tf.Variable(tf.zeros([vocabulary_size]))</p> <p dir="auto">~/.local/share/virtualenvs/embedded-feature-extraction-o8pNKOHv/lib/python3.7/site-packages/tensorflow/python/ops/random_ops.py in random_uniform(shape, minval, maxval, dtype, seed, name)<br> 233 with ops.name_scope(name, "random_uniform", [shape, minval, maxval]) as name:<br> 234 shape = _ShapeTensor(shape)<br> --&gt; 235 minval = ops.convert_to_tensor(minval, dtype=dtype, name="min")<br> 236 maxval = ops.convert_to_tensor(maxval, dtype=dtype, name="max")<br> 237 seed1, seed2 = random_seed.get_seed(seed)</p> <p dir="auto">~/.local/share/virtualenvs/embedded-feature-extraction-o8pNKOHv/lib/python3.7/site-packages/tensorflow/python/framework/ops.py in convert_to_tensor(value, dtype, name, preferred_dtype)<br> 996 name=name,<br> 997 preferred_dtype=preferred_dtype,<br> --&gt; 998 as_ref=False)<br> 999<br> 1000</p> <p dir="auto">~/.local/share/virtualenvs/embedded-feature-extraction-o8pNKOHv/lib/python3.7/site-packages/tensorflow/python/framework/ops.py in internal_convert_to_tensor(value, dtype, name, as_ref, preferred_dtype, ctx)<br> 1092<br> 1093 if ret is None:<br> -&gt; 1094 ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)<br> 1095<br> 1096 if ret is NotImplemented:</p> <p dir="auto">~/.local/share/virtualenvs/embedded-feature-extraction-o8pNKOHv/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py in _constant_tensor_conversion_function(v, dtype, name, as_ref)<br> 215 as_ref=False):<br> 216 _ = as_ref<br> --&gt; 217 return constant(v, dtype=dtype, name=name)<br> 218<br> 219</p> <p dir="auto">~/.local/share/virtualenvs/embedded-feature-extraction-o8pNKOHv/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py in constant(value, dtype, shape, name, verify_shape)<br> 194 tensor_value.tensor.CopyFrom(<br> 195 tensor_util.make_tensor_proto(<br> --&gt; 196 value, dtype=dtype, shape=shape, verify_shape=verify_shape))<br> 197 dtype_value = attr_value_pb2.AttrValue(type=tensor_value.tensor.dtype)<br> 198 const_tensor = g.create_op(</p> <p dir="auto">~/.local/share/virtualenvs/embedded-feature-extraction-o8pNKOHv/lib/python3.7/site-packages/tensorflow/python/framework/tensor_util.py in make_tensor_proto(values, dtype, shape, verify_shape)<br> 534 raise TypeError(<br> 535 "Element type not supported in TensorProto: %s" % numpy_dtype.name)<br> --&gt; 536 append_fn(tensor_proto, proto_values)<br> 537<br> 538 return tensor_proto</p> <p dir="auto">tensorflow/python/framework/fast_tensor_util.pyx in tensorflow.python.framework.fast_tensor_util.AppendFloat32ArrayToTensorProto()</p> <p dir="auto">~/.local/share/virtualenvs/embedded-feature-extraction-o8pNKOHv/lib/python3.7/site-packages/google/protobuf/internal/containers.py in append(<em><strong>failed resolving arguments</strong></em>)<br> 249 def append(self, value):<br> 250 """Appends an item to the list. Similar to list.append()."""<br> --&gt; 251 self._values.append(self._type_checker.CheckValue(value))<br> 252 if not self._message_listener.dirty:<br> 253 self._message_listener.Modified()</p> <p dir="auto">UnboundLocalError: local variable 'self' referenced before assignment</p>
0
<p dir="auto">Hello, my BatchInserter failed after successfully having imported more than 75 million nodes with this exception:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Exception in thread &quot;main&quot; java.lang.NumberFormatException: For input string: &quot;5870760&quot; at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:441) at java.lang.Long.valueOf(Long.java:540) at org.neo4j.index.impl.lucene.DocToIdIterator.fetchNextOrNull(DocToIdIterator.java:56) at org.neo4j.index.impl.lucene.DocToIdIterator.fetchNextOrNull(DocToIdIterator.java:27) at org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:55) at org.neo4j.helpers.collection.IteratorUtil.single(IteratorUtil.java:337) at org.neo4j.helpers.collection.IteratorUtil.singleOrNull(IteratorUtil.java:130) at org.neo4j.index.impl.lucene.AbstractIndexHits.getSingle(AbstractIndexHits.java:45) at CorpusImporter.main(CorpusImporter.java:114)"><pre class="notranslate"><code class="notranslate">Exception in thread "main" java.lang.NumberFormatException: For input string: "5870760" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Long.parseLong(Long.java:441) at java.lang.Long.valueOf(Long.java:540) at org.neo4j.index.impl.lucene.DocToIdIterator.fetchNextOrNull(DocToIdIterator.java:56) at org.neo4j.index.impl.lucene.DocToIdIterator.fetchNextOrNull(DocToIdIterator.java:27) at org.neo4j.helpers.collection.PrefetchingIterator.hasNext(PrefetchingIterator.java:55) at org.neo4j.helpers.collection.IteratorUtil.single(IteratorUtil.java:337) at org.neo4j.helpers.collection.IteratorUtil.singleOrNull(IteratorUtil.java:130) at org.neo4j.index.impl.lucene.AbstractIndexHits.getSingle(AbstractIndexHits.java:45) at CorpusImporter.main(CorpusImporter.java:114) </code></pre></div> <p dir="auto">The line that caused the exception is:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="formNode = forms.query(&quot;form:\&quot;&quot;+tokenStr+&quot;\&quot; lemma:\&quot;&quot;+lemmaStr+&quot;\&quot; tag:\&quot;&quot;+tagStr+&quot;\&quot;&quot;).getSingle();"><pre class="notranslate"><code class="notranslate">formNode = forms.query("form:\""+tokenStr+"\" lemma:\""+lemmaStr+"\" tag:\""+tagStr+"\"").getSingle(); </code></pre></div> <p dir="auto">(i.e. searching whether a node with such parameters already exists in the index)</p> <p dir="auto">forms is defined as follows:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="LuceneBatchInserterIndexProvider indexProvider = new LuceneBatchInserterIndexProvider( inserter ); BatchInserterIndex forms = indexProvider.nodeIndex( &quot;forms&quot;, MapUtil.stringMap( &quot;type&quot;, &quot;exact&quot; ) ); forms.setCacheCapacity( &quot;form&quot;, 10000000 ); forms.setCacheCapacity( &quot;lemma&quot;, 1000000 ); forms.setCacheCapacity( &quot;tag&quot;, 100000 );"><pre class="notranslate"><code class="notranslate">LuceneBatchInserterIndexProvider indexProvider = new LuceneBatchInserterIndexProvider( inserter ); BatchInserterIndex forms = indexProvider.nodeIndex( "forms", MapUtil.stringMap( "type", "exact" ) ); forms.setCacheCapacity( "form", 10000000 ); forms.setCacheCapacity( "lemma", 1000000 ); forms.setCacheCapacity( "tag", 100000 ); </code></pre></div> <p dir="auto">When I tried the same process a few days ago with version 2.0.0-RC1, it successfully passed this data, but failed after 107 millions nodes with a segmentation fault.</p>
<p dir="auto">I am trying to create relationships between nodes that are distinct. Right now, I can only return distinct. Is there any way for me to match distinct or create distinct? For example:</p> <p dir="auto">match (p:Player), (n:Games) where p.id = n.id<br> create (p)-[:has_played]-&gt;[n]</p> <p dir="auto">There are player nodes with the same id and the query above is matching all the games to the duplicated player ids. Is there some way I can get the distinct player ids and match it with the games?</p>
0
<p dir="auto">For Kotlin projects, Glide currently makes use of KAPT. This is generally quite slow since it requires generating Java stubs before the annotation processing step.</p> <p dir="auto">KSP offers an alternative to this by making it easier for annotation processors like Glide to more directly use Kotlin's compiler plugin infrastructure. Based on initial benchmarks, using KSP can speed up build times by as much as 2x.</p>
<p dir="auto">Hi,<br> I have a multi account app, where each account has its own dagger component, and a okhttp instance (theyre cloned from the same base instance so they share threadpools etc). However account specific okhttp client instance has its own authenticator (reauth is specific per account, as its api url is different) which does relogging in case of 401 etc.</p> <p dir="auto">Point is that I need this account okhttp instance to drive Glide if im in under given account ui tree i.e. I need multiple Glides in app, per account instance.</p> <p dir="auto">Is there a way to do this? Im only able to inject okhttp loader factory via module, but that all seems to be singleton-y</p> <p dir="auto">Thanks!</p>
0
<h1 dir="auto">什么时候出汉化版</h1> <h1 dir="auto">When will it be available in Chinese?</h1>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">The windows key shortcut guide UI strings need to be localized.</p> <p dir="auto">The application will be localized in the following langauges:</p> <table role="table"> <thead> <tr> <th>Language</th> <th>Culture Code</th> </tr> </thead> <tbody> <tr> <td>English</td> <td>en</td> </tr> <tr> <td>German</td> <td>de</td> </tr> <tr> <td>Spanish</td> <td>es</td> </tr> <tr> <td>French</td> <td>fr</td> </tr> <tr> <td>Italian</td> <td>it</td> </tr> <tr> <td>Japanese</td> <td>ja</td> </tr> <tr> <td>Korean</td> <td>ko</td> </tr> <tr> <td>Portuguese (Brazil)</td> <td>pt-BR</td> </tr> <tr> <td>Russian</td> <td>ru</td> </tr> <tr> <td>Chinese (Simplified)</td> <td>zh-Hans</td> </tr> <tr> <td>Chinese (Traditional)</td> <td>zh-Hant</td> </tr> <tr> <td>Czech</td> <td>cs</td> </tr> <tr> <td>Dutch</td> <td>nl</td> </tr> <tr> <td>Hungarian</td> <td>hu</td> </tr> <tr> <td>Portuguese (Portugal)</td> <td>pt-PT</td> </tr> <tr> <td>Polish</td> <td>pl</td> </tr> <tr> <td>Swedish</td> <td>sv</td> </tr> <tr> <td>Turkish</td> <td>tr</td> </tr> </tbody> </table>
1
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/63644977/91653239-a5881200-eac0-11ea-99f4-73e40b1c0388.jpg"><img src="https://user-images.githubusercontent.com/63644977/91653239-a5881200-eac0-11ea-99f4-73e40b1c0388.jpg" alt="Screenshot_20200830-125652_Chrome (1).jpg" style="max-width: 100%;"></a><br> Here sum of rows are given as sums of columns and vice versa. Also, I think <code class="notranslate">axis=0</code> should give the value of the sum of the rows since numpy first shows rows and then columns in <code class="notranslate">np.shape()</code> command</p>
<p dir="auto">In this Documention <a href="https://numpy.org/devdocs/user/absolute_beginners.html" rel="nofollow">https://numpy.org/devdocs/user/absolute_beginners.html</a><br> Sum of rows of an numpy array is denoted by b.sum(axis=0), but the axis should be equal to 1 for sum of rows and 0 for sum of columns.</p> <p dir="auto">pleas refer to the screenshot below from the documentation web page.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/26023337/85929562-73e1a780-b8d3-11ea-88cd-90ca73d57e85.png"><img src="https://user-images.githubusercontent.com/26023337/85929562-73e1a780-b8d3-11ea-88cd-90ca73d57e85.png" alt="image" style="max-width: 100%;"></a></p>
1
<p dir="auto">It would be very useful for packages to be able to extend chained comparisons like</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="using ModelingToolkit @variables x, y -1 &lt; y - x^2 &lt; 1"><pre class="notranslate"><span class="pl-k">using</span> ModelingToolkit <span class="pl-c1">@variables</span> x, y <span class="pl-k">-</span><span class="pl-c1">1</span> <span class="pl-k">&lt;</span> y <span class="pl-k">-</span> x<span class="pl-k">^</span><span class="pl-c1">2</span> <span class="pl-k">&lt;</span> <span class="pl-c1">1</span></pre></div> <p dir="auto">to act on their types. Currently this is not possible since chained comparisons are lowered straight to a too-low-level form:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; Meta.@lower -1 &lt; y - x^2 &lt; 1 :($(Expr(:thunk, CodeInfo( @ none within `top-level scope' 1 ─ %1 = Core.apply_type(Base.Val, 2) │ %2 = (%1)() │ %3 = Base.literal_pow(^, x, %2) │ %4 = y - %3 │ %5 = -1 &lt; %4 └── goto #3 if not %5 2 ─ %7 = %4 &lt; 1 └── return %7 3 ─ return false ))))"><pre class="notranslate">julia<span class="pl-k">&gt;</span> Meta<span class="pl-k">.</span><span class="pl-c1">@lower</span> <span class="pl-k">-</span><span class="pl-c1">1</span> <span class="pl-k">&lt;</span> y <span class="pl-k">-</span> x<span class="pl-k">^</span><span class="pl-c1">2</span> <span class="pl-k">&lt;</span> <span class="pl-c1">1</span> :(<span class="pl-k">$</span>(<span class="pl-c1">Expr</span>(<span class="pl-c1">:thunk</span>, <span class="pl-c1">CodeInfo</span>( @ none within <span class="pl-s"><span class="pl-pds">`</span>top-level scope'</span> <span class="pl-s">1 ─ %1 = Core.apply_type(Base.Val, 2)</span> <span class="pl-s">│ %2 = (%1)()</span> <span class="pl-s">│ %3 = Base.literal_pow(^, x, %2)</span> <span class="pl-s">│ %4 = y - %3</span> <span class="pl-s">│ %5 = -1 &lt; %4</span> <span class="pl-s">└── goto #3 if not %5</span> <span class="pl-s">2 ─ %7 = %4 &lt; 1</span> <span class="pl-s">└── return %7</span> <span class="pl-s">3 ─ return false</span> <span class="pl-s">))))</span></pre></div>
<p dir="auto">The representation of sparse matrices allow for duplicates. This seems prone to errors, for instance computing the number of non-zeros entries would be incorrect.</p> <p dir="auto">Since this is not allowed in full matrices, does it make any sense to have this be the behavior for sparse matrices?</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; a = spzeros(2, 3) 2×3 SparseMatrixCSC{Float64,Int64} with 0 stored entries julia&gt; a[[1,1,1,1,1,1],2]=1 1 julia&gt; a 2×3 SparseMatrixCSC{Float64,Int64} with 6 stored entries: [1, 2] = 1.0 [1, 2] = 1.0 [1, 2] = 1.0 [1, 2] = 1.0 [1, 2] = 1.0 [1, 2] = 1.0"><pre class="notranslate"><code class="notranslate">julia&gt; a = spzeros(2, 3) 2×3 SparseMatrixCSC{Float64,Int64} with 0 stored entries julia&gt; a[[1,1,1,1,1,1],2]=1 1 julia&gt; a 2×3 SparseMatrixCSC{Float64,Int64} with 6 stored entries: [1, 2] = 1.0 [1, 2] = 1.0 [1, 2] = 1.0 [1, 2] = 1.0 [1, 2] = 1.0 [1, 2] = 1.0 </code></pre></div>
0
<p dir="auto">Choose one: is this a bug report or feature request? Bug report</p> <h3 dir="auto">Input Code</h3> <p dir="auto"><a href="https://babeljs.io/repl/#?babili=false&amp;browsers=&amp;build=&amp;builtIns=false&amp;code_lz=MYewdgzgLgBATiA7jAvDALAbgFCkrUAGwFcBbMVGAJh2wHo6YAREAUwjFkRDgGtsAbgEM4MAN4wA2gkQBdAFzipRMmAUwA-gBoYAOn1hWADygAlJDAC-O_bsMmAyq1iXKY7AEh0i9zD8wPKkUoOGJWLWx_KwjLHDwIEEJWXUIQAHMACnszJB1spygASloGGAB1Hl4IbEERJWkkdQlJFXJ1bT0DYxzka067boKrN09vcUj_QODQ8Im_a2xY3HAEpJT0rO7zRDzB52KgA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=true&amp;fileSize=false&amp;lineWrap=true&amp;presets=es2015%2Ces2016%2Ces2017%2Creact%2Cstage-0%2Cstage-1%2Cstage-2%2Cstage-3&amp;prettier=false&amp;targets=&amp;version=6.26.0&amp;envVersion=" rel="nofollow">https://babeljs.io/repl/#?babili=false&amp;browsers=&amp;build=&amp;builtIns=false&amp;code_lz=MYewdgzgLgBATiA7jAvDALAbgFCkrUAGwFcBbMVGAJh2wHo6YAREAUwjFkRDgGtsAbgEM4MAN4wA2gkQBdAFzipRMmAUwA-gBoYAOn1hWADygAlJDAC-O_bsMmAyq1iXKY7AEh0i9zD8wPKkUoOGJWLWx_KwjLHDwIEEJWXUIQAHMACnszJB1spygASloGGAB1Hl4IbEERJWkkdQlJFXJ1bT0DYxzka067boKrN09vcUj_QODQ8Im_a2xY3HAEpJT0rO7zRDzB52KgA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=true&amp;fileSize=false&amp;lineWrap=true&amp;presets=es2015%2Ces2016%2Ces2017%2Creact%2Cstage-0%2Cstage-1%2Cstage-2%2Cstage-3&amp;prettier=false&amp;targets=&amp;version=6.26.0&amp;envVersion=</a></p> <p dir="auto"><strong>Doesn't Work</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { [row]: { [column]: _, ...nextRow }, ...nextSet } = { 4: { 2: true, }, }; console.log(nextRow, nextSet);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">row</span><span class="pl-kos">]</span>: <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">column</span><span class="pl-kos">]</span>: <span class="pl-s1">_</span><span class="pl-kos">,</span> ...<span class="pl-s1">nextRow</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> ...<span class="pl-s1">nextSet</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">4</span>: <span class="pl-kos">{</span> <span class="pl-c1">2</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-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">nextRow</span><span class="pl-kos">,</span> <span class="pl-s1">nextSet</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Work</strong></p> <p dir="auto">Same code as above:</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { [row]: { [column]: _, ...nextRow }, ...nextSet } = { 4: { 2: true, }, }; console.log(nextRow, nextSet);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">row</span><span class="pl-kos">]</span>: <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">column</span><span class="pl-kos">]</span>: <span class="pl-s1">_</span><span class="pl-kos">,</span> ...<span class="pl-s1">nextRow</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> ...<span class="pl-s1">nextSet</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">4</span>: <span class="pl-kos">{</span> <span class="pl-c1">2</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-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">nextRow</span><span class="pl-kos">,</span> <span class="pl-s1">nextSet</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;presets&quot;: [&quot;react-app&quot;] }"><pre class="notranslate">{ <span class="pl-ent">"presets"</span>: [<span class="pl-s"><span class="pl-pds">"</span>react-app<span class="pl-pds">"</span></span>] }</pre></div> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">Computed numeric properties to be transformed before omitted</p> <h3 dir="auto">Current Behavior</h3> <p dir="auto">Requires to manually transform computed numeric properties to strings before omitting</p> <h3 dir="auto">Possible Solution</h3> <p dir="auto">Computed numeric properties to be transformed to strings before omitted automatically</p> <h3 dir="auto">Context</h3> <p dir="auto">I was surprised to discover a spread operation to work as expected</p> <h3 dir="auto">Your Environment</h3> <table role="table"> <thead> <tr> <th>software</th> <th>version(s)</th> </tr> </thead> <tbody> <tr> <td>Babel</td> <td>^7.0.0-beta.38</td> </tr> <tr> <td>node</td> <td>v9.9.0</td> </tr> <tr> <td>npm</td> <td>5.5.1</td> </tr> <tr> <td>Operating System</td> <td>macOS 10.12.6</td> </tr> </tbody> </table>
<p dir="auto">Choose one: is this a bug report or feature request?<br> bug</p> <h3 dir="auto">Input Code</h3> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const a = { 1: 0, 2: 1, 3: 2 } const i = 1 const { [i]: val, ...rest } = a"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">1</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">2</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">3</span>: <span class="pl-c1">2</span> <span class="pl-kos">}</span> <span class="pl-k">const</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span> <span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span>: <span class="pl-s1">val</span><span class="pl-kos">,</span> ...<span class="pl-s1">rest</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span></pre></div> <h3 dir="auto">Babel Configuration (.babelrc, package.json, cli command)</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;presets&quot;: [&quot;babel-preset-expo&quot;], &quot;env&quot;: { &quot;development&quot;: { &quot;plugins&quot;: [&quot;transform-react-jsx-source&quot;] } } }"><pre class="notranslate">{ <span class="pl-ent">"presets"</span>: [<span class="pl-s"><span class="pl-pds">"</span>babel-preset-expo<span class="pl-pds">"</span></span>], <span class="pl-ent">"env"</span>: { <span class="pl-ent">"development"</span>: { <span class="pl-ent">"plugins"</span>: [<span class="pl-s"><span class="pl-pds">"</span>transform-react-jsx-source<span class="pl-pds">"</span></span>] } } }</pre></div> <h3 dir="auto">Expected Behavior</h3> <p dir="auto">rest should be</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;2&quot;: 1, &quot;3&quot;: 2, }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-s">"2"</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s">"3"</span>: <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-kos">}</span></pre></div> <h3 dir="auto">Current Behavior</h3> <p dir="auto">rest is</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;1&quot;: 0, &quot;2&quot;: 1, &quot;3&quot;: 2, }"><pre class="notranslate"><span class="pl-kos">{</span> <span class="pl-s">"1"</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s">"2"</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-s">"3"</span>: <span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-kos">}</span></pre></div> <h3 dir="auto">Possible Solution</h3> <p dir="auto">indexOf compares with 3 equals and the object key is represented as string<br> </p><div class="Box Box--condensed my-2"> <div class="Box-header f6"> <p class="mb-0 text-bold"> <a href="https://github.com/babel/babel/blob/88b7983e4f1b4d472f37c057afce0e86da7feb0b/packages/babel-helpers/src/helpers.js#L469">babel/packages/babel-helpers/src/helpers.js</a> </p> <p class="mb-0 color-fg-muted"> Line 469 in <a data-pjax="true" class="commit-tease-sha" href="/babel/babel/commit/88b7983e4f1b4d472f37c057afce0e86da7feb0b">88b7983</a> </p> </div> <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data"> <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip=""> <tbody><tr class="border-0"> <td id="L469" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="469"></td> <td id="LC469" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s"> if (excluded.indexOf(key) &gt;= 0) continue;</span> </td> </tr> </tbody></table> </div> </div> <p></p> <h3 dir="auto">Context</h3> <p dir="auto">running react-native application</p> <h3 dir="auto">Your Environment</h3> <p dir="auto">using react native with expo</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;expo&quot;: { &quot;sdkVersion&quot;: &quot;21.0.0&quot; } }"><pre class="notranslate">{ <span class="pl-ent">"expo"</span>: { <span class="pl-ent">"sdkVersion"</span>: <span class="pl-s"><span class="pl-pds">"</span>21.0.0<span class="pl-pds">"</span></span> } }</pre></div> <p dir="auto">dont know about configuration</p>
1
<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-link-to-external-pages-with-anchor-elements" rel="nofollow">http://freecodecamp.com/challenges/waypoint-link-to-external-pages-with-anchor-elements</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">click the anchor then click the run test button and the instructions bellow dissepear and you cannot continue to the next challenge. refreshing the page and click on run test and submit helps.</p>
<p dir="auto">Challenge <a href="http://www.freecodecamp.com/challenges/waypoint-target-the-same-element-with-multiple-jquery-selectors" rel="nofollow">http://www.freecodecamp.com/challenges/waypoint-target-the-same-element-with-multiple-jquery-selectors</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p> <p dir="auto">Code below "You shouldn't need to modify code below this line" initially missing, then once it appears, instructions disappear. Reloading page sometimes causes scrollbar next to instructions to disappear as well. Requires reloading page 4-5 times for everything to return, so maybe it's just me?</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/13267050/9484517/4feb513e-4b62-11e5-9ebf-b184a4062c4b.png"><img src="https://cloud.githubusercontent.com/assets/13267050/9484517/4feb513e-4b62-11e5-9ebf-b184a4062c4b.png" alt="image" style="max-width: 100%;"></a></p>
1
<p dir="auto"><strong>Migrated issue, originally created by Robert Scott (<a href="https://github.com/ris">@ris</a>)</strong></p> <p dir="auto">Using sqlalchemy 1.1.4 with postgresql 9.6.</p> <p dir="auto">The result of an <code class="notranslate">IS NULL</code> comparison is a boolean and in postgres it is usable as such - for instance the following works:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="db=&gt; SELECT (123 IS NULL) = ('blah' IS NULL); ?column? ---------- t (1 row)"><pre class="notranslate"><code class="notranslate">db=&gt; SELECT (123 IS NULL) = ('blah' IS NULL); ?column? ---------- t (1 row) </code></pre></div> <p dir="auto">However the following fails due to operator precedence:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="db=&gt; SELECT 1 IS NULL = 'blah' IS NULL; ERROR: invalid input syntax for type boolean: &quot;blah&quot; LINE 1: SELECT 1 IS NULL = 'blah' IS NULL;"><pre class="notranslate"><code class="notranslate">db=&gt; SELECT 1 IS NULL = 'blah' IS NULL; ERROR: invalid input syntax for type boolean: "blah" LINE 1: SELECT 1 IS NULL = 'blah' IS NULL; </code></pre></div> <p dir="auto">sqlalchemy 1.1.4 unfortunately doesn't include these parentheses:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; str(db.session.query((User.id == None) == (User.name == None))) 'SELECT users.id IS NULL = users.name IS NULL AS anon_1 \nFROM users'"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; str(db.session.query((User.id == None) == (User.name == None))) 'SELECT users.id IS NULL = users.name IS NULL AS anon_1 \nFROM users' </code></pre></div> <p dir="auto">which of course fails in a similar way. Luckily this wrapping <em>is</em> performed correctly for the result of equalities:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; str(db.session.query((User.id == 123) == (User.name == &quot;blah&quot;))) 'SELECT (users.id = %(id_1)s) = (users.name = %(name_1)s) AS anon_1 \nFROM users'"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; str(db.session.query((User.id == 123) == (User.name == "blah"))) 'SELECT (users.id = %(id_1)s) = (users.name = %(name_1)s) AS anon_1 \nFROM users' </code></pre></div> <p dir="auto">and also the workaround of manually casting the result to a boolean works fine:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; str(db.session.query(db.cast(User.id == None, db.Boolean) == db.cast(User.name == None, db.Boolean))) 'SELECT CAST(users.id IS NULL AS BOOLEAN) = CAST(users.name IS NULL AS BOOLEAN) AS anon_1 \nFROM users'"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; str(db.session.query(db.cast(User.id == None, db.Boolean) == db.cast(User.name == None, db.Boolean))) 'SELECT CAST(users.id IS NULL AS BOOLEAN) = CAST(users.name IS NULL AS BOOLEAN) AS anon_1 \nFROM users' </code></pre></div>
<p dir="auto"><strong>Migrated issue, originally created by Michael Bayer (<a href="https://github.com/zzzeek">@zzzeek</a>)</strong></p> <p dir="auto">e.g.:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="--- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -1091,18 +1091,19 @@ _PRECEDENCE = { sub: 7, concat_op: 6, - match_op: 6, - notmatch_op: 6, - - ilike_op: 6, - notilike_op: 6, - like_op: 6, - notlike_op: 6, - in_op: 6, - notin_op: 6, - - is_: 6, - isnot: 6, + + match_op: 5, + notmatch_op: 5, + + ilike_op: 5, + notilike_op: 5, + like_op: 5, + notlike_op: 5, + in_op: 5, + notin_op: 5, + + is_: 5, + isnot: 5, eq: 5, ne: 5,"><pre class="notranslate"><code class="notranslate">--- a/lib/sqlalchemy/sql/operators.py +++ b/lib/sqlalchemy/sql/operators.py @@ -1091,18 +1091,19 @@ _PRECEDENCE = { sub: 7, concat_op: 6, - match_op: 6, - notmatch_op: 6, - - ilike_op: 6, - notilike_op: 6, - like_op: 6, - notlike_op: 6, - in_op: 6, - notin_op: 6, - - is_: 6, - isnot: 6, + + match_op: 5, + notmatch_op: 5, + + ilike_op: 5, + notilike_op: 5, + like_op: 5, + notlike_op: 5, + in_op: 5, + notin_op: 5, + + is_: 5, + isnot: 5, eq: 5, ne: 5, </code></pre></div> <p dir="auto">rationale: MySQL, Oracle and now Postgresql all have relatively flat precedences for these operators:</p> <p dir="auto">(mysql):<br> <a href="https://docs.oracle.com/cd/E17952_01/mysql-5.5-en/operator-precedence.html" rel="nofollow">https://docs.oracle.com/cd/E17952_01/mysql-5.5-en/operator-precedence.html</a></p> <p dir="auto">(oracle):</p> <p dir="auto"><a href="https://docs.oracle.com/cd/B19306_01/server.102/b14200/conditions001.htm#i1034834" rel="nofollow">https://docs.oracle.com/cd/B19306_01/server.102/b14200/conditions001.htm#i1034834</a></p> <p dir="auto">pg 9.4, less flat: <a href="https://www.postgresql.org/docs/9.4/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE" rel="nofollow">https://www.postgresql.org/docs/9.4/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE</a></p> <p dir="auto">pg 9.5, now is more flat: <a href="https://www.postgresql.org/docs/9.5/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE" rel="nofollow">https://www.postgresql.org/docs/9.5/static/sql-syntax-lexical.html#SQL-PRECEDENCE-TABLE</a></p> <p dir="auto">making these all have the same precedence means we'll just have more parenthesis.</p>
1
<h5 dir="auto">ISSUE TYPE</h5> <ul dir="auto"> <li>Feature Idea</li> </ul> <h5 dir="auto">COMPONENT NAME</h5> <p dir="auto">firewalld module</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 (devel 9f2d8c2409) last updated 2017/01/01 20:16:08 (GMT -600) config file = /home/lf/.ansible.cfg configured module search path = Default w/o overrides"><pre class="notranslate"><code class="notranslate">ansible 2.3.0 (devel 9f2d8c2409) last updated 2017/01/01 20:16:08 (GMT -600) config file = /home/lf/.ansible.cfg configured module search path = Default w/o overrides </code></pre></div> <h5 dir="auto">CONFIGURATION</h5> <h5 dir="auto">OS / ENVIRONMENT</h5> <p dir="auto">Fedora 25 Server</p> <h5 dir="auto">SUMMARY</h5> <p dir="auto">It is not currently possible to reproduce configurations such as that created by running <code class="notranslate">firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 -m owner --uid-owner $UID -j ACCEPT</code> because the firewalld module doesn't support direct rules.</p> <p dir="auto">See previous issue at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54870169" data-permission-text="Title is private" data-url="https://github.com/ansible/ansible-modules-extras/issues/209" data-hovercard-type="issue" data-hovercard-url="/ansible/ansible-modules-extras/issues/209/hovercard" href="https://github.com/ansible/ansible-modules-extras/issues/209">ansible/ansible-modules-extras#209</a>.</p>
<p dir="auto">Just got this error:</p> <p dir="auto">TASK: [Launch new EC2 instance] *********************<br> fatal: [127.0.0.1] =&gt; failed to parse: ....<br> {"msg": "InvalidGroup.NotFound: The security group 'sg-4508022d' does not exist", "failed": true}</p> <p dir="auto">It would be great if either ID or the security group could be used here in the playbook YAML.</p>
0
<p dir="auto">[Enter steps to reproduce below:]</p> <ol dir="auto"> <li>...</li> <li>...</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 0.188.0<br> <strong>System</strong>: Mac OS X 10.10.2<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught TypeError: Cannot set property 'localAddress' of undefined</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At net.js:840 TypeError: Cannot set property 'localAddress' of undefined at connect (net.js:840:23) at net.js:943:9 at dns.js:87:18 at process._tickCallback (node.js:366:11) "><pre class="notranslate"><code class="notranslate">At net.js:840 TypeError: Cannot set property 'localAddress' of undefined at connect (net.js:840:23) at net.js:943:9 at dns.js:87:18 at process._tickCallback (node.js:366:11) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" -30:38.0 remote-edit:new-host-sftp (atom-text-editor.editor) 2x -30:35.3 core:backspace (atom-text-editor.editor.mini) -30:07.7 remote-edit:show-open-files (atom-text-editor.editor) -30:02.3 remote-edit:browse (atom-text-editor.editor.mini)"><pre class="notranslate"><code class="notranslate"> -30:38.0 remote-edit:new-host-sftp (atom-text-editor.editor) 2x -30:35.3 core:backspace (atom-text-editor.editor.mini) -30:07.7 remote-edit:show-open-files (atom-text-editor.editor) -30:02.3 remote-edit:browse (atom-text-editor.editor.mini) </code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;audioBeep&quot;: false, &quot;themes&quot;: [ &quot;atom-dark-ui&quot;, &quot;base16-tomorrow-light-theme&quot; ] }, &quot;editor&quot;: { &quot;invisibles&quot;: {} } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: { <span class="pl-ent">"audioBeep"</span>: <span class="pl-c1">false</span>, <span class="pl-ent">"themes"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>atom-dark-ui<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>base16-tomorrow-light-theme<span class="pl-pds">"</span></span> ] }, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"invisibles"</span>: {} } }</pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User autocomplete-css, v0.4.0 autocomplete-html, v0.3.0 autocomplete-paths, v1.0.2 autocomplete-plus, v2.4.0 autocomplete-ruby, v0.0.1 remote-edit, v1.7.2 remote-sync, v2.4.1 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> autocomplete<span class="pl-k">-</span>css, v0.<span class="pl-ii">4</span>.<span class="pl-ii">0</span> autocomplete<span class="pl-k">-</span>html, v0.<span class="pl-ii">3</span>.<span class="pl-ii">0</span> autocomplete<span class="pl-k">-</span>paths, v1.<span class="pl-ii">0</span>.<span class="pl-ii">2</span> autocomplete<span class="pl-k">-</span>plus, v2.<span class="pl-ii">4</span>.<span class="pl-ii">0</span> autocomplete<span class="pl-k">-</span>ruby, v0.<span class="pl-ii">0</span>.<span class="pl-ii">1</span> remote<span class="pl-k">-</span>edit, v1.<span class="pl-ii">7</span>.<span class="pl-ii">2</span> remote<span class="pl-k">-</span>sync, v2.<span class="pl-ii">4</span>.<span class="pl-ii">1</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div>
<p dir="auto">Steps to reproduce:</p> <ol dir="auto"> <li>Nothing? I left my laptop on for a bit and it eventually went into sleep mode while I did other stuff. Interesting information is at the bottom of this report.</li> </ol> <p dir="auto"><strong>Atom Version</strong>: 0.177.0<br> <strong>System</strong>: linux 3.13.0-43-generic (Ubuntu 14.10)<br> <strong>Thrown From</strong>: Atom Core</p> <h3 dir="auto">Stack Trace</h3> <p dir="auto">Uncaught TypeError: Cannot set property 'localAddress' of undefined</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="At net.js:840 TypeError: Cannot set property 'localAddress' of undefined at connect (net.js:840:23) at net.js:943:9 at dns.js:87:18 at process._tickCallback (node.js:364:11) "><pre class="notranslate"><code class="notranslate">At net.js:840 TypeError: Cannot set property 'localAddress' of undefined at connect (net.js:840:23) at net.js:943:9 at dns.js:87:18 at process._tickCallback (node.js:364:11) </code></pre></div> <h3 dir="auto">Commands</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div> <h3 dir="auto">Config</h3> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{ &quot;core&quot;: { &quot;disabledPackages&quot;: [ &quot;archive-view&quot;, &quot;autoflow&quot;, &quot;autosave&quot;, &quot;background-tips&quot;, &quot;deprecation-cop&quot;, &quot;encoding-selector&quot;, &quot;image-view&quot;, &quot;incompatible-packages&quot;, &quot;open-on-github&quot;, &quot;release-notes&quot;, &quot;spell-check&quot;, &quot;styleguide&quot;, &quot;welcome&quot;, &quot;wrap-guide&quot;, &quot;package-generator&quot; ], &quot;themes&quot;: [ &quot;isotope-light-ui&quot;, &quot;fizzy&quot; ] }, &quot;editor&quot;: { &quot;fontFamily&quot;: &quot;Inconsolata&quot;, &quot;fontSize&quot;: 14, &quot;showIndentGuide&quot;: true, &quot;tabLength&quot;: 4, &quot;softTabs&quot;: false, &quot;invisibles&quot;: {} } }"><pre class="notranslate">{ <span class="pl-ent">"core"</span>: { <span class="pl-ent">"disabledPackages"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>archive-view<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>autoflow<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>autosave<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>background-tips<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>deprecation-cop<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>encoding-selector<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>image-view<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>incompatible-packages<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>open-on-github<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>release-notes<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>spell-check<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>styleguide<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>welcome<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>wrap-guide<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>package-generator<span class="pl-pds">"</span></span> ], <span class="pl-ent">"themes"</span>: [ <span class="pl-s"><span class="pl-pds">"</span>isotope-light-ui<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>fizzy<span class="pl-pds">"</span></span> ] }, <span class="pl-ent">"editor"</span>: { <span class="pl-ent">"fontFamily"</span>: <span class="pl-s"><span class="pl-pds">"</span>Inconsolata<span class="pl-pds">"</span></span>, <span class="pl-ent">"fontSize"</span>: <span class="pl-c1">14</span>, <span class="pl-ent">"showIndentGuide"</span>: <span class="pl-c1">true</span>, <span class="pl-ent">"tabLength"</span>: <span class="pl-c1">4</span>, <span class="pl-ent">"softTabs"</span>: <span class="pl-c1">false</span>, <span class="pl-ent">"invisibles"</span>: {} } }</pre></div> <h3 dir="auto">Installed Packages</h3> <div class="highlight highlight-source-coffee notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# User file-icons, v1.4.9 fizzy, v0.15.0 isotope-light-ui, v1.0.0 jenkins, v0.3.1 language-sourcepawn, v0.4.1 linter, v0.11.1 linter-jshint, v0.1.0 sourcepawn-compiler, v0.0.0 travis-ci-status, v0.11.2 # Dev No dev packages"><pre class="notranslate"><span class="pl-c"><span class="pl-c">#</span> User</span> file<span class="pl-k">-</span>icons, v1.<span class="pl-ii">4</span>.<span class="pl-ii">9</span> fizzy, v0.<span class="pl-ii">15</span>.<span class="pl-ii">0</span> isotope<span class="pl-k">-</span>light<span class="pl-k">-</span>ui, v1.<span class="pl-ii">0</span>.<span class="pl-ii">0</span> jenkins, v0.<span class="pl-ii">3</span>.<span class="pl-ii">1</span> language<span class="pl-k">-</span>sourcepawn, v0.<span class="pl-ii">4</span>.<span class="pl-ii">1</span> linter, v0.<span class="pl-ii">11</span>.<span class="pl-ii">1</span> linter<span class="pl-k">-</span>jshint, v0.<span class="pl-ii">1</span>.<span class="pl-ii">0</span> sourcepawn<span class="pl-k">-</span>compiler, v0.<span class="pl-ii">0</span>.<span class="pl-ii">0</span> travis<span class="pl-k">-</span>ci<span class="pl-k">-</span>status, v0.<span class="pl-ii">11</span>.<span class="pl-ii">2</span> <span class="pl-c"><span class="pl-c">#</span> Dev</span> <span class="pl-en">No</span> <span class="pl-en">dev</span> packages</pre></div> <p dir="auto">Some interesting things to note:</p> <ol dir="auto"> <li>This error got thrown multiple times-Notifications is showing 5 errors, all identical.</li> <li>The first error got formatted super-weirdly (see the picture below).</li> <li>Clicking on "Create issue on atom/atom" does...nothing :(. Had to copy the issue to clipboard and paste it here.</li> <li>This error may be due to the Jenkins package, but I wanted to submit it here first just to make sure.</li> </ol> <p dir="auto">Picture:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/2766036/6113670/181784c6-b067-11e4-9570-aeaad8220ab0.png"><img src="https://cloud.githubusercontent.com/assets/2766036/6113670/181784c6-b067-11e4-9570-aeaad8220ab0.png" alt="screenshot from 2015-02-09 14 15 33" style="max-width: 100%;"></a></p>
1
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto">When I add for example 5 files in "pages" folder, and add classic "Link" routing - it works until I do 1-2 minutes break. After 2 minutes when I try to use site there work only 2 routes - rest don't react. Hot reload still works fine, everything works good except this routing. (hrefs with reload works good - only SPA style routing breaking after 2 minutes awaiting.</p> <h2 dir="auto">To Reproduce</h2> <ol dir="auto"> <li>Download my repo from: <a href="https://github.com/kegriz/next-routing-issue">https://github.com/kegriz/next-routing-issue</a></li> <li>install packages: yarn (or nmp install)</li> <li>start dev project: yarn run dev (or npm run dev)</li> <li>open website at <a href="http://localhost:3000" rel="nofollow">http://localhost:3000</a></li> <li>click on every subpage by links</li> <li>last click on for example "aaa"</li> <li>wait 2 minutes without any activity</li> </ol> <h2 dir="auto">Expected behavior</h2> <p dir="auto">After this time there should by only 2 links working correctly.</p> <h2 dir="auto">System information</h2> <ul dir="auto"> <li>OS: [ MacOS Mojave(10.14) ]</li> <li>Browser [chrome &amp; safari]</li> <li>Version of Next.js: [7.0.2]</li> <li>node: v10.11.0</li> <li>npm 6.4.1</li> <li>tested on 3 computers</li> </ul> <h2 dir="auto">Additional context</h2> <p dir="auto">-Hot Reload still working.<br> -Classic (no SPA) link works.</p>
<h1 dir="auto">Bug report</h1> <h2 dir="auto">Describe the bug</h2> <p dir="auto">Either <code class="notranslate">Link</code> or <code class="notranslate">Router</code> stops working when doing client side routing. It seems that HMR may be interrupting the transition between pages. It occurs most frequently if the app is left idle or in the background for a bit of time (although I have experienced it happening whilst clicking around without it being idle)</p> <h2 dir="auto">To Reproduce</h2> <p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:</p> <ol dir="auto"> <li>Clone this repo (<a href="https://github.com/malimccalla/next-routing-issue">https://github.com/malimccalla/next-routing-issue</a>)</li> <li>Install dependencies <code class="notranslate">npm install</code></li> <li>Run the server <code class="notranslate">npm run dev</code></li> <li>Visit all pages by clicking the links</li> <li>Go make a coffee (leave page idle for ~2mins)</li> <li>Attempt to visit all pages by clicking the links</li> <li>Certain links do not navigate to their respective page 😔</li> </ol> <h2 dir="auto">Expected behavior</h2> <p dir="auto">I expect to be able to visit all the individual pages</p> <h2 dir="auto">Actual behaviour</h2> <p dir="auto">Page does not navigate to certain routes. Refreshing the page will fix it</p> <h2 dir="auto">Screenshots</h2> <p dir="auto">Both the "about" and "contact" links do not work (notice the HMR log on the first attempt of each route). After a page refresh they work as expected. If I leave the app idle for roughly 2mins again it will start over with the issue</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/18899991/48032169-7b789980-e14e-11e8-9ec1-959cb9e54b7c.gif"><img src="https://user-images.githubusercontent.com/18899991/48032169-7b789980-e14e-11e8-9ec1-959cb9e54b7c.gif" alt="next-issue" data-animated-image="" style="max-width: 100%;"></a></p> <h2 dir="auto">System information</h2> <ul dir="auto"> <li>mac Mojave 10.14</li> <li>Chrome</li> <li>next.js v7.0.2</li> </ul> <h2 dir="auto">Additional context</h2> <p dir="auto">With the console open you can see that the Router event <code class="notranslate">routeChangeStart</code> fires but <code class="notranslate">routeChangeComplete</code> never does.</p>
1
<p dir="auto">I migrated to the latest Blender exporter, had error on my project file which previously worked. I started a new blender file and found the same error persists.</p> <p dir="auto">To reproduce:</p> <ol dir="auto"> <li>create a new blender file</li> <li>create cube</li> <li>apply blender material</li> <li>apply blender texture (point at any image)</li> <li>Export to JSON</li> <li>Check box titled "Textures"</li> <li>Error when saving:</li> </ol> <p dir="auto">Traceback (most recent call last):<br> File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_three<br> _<em>init</em>_.py", line 812, in execute<br> exporter.export_scene(filepath, settings)<br> File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_three<br> \exporter_<em>init</em>_.py", line 20, in inner<br> func(filepath, options, *args, **kwargs)<br> File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_three<br> \exporter_<em>init</em>_.py", line 51, in export_scene<br> scene_.parse()<br> File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_three<br> \exporter\scene.py", line 102, in parse<br> self._parse_textures()<br> File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_three<br> \exporter\scene.py", line 243, in _parse_textures<br> tex_inst = texture.Texture(texture_name, self)<br> File "C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons\io_three<br> \exporter\texture.py", line 24, in <strong>init</strong><br> self[constants.WRAP] = (num[wrap[0]], num[wrap[1]])<br> KeyError: 'repeat'</p> <p dir="auto">(note that by changing the texture "Image Mapping" to something other than 'repeat' simply alters the key error to whatever you selected)</p> <ul dir="auto"> <li>Blender version 2.74, 2.76, 2.78 (others not tested)</li> <li>Exporter says it is version "1.5" but I know previous versions were also still called "1.5". I used the Master version from 2017-03-03 (today).</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> </ul>
<h5 dir="auto">Description of the problem</h5> <p dir="auto">Blender Exporter Fails to produce a .json file and throws an error that could be improved with clarity</p> <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;/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/__init__.py&quot;, line 812, in execute exporter.export_scene(filepath, settings) File &quot;/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/__init__.py&quot;, line 20, in inner func(filepath, options, *args, **kwargs) File &quot;/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/__init__.py&quot;, line 51, in export_scene scene_.parse() File &quot;/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/scene.py&quot;, line 102, in parse self._parse_textures() File &quot;/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/scene.py&quot;, line 243, in _parse_textures tex_inst = texture.Texture(texture_name, self) File &quot;/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/texture.py&quot;, line 24, in __init__ self[constants.WRAP] = (num[wrap[0]], num[wrap[1]]) KeyError: 'repeat' location: &lt;unknown location&gt;:-1 location: &lt;unknown location&gt;:-1"><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">"/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">812</span>, <span class="pl-s1">in</span> <span class="pl-s1">execute</span> <span class="pl-s1">exporter</span>.<span class="pl-en">export_scene</span>(<span class="pl-s1">filepath</span>, <span class="pl-s1">settings</span>) <span class="pl-v">File</span> <span class="pl-s">"/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">20</span>, <span class="pl-s1">in</span> <span class="pl-s1">inner</span> <span class="pl-en">func</span>(<span class="pl-s1">filepath</span>, <span class="pl-s1">options</span>, <span class="pl-c1">*</span><span class="pl-s1">args</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-v">File</span> <span class="pl-s">"/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/__init__.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">51</span>, <span class="pl-s1">in</span> <span class="pl-s1">export_scene</span> <span class="pl-s1">scene_</span>.<span class="pl-en">parse</span>() <span class="pl-v">File</span> <span class="pl-s">"/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/scene.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">102</span>, <span class="pl-s1">in</span> <span class="pl-s1">parse</span> <span class="pl-s1">self</span>.<span class="pl-en">_parse_textures</span>() <span class="pl-v">File</span> <span class="pl-s">"/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/scene.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">243</span>, <span class="pl-s1">in</span> <span class="pl-s1">_parse_textures</span> <span class="pl-s1">tex_inst</span> <span class="pl-c1">=</span> <span class="pl-s1">texture</span>.<span class="pl-v">Texture</span>(<span class="pl-s1">texture_name</span>, <span class="pl-s1">self</span>) <span class="pl-v">File</span> <span class="pl-s">"/Users/kev/Library/Application Support/Blender/2.78/scripts/addons/io_three/exporter/texture.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">24</span>, <span class="pl-s1">in</span> <span class="pl-s1">__init__</span> <span class="pl-s1">self</span>[<span class="pl-s1">constants</span>.<span class="pl-v">WRAP</span>] <span class="pl-c1">=</span> (<span class="pl-s1">num</span>[<span class="pl-s1">wrap</span>[<span class="pl-c1">0</span>]], <span class="pl-s1">num</span>[<span class="pl-s1">wrap</span>[<span class="pl-c1">1</span>]]) <span class="pl-v">KeyError</span>: <span class="pl-s">'repeat'</span> <span class="pl-s1">location</span>: <span class="pl-c1">&lt;</span><span class="pl-s1">unknown</span> <span class="pl-s1">location</span><span class="pl-c1">&gt;</span>:<span class="pl-c1">-</span><span class="pl-c1">1</span> <span class="pl-s1">location</span>: <span class="pl-c1">&lt;</span><span class="pl-s1">unknown</span> <span class="pl-s1">location</span><span class="pl-c1">&gt;</span>:<span class="pl-c1">-</span><span class="pl-c1">1</span></pre></div> <p dir="auto">Is there any way to get better logging from this?</p>
1
<p dir="auto">Right now,you need follow code to handle xml content.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="CssSelector::disableHtmlExtension(); $xxx=$crawler-&gt;filter('response&gt;tradeBase&gt;total_fee')-&gt;text();"><pre class="notranslate"><code class="notranslate">CssSelector::disableHtmlExtension(); $xxx=$crawler-&gt;filter('response&gt;tradeBase&gt;total_fee')-&gt;text(); </code></pre></div> <p dir="auto">I think we can detect xml in Crawler,and call CssSelector::disableHtmlExtension(); in filter when handle xml.</p>
<p dir="auto">... but that's not really possible when using it from BrowserKit as the Crawler is created directly.</p> <p dir="auto">From <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="15599538" data-permission-text="Title is private" data-url="https://github.com/symfony/symfony/issues/8286" data-hovercard-type="pull_request" data-hovercard-url="/symfony/symfony/pull/8286/hovercard" href="https://github.com/symfony/symfony/pull/8286">#8286</a>:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In functional test, since the crawler is instanciated by the de browser kit (which know the content-type), Can we imagine the browser kit call for us disableHtmlExtension or enableHtmlExtension"><pre class="notranslate"><code class="notranslate">In functional test, since the crawler is instanciated by the de browser kit (which know the content-type), Can we imagine the browser kit call for us disableHtmlExtension or enableHtmlExtension </code></pre></div>
1
<p dir="auto">The "cd" function doesn't automatically expand tilde to your home directory, which is somewhat inconvenient, especially for interactive use. Is this an explicit design decision? We could have "cd" just check if ENV["HOME"] is defined, and if so substitute it for ~.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; cd(&quot;~/Desktop&quot;) ERROR: chdir ~/Desktop: No such file or directory in systemerror at error.jl:38 in cd at file.jl:14"><pre class="notranslate"><code class="notranslate">julia&gt; cd("~/Desktop") ERROR: chdir ~/Desktop: No such file or directory in systemerror at error.jl:38 in cd at file.jl:14 </code></pre></div>
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timholy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timholy">@timholy</a> implemented <code class="notranslate">tilde_expand</code> (see <a href="https://github.com/JuliaLang/julia/blob/master/base/file.jl#L99">file.jl</a>) some time ago and it is now used automatically by a few file-system commands, notably <code class="notranslate">cd()</code>. This concerns me, however, since while it's convenient for some things, it's inconsistently used, and it violates the treatment of strings as just data. What if the name of a file is just <code class="notranslate">~</code>? We're now in a position where that name needs to be escaped and handled specially in code. On the other hand, tilde expansion is awfully handy.</p> <p dir="auto">So here's a possibility: bake tilde expansion into the backtick syntax instead. For example, we could make this work:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; run(`tail ~/.julia_history`) error(&quot;~user tilde expansion not yet implemented&quot;) end tilde_expand(&quot;~&quot;) tilde_expand(&quot;~/foo&quot;) tilde_expand(&quot;~stefan/foo&quot;) tilde_expand(&quot;~stefan&quot;) `cat ~/.julia` run(`cat ~/.julia`) run(`tail ~/.julia_history`) run(`tail $(ENV[&quot;HOME&quot;])/.julia_history`)"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>tail ~/.julia_history<span class="pl-pds">`</span></span>) <span class="pl-c1">error</span>(<span class="pl-s"><span class="pl-pds">"</span>~user tilde expansion not yet implemented<span class="pl-pds">"</span></span>) <span class="pl-k">end</span> <span class="pl-c1">tilde_expand</span>(<span class="pl-s"><span class="pl-pds">"</span>~<span class="pl-pds">"</span></span>) <span class="pl-c1">tilde_expand</span>(<span class="pl-s"><span class="pl-pds">"</span>~/foo<span class="pl-pds">"</span></span>) <span class="pl-c1">tilde_expand</span>(<span class="pl-s"><span class="pl-pds">"</span>~stefan/foo<span class="pl-pds">"</span></span>) <span class="pl-c1">tilde_expand</span>(<span class="pl-s"><span class="pl-pds">"</span>~stefan<span class="pl-pds">"</span></span>) <span class="pl-s"><span class="pl-pds">`</span>cat ~/.julia<span class="pl-pds">`</span></span> <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>cat ~/.julia<span class="pl-pds">`</span></span>) <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>tail ~/.julia_history<span class="pl-pds">`</span></span>) <span class="pl-c1">run</span>(<span class="pl-s"><span class="pl-pds">`</span>tail $(ENV["HOME"])/.julia_history<span class="pl-pds">`</span></span>)</pre></div> <p dir="auto">Currently this just looks for a file literally named <code class="notranslate">~/.julia_history</code>. Obviously, this would be handy for entering commands, but you could also use it in situations where you want shell-like treatment of any string. For example <code class="notranslate">cd(</code>~<code class="notranslate">)</code> would expand to <code class="notranslate">cd(ENV["HOME"])</code> whereas <code class="notranslate">cd("~")</code> would treat its argument literally. Very importantly, tilde expansion would be done at compile time, not based on the run-time data — this is essential to avoiding nasty surprises and corner cases. In particular, interpolated values are not tilde expanded:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; `~` `/Users/stefan` julia&gt; file = &quot;~&quot;; julia&gt; `$file` `~`"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-s"><span class="pl-pds">`</span>~<span class="pl-pds">`</span></span> <span class="pl-s"><span class="pl-pds">`</span>/Users/stefan<span class="pl-pds">`</span></span> julia<span class="pl-k">&gt;</span> file <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"</span>~<span class="pl-pds">"</span></span>; julia<span class="pl-k">&gt;</span> <span class="pl-s"><span class="pl-pds">`</span>$file<span class="pl-pds">`</span></span> <span class="pl-s"><span class="pl-pds">`</span>~<span class="pl-pds">`</span></span></pre></div> <p dir="auto">One corollary of this approach is that file and directory operations have to work with <code class="notranslate">Cmd</code> objects, which maybe ought to be renamed in light of their broadened use-cases under this proposal. Maybe they should be called <code class="notranslate">ShellString</code> objects since backtick strings are basically strings with shell-like behavior. Except that they're also not strings, so maybe that's not a great name either.</p>
1
<p dir="auto">Hi,</p> <p dir="auto">I have a simple dataframe with a multiindex.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="stats.index.names Out[67]: FrozenList([u'day', u'category'])"><pre class="notranslate"><code class="notranslate">stats.index.names Out[67]: FrozenList([u'day', u'category']) </code></pre></div> <p dir="auto">day is a time variable, category is a string.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="stats.index.inferred_type Out[69]: 'mixed' stats.index.dtype_str Out[68]: 'object'"><pre class="notranslate"><code class="notranslate">stats.index.inferred_type Out[69]: 'mixed' stats.index.dtype_str Out[68]: 'object' </code></pre></div> <p dir="auto">if I type</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="idx=pd.IndexSlice stats.loc[idx['2015-01-01',:],:]"><pre class="notranslate"><code class="notranslate">idx=pd.IndexSlice stats.loc[idx['2015-01-01',:],:] </code></pre></div> <p dir="auto">I get the correct slice at '2015-01-01', that is all the observations for all the categories on that day.</p> <p dir="auto">If I type</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="idx=pd.IndexSlice stats.loc[idx['2015',:],:] "><pre class="notranslate"><code class="notranslate">idx=pd.IndexSlice stats.loc[idx['2015',:],:] </code></pre></div> <p dir="auto">I get back (almost) all my observations, even for years other than 2015.</p> <p dir="auto">What can be the problem here? I cannot paste the data unfortunately but I am happy to help in any way.</p> <p dir="auto">Thanks</p>
<p dir="auto">I'm running in what seems to be a bug.<br> I'm using pandas version '0.13.0rc1-29-ga0a527b' from github, python 3.3 on a linux Mint 15 64 bits.</p> <p dir="auto">Here's a minimal example that fails:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import pandas as pd index = pd.MultiIndex(levels=[['foo', 'bar', 'baz', 'qux'], ['one', 'two', 'three']], labels=[[0, 0, 0, 1, 1, 2, 2, 3, 3, 3], [0, 1, 2, 0, 1, 1, 2, 0, 1, 2]], names=['foo_name', 'bar_name']) df_mi = pd.DataFrame(np.random.randn(10, 3), index=index, columns=['A', 'B', 'C']) with pd.get_store('minimal_io.h5') as store: store.put('df_mi', df_mi, format='table') with pd.get_store('minimal_io.h5') as store: ixs = store.select('df_mi', &quot;columns=['A']&quot;)"><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">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span> <span class="pl-s1">index</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">MultiIndex</span>(<span class="pl-s1">levels</span><span class="pl-c1">=</span>[[<span class="pl-s">'foo'</span>, <span class="pl-s">'bar'</span>, <span class="pl-s">'baz'</span>, <span class="pl-s">'qux'</span>], [<span class="pl-s">'one'</span>, <span class="pl-s">'two'</span>, <span class="pl-s">'three'</span>]], <span class="pl-s1">labels</span><span class="pl-c1">=</span>[[<span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">2</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>, <span class="pl-c1">3</span>], [<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">2</span>]], <span class="pl-s1">names</span><span class="pl-c1">=</span>[<span class="pl-s">'foo_name'</span>, <span class="pl-s">'bar_name'</span>]) <span class="pl-s1">df_mi</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">10</span>, <span class="pl-c1">3</span>), <span class="pl-s1">index</span><span class="pl-c1">=</span><span class="pl-s1">index</span>, <span class="pl-s1">columns</span><span class="pl-c1">=</span>[<span class="pl-s">'A'</span>, <span class="pl-s">'B'</span>, <span class="pl-s">'C'</span>]) <span class="pl-k">with</span> <span class="pl-s1">pd</span>.<span class="pl-en">get_store</span>(<span class="pl-s">'minimal_io.h5'</span>) <span class="pl-k">as</span> <span class="pl-s1">store</span>: <span class="pl-s1">store</span>.<span class="pl-en">put</span>(<span class="pl-s">'df_mi'</span>, <span class="pl-s1">df_mi</span>, <span class="pl-s1">format</span><span class="pl-c1">=</span><span class="pl-s">'table'</span>) <span class="pl-k">with</span> <span class="pl-s1">pd</span>.<span class="pl-en">get_store</span>(<span class="pl-s">'minimal_io.h5'</span>) <span class="pl-k">as</span> <span class="pl-s1">store</span>: <span class="pl-s1">ixs</span> <span class="pl-c1">=</span> <span class="pl-s1">store</span>.<span class="pl-en">select</span>(<span class="pl-s">'df_mi'</span>, <span class="pl-s">"columns=['A']"</span>)</pre></div> <p dir="auto">And here is the error message:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="--------------------------------------------------------------------------- KeyError Traceback (most recent call last) &lt;ipython-input-32-005cf4e724e0&gt; in &lt;module&gt;() 17 18 with pd.get_store('minimal_io.h5') as store: ---&gt; 19 ixs = store.select('df_mi', &quot;columns=['A']&quot;) /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/io/pytables.py in select(self, key, where, start, stop, columns, iterator, chunksize, auto_close, **kwargs) 622 623 return TableIterator(self, func, nrows=s.nrows, start=start, stop=stop, --&gt; 624 auto_close=auto_close).get_values() 625 626 def select_as_coordinates( /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/io/pytables.py in get_values(self) 1252 1253 def get_values(self): -&gt; 1254 results = self.func(self.start, self.stop) 1255 self.close() 1256 return results /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/io/pytables.py in func(_start, _stop) 611 def func(_start, _stop): 612 return s.read(where=where, start=_start, stop=_stop, --&gt; 613 columns=columns, **kwargs) 614 615 if iterator or chunksize is not None: /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/io/pytables.py in read(self, columns, **kwargs) 3796 df = super(AppendableMultiFrameTable, self).read( 3797 columns=columns, **kwargs) -&gt; 3798 df = df.set_index(self.levels) 3799 3800 # remove names for 'level_%d' /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/core/frame.py in set_index(self, keys, drop, append, inplace, verify_integrity) 2327 names.append(None) 2328 else: -&gt; 2329 level = frame[col].values 2330 names.append(col) 2331 if drop: /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/core/frame.py in __getitem__(self, key) 1626 return self._getitem_multilevel(key) 1627 else: -&gt; 1628 return self._getitem_column(key) 1629 1630 def _getitem_column(self, key): /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/core/frame.py in _getitem_column(self, key) 1633 # get column 1634 if self.columns.is_unique: -&gt; 1635 return self._get_item_cache(key) 1636 1637 # duplicate columns &amp; possible reduce dimensionaility /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/core/generic.py in _get_item_cache(self, item) 976 res = cache.get(item) 977 if res is None: --&gt; 978 values = self._data.get(item) 979 res = self._box_item_values(item, values) 980 cache[item] = res /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/core/internals.py in get(self, item) 2738 return self.get_for_nan_indexer(indexer) 2739 -&gt; 2740 _, block = self._find_block(item) 2741 return block.get(item) 2742 else: /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/core/internals.py in _find_block(self, item) 3049 3050 def _find_block(self, item): -&gt; 3051 self._check_have(item) 3052 for i, block in enumerate(self.blocks): 3053 if item in block: /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/core/internals.py in _check_have(self, item) 3056 def _check_have(self, item): 3057 if item not in self.items: -&gt; 3058 raise KeyError('no item named %s' % com.pprint_thing(item)) 3059 3060 def reindex_axis(self, new_axis, indexer=None, method=None, axis=0, KeyError: 'no item named foo_name' &gt; /home/guillaume/python3/lib/python3.3/site-packages/pandas-0.13.0rc1_29_ga0a527b-py3.3-linux-x86_64.egg/pandas/core/internals.py(3058)_check_have() 3057 if item not in self.items: -&gt; 3058 raise KeyError('no item named %s' % com.pprint_thing(item)) 3059"><pre class="notranslate"><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span> <span class="pl-v">KeyError</span> <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-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">32</span><span class="pl-c1">-</span><span class="pl-c1">005</span><span class="pl-s1">cf4e724e0</span><span class="pl-c1">&gt;</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-c1">17</span> <span class="pl-c1">18</span> <span class="pl-k">with</span> <span class="pl-s1">pd</span>.<span class="pl-en">get_store</span>(<span class="pl-s">'minimal_io.h5'</span>) <span class="pl-k">as</span> <span class="pl-s1">store</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">19</span> <span class="pl-s1">ixs</span> <span class="pl-c1">=</span> <span class="pl-s1">store</span>.<span class="pl-en">select</span>(<span class="pl-s">'df_mi'</span>, <span class="pl-s">"columns=['A']"</span>) <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">io</span><span class="pl-c1">/</span><span class="pl-s1">pytables</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">select</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>, <span class="pl-s1">where</span>, <span class="pl-s1">start</span>, <span class="pl-s1">stop</span>, <span class="pl-s1">columns</span>, <span class="pl-s1">iterator</span>, <span class="pl-s1">chunksize</span>, <span class="pl-s1">auto_close</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">622</span> <span class="pl-c1">623</span> <span class="pl-k">return</span> <span class="pl-v">TableIterator</span>(<span class="pl-s1">self</span>, <span class="pl-s1">func</span>, <span class="pl-s1">nrows</span><span class="pl-c1">=</span><span class="pl-s1">s</span>.<span class="pl-s1">nrows</span>, <span class="pl-s1">start</span><span class="pl-c1">=</span><span class="pl-s1">start</span>, <span class="pl-s1">stop</span><span class="pl-c1">=</span><span class="pl-s1">stop</span>, <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">624</span> <span class="pl-s1">auto_close</span><span class="pl-c1">=</span><span class="pl-s1">auto_close</span>).<span class="pl-en">get_values</span>() <span class="pl-c1">625</span> <span class="pl-c1">626</span> <span class="pl-k">def</span> <span class="pl-en">select_as_coordinates</span>( <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">.3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span><span class="pl-c1">.0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span><span class="pl-c1">.3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">io</span><span class="pl-c1">/</span><span class="pl-s1">pytables</span>.<span class="pl-s1">py</span> <span class="pl-s1">in</span> <span class="pl-s1">get_values</span>(<span class="pl-s1">self</span>) <span class="pl-c1">1252</span> <span class="pl-c1">1253</span> <span class="pl-k">def</span> <span class="pl-s1">get_values</span>(<span class="pl-s1">self</span>): <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1254</span> <span class="pl-s1">results</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">func</span>(<span class="pl-s1">self</span>.<span class="pl-s1">start</span>, <span class="pl-s1">self</span>.<span class="pl-s1">stop</span>) <span class="pl-c1">1255</span> <span class="pl-s1">self</span>.<span class="pl-en">close</span>() <span class="pl-c1">1256</span> <span class="pl-s1">return</span> <span class="pl-s1">results</span> <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">io</span><span class="pl-c1">/</span><span class="pl-s1">pytables</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">func</span>(<span class="pl-s1">_start</span>, <span class="pl-s1">_stop</span>) <span class="pl-c1">611</span> <span class="pl-k">def</span> <span class="pl-en">func</span>(<span class="pl-s1">_start</span>, <span class="pl-s1">_stop</span>): <span class="pl-c1">612</span> <span class="pl-k">return</span> <span class="pl-s1">s</span>.<span class="pl-en">read</span>(<span class="pl-s1">where</span><span class="pl-c1">=</span><span class="pl-s1">where</span>, <span class="pl-s1">start</span><span class="pl-c1">=</span><span class="pl-s1">_start</span>, <span class="pl-s1">stop</span><span class="pl-c1">=</span><span class="pl-s1">_stop</span>, <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">613</span> <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">columns</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">614</span> <span class="pl-c1">615</span> <span class="pl-k">if</span> <span class="pl-s1">iterator</span> <span class="pl-c1">or</span> <span class="pl-s1">chunksize</span> <span class="pl-c1">is</span> <span class="pl-c1">not</span> <span class="pl-c1">None</span>: <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">io</span><span class="pl-c1">/</span><span class="pl-s1">pytables</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">read</span>(<span class="pl-s1">self</span>, <span class="pl-s1">columns</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">3796</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-en">super</span>(<span class="pl-v">AppendableMultiFrameTable</span>, <span class="pl-s1">self</span>).<span class="pl-en">read</span>( <span class="pl-c1">3797</span> <span class="pl-s1">columns</span><span class="pl-c1">=</span><span class="pl-s1">columns</span>, <span class="pl-c1">**</span><span class="pl-s1">kwargs</span>) <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">3798</span> <span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">df</span>.<span class="pl-en">set_index</span>(<span class="pl-s1">self</span>.<span class="pl-s1">levels</span>) <span class="pl-c1">3799</span> <span class="pl-c1">3800</span> <span class="pl-c"># remove names for 'level_%d'</span> <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">set_index</span>(<span class="pl-s1">self</span>, <span class="pl-s1">keys</span>, <span class="pl-s1">drop</span>, <span class="pl-s1">append</span>, <span class="pl-s1">inplace</span>, <span class="pl-s1">verify_integrity</span>) <span class="pl-c1">2327</span> <span class="pl-s1">names</span>.<span class="pl-en">append</span>(<span class="pl-c1">None</span>) <span class="pl-c1">2328</span> <span class="pl-s1">else</span>: <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2329</span> <span class="pl-s1">level</span> <span class="pl-c1">=</span> <span class="pl-s1">frame</span>[<span class="pl-s1">col</span>].<span class="pl-s1">values</span> <span class="pl-c1">2330</span> <span class="pl-s1">names</span>.<span class="pl-en">append</span>(<span class="pl-s1">col</span>) <span class="pl-c1">2331</span> <span class="pl-k">if</span> <span class="pl-s1">drop</span>: <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">__getitem__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>) <span class="pl-c1">1626</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_getitem_multilevel</span>(<span class="pl-s1">key</span>) <span class="pl-c1">1627</span> <span class="pl-k">else</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">1628</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_getitem_column</span>(<span class="pl-s1">key</span>) <span class="pl-c1">1629</span> <span class="pl-c1">1630</span> <span class="pl-k">def</span> <span class="pl-en">_getitem_column</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>): <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">frame</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_getitem_column</span>(<span class="pl-s1">self</span>, <span class="pl-s1">key</span>) <span class="pl-c1">1633</span> <span class="pl-c"># get column</span> <span class="pl-c1">1634</span> <span class="pl-k">if</span> <span class="pl-s1">self</span>.<span class="pl-s1">columns</span>.<span class="pl-s1">is_unique</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">1635</span> <span class="pl-k">return</span> <span class="pl-s1">self</span>.<span class="pl-en">_get_item_cache</span>(<span class="pl-s1">key</span>) <span class="pl-c1">1636</span> <span class="pl-c1">1637</span> <span class="pl-c"># duplicate columns &amp; possible reduce dimensionaility</span> <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">generic</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_get_item_cache</span>(<span class="pl-s1">self</span>, <span class="pl-s1">item</span>) <span class="pl-c1">976</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">cache</span>.<span class="pl-en">get</span>(<span class="pl-s1">item</span>) <span class="pl-c1">977</span> <span class="pl-k">if</span> <span class="pl-s1">res</span> <span class="pl-c1">is</span> <span class="pl-c1">None</span>: <span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">978</span> <span class="pl-s1">values</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">_data</span>.<span class="pl-en">get</span>(<span class="pl-s1">item</span>) <span class="pl-c1">979</span> <span class="pl-s1">res</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_box_item_values</span>(<span class="pl-s1">item</span>, <span class="pl-s1">values</span>) <span class="pl-c1">980</span> <span class="pl-s1">cache</span>[<span class="pl-s1">item</span>] <span class="pl-c1">=</span> <span class="pl-s1">res</span> <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">internals</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">get</span>(<span class="pl-s1">self</span>, <span class="pl-s1">item</span>) <span class="pl-c1">2738</span> <span class="pl-s1">return</span> <span class="pl-s1">self</span>.<span class="pl-en">get_for_nan_indexer</span>(<span class="pl-s1">indexer</span>) <span class="pl-c1">2739</span> <span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">2740</span> <span class="pl-s1">_</span>, <span class="pl-s1">block</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-en">_find_block</span>(<span class="pl-s1">item</span>) <span class="pl-c1">2741</span> <span class="pl-k">return</span> <span class="pl-s1">block</span>.<span class="pl-en">get</span>(<span class="pl-s1">item</span>) <span class="pl-c1">2742</span> <span class="pl-k">else</span>: <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">internals</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_find_block</span>(<span class="pl-s1">self</span>, <span class="pl-s1">item</span>) <span class="pl-c1">3049</span> <span class="pl-c1">3050</span> <span class="pl-k">def</span> <span class="pl-en">_find_block</span>(<span class="pl-s1">self</span>, <span class="pl-s1">item</span>): <span class="pl-c1">-&gt;</span> <span class="pl-c1">3051</span> <span class="pl-s1">self</span>.<span class="pl-s1">_check_have</span>(<span class="pl-s1">item</span>) <span class="pl-c1">3052</span> <span class="pl-k">for</span> <span class="pl-s1">i</span>, <span class="pl-s1">block</span> <span class="pl-c1">in</span> <span class="pl-s1">enumerate</span>(<span class="pl-s1">self</span>.<span class="pl-s1">blocks</span>): <span class="pl-c1">3053</span> <span class="pl-k">if</span> <span class="pl-s1">item</span> <span class="pl-c1">in</span> <span class="pl-s1">block</span>: <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">internals</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_check_have</span>(<span class="pl-s1">self</span>, <span class="pl-s1">item</span>) <span class="pl-c1">3056</span> <span class="pl-s1">def</span> <span class="pl-en">_check_have</span>(<span class="pl-s1">self</span>, <span class="pl-s1">item</span>): <span class="pl-c1">3057</span> <span class="pl-k">if</span> <span class="pl-s1">item</span> <span class="pl-c1">not</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">items</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">3058</span> <span class="pl-k">raise</span> <span class="pl-v">KeyError</span>(<span class="pl-s">'no item named %s'</span> <span class="pl-c1">%</span> <span class="pl-s1">com</span>.<span class="pl-en">pprint_thing</span>(<span class="pl-s1">item</span>)) <span class="pl-c1">3059</span> <span class="pl-c1">3060</span> <span class="pl-k">def</span> <span class="pl-s1">reindex_axis</span>(<span class="pl-s1">self</span>, <span class="pl-s1">new_axis</span>, <span class="pl-s1">indexer</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">method</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">axis</span><span class="pl-c1">=</span><span class="pl-c1">0</span>, <span class="pl-v">KeyError</span>: <span class="pl-s">'no item named foo_name'</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">/</span><span class="pl-s1">home</span><span class="pl-c1">/</span><span class="pl-s1">guillaume</span><span class="pl-c1">/</span><span class="pl-s1">python3</span><span class="pl-c1">/</span><span class="pl-s1">lib</span><span class="pl-c1">/</span><span class="pl-s1">python3</span>.<span class="pl-c1">3</span><span class="pl-c1">/</span><span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">-</span><span class="pl-c1">0.13</span>.<span class="pl-c1">0</span><span class="pl-s1">rc1_29_ga0a527b</span><span class="pl-c1">-</span><span class="pl-s1">py3</span>.<span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-s1">linux</span><span class="pl-c1">-</span><span class="pl-s1">x86_64</span>.<span class="pl-s1">egg</span><span class="pl-c1">/</span><span class="pl-s1">pandas</span><span class="pl-c1">/</span><span class="pl-s1">core</span><span class="pl-c1">/</span><span class="pl-s1">internals</span>.<span class="pl-en">py</span>(<span class="pl-c1">3058</span>)<span class="pl-s1">_check_have</span>() <span class="pl-c1">3057</span> <span class="pl-k">if</span> <span class="pl-s1">item</span> <span class="pl-c1">not</span> <span class="pl-c1">in</span> <span class="pl-s1">self</span>.<span class="pl-s1">items</span>: <span class="pl-c1">-&gt;</span> <span class="pl-c1">3058</span> <span class="pl-k">raise</span> <span class="pl-v">KeyError</span>(<span class="pl-s">'no item named %s'</span> <span class="pl-c1">%</span> <span class="pl-s1">com</span>.<span class="pl-en">pprint_thing</span>(<span class="pl-s1">item</span>)) <span class="pl-c1">3059</span></pre></div>
0
<p dir="auto">Where <code class="notranslate">trait T: U { ... }</code> , implictly coerce from <code class="notranslate">&amp;T</code> to <code class="notranslate">&amp;U</code>, etc.</p> <p dir="auto">See <a href="https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md">RFC 401</a>.</p> <p dir="auto">Part of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="47341421" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/18469" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/18469/hovercard" href="https://github.com/rust-lang/rust/issues/18469">#18469</a></p>
<p dir="auto">In the <a href="http://doc.rust-lang.org/std/str/index.html" rel="nofollow"><code class="notranslate">std::str</code> API docs</a>, some Struct descriptions beginn with <code class="notranslate">///</code>.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/20063/7132987/baf67ffe-e28e-11e4-9c0f-14f60ab08915.jpg"><img src="https://cloud.githubusercontent.com/assets/20063/7132987/baf67ffe-e28e-11e4-9c0f-14f60ab08915.jpg" alt="std__str_-_rust" style="max-width: 100%;"></a></p> <p dir="auto">Some of these structs are generated by macros, e.g. <code class="notranslate">Matches</code> <a href="https://github.com/rust-lang/rust/blob/5dc8060e3fbf49f225885217dc9f966ce95ff72d/src/libcore/str/mod.rs#L781-L782">here</a>.</p>
0
<p dir="auto">flutter' app crash met with gomobile package .aar</p> <ol dir="auto"> <li> <p dir="auto">I follow the guidence <a href="https://flutter.io/platform-channels/" rel="nofollow">https://flutter.io/platform-channels/</a> ... It works; I can see the result in Simulator.</p> </li> <li> <p dir="auto">I write a simple code in Golang, Gomobile <code class="notranslate">bind -target=android</code>, get <code class="notranslate">.aar</code> file, put into libs, the app stopped when the call happened. The code is very simple:</p> </li> </ol> <div class="highlight highlight-source-go notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" package bond import ( ) func FirstCall() int{ return 20180311 } func SecondCall() string{ return &quot;20180311&quot; } func ThirdCall() { } type Counter struct { Value int } func (c *Counter) Inc() { c.Value++ } func NewCounter() *Counter { return &amp;Counter{ 5 } }"><pre class="notranslate"> <span class="pl-k">package</span> bond <span class="pl-k">import</span> ( ) <span class="pl-k">func</span> <span class="pl-en">FirstCall</span>() <span class="pl-smi">int</span>{ <span class="pl-k">return</span> <span class="pl-c1">20180311</span> } <span class="pl-k">func</span> <span class="pl-en">SecondCall</span>() <span class="pl-smi">string</span>{ <span class="pl-k">return</span> <span class="pl-s">"20180311"</span> } <span class="pl-k">func</span> <span class="pl-en">ThirdCall</span>() { } <span class="pl-k">type</span> <span class="pl-smi">Counter</span> <span class="pl-k">struct</span> { <span class="pl-c1">Value</span> <span class="pl-smi">int</span> } <span class="pl-k">func</span> (<span class="pl-s1">c</span> <span class="pl-c1">*</span><span class="pl-smi">Counter</span>) <span class="pl-en">Inc</span>() { <span class="pl-s1">c</span>.<span class="pl-c1">Value</span><span class="pl-c1">++</span> } <span class="pl-k">func</span> <span class="pl-en">NewCounter</span>() <span class="pl-c1">*</span><span class="pl-smi">Counter</span> { <span class="pl-k">return</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Counter</span>{ <span class="pl-c1">5</span> } }</pre></div> <ol start="3" dir="auto"> <li>I create app with Android Studio, put the <code class="notranslate">.aar</code> file in, and call, it gets the right return.</li> </ol> <p dir="auto">final <code class="notranslate">String stext=Bond.secondCall();</code><br> 4) So the problem is, there are 2 bridges here; each of them work, but put together, it crashes.</p> <p dir="auto">Anybody could give me a solution? Is the problem in Flutter or Gomobile?</p> <h2 dir="auto">Steps to Reproduce</h2> <h2 dir="auto">Logs</h2> <h2 dir="auto">Flutter Doctor</h2>
0
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">When calling <code class="notranslate">matplotlib</code> on macOS the user is logged out...</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib import pyplot as plt plt.plot() plt.show()"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">plt</span>.<span class="pl-en">plot</span>() <span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <p dir="auto">The user is logged out, the screen turns black for a few seconds and then the macOS login screen appears.</p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">I don't expect such a huge problem (user logged out) with the previous code snippet...</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: macOS 10.14.6</li> <li>Matplotlib version: 3.1.1</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): TkAgg</li> <li>Python version: 3.6</li> </ul> <p dir="auto">Python and <code class="notranslate">matplotlib</code> installation using <code class="notranslate">miniconda</code>:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="conda create -n test python=3.6 ipython conda activate test conda install matplotlib"><pre class="notranslate">conda create -n <span class="pl-c1">test</span> python=3.6 ipython conda activate <span class="pl-c1">test</span> conda install matplotlib</pre></div>
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">Trying to view a plot made with Python 3.7, Spyder, and IPython with the Tkinter backend causes a crash and the macOS Mojave login screen appears.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <p dir="auto">Any kind of plot will cause the problem.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 10) y = 2 * x plt.plot(x, y)"><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">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">10</span>) <span class="pl-s1">y</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">plt</span>.<span class="pl-en">plot</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>)</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <p dir="auto">Crash and the Mojave 10.14.6 login screen appears.</p> <p dir="auto">The problem started occurring after the update to Mojave 10.14.6. When I create a plot and click on the plot window icon on the dock, the screen goes black for a second and the macOS login screen appears. After I log in, the windows of Anaconda Navigator and Spyder are gone and their icons are no longer present on the Dock. Activity Monitor however indicates that python is still running.</p> <p dir="auto">I have reproduced this behavior a few times. Switching the IPython backend to Qt5 solved the problem.</p> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">A plot.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: MacOS Mojave 10.14.6 (Darwin 18.7.0)</li> <li>Matplotlib version: 3.1.0</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Tkinter</li> <li>Python version: 3.7.3</li> <li>Jupyter version (if applicable): n/a</li> <li>Other libraries: Spyder 3.3.6, IPython 7.6.1<br> Running the stock Anaconda Distribution 2019.07.</li> </ul>
1
<p dir="auto">any plan to expose typescript parser under Deno namespace?<br> it would be primitive requirement for making code generator or transformations<br> if Deno uses swc under the hood it would be great if we get parser under Deno namespace for development tools;<br> like</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.typescript.parse('const variable = &quot;value&quot;);"><pre class="notranslate"><span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-c1">typescript</span><span class="pl-kos">.</span><span class="pl-c1">parse</span><span class="pl-kos">(</span>'const variable = "value");</pre></div>
<p dir="auto">Should print to stdout a JSON blob representing the typescript AST.</p>
1
<h4 dir="auto">Describe the bug</h4> <h4 dir="auto">Steps/Code to Reproduce</h4> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="To duplicate the issue, please refer to attached zip file. In there you will find a copy of Python script and input data set"><pre class="notranslate"><code class="notranslate">To duplicate the issue, please refer to attached zip file. In there you will find a copy of Python script and input data set </code></pre></div> <h4 dir="auto">Expected Results</h4> <h4 dir="auto">Actual Results</h4> <h4 dir="auto">Versions</h4> <p dir="auto">scikit-learn --&gt; 0.24.2<br> numpy --&gt; 1.19.5<br> scipy --&gt; 1.5.4<br> imblearn --&gt; 0.8.0<br> platform --&gt; Windows-10-10.0.19041-SP0<br> sys --&gt; 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)]</p> <p dir="auto"><a href="https://github.com/scikit-learn/scikit-learn/files/6576764/test_chunked_pairwise_distances.zip">test_chunked_pairwise_distances.zip</a></p>
<p dir="auto">Saw this piece of code when reading the implementation of <code class="notranslate">VotingClassifier</code></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="if isinstance(y, np.ndarray) and len(y.shape) &gt; 1 and y.shape[1] &gt; 1: raise NotImplementedError('Multilabel and multi-output' ' classification is not supported.') "><pre class="notranslate"><span class="pl-k">if</span> <span class="pl-en">isinstance</span>(<span class="pl-s1">y</span>, <span class="pl-s1">np</span>.<span class="pl-s1">ndarray</span>) <span class="pl-c1">and</span> <span class="pl-en">len</span>(<span class="pl-s1">y</span>.<span class="pl-s1">shape</span>) <span class="pl-c1">&gt;</span> <span class="pl-c1">1</span> <span class="pl-c1">and</span> <span class="pl-s1">y</span>.<span class="pl-s1">shape</span>[<span class="pl-c1">1</span>] <span class="pl-c1">&gt;</span> <span class="pl-c1">1</span>: <span class="pl-k">raise</span> <span class="pl-v">NotImplementedError</span>(<span class="pl-s">'Multilabel and multi-output'</span> <span class="pl-s">' classification is not supported.'</span>) </pre></div> <p dir="auto">Is this due to some blocker or challenge? Thanks</p>
0
<h3 dir="auto">Describe the issue:</h3> <p dir="auto">Let's consider the following subroutine in a <code class="notranslate">test.f90</code> file that declares an automatic array from two variables(*):</p> <div class="highlight highlight-source-fortran-modern notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="subroutine test (nx, ny, arr) implicit none integer, intent(in) :: nx integer, intent(in) :: ny integer, dimension(nx*ny) :: arr return end subroutine test"><pre class="notranslate"><span class="pl-k">subroutine</span> <span class="pl-en">test</span> (<span class="pl-v">nx</span>, <span class="pl-v">ny</span>, <span class="pl-v">arr</span>) <span class="pl-k">implicit none</span> <span class="pl-k">integer</span>, <span class="pl-k">intent</span>(<span class="pl-k">in</span>) <span class="pl-k">::</span> nx <span class="pl-k">integer</span>, <span class="pl-k">intent</span>(<span class="pl-k">in</span>) <span class="pl-k">::</span> ny <span class="pl-k">integer</span>, <span class="pl-k">dimension</span>(nx<span class="pl-k">*</span>ny) <span class="pl-k">::</span> arr <span class="pl-k">return</span> <span class="pl-k">end</span> <span class="pl-k">subroutine</span><span class="pl-en"> test</span></pre></div> <p dir="auto">It used to work with numpy 1.22.0 or earlier, despite the <code class="notranslate">Warning: cross-dependence between variables "ny" and "nx"</code> and the weird shape checks as shown in the generated <code class="notranslate">test.pyf</code> signature file below:</p> <div class="highlight highlight-source-fortran-modern notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="! -*- f90 -*- ! Note: the context of this file is case sensitive. python module test ! in interface ! in :test subroutine test(nx,ny,arr) ! in :test:src/test.f90 integer, optional,intent(in),check(shape(arr, 0) == nx * ny),depend(ny,arr) :: nx=shape(arr, 0) / nx integer, optional,intent(in),check(shape(arr, 0) == nx * ny),depend(nx,arr) :: ny=shape(arr, 0) / nx integer dimension(nx * ny) :: arr end subroutine test end interface end python module test ! This file was auto-generated with f2py (version:1.22.0). ! See: ! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e"><pre class="notranslate"><span class="pl-c"><span class="pl-c">!</span> -*- f90 -*-</span> <span class="pl-c"><span class="pl-c">!</span> Note: the context of this file is case sensitive.</span> python <span class="pl-k">module</span> test <span class="pl-c"><span class="pl-c">!</span> in </span> <span class="pl-k">interface</span> <span class="pl-c"><span class="pl-c">!</span> in :test</span> <span class="pl-k">subroutine</span> <span class="pl-en">test</span>(<span class="pl-v">nx</span>,<span class="pl-v">ny</span>,<span class="pl-v">arr</span>) <span class="pl-c"><span class="pl-c">!</span> in :test:src/test.f90</span> <span class="pl-k">integer</span>, <span class="pl-k">optional</span>,<span class="pl-k">intent</span>(<span class="pl-k">in</span>),check(<span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) == nx <span class="pl-k">*</span> ny),depend(ny,arr) <span class="pl-k">::</span> nx<span class="pl-k">=</span><span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) <span class="pl-k">/</span> nx <span class="pl-k">integer</span>, <span class="pl-k">optional</span>,<span class="pl-k">intent</span>(<span class="pl-k">in</span>),check(<span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) == nx <span class="pl-k">*</span> ny),depend(nx,arr) <span class="pl-k">::</span> ny<span class="pl-k">=</span><span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) <span class="pl-k">/</span> nx <span class="pl-k">integer</span> <span class="pl-k">dimension</span>(nx <span class="pl-k">*</span> ny) <span class="pl-k">::</span> arr <span class="pl-k">end</span> <span class="pl-k">subroutine</span><span class="pl-en"> test</span> <span class="pl-k">end interface</span> end python <span class="pl-k">module</span> test <span class="pl-c"><span class="pl-c">!</span> This file was auto-generated with f2py (version:1.22.0).</span> <span class="pl-c"><span class="pl-c">!</span> See:</span> <span class="pl-c"><span class="pl-c">!</span> https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e</span></pre></div> <p dir="auto">However, with numpy 1.22.1 or later, it generates a <code class="notranslate">test.pyf</code> with "swapped" nx / ny:</p> <div class="highlight highlight-source-fortran-modern notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="! -*- f90 -*- ! Note: the context of this file is case sensitive. python module test ! in interface ! in :test subroutine test(nx,ny,arr) ! in :test:src/test.f90 integer, optional,intent(in),check(shape(arr, 0) == nx * ny),depend(ny,arr) :: nx=shape(arr, 0) / ny integer, optional,intent(in),check(shape(arr, 0) == nx * ny),depend(arr,nx) :: ny=shape(arr, 0) / nx integer dimension(nx * ny) :: arr end subroutine test end interface end python module test ! This file was auto-generated with f2py (version:1.22.1). ! See: ! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e"><pre class="notranslate"><span class="pl-c"><span class="pl-c">!</span> -*- f90 -*-</span> <span class="pl-c"><span class="pl-c">!</span> Note: the context of this file is case sensitive.</span> python <span class="pl-k">module</span> test <span class="pl-c"><span class="pl-c">!</span> in </span> <span class="pl-k">interface</span> <span class="pl-c"><span class="pl-c">!</span> in :test</span> <span class="pl-k">subroutine</span> <span class="pl-en">test</span>(<span class="pl-v">nx</span>,<span class="pl-v">ny</span>,<span class="pl-v">arr</span>) <span class="pl-c"><span class="pl-c">!</span> in :test:src/test.f90</span> <span class="pl-k">integer</span>, <span class="pl-k">optional</span>,<span class="pl-k">intent</span>(<span class="pl-k">in</span>),check(<span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) == nx <span class="pl-k">*</span> ny),depend(ny,arr) <span class="pl-k">::</span> nx<span class="pl-k">=</span><span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) <span class="pl-k">/</span> ny <span class="pl-k">integer</span>, <span class="pl-k">optional</span>,<span class="pl-k">intent</span>(<span class="pl-k">in</span>),check(<span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) == nx <span class="pl-k">*</span> ny),depend(arr,nx) <span class="pl-k">::</span> ny<span class="pl-k">=</span><span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) <span class="pl-k">/</span> nx <span class="pl-k">integer</span> <span class="pl-k">dimension</span>(nx <span class="pl-k">*</span> ny) <span class="pl-k">::</span> arr <span class="pl-k">end</span> <span class="pl-k">subroutine</span><span class="pl-en"> test</span> <span class="pl-k">end interface</span> end python <span class="pl-k">module</span> test <span class="pl-c"><span class="pl-c">!</span> This file was auto-generated with f2py (version:1.22.1).</span> <span class="pl-c"><span class="pl-c">!</span> See:</span> <span class="pl-c"><span class="pl-c">!</span> https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e</span></pre></div> <p dir="auto">Which causes the following recursion error when trying to generate the Python extension from the signature file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Reading fortran codes... Reading file 'test.pyf' (format:free) Post-processing... Block: test Block: test Traceback (most recent call last): File &quot;/Users/me/env/bin/f2py&quot;, line 8, in &lt;module&gt; sys.exit(main()) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py&quot;, line 693, in main run_main(sys.argv[1:]) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py&quot;, line 430, in run_main postlist = callcrackfortran(files, options) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py&quot;, line 333, in callcrackfortran postlist = crackfortran.crackfortran(files) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 3209, in crackfortran postlist = postcrack(grouplist[0]) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 1926, in postcrack g = postcrack(g, tab=tab + '\t') File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 1945, in postcrack block['body'] = analyzebody(block, args, tab=tab) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2107, in analyzebody b = postcrack(b, as_, tab=tab + '\t') File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 1945, in postcrack block['body'] = analyzebody(block, args, tab=tab) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2107, in analyzebody b = postcrack(b, as_, tab=tab + '\t') File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 1941, in postcrack block['vars'] = analyzevars(block) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2458, in analyzevars params = get_parameters(vars, get_useparameters(block)) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2329, in get_parameters for n in get_sorted_names(vars): File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2257, in get_sorted_names depend_dict = _calc_depend_dict(vars) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2250, in _calc_depend_dict _get_depend_dict(n, vars, depend_dict) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): [Previous line repeated 979 more times] File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2228, in _get_depend_dict if '=' in vars[name] and not isstring(vars[name]): File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/auxfuncs.py&quot;, line 77, in isstring return _isstring(var) and not isarray(var) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/auxfuncs.py&quot;, line 72, in _isstring return 'typespec' in var and var['typespec'] == 'character' and \ RecursionError: maximum recursion depth exceeded in comparison"><pre class="notranslate"><code class="notranslate">Reading fortran codes... Reading file 'test.pyf' (format:free) Post-processing... Block: test Block: test Traceback (most recent call last): File "/Users/me/env/bin/f2py", line 8, in &lt;module&gt; sys.exit(main()) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 693, in main run_main(sys.argv[1:]) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 430, in run_main postlist = callcrackfortran(files, options) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 333, in callcrackfortran postlist = crackfortran.crackfortran(files) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 3209, in crackfortran postlist = postcrack(grouplist[0]) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 1926, in postcrack g = postcrack(g, tab=tab + '\t') File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 1945, in postcrack block['body'] = analyzebody(block, args, tab=tab) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2107, in analyzebody b = postcrack(b, as_, tab=tab + '\t') File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 1945, in postcrack block['body'] = analyzebody(block, args, tab=tab) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2107, in analyzebody b = postcrack(b, as_, tab=tab + '\t') File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 1941, in postcrack block['vars'] = analyzevars(block) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2458, in analyzevars params = get_parameters(vars, get_useparameters(block)) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2329, in get_parameters for n in get_sorted_names(vars): File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2257, in get_sorted_names depend_dict = _calc_depend_dict(vars) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2250, in _calc_depend_dict _get_depend_dict(n, vars, depend_dict) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): [Previous line repeated 979 more times] File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2228, in _get_depend_dict if '=' in vars[name] and not isstring(vars[name]): File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/auxfuncs.py", line 77, in isstring return _isstring(var) and not isarray(var) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/auxfuncs.py", line 72, in _isstring return 'typespec' in var and var['typespec'] == 'character' and \ RecursionError: maximum recursion depth exceeded in comparison </code></pre></div> <p dir="auto">The difference between the two generated signature files seems to be a result of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1092861959" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/20721" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/20721/hovercard" href="https://github.com/numpy/numpy/pull/20721">#20721</a>.</p> <p dir="auto">(*) Do you think the issue here could be considered as a regression? Or is the example here wrong and we should not declare dimensions of automatic arrays from two or more variables? Not sure about this as I'm not a Fortran expert and haven't found much info about this practice, although I'd be surprised that compilers let us do it if it wasn't valid.</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="see f90 / pyf source above"><pre class="notranslate"><span class="pl-s1">see</span> <span class="pl-s1">f90</span> <span class="pl-c1">/</span> <span class="pl-s1">pyf</span> <span class="pl-s1">source</span> <span class="pl-s1">above</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="See recursion error above."><pre class="notranslate">See recursion error above.</pre></div> <h3 dir="auto">NumPy/Python version information:</h3> <p dir="auto">Numpy 1.22.0 / 1.22.1<br> Python 3.9</p>
<h3 dir="auto">Describe the issue:</h3> <p dir="auto">Let's consider the following subroutine in a <code class="notranslate">test.f90</code> file that declares an automatic array from two variables(*):</p> <div class="highlight highlight-source-fortran-modern notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="subroutine test (nx, ny, arr) implicit none integer, intent(in) :: nx integer, intent(in) :: ny integer, dimension(nx*ny) :: arr return end subroutine test"><pre class="notranslate"><span class="pl-k">subroutine</span> <span class="pl-en">test</span> (<span class="pl-v">nx</span>, <span class="pl-v">ny</span>, <span class="pl-v">arr</span>) <span class="pl-k">implicit none</span> <span class="pl-k">integer</span>, <span class="pl-k">intent</span>(<span class="pl-k">in</span>) <span class="pl-k">::</span> nx <span class="pl-k">integer</span>, <span class="pl-k">intent</span>(<span class="pl-k">in</span>) <span class="pl-k">::</span> ny <span class="pl-k">integer</span>, <span class="pl-k">dimension</span>(nx<span class="pl-k">*</span>ny) <span class="pl-k">::</span> arr <span class="pl-k">return</span> <span class="pl-k">end</span> <span class="pl-k">subroutine</span><span class="pl-en"> test</span></pre></div> <p dir="auto">It used to work with numpy 1.22.0 or earlier, despite the <code class="notranslate">Warning: cross-dependence between variables "ny" and "nx"</code> and the weird shape checks as shown in the generated <code class="notranslate">test.pyf</code> signature file below:</p> <div class="highlight highlight-source-fortran-modern notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="! -*- f90 -*- ! Note: the context of this file is case sensitive. python module test ! in interface ! in :test subroutine test(nx,ny,arr) ! in :test:src/test.f90 integer, optional,intent(in),check(shape(arr, 0) == nx * ny),depend(ny,arr) :: nx=shape(arr, 0) / nx integer, optional,intent(in),check(shape(arr, 0) == nx * ny),depend(nx,arr) :: ny=shape(arr, 0) / nx integer dimension(nx * ny) :: arr end subroutine test end interface end python module test ! This file was auto-generated with f2py (version:1.22.0). ! See: ! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e"><pre class="notranslate"><span class="pl-c"><span class="pl-c">!</span> -*- f90 -*-</span> <span class="pl-c"><span class="pl-c">!</span> Note: the context of this file is case sensitive.</span> python <span class="pl-k">module</span> test <span class="pl-c"><span class="pl-c">!</span> in </span> <span class="pl-k">interface</span> <span class="pl-c"><span class="pl-c">!</span> in :test</span> <span class="pl-k">subroutine</span> <span class="pl-en">test</span>(<span class="pl-v">nx</span>,<span class="pl-v">ny</span>,<span class="pl-v">arr</span>) <span class="pl-c"><span class="pl-c">!</span> in :test:src/test.f90</span> <span class="pl-k">integer</span>, <span class="pl-k">optional</span>,<span class="pl-k">intent</span>(<span class="pl-k">in</span>),check(<span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) == nx <span class="pl-k">*</span> ny),depend(ny,arr) <span class="pl-k">::</span> nx<span class="pl-k">=</span><span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) <span class="pl-k">/</span> nx <span class="pl-k">integer</span>, <span class="pl-k">optional</span>,<span class="pl-k">intent</span>(<span class="pl-k">in</span>),check(<span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) == nx <span class="pl-k">*</span> ny),depend(nx,arr) <span class="pl-k">::</span> ny<span class="pl-k">=</span><span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) <span class="pl-k">/</span> nx <span class="pl-k">integer</span> <span class="pl-k">dimension</span>(nx <span class="pl-k">*</span> ny) <span class="pl-k">::</span> arr <span class="pl-k">end</span> <span class="pl-k">subroutine</span><span class="pl-en"> test</span> <span class="pl-k">end interface</span> end python <span class="pl-k">module</span> test <span class="pl-c"><span class="pl-c">!</span> This file was auto-generated with f2py (version:1.22.0).</span> <span class="pl-c"><span class="pl-c">!</span> See:</span> <span class="pl-c"><span class="pl-c">!</span> https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e</span></pre></div> <p dir="auto">However, with numpy 1.22.1 or later, it generates a <code class="notranslate">test.pyf</code> with "swapped" nx / ny:</p> <div class="highlight highlight-source-fortran-modern notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="! -*- f90 -*- ! Note: the context of this file is case sensitive. python module test ! in interface ! in :test subroutine test(nx,ny,arr) ! in :test:src/test.f90 integer, optional,intent(in),check(shape(arr, 0) == nx * ny),depend(ny,arr) :: nx=shape(arr, 0) / ny integer, optional,intent(in),check(shape(arr, 0) == nx * ny),depend(arr,nx) :: ny=shape(arr, 0) / nx integer dimension(nx * ny) :: arr end subroutine test end interface end python module test ! This file was auto-generated with f2py (version:1.22.1). ! See: ! https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e"><pre class="notranslate"><span class="pl-c"><span class="pl-c">!</span> -*- f90 -*-</span> <span class="pl-c"><span class="pl-c">!</span> Note: the context of this file is case sensitive.</span> python <span class="pl-k">module</span> test <span class="pl-c"><span class="pl-c">!</span> in </span> <span class="pl-k">interface</span> <span class="pl-c"><span class="pl-c">!</span> in :test</span> <span class="pl-k">subroutine</span> <span class="pl-en">test</span>(<span class="pl-v">nx</span>,<span class="pl-v">ny</span>,<span class="pl-v">arr</span>) <span class="pl-c"><span class="pl-c">!</span> in :test:src/test.f90</span> <span class="pl-k">integer</span>, <span class="pl-k">optional</span>,<span class="pl-k">intent</span>(<span class="pl-k">in</span>),check(<span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) == nx <span class="pl-k">*</span> ny),depend(ny,arr) <span class="pl-k">::</span> nx<span class="pl-k">=</span><span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) <span class="pl-k">/</span> ny <span class="pl-k">integer</span>, <span class="pl-k">optional</span>,<span class="pl-k">intent</span>(<span class="pl-k">in</span>),check(<span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) == nx <span class="pl-k">*</span> ny),depend(arr,nx) <span class="pl-k">::</span> ny<span class="pl-k">=</span><span class="pl-k">shape</span>(arr, <span class="pl-c1">0</span>) <span class="pl-k">/</span> nx <span class="pl-k">integer</span> <span class="pl-k">dimension</span>(nx <span class="pl-k">*</span> ny) <span class="pl-k">::</span> arr <span class="pl-k">end</span> <span class="pl-k">subroutine</span><span class="pl-en"> test</span> <span class="pl-k">end interface</span> end python <span class="pl-k">module</span> test <span class="pl-c"><span class="pl-c">!</span> This file was auto-generated with f2py (version:1.22.1).</span> <span class="pl-c"><span class="pl-c">!</span> See:</span> <span class="pl-c"><span class="pl-c">!</span> https://web.archive.org/web/20140822061353/http://cens.ioc.ee/projects/f2py2e</span></pre></div> <p dir="auto">Which causes the following recursion error when trying to generate the Python extension from the signature file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Reading fortran codes... Reading file 'test.pyf' (format:free) Post-processing... Block: test Block: test Traceback (most recent call last): File &quot;/Users/me/env/bin/f2py&quot;, line 8, in &lt;module&gt; sys.exit(main()) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py&quot;, line 693, in main run_main(sys.argv[1:]) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py&quot;, line 430, in run_main postlist = callcrackfortran(files, options) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py&quot;, line 333, in callcrackfortran postlist = crackfortran.crackfortran(files) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 3209, in crackfortran postlist = postcrack(grouplist[0]) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 1926, in postcrack g = postcrack(g, tab=tab + '\t') File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 1945, in postcrack block['body'] = analyzebody(block, args, tab=tab) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2107, in analyzebody b = postcrack(b, as_, tab=tab + '\t') File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 1945, in postcrack block['body'] = analyzebody(block, args, tab=tab) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2107, in analyzebody b = postcrack(b, as_, tab=tab + '\t') File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 1941, in postcrack block['vars'] = analyzevars(block) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2458, in analyzevars params = get_parameters(vars, get_useparameters(block)) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2329, in get_parameters for n in get_sorted_names(vars): File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2257, in get_sorted_names depend_dict = _calc_depend_dict(vars) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2250, in _calc_depend_dict _get_depend_dict(n, vars, depend_dict) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): [Previous line repeated 979 more times] File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py&quot;, line 2228, in _get_depend_dict if '=' in vars[name] and not isstring(vars[name]): File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/auxfuncs.py&quot;, line 77, in isstring return _isstring(var) and not isarray(var) File &quot;/Users/me/env/lib/python3.9/site-packages/numpy/f2py/auxfuncs.py&quot;, line 72, in _isstring return 'typespec' in var and var['typespec'] == 'character' and \ RecursionError: maximum recursion depth exceeded in comparison"><pre class="notranslate"><code class="notranslate">Reading fortran codes... Reading file 'test.pyf' (format:free) Post-processing... Block: test Block: test Traceback (most recent call last): File "/Users/me/env/bin/f2py", line 8, in &lt;module&gt; sys.exit(main()) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 693, in main run_main(sys.argv[1:]) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 430, in run_main postlist = callcrackfortran(files, options) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/f2py2e.py", line 333, in callcrackfortran postlist = crackfortran.crackfortran(files) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 3209, in crackfortran postlist = postcrack(grouplist[0]) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 1926, in postcrack g = postcrack(g, tab=tab + '\t') File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 1945, in postcrack block['body'] = analyzebody(block, args, tab=tab) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2107, in analyzebody b = postcrack(b, as_, tab=tab + '\t') File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 1945, in postcrack block['body'] = analyzebody(block, args, tab=tab) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2107, in analyzebody b = postcrack(b, as_, tab=tab + '\t') File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 1941, in postcrack block['vars'] = analyzevars(block) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2458, in analyzevars params = get_parameters(vars, get_useparameters(block)) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2329, in get_parameters for n in get_sorted_names(vars): File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2257, in get_sorted_names depend_dict = _calc_depend_dict(vars) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2250, in _calc_depend_dict _get_depend_dict(n, vars, depend_dict) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2236, in _get_depend_dict or _get_depend_dict(word, vars, deps): [Previous line repeated 979 more times] File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/crackfortran.py", line 2228, in _get_depend_dict if '=' in vars[name] and not isstring(vars[name]): File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/auxfuncs.py", line 77, in isstring return _isstring(var) and not isarray(var) File "/Users/me/env/lib/python3.9/site-packages/numpy/f2py/auxfuncs.py", line 72, in _isstring return 'typespec' in var and var['typespec'] == 'character' and \ RecursionError: maximum recursion depth exceeded in comparison </code></pre></div> <p dir="auto">The difference between the two generated signature files seems to be a result of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1092861959" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/20721" data-hovercard-type="pull_request" data-hovercard-url="/numpy/numpy/pull/20721/hovercard" href="https://github.com/numpy/numpy/pull/20721">#20721</a>.</p> <p dir="auto">(*) Do you think the issue here could be considered as a regression? Or is the example here wrong and we should not declare dimensions of automatic arrays from two or more variables? Not sure about this as I'm not a Fortran expert and haven't found much info about this practice, although I'd be surprised that compilers let us do it if it wasn't valid.</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="# see f90 / pyf source above"><pre class="notranslate"><span class="pl-c"># see f90 / pyf source above</span></pre></div> <h3 dir="auto">Error message:</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">NumPy/Python version information:</h3> <p dir="auto">Numpy 1.22.0 / 1.22.1<br> Python 3.9</p>
1
<p dir="auto">Hi,</p> <p dir="auto">While buildling pandas 0.20.3 on Debian I had 3 timezone handling related test failures.</p> <p dir="auto">I also get the 3 errors when running the tests in a virtualenv with 0.20.3 installed via pip</p> <p dir="auto">The error tracebacks:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="================================================= FAILURES ================================================== _____________________________ TestTimeZoneSupportDateutil.test_ambiguous_flags ______________________________ self = &lt;pandas.tests.tseries.test_timezones.TestTimeZoneSupportDateutil object at 0x7f742d3702e8&gt; def test_ambiguous_flags(self): # November 6, 2011, fall back, repeat 2 AM hour tz = self.tz('US/Eastern') # Pass in flags to determine right dst transition dr = date_range(datetime(2011, 11, 6, 0), periods=5, freq=offsets.Hour(), tz=tz) times = ['11/06/2011 00:00', '11/06/2011 01:00', '11/06/2011 01:00', '11/06/2011 02:00', '11/06/2011 03:00'] # Test tz_localize di = DatetimeIndex(times) is_dst = [1, 1, 0, 0, 0] localized = di.tz_localize(tz, ambiguous=is_dst) tm.assert_index_equal(dr, localized) tm.assert_index_equal(dr, DatetimeIndex(times, tz=tz, ambiguous=is_dst)) localized = di.tz_localize(tz, ambiguous=np.array(is_dst)) tm.assert_index_equal(dr, localized) localized = di.tz_localize(tz, ambiguous=np.array(is_dst).astype('bool')) tm.assert_index_equal(dr, localized) # Test constructor localized = DatetimeIndex(times, tz=tz, ambiguous=is_dst) tm.assert_index_equal(dr, localized) # Test duplicate times where infer_dst fails times += times di = DatetimeIndex(times) # When the sizes are incompatible, make sure error is raised pytest.raises(Exception, di.tz_localize, tz, ambiguous=is_dst) # When sizes are compatible and there are repeats ('infer' won't work) is_dst = np.hstack((is_dst, is_dst)) localized = di.tz_localize(tz, ambiguous=is_dst) dr = dr.append(dr) tm.assert_index_equal(dr, localized) # When there is no dst transition, nothing special happens dr = date_range(datetime(2011, 6, 1, 0), periods=10, freq=offsets.Hour()) is_dst = np.array([1] * 10) localized = dr.tz_localize(tz) localized_is_dst = dr.tz_localize(tz, ambiguous=is_dst) tm.assert_index_equal(localized, localized_is_dst) # construction with an ambiguous end-point # GH 11626 tz = self.tzstr(&quot;Europe/London&quot;) def f(): date_range(&quot;2013-10-26 23:00&quot;, &quot;2013-10-27 01:00&quot;, tz=&quot;Europe/London&quot;, freq=&quot;H&quot;) pytest.raises(pytz.AmbiguousTimeError, f) times = date_range(&quot;2013-10-26 23:00&quot;, &quot;2013-10-27 01:00&quot;, freq=&quot;H&quot;, tz=tz, ambiguous='infer') assert times[0] == Timestamp('2013-10-26 23:00', tz=tz, freq=&quot;H&quot;) if dateutil.__version__ != LooseVersion('2.6.0'): # see gh-14621 &gt; assert times[-1] == Timestamp('2013-10-27 01:00:00+0000', tz=tz, freq=&quot;H&quot;) E AssertionError: assert Timestamp('2013-10-27 01:00:00+0100', tz='dateutil//usr/share/zoneinfo/Europe/London', freq='H') == Timestamp('2013-10-27 02:00:00+0100', tz='dateutil//usr/share/zoneinfo/Europe/London', freq='H') E + where Timestamp('2013-10-27 02:00:00+0100', tz='dateutil//usr/share/zoneinfo/Europe/London', freq='H') = Timestamp('2013-10-27 01:00:00+0000', tz='dateutil/Europe/London', freq='H') pandas/tests/tseries/test_timezones.py:567: AssertionError ____________________________________ TestTimeZones.test_ambiguous_compat ____________________________________ self = &lt;pandas.tests.tseries.test_timezones.TestTimeZones object at 0x7f742d2ef4e0&gt; def test_ambiguous_compat(self): # validate that pytz and dateutil are compat for dst # when the transition happens tm._skip_if_no_dateutil() tm._skip_if_no_pytz() pytz_zone = 'Europe/London' dateutil_zone = 'dateutil/Europe/London' result_pytz = (Timestamp('2013-10-27 01:00:00') .tz_localize(pytz_zone, ambiguous=0)) result_dateutil = (Timestamp('2013-10-27 01:00:00') .tz_localize(dateutil_zone, ambiguous=0)) assert result_pytz.value == result_dateutil.value assert result_pytz.value == 1382835600000000000 # dateutil 2.6 buggy w.r.t. ambiguous=0 if dateutil.__version__ != LooseVersion('2.6.0'): # see gh-14621 # see https://github.com/dateutil/dateutil/issues/321 &gt; assert (result_pytz.to_pydatetime().tzname() == result_dateutil.to_pydatetime().tzname()) E AssertionError: assert 'GMT' == 'BST' E - GMT E + BST pandas/tests/tseries/test_timezones.py:1263: AssertionError _______________________________________ TestDST.test_fallback_plural ________________________________________ self = &lt;pandas.tests.tseries.test_offsets.TestDST object at 0x7f742d199fd0&gt; def test_fallback_plural(self): # test moving from daylight savings to standard time import dateutil for tz, utc_offsets in self.timezone_utc_offsets.items(): hrs_pre = utc_offsets['utc_offset_daylight'] hrs_post = utc_offsets['utc_offset_standard'] if dateutil.__version__ != LooseVersion('2.6.0'): # buggy ambiguous behavior in 2.6.0 # GH 14621 # https://github.com/dateutil/dateutil/issues/321 self._test_all_offsets( n=3, tstart=self._make_timestamp(self.ts_pre_fallback, hrs_pre, tz), &gt; expected_utc_offset=hrs_post) pandas/tests/tseries/test_offsets.py:4860: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pandas/tests/tseries/test_offsets.py:4803: in _test_all_offsets self._test_offset(offset_name=name, offset_n=n, **kwds) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;pandas.tests.tseries.test_offsets.TestDST object at 0x7f742d199fd0&gt;, offset_name = 'minutes' offset_n = 3 tstart = Timestamp('2013-11-03 01:59:59.999999-0700', tz='dateutil//usr/share/zoneinfo/US/Pacific') expected_utc_offset = -8 def _test_offset(self, offset_name, offset_n, tstart, expected_utc_offset): offset = DateOffset(**{offset_name: offset_n}) t = tstart + offset if expected_utc_offset is not None: &gt; assert get_utc_offset_hours(t) == expected_utc_offset E AssertionError: assert -7.0 == -8 E + where -7.0 = get_utc_offset_hours(Timestamp('2013-11-03 01:02:59.999999-0700', tz='dateutil//usr/share/zoneinfo/US/Pacific')) pandas/tests/tseries/test_offsets.py:4810: AssertionError ============================== 3 failed, 454 passed, 5 skipped in 7.12 seconds ============================== "><pre class="notranslate"><code class="notranslate">================================================= FAILURES ================================================== _____________________________ TestTimeZoneSupportDateutil.test_ambiguous_flags ______________________________ self = &lt;pandas.tests.tseries.test_timezones.TestTimeZoneSupportDateutil object at 0x7f742d3702e8&gt; def test_ambiguous_flags(self): # November 6, 2011, fall back, repeat 2 AM hour tz = self.tz('US/Eastern') # Pass in flags to determine right dst transition dr = date_range(datetime(2011, 11, 6, 0), periods=5, freq=offsets.Hour(), tz=tz) times = ['11/06/2011 00:00', '11/06/2011 01:00', '11/06/2011 01:00', '11/06/2011 02:00', '11/06/2011 03:00'] # Test tz_localize di = DatetimeIndex(times) is_dst = [1, 1, 0, 0, 0] localized = di.tz_localize(tz, ambiguous=is_dst) tm.assert_index_equal(dr, localized) tm.assert_index_equal(dr, DatetimeIndex(times, tz=tz, ambiguous=is_dst)) localized = di.tz_localize(tz, ambiguous=np.array(is_dst)) tm.assert_index_equal(dr, localized) localized = di.tz_localize(tz, ambiguous=np.array(is_dst).astype('bool')) tm.assert_index_equal(dr, localized) # Test constructor localized = DatetimeIndex(times, tz=tz, ambiguous=is_dst) tm.assert_index_equal(dr, localized) # Test duplicate times where infer_dst fails times += times di = DatetimeIndex(times) # When the sizes are incompatible, make sure error is raised pytest.raises(Exception, di.tz_localize, tz, ambiguous=is_dst) # When sizes are compatible and there are repeats ('infer' won't work) is_dst = np.hstack((is_dst, is_dst)) localized = di.tz_localize(tz, ambiguous=is_dst) dr = dr.append(dr) tm.assert_index_equal(dr, localized) # When there is no dst transition, nothing special happens dr = date_range(datetime(2011, 6, 1, 0), periods=10, freq=offsets.Hour()) is_dst = np.array([1] * 10) localized = dr.tz_localize(tz) localized_is_dst = dr.tz_localize(tz, ambiguous=is_dst) tm.assert_index_equal(localized, localized_is_dst) # construction with an ambiguous end-point # GH 11626 tz = self.tzstr("Europe/London") def f(): date_range("2013-10-26 23:00", "2013-10-27 01:00", tz="Europe/London", freq="H") pytest.raises(pytz.AmbiguousTimeError, f) times = date_range("2013-10-26 23:00", "2013-10-27 01:00", freq="H", tz=tz, ambiguous='infer') assert times[0] == Timestamp('2013-10-26 23:00', tz=tz, freq="H") if dateutil.__version__ != LooseVersion('2.6.0'): # see gh-14621 &gt; assert times[-1] == Timestamp('2013-10-27 01:00:00+0000', tz=tz, freq="H") E AssertionError: assert Timestamp('2013-10-27 01:00:00+0100', tz='dateutil//usr/share/zoneinfo/Europe/London', freq='H') == Timestamp('2013-10-27 02:00:00+0100', tz='dateutil//usr/share/zoneinfo/Europe/London', freq='H') E + where Timestamp('2013-10-27 02:00:00+0100', tz='dateutil//usr/share/zoneinfo/Europe/London', freq='H') = Timestamp('2013-10-27 01:00:00+0000', tz='dateutil/Europe/London', freq='H') pandas/tests/tseries/test_timezones.py:567: AssertionError ____________________________________ TestTimeZones.test_ambiguous_compat ____________________________________ self = &lt;pandas.tests.tseries.test_timezones.TestTimeZones object at 0x7f742d2ef4e0&gt; def test_ambiguous_compat(self): # validate that pytz and dateutil are compat for dst # when the transition happens tm._skip_if_no_dateutil() tm._skip_if_no_pytz() pytz_zone = 'Europe/London' dateutil_zone = 'dateutil/Europe/London' result_pytz = (Timestamp('2013-10-27 01:00:00') .tz_localize(pytz_zone, ambiguous=0)) result_dateutil = (Timestamp('2013-10-27 01:00:00') .tz_localize(dateutil_zone, ambiguous=0)) assert result_pytz.value == result_dateutil.value assert result_pytz.value == 1382835600000000000 # dateutil 2.6 buggy w.r.t. ambiguous=0 if dateutil.__version__ != LooseVersion('2.6.0'): # see gh-14621 # see https://github.com/dateutil/dateutil/issues/321 &gt; assert (result_pytz.to_pydatetime().tzname() == result_dateutil.to_pydatetime().tzname()) E AssertionError: assert 'GMT' == 'BST' E - GMT E + BST pandas/tests/tseries/test_timezones.py:1263: AssertionError _______________________________________ TestDST.test_fallback_plural ________________________________________ self = &lt;pandas.tests.tseries.test_offsets.TestDST object at 0x7f742d199fd0&gt; def test_fallback_plural(self): # test moving from daylight savings to standard time import dateutil for tz, utc_offsets in self.timezone_utc_offsets.items(): hrs_pre = utc_offsets['utc_offset_daylight'] hrs_post = utc_offsets['utc_offset_standard'] if dateutil.__version__ != LooseVersion('2.6.0'): # buggy ambiguous behavior in 2.6.0 # GH 14621 # https://github.com/dateutil/dateutil/issues/321 self._test_all_offsets( n=3, tstart=self._make_timestamp(self.ts_pre_fallback, hrs_pre, tz), &gt; expected_utc_offset=hrs_post) pandas/tests/tseries/test_offsets.py:4860: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pandas/tests/tseries/test_offsets.py:4803: in _test_all_offsets self._test_offset(offset_name=name, offset_n=n, **kwds) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = &lt;pandas.tests.tseries.test_offsets.TestDST object at 0x7f742d199fd0&gt;, offset_name = 'minutes' offset_n = 3 tstart = Timestamp('2013-11-03 01:59:59.999999-0700', tz='dateutil//usr/share/zoneinfo/US/Pacific') expected_utc_offset = -8 def _test_offset(self, offset_name, offset_n, tstart, expected_utc_offset): offset = DateOffset(**{offset_name: offset_n}) t = tstart + offset if expected_utc_offset is not None: &gt; assert get_utc_offset_hours(t) == expected_utc_offset E AssertionError: assert -7.0 == -8 E + where -7.0 = get_utc_offset_hours(Timestamp('2013-11-03 01:02:59.999999-0700', tz='dateutil//usr/share/zoneinfo/US/Pacific')) pandas/tests/tseries/test_offsets.py:4810: AssertionError ============================== 3 failed, 454 passed, 5 skipped in 7.12 seconds ============================== </code></pre></div> <p dir="auto">output of show_versions:</p> <h2 dir="auto">INSTALLED VERSIONS</h2> <p dir="auto">commit: None<br> python: 3.5.4.final.0<br> python-bits: 64<br> OS: Linux<br> OS-release: 4.12.0-1-amd64<br> machine: x86_64<br> processor:<br> byteorder: little<br> LC_ALL: None<br> LANG: en_US.UTF-8<br> LOCALE: en_US.UTF-8</p> <p dir="auto">pandas: 0.20.3<br> pytest: 3.2.2<br> pip: 9.0.1<br> setuptools: 36.4.0<br> Cython: None<br> numpy: 1.13.1<br> scipy: None<br> xarray: None<br> IPython: None<br> sphinx: None<br> patsy: None<br> dateutil: 2.6.1<br> pytz: 2017.2<br> blosc: None<br> bottleneck: None<br> tables: None<br> numexpr: None<br> feather: None<br> matplotlib: None<br> openpyxl: None<br> xlrd: None<br> xlwt: None<br> xlsxwriter: None<br> lxml: None<br> bs4: None<br> html5lib: 0.999999999<br> sqlalchemy: None<br> pymysql: None<br> psycopg2: None<br> jinja2: None<br> s3fs: None<br> pandas_gbq: None<br> pandas_datareader: None</p> <blockquote> <blockquote> <blockquote> </blockquote> </blockquote> </blockquote>
<p dir="auto">see for example: <a href="http://stackoverflow.com/questions/9556892/pandas-dataframe-desired-index-has-duplicate-values" rel="nofollow">http://stackoverflow.com/questions/9556892/pandas-dataframe-desired-index-has-duplicate-values</a></p>
0
<p dir="auto">In Julia Master (and 1.6)</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; f(x) = (T=eltype(x); mapreduce(v-&gt;T(v), +, x)) julia&gt; @code_warntype f([3,4,5]) MethodInstance for f(::Vector{Int64}) from f(x) in Main at REPL[2]:1 Arguments #self#::Core.Const(f) x::Vector{Int64} Locals #3::var&quot;#3#4&quot;{DataType} T::Type{Int64} Body::Any 1 ─ (T = Main.eltype(x)) │ %2 = Main.:(var&quot;#3#4&quot;)::Core.Const(var&quot;#3#4&quot;) │ %3 = Core.typeof(T::Core.Const(Int64))::Core.Const(DataType) │ %4 = Core.apply_type(%2, %3)::Core.Const(var&quot;#3#4&quot;{DataType}) │ (#3 = %new(%4, T::Core.Const(Int64))) │ %6 = #3::Core.Const(var&quot;#3#4&quot;{DataType}(Int64)) │ %7 = Main.mapreduce(%6, Main.:+, x)::Any └── return %7"><pre class="notranslate"><code class="notranslate">julia&gt; f(x) = (T=eltype(x); mapreduce(v-&gt;T(v), +, x)) julia&gt; @code_warntype f([3,4,5]) MethodInstance for f(::Vector{Int64}) from f(x) in Main at REPL[2]:1 Arguments #self#::Core.Const(f) x::Vector{Int64} Locals #3::var"#3#4"{DataType} T::Type{Int64} Body::Any 1 ─ (T = Main.eltype(x)) │ %2 = Main.:(var"#3#4")::Core.Const(var"#3#4") │ %3 = Core.typeof(T::Core.Const(Int64))::Core.Const(DataType) │ %4 = Core.apply_type(%2, %3)::Core.Const(var"#3#4"{DataType}) │ (#3 = %new(%4, T::Core.Const(Int64))) │ %6 = #3::Core.Const(var"#3#4"{DataType}(Int64)) │ %7 = Main.mapreduce(%6, Main.:+, x)::Any └── return %7 </code></pre></div> <p dir="auto">Could we make type inference smarter here?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function foo(a::AbstractVector) T = eltype(a) b = Vector{T}() c = [Set{T}() for x in a] return length(c) end a = rand(1:10, 200);"><pre class="notranslate"><code class="notranslate">function foo(a::AbstractVector) T = eltype(a) b = Vector{T}() c = [Set{T}() for x in a] return length(c) end a = rand(1:10, 200); </code></pre></div> <p dir="auto"><code class="notranslate">@code_warntype</code> shows an inference failure in <code class="notranslate">b</code> and <code class="notranslate">c</code>.</p> <p dir="auto">Changing to <code class="notranslate">c = Set{T}[Set{T}() for x in a]</code> fixes <code class="notranslate">c</code>'s inference issue.</p>
1
<p dir="auto">This 3x regression from Julia 1.2 to Julia 1.3 / 1.5 on the simplest random walk simulation is not good:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function walk(T) x = 0 for i in 1:T if rand() &lt; 0.5 x += 1 else x -= 1 end end return x end function run(T, N) sumsq = 0.0 for i in 1:N w = walk(T) sumsq += w^2 end return sumsq / N end"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">walk</span>(T) x <span class="pl-k">=</span> <span class="pl-c1">0</span> <span class="pl-k">for</span> i <span class="pl-k">in</span> <span class="pl-c1">1</span><span class="pl-k">:</span>T <span class="pl-k">if</span> <span class="pl-c1">rand</span>() <span class="pl-k">&lt;</span> <span class="pl-c1">0.5</span> x <span class="pl-k">+=</span> <span class="pl-c1">1</span> <span class="pl-k">else</span> x <span class="pl-k">-=</span> <span class="pl-c1">1</span> <span class="pl-k">end</span> <span class="pl-k">end</span> <span class="pl-k">return</span> x <span class="pl-k">end</span> <span class="pl-k">function</span> <span class="pl-en">run</span>(T, N) sumsq <span class="pl-k">=</span> <span class="pl-c1">0.0</span> <span class="pl-k">for</span> i <span class="pl-k">in</span> <span class="pl-c1">1</span><span class="pl-k">:</span>N w <span class="pl-k">=</span> <span class="pl-c1">walk</span>(T) sumsq <span class="pl-k">+=</span> w<span class="pl-k">^</span><span class="pl-c1">2</span> <span class="pl-k">end</span> <span class="pl-k">return</span> sumsq <span class="pl-k">/</span> N <span class="pl-k">end</span></pre></div> <p dir="auto">Timings after warm-up:<br> Julia 1.2:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @time run(10^4, 10^5) 1.467660 seconds (7 allocations: 208 bytes) 9997.0888 "><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@time</span> <span class="pl-c1">run</span>(<span class="pl-c1">10</span><span class="pl-k">^</span><span class="pl-c1">4</span>, <span class="pl-c1">10</span><span class="pl-k">^</span><span class="pl-c1">5</span>) <span class="pl-c1">1.467660</span> seconds (<span class="pl-c1">7</span> allocations<span class="pl-k">:</span> <span class="pl-c1">208</span> bytes) <span class="pl-c1">9997.0888</span> </pre></div> <p dir="auto">Julia 1.3.1:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @time run(10^4, 10^5); 5.518198 seconds (7 allocations: 208 bytes)"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@time</span> <span class="pl-c1">run</span>(<span class="pl-c1">10</span><span class="pl-k">^</span><span class="pl-c1">4</span>, <span class="pl-c1">10</span><span class="pl-k">^</span><span class="pl-c1">5</span>); <span class="pl-c1">5.518198</span> seconds (<span class="pl-c1">7</span> allocations<span class="pl-k">:</span> <span class="pl-c1">208</span> bytes)</pre></div> <p dir="auto">Julia 1.5-DEV.0:</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; @time run(10^4, 10^5); 4.891881 seconds"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">@time</span> <span class="pl-c1">run</span>(<span class="pl-c1">10</span><span class="pl-k">^</span><span class="pl-c1">4</span>, <span class="pl-c1">10</span><span class="pl-k">^</span><span class="pl-c1">5</span>); <span class="pl-c1">4.891881</span> seconds</pre></div>
<p dir="auto">Default RNGs in threads slowdown performance in Julia 1.3.</p> <p dir="auto">Here is my environment:</p> <blockquote> <p dir="auto">julia&gt; versioninfo(verbose=true)<br> Julia Version 1.3.0<br> Commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/46ce4d79337bdd257ee2e3d2f4bb1c55ff0a5030/hovercard" href="https://github.com/JuliaLang/julia/commit/46ce4d79337bdd257ee2e3d2f4bb1c55ff0a5030"><tt>46ce4d7</tt></a> (2019-11-26 06:09 UTC)<br> Platform Info:<br> OS: Windows (x86_64-w64-mingw32)<br> Microsoft Windows [Version 10.0.18362.535]<br> CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz:<br> speed user nice sys idle irq<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="817954" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/1" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/1/hovercard" href="https://github.com/JuliaLang/julia/issues/1">#1</a> 4008 MHz 633296 0 811953 12463687 195718 ticks<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="817959" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/2" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/2/hovercard" href="https://github.com/JuliaLang/julia/issues/2">#2</a> 4008 MHz 423671 0 328500 13156765 6218 ticks<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="818013" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/3" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/3/hovercard" href="https://github.com/JuliaLang/julia/issues/3">#3</a> 4008 MHz 935390 0 638296 12335250 6562 ticks<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="818058" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/4" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/4/hovercard" href="https://github.com/JuliaLang/julia/issues/4">#4</a> 4008 MHz 436546 0 558328 12913859 2953 ticks<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="818144" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/5" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/5/hovercard" href="https://github.com/JuliaLang/julia/issues/5">#5</a> 4008 MHz 772937 0 654812 12480984 5468 ticks<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="818224" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/6/hovercard" href="https://github.com/JuliaLang/julia/issues/6">#6</a> 4008 MHz 499781 0 503546 12905406 3000 ticks<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="818235" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/7" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/7/hovercard" href="https://github.com/JuliaLang/julia/issues/7">#7</a> 4008 MHz 721312 0 661609 12525812 3750 ticks<br> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="818245" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8/hovercard" href="https://github.com/JuliaLang/julia/issues/8">#8</a> 4008 MHz 578609 0 338343 12991781 2156 ticks</p> <p dir="auto">Memory: 15.953498840332031 GB (8580.15625 MB free)<br> Uptime: 13908.0 sec<br> Load Avg: 0.0 0.0 0.0<br> WORD_SIZE: 64<br> LIBM: libopenlibm<br> LLVM: libLLVM-6.0.1 (ORCJIT, skylake)<br> Environment:<br> JULIA_EDITOR = "C:\Users\Earth\AppData\Local\atom\app-1.42.0\atom.exe" -a<br> JULIA_NUM_THREADS = 8</p> </blockquote> <p dir="auto">In Julia 1.3 each thread has its own default global RNG. Calling rand() in each thread is safe. So the following code that calculates pi returns correct result:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="function par_pi(n::Int) hits = zeros(Int, nthreads()) @threads for i in 1:n x, y = rand(), rand() hits[threadid()] += (x^2 + y^2 &lt;= 1) end 4.0 * sum(hits) / n end @btime par_pi(10_000_000) #102.228 ms (59 allocations: 7.00 KiB)"><pre class="notranslate"><code class="notranslate">function par_pi(n::Int) hits = zeros(Int, nthreads()) @threads for i in 1:n x, y = rand(), rand() hits[threadid()] += (x^2 + y^2 &lt;= 1) end 4.0 * sum(hits) / n end @btime par_pi(10_000_000) #102.228 ms (59 allocations: 7.00 KiB) </code></pre></div> <p dir="auto">But the above code runs 4x slower than the following version that uses manually allocated RNGs:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const threadsRNG = [MersenneTwister() for i in 1:nthreads()] function par_pi2(n::Int) hits = zeros(Int, nthreads()) @threads for i in 1:n rng = threadsRNG[threadid()] x, y = rand(rng), rand(rng) hits[threadid()] += (x^2 + y^2 &lt;= 1) end 4.0 * sum(hits) / n end @time par_pi2(10_000_000) #25.503 ms (59 allocations: 7.00 KiB)"><pre class="notranslate"><code class="notranslate">const threadsRNG = [MersenneTwister() for i in 1:nthreads()] function par_pi2(n::Int) hits = zeros(Int, nthreads()) @threads for i in 1:n rng = threadsRNG[threadid()] x, y = rand(rng), rand(rng) hits[threadid()] += (x^2 + y^2 &lt;= 1) end 4.0 * sum(hits) / n end @time par_pi2(10_000_000) #25.503 ms (59 allocations: 7.00 KiB) </code></pre></div> <p dir="auto">What's strange is that lowered versions are identical to each other except for one generated variable name:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; @code_lowered par_pi(10^7) CodeInfo( 1 ─ %1 = Main.nthreads() │ hits = Main.zeros(Main.Int, %1) │ range = 1:n │ %4 = Main.:(var&quot;#390#threadsfor_fun#31&quot;) │ %5 = Core.typeof(hits) │ %6 = Core.typeof(range) │ %7 = Core.apply_type(%4, %5, %6) │ %8 = hits │ threadsfor_fun = %new(%7, %8, range) │ %10 = Base.Threads.threadid() │ %11 = %10 != 1 └── goto #3 if not %11 2 ─ %13 = Base.invokelatest │ %14 = threadsfor_fun │ (%13)(%14, true) └── goto #4 3 ─ %17 = Base.cconvert(Base.Threads.Any, threadsfor_fun) │ %18 = Base.unsafe_convert(Base.Threads.Any, %17) └── $(Expr(:foreigncall, :(:jl_threading_run), Nothing, svec(Any), 0, :(:ccall), :(%18), :(%17))) 4 ┄ Base.Threads.nothing │ %21 = Main.sum(hits) │ %22 = 4.0 * %21 │ %23 = %22 / n └── return %23 )"><pre class="notranslate"><code class="notranslate">julia&gt; @code_lowered par_pi(10^7) CodeInfo( 1 ─ %1 = Main.nthreads() │ hits = Main.zeros(Main.Int, %1) │ range = 1:n │ %4 = Main.:(var"#390#threadsfor_fun#31") │ %5 = Core.typeof(hits) │ %6 = Core.typeof(range) │ %7 = Core.apply_type(%4, %5, %6) │ %8 = hits │ threadsfor_fun = %new(%7, %8, range) │ %10 = Base.Threads.threadid() │ %11 = %10 != 1 └── goto #3 if not %11 2 ─ %13 = Base.invokelatest │ %14 = threadsfor_fun │ (%13)(%14, true) └── goto #4 3 ─ %17 = Base.cconvert(Base.Threads.Any, threadsfor_fun) │ %18 = Base.unsafe_convert(Base.Threads.Any, %17) └── $(Expr(:foreigncall, :(:jl_threading_run), Nothing, svec(Any), 0, :(:ccall), :(%18), :(%17))) 4 ┄ Base.Threads.nothing │ %21 = Main.sum(hits) │ %22 = 4.0 * %21 │ %23 = %22 / n └── return %23 ) </code></pre></div> <p dir="auto">and</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; @code_lowered par_pi2(10^7) CodeInfo( 1 ─ %1 = Main.nthreads() │ hits = Main.zeros(Main.Int, %1) │ range = 1:n │ %4 = Main.:(var&quot;#372#threadsfor_fun#30&quot;) │ %5 = Core.typeof(hits) │ %6 = Core.typeof(range) │ %7 = Core.apply_type(%4, %5, %6) │ %8 = hits │ threadsfor_fun = %new(%7, %8, range) │ %10 = Base.Threads.threadid() │ %11 = %10 != 1 └── goto #3 if not %11 2 ─ %13 = Base.invokelatest │ %14 = threadsfor_fun │ (%13)(%14, true) └── goto #4 3 ─ %17 = Base.cconvert(Base.Threads.Any, threadsfor_fun) │ %18 = Base.unsafe_convert(Base.Threads.Any, %17) └── $(Expr(:foreigncall, :(:jl_threading_run), Nothing, svec(Any), 0, :(:ccall), :(%18), :(%17))) 4 ┄ Base.Threads.nothing │ %21 = Main.sum(hits) │ %22 = 4.0 * %21 │ %23 = %22 / n └── return %23 )"><pre class="notranslate"><code class="notranslate">julia&gt; @code_lowered par_pi2(10^7) CodeInfo( 1 ─ %1 = Main.nthreads() │ hits = Main.zeros(Main.Int, %1) │ range = 1:n │ %4 = Main.:(var"#372#threadsfor_fun#30") │ %5 = Core.typeof(hits) │ %6 = Core.typeof(range) │ %7 = Core.apply_type(%4, %5, %6) │ %8 = hits │ threadsfor_fun = %new(%7, %8, range) │ %10 = Base.Threads.threadid() │ %11 = %10 != 1 └── goto #3 if not %11 2 ─ %13 = Base.invokelatest │ %14 = threadsfor_fun │ (%13)(%14, true) └── goto #4 3 ─ %17 = Base.cconvert(Base.Threads.Any, threadsfor_fun) │ %18 = Base.unsafe_convert(Base.Threads.Any, %17) └── $(Expr(:foreigncall, :(:jl_threading_run), Nothing, svec(Any), 0, :(:ccall), :(%18), :(%17))) 4 ┄ Base.Threads.nothing │ %21 = Main.sum(hits) │ %22 = 4.0 * %21 │ %23 = %22 / n └── return %23 ) </code></pre></div>
1
<p dir="auto">Sublime Text has an option to match case when doing find and replace (so find "foo" and replace "bar" would change "foo" to "bar", "FOO" to "BAR" and "Foo" to "Bar"). Does Atom offer this?</p>
<p dir="auto">When you search for abc (case insensitive) and want to replace it with xyz, it should match on Abc and replace it with Xyz. This is a feature that I found useful in sublime.</p>
1
<p dir="auto">Hi! After last update i Can't use my PowerToys. When I open the application I see the menu for 1 second and afer that all the window became white with anyting inside...<br> I try to Uninstal and instal last version, i try to uninstal anda instal .NET core but nothing change...<br> Help!</p> <p dir="auto"><a href="http://prntscr.com/snh2lq" rel="nofollow">http://prntscr.com/snh2lq</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.18363.836] PowerToys version: 0.18"><pre class="notranslate"><code class="notranslate">Windows build number: Microsoft Windows [Version 10.0.18363.836] PowerToys version: 0.18 </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ul dir="auto"> <li>Right click on the tray icon</li> <li>Select Settings</li> </ul> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Settings windows appears and allows me to make changes</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">The windows appears, it briefly shows all the settings (as expected) but then the window becomes empty, see screen shot.</p> <h1 dir="auto">Screenshots</h1> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5024446/82576203-72f58180-9b81-11ea-8a15-dd6db1a4d5f8.png"><img width="618" alt="PowerToysSettings" src="https://user-images.githubusercontent.com/5024446/82576203-72f58180-9b81-11ea-8a15-dd6db1a4d5f8.png" style="max-width: 100%;"></a></p>
1
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/628" rel="nofollow">http://projects.scipy.org/numpy/ticket/628</a> on 2007-12-09 by trac user behrisch, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cournape/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cournape">@cournape</a>.</em></p> <p dir="auto">The attached code shows the very same behavior as <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7726045" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/1225" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/1225/hovercard" href="https://github.com/numpy/numpy/issues/1225">#1225</a>, although I can confirm that it works with numpy 1.0.3 on the same machine with te same Python distribution. I used the binary packages from the sourceforge download site together with Python 2.5.1. I did not install any LAPACK or BLAS packages.</p> <p dir="auto">Furthermore it works on openSUSE 10.3 with numpy 1.0.4, libblas3-3.1.1-29, liblapack3-3.1.1-29 (which may be another hint, that it is no duplicate of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7726045" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/1225" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/1225/hovercard" href="https://github.com/numpy/numpy/issues/1225">#1225</a>)</p>
<p dir="auto">Minor, but:</p> <p dir="auto"><code class="notranslate">numpy.histogram</code> deprecates the <code class="notranslate">normed</code> parameter and introduces a new <code class="notranslate">density</code> parameter. <code class="notranslate">numpy.histogram2d</code> should use the same interface.</p> <p dir="auto">Currently, I don't have the time to fix this...</p>
0
<p dir="auto">I have somehow managed to install the Distributions package without having any trace of it on my system. I'm on v0.3.8. For example,</p> <div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; using Distributions # works julia&gt; Pkg.status() 2 required packages: - CPUTime 0.0.4 - MAT 0.2.12 7 additional packages: - BinDeps 0.3.14 - Blosc 0.1.2 - Compat 0.4.9 - HDF5 0.4.18 - SHA 0.0.4 - URIParser 0.0.5 - Zlib 0.1.8 julia&gt; Pkg.installed() Dict{ASCIIString,VersionNumber} with 9 entries: &quot;Blosc&quot; =&gt; v&quot;0.1.2&quot; &quot;Zlib&quot; =&gt; v&quot;0.1.8&quot; &quot;CPUTime&quot; =&gt; v&quot;0.0.4&quot; &quot;BinDeps&quot; =&gt; v&quot;0.3.14&quot; &quot;Compat&quot; =&gt; v&quot;0.4.9&quot; &quot;HDF5&quot; =&gt; v&quot;0.4.18&quot; &quot;MAT&quot; =&gt; v&quot;0.2.12&quot; &quot;SHA&quot; =&gt; v&quot;0.0.4&quot; &quot;URIParser&quot; =&gt; v&quot;0.0.5&quot; julia&gt; Pkg.dir(&quot;Distributions&quot;) &quot;/home/skainswo/.julia/v0.3/Distributions&quot; shell&gt; ls /home/skainswo/.julia/v0.3/ BinDeps/ .cache/ CPUTime/ MAT/ REQUIRE URIParser/ Blosc/ Compat/ HDF5/ METADATA/ SHA/ Zlib/"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-k">using</span> Distributions <span class="pl-c"><span class="pl-c">#</span> works</span> julia<span class="pl-k">&gt;</span> Pkg<span class="pl-k">.</span><span class="pl-c1">status</span>() <span class="pl-c1">2</span> required packages<span class="pl-k">:</span> <span class="pl-k">-</span> CPUTime <span class="pl-c1">0.0</span>.<span class="pl-c1">4</span> <span class="pl-k">-</span> MAT <span class="pl-c1">0.2</span>.<span class="pl-c1">12</span> <span class="pl-c1">7</span> additional packages<span class="pl-k">:</span> <span class="pl-k">-</span> BinDeps <span class="pl-c1">0.3</span>.<span class="pl-c1">14</span> <span class="pl-k">-</span> Blosc <span class="pl-c1">0.1</span>.<span class="pl-c1">2</span> <span class="pl-k">-</span> Compat <span class="pl-c1">0.4</span>.<span class="pl-c1">9</span> <span class="pl-k">-</span> HDF5 <span class="pl-c1">0.4</span>.<span class="pl-c1">18</span> <span class="pl-k">-</span> SHA <span class="pl-c1">0.0</span>.<span class="pl-c1">4</span> <span class="pl-k">-</span> URIParser <span class="pl-c1">0.0</span>.<span class="pl-c1">5</span> <span class="pl-k">-</span> Zlib <span class="pl-c1">0.1</span>.<span class="pl-c1">8</span> julia<span class="pl-k">&gt;</span> Pkg<span class="pl-k">.</span><span class="pl-c1">installed</span>() Dict{ASCIIString,VersionNumber} with <span class="pl-c1">9</span> entries<span class="pl-k">:</span> <span class="pl-s"><span class="pl-pds">"</span>Blosc<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.1.2<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>Zlib<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.1.8<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>CPUTime<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.0.4<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>BinDeps<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.3.14<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>Compat<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.4.9<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>HDF5<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.4.18<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>MAT<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.2.12<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>SHA<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.0.4<span class="pl-pds">"</span></span> <span class="pl-s"><span class="pl-pds">"</span>URIParser<span class="pl-pds">"</span></span> <span class="pl-k">=&gt;</span> <span class="pl-s"><span class="pl-pds"><span class="pl-c1">v</span>"</span>0.0.5<span class="pl-pds">"</span></span> julia<span class="pl-k">&gt;</span> Pkg<span class="pl-k">.</span><span class="pl-c1">dir</span>(<span class="pl-s"><span class="pl-pds">"</span>Distributions<span class="pl-pds">"</span></span>) <span class="pl-s"><span class="pl-pds">"</span>/home/skainswo/.julia/v0.3/Distributions<span class="pl-pds">"</span></span> shell<span class="pl-k">&gt;</span> ls <span class="pl-k">/</span>home<span class="pl-k">/</span>skainswo<span class="pl-k">/</span><span class="pl-k">.</span>julia<span class="pl-k">/</span>v0.<span class="pl-c1">3</span><span class="pl-k">/</span> BinDeps<span class="pl-k">/</span> <span class="pl-k">.</span>cache<span class="pl-k">/</span> CPUTime<span class="pl-k">/</span> MAT<span class="pl-k">/</span> REQUIRE URIParser<span class="pl-k">/</span> Blosc<span class="pl-k">/</span> Compat<span class="pl-k">/</span> HDF5<span class="pl-k">/</span> METADATA<span class="pl-k">/</span> SHA<span class="pl-k">/</span> Zlib<span class="pl-k">/</span></pre></div> <p dir="auto">What's the deal?</p>
<p dir="auto">it works fine if the package is in .julia/v0.x, but if it is somewhere else then it claims there is no <code class="notranslate">test/runtests.jl</code> even if my <code class="notranslate">LOAD_PATH</code> is set such that i can <code class="notranslate">using</code> it. i know that the recommended dev cycle is to keep packages in .julia, but would it make sense to make Pkg.test() work otherwise?</p>
1
<p dir="auto">Hi</p> <p dir="auto">getting weird lines on different font sizes, fontFace changes does not help.<br> Seeing this on all light backgrounds, not vim only.</p> <p dir="auto">Thx<br> Martin<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/3341435/65060161-ad19de00-d977-11e9-99c6-892ac1567678.png"><img src="https://user-images.githubusercontent.com/3341435/65060161-ad19de00-d977-11e9-99c6-892ac1567678.png" alt="Annotation 2019-09-17 181537" 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: 10.0.18362.207 Windows Terminal version (if applicable): 0.2.1831.0, Windows Store Build Any other software? .Net Core SDK 3.0.100-preview6-012264 Powershell Core 6.2.1"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: 10.0.18362.207 Windows Terminal version (if applicable): 0.2.1831.0, Windows Store Build Any other software? .Net Core SDK 3.0.100-preview6-012264 Powershell Core 6.2.1 </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol start="0" dir="auto"> <li>The crash reproduces on both cmd and PSCore.</li> <li>Invoke some program that outputs Chinese. I used <code class="notranslate">dotnet --info</code>.</li> <li>Drag on the output text for selection.</li> </ol> <h1 dir="auto">Expected behavior</h1> <p dir="auto">Chinese text can be selected normally. (using conhost)<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5644458/60793006-5c2c8300-a199-11e9-92c3-65d5c23b2935.png"><img src="https://user-images.githubusercontent.com/5644458/60793006-5c2c8300-a199-11e9-92c3-65d5c23b2935.png" alt="image" style="max-width: 100%;"></a></p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">As soon as the drag covers or starts at Chinese character, the Terminal crashes.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5644458/60793116-9ac23d80-a199-11e9-9f6a-a84355a046ca.png"><img src="https://user-images.githubusercontent.com/5644458/60793116-9ac23d80-a199-11e9-9f6a-a84355a046ca.png" alt="image" style="max-width: 100%;"></a><br> (Dragging over the dual-width <code class="notranslate">(</code> character)</p> <h1 dir="auto">Note</h1> <p dir="auto">This does not reproduce on output of Powershell <code class="notranslate">echo</code> command, and some others.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5644458/60793246-e248c980-a199-11e9-9c9c-ce0315eaff61.png"><img src="https://user-images.githubusercontent.com/5644458/60793246-e248c980-a199-11e9-9c9c-ce0315eaff61.png" alt="image" style="max-width: 100%;"></a><br> Seems not directly caused by certain executables. (Some output of <code class="notranslate">dotnet.exe</code> can be selected.)<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5644458/60793431-4b304180-a19a-11e9-8f53-bacab05bc094.png"><img src="https://user-images.githubusercontent.com/5644458/60793431-4b304180-a19a-11e9-8f53-bacab05bc094.png" alt="image" style="max-width: 100%;"></a><br> Not aware of whether Chinese starts with new line.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5644458/60793605-964a5480-a19a-11e9-93a4-08783567a6ba.png"><img src="https://user-images.githubusercontent.com/5644458/60793605-964a5480-a19a-11e9-93a4-08783567a6ba.png" alt="image" style="max-width: 100%;"></a></p> <h3 dir="auto">My system setting:</h3> <p dir="auto">Display language = Simplified Chinese<br> Code page = Simplified Chinese, UTF8 enabled (Active Code Page: 65001)</p>
0
<p dir="auto"><strong>Elasticsearch version</strong>:<br> 5.0 RC1<br> <strong>Plugins installed</strong>: []<br> discovery-ec2<br> repository-s3</p> <p dir="auto">Using the docker image on ArchLinux</p> <p dir="auto"><strong>Description of the problem including expected versus actual behavior</strong>:<br> discovery ec2 is not working with IAM role, following is the error I see</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2016-10-22T07:10:59,764][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from InstanceProfileCredentialsProvider: Unable to parse Json String. [2016-10-22T07:10:59,764][INFO ][o.e.d.e.AwsEc2UnicastHostsProvider] [J7uy4gr] Exception while retrieving instance list from AWS API: Unable to load AWS credentials from any provider in the chain [2016-10-22T07:10:59,764][DEBUG][o.e.d.e.AwsEc2UnicastHostsProvider] [J7uy4gr] Full exception: com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:131) ~[aws-java-sdk-core-1.10.69.jar:?] at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:11117) ~[aws-java-sdk-ec2-1.10.69.jar:?] at com.amazonaws.services.ec2.AmazonEC2Client.describeInstances(AmazonEC2Client.java:5403) ~[aws-java-sdk-ec2-1.10.69.jar:?] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider.fetchDynamicNodes(AwsEc2UnicastHostsProvider.java:116) [discovery-ec2-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider$DiscoNodesCache.refresh(AwsEc2UnicastHostsProvider.java:234) [discovery-ec2-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider$DiscoNodesCache.refresh(AwsEc2UnicastHostsProvider.java:219) [discovery-ec2-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.common.util.SingleObjectCache.getOrRefresh(SingleObjectCache.java:54) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider.buildDynamicNodes(AwsEc2UnicastHostsProvider.java:102) [discovery-ec2-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.sendPings(UnicastZenPing.java:358) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing$1.doRun(UnicastZenPing.java:272) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:504) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_102] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_102] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]"><pre class="notranslate"><code class="notranslate">[2016-10-22T07:10:59,764][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from InstanceProfileCredentialsProvider: Unable to parse Json String. [2016-10-22T07:10:59,764][INFO ][o.e.d.e.AwsEc2UnicastHostsProvider] [J7uy4gr] Exception while retrieving instance list from AWS API: Unable to load AWS credentials from any provider in the chain [2016-10-22T07:10:59,764][DEBUG][o.e.d.e.AwsEc2UnicastHostsProvider] [J7uy4gr] Full exception: com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:131) ~[aws-java-sdk-core-1.10.69.jar:?] at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:11117) ~[aws-java-sdk-ec2-1.10.69.jar:?] at com.amazonaws.services.ec2.AmazonEC2Client.describeInstances(AmazonEC2Client.java:5403) ~[aws-java-sdk-ec2-1.10.69.jar:?] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider.fetchDynamicNodes(AwsEc2UnicastHostsProvider.java:116) [discovery-ec2-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider$DiscoNodesCache.refresh(AwsEc2UnicastHostsProvider.java:234) [discovery-ec2-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider$DiscoNodesCache.refresh(AwsEc2UnicastHostsProvider.java:219) [discovery-ec2-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.common.util.SingleObjectCache.getOrRefresh(SingleObjectCache.java:54) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider.buildDynamicNodes(AwsEc2UnicastHostsProvider.java:102) [discovery-ec2-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.sendPings(UnicastZenPing.java:358) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing$1.doRun(UnicastZenPing.java:272) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:504) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.0.0-rc1.jar:5.0.0-rc1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_102] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_102] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102] </code></pre></div> <p dir="auto">I am not sure if this is a downstream issue.</p> <p dir="auto">I made a curl request to the metadata endpoint, I do get a proper json string.</p>
<p dir="auto"><strong>Elasticsearch version</strong>: 5.0.0 (<a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/elastic/elasticsearch/commit/e02a4800bdd43f73406e1a7acb616efe98142e4c/hovercard" href="https://github.com/elastic/elasticsearch/commit/e02a4800bdd43f73406e1a7acb616efe98142e4c"><tt>e02a480</tt></a>)<br> <strong>Plugins installed</strong>: <code class="notranslate">discovery-ec2</code></p> <p dir="auto">I tested with elasticsearch 2.4 and 5.0.<br> I can confirm the regression in 5.0. It works fine with 2.4.</p> <p dir="auto">The problem is that even with all traces on, it's hard to understand what is happening. My guess is that the security manager</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2016-10-20T12:41:49,925][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)) [2016-10-20T12:41:49,926][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey) [2016-10-20T12:41:49,926][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from com.amazonaws.auth.profile.ProfileCredentialsProvider@1ad14091: access denied (&quot;java.io.FilePermission&quot; &quot;/home/ubuntu/.aws/credentials&quot; &quot;read&quot;) [2016-10-20T12:41:49,927][DEBUG][c.a.i.EC2MetadataClient ] Connecting to EC2 instance metadata service at URL: http://169.254.169.254/latest/meta-data/iam/security-credentials/ [2016-10-20T12:41:49,951][DEBUG][c.a.i.EC2MetadataClient ] Connecting to EC2 instance metadata service at URL: http://169.254.169.254/latest/meta-data/iam/security-credentials/discovery-tests [2016-10-20T12:41:49,965][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from InstanceProfileCredentialsProvider: Unable to parse Json String. [2016-10-20T12:41:49,966][INFO ][o.e.d.e.AwsEc2UnicastHostsProvider] [dJfktmE] Exception while retrieving instance list from AWS API: Unable to load AWS credentials from any provider in the chain [2016-10-20T12:41:49,967][DEBUG][o.e.d.e.AwsEc2UnicastHostsProvider] [dJfktmE] Full exception: com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:131) ~[aws-java-sdk-core-1.10.69.jar:?] at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:11117) ~[aws-java-sdk-ec2-1.10.69.jar:?] at com.amazonaws.services.ec2.AmazonEC2Client.describeInstances(AmazonEC2Client.java:5403) ~[aws-java-sdk-ec2-1.10.69.jar:?] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider.fetchDynamicNodes(AwsEc2UnicastHostsProvider.java:116) [discovery-ec2-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider$DiscoNodesCache.refresh(AwsEc2UnicastHostsProvider.java:234) [discovery-ec2-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider$DiscoNodesCache.refresh(AwsEc2UnicastHostsProvider.java:219) [discovery-ec2-5.0.0.jar:5.0.0] at org.elasticsearch.common.util.SingleObjectCache.getOrRefresh(SingleObjectCache.java:54) [elasticsearch-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider.buildDynamicNodes(AwsEc2UnicastHostsProvider.java:102) [discovery-ec2-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.sendPings(UnicastZenPing.java:358) [elasticsearch-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing$1.doRun(UnicastZenPing.java:272) [elasticsearch-5.0.0.jar:5.0.0] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:504) [elasticsearch-5.0.0.jar:5.0.0] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.0.0.jar:5.0.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]"><pre class="notranslate"><code class="notranslate">[2016-10-20T12:41:49,925][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)) [2016-10-20T12:41:49,926][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId and aws.secretKey) [2016-10-20T12:41:49,926][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from com.amazonaws.auth.profile.ProfileCredentialsProvider@1ad14091: access denied ("java.io.FilePermission" "/home/ubuntu/.aws/credentials" "read") [2016-10-20T12:41:49,927][DEBUG][c.a.i.EC2MetadataClient ] Connecting to EC2 instance metadata service at URL: http://169.254.169.254/latest/meta-data/iam/security-credentials/ [2016-10-20T12:41:49,951][DEBUG][c.a.i.EC2MetadataClient ] Connecting to EC2 instance metadata service at URL: http://169.254.169.254/latest/meta-data/iam/security-credentials/discovery-tests [2016-10-20T12:41:49,965][DEBUG][c.a.a.AWSCredentialsProviderChain] Unable to load credentials from InstanceProfileCredentialsProvider: Unable to parse Json String. [2016-10-20T12:41:49,966][INFO ][o.e.d.e.AwsEc2UnicastHostsProvider] [dJfktmE] Exception while retrieving instance list from AWS API: Unable to load AWS credentials from any provider in the chain [2016-10-20T12:41:49,967][DEBUG][o.e.d.e.AwsEc2UnicastHostsProvider] [dJfktmE] Full exception: com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:131) ~[aws-java-sdk-core-1.10.69.jar:?] at com.amazonaws.services.ec2.AmazonEC2Client.invoke(AmazonEC2Client.java:11117) ~[aws-java-sdk-ec2-1.10.69.jar:?] at com.amazonaws.services.ec2.AmazonEC2Client.describeInstances(AmazonEC2Client.java:5403) ~[aws-java-sdk-ec2-1.10.69.jar:?] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider.fetchDynamicNodes(AwsEc2UnicastHostsProvider.java:116) [discovery-ec2-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider$DiscoNodesCache.refresh(AwsEc2UnicastHostsProvider.java:234) [discovery-ec2-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider$DiscoNodesCache.refresh(AwsEc2UnicastHostsProvider.java:219) [discovery-ec2-5.0.0.jar:5.0.0] at org.elasticsearch.common.util.SingleObjectCache.getOrRefresh(SingleObjectCache.java:54) [elasticsearch-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.ec2.AwsEc2UnicastHostsProvider.buildDynamicNodes(AwsEc2UnicastHostsProvider.java:102) [discovery-ec2-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing.sendPings(UnicastZenPing.java:358) [elasticsearch-5.0.0.jar:5.0.0] at org.elasticsearch.discovery.zen.ping.unicast.UnicastZenPing$1.doRun(UnicastZenPing.java:272) [elasticsearch-5.0.0.jar:5.0.0] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:504) [elasticsearch-5.0.0.jar:5.0.0] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.0.0.jar:5.0.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91] </code></pre></div> <p dir="auto">The only thing we can see is <code class="notranslate">Unable to parse Json String.</code> which indicates to me the same kind of error <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tlrx/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tlrx">@tlrx</a> have seen previously for <code class="notranslate">repository-s3</code> plugin.</p> <p dir="auto">AWS team is telling us something in another issue we have with their latest versions of their SDK: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="167552799" data-permission-text="Title is private" data-url="https://github.com/aws/aws-sdk-java/issues/788" data-hovercard-type="issue" data-hovercard-url="/aws/aws-sdk-java/issues/788/hovercard" href="https://github.com/aws/aws-sdk-java/issues/788">aws/aws-sdk-java#788</a>:</p> <blockquote> <p dir="auto">Okay I was able to reproduce this problem. I don't know if there is a fix for it though, Jackson relies heavily on the ability to access declared fields. Could you grant the SDK access to this permission in your security policy?</p> </blockquote>
1
<p dir="auto"><strong>Do you want to request a <em>feature</em> or report a <em>bug</em>?</strong></p> <p dir="auto">I want to request a feature</p> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">Using <code class="notranslate">Symbols</code> as element keys throws a type error.</p> <p dir="auto"><strong>If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (<a href="https://jsfiddle.net/Luktwrdm/" rel="nofollow">https://jsfiddle.net/Luktwrdm/</a>) or CodeSandbox (<a href="https://codesandbox.io/s/new" rel="nofollow">https://codesandbox.io/s/new</a>) example below:</strong></p> <p dir="auto">When using <code class="notranslate">key={Symbol('myKeySymbol')}</code> we get the following <code class="notranslate">TypeError: Cannot convert a Symbol value to a string at Object.ReactElement.createElement</code></p> <p dir="auto"><a href="https://codesandbox.io/s/733pypz57j" rel="nofollow">codesandbox here</a></p> <p dir="auto"><strong>What is the expected behavior?</strong><br> Using <code class="notranslate">Symbols</code> as keys should work seamlessly, in my opinion element keys are a perfect use-case for <code class="notranslate">Symbols</code>.</p> <p dir="auto"><strong>Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?</strong></p> <p dir="auto">Using React <code class="notranslate">16.0.0</code> and the browsers affected are Safari, Chrome and Firefox on OSX, but I'm pretty sure this is not browser dependent but a matter of implementation.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" Thanks."><pre class="notranslate"><code class="notranslate"> Thanks. </code></pre></div>
<hr> <h2 dir="auto">Please do not remove the text below this line</h2> <p dir="auto">DevTools version: 4.0.2-2bcc6c6</p> <p dir="auto">Call stack: at d (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:5744)<br> at e.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11:8526)<br> at Ai (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:274200)<br> at Ha (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:55890)<br> at bi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:62939)<br> at Xl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:99535)<br> at Hl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:84255)<br> at Fl (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:81285)<br> at chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:43:25363<br> at n.unstable_runWithPriority (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:56:4368)</p> <p dir="auto">Component stack: in Ai<br> in div<br> in div<br> in div<br> in Or<br> in Unknown<br> in n<br> in Unknown<br> in div<br> in div<br> in Ua<br> in le<br> in ve<br> in ko<br> in Fl</p>
0
<h2 dir="auto">I tried to install caffe2 by following this link "<a href="https://caffe2.ai/docs/getting-started.html?platform=ubuntu&amp;configuration=compile" rel="nofollow">https://caffe2.ai/docs/getting-started.html?platform=ubuntu&amp;configuration=compile</a> "</h2> <p dir="auto">Every step was sucesfully compiled , but unfortunately while compiling the last command</p> <p dir="auto">**<strong>sudo make install</strong></p> <p dir="auto">I am getting the following ### output/error :</p> <p dir="auto">Scanning dependencies of target python_copy_files<br> [ 72%] Built target python_copy_files<br> [ 72%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_adagrad_op_gpu.cu.o<br> [ 72%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/utils/caffe2_gpu_generated_math_gpu.cu.o<br> In file included from /usr/local/cuda/include/common_functions.h:50:0,<br> from /usr/local/cuda/include/cuda_runtime.h:115,<br> from :0:<br> /usr/local/cuda/include/crt/common_functions.h:64:24: error: token ""<strong>CUDACC_VER</strong> is no longer supported. Use <strong>CUDACC_VER_MAJOR</strong>, <strong>CUDACC_VER_MINOR</strong>, and <strong>CUDACC_VER_BUILD</strong> instead."" is not valid in preprocessor expressions<br> #define <strong>CUDACC_VER</strong> "<strong>CUDACC_VER</strong> is no longer supported. Use <strong>CUDACC_VER_MAJOR</strong>, <strong>CUDACC_VER_MINOR</strong>, and <strong>CUDACC_VER_BUILD</strong> instead."<br> ^<br> /usr/include/eigen3/Eigen/src/Core/util/Macros.h:364:33: note: in expansion of macro ‘<strong>CUDACC_VER</strong>’<br> #if defined(<strong>CUDACC_VER</strong>) &amp;&amp; <strong>CUDACC_VER</strong> &gt;= 70500 &amp;&amp; __cplusplus &gt; 199711L<br> ^<br> CMake Error at caffe2_gpu_generated_math_gpu.cu.o.Release.cmake:219 (message):<br> Error generating<br> /home/rv/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/utils/./caffe2_gpu_generated_math_gpu.cu.o</p> <p dir="auto">caffe2/CMakeFiles/caffe2_gpu.dir/build.make:63: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/utils/caffe2_gpu_generated_math_gpu.cu.o' failed<br> make[2]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/utils/caffe2_gpu_generated_math_gpu.cu.o] Error 1<br> CMakeFiles/Makefile2:1456: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/all' failed<br> make[1]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/all] Error 2<br> Makefile:138: recipe for target 'all' failed<br> make: *** [all] Error 2</p> <p dir="auto"><strong>python collect_env.py</strong><br> Collecting environment information...<br> PyTorch version: 0.4.0<br> Is debug build: No<br> CUDA used to build PyTorch: 8.0.61</p> <p dir="auto">OS: Ubuntu 16.04.4 LTS<br> GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609<br> CMake version: version 3.5.1</p> <p dir="auto">Python version: 2.7<br> Is CUDA available: Yes<br> CUDA runtime version: 9.0.252<br> GPU models and configuration: GPU 0: Quadro M2000M<br> Nvidia driver version: 384.130<br> cuDNN version: Probably one of the following:<br> /usr/lib/x86_64-linux-gnu/libcudnn.so.7.1.4<br> /usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a</p> <p dir="auto">Versions of relevant libraries:<br> [pip] numpy (1.11.0)<br> [pip] torch (0.4.0)<br> [conda] Could not collect</p>
<p dir="auto"><strong>### Installation guide followed -</strong><br> <a href="https://caffe2.ai/docs/getting-started.html?platform=ubuntu&amp;configuration=compile" rel="nofollow">https://caffe2.ai/docs/getting-started.html?platform=ubuntu&amp;configuration=compile</a></p> <h3 dir="auto"><strong>Error Output</strong></h3> <p dir="auto">Scanning dependencies of target python_copy_files<br> [ 72%] Built target python_copy_files<br> [ 72%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_adagrad_op_gpu.cu.o<br> [ 72%] Building NVCC (Device) object caffe2/CMakeFiles/caffe2_gpu.dir/utils/caffe2_gpu_generated_math_gpu.cu.o<br> In file included from /usr/local/cuda/include/common_functions.h:50:0,<br> from /usr/local/cuda/include/cuda_runtime.h:115,<br> from :0:<br> /usr/local/cuda/include/crt/common_functions.h:64:24: error: token ""<strong>CUDACC_VER</strong> is no longer supported. Use <strong>CUDACC_VER_MAJOR</strong>, <strong>CUDACC_VER_MINOR</strong>, and <strong>CUDACC_VER_BUILD</strong> instead."" is not valid in preprocessor expressions<br> #define <strong>CUDACC_VER</strong> "<strong>CUDACC_VER</strong> is no longer supported. Use <strong>CUDACC_VER_MAJOR</strong>, <strong>CUDACC_VER_MINOR</strong>, and <strong>CUDACC_VER_BUILD</strong> instead."<br> ^<br> /usr/include/eigen3/Eigen/src/Core/util/Macros.h:364:33: note: in expansion of macro ‘<strong>CUDACC_VER</strong>’<br> #if defined(<strong>CUDACC_VER</strong>) &amp;&amp; <strong>CUDACC_VER</strong> &gt;= 70500 &amp;&amp; __cplusplus &gt; 199711L<br> ^<br> CMake Error at caffe2_gpu_generated_math_gpu.cu.o.Release.cmake:219 (message):<br> Error generating<br> /home/rv/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/utils/./caffe2_gpu_generated_math_gpu.cu.o</p> <p dir="auto">caffe2/CMakeFiles/caffe2_gpu.dir/build.make:63: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/utils/caffe2_gpu_generated_math_gpu.cu.o' failed<br> make[2]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/utils/caffe2_gpu_generated_math_gpu.cu.o] Error 1<br> CMakeFiles/Makefile2:1456: recipe for target 'caffe2/CMakeFiles/caffe2_gpu.dir/all' failed<br> make[1]: *** [caffe2/CMakeFiles/caffe2_gpu.dir/all] Error 2<br> Makefile:138: recipe for target 'all' failed<br> make: *** [all] Error 2</p> <h2 dir="auto">Issue description</h2> <p dir="auto">Error during running the command<br> $ <strong>sudo make install</strong></p> <h2 dir="auto">Code example</h2> <h3 dir="auto"><strong>output of cmake ..</strong></h3> <p dir="auto">Does not need to define long separately.<br> -- std::exception_ptr is supported.<br> -- NUMA is available<br> -- Current compiler supports avx2 extention. Will build perfkernels.<br> -- Building using own protobuf under third_party per request.<br> -- Use custom protobuf build.<br> -- Caffe2 protobuf include directory: <math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="a21919c5dc5e071dc3303b95e0117d06">$&amp;lt;BUILD_INTERFACE:/home/rv/pytorch/third_party/protobuf/src&amp;gt;$</math-renderer>&amp;lt;INSTALL_INTERFACE:include&gt;<br> -- The BLAS backend of choice:Eigen<br> -- Brace yourself, we are building NNPACK<br> -- Found PythonInterp: /usr/bin/python (found version "2.7.12")<br> -- Caffe2: Cannot find gflags automatically. Using legacy find.<br> -- Caffe2: Found gflags (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)<br> -- Caffe2: Cannot find glog automatically. Using legacy find.<br> -- Caffe2: Found glog (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)<br> -- Found lmdb (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/liblmdb.so)<br> -- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.so)<br> -- Found Snappy (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libsnappy.so)<br> -- Found Numa (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libnuma.so)<br> -- OpenCV found (/usr/share/OpenCV)<br> -- Found system Eigen at /usr/include/eigen3<br> -- Found PythonInterp: /usr/bin/python (found suitable version "2.7.12", minimum required is "2.7")<br> -- NumPy ver. 1.11.0 found (include: /usr/lib/python2.7/dist-packages/numpy/core/include)<br> -- Could NOT find pybind11 (missing: pybind11_INCLUDE_DIR)<br> -- MPI support found<br> -- MPI compile flags:<br> -- MPI include path: /usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include/usr/lib/openmpi/include/usr/lib/openmpi/include/openmpi<br> -- MPI LINK flags path: -Wl,-rpath -Wl,/usr/lib/openmpi/lib -Wl,--enable-new-dtags<br> -- MPI libraries: /usr/lib/openmpi/lib/libmpi_cxx.so/usr/lib/openmpi/lib/libmpi.so<br> CMake Warning at cmake/Dependencies.cmake:376 (message):<br> OpenMPI found, but it is not built with CUDA support.<br> Call Stack (most recent call first):<br> CMakeLists.txt:181 (include)</p> <p dir="auto">-- Caffe2: CUDA detected: 9.0<br> -- Caffe2: CUDA nvcc is: /usr/local/cuda/bin/nvcc<br> -- Caffe2: CUDA toolkit directory: /usr/local/cuda<br> -- Caffe2: Header version is: 9.0<br> -- Found cuDNN: v7.1.4 (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libcudnn.so)<br> -- Autodetected CUDA architecture(s): 5.0<br> -- Added CUDA NVCC flags for: -gencode;arch=compute_50,code=sm_50<br> -- Could NOT find NCCL (missing: NCCL_INCLUDE_DIRS NCCL_LIBRARIES)<br> -- Could NOT find CUB (missing: CUB_INCLUDE_DIR)<br> -- Could NOT find Gloo (missing: Gloo_INCLUDE_DIR Gloo_LIBRARY)<br> -- MPI include path: /usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/usr/lib/openmpi/include/openmpi/opal/mca/event/libevent2021/libevent/include/usr/lib/openmpi/include/usr/lib/openmpi/include/openmpi<br> -- MPI libraries: /usr/lib/openmpi/lib/libmpi_cxx.so/usr/lib/openmpi/lib/libmpi.so<br> -- CUDA detected: 9.0<br> -- Found libcuda: /usr/local/cuda-9.0/lib64/stubs/libcuda.so<br> -- Found libnvrtc: /usr/local/cuda-9.0/lib64/libnvrtc.so<br> -- Could NOT find NCCL (missing: NCCL_INCLUDE_DIR NCCL_LIBRARY)<br> CMake Warning at third_party/gloo/cmake/Dependencies.cmake:62 (message):<br> Not compiling with NCCL support. Suppress this warning with<br> -DUSE_NCCL=OFF.<br> Call Stack (most recent call first):<br> third_party/gloo/CMakeLists.txt:56 (include)</p> <p dir="auto">-- GCC 5.4.0: Adding gcc and gcc_s libs to link line<br> -- Include NCCL operators<br> -- Excluding ideep operators as we are not using ideep<br> -- Including image processing operators<br> -- Excluding video processing operators due to no opencv<br> -- Excluding mkl operators as we are not using mkl<br> -- Include Observer library<br> CMake Error at cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake:497 (file):<br> file failed to open for writing (Permission denied):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/home/rv/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_adagrad_op_gpu.cu.o.depend"><pre class="notranslate"><code class="notranslate">/home/rv/pytorch/build/caffe2/CMakeFiles/caffe2_gpu.dir/sgd/caffe2_gpu_generated_adagrad_op_gpu.cu.o.depend </code></pre></div> <p dir="auto">Call Stack (most recent call first):<br> cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake:1595 (cuda_include_nvcc_dependencies)<br> cmake/Modules_CUDA_fix/upstream/FindCUDA.cmake:1827 (CUDA_WRAP_SRCS)<br> cmake/public/utils.cmake:134 (cuda_add_library)<br> caffe2/CMakeLists.txt:230 (torch_cuda_based_add_library)</p> <p dir="auto">-- Using lib/python2.7/dist-packages as python relative installation path<br> -- Automatically generating missing <strong>init</strong>.py files.<br> -- A previous caffe2 cmake run already created the <strong>init</strong>.py files.<br> CMake Warning at CMakeLists.txt:341 (message):<br> Generated cmake files are only fully tested if one builds with system glog,<br> gflags, and protobuf. Other settings may generate files that are not well<br> tested.</p> <h2 dir="auto">--<br> -- ******** Summary ********<br> -- General:<br> -- CMake version : 3.5.1<br> -- CMake command : /usr/bin/cmake<br> -- Git version : v0.1.11-9191-g08daed4<br> -- System : Linux<br> -- C++ compiler : /usr/bin/c++<br> -- C++ compiler version : 5.4.0<br> -- BLAS : Eigen<br> -- CXX flags : -fvisibility-inlines-hidden -DONNX_NAMESPACE=onnx_c2 -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initializers -Wno-type-limits -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-error=deprecated-declarations<br> -- Build type : Release<br> -- Compile definitions :<br> -- CMAKE_PREFIX_PATH :<br> -- CMAKE_INSTALL_PREFIX : /usr/local</h2> <p dir="auto">-- BUILD_CAFFE2 : ON<br> -- BUILD_ATEN : OFF<br> -- BUILD_BINARY : ON<br> -- BUILD_CUSTOM_PROTOBUF : ON<br> -- Link local protobuf : ON<br> -- BUILD_DOCS : OFF<br> -- BUILD_PYTHON : ON<br> -- Python version : 2.7.12<br> -- Python includes : /usr/include/python2.7<br> -- BUILD_SHARED_LIBS : ON<br> -- BUILD_TEST : OFF<br> -- USE_ASAN : OFF<br> -- USE_ATEN : OFF<br> -- USE_CUDA : ON<br> -- CUDA static link : OFF<br> -- USE_CUDNN : ON<br> -- CUDA version : 9.0<br> -- cuDNN version : 7.1.4<br> -- CUDA root directory : /usr/local/cuda<br> -- CUDA library : /usr/local/cuda-9.0/lib64/stubs/libcuda.so<br> -- cudart library : /usr/local/cuda/lib64/libcudart_static.a;-pthread;dl;/usr/lib/x86_64-linux-gnu/librt.so<br> -- cublas library : /usr/local/cuda/lib64/libcublas.so;/usr/local/cuda/lib64/libcublas_device.a<br> -- cufft library : /usr/local/cuda/lib64/libcufft.so<br> -- curand library : /usr/local/cuda/lib64/libcurand.so<br> -- cuDNN library : /usr/lib/x86_64-linux-gnu/libcudnn.so<br> -- nvrtc : /usr/local/cuda-9.0/lib64/libnvrtc.so<br> -- CUDA include path : /usr/local/cuda/include<br> -- NVCC executable : /usr/local/cuda/bin/nvcc<br> -- CUDA host compiler : /usr/bin/cc<br> -- USE_TENSORRT : OFF<br> -- USE_ROCM : OFF<br> -- USE_EIGEN_FOR_BLAS : ON<br> -- USE_FFMPEG : OFF<br> -- USE_GFLAGS : ON<br> -- USE_GLOG : ON<br> -- USE_GLOO : ON<br> -- USE_GLOO_IBVERBS : OFF<br> -- USE_LEVELDB : ON<br> -- LevelDB version : 1.18<br> -- Snappy version : 1.1.3<br> -- USE_LITE_PROTO : OFF<br> -- USE_LMDB : ON<br> -- LMDB version : 0.9.17<br> -- USE_METAL : OFF<br> -- USE_MKL :<br> -- USE_MOBILE_OPENGL : OFF<br> -- USE_MPI : ON<br> -- USE_NCCL : ON<br> -- USE_SYSTEM_NCCL : OFF<br> -- USE_NERVANA_GPU : OFF<br> -- USE_NNPACK : ON<br> -- USE_OBSERVERS : ON<br> -- USE_OPENCL : OFF<br> -- USE_OPENCV : ON<br> -- OpenCV version : 3.3.1<br> -- USE_OPENMP : OFF<br> -- USE_PROF : OFF<br> -- USE_REDIS : OFF<br> -- USE_ROCKSDB : OFF<br> -- USE_ZMQ : OFF<br> -- Public Dependencies : Threads::Threads;gflags;glog::glog<br> -- Private Dependencies : nnpack;cpuinfo;/usr/lib/x86_64-linux-gnu/liblmdb.so;/usr/lib/x86_64-linux-gnu/libleveldb.so;/usr/lib/x86_64-linux-gnu/libsnappy.so;/usr/lib/x86_64-linux-gnu/libnuma.so;opencv_core;opencv_highgui;opencv_imgproc;opencv_imgcodecs;opencv_videoio;opencv_video;/usr/lib/openmpi/lib/libmpi_cxx.so;/usr/lib/openmpi/lib/libmpi.so;gloo;onnxifi_loader;gcc_s;gcc;dl<br> -- Configuring incomplete, errors occurred!<br> See also "/home/rv/pytorch/build/CMakeFiles/CMakeOutput.log".<br> See also "/home/rv/pytorch/build/CMakeFiles/CMakeError.log".</p> <h2 dir="auto">System Info</h2>
1
<p dir="auto">imshow() ignores or misinterprets the <code class="notranslate">aspect</code> kwarg when <code class="notranslate">interpolation='none'</code>. The bug appears only in svg output, does not seem to be a problem in pdf or png output. The minimal code to reproduce the bug is below:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import matplotlib matplotlib.use('SVG') import matplotlib.pyplot as plt mat = np.ones((40,20)) plt.figure() plt.subplot(121) plt.imshow( mat, aspect=0.5, interpolation='nearest') plt.subplot(122) plt.imshow( mat, aspect=0.5, interpolation='none') plt.savefig('/tmp/test.svg')"><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">import</span> <span class="pl-s1">matplotlib</span> <span class="pl-s1">matplotlib</span>.<span class="pl-en">use</span>(<span class="pl-s">'SVG'</span>) <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">mat</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">ones</span>((<span class="pl-c1">40</span>,<span class="pl-c1">20</span>)) <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">121</span>) <span class="pl-s1">plt</span>.<span class="pl-en">imshow</span>( <span class="pl-s1">mat</span>, <span class="pl-s1">aspect</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>, <span class="pl-s1">interpolation</span><span class="pl-c1">=</span><span class="pl-s">'nearest'</span>) <span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">122</span>) <span class="pl-s1">plt</span>.<span class="pl-en">imshow</span>( <span class="pl-s1">mat</span>, <span class="pl-s1">aspect</span><span class="pl-c1">=</span><span class="pl-c1">0.5</span>, <span class="pl-s1">interpolation</span><span class="pl-c1">=</span><span class="pl-s">'none'</span>) <span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'/tmp/test.svg'</span>)</pre></div> <p dir="auto">An image of the output is attached below. The issue also appears when I try to use <code class="notranslate">extent</code> kwarg instead of <code class="notranslate">aspect</code>, i.e. see below (if needed, I can attach an image produced by the second example):</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="plt.figure() plt.subplot(121) plt.imshow( mat, interpolation='nearest', extent=[0,20,20,0] ) plt.subplot(122) plt.imshow( mat, interpolation='none', extent=[0,20,20,0] ) plt.savefig('/tmp/test2.svg')"><pre class="notranslate"><span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">121</span>) <span class="pl-s1">plt</span>.<span class="pl-en">imshow</span>( <span class="pl-s1">mat</span>, <span class="pl-s1">interpolation</span><span class="pl-c1">=</span><span class="pl-s">'nearest'</span>, <span class="pl-s1">extent</span><span class="pl-c1">=</span>[<span class="pl-c1">0</span>,<span class="pl-c1">20</span>,<span class="pl-c1">20</span>,<span class="pl-c1">0</span>] ) <span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">122</span>) <span class="pl-s1">plt</span>.<span class="pl-en">imshow</span>( <span class="pl-s1">mat</span>, <span class="pl-s1">interpolation</span><span class="pl-c1">=</span><span class="pl-s">'none'</span>, <span class="pl-s1">extent</span><span class="pl-c1">=</span>[<span class="pl-c1">0</span>,<span class="pl-c1">20</span>,<span class="pl-c1">20</span>,<span class="pl-c1">0</span>] ) <span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'/tmp/test2.svg'</span>)</pre></div> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/912906/18398220/c15c4496-7699-11e6-8d8b-612c8a3801be.png"><img src="https://cloud.githubusercontent.com/assets/912906/18398220/c15c4496-7699-11e6-8d8b-612c8a3801be.png" alt="svg_aspect_interpolation" style="max-width: 100%;"></a></p> <p dir="auto">My python environment is:<br> Ubuntu 16.04, anaconda python distribution, python 3.5.2, Matplotlib 1.5.1 (from conda)</p>
<h3 dir="auto">Bug report</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec fig = plt.figure() gs = gridspec.GridSpec(2, 1) ax1 = fig.add_subplot(gs[0]) ax2 = fig.add_subplot(gs[1], sharex=ax1) ax1.set_xticklabels('') plt.show()"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec fig = plt.figure() gs = gridspec.GridSpec(2, 1) ax1 = fig.add_subplot(gs[0]) ax2 = fig.add_subplot(gs[1], sharex=ax1) ax1.set_xticklabels('') plt.show() </code></pre></div> <p dir="auto">makes the ticklabels on <code class="notranslate">ax2</code> disappear as well.</p> <p dir="auto">Similarly:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt import matplotlib.ticker as mticker import matplotlib.gridspec as gridspec fig = plt.figure() gs = gridspec.GridSpec(2, 1) ax1 = fig.add_subplot(gs[0]) ax2 = fig.add_subplot(gs[1], sharex=ax1) ax1.xaxis.set_major_formatter(mticker.NullFormatter()) plt.show()"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">ticker</span> <span class="pl-k">as</span> <span class="pl-s1">mticker</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">gridspec</span> <span class="pl-k">as</span> <span class="pl-s1">gridspec</span> <span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">gs</span> <span class="pl-c1">=</span> <span class="pl-s1">gridspec</span>.<span class="pl-v">GridSpec</span>(<span class="pl-c1">2</span>, <span class="pl-c1">1</span>) <span class="pl-s1">ax1</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-s1">gs</span>[<span class="pl-c1">0</span>]) <span class="pl-s1">ax2</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-s1">gs</span>[<span class="pl-c1">1</span>], <span class="pl-s1">sharex</span><span class="pl-c1">=</span><span class="pl-s1">ax1</span>) <span class="pl-s1">ax1</span>.<span class="pl-s1">xaxis</span>.<span class="pl-en">set_major_formatter</span>(<span class="pl-s1">mticker</span>.<span class="pl-v">NullFormatter</span>()) <span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div> <p dir="auto">appears to share the formatter.</p> <p dir="auto">This means that we can't manually duplicate the behaviour of <code class="notranslate">fig, ax = plt.subplots(sharex=True)</code>. The reason I need to do it manually is something more complicated:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" fig = plt.figure(constrained_layout=True) gs = gridspec.GridSpec(2, 1) gs_top = gridspec.GridSpecFromSubplotSpec(1, 2, gs[0]) gs_bot = gridspec.GridSpecFromSubplotSpec(1, 2, gs[1]) ax_top=[] ax_bot=[] for i in range(2): if i &gt; 0: ax_top += [fig.add_subplot(gs_top[i], sharex=ax_top[0], sharey=ax_top[0])] else: ax_top += [fig.add_subplot(gs_top[i])] ax_bot += [fig.add_subplot(gs_bot[i], sharex=ax_top[0], sharey=ax_top[0])] pctop = ax_top[i].pcolormesh(np.random.randn(20, 20)) ax_top[i].set_xticklabels('') pcbot = ax_bot[i].pcolormesh(np.random.randn(20, 20), cmap='RdBu_r') #if i == 1: # ax_top[i].set_yticklabels('') # ax_bot[i].set_yticklabels('') fig.colorbar(pctop, ax=ax_top) fig.colorbar(pcbot, ax=ax_bot)"><pre class="notranslate"><span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>(<span class="pl-s1">constrained_layout</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-s1">gs</span> <span class="pl-c1">=</span> <span class="pl-s1">gridspec</span>.<span class="pl-v">GridSpec</span>(<span class="pl-c1">2</span>, <span class="pl-c1">1</span>) <span class="pl-s1">gs_top</span> <span class="pl-c1">=</span> <span class="pl-s1">gridspec</span>.<span class="pl-v">GridSpecFromSubplotSpec</span>(<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-s1">gs</span>[<span class="pl-c1">0</span>]) <span class="pl-s1">gs_bot</span> <span class="pl-c1">=</span> <span class="pl-s1">gridspec</span>.<span class="pl-v">GridSpecFromSubplotSpec</span>(<span class="pl-c1">1</span>, <span class="pl-c1">2</span>, <span class="pl-s1">gs</span>[<span class="pl-c1">1</span>]) <span class="pl-s1">ax_top</span><span class="pl-c1">=</span>[] <span class="pl-s1">ax_bot</span><span class="pl-c1">=</span>[] <span class="pl-k">for</span> <span class="pl-s1">i</span> <span class="pl-c1">in</span> <span class="pl-en">range</span>(<span class="pl-c1">2</span>): <span class="pl-k">if</span> <span class="pl-s1">i</span> <span class="pl-c1">&gt;</span> <span class="pl-c1">0</span>: <span class="pl-s1">ax_top</span> <span class="pl-c1">+=</span> [<span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-s1">gs_top</span>[<span class="pl-s1">i</span>], <span class="pl-s1">sharex</span><span class="pl-c1">=</span><span class="pl-s1">ax_top</span>[<span class="pl-c1">0</span>], <span class="pl-s1">sharey</span><span class="pl-c1">=</span><span class="pl-s1">ax_top</span>[<span class="pl-c1">0</span>])] <span class="pl-k">else</span>: <span class="pl-s1">ax_top</span> <span class="pl-c1">+=</span> [<span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-s1">gs_top</span>[<span class="pl-s1">i</span>])] <span class="pl-s1">ax_bot</span> <span class="pl-c1">+=</span> [<span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-s1">gs_bot</span>[<span class="pl-s1">i</span>], <span class="pl-s1">sharex</span><span class="pl-c1">=</span><span class="pl-s1">ax_top</span>[<span class="pl-c1">0</span>], <span class="pl-s1">sharey</span><span class="pl-c1">=</span><span class="pl-s1">ax_top</span>[<span class="pl-c1">0</span>])] <span class="pl-s1">pctop</span> <span class="pl-c1">=</span> <span class="pl-s1">ax_top</span>[<span class="pl-s1">i</span>].<span class="pl-en">pcolormesh</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">20</span>, <span class="pl-c1">20</span>)) <span class="pl-s1">ax_top</span>[<span class="pl-s1">i</span>].<span class="pl-en">set_xticklabels</span>(<span class="pl-s">''</span>) <span class="pl-s1">pcbot</span> <span class="pl-c1">=</span> <span class="pl-s1">ax_bot</span>[<span class="pl-s1">i</span>].<span class="pl-en">pcolormesh</span>(<span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">randn</span>(<span class="pl-c1">20</span>, <span class="pl-c1">20</span>), <span class="pl-s1">cmap</span><span class="pl-c1">=</span><span class="pl-s">'RdBu_r'</span>) <span class="pl-c">#if i == 1:</span> <span class="pl-c"># ax_top[i].set_yticklabels('')</span> <span class="pl-c"># ax_bot[i].set_yticklabels('')</span> <span class="pl-s1">fig</span>.<span class="pl-en">colorbar</span>(<span class="pl-s1">pctop</span>, <span class="pl-s1">ax</span><span class="pl-c1">=</span><span class="pl-s1">ax_top</span>) <span class="pl-s1">fig</span>.<span class="pl-en">colorbar</span>(<span class="pl-s1">pcbot</span>, <span class="pl-s1">ax</span><span class="pl-c1">=</span><span class="pl-s1">ax_bot</span>)</pre></div>
0
<p dir="auto">Would be great if I could exclude paths when using the Find In Files form. For instance, I would like to exclude <code class="notranslate">log/</code> and <code class="notranslate">index.js</code> while searching the rest of my project. Is this possible? If not, I think it would be a great addition!</p>
<p dir="auto">When searching, filters can be specified. However, there's no way to exclude paths from the search.</p> <p dir="auto">E.g.: <code class="notranslate">*.js, -*.min.js</code> cannot be used to exclude minified files from a search of JS</p>
1
<p dir="auto">Deno doesn't support <code class="notranslate">require</code> but there is one thing where <code class="notranslate">require</code> wins against ES6 imports:</p> <p dir="auto">In Node.js we can do</p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="delete require.cache[require.resolve(somePath)];"><pre class="notranslate"><span class="pl-k">delete</span> <span class="pl-en">require</span><span class="pl-kos">.</span><span class="pl-c1">cache</span><span class="pl-kos">[</span><span class="pl-en">require</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">somePath</span><span class="pl-kos">)</span><span class="pl-kos">]</span><span class="pl-kos">;</span></pre></div> <p dir="auto">and delete required file from cache to load it again after it get changed in runtime. With imports we can't do like this. Even if we use dymanic imports (<code class="notranslate">await import("./module.ts")</code>) twice, we both times get the module Deno loaded first time.</p> <p dir="auto">There is a workaround about it. We can add a query parameter to file path like this:</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mod = await import(`./mod.ts?foo=${anyRandomlyGeneratedString}`);"><pre class="notranslate"><span class="pl-s1">mod</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">`./mod.ts?foo=<span class="pl-s1"><span class="pl-kos">${</span><span class="pl-s1">anyRandomlyGeneratedString</span><span class="pl-kos">}</span></span>`</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto">and it will be loaded again and we get a new its version. But the problem is that BOTH versions of this module will exist in the cache, I suppose. That's not cool.</p> <p dir="auto">Why do we even have to store dynamically imported modules in cache? Maybe better make them uncached and garbage-collected and make it possible to import the same module multiple times and each time get the current module content without any ugly workarounds? Otherwise it looks like dynamic imports are just called dynamic but still work in a static way.</p>
<p dir="auto">I'm writing code using dynamic module import for dynamically generated code (tool like node-dev). In Deno, once module imported dynamically, they will be never updated while process running. Are there some way to invalidate module cache? In node.js, required module can be deleted.</p> <div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.writeTextFileSync(&quot;./target.ts&quot;, &quot;export const value = 1;&quot;); const v1 = await import(&quot;./target.ts&quot;) console.log(v1.value); // 1 Deno.writeTextFileSync(&quot;./target.ts&quot;, &quot;export const values = 2&quot;); const v2 = await import(&quot;./target.ts&quot;) console.log(v2.value); // should be 2 but got 1"><pre class="notranslate"><span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">writeTextFileSync</span><span class="pl-kos">(</span><span class="pl-s">"./target.ts"</span><span class="pl-kos">,</span> <span class="pl-s">"export const value = 1;"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">v1</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"./target.ts"</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">v1</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// 1</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">writeTextFileSync</span><span class="pl-kos">(</span><span class="pl-s">"./target.ts"</span><span class="pl-kos">,</span> <span class="pl-s">"export const values = 2"</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">v2</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"./target.ts"</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">v2</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// should be 2 but got 1</span></pre></div>
1
<h2 dir="auto">Feature request</h2> <p dir="auto"><strong>What is the expected behavior?</strong><br> When handling images with 'asset/resource' using server-side rendering, we do not want the image file to be emitted, but we do want the image URL to be populated in the HTML in the server bundle. The client bundle can emit the image file.</p> <p dir="auto">With file-loader one could do this with the emitFile=false flag, but we cannot do that with Webpack 5 Asset Modules.</p> <p dir="auto">'asset/inline' does suppress the output of the image file, but it requires the image to be inlined, which isn't what is desired.</p> <p dir="auto"><strong>What is motivation or use case for adding/changing the behavior?</strong><br> Webpack 5 Asset Modules deprecated the file-loader. But the emitFile feature of file-loader is not available in Asset Modules. That is a required feature for Server Side Rendering</p> <p dir="auto"><strong>How should this be implemented in your opinion?</strong><br> Include a flag similar to emitFile with 'asset/resource'</p> <p dir="auto"><strong>Are you willing to work on this yourself?</strong><br> no</p>
<p dir="auto">I'm having problems with my bundle creation script that uses webpack. The process prints out "Killed" and exits, which indicates that its getting killed by the linux out of memory killer. I'm also seeing this unhelpful error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="buffer.js:194 this.parent = new SlowBuffer(this.length); ^ RangeError: length &gt; kMaxLength at new Buffer (buffer.js:194:21) at fs.js:220:16 at Object.oncomplete (fs.js:107:15)"><pre class="notranslate"><code class="notranslate">buffer.js:194 this.parent = new SlowBuffer(this.length); ^ RangeError: length &gt; kMaxLength at new Buffer (buffer.js:194:21) at fs.js:220:16 at Object.oncomplete (fs.js:107:15) </code></pre></div> <p dir="auto">I think this is saying that a buffer is being created that is too big (too big for what? I don't know). The code for what kMaxLength is seems to show that it's over a gigabyte: <a href="https://github.com/joyent/node/blob/master/src/smalloc.h">https://github.com/joyent/node/blob/master/src/smalloc.h</a> . I'm pretty confused why such a gigantic buffer would be created.</p> <p dir="auto">So because of this, I'm suggesting that webpack use streams internally to mitigate memory issues like this. I am using webpack's watcher, and so I'm not sure how streams could be incorporated into what the watcher does or how the watcher could reduce its memory footprint.</p>
0
<p dir="auto">Reproduce:</p> <ul dir="auto"> <li>open a file</li> <li>edit a file</li> <li>close tab (<kbd>Ctrl-F4</kbd> on Windows)</li> <li>press <kbd>N</kbd></li> </ul> <p dir="auto">The "Save / Cancel / Don't save" dialog should respond to key-presses of <kbd>Y</kbd> and <kbd>N</kbd> since it's conceptially posing for a Yes/No/Cancel dialog. Perhaps <kbd>S</kbd> and <kbd>D</kbd> if you disagree, but if there's no way to control this dialog with the keyboard, that's bad.</p> <p dir="auto">(To be pedantic: Windows introduced a few version ago that by pressing <kbd>Alt</kbd> the letters that respond to <kbd>Alt</kbd>-combinations show underlined. It may be a flavour, but one one grows accustomed to.)</p>
<p dir="auto">(this is possibly windows only, tested with 0.113.0)</p> <p dir="auto"><strong>Steps To Reproduce</strong></p> <ul dir="auto"> <li>Open Atom</li> <li>Type something into a new editor or change an existing file (doesn't matter which)</li> <li>Attempt to close the tab (for example <code class="notranslate">Ctrl+W</code>)</li> <li>Correctly, a dialogue opens, that will give you a choice how to proceed</li> </ul> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/124909/3550749/38cadc72-08dd-11e4-8d71-83e665a150cd.png"><img src="https://cloud.githubusercontent.com/assets/124909/3550749/38cadc72-08dd-11e4-8d71-83e665a150cd.png" alt="close-dialog-keyboard-lacking" style="max-width: 100%;"></a></p> <p dir="auto"><strong>current (faulty) behaviour</strong></p> <p dir="auto">The Keyboard is pretty much useless for this dialogue. You can only Hit <code class="notranslate">[Enter]</code> to save.</p> <p dir="auto"><strong>Desired Behaviour</strong></p> <p dir="auto">These interactions all don't work, but would be very much needed, all of these are very much standard behaviour for any application:</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">[left]</code> and <code class="notranslate">[right]</code> should switch focus between buttos (so we can select a different thing with keyboard only)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">[esc]</code> should Cancel</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <code class="notranslate">[alt]</code> should bring up shortcut labels (much like it does for the application menu, i.e. _F_ile, which means press <code class="notranslate">[Alt+F]</code>)</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <code class="notranslate">[tab]</code> should cycle between the buttons, <code class="notranslate">[shift-tab]</code> should cycle backwards.</li> </ul>
1
<p dir="auto">Could be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="123225492" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/1520" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/1520/hovercard" href="https://github.com/microsoft/vscode/issues/1520">#1520</a> / <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="123792357" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/1634" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/1634/hovercard" href="https://github.com/microsoft/vscode/issues/1634">#1634</a> / <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="132380768" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/2830" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/2830/hovercard" href="https://github.com/microsoft/vscode/issues/2830">#2830</a></p> <ul dir="auto"> <li>VSCode Version: 1.1.0</li> <li>OS Version: Windows 8.1 Pro</li> </ul> <p dir="auto">Steps to reproduce:</p> <ol dir="auto"> <li>Create new/edit existing SQL file.</li> <li>Enter a string with a backslash as the last character before the terminating single quote.</li> <li>Syntax highlighting thinks the terminating quote is escaped.</li> </ol> <p dir="auto">SSMS does not behave like this, and will parse the same script without this issue.</p> <p dir="auto">Also reproduces when starting VSCode with the --disable-extensions command line argument.</p> <p dir="auto">Sample screenshot:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/460028/15210098/96e043b4-182c-11e6-9790-c10b2d5e4d06.png"><img src="https://cloud.githubusercontent.com/assets/460028/15210098/96e043b4-182c-11e6-9790-c10b2d5e4d06.png" alt="image" style="max-width: 100%;"></a><br> The select statement on line 4 shouldn't be that colour, since it is not part of the string.</p> <p dir="auto">The same snippet in SSMS:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/460028/15210149/d6180012-182c-11e6-9dba-c1144d6c1fb4.png"><img src="https://cloud.githubusercontent.com/assets/460028/15210149/d6180012-182c-11e6-9dba-c1144d6c1fb4.png" alt="image" style="max-width: 100%;"></a></p>
<ul dir="auto"> <li>VSCode Version: 0.10.11</li> <li>OS Version: Windows 7 Professional</li> </ul> <p dir="auto">Steps to Reproduce:</p> <p dir="auto">I have a \ character defined as a string in an update query. The Syntax highlighting is incorrectly escaping the following ' and displaying the rest of the script as a string. I am using UTF-8 Encoding with SQL as the language. Below two screenshots:</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9720471/14493462/ded13ba0-0185-11e6-982e-6160b8edba5c.jpg"><img src="https://cloud.githubusercontent.com/assets/9720471/14493462/ded13ba0-0185-11e6-982e-6160b8edba5c.jpg" alt="error" style="max-width: 100%;"></a></p> <p dir="auto">This is the same piece of script in SSMS.<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/9720471/14493535/33fcb442-0186-11e6-8598-e975e1f3074f.jpg"><img src="https://cloud.githubusercontent.com/assets/9720471/14493535/33fcb442-0186-11e6-8598-e975e1f3074f.jpg" alt="ssms" style="max-width: 100%;"></a></p>
1
<p dir="auto">This is a weird one. I've tested this with both the client cookie and doctrine provider and the outcome is the same.</p> <p dir="auto">I've implemented "Remember Me" login functionality for our application.</p> <p dir="auto">I also have an AuthenticationListener implemented which updates the 'User' entity with a 'lastLogin' DateTime:</p> <div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" public function onAuthenticationSuccess( AuthenticationEvent $event ) { $user = $event-&gt;getAuthenticationToken()-&gt;getUser(); if( $user instanceof \Veromo\Bundle\CoreBundle\Entity\User ) { $user-&gt;set( 'lastLogin', new \DateTime() ); $this-&gt;manager-&gt;flush(); } }"><pre class="notranslate"> <span class="pl-k">public</span> <span class="pl-k">function</span> <span class="pl-en">onAuthenticationSuccess</span>( <span class="pl-smi"><span class="pl-smi">AuthenticationEvent</span></span> <span class="pl-s1"><span class="pl-c1">$</span>event</span> ) { <span class="pl-s1"><span class="pl-c1">$</span>user</span> = <span class="pl-s1"><span class="pl-c1">$</span>event</span>-&gt;<span class="pl-en">getAuthenticationToken</span>()-&gt;<span class="pl-en">getUser</span>(); <span class="pl-k">if</span>( <span class="pl-s1"><span class="pl-c1">$</span>user</span> instanceof \<span class="pl-v">Veromo</span>\<span class="pl-v">Bundle</span>\<span class="pl-v">CoreBundle</span>\<span class="pl-v">Entity</span>\<span class="pl-v">User</span> ) { <span class="pl-s1"><span class="pl-c1">$</span>user</span>-&gt;<span class="pl-en">set</span>( <span class="pl-s">'lastLogin'</span>, <span class="pl-k">new</span> \<span class="pl-v">DateTime</span>() ); <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-c1">manager</span>-&gt;<span class="pl-en">flush</span>(); } }</pre></div> <p dir="auto">My 'User' Entity is associated with a 'Contact' Entity with a OneToOne Relationship which is cascaded.</p> <p dir="auto"><strong>NOW ...</strong></p> <p dir="auto">When this code executes on an interactive login (user physically enters username and password), all is well - everything goes off without a hitch.</p> <p dir="auto">When this code executes on a non-interactive login (user has selected 'Remember Me' has a valid cookie, etc ..), it all falls in a heap.</p> <p dir="auto">It appears that when the <code class="notranslate">flush</code> command executes, Doctrine has 'forgotten' about the relationship that exists between the 'User' Entity and the 'Contact' Entity and attempts to re-create them (opting for an INSERT rather than an UPDATE on <code class="notranslate">flush</code>):</p> <blockquote> <ol dir="auto"> <li>INFO - Matched route "adminimiser_home".</li> <li>DEBUG - Remember-me cookie detected.</li> <li>DEBUG - SELECT u0_.id AS id0, u0_.email AS email1, u0_.mobile AS mobile2, u0_.username AS username3, u0_.password AS password4, u0_.change_password AS change_password5, u0_.validated AS validated6, u0_.is_blocked AS is_blocked7, u0_.hash AS hash8, u0_.created AS created9, u0_.updated AS updated10, u0_.last_login AS last_login11, u0_.timezone AS timezone12, u0_.contact_id AS contact_id13 FROM <code class="notranslate">user</code> u0_ WHERE u0_.username = ? OR u0_.email = ?</li> <li>DEBUG - SELECT t0.id AS id3, t0.full_name AS full_name4, t0.created AS created5, t0.updated AS updated6, t0.account_id AS account_id7, t0.type, t1.abn AS abn8, t2.title AS title9, t2.first_name AS first_name10, t2.middle_name AS middle_name11, t2.last_name AS last_name12, t2.gender AS gender13 FROM contact t0 LEFT JOIN contact_business t1 ON t0.id = t1.id LEFT JOIN contact_person t2 ON t0.id = t2.id WHERE t0.id = ?</li> <li>INFO - Remember-me cookie accepted.</li> <li>DEBUG - "START TRANSACTION"</li> <li>DEBUG - INSERT INTO log (date_time, channel, level, ip_address, session_id, message, context) VALUES (?, ?, ?, ?, ?, ?, ?)</li> <li>DEBUG - "COMMIT"</li> <li>DEBUG - SELECT t0.id AS id1, t0.roles AS roles2, t0.is_active AS is_active3, t0.account_id AS account_id4, t0.user_id AS user_id5 FROM user_account t0 WHERE t0.user_id = ?</li> <li>DEBUG - "START TRANSACTION"</li> <li>DEBUG - INSERT INTO contact (full_name, created, updated, account_id, type) VALUES (?, ?, ?, ?, ?)</li> <li>DEBUG - INSERT INTO contact_person (id, title, first_name, middle_name, last_name, gender) VALUES (?, ?, ?, ?, ?, ?)</li> <li>DEBUG - INSERT INTO <code class="notranslate">user</code> (email, mobile, username, password, change_password, validated, is_blocked, hash, created, updated, last_login, timezone, contact_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)</li> <li>DEBUG - "ROLLBACK"</li> <li>CRITICAL - Uncaught PHP Exception Doctrine\DBAL\DBALException: "An exception occurred while executing 'INSERT INTO <code class="notranslate">user</code> (email, mobile, username, password, change_password, validated, is_blocked, hash, created, updated, last_login, timezone, contact_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' with params ["testuser@blah", null, null, "1MKVMPQp5ODniTDDt2PlGIlMGR9C1ZlLzYo/Y/2LMneA4yU3lVJ1oA==", 0, 1, 0, "c590db7b8cac19accae613f2ead63da1", "2016-01-25 04:21:40", "2016-01-25 04:21:40", "2016-01-26 00:06:40", null, 18]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'testuser@blah' for key 'UNIQ_8D93D649E7927C74'" at /var/veromo/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91</li> </ol> </blockquote> <p dir="auto">As you can see - the AUTHENTICATION is fine ... there's no issue there.</p> <p dir="auto">I've tried everything - including re-associating the contact with the user before the <code class="notranslate">flush</code> - but it appears that <strong>the association is lost after this point</strong>. And again - only when the <code class="notranslate">RememberMeToken</code> comes into play.</p>
<p dir="auto"><strong>Symfony version(s) affected</strong>: 4.2</p> <p dir="auto"><strong>Description</strong></p> <p dir="auto">After clicking <code class="notranslate">Settings</code> in the profiler menu</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Uncaught TypeError: Cannot set property 'checked' of null"><pre class="notranslate"><code class="notranslate">Uncaught TypeError: Cannot set property 'checked' of null </code></pre></div> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/javiereguiluz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/javiereguiluz">@javiereguiluz</a></p>
0
<p dir="auto">Was: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="54745980" data-permission-text="Title is private" data-url="https://github.com/rust-lang/prev.rust-lang.org/issues/89" data-hovercard-type="issue" data-hovercard-url="/rust-lang/prev.rust-lang.org/issues/89/hovercard" href="https://github.com/rust-lang/prev.rust-lang.org/issues/89">rust-lang/prev.rust-lang.org#89</a>, from <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gnzlbg/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gnzlbg">@gnzlbg</a>, submitted January 19th 2015.</p> <hr> <p dir="auto">Hi,</p> <p dir="auto">I just tried rust for the first time. From the description of the language, I decided to try a dynamic array first, since in my head this is the most important data structure in a low level language (e.g., for cache performance). So I decided to write a small program using a <code class="notranslate">Vec&lt;T&gt;</code> (is this the right data-structure in rust for an array of dynamic size?). My first step was to create a vector of <code class="notranslate">size</code> elements initialized to a default value of <code class="notranslate">0</code>. So:</p> <ul dir="auto"> <li>I went to the <a href="http://doc.rust-lang.org/book/arrays-vectors-and-slices.html" rel="nofollow">Arrays, Vectors, and Slices</a> part of the book, where: <ul dir="auto"> <li>I see how I can use the <code class="notranslate">vec!</code> macro,</li> <li>I see how I can use <code class="notranslate">push</code>.</li> <li>I see a link to the <code class="notranslate">Vec&lt;T&gt;</code> documentation, so...</li> </ul> </li> <li>I went to the <a href="http://doc.rust-lang.org/std/vec/" rel="nofollow"><code class="notranslate">Vec&lt;T&gt;</code> documentation</a>: <ul dir="auto"> <li>this looks... empty,</li> <li>I see how I can use <code class="notranslate">new</code> to create an empty vector,</li> <li>I guess <code class="notranslate">new(size)</code> and <code class="notranslate">new(size, default_value)</code> might work (I have a C++ background), but the compiler is helpful here and tells me that there is only <code class="notranslate">new()</code>. Ok, keep looking!</li> <li>I search in the docs for <code class="notranslate">Vec</code> and arrive at:</li> </ul> </li> <li><a href="http://doc.rust-lang.org/std/vec/struct.Vec.html" rel="nofollow"><code class="notranslate">std::vec::Vec</code></a>. I wonder why I didn't land here in the first place. Here: <ul dir="auto"> <li> <p dir="auto">I see more examples using: <code class="notranslate">len</code>, <code class="notranslate">iter</code>, this page looks good, I feel I'm getting close :)</p> </li> <li> <p dir="auto">There is a section about initializing a vector with a capacity using <code class="notranslate">Vec::with_capacity</code> and why this should be preferred, this is almost what I want!</p> </li> <li> <p dir="auto">I guess <code class="notranslate">Vec::with_size</code> without success, it seems I'm not there yet, so...</p> </li> <li> <p dir="auto">I read the rest of the doc there, but it seems I'm out of luck.</p> </li> <li> <p dir="auto">I go back to <code class="notranslate">Vec::resize(new_len, value)</code>, it seems that <code class="notranslate">value</code> is not documented, but I guess that it would be the default value, so...</p> </li> <li> <p dir="auto">I try:</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" let mut v : Vec&lt;f64&gt; = Vec::with_capacity(size); v.resize(size, 0.0);"><pre class="notranslate"> <span class="pl-k">let</span> <span class="pl-k">mut</span> v <span class="pl-kos">:</span> <span class="pl-smi">Vec</span><span class="pl-kos">&lt;</span><span class="pl-smi">f64</span><span class="pl-kos">&gt;</span> = <span class="pl-smi">Vec</span><span class="pl-kos">::</span><span class="pl-en">with_capacity</span><span class="pl-kos">(</span>size<span class="pl-kos">)</span><span class="pl-kos">;</span> v<span class="pl-kos">.</span><span class="pl-en">resize</span><span class="pl-kos">(</span>size<span class="pl-kos">,</span> <span class="pl-c1">0.0</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> </li> </ul> </li> </ul> <p dir="auto">which gives a warning but works as expected.</p> <p dir="auto">I'm left with a very weird feeling. I'll try to explain it. What in my head should be the most used data structure in a low level language, and thus the most used data structure in rust, turned out to be barely and poorly documented. The best part of the documentation is, without doubt, the "Capacity and reallocation" where <code class="notranslate">with_capacity</code> is explained. Most of the other functions there are missing documentation. Almost none of the functions have the algorithmic/memory complexity documented. Even in those functions that are documented, some arguments aren't. I think that for vector even the growth factor (which is an implementation detail) should be included in the documentation since it can be interesting to know it in some applications (or while debugging/profiling performance). Besides improving the documentation of all these functions, the documentation of vector could be improved significantly by including different "sub sections" like "Capacity and reallocation". Those I would have found useful are: "Initialization" (how to initialize a vector: with a capacity/size, with/without default constructed elements, from slice, from pointer and length, from raw array, using the vec! macro...), "Insertion" (push, insert, resize.. and how are the elements initialized when they are created), "Deletion" (pop, selectively delete some elements based on predicate: <code class="notranslate">erase_remove_if</code> in C++, resize.. and what happens if I resize below the current size), "Memory layout" (capacity, extend capacity, shrink to fit, ...), "Iteration" (how to iterate over a vector), "Common patterns" (sort + remove duplicates, stack, queue, <code class="notranslate">flat_set</code>).</p> <ul dir="auto"> <li>I decide to fill an issue in the rust documentation and to give rust another try in a couple of months: <ul dir="auto"> <li>nowhere in the book could I find where to fill issues,</li> <li>went to the rust language on github where I read somewhere that the documentation belongs to the website</li> <li>supposed that rust-www host the website and also the documentation...</li> </ul> </li> </ul> <p dir="auto">Another <em>small</em> issue I had at the beginning was that nowhere in the introduction did I find a link or a table with the primitive data types. Most of the introduction uses <code class="notranslate">i32</code>. I guessed <code class="notranslate">double</code> and failed, but then guessed <code class="notranslate">f64</code> and it worked. I then googled <code class="notranslate">rust primitive types</code> and got a link to the reference where all primitive types where shown. A table explaining <code class="notranslate">iX</code> for integers, <code class="notranslate">fX</code> for doubles, <code class="notranslate">str</code> for chars where <code class="notranslate">X</code> is the width of the data type would have saved me jumping around through tabs and googling.</p>
<p dir="auto">Recent changes landed that broke Rust on Mac OS 10.9 (Mavericks) and above, see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="42678136" data-permission-text="Title is private" data-url="https://github.com/rust-lang/rust/issues/17214" data-hovercard-type="issue" data-hovercard-url="/rust-lang/rust/issues/17214/hovercard" href="https://github.com/rust-lang/rust/issues/17214">#17214</a></p> <p dir="auto">The problem is that the linker is being passed an argument that works for <code class="notranslate">gcc</code>, but that <code class="notranslate">clang</code> rejects. (Mac OS moved wholesale to <code class="notranslate">clang</code> in 10.9, it appears.)</p> <p dir="auto">Unfortunately, this breakage wasn't caught by bors. Apparently the testing infrastructure is running an older version of Mac OS and therefor using <code class="notranslate">gcc</code> rather than <code class="notranslate">clang</code>.</p> <p dir="auto">To avoid surprise Mac OS breakage in the future, we should make sure to test against <code class="notranslate">clang</code> before landing PRs.</p> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/brson/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/brson">@brson</a> <a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/kballard/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kballard">@kballard</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pnkfelix/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pnkfelix">@pnkfelix</a></p>
0
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: v1.33.0</li> <li>Operating System: macOS 12.6.5</li> <li>Browser: All</li> <li>Other info: Node 16.13.0, React 18.2</li> </ul> <h3 dir="auto">Source code</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li> </ul> <p dir="auto"><strong>Config file</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { defineConfig, devices } from '@playwright/experimental-ct-react'; /** * See https://playwright.dev/docs/test-configuration. */ export default defineConfig({ testDir: './', /* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */ snapshotDir: './__snapshots__', /* Maximum time one test can run for. */ timeout: 10 * 1000, /* Run tests in files in parallel */ fullyParallel: true, /* Fail the build on CI if you accidentally left test.only in the source code. */ forbidOnly: !!process.env.CI, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ workers: process.env.CI ? 1 : undefined, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: 'html', /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', /* Port to use for Playwright component endpoint. */ ctPort: 3100, }, /* Configure projects for major browsers */ projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, { name: 'firefox', use: { ...devices['Desktop Firefox'] }, }, { name: 'webkit', use: { ...devices['Desktop Safari'] }, }, ], });"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/experimental-ct-react'</span><span class="pl-kos">;</span> <span class="pl-c">/**</span> <span class="pl-c"> * See https://playwright.dev/docs/test-configuration.</span> <span class="pl-c"> */</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">testDir</span>: <span class="pl-s">'./'</span><span class="pl-kos">,</span> <span class="pl-c">/* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */</span> <span class="pl-c1">snapshotDir</span>: <span class="pl-s">'./__snapshots__'</span><span class="pl-kos">,</span> <span class="pl-c">/* Maximum time one test can run for. */</span> <span class="pl-c1">timeout</span>: <span class="pl-c1">10</span> <span class="pl-c1">*</span> <span class="pl-c1">1000</span><span class="pl-kos">,</span> <span class="pl-c">/* Run tests in files in parallel */</span> <span class="pl-c1">fullyParallel</span>: <span class="pl-c1">true</span><span class="pl-kos">,</span> <span class="pl-c">/* Fail the build on CI if you accidentally left test.only in the source code. */</span> <span class="pl-c1">forbidOnly</span>: <span class="pl-c1">!</span><span class="pl-c1">!</span><span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span><span class="pl-kos">,</span> <span class="pl-c">/* Retry on CI only */</span> <span class="pl-c1">retries</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">2</span> : <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c">/* Opt out of parallel tests on CI. */</span> <span class="pl-c1">workers</span>: <span class="pl-s1">process</span><span class="pl-kos">.</span><span class="pl-c1">env</span><span class="pl-kos">.</span><span class="pl-c1">CI</span> ? <span class="pl-c1">1</span> : <span class="pl-c1">undefined</span><span class="pl-kos">,</span> <span class="pl-c">/* Reporter to use. See https://playwright.dev/docs/test-reporters */</span> <span class="pl-c1">reporter</span>: <span class="pl-s">'html'</span><span class="pl-kos">,</span> <span class="pl-c">/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> <span class="pl-c">/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */</span> <span class="pl-c1">trace</span>: <span class="pl-s">'on-first-retry'</span><span class="pl-kos">,</span> <span class="pl-c">/* Port to use for Playwright component endpoint. */</span> <span class="pl-c1">ctPort</span>: <span class="pl-c1">3100</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-c">/* Configure projects for major browsers */</span> <span class="pl-c1">projects</span>: <span class="pl-kos">[</span> <span class="pl-kos">{</span> <span class="pl-c1">name</span>: <span class="pl-s">'chromium'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Chrome'</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-c1">name</span>: <span class="pl-s">'firefox'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Firefox'</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-c1">name</span>: <span class="pl-s">'webkit'</span><span class="pl-kos">,</span> <span class="pl-c1">use</span>: <span class="pl-kos">{</span> ...<span class="pl-s1">devices</span><span class="pl-kos">[</span><span class="pl-s">'Desktop Safari'</span><span class="pl-kos">]</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><strong>Test file (self-contained)</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import { test, expect } from '@playwright/experimental-ct-react'; import App from './App'; test.use({ viewport: { width: 500, height: 500 } }); test('should work', async ({ mount }) =&gt; { const component = await mount(&lt;App /&gt;); await expect(component).toContainText('Learn React'); });"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span><span class="pl-kos">,</span> <span class="pl-s1">expect</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/experimental-ct-react'</span><span class="pl-kos">;</span> <span class="pl-k">import</span> <span class="pl-v">App</span> <span class="pl-k">from</span> <span class="pl-s">'./App'</span><span class="pl-kos">;</span> <span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">use</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">viewport</span>: <span class="pl-kos">{</span> <span class="pl-c1">width</span>: <span class="pl-c1">500</span><span class="pl-kos">,</span> <span class="pl-c1">height</span>: <span class="pl-c1">500</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-s">'should work'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> mount <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">component</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">mount</span><span class="pl-kos">(</span><span class="pl-c1">&lt;</span><span class="pl-ent">App</span> <span class="pl-c1">/</span><span class="pl-c1">&gt;</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">await</span> <span class="pl-en">expect</span><span class="pl-kos">(</span><span class="pl-s1">component</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toContainText</span><span class="pl-kos">(</span><span class="pl-s">'Learn React'</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>Steps</strong></p> <ol dir="auto"> <li>Follow the <a href="https://playwright.dev/docs/test-components#how-to-get-started" rel="nofollow">How to get started</a> steps to set up for component testing</li> <li>Install <code class="notranslate">react</code> and <code class="notranslate">react-dom</code> manually (not included with template)</li> <li>Add <code class="notranslate">src/App.tsx</code> file manually (not included with template)</li> <li><code class="notranslate">npm run test-ct</code></li> </ol> <p dir="auto"><strong>Expected</strong></p> <p dir="auto">Tests transpile successfully and execute.</p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">All tests fail with the following error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ReferenceError: React is not defined 5 | 6 | test('should work', async ({ mount }) =&gt; { &gt; 7 | const component = await mount(&lt;App /&gt;); | ^ 8 | await expect(component).toContainText('Learn React'); 9 | });"><pre class="notranslate"><code class="notranslate"> ReferenceError: React is not defined 5 | 6 | test('should work', async ({ mount }) =&gt; { &gt; 7 | const component = await mount(&lt;App /&gt;); | ^ 8 | await expect(component).toContainText('Learn React'); 9 | }); </code></pre></div>
<h3 dir="auto">System info</h3> <ul dir="auto"> <li>Playwright Version: [v1.32.3]</li> <li>Operating System: [All]</li> <li>Other info: GitLab pipeline</li> </ul> <h3 dir="auto">Source code</h3> <p dir="auto">For importing the results from my GitLab pipeline I use the extended Junit reporter which was fine so far.<br> All tests do have an test_key annotation with an already existing Test-Issue in Xray.</p> <p dir="auto">Config according to <a href="https://playwright.dev/docs/test-reporters#junit-reporter" rel="nofollow">docs</a></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// playwright.config.ts import { defineConfig, devices } from '@playwright/test'; const xrayOptions = { textContentAnnotations: ['test_description'], outputFile: './xray-report.xml' }; export default defineConfig({ reporter: [['junit', xrayOptions]] });"><pre class="notranslate"><span class="pl-c">// playwright.config.ts</span> <span class="pl-k">import</span> <span class="pl-kos">{</span> <span class="pl-s1">defineConfig</span><span class="pl-kos">,</span> <span class="pl-s1">devices</span> <span class="pl-kos">}</span> <span class="pl-k">from</span> <span class="pl-s">'@playwright/test'</span><span class="pl-kos">;</span> <span class="pl-k">const</span> <span class="pl-s1">xrayOptions</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">textContentAnnotations</span>: <span class="pl-kos">[</span><span class="pl-s">'test_description'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-c1">outputFile</span>: <span class="pl-s">'./xray-report.xml'</span> <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-en">defineConfig</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">reporter</span>: <span class="pl-kos">[</span><span class="pl-kos">[</span><span class="pl-s">'junit'</span><span class="pl-kos">,</span> <span class="pl-s1">xrayOptions</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>Test file</strong></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="test.describe.skip('ui tests @gui', () =&gt; { test('Some test', async ({ page }) =&gt; { test.info().annotations.push({ type: 'test_key', description: 'ABCD-166' }) // ..test code }) })"><pre class="notranslate"><span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-c1">describe</span><span class="pl-kos">.</span><span class="pl-en">skip</span><span class="pl-kos">(</span><span class="pl-s">'ui tests @gui'</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s">'Some test'</span><span class="pl-kos">,</span> <span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">{</span> page <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span> <span class="pl-s1">test</span><span class="pl-kos">.</span><span class="pl-en">info</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-c1">annotations</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-kos">{</span> <span class="pl-c1">type</span>: <span class="pl-s">'test_key'</span><span class="pl-kos">,</span> <span class="pl-c1">description</span>: <span class="pl-s">'ABCD-166'</span> <span class="pl-kos">}</span><span class="pl-kos">)</span> <span class="pl-c">// ..test code</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>Expected</strong></p> <p dir="auto">When the group is being skipped, all the contained tests are transferred with status ToDo to an Xray execution and no new test issues are created. No creation because of the existing test_key annotation and already existing corresponding test issues in Xray is the expected <a href="https://docs.getxray.app/display/XRAY/Working+with+Automated+Tests" rel="nofollow">flow</a></p> <p dir="auto"><strong>Actual</strong></p> <p dir="auto">All the tests within an skipped test.describe() group unnecessarily generate <strong>new</strong> test issues in Xray and an execution with run status ToDo. The existing test issues are being ignored instead of using them for attaching and linking the execution results, in this case <em>ToDo</em>.</p>
0
<p dir="auto"><strong>Describe the bug</strong></p> <p dir="auto">There is a problem with the EffectComposer in combination with a multisampled rendertargets.<br> This combination produce artefacts when two or more passes like RenderPass or TexturePass are enabled.</p> <p dir="auto"><strong>To Reproduce</strong></p> <p dir="auto">Steps to reproduce the behavior:</p> <ol dir="auto"> <li>Use a Revision after following commit: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/mrdoob/three.js/commit/b2ea47ac7a575032af050b43afb8f57478efc8b6/hovercard" href="https://github.com/mrdoob/three.js/commit/b2ea47ac7a575032af050b43afb8f57478efc8b6"><tt>b2ea47a</tt></a></li> <li>Open examples/webgl_postprocessing_backgrounds.html</li> <li>Modify the code</li> <li>See error</li> </ol> <p dir="auto"><em><strong>Code</strong></em></p> <div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//Modify following Line: composer = new EffectComposer( renderer ); //Change it to: const renderTarget = new THREE.WebGLMultisampleRenderTarget( width, height ); //Or for newer threejs version //const renderTarget = new THREE.WebGLRenderTarget( width, height, { samples: 1 } ); composer = new EffectComposer( renderer, renderTarget );"><pre class="notranslate"><span class="pl-c">//Modify following Line:</span> <span class="pl-s1">composer</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">EffectComposer</span><span class="pl-kos">(</span> <span class="pl-s1">renderer</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">//Change it to:</span> <span class="pl-k">const</span> <span class="pl-s1">renderTarget</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-c1">THREE</span><span class="pl-kos">.</span><span class="pl-c1">WebGLMultisampleRenderTarget</span><span class="pl-kos">(</span> <span class="pl-s1">width</span><span class="pl-kos">,</span> <span class="pl-s1">height</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">//Or for newer threejs version</span> <span class="pl-c">//const renderTarget = new THREE.WebGLRenderTarget( width, height, { samples: 1 } );</span> <span class="pl-s1">composer</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">EffectComposer</span><span class="pl-kos">(</span> <span class="pl-s1">renderer</span><span class="pl-kos">,</span> <span class="pl-s1">renderTarget</span> <span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div> <p dir="auto"><em><strong>Live example</strong></em></p> <ul dir="auto"> <li><a href="https://jsfiddle.net/th3s0urc3/dn4chvrf/" rel="nofollow">jsfiddle-v135-release</a></li> <li><a href="https://jsfiddle.net/th3s0urc3/nrbjqp96/" rel="nofollow">jsfiddle-dev</a></li> </ul> <p dir="auto"><strong>Expected behavior</strong></p> <p dir="auto">In v134 everything works as expected:</p> <ul dir="auto"> <li><a href="https://jsfiddle.net/th3s0urc3/t5mjb367/" rel="nofollow">jsfiddle-v134-release</a></li> </ul> <p dir="auto"><strong>Screenshots</strong></p> <p dir="auto">v135 with WebGLMultisampleRenderTarget - Chrome:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11577704/157195079-6bf8d4da-f53e-4281-b182-731517034416.png"><img src="https://user-images.githubusercontent.com/11577704/157195079-6bf8d4da-f53e-4281-b182-731517034416.png" alt="Screenshot 2022-03-08 091558" style="max-width: 100%;"></a></p> <p dir="auto">dev with WebGLRenderTarget and samples set to 1 - Chrome:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11577704/157195545-093269b0-6bee-4410-8f44-8ad9a9d4fc25.png"><img src="https://user-images.githubusercontent.com/11577704/157195545-093269b0-6bee-4410-8f44-8ad9a9d4fc25.png" alt="Screenshot 2022-03-08 091730" style="max-width: 100%;"></a></p> <p dir="auto">v135 with WebGLMultisampleRenderTarget - iOS Safari:<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11577704/157202642-1283142e-7fbc-40f3-829f-993484698326.jpg"><img src="https://user-images.githubusercontent.com/11577704/157202642-1283142e-7fbc-40f3-829f-993484698326.jpg" alt="photo_2022-03-08_09-31-33" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Platform:</strong></p> <ul dir="auto"> <li>Device: [Desktop, Mobile]</li> <li>OS: [Windows, Android, iOS]</li> <li>Browser: [Chrome, Safari, Edge]</li> <li>Three.js version: [dev, r135, <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/mrdoob/three.js/commit/b2ea47ac7a575032af050b43afb8f57478efc8b6/hovercard" href="https://github.com/mrdoob/three.js/commit/b2ea47ac7a575032af050b43afb8f57478efc8b6"><tt>b2ea47a</tt></a> ]</li> </ul>
<p dir="auto">Somehow mostof my EffectComposers, which use WebGLMultisampleRenderTargets, have become broken with v135.</p> <p dir="auto">NOTE: this problem only occurs on windows. On my mac it is fine.</p> <p dir="auto">You can see from the picture that things are pixelated. It seems to me that some render target isn't being cleared, whether it's color or depth I'm not sure yet.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/699/144848438-ce7fe21b-67fd-4f39-becc-b7e506aa2059.png"><img src="https://user-images.githubusercontent.com/699/144848438-ce7fe21b-67fd-4f39-becc-b7e506aa2059.png" alt="Screenshot 2021-12-06 134538" style="max-width: 100%;"></a></p> <p dir="auto">I have custom Passes, but even using having two vanilla RenderPasses triggers the problem</p> <p dir="auto">I have narrowed it down to this commit using git bisect and (and rebuilding):</p> <p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/mrdoob/three.js/commit/d16a6085ad632d46139f2de042d583d42d3d1deb/hovercard" href="https://github.com/mrdoob/three.js/commit/d16a6085ad632d46139f2de042d583d42d3d1deb"><tt>d16a608</tt></a></p> <p dir="auto"><a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/mrdoob/three.js/commit/d16a6085ad632d46139f2de042d583d42d3d1deb/hovercard" href="https://github.com/mrdoob/three.js/commit/d16a6085ad632d46139f2de042d583d42d3d1deb"><tt>d16a608</tt></a></p> <ul dir="auto"> <li>Device: [Desktop, Mobile]</li> <li>OS: [Windows, MacOS, Linux, Android, iOS]</li> <li>Browser: [Chrome, Firefox, Safari, Edge]</li> <li>Three.js version: [dev, r???]</li> </ul>
1
<p dir="auto">Hi,</p> <p dir="auto">Related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="90761003" data-permission-text="Title is private" data-url="https://github.com/keras-team/keras/issues/277" data-hovercard-type="pull_request" data-hovercard-url="/keras-team/keras/pull/277/hovercard" href="https://github.com/keras-team/keras/pull/277">#277</a>, I'd like to create an overlapping model but with the input comes from different place. Is it supported? How can I do this? The following code gives me an error because of the unexpected input.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="left = Sequential() left.add(Dense(784, 50)) left.add(Activation('relu')) model = Sequential() model.add(Merge([left, left], mode='concat')) model.add(Dense(100, 10)) model.add(Activation('softmax')) model.compile(loss='categorical_crossentropy', optimizer='rmsprop') model.fit([X1_train, X2_train], Y_train, batch_size=128, nb_epoch=20)"><pre class="notranslate"><span class="pl-s1">left</span> <span class="pl-c1">=</span> <span class="pl-v">Sequential</span>() <span class="pl-s1">left</span>.<span class="pl-en">add</span>(<span class="pl-v">Dense</span>(<span class="pl-c1">784</span>, <span class="pl-c1">50</span>)) <span class="pl-s1">left</span>.<span class="pl-en">add</span>(<span class="pl-v">Activation</span>(<span class="pl-s">'relu'</span>)) <span class="pl-s1">model</span> <span class="pl-c1">=</span> <span class="pl-v">Sequential</span>() <span class="pl-s1">model</span>.<span class="pl-en">add</span>(<span class="pl-v">Merge</span>([<span class="pl-s1">left</span>, <span class="pl-s1">left</span>], <span class="pl-s1">mode</span><span class="pl-c1">=</span><span class="pl-s">'concat'</span>)) <span class="pl-s1">model</span>.<span class="pl-en">add</span>(<span class="pl-v">Dense</span>(<span class="pl-c1">100</span>, <span class="pl-c1">10</span>)) <span class="pl-s1">model</span>.<span class="pl-en">add</span>(<span class="pl-v">Activation</span>(<span class="pl-s">'softmax'</span>)) <span class="pl-s1">model</span>.<span class="pl-en">compile</span>(<span class="pl-s1">loss</span><span class="pl-c1">=</span><span class="pl-s">'categorical_crossentropy'</span>, <span class="pl-s1">optimizer</span><span class="pl-c1">=</span><span class="pl-s">'rmsprop'</span>) <span class="pl-s1">model</span>.<span class="pl-en">fit</span>([<span class="pl-v">X1_train</span>, <span class="pl-v">X2_train</span>], <span class="pl-v">Y_train</span>, <span class="pl-s1">batch_size</span><span class="pl-c1">=</span><span class="pl-c1">128</span>, <span class="pl-s1">nb_epoch</span><span class="pl-c1">=</span><span class="pl-c1">20</span>)</pre></div> <p dir="auto">TIA</p>
<p dir="auto">Please make sure that the boxes below are checked before you submit your issue.<br> If your issue is an <strong>implementation question</strong>, please ask your question on <a href="http://stackoverflow.com/questions/tagged/keras" rel="nofollow">StackOverflow</a> or <a href="https://keras-slack-autojoin.herokuapp.com/" rel="nofollow">on the Keras Slack channel</a> instead of opening a GitHub issue.</p> <p dir="auto">Thank you!</p> <ul class="contains-task-list"> <li> <p dir="auto">[ 1] Check that you are up-to-date with the master branch of Keras. You can update with:<br> <code class="notranslate">pip install git+git://github.com/keras-team/keras.git --upgrade --no-deps</code></p> </li> <li> <p dir="auto">[ 1] Check that your version of TensorFlow is up-to-date. The installation instructions can be found <a href="https://www.tensorflow.org/get_started/os_setup" rel="nofollow">here</a>.</p> </li> <li class="task-list-item"> <p dir="auto"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).</p> </li> </ul> <p dir="auto">Hi,</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="I need to get weights from concatenate layer, when I did the following "><pre class="notranslate"><code class="notranslate">I need to get weights from concatenate layer, when I did the following </code></pre></div> <p dir="auto">joint = concatenate([src2, tgt2],name='joint')<br> w_sj,w_jt=np.hsplit(joint.get_weights()[0], 2)</p> <p dir="auto">I get the following error , 'Tensor' object has no attribute 'get_weights'</p>
0
<p dir="auto">Hi,<br> I installed Visual Studio Community 2013 and Typescript 1.4. When I changed all my enums to const enum (btw, very nice feature, thanks!) I noticed that compile-on-save feature doesn't handle this feature well.</p> <p dir="auto">When I use those const enums in other file than the one it was defined in then when I save file, they are not resolved to constant numbers.</p> <p dir="auto">For example I have file firstFile.ts:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const enum TestEnum { Foo, Bar } var testFirstFile = TestEnum.Bar;"><pre class="notranslate"><code class="notranslate">const enum TestEnum { Foo, Bar } var testFirstFile = TestEnum.Bar; </code></pre></div> <p dir="auto">and when I save file (by pressing Ctrl+S) i get file firstFile.js:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var testFirstFile = 1 /* Bar */; //# sourceMappingURL=firstFile.js.map"><pre class="notranslate"><code class="notranslate">var testFirstFile = 1 /* Bar */; //# sourceMappingURL=firstFile.js.map </code></pre></div> <p dir="auto">but When i have secondFile.ts file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;firstfile.ts&quot; /&gt; var testInOtherFile = TestEnum.Bar;"><pre class="notranslate"><code class="notranslate">/// &lt;reference path="firstfile.ts" /&gt; var testInOtherFile = TestEnum.Bar; </code></pre></div> <p dir="auto">and save file I get secondFile.js:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;firstfile.ts&quot; /&gt; var testInOtherFile = TestEnum.Bar; //# sourceMappingURL=secondFile.js.map"><pre class="notranslate"><code class="notranslate">/// &lt;reference path="firstfile.ts" /&gt; var testInOtherFile = TestEnum.Bar; //# sourceMappingURL=secondFile.js.map </code></pre></div> <p dir="auto">only when I build project in Visual Studio I get proper secondFile.js file:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;firstfile.ts&quot; /&gt; var testInOtherFile = 1 /* Bar */; //# sourceMappingURL=secondFile.js.map"><pre class="notranslate"><code class="notranslate">/// &lt;reference path="firstfile.ts" /&gt; var testInOtherFile = 1 /* Bar */; //# sourceMappingURL=secondFile.js.map </code></pre></div>
<ul dir="auto"> <li>have two external modules (a.ts which defines and exports an enum, b.ts which uses the enum)</li> <li>emit the JS code for b.ts</li> <li>emit the JS code for a.ts and notice that the enum reference is inlined (<code class="notranslate">console.log(0 /*A*/);</code>)</li> <li>change a.ts and emit only that file again</li> <li>=&gt; now the enum is <em>not</em> inlined anymore (<code class="notranslate">console.log(Foo.A);</code>). I can debug this into checker#getConstantValue which discovers the enum value but fails to find a proper node link. I guess this is because changing a.ts cleared some type caches)</li> </ul> <p dir="auto">a.ts</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Foo = require('./b'); console.log(Foo.A);"><pre class="notranslate"><code class="notranslate">import Foo = require('./b'); console.log(Foo.A); </code></pre></div> <p dir="auto">b.ts</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="enum Foo { A = 0, B = 1, C = 2 } export = Foo;"><pre class="notranslate"><code class="notranslate">enum Foo { A = 0, B = 1, C = 2 } export = Foo; </code></pre></div>
1
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="use std::num::Float; struct Point {x: f64, y: f64} fn compute_distance(p1: &amp;Point, p2: &amp;Point) -&gt; f64 { let x_d = p1.x - p2.x; let y_d = p1.y - p2.y; Float::sqrt(x_d * x_d + y_d * y_d) } fn main() { let on_the_stack : Point = Point {x: 3.0, y: 4.0}; let on_the_heap : Box&lt;Point&gt; = box Point {x: 7.0, y: 9.0}; compute_distance(&amp;on_the_stack, &amp;*on_the_heap); }"><pre class="notranslate"><span class="pl-k">use</span> std<span class="pl-kos">::</span>num<span class="pl-kos">::</span><span class="pl-v">Float</span><span class="pl-kos">;</span> <span class="pl-k">struct</span> <span class="pl-smi">Point</span> <span class="pl-kos">{</span><span class="pl-c1">x</span><span class="pl-kos">:</span> <span class="pl-smi">f64</span><span class="pl-kos">,</span> <span class="pl-c1">y</span><span class="pl-kos">:</span> <span class="pl-smi">f64</span><span class="pl-kos">}</span> <span class="pl-k">fn</span> <span class="pl-en">compute_distance</span><span class="pl-kos">(</span><span class="pl-s1">p1</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Point</span><span class="pl-kos">,</span> <span class="pl-s1">p2</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-smi">Point</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">f64</span> <span class="pl-kos">{</span> <span class="pl-k">let</span> x_d = p1<span class="pl-kos">.</span><span class="pl-c1">x</span> - p2<span class="pl-kos">.</span><span class="pl-c1">x</span><span class="pl-kos">;</span> <span class="pl-k">let</span> y_d = p1<span class="pl-kos">.</span><span class="pl-c1">y</span> - p2<span class="pl-kos">.</span><span class="pl-c1">y</span><span class="pl-kos">;</span> <span class="pl-smi">Float</span><span class="pl-kos">::</span><span class="pl-en">sqrt</span><span class="pl-kos">(</span>x_d <span class="pl-c1">*</span> x_d + y_d <span class="pl-c1">*</span> y_d<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> on_the_stack <span class="pl-kos">:</span> <span class="pl-smi">Point</span> = <span class="pl-smi">Point</span> <span class="pl-kos">{</span><span class="pl-c1">x</span><span class="pl-kos">:</span> <span class="pl-c1">3.0</span><span class="pl-kos">,</span> <span class="pl-c1">y</span><span class="pl-kos">:</span> <span class="pl-c1">4.0</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-k">let</span> on_the_heap <span class="pl-kos">:</span> <span class="pl-smi">Box</span><span class="pl-kos">&lt;</span><span class="pl-smi">Point</span><span class="pl-kos">&gt;</span> = box <span class="pl-smi">Point</span> <span class="pl-kos">{</span><span class="pl-c1">x</span><span class="pl-kos">:</span> <span class="pl-c1">7.0</span><span class="pl-kos">,</span> <span class="pl-c1">y</span><span class="pl-kos">:</span> <span class="pl-c1">9.0</span><span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-en">compute_distance</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span>on_the_stack<span class="pl-kos">,</span> <span class="pl-c1">&amp;</span><span class="pl-c1">*</span>on_the_heap<span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sun@sun:~/Desktop/Rust$ RUST_BACKTRACE=1 rustc reference_lifetime.rs error: internal compiler error: unexpected failure note: the compiler hit an unexpected failure path. 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 task 'rustc' failed at 'assertion failed: `(left == right) &amp;&amp; (right == left)` (left: `3`, right: `0`)', /home/sun/rust/src/librustc/middle/trans/callee.rs:528 stack backtrace: 1: 0xb61f3c80 - rt::backtrace::imp::write::h8e87d0f1c0e6314eOcq 2: 0xb61f6b80 - failure::on_fail::hd69e89a09fe1c193byq 3: 0xb656edd0 - unwind::begin_unwind_inner::h8024dabe9217e622Axd 4: 0xb656e9f0 - unwind::begin_unwind_fmt::he2b10618cd8e2a3b2ud 5: 0xb6af3910 - middle::trans::callee::trans_fn_ref_with_substs::h35ded8d4791617efGC3 6: 0xb6af17a0 - middle::trans::callee::trans_fn_ref::h6fb7a7f230364cc9wq3 7: 0xb6afa3d0 - middle::trans::callee::trans_call::closure.122313 8: 0xb6ad10f0 - middle::trans::callee::trans_call_inner::hb58abead86d536f4qY3 9: 0xb6afa140 - middle::trans::callee::trans_call::h1afd80801dd261bfKS3 10: 0xb6b09d60 - middle::trans::expr::trans_rvalue_dps_unadjusted::hd623d2ee101663f1365 11: 0xb6ac8780 - middle::trans::expr::trans_into::hfbee30f25eca9fb7BI4 12: 0xb6ac8bf0 - middle::trans::controlflow::trans_block::h1bd514ecdbd0e95bRY0 13: 0xb6b77750 - middle::trans::base::trans_closure::h6be5203281e95063V4g 14: 0xb6aba540 - middle::trans::base::trans_fn::hfdfc7543375f42e2jgh 15: 0xb6ab7540 - middle::trans::base::trans_item::h4c0dbd6cae5d4359Czh 16: 0xb6b82ac0 - middle::trans::base::trans_crate::h5d3949c27f22bd3dtxi 17: 0xb6ff9dc0 - driver::driver::phase_4_translate_to_llvm::h2473848275bafe8d6yA 18: 0xb6ff1030 - driver::driver::compile_input::hcf3ef773b2081d8f05z 19: 0xb707bc80 - driver::run_compiler::hf7e21306399a9813bTD 20: 0xb707bb30 - driver::run::closure.144861 21: 0xb6745ee0 - task::TaskBuilder&lt;S&gt;::try_future::closure.103260 22: 0xb6745cc0 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.103231 23: 0xb76d81b0 - task::NativeSpawner.Spawner::spawn::closure.8437 24: 0xb656e790 - unwind::try::try_fn::h9de4ea0e925684b3tod 25: 0xb65d7700 - rust_try_inner 26: 0xb65d76c0 - rust_try 27: 0xb656c770 - unwind::try::h30a13c8b3633dc23imd 28: 0xb656c5e0 - task::Task::run::hd3b288cf5211df4eWBc 29: 0xb76d7f30 - task::NativeSpawner.Spawner::spawn::closure.8377 30: 0xb656de90 - thread::thread_start::h22611edb92a890cf7Vc 31: 0xb60c9e40 - start_thread 32: 0xb64649f2 - clone 33: 0x0 - &lt;unknown&gt;"><pre class="notranslate"><code class="notranslate">sun@sun:~/Desktop/Rust$ RUST_BACKTRACE=1 rustc reference_lifetime.rs error: internal compiler error: unexpected failure note: the compiler hit an unexpected failure path. 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 task 'rustc' failed at 'assertion failed: `(left == right) &amp;&amp; (right == left)` (left: `3`, right: `0`)', /home/sun/rust/src/librustc/middle/trans/callee.rs:528 stack backtrace: 1: 0xb61f3c80 - rt::backtrace::imp::write::h8e87d0f1c0e6314eOcq 2: 0xb61f6b80 - failure::on_fail::hd69e89a09fe1c193byq 3: 0xb656edd0 - unwind::begin_unwind_inner::h8024dabe9217e622Axd 4: 0xb656e9f0 - unwind::begin_unwind_fmt::he2b10618cd8e2a3b2ud 5: 0xb6af3910 - middle::trans::callee::trans_fn_ref_with_substs::h35ded8d4791617efGC3 6: 0xb6af17a0 - middle::trans::callee::trans_fn_ref::h6fb7a7f230364cc9wq3 7: 0xb6afa3d0 - middle::trans::callee::trans_call::closure.122313 8: 0xb6ad10f0 - middle::trans::callee::trans_call_inner::hb58abead86d536f4qY3 9: 0xb6afa140 - middle::trans::callee::trans_call::h1afd80801dd261bfKS3 10: 0xb6b09d60 - middle::trans::expr::trans_rvalue_dps_unadjusted::hd623d2ee101663f1365 11: 0xb6ac8780 - middle::trans::expr::trans_into::hfbee30f25eca9fb7BI4 12: 0xb6ac8bf0 - middle::trans::controlflow::trans_block::h1bd514ecdbd0e95bRY0 13: 0xb6b77750 - middle::trans::base::trans_closure::h6be5203281e95063V4g 14: 0xb6aba540 - middle::trans::base::trans_fn::hfdfc7543375f42e2jgh 15: 0xb6ab7540 - middle::trans::base::trans_item::h4c0dbd6cae5d4359Czh 16: 0xb6b82ac0 - middle::trans::base::trans_crate::h5d3949c27f22bd3dtxi 17: 0xb6ff9dc0 - driver::driver::phase_4_translate_to_llvm::h2473848275bafe8d6yA 18: 0xb6ff1030 - driver::driver::compile_input::hcf3ef773b2081d8f05z 19: 0xb707bc80 - driver::run_compiler::hf7e21306399a9813bTD 20: 0xb707bb30 - driver::run::closure.144861 21: 0xb6745ee0 - task::TaskBuilder&lt;S&gt;::try_future::closure.103260 22: 0xb6745cc0 - task::TaskBuilder&lt;S&gt;::spawn_internal::closure.103231 23: 0xb76d81b0 - task::NativeSpawner.Spawner::spawn::closure.8437 24: 0xb656e790 - unwind::try::try_fn::h9de4ea0e925684b3tod 25: 0xb65d7700 - rust_try_inner 26: 0xb65d76c0 - rust_try 27: 0xb656c770 - unwind::try::h30a13c8b3633dc23imd 28: 0xb656c5e0 - task::Task::run::hd3b288cf5211df4eWBc 29: 0xb76d7f30 - task::NativeSpawner.Spawner::spawn::closure.8377 30: 0xb656de90 - thread::thread_start::h22611edb92a890cf7Vc 31: 0xb60c9e40 - start_thread 32: 0xb64649f2 - clone 33: 0x0 - &lt;unknown&gt; </code></pre></div> <p dir="auto">Version</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sun@sun:~/Desktop/Rust$ rustc -v rustc 0.13.0-dev (96991e933 2014-10-22 23:57:11 +0000)"><pre class="notranslate"><code class="notranslate">sun@sun:~/Desktop/Rust$ rustc -v rustc 0.13.0-dev (96991e933 2014-10-22 23:57:11 +0000) </code></pre></div> <p dir="auto">System</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.10 Release: 14.10 Codename: utopic"><pre class="notranslate"><code class="notranslate">No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 14.10 Release: 14.10 Codename: utopic </code></pre></div>
<h3 dir="auto">STR</h3> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// seq.rs use std::collections::HashMap; use std::hash::Hash; pub trait Seq&lt;T&gt; { #[cfg(ice)] fn add_elem(&amp;mut self, T); #[cfg(not(ice))] fn add_elem(&amp;mut Self, T); fn new() -&gt; Self; } impl&lt;K, V&gt; Seq&lt;(K, V)&gt; for HashMap&lt;K, V&gt; where K: Eq + Hash { #[cfg(ice)] fn add_elem(&amp;mut self, (key, value): (K, V)) { self.insert(key, value); } #[cfg(not(ice))] fn add_elem(m: &amp;mut HashMap&lt;K, V&gt;, (key, value): (K, V)) { m.insert(key, value); } fn new() -&gt; HashMap&lt;K, V&gt; { HashMap::new() } }"><pre class="notranslate"><span class="pl-c">// seq.rs</span> <span class="pl-k">use</span> std<span class="pl-kos">::</span>collections<span class="pl-kos">::</span><span class="pl-v">HashMap</span><span class="pl-kos">;</span> <span class="pl-k">use</span> std<span class="pl-kos">::</span>hash<span class="pl-kos">::</span><span class="pl-v">Hash</span><span class="pl-kos">;</span> <span class="pl-k">pub</span> <span class="pl-k">trait</span> <span class="pl-smi">Seq</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-c1">#<span class="pl-kos">[</span>cfg<span class="pl-kos">(</span>ice<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">fn</span> <span class="pl-en">add_elem</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">self</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-c1">#<span class="pl-kos">[</span>cfg<span class="pl-kos">(</span>not<span class="pl-kos">(</span>ice<span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">fn</span> <span class="pl-en">add_elem</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">Self</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">fn</span> <span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Self</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">impl</span><span class="pl-kos">&lt;</span><span class="pl-smi">K</span><span class="pl-kos">,</span> <span class="pl-smi">V</span><span class="pl-kos">&gt;</span> <span class="pl-smi">Seq</span><span class="pl-kos">&lt;</span><span class="pl-kos">(</span><span class="pl-smi">K</span><span class="pl-kos">,</span> <span class="pl-smi">V</span><span class="pl-kos">)</span><span class="pl-kos">&gt;</span> <span class="pl-k">for</span> <span class="pl-smi">HashMap</span><span class="pl-kos">&lt;</span><span class="pl-smi">K</span><span class="pl-kos">,</span> <span class="pl-smi">V</span><span class="pl-kos">&gt;</span> <span class="pl-k">where</span> <span class="pl-smi">K</span><span class="pl-kos">:</span> <span class="pl-smi">Eq</span> + <span class="pl-smi">Hash</span> <span class="pl-kos">{</span> <span class="pl-c1">#<span class="pl-kos">[</span>cfg<span class="pl-kos">(</span>ice<span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">fn</span> <span class="pl-en">add_elem</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">self</span><span class="pl-kos">,</span> <span class="pl-kos">(</span>key<span class="pl-kos">,</span> value<span class="pl-kos">)</span><span class="pl-kos">:</span> <span class="pl-kos">(</span><span class="pl-smi">K</span><span class="pl-kos">,</span> <span class="pl-smi">V</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-smi">self</span><span class="pl-kos">.</span><span class="pl-en">insert</span><span class="pl-kos">(</span>key<span class="pl-kos">,</span> value<span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-c1">#<span class="pl-kos">[</span>cfg<span class="pl-kos">(</span>not<span class="pl-kos">(</span>ice<span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">]</span></span> <span class="pl-k">fn</span> <span class="pl-en">add_elem</span><span class="pl-kos">(</span><span class="pl-s1">m</span><span class="pl-kos">:</span> <span class="pl-c1">&amp;</span><span class="pl-k">mut</span> <span class="pl-smi">HashMap</span><span class="pl-kos">&lt;</span><span class="pl-smi">K</span><span class="pl-kos">,</span> <span class="pl-smi">V</span><span class="pl-kos">&gt;</span><span class="pl-kos">,</span> <span class="pl-kos">(</span>key<span class="pl-kos">,</span> value<span class="pl-kos">)</span><span class="pl-kos">:</span> <span class="pl-kos">(</span><span class="pl-smi">K</span><span class="pl-kos">,</span> <span class="pl-smi">V</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> m<span class="pl-kos">.</span><span class="pl-en">insert</span><span class="pl-kos">(</span>key<span class="pl-kos">,</span> value<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">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">HashMap</span><span class="pl-kos">&lt;</span><span class="pl-smi">K</span><span class="pl-kos">,</span> <span class="pl-smi">V</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-smi">HashMap</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// app.rs extern crate seq; use std::collections::HashMap; fn main() { let _: HashMap&lt;char, String&gt; = { let mut temp = ::seq::Seq::new(); ::seq::Seq::add_elem(&amp;mut temp, ('a', &quot;apple&quot;.to_string())); temp }; }"><pre class="notranslate"><span class="pl-c">// app.rs</span> <span class="pl-k">extern</span> <span class="pl-k">crate</span> seq<span class="pl-kos">;</span> <span class="pl-k">use</span> std<span class="pl-kos">::</span>collections<span class="pl-kos">::</span><span class="pl-v">HashMap</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> _<span class="pl-kos">:</span> <span class="pl-smi">HashMap</span><span class="pl-kos">&lt;</span><span class="pl-smi">char</span><span class="pl-kos">,</span> <span class="pl-smi">String</span><span class="pl-kos">&gt;</span> = <span class="pl-kos">{</span> <span class="pl-k">let</span> <span class="pl-k">mut</span> temp = <span class="pl-kos">::</span>seq<span class="pl-kos">::</span><span class="pl-smi">Seq</span><span class="pl-kos">::</span><span class="pl-en">new</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">::</span>seq<span class="pl-kos">::</span><span class="pl-smi">Seq</span><span class="pl-kos">::</span><span class="pl-en">add_elem</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-k">mut</span> temp<span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s">'a'</span><span class="pl-kos">,</span> <span class="pl-s">"apple"</span><span class="pl-kos">.</span><span class="pl-en">to_string</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> temp <span class="pl-kos">}</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc --cfg ice --crate-type=lib seq.rs $ rustc -L . app.rs"><pre class="notranslate"><code class="notranslate">$ rustc --cfg ice --crate-type=lib seq.rs $ rustc -L . app.rs </code></pre></div> <p dir="auto">If you omit the <code class="notranslate">--cfg ice</code> flag, compiling <code class="notranslate">app.rs</code> doesn't ICE. In that case UFCS is not used at all.</p> <h3 dir="auto">Backtrace</h3> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="error: internal compiler error: unexpected failure note: the compiler hit an unexpected failure path. 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 task 'rustc' failed at 'assertion failed: `(left == right) &amp;&amp; (right == left)` (left: `11`, right: `0`)', /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/librustc/middle/trans/callee.rs:504 stack backtrace: 1: 0x7f8c4420a530 - rt::backtrace::imp::write::hc0bea45eeb94b4f2gDq 2: 0x7f8c4420d660 - &lt;unknown&gt; 3: 0x7f8c449ac890 - unwind::begin_unwind_inner::h7a44b117581e2f74Gxd 4: 0x7f8c449ac3d0 - unwind::begin_unwind_fmt::h45039a117ffe43968ud 5: 0x7f8c4518e740 - middle::trans::callee::trans_fn_ref_with_substs::h5c6fbb3c911b1c9bsm2 6: 0x7f8c4518bd60 - middle::trans::callee::trans_fn_ref::h76d352f707b079480a2 7: 0x7f8c45194650 - &lt;unknown&gt; 8: 0x7f8c4516c1b0 - middle::trans::callee::trans_call_inner::h1363a864f6bb88c0aI2 9: 0x7f8c451943a0 - middle::trans::callee::trans_call::hdf5a1e27fb88e0bavC2 10: 0x7f8c451a3530 - &lt;unknown&gt; 11: 0x7f8c45164440 - middle::trans::expr::trans_into::h51830a680129f037ss3 12: 0x7f8c45163830 - middle::trans::controlflow::trans_stmt_semi::h4f58c2f4320d1330KEZ 13: 0x7f8c45162de0 - middle::trans::controlflow::trans_stmt::h46e53ff7f38da11cxAZ 14: 0x7f8c45164860 - middle::trans::controlflow::trans_block::ha4ca6acf3ba4f0c5DFZ 15: 0x7f8c451a3530 - &lt;unknown&gt; 16: 0x7f8c451a2170 - &lt;unknown&gt; 17: 0x7f8c45165990 - middle::trans::expr::trans::h1177439ad486cf5emw3 18: 0x7f8c4520b8f0 - middle::trans::_match::store_local::hde75dbf3d187178beZi 19: 0x7f8c45163a20 - middle::trans::base::init_local::h9df9f875fba43791YJe 20: 0x7f8c45162de0 - middle::trans::controlflow::trans_stmt::h46e53ff7f38da11cxAZ 21: 0x7f8c45164860 - middle::trans::controlflow::trans_block::ha4ca6acf3ba4f0c5DFZ 22: 0x7f8c452150f0 - middle::trans::base::trans_closure::h56e66481b064a22boBf 23: 0x7f8c45156370 - middle::trans::base::trans_fn::hcc6c7d7c981b98c0MMf 24: 0x7f8c451539d0 - middle::trans::base::trans_item::h1fa8cc7bd69d090855f 25: 0x7f8c452206b0 - middle::trans::base::trans_crate::he0691a6f7c0f1264B4g 26: 0x7f8c45671e10 - driver::driver::phase_4_translate_to_llvm::hfb1745881244cd9ayEx 27: 0x7f8c45668110 - driver::driver::compile_input::hc2b446e7823ca44dtbx 28: 0x7f8c456f3980 - &lt;unknown&gt; 29: 0x7f8c456f3830 - &lt;unknown&gt; 30: 0x7f8c44db9d80 - &lt;unknown&gt; 31: 0x7f8c44db9b60 - &lt;unknown&gt; 32: 0x7f8c45f65980 - &lt;unknown&gt; 33: 0x7f8c449fd4b0 - &lt;unknown&gt; 34: 0x7f8c449fd4a0 - rust_try 35: 0x7f8c449aa150 - unwind::try::h18af68ce3545f05domd 36: 0x7f8c449a9fd0 - task::Task::run::he7074020ac841b032Bc 37: 0x7f8c45f656c0 - &lt;unknown&gt; 38: 0x7f8c449ab8a0 - &lt;unknown&gt; 39: 0x7f8c43cd21d0 - start_thread 40: 0x7f8c446851b9 - clone 41: 0x0 - &lt;unknown&gt;"><pre class="notranslate">error<span class="pl-kos">:</span> internal compiler error<span class="pl-kos">:</span> unexpected failure note<span class="pl-kos">:</span> the compiler hit an unexpected failure path<span class="pl-kos">.</span> <span class="pl-c1">this</span> is a bug<span class="pl-kos">.</span> <span class="pl-c1">note</span><span class="pl-kos">:</span> we would appreciate a bug report<span class="pl-kos">:</span> http<span class="pl-kos">:</span><span class="pl-c">//doc.rust-lang.org/complement-bugreport.html</span> note<span class="pl-kos">:</span> run with `<span class="pl-v">RUST_BACKTRACE</span>=<span class="pl-c1">1</span>` <span class="pl-k">for</span> a backtrace task <span class="pl-c1">'</span>rustc<span class="pl-c1">'</span> failed at <span class="pl-c1">'</span>assertion failed<span class="pl-kos">:</span> `<span class="pl-kos">(</span>left == right<span class="pl-kos">)</span> &amp;&amp; <span class="pl-kos">(</span>right == left<span class="pl-kos">)</span>` <span class="pl-kos">(</span>left<span class="pl-kos">:</span> `<span class="pl-c1">11</span>`<span class="pl-kos">,</span> right<span class="pl-kos">:</span> `<span class="pl-c1">0</span>`<span class="pl-kos">)</span><span class="pl-c1">'</span><span class="pl-kos">,</span> /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/librustc/middle/trans/callee<span class="pl-kos">.</span><span class="pl-c1">rs</span><span class="pl-kos">:</span><span class="pl-c1">504</span> stack backtrace<span class="pl-kos">:</span> <span class="pl-c1">1</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c4420a530</span> - rt<span class="pl-kos">::</span>backtrace<span class="pl-kos">::</span>imp<span class="pl-kos">::</span>write<span class="pl-kos">::</span>hc0bea45eeb94b4f2gDq <span class="pl-c1">2</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c4420d660</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">3</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c449ac890</span> - unwind<span class="pl-kos">::</span>begin_unwind_inner<span class="pl-kos">::</span>h7a44b117581e2f74Gxd <span class="pl-c1">4</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c449ac3d0</span> - unwind<span class="pl-kos">::</span>begin_unwind_fmt<span class="pl-kos">::</span>h45039a117ffe43968ud <span class="pl-c1">5</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c4518e740</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>callee<span class="pl-kos">::</span>trans_fn_ref_with_substs<span class="pl-kos">::</span>h5c6fbb3c911b1c9bsm2 <span class="pl-c1">6</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c4518bd60</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>callee<span class="pl-kos">::</span>trans_fn_ref<span class="pl-kos">::</span>h76d352f707b079480a2 <span class="pl-c1">7</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45194650</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">8</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c4516c1b0</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>callee<span class="pl-kos">::</span>trans_call_inner<span class="pl-kos">::</span>h1363a864f6bb88c0aI2 <span class="pl-c1">9</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c451943a0</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>callee<span class="pl-kos">::</span>trans_call<span class="pl-kos">::</span>hdf5a1e27fb88e0bavC2 <span class="pl-c1">10</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c451a3530</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">11</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45164440</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>expr<span class="pl-kos">::</span>trans_into<span class="pl-kos">::</span>h51830a680129f037ss3 <span class="pl-c1">12</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45163830</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>controlflow<span class="pl-kos">::</span>trans_stmt_semi<span class="pl-kos">::</span>h4f58c2f4320d1330KEZ <span class="pl-c1">13</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45162de0</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>controlflow<span class="pl-kos">::</span>trans_stmt<span class="pl-kos">::</span>h46e53ff7f38da11cxAZ <span class="pl-c1">14</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45164860</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>controlflow<span class="pl-kos">::</span>trans_block<span class="pl-kos">::</span>ha4ca6acf3ba4f0c5DFZ <span class="pl-c1">15</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c451a3530</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">16</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c451a2170</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">17</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45165990</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>expr<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>h1177439ad486cf5emw3 <span class="pl-c1">18</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c4520b8f0</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>_match<span class="pl-kos">::</span>store_local<span class="pl-kos">::</span>hde75dbf3d187178beZi <span class="pl-c1">19</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45163a20</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>base<span class="pl-kos">::</span>init_local<span class="pl-kos">::</span>h9df9f875fba43791YJe <span class="pl-c1">20</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45162de0</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>controlflow<span class="pl-kos">::</span>trans_stmt<span class="pl-kos">::</span>h46e53ff7f38da11cxAZ <span class="pl-c1">21</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45164860</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>controlflow<span class="pl-kos">::</span>trans_block<span class="pl-kos">::</span>ha4ca6acf3ba4f0c5DFZ <span class="pl-c1">22</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c452150f0</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>base<span class="pl-kos">::</span>trans_closure<span class="pl-kos">::</span>h56e66481b064a22boBf <span class="pl-c1">23</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45156370</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>base<span class="pl-kos">::</span>trans_fn<span class="pl-kos">::</span>hcc6c7d7c981b98c0MMf <span class="pl-c1">24</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c451539d0</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>base<span class="pl-kos">::</span>trans_item<span class="pl-kos">::</span>h1fa8cc7bd69d090855f <span class="pl-c1">25</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c452206b0</span> - middle<span class="pl-kos">::</span>trans<span class="pl-kos">::</span>base<span class="pl-kos">::</span>trans_crate<span class="pl-kos">::</span>he0691a6f7c0f1264B4g <span class="pl-c1">26</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45671e10</span> - driver<span class="pl-kos">::</span>driver<span class="pl-kos">::</span>phase_4_translate_to_llvm<span class="pl-kos">::</span>hfb1745881244cd9ayEx <span class="pl-c1">27</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45668110</span> - driver<span class="pl-kos">::</span>driver<span class="pl-kos">::</span>compile_input<span class="pl-kos">::</span>hc2b446e7823ca44dtbx <span class="pl-c1">28</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c456f3980</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">29</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c456f3830</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">30</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c44db9d80</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">31</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c44db9b60</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">32</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45f65980</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">33</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c449fd4b0</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">34</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c449fd4a0</span> - rust_try <span class="pl-c1">35</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c449aa150</span> - unwind<span class="pl-kos">::</span>try<span class="pl-kos">::</span>h18af68ce3545f05domd <span class="pl-c1">36</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c449a9fd0</span> - task<span class="pl-kos">::</span><span class="pl-smi">Task</span><span class="pl-kos">::</span>run<span class="pl-kos">::</span>he7074020ac841b032Bc <span class="pl-c1">37</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c45f656c0</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">38</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c449ab8a0</span> - &lt;<span class="pl-smi">unknown</span>&gt; <span class="pl-c1">39</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c43cd21d0</span> - start_thread <span class="pl-c1">40</span><span class="pl-kos">:</span> <span class="pl-c1">0x7f8c446851b9</span> - clone <span class="pl-c1">41</span><span class="pl-kos">:</span> <span class="pl-c1">0x0</span> - &lt;<span class="pl-smi">unknown</span>&gt;</pre></div> <h3 dir="auto">Version</h3> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="rustc 0.13.0-dev (e4761c85b 2014-10-15 09:57:18 +0000)"><pre class="notranslate">rustc <span class="pl-c1">0.13</span><span class="pl-kos">.</span><span class="pl-c1">0</span>-<span class="pl-en">dev</span> <span class="pl-kos">(</span>e4761c85b <span class="pl-c1">2014</span>-<span class="pl-c1">10</span>-<span class="pl-c1">15</span> <span class="pl-c1">09</span><span class="pl-kos">:</span><span class="pl-c1">57</span><span class="pl-kos">:</span><span class="pl-c1">18</span> +<span class="pl-c1">0000</span><span class="pl-kos">)</span></pre></div> <p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/nick29581/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/nick29581">@nick29581</a></p>
1
<p dir="auto">I am a windows user with two windows monitors. I tend to have shortcuts on my desktop ordered in a way unique to me. There are times that I either accidentally sort my icons, or Windows mess up when my monitor goes to sleep, and they all move around.</p> <p dir="auto">My father is a software engineer who wrote me a small application the backup and restores desktop icon positions, that works over multi-monitors, by merely keeping a save file of the coordinates of each shortcut on the desktop.</p> <p dir="auto">Seeing this feature would surely be helpful to others, and thus I request this feature.</p>
<p dir="auto">It would be great to have a tool to save AND restore the location of all shortcut icons on the desktop.</p> <p dir="auto">For some reason with single monitor, or multiple monitors with different resolutions, different zoom/font size/icon size and spacing/etc. The location of these icons is reset and you're left with all icons Auto-Arranged on the left of the screen, like Windows threw its hands up and said IDK, forget whatever locations they are and now set them up in the default grid.</p> <p dir="auto">There used to be a tool for this years ago. Can't seem to find it. It was third-party and not part of Power Toys. Worked in Windows 7.</p> <p dir="auto">Use a Desktop [optional Shift] Right Click menu that allows you to SAVE the current icon positions and the same to RESTORE the last saved locations.<br> If new icons were added after the last save, then place them as appropriately as possible.<br> Only stores the last saved location. Can have profiles, but not necessary on the first iteration.</p>
1
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1985" rel="nofollow">http://projects.scipy.org/numpy/ticket/1985</a> on 2011-11-22 by trac user gsiisg, assigned to unknown.</em></p> <p dir="auto">I notice that when I plot two variables, the x and y axis are flipped according to the online example, so I did a simple distribution of points</p> <p dir="auto">x=np.array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1])<br> y=np.array([ 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 100])<br> H, yedges, xedges = np.histogram2d(y,x)<br> extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]]<br> pylab.imshow(H, extent=extent, interpolation='nearest',origin='lower',aspect='auto')</p> <p dir="auto">I had to enter into histgram2d() the "y" before the "x" to get the graph to come out as expected.</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/numpy/ticket/1830" rel="nofollow">http://projects.scipy.org/numpy/ticket/1830</a> on 2011-05-14 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/samtygier/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/samtygier">@samtygier</a>, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pv">@pv</a>.</em></p> <p dir="auto">the matplotlib example in <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram2d.html" rel="nofollow">http://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram2d.html</a> plots the data with the axis the wrong way. i think this is mostly the fault of imshow working in backwards coordinates.</p> <p dir="auto">the lines should be:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]] plt.imshow(H.transpose(), extent=extent, interpolation='nearest', origin=&quot;lower&quot;)"><pre class="notranslate"><code class="notranslate">extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]] plt.imshow(H.transpose(), extent=extent, interpolation='nearest', origin="lower") </code></pre></div> <p dir="auto">test script (broken, as per numpy docs):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="x = np.array([2, 2, -1, -1, -0.2]) y = np.array([1,-1.1, 1, -1, 0.5]) H, xedges, yedges = np.histogram2d(x,y, bins=(50, 50)) extent = [yedges[0], yedges[-1], xedges[-1], xedges[0]] plt.imshow(H, extent=extent, interpolation='nearest') plt.show()"><pre class="notranslate"><code class="notranslate">x = np.array([2, 2, -1, -1, -0.2]) y = np.array([1,-1.1, 1, -1, 0.5]) H, xedges, yedges = np.histogram2d(x,y, bins=(50, 50)) extent = [yedges[0], yedges[-1], xedges[-1], xedges[0]] plt.imshow(H, extent=extent, interpolation='nearest') plt.show() </code></pre></div> <p dir="auto">test script (fixed):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="x = np.array([2, 2, -1, -1, -0.2]) y = np.array([1,-1.1, 1, -1, 0.5]) H, xedges, yedges = np.histogram2d(x,y, bins=(50, 50)) extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]] plt.imshow(H.transpose(), extent=extent, interpolation='nearest', origin=&quot;lower&quot;) plt.show()"><pre class="notranslate"><code class="notranslate">x = np.array([2, 2, -1, -1, -0.2]) y = np.array([1,-1.1, 1, -1, 0.5]) H, xedges, yedges = np.histogram2d(x,y, bins=(50, 50)) extent = [xedges[0], xedges[-1], yedges[0], yedges[-1]] plt.imshow(H.transpose(), extent=extent, interpolation='nearest', origin="lower") plt.show() </code></pre></div>
1
<p dir="auto">Currently the scripting API allows to return arbitrary objects. This is an issue for search scripts because they might be called billions of times in a single search request and missing information about the return type makes things harder to optimize.</p> <p dir="auto">So we could look into specializing the search script API so that it would only be allowed to return a double. This would break a couple of things however:</p> <ul dir="auto"> <li>scripts would not be able to return multiple values per document anymore,</li> <li>scripts would not be able to return anything else than a double, so eg. building a string in a script and returning it would be impossible.</li> </ul> <p dir="auto">This is likely not an issue for the main use cases that we want to support with scripting, such as multiplying the score with the log of the value of some field. However I wolud not be surprised that there are some existing search scripts producing arrays of numbers or strings in the wild.</p>
<p dir="auto">I get 'T'/'F' and also 't' terms for a boolean field, leading to problems when filtering on the field. The below gist reproduces this:-</p> <p dir="auto"><a href="https://gist.github.com/4284891">https://gist.github.com/4284891</a></p> <p dir="auto">This is on elasticsearch 0.20.1, a quick check on 0.19.10 and I can't reproduce this.</p>
0
<p dir="auto">Version: 1.0.0<br> OS Version: Microsoft Windows NT 10.0.18363.0<br> IntPtr Length: 8<br> x64: True<br> Date: 08/06/2020 20:22:56<br> Exception:<br> System.ObjectDisposedException: Cannot access a disposed object.<br> Object name: 'Timer'.<br> at System.Timers.Timer.set_Enabled(Boolean value)<br> at System.Timers.Timer.Start()<br> at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br> at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br> at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br> at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br> at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br> at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br> at System.Windows.UIElement.UpdateIsVisibleCache()<br> at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br> at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br> at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br> at System.Windows.Window.SetRootVisual()<br> at System.Windows.Window.SetRootVisualAndUpdateSTC()<br> at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br> at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br> at System.Windows.Window.CreateSourceWindowDuringShow()<br> at System.Windows.Window.SafeCreateWindowDuringShow()<br> at System.Windows.Window.ShowHelper(Object booleanBox)<br> at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br> at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p> <p dir="auto"><a href="https://github.com/microsoft/PowerToys/files/5036688/2020-08-06.txt">2020-08-06.txt</a></p>
<p dir="auto">Popup tells me to give y'all this.</p> <p dir="auto"><a href="https://github.com/microsoft/PowerToys/files/5009460/2020-07-31.txt">2020-07-31.txt</a></p> <p dir="auto">Version: 1.0.0<br> OS Version: Microsoft Windows NT 10.0.19041.0<br> IntPtr Length: 8<br> x64: True<br> Date: 07/31/2020 17:29:59<br> Exception:<br> System.ObjectDisposedException: Cannot access a disposed object.<br> Object name: 'Timer'.<br> at System.Timers.Timer.set_Enabled(Boolean value)<br> at System.Timers.Timer.Start()<br> at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br> at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br> at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br> at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br> at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br> at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br> at System.Windows.UIElement.UpdateIsVisibleCache()<br> at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br> at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br> at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br> at System.Windows.Window.SetRootVisual()<br> at System.Windows.Window.SetRootVisualAndUpdateSTC()<br> at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br> at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br> at System.Windows.Window.CreateSourceWindowDuringShow()<br> at System.Windows.Window.SafeCreateWindowDuringShow()<br> at System.Windows.Window.ShowHelper(Object booleanBox)<br> at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br> at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p>
1
<p dir="auto">PT threw and error and crashed. Trying to launch again, it threw a "PT Run got an error" box with some info and suggested creating a new ticket here. I have uploaded the requested document to this ticket as well.</p> <p dir="auto">Exception message:<br> Version: 1.0.0<br> OS Version: Microsoft Windows NT 10.0.19041.0<br> IntPtr Length: 8<br> x64: True<br> Date: 08/04/2020 09:29:14<br> Exception:<br> System.ObjectDisposedException: Cannot access a disposed object.<br> Object name: 'Timer'.<br> at System.Timers.Timer.set_Enabled(Boolean value)<br> at System.Timers.Timer.Start()<br> at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br> at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br> at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br> at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br> at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br> at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br> at System.Windows.UIElement.UpdateIsVisibleCache()<br> at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br> at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br> at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br> at System.Windows.Window.SetRootVisual()<br> at System.Windows.Window.SetRootVisualAndUpdateSTC()<br> at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br> at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br> at System.Windows.Window.CreateSourceWindowDuringShow()<br> at System.Windows.Window.SafeCreateWindowDuringShow()<br> at System.Windows.Window.ShowHelper(Object booleanBox)<br> at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br> at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p> <p dir="auto"><a href="https://github.com/microsoft/PowerToys/files/5022358/2020-08-04.txt">2020-08-04.txt</a></p>
<p dir="auto">Popup tells me to give y'all this.</p> <p dir="auto"><a href="https://github.com/microsoft/PowerToys/files/5009460/2020-07-31.txt">2020-07-31.txt</a></p> <p dir="auto">Version: 1.0.0<br> OS Version: Microsoft Windows NT 10.0.19041.0<br> IntPtr Length: 8<br> x64: True<br> Date: 07/31/2020 17:29:59<br> Exception:<br> System.ObjectDisposedException: Cannot access a disposed object.<br> Object name: 'Timer'.<br> at System.Timers.Timer.set_Enabled(Boolean value)<br> at System.Timers.Timer.Start()<br> at PowerLauncher.MainWindow.OnVisibilityChanged(Object sender, DependencyPropertyChangedEventArgs e)<br> at System.Windows.UIElement.RaiseDependencyPropertyChanged(EventPrivateKey key, DependencyPropertyChangedEventArgs args)<br> at System.Windows.UIElement.OnIsVisibleChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)<br> at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br> at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)<br> at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)<br> at System.Windows.UIElement.UpdateIsVisibleCache()<br> at System.Windows.PresentationSource.RootChanged(Visual oldRoot, Visual newRoot)<br> at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)<br> at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)<br> at System.Windows.Window.SetRootVisual()<br> at System.Windows.Window.SetRootVisualAndUpdateSTC()<br> at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)<br> at System.Windows.Window.CreateSourceWindow(Boolean duringShow)<br> at System.Windows.Window.CreateSourceWindowDuringShow()<br> at System.Windows.Window.SafeCreateWindowDuringShow()<br> at System.Windows.Window.ShowHelper(Object booleanBox)<br> at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<br> at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)</p>
1
<p dir="auto">e.g. <a href="http://t_rost.rosfirm.ru/" rel="nofollow">http://t_rost.rosfirm.ru/</a> is valid URL</p> <p dir="auto"><a href="https://github.com/symfony/Validator/blob/0a118a6e885937378d41b97b152ecec2058c89dc/Constraints/UrlValidator.php#L29">https://github.com/symfony/Validator/blob/0a118a6e885937378d41b97b152ecec2058c89dc/Constraints/UrlValidator.php#L29</a></p>
<p dir="auto">Url validator accept as valid an url like the following:<br> <a href="http://testsub+domanin.domanin.com:8080/test" rel="nofollow">http://testsub+domanin.domanin.com:8080/test</a></p> <p dir="auto">but does not accept<br> <a href="http://test_sub_domanin.domanin.com:8080/test" rel="nofollow">http://test_sub_domanin.domanin.com:8080/test</a></p> <p dir="auto">The problem seems to be here:<br> symfony / src / Symfony / Component / Validator / Constraints / UrlValidator.php<br> Line 28: ([\pL\pN\pS-]+.)+[\pL]+ # a domain name</p> <p dir="auto">The fix can be as simple as replacing \pS (mathematical symbol) with \pP (punctuation character) or even better i think \pPc (Connector Punctuation character)</p>
1
<p dir="auto">There are several issues currently with the mailing list on librelist:</p> <ol dir="auto"> <li>The website (<a href="http://librelist.com/" rel="nofollow">http://librelist.com/</a>) is currently down. This might be transient, or this might be because the service has been slowly decaying over the last months.</li> <li>The synchro to <a href="http://flask.pocoo.org/mailinglist/archive/" rel="nofollow">http://flask.pocoo.org/mailinglist/archive/</a> is broken since 2012/10/29.</li> <li>I've been unsubscribed a few months ago due to transient a problem with my DNS. I have since tried many times to subscribe again with the same address, with no success. This may be a very specific problem, or this may be a manifestation of more general issues with the mailing list management system.</li> <li>I have also tried registering with gmail adresses created just for the purpose of reading the Flask mailing list. I've had mixed successes, and I've also noticed that some of the emails I could see on the librelist.com archives were not delivered to my account(s).</li> <li>AFAICT, traffic to the mailing list has been going down over approximately the last 2-3 months. This might be because interest in Flask is slowly fading away (if true, bad news for us Flask users), or this might be because of some of the technical issues I've mentioned above (or others), in which case proactive actions should be taken to keep users engaged.</li> </ol> <p dir="auto">For these reasons, I'm wondering if moving to another mailing list management platform would not be appropriate.</p> <p dir="auto">S.</p>
<p dir="auto">Typing issue between <code class="notranslate">mypy</code> <em>0.960</em> (and all prior versions I tested) and <code class="notranslate">Flask</code> <em>2.1.2</em>. Not sure whether the issue is in mypy or Flask, but I guess it has something to do with the later.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# file test.py from flask import Flask, Response app = Flask(&quot;hello&quot;) def nope(res: Response) -&gt; Response: return res app.after_request(nope)"><pre class="notranslate"><span class="pl-c"># file test.py</span> <span class="pl-k">from</span> <span class="pl-s1">flask</span> <span class="pl-k">import</span> <span class="pl-v">Flask</span>, <span class="pl-v">Response</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">Flask</span>(<span class="pl-s">"hello"</span>) <span class="pl-k">def</span> <span class="pl-en">nope</span>(<span class="pl-s1">res</span>: <span class="pl-v">Response</span>) <span class="pl-c1">-&gt;</span> <span class="pl-v">Response</span>: <span class="pl-k">return</span> <span class="pl-s1">res</span> <span class="pl-s1">app</span>.<span class="pl-en">after_request</span>(<span class="pl-s1">nope</span>)</pre></div> <p dir="auto">Then run:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mypy test.py"><pre class="notranslate">mypy test.py</pre></div> <p dir="auto">Results in:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="test.py:8: error: Argument 1 to &quot;after_request&quot; of &quot;Scaffold&quot; has incompatible type &quot;Callable[[Arg(Response, 'res')], Response]&quot;; expected &quot;Callable[[Response], Response]&quot; Found 1 error in 1 file (checked 1 source file)"><pre class="notranslate"><code class="notranslate">test.py:8: error: Argument 1 to "after_request" of "Scaffold" has incompatible type "Callable[[Arg(Response, 'res')], Response]"; expected "Callable[[Response], Response]" Found 1 error in 1 file (checked 1 source file) </code></pre></div> <p dir="auto">However, the same tests is fine with Flask <em>2.0.0</em> (for instance).</p> <ul dir="auto"> <li>Python version: 3.8.10</li> <li>Flask version: 2.1.2</li> </ul>
0
<p dir="auto">I just upgraded to <code class="notranslate">[email protected]</code>, I use a custom server, when I try to <code class="notranslate">run dev</code>, I get an error.</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm run dev &gt; [email protected] dev /Users/foo/gitlab/next-project/backend &gt; babel-node ./src/server.js /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328 throw e; ^ Error: Plugin 0 specified in &quot;/Users/foo/gitlab/next-project/backend/node_modules/next/babel.js&quot; provided an invalid property of &quot;default&quot; (While processing preset: &quot;/Users/foo/gitlab/next-project/backend/node_modules/next/babel.js&quot;) at Plugin.init (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/plugin.js:131:13) at Function.normalisePlugin (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12) at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30 at Array.map (&lt;anonymous&gt;) at Function.normalisePlugins (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20) at OptionManager.mergeOptions (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36) at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14 at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22 at Array.map (&lt;anonymous&gt;) at OptionManager.resolvePresets (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] dev: `babel-node ./src/server.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/foo/.npm/_logs/2018-04-30T08_41_09_819Z-debug.log"><pre class="notranslate"><code class="notranslate">npm run dev &gt; [email protected] dev /Users/foo/gitlab/next-project/backend &gt; babel-node ./src/server.js /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328 throw e; ^ Error: Plugin 0 specified in "/Users/foo/gitlab/next-project/backend/node_modules/next/babel.js" provided an invalid property of "default" (While processing preset: "/Users/foo/gitlab/next-project/backend/node_modules/next/babel.js") at Plugin.init (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/plugin.js:131:13) at Function.normalisePlugin (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:152:12) at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:184:30 at Array.map (&lt;anonymous&gt;) at Function.normalisePlugins (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20) at OptionManager.mergeOptions (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36) at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:265:14 at /Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:323:22 at Array.map (&lt;anonymous&gt;) at OptionManager.resolvePresets (/Users/foo/gitlab/next-project/backend/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] dev: `babel-node ./src/server.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] dev script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /Users/foo/.npm/_logs/2018-04-30T08_41_09_819Z-debug.log </code></pre></div> <blockquote> <p dir="auto">UPDATE all this passed after upgrading all babel packages to v7</p> </blockquote> <p dir="auto">Now this is the new error.... See below for complete error message</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR Failed to compile with 1 errors 10:32:07 error in ./pages/_document.js Module build failed: Error: [BABEL] /Users/foo/gitlab/zyombo/backend/pages/_document.js: .value is not a valid Plugin property"><pre class="notranslate"><code class="notranslate">ERROR Failed to compile with 1 errors 10:32:07 error in ./pages/_document.js Module build failed: Error: [BABEL] /Users/foo/gitlab/zyombo/backend/pages/_document.js: .value is not a valid Plugin property </code></pre></div>
<p dir="auto">Can Next.js emit split chunks for server side code? Does this provide any meaningful boost to the build speed?</p> <p dir="auto">We need to measure and test this theory.</p>
0
<p dir="auto">I was thinking about recommending Atom to a friend, and I went to the <a href="https://atom.io/" rel="nofollow">https://atom.io/</a> to see if there were Windows builds. The site saw I was on Linux, showed me the .deb and .rpm links, and a link for "Other platforms". That page contained this text:</p> <blockquote> <p dir="auto">Prebuilt versions of Atom are available for OS X 10.8 or later, Windows 7 &amp; 8, RedHat Linux, and Ubuntu Linux.</p> </blockquote> <p dir="auto">but doesn't link to them or really inspire confidence that they do exist somewhere. It seems like I'd be out of luck if I wanted to save one of their installers to a flash drive to install on another computer offline.</p>
<p dir="auto">Atom version: 0.189.0<br> Operating system: Linux Mint 17 Cinnamon 64-bit<br> Installed from the .deb package.</p> <p dir="auto">After using the editor for a while (~10 minutes) the moment I press the middle mouse button (to paste some text into editor) the whole editor crashes. The issue does not appear if I just open a new window and start pasting content, only after some changes have been done to file. I ran the editor with '-f' option and looked into developer tools but no error of any kind appears in logs.</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1315472/7027754/9bc240a6-dd51-11e4-951a-b336d9ed07d6.png"><img src="https://cloud.githubusercontent.com/assets/1315472/7027754/9bc240a6-dd51-11e4-951a-b336d9ed07d6.png" alt="a not-really-informative screenshot" style="max-width: 100%;"></a></p>
0
<h3 dir="auto">Bug summary</h3> <p dir="auto">This possible bug seems to be related to some incompatibility between the “extend” argument in “plt.figure.colorbar” and “.ax.invert_yaxis()” functions. More specifically, if I just extend the max of colorbar (second figure) or just invert the y-axis of the colorbar, everything work fine. However, if I do this two at the same time, the colorbar would be inverted while the extended arrow is not(figure one).</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# Generate X/Y point mesh grid x = np.linspace(-4.5, 1.5, 400) y = np.linspace(-8, -2, 400) X, Y = np.meshgrid(x, y) potential, rate_determining_step = calculate_limiting_potential_from_linear_relations(X, Y, free_energy_dict)[0], calculate_limiting_potential_from_linear_relations(X, Y, free_energy_dict)[1] # calculate limiting potential for each point on the mesh grid # Create backup ground volcano plot fig = plt.figure(figsize=[8, 6]) background = fig.add_subplot(111) # add sub plot # Add contour plot contour = background.contourf(X, Y, potential, levels=512, cmap=&quot;rainbow&quot;) # create filled contour (reverse rainbow) # Create colorbar cbar = fig.colorbar(contour, shrink=0.95, aspect=15, ticks=[1, 2, 3, 4]) # create colorbar (shrink/aspect for the size of the bar) cbar.set_label(&quot;Limiting Potential (eV)&quot;, fontsize=16) # add label to the colorbar cbar.ax.tick_params(labelsize=12) # set tick label size cbar.ax.invert_yaxis() # put the colorbar upside down"><pre class="notranslate"><span class="pl-c"># Generate X/Y point mesh grid</span> <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">-</span><span class="pl-c1">4.5</span>, <span class="pl-c1">1.5</span>, <span class="pl-c1">400</span>) <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">-</span><span class="pl-c1">8</span>, <span class="pl-c1">-</span><span class="pl-c1">2</span>, <span class="pl-c1">400</span>) <span class="pl-v">X</span>, <span class="pl-v">Y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">meshgrid</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>) <span class="pl-s1">potential</span>, <span class="pl-s1">rate_determining_step</span> <span class="pl-c1">=</span> <span class="pl-en">calculate_limiting_potential_from_linear_relations</span>(<span class="pl-v">X</span>, <span class="pl-v">Y</span>, <span class="pl-s1">free_energy_dict</span>)[<span class="pl-c1">0</span>], <span class="pl-en">calculate_limiting_potential_from_linear_relations</span>(<span class="pl-v">X</span>, <span class="pl-v">Y</span>, <span class="pl-s1">free_energy_dict</span>)[<span class="pl-c1">1</span>] <span class="pl-c"># calculate limiting potential for each point on the mesh grid</span> <span class="pl-c"># Create backup ground volcano plot</span> <span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>[<span class="pl-c1">8</span>, <span class="pl-c1">6</span>]) <span class="pl-s1">background</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">111</span>) <span class="pl-c"># add sub plot</span> <span class="pl-c"># Add contour plot</span> <span class="pl-s1">contour</span> <span class="pl-c1">=</span> <span class="pl-s1">background</span>.<span class="pl-en">contourf</span>(<span class="pl-v">X</span>, <span class="pl-v">Y</span>, <span class="pl-s1">potential</span>, <span class="pl-s1">levels</span><span class="pl-c1">=</span><span class="pl-c1">512</span>, <span class="pl-s1">cmap</span><span class="pl-c1">=</span><span class="pl-s">"rainbow"</span>) <span class="pl-c"># create filled contour (reverse rainbow)</span> <span class="pl-c"># Create colorbar</span> <span class="pl-s1">cbar</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">colorbar</span>(<span class="pl-s1">contour</span>, <span class="pl-s1">shrink</span><span class="pl-c1">=</span><span class="pl-c1">0.95</span>, <span class="pl-s1">aspect</span><span class="pl-c1">=</span><span class="pl-c1">15</span>, <span class="pl-s1">ticks</span><span class="pl-c1">=</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-c"># create colorbar (shrink/aspect for the size of the bar)</span> <span class="pl-s1">cbar</span>.<span class="pl-en">set_label</span>(<span class="pl-s">"Limiting Potential (eV)"</span>, <span class="pl-s1">fontsize</span><span class="pl-c1">=</span><span class="pl-c1">16</span>) <span class="pl-c"># add label to the colorbar</span> <span class="pl-s1">cbar</span>.<span class="pl-s1">ax</span>.<span class="pl-en">tick_params</span>(<span class="pl-s1">labelsize</span><span class="pl-c1">=</span><span class="pl-c1">12</span>) <span class="pl-c"># set tick label size</span> <span class="pl-s1">cbar</span>.<span class="pl-s1">ax</span>.<span class="pl-en">invert_yaxis</span>() <span class="pl-c"># put the colorbar upside down</span></pre></div> <h3 dir="auto">Actual outcome</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/80093591/157570730-408cf9a3-3be1-4596-8a99-68f314124ccd.png"><img src="https://user-images.githubusercontent.com/80093591/157570730-408cf9a3-3be1-4596-8a99-68f314124ccd.png" alt="figure3" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/80093591/157570816-8e9715c8-ac97-48d1-834f-8727d59a640f.png"><img src="https://user-images.githubusercontent.com/80093591/157570816-8e9715c8-ac97-48d1-834f-8727d59a640f.png" alt="figure1" style="max-width: 100%;"></a></p> <h3 dir="auto">Expected outcome</h3> <p dir="auto">The arrow should inverse with the colorbar itself.</p> <h3 dir="auto">Additional information</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating system</h3> <p dir="auto">Windows11</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">Matplotlib 3.5.1</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Python version</h3> <p dir="auto">Python 3.10</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">pip</p>
<h3 dir="auto">Bug summary</h3> <p dir="auto">The "over value" and the "under value" of colormap are not correctly shown when using ax.invert_yaxis (invert_xaxis if the colorbar is horizontal) function.</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import matplotlib.pyplot as plt im=plt.imshow(np.arange(10000).reshape(100,100),vmax=9000,vmin=1000) cb=plt.colorbar(im,extend='both') cb.ax.invert_yaxis()"><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">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">im</span><span class="pl-c1">=</span><span class="pl-s1">plt</span>.<span class="pl-en">imshow</span>(<span class="pl-s1">np</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10000</span>).<span class="pl-en">reshape</span>(<span class="pl-c1">100</span>,<span class="pl-c1">100</span>),<span class="pl-s1">vmax</span><span class="pl-c1">=</span><span class="pl-c1">9000</span>,<span class="pl-s1">vmin</span><span class="pl-c1">=</span><span class="pl-c1">1000</span>) <span class="pl-s1">cb</span><span class="pl-c1">=</span><span class="pl-s1">plt</span>.<span class="pl-en">colorbar</span>(<span class="pl-s1">im</span>,<span class="pl-s1">extend</span><span class="pl-c1">=</span><span class="pl-s">'both'</span>) <span class="pl-s1">cb</span>.<span class="pl-s1">ax</span>.<span class="pl-en">invert_yaxis</span>()</pre></div> <h3 dir="auto">Actual outcome</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/31818986/147364868-31b36095-c446-401f-99fe-28b344e20c06.png"><img src="https://user-images.githubusercontent.com/31818986/147364868-31b36095-c446-401f-99fe-28b344e20c06.png" alt="image" style="max-width: 100%;"></a></p> <h3 dir="auto">Expected outcome</h3> <p dir="auto">The "over value" and the "under value" could be shown in the right location by the way. The "under value" is expected to be at the top, if the y axis is reverted.</p> <p dir="auto">If this is not a bug, would it be a feature?</p> <h3 dir="auto">Additional information</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating system</h3> <p dir="auto">CentOs</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.5.0</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Python version</h3> <p dir="auto">3.9.7</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto"><em>No response</em></p>
1
<p dir="auto">This code snippet causes a link failure. I am guessing it is because the return type of foo is not publicly exported from the crate it is causing a link failure in the test.</p> <p dir="auto">I tried this (reduced) code:</p> <p dir="auto">lib.rs</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="mod helper { pub struct Foo; impl Foo { pub fn baz(&amp;self) { } } pub fn foo() -&gt; Foo { return Foo; } } pub use helper::foo;"><pre class="notranslate"><span class="pl-k">mod</span> helper <span class="pl-kos">{</span> <span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Foo</span><span class="pl-kos">;</span> <span class="pl-k">impl</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">baz</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</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">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-v">Foo</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">pub</span> <span class="pl-k">use</span> helper<span class="pl-kos">::</span>foo<span class="pl-kos">;</span></pre></div> <p dir="auto">test.rs</p> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="extern crate lib; #[test] fn test() { lib::foo().baz(); }"><pre class="notranslate"><span class="pl-k">extern</span> <span class="pl-k">crate</span> lib<span class="pl-kos">;</span> <span class="pl-c1">#<span class="pl-kos">[</span>test<span class="pl-kos">]</span></span> <span class="pl-k">fn</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> lib<span class="pl-kos">::</span><span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">baz</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span></pre></div> <p dir="auto">I expected to see this happen: Definitely a clear error as opposed to a link failure. Probably an error stating that the return type of <code class="notranslate">foo()</code> is not visible outside the crate.</p> <p dir="auto">Instead, this happened: Linker error:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="── env RUST_BACKTRACE=1 cargo test Compiling lib v0.1.0 (file:///Users/nwr/tmp/cargo-test/lib) error: linking with `cc` failed: exit code: 1 note: &quot;cc&quot; &quot;-m64&quot; &quot;-L&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib&quot; &quot;/Users/nwr/tmp/cargo-test/lib/target/debug/foo-5f1f39478ede92a5.0.o&quot; &quot;-o&quot; &quot;/Users/nwr/tmp/cargo-test/lib/target/debug/foo-5f1f39478ede92a5&quot; &quot;-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a&quot; &quot;-Wl,-dead_strip&quot; &quot;-nodefaultlibs&quot; &quot;/Users/nwr/tmp/cargo-test/lib/target/debug/liblib.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libtest-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libserialize-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libterm-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblog-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc_unicode-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblibc-74fa456f.rlib&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcore-74fa456f.rlib&quot; &quot;-L&quot; &quot;/Users/nwr/tmp/cargo-test/lib/target/debug&quot; &quot;-L&quot; &quot;/Users/nwr/tmp/cargo-test/lib/target/debug/deps&quot; &quot;-L&quot; &quot;/usr/local/lib/rustlib/x86_64-apple-darwin/lib&quot; &quot;-L&quot; &quot;/Users/nwr/tmp/cargo-test/lib/.rust/lib/x86_64-apple-darwin&quot; &quot;-L&quot; &quot;/Users/nwr/tmp/cargo-test/lib/lib/x86_64-apple-darwin&quot; &quot;-l&quot; &quot;System&quot; &quot;-l&quot; &quot;pthread&quot; &quot;-l&quot; &quot;c&quot; &quot;-l&quot; &quot;m&quot; &quot;-l&quot; &quot;compiler-rt&quot; note: ld: warning: directory not found for option '-L/Users/nwr/tmp/cargo-test/lib/.rust/lib/x86_64-apple-darwin' ld: warning: directory not found for option '-L/Users/nwr/tmp/cargo-test/lib/lib/x86_64-apple-darwin' Undefined symbols for architecture x86_64: &quot;helper::Foo::baz::heb3ebf21697cffffkaa&quot;, referenced from: test::h63ea6d9d3e0d725cfaa in foo-5f1f39478ede92a5.0.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error Could not compile `lib`. To learn more, run the command again with --verbose."><pre class="notranslate"><code class="notranslate">── env RUST_BACKTRACE=1 cargo test Compiling lib v0.1.0 (file:///Users/nwr/tmp/cargo-test/lib) error: linking with `cc` failed: exit code: 1 note: "cc" "-m64" "-L" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "/Users/nwr/tmp/cargo-test/lib/target/debug/foo-5f1f39478ede92a5.0.o" "-o" "/Users/nwr/tmp/cargo-test/lib/target/debug/foo-5f1f39478ede92a5" "-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a" "-Wl,-dead_strip" "-nodefaultlibs" "/Users/nwr/tmp/cargo-test/lib/target/debug/liblib.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libtest-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libserialize-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libterm-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblog-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libstd-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcollections-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc_unicode-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/librand-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liballoc-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/liblibc-74fa456f.rlib" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libcore-74fa456f.rlib" "-L" "/Users/nwr/tmp/cargo-test/lib/target/debug" "-L" "/Users/nwr/tmp/cargo-test/lib/target/debug/deps" "-L" "/usr/local/lib/rustlib/x86_64-apple-darwin/lib" "-L" "/Users/nwr/tmp/cargo-test/lib/.rust/lib/x86_64-apple-darwin" "-L" "/Users/nwr/tmp/cargo-test/lib/lib/x86_64-apple-darwin" "-l" "System" "-l" "pthread" "-l" "c" "-l" "m" "-l" "compiler-rt" note: ld: warning: directory not found for option '-L/Users/nwr/tmp/cargo-test/lib/.rust/lib/x86_64-apple-darwin' ld: warning: directory not found for option '-L/Users/nwr/tmp/cargo-test/lib/lib/x86_64-apple-darwin' Undefined symbols for architecture x86_64: "helper::Foo::baz::heb3ebf21697cffffkaa", referenced from: test::h63ea6d9d3e0d725cfaa in foo-5f1f39478ede92a5.0.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error Could not compile `lib`. To learn more, run the command again with --verbose. </code></pre></div> <h2 dir="auto">Meta</h2> <p dir="auto"><code class="notranslate">rustc --version --verbose</code> (repos on 1.1.0 stable as well):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="rustc 1.3.0-nightly (8ce69e856 2015-07-31) binary: rustc commit-hash: 8ce69e856a4def6ef39581823520c68944bd1c8e commit-date: 2015-07-31 host: x86_64-apple-darwin release: 1.3.0-nightly"><pre class="notranslate"><code class="notranslate">rustc 1.3.0-nightly (8ce69e856 2015-07-31) binary: rustc commit-hash: 8ce69e856a4def6ef39581823520c68944bd1c8e commit-date: 2015-07-31 host: x86_64-apple-darwin release: 1.3.0-nightly </code></pre></div> <p dir="auto">Backtrace: None</p>
<div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// foo.rs pub use foo::Bar; pub fn test() -&gt; Bar&lt;i32&gt; { loop {} } mod foo { pub type Bar&lt;T&gt; = Result&lt;T, Baz&gt;; pub struct Baz; impl Baz { pub fn foo(&amp;self) {} } }"><pre class="notranslate"><span class="pl-c">// foo.rs</span> <span class="pl-k">pub</span> <span class="pl-k">use</span> foo<span class="pl-kos">::</span><span class="pl-v">Bar</span><span class="pl-kos">;</span> <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-kos">)</span> -&gt; <span class="pl-smi">Bar</span><span class="pl-kos">&lt;</span><span class="pl-smi">i32</span><span class="pl-kos">&gt;</span> <span class="pl-kos">{</span> <span class="pl-k">loop</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-k">mod</span> foo <span class="pl-kos">{</span> <span class="pl-k">pub</span> <span class="pl-k">type</span> <span class="pl-smi">Bar</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">&gt;</span> = <span class="pl-smi">Result</span><span class="pl-kos">&lt;</span><span class="pl-smi">T</span><span class="pl-kos">,</span> <span class="pl-smi">Baz</span><span class="pl-kos">&gt;</span><span class="pl-kos">;</span> <span class="pl-k">pub</span> <span class="pl-k">struct</span> <span class="pl-smi">Baz</span><span class="pl-kos">;</span> <span class="pl-k">impl</span> <span class="pl-smi">Baz</span> <span class="pl-kos">{</span> <span class="pl-k">pub</span> <span class="pl-k">fn</span> <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-c1">&amp;</span><span class="pl-smi">self</span><span class="pl-kos">)</span> <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <div class="highlight highlight-source-rust notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// bar.rs extern crate foo; fn main() { match foo::test() { Ok(..) =&gt; {} Err(e) =&gt; e.foo() } }"><pre class="notranslate"><span class="pl-c">// bar.rs</span> <span class="pl-k">extern</span> <span class="pl-k">crate</span> foo<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">match</span> foo<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> <span class="pl-v">Ok</span><span class="pl-kos">(</span>..<span class="pl-kos">)</span> =&gt; <span class="pl-kos">{</span><span class="pl-kos">}</span> <span class="pl-v">Err</span><span class="pl-kos">(</span>e<span class="pl-kos">)</span> =&gt; e<span class="pl-kos">.</span><span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ rustc --crate-type lib foo.rs foo.rs:13:9: 13:29 warning: code is never used: `foo`, #[warn(dead_code)] on by default foo.rs:13 pub fn foo(&amp;self) {} ^~~~~~~~~~~~~~~~~~~~ $ rustc bar.rs -L. error: linking with `cc` failed: exit code: 1 note: cc '-m64' '-L' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-o' 'bar' 'bar.o' '-Wl,--whole-archive' '-lmorestack' '-Wl,--no-whole-archive' '-nodefaultlibs' '-Wl,--gc-sections' '-pie' '-Wl,--as-needed' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libnative-4e7c5e5c.rlib' '/home/alex/libfoo.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libsync-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustrt-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunicode-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-4e7c5e5c.rlib' '-L' '.' '-L' '/home/alex/.rust' '-L' '/home/alex' '-Wl,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-ldl' '-lpthread' '-lgcc_s' '-lpthread' '-lc' '-lm' '-lcompiler-rt' note: bar.o: In function `main::hbeb79415393a4115faa': bar.rs:(.text._ZN4main20hbeb79415393a4115faaE+0x45): undefined reference to `foo::Baz::foo::h3d69757c908833a5Yaa' collect2: error: ld returned 1 exit status error: aborting due to previous error "><pre class="notranslate"><code class="notranslate">$ rustc --crate-type lib foo.rs foo.rs:13:9: 13:29 warning: code is never used: `foo`, #[warn(dead_code)] on by default foo.rs:13 pub fn foo(&amp;self) {} ^~~~~~~~~~~~~~~~~~~~ $ rustc bar.rs -L. error: linking with `cc` failed: exit code: 1 note: cc '-m64' '-L' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-o' 'bar' 'bar.o' '-Wl,--whole-archive' '-lmorestack' '-Wl,--no-whole-archive' '-nodefaultlibs' '-Wl,--gc-sections' '-pie' '-Wl,--as-needed' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libnative-4e7c5e5c.rlib' '/home/alex/libfoo.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libsync-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustrt-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunicode-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-4e7c5e5c.rlib' '/home/alex/code/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-4e7c5e5c.rlib' '-L' '.' '-L' '/home/alex/.rust' '-L' '/home/alex' '-Wl,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-ldl' '-lpthread' '-lgcc_s' '-lpthread' '-lc' '-lm' '-lcompiler-rt' note: bar.o: In function `main::hbeb79415393a4115faa': bar.rs:(.text._ZN4main20hbeb79415393a4115faaE+0x45): undefined reference to `foo::Baz::foo::h3d69757c908833a5Yaa' collect2: error: ld returned 1 exit status error: aborting due to previous error </code></pre></div> <p dir="auto">There are a number of problems with this, and they may likely all be inter-related.</p> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> linker error</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> dead code which is not actually dead code</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> it should be an error that <code class="notranslate">Baz</code> is a publicly visible private type.</li> </ul> <p dir="auto">Nominating due to the publicly visible private type not generating an error.</p>
1
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">I would like to be able to bind PowerToys Run to windows key + f.</p> <h1 dir="auto">Description of the new feature/enhancement</h1> <p dir="auto">I would like this because ctrl F is most other ' normal' searches. The windows system wide equivalent should be able to be bound to windows key + f in my opinion.</p> <h1 dir="auto">What should be changed</h1> <p dir="auto">Allow the windows key to be mapped as a PowerToys Run command starting button e.g. windows key + f, to mimmic ctrl + f.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">When editing a FanzyZones layout, it would be handy to also see the pixel dimensions of each zone (perhaps just below the zone number).</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1>
0
<p dir="auto"><a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/crutkas/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/crutkas">@crutkas</a> (PS I miss you) :-)</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.19588.1000 PowerToys version: 0.14.1.0 PowerToy module for which you are reporting the bug (if applicable): FancyZones"><pre class="notranslate"><code class="notranslate">Windows build number: 10.0.19588.1000 PowerToys version: 0.14.1.0 PowerToy module for which you are reporting the bug (if applicable): FancyZones </code></pre></div> <h1 dir="auto">Steps to reproduce</h1> <ol dir="auto"> <li>Under FancyZones settings, make sure "Override Winows Snap Hotkeys is NOT enabled</li> <li>Hold Win key + Left Arrow to snap window to the left</li> </ol> <p dir="auto">Result = Window Snaps to the left</p> <ol start="3" dir="auto"> <li>Go back under FancyZones settings and enable "Override Windows Snap Hotkeys"</li> <li>Hold Win key + Left Arrow to snap window to the left</li> </ol> <p dir="auto">Results = Windows Snaps to the right</p> <h1 dir="auto">Expected behavior</h1> <p dir="auto">I expect the window to snap to the direction pressed</p> <h1 dir="auto">Actual behavior</h1> <p dir="auto">The window snaps the opposite direction</p> <h1 dir="auto">Screenshots</h1>
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide a description of the new feature</h2> <p dir="auto"><em>What is the expected behavior of the proposed feature? What is the scenario this would be used?</em></p> <hr> <p dir="auto">If you'd like to see this feature implemented, add a 👍 reaction to this post.</p>
0
<h3 dir="auto">Current Behavior:</h3> <p dir="auto">When a dependency is specified as dev dependency and as optional peer dependency, it is not installed.</p> <h3 dir="auto">Expected Behavior:</h3> <p dir="auto">I expect all dev dependencies to be installed.</p> <h3 dir="auto">Steps To Reproduce:</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="luigi@ubuntu:~/ws$ node -v v15.0.1 luigi@ubuntu:~/ws$ npm -v 7.0.3 luigi@ubuntu:~$ git clone https://github.com/websockets/ws.git Cloning into 'ws'... remote: Enumerating objects: 14410, done. remote: Total 14410 (delta 0), reused 0 (delta 0), pack-reused 14410 Receiving objects: 100% (14410/14410), 10.68 MiB | 969.00 KiB/s, done. Resolving deltas: 100% (11804/11804), done. luigi@ubuntu:~$ cd ws luigi@ubuntu:~/ws$ npm i npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 added 352 packages, and audited 352 packages in 25s 33 packages are looking for funding run `npm fund` for details found 0 vulnerabilities luigi@ubuntu:~/ws$ npm ls utf-8-validate [email protected] /home/luigi/ws └── (empty)"><pre class="notranslate"><code class="notranslate">luigi@ubuntu:~/ws$ node -v v15.0.1 luigi@ubuntu:~/ws$ npm -v 7.0.3 luigi@ubuntu:~$ git clone https://github.com/websockets/ws.git Cloning into 'ws'... remote: Enumerating objects: 14410, done. remote: Total 14410 (delta 0), reused 0 (delta 0), pack-reused 14410 Receiving objects: 100% (14410/14410), 10.68 MiB | 969.00 KiB/s, done. Resolving deltas: 100% (11804/11804), done. luigi@ubuntu:~$ cd ws luigi@ubuntu:~/ws$ npm i npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 added 352 packages, and audited 352 packages in 25s 33 packages are looking for funding run `npm fund` for details found 0 vulnerabilities luigi@ubuntu:~/ws$ npm ls utf-8-validate [email protected] /home/luigi/ws └── (empty) </code></pre></div> <h3 dir="auto">Environment:</h3> <ul dir="auto"> <li>OS: Ubuntu 20.04</li> <li>Node: 15.0.1</li> <li>npm: 7.0.3</li> </ul>
<h3 dir="auto">Current Behavior:</h3> <p dir="auto">When a dependency is specified as a <code class="notranslate">devDependency</code> <strong>and</strong> as a <code class="notranslate">peerDependency</code>, it is not installed. I tested it with [email protected], everything worked well with npm &lt; 7.</p> <h3 dir="auto">Expected Behavior:</h3> <p dir="auto">I expect that all dev dependencies should be installed.</p> <h3 dir="auto">Steps To Reproduce:</h3> <p dir="auto">I created a very small repository to reproduce the issue, so you can just checkout it and install dependencies:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="git clone [email protected]:mjeanroy/npm-7-bug-peer-dev.git cd npm-7-bug-peer-dev npm install"><pre class="notranslate"><code class="notranslate">git clone [email protected]:mjeanroy/npm-7-bug-peer-dev.git cd npm-7-bug-peer-dev npm install </code></pre></div> <h3 dir="auto">Environment:</h3> <ul dir="auto"> <li>OS: MacOS 10.15.7</li> <li>Node: 15.0.0</li> <li>npm: 7.0.2</li> </ul>
1
<p dir="auto">Shouldn't there be a white-space between inline DOM elements separated by a line break [1]?</p> <p dir="auto">I think this example describes the situation pretty well: <a href="http://jsfiddle.net/bstst/kb3gN/2847/" rel="nofollow">http://jsfiddle.net/bstst/kb3gN/2847/</a></p> <p dir="auto">Right now the workarounds are pretty ugly -- either CSS (don't get me started!) or manual white-space inside the inline elements (as in <code class="notranslate">&lt;span&gt;foobar &lt;/span&gt;</code>), both of which are quite non-semantic.</p> <p dir="auto">Hope it's not a duplicate of an earlier issue -- I did my research!<br> Cheers!<br> M.</p> <p dir="auto">[1] <a href="http://www.w3.org/TR/html401/appendix/notes.html#notes-line-breaks" rel="nofollow">http://www.w3.org/TR/html401/appendix/notes.html#notes-line-breaks</a></p>
<h3 dir="auto">Website or app</h3> <p dir="auto">google.com</p> <h3 dir="auto">Repro steps</h3> <p dir="auto">This started after last update 4.20.0<br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11052469/137713404-e6702959-7870-46a6-8566-4cfe61d25309.png"><img src="https://user-images.githubusercontent.com/11052469/137713404-e6702959-7870-46a6-8566-4cfe61d25309.png" alt="image" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11052469/137713464-c5e478d2-4e9e-4ee4-abdf-83d23c04704b.png"><img src="https://user-images.githubusercontent.com/11052469/137713464-c5e478d2-4e9e-4ee4-abdf-83d23c04704b.png" alt="image" style="max-width: 100%;"></a></p> <h3 dir="auto">How often does this bug happen?</h3> <p dir="auto">Every time</p> <h3 dir="auto">DevTools package (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">DevTools version (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Error message (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Error call stack (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Error component stack (automated)</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">GitHub query string (automated)</h3> <p dir="auto"><em>No response</em></p>
0
<h3 dir="auto">First Check</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I added a very descriptive title to this issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already read and followed all the tutorial in the docs and didn't find an answer.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li> </ul> <h3 dir="auto">Commit to Help</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I commit to help with one of those options <g-emoji class="g-emoji" alias="point_up_2" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f446.png">👆</g-emoji></li> </ul> <h3 dir="auto">Example Code</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from fastapi import FastAPI from fastapi.responses import RedirectResponse from starlette.middleware.sessions import SessionMiddleware from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware app = FastAPI() app.add_middleware(SessionMiddleware, secret_key=&quot;test secret key&quot;, https_only=False) app.add_middleware(HTTPSRedirectMiddleware) @app.get(&quot;/&quot;) def read_root(): return RedirectResponse(&quot;/home&quot;)"><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">FastAPI</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span>.<span class="pl-s1">responses</span> <span class="pl-k">import</span> <span class="pl-v">RedirectResponse</span> <span class="pl-k">from</span> <span class="pl-s1">starlette</span>.<span class="pl-s1">middleware</span>.<span class="pl-s1">sessions</span> <span class="pl-k">import</span> <span class="pl-v">SessionMiddleware</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span>.<span class="pl-s1">middleware</span>.<span class="pl-s1">httpsredirect</span> <span class="pl-k">import</span> <span class="pl-v">HTTPSRedirectMiddleware</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>() <span class="pl-s1">app</span>.<span class="pl-en">add_middleware</span>(<span class="pl-v">SessionMiddleware</span>, <span class="pl-s1">secret_key</span><span class="pl-c1">=</span><span class="pl-s">"test secret key"</span>, <span class="pl-s1">https_only</span><span class="pl-c1">=</span><span class="pl-c1">False</span>) <span class="pl-s1">app</span>.<span class="pl-en">add_middleware</span>(<span class="pl-v">HTTPSRedirectMiddleware</span>) <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/"</span>)</span> <span class="pl-k">def</span> <span class="pl-en">read_root</span>(): <span class="pl-k">return</span> <span class="pl-v">RedirectResponse</span>(<span class="pl-s">"/home"</span>)</pre></div> <h3 dir="auto">Description</h3> <ul dir="auto"> <li>add breakpoints or print statements in <code class="notranslate">HTTPSRedirectMiddleware.__init__</code></li> <li>Run the app server. Your breakpoint will hit <code class="notranslate">HTTPSRedirectMiddleware.__init__</code> more than once!</li> </ul> <p dir="auto">I'm trying to understand why fastapi/starlette re-initializes middleware IFF the user wants to add more than one middleware, as per my example.</p> <p dir="auto">I worked on a couple of other ideas to work around this:</p> <ol dir="auto"> <li>I can see that instead of calling <code class="notranslate">app.add_middleware...</code> I could have also passed in a list of middlewares to the app, like so</li> </ol> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from fastapi import FastAPI from fastapi.middleware import Middleware from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware from starlette.middleware.sessions import SessionMiddleware user_middlewares = [] user_middlewares.append(Middleware(HTTPSRedirectMiddleware)) user_middlewares.append(Middleware(SessionMiddleware, secret_key=&quot;test secret key&quot;, https_only=False)) app = FastAPI(middleware=user_middlewares)"><pre class="notranslate"><code class="notranslate">from fastapi import FastAPI from fastapi.middleware import Middleware from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware from starlette.middleware.sessions import SessionMiddleware user_middlewares = [] user_middlewares.append(Middleware(HTTPSRedirectMiddleware)) user_middlewares.append(Middleware(SessionMiddleware, secret_key="test secret key", https_only=False)) app = FastAPI(middleware=user_middlewares) </code></pre></div> <p dir="auto">The problem with this approach is that my custom middleware (not shown here as I'm using public ones) needs to have an instance of the FastAPI app passed in. That doesn't work in this case. I make that work in my current implementation by doing it like this</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="app = FastAPI() app.add_middleware(MyCustomMiddleware, original_app=app)"><pre class="notranslate"><code class="notranslate">app = FastAPI() app.add_middleware(MyCustomMiddleware, original_app=app) </code></pre></div> <p dir="auto">which is my preferred option right now. But as mentioned above, since I'm adding multiple middleware by calling <code class="notranslate">add_middleware</code> twice, I don't want <code class="notranslate">MyCustomMiddleware</code> to be initialized twice!</p> <p dir="auto">My middleware is defined as follows (redacted for privacy):</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="from starlette.middleware.base import BaseHTTPMiddleware class MyCustomMiddleware(BaseHTTPMiddleware): def __init__(self, app: ASGIApp, original_app: FastAPI = None) -&gt; None: self.app = app self.original_app = original_app self.app_name = self.original_app.title self.dispatch_func = self.dispatch_func # other critical work that should only happen ONCE ever async def dispatch_func(self, request: Request, call_next): .... # work that relies on calling self.original_app.routes "><pre class="notranslate"><code class="notranslate">from starlette.middleware.base import BaseHTTPMiddleware class MyCustomMiddleware(BaseHTTPMiddleware): def __init__(self, app: ASGIApp, original_app: FastAPI = None) -&gt; None: self.app = app self.original_app = original_app self.app_name = self.original_app.title self.dispatch_func = self.dispatch_func # other critical work that should only happen ONCE ever async def dispatch_func(self, request: Request, call_next): .... # work that relies on calling self.original_app.routes </code></pre></div> <ol start="2" dir="auto"> <li>I'm also aware that the fastapi way of adding middleware is with the <code class="notranslate">@app.middleware("http")</code> decorator described in the docs <a href="https://fastapi.tiangolo.com/tutorial/middleware/" rel="nofollow">https://fastapi.tiangolo.com/tutorial/middleware/</a>. However, As shown in <code class="notranslate">MyCustomMiddleware</code> implementation, I need it to be class-based for initialization and then for <code class="notranslate">call_next</code> later on</li> </ol> <p dir="auto">Is the multiple middleware initialization a design decision or an issue? Is there another way for me to design my CustomMiddleware, be able to add it and any other number of middleware to my app, but without having multiple initialization?</p> <h3 dir="auto">Operating System</h3> <p dir="auto">Linux, macOS</p> <h3 dir="auto">Operating System Details</h3> <p dir="auto">n/A</p> <h3 dir="auto">FastAPI Version</h3> <p dir="auto">0.68.0</p> <h3 dir="auto">Python Version</h3> <p dir="auto">3.9</p> <h3 dir="auto">Additional Context</h3> <p dir="auto"><em>No response</em></p>
<h3 dir="auto">First Check</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I added a very descriptive title to this issue.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I used the GitHub search to find a similar issue and didn't find it.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I searched the FastAPI documentation, with the integrated search.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already searched in Google "How to X in FastAPI" and didn't find any information.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already read and followed all the tutorial in the docs and didn't find an answer.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/samuelcolvin/pydantic">Pydantic</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/swagger-api/swagger-ui">Swagger UI</a>.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I already checked if it is not related to FastAPI but to <a href="https://github.com/Redocly/redoc">ReDoc</a>.</li> </ul> <h3 dir="auto">Commit to Help</h3> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I commit to help with one of those options <g-emoji class="g-emoji" alias="point_up_2" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f446.png">👆</g-emoji></li> </ul> <h3 dir="auto">Example Code</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="# TIP: This is full app. Run using `uvicorn main:app --port 5000 --reload` from datetime import datetime from typing import List from fastapi import FastAPI from pydantic import BaseModel # Fake Data (database) data = [ { &quot;id&quot;: 1, &quot;username&quot;: &quot;johndoe007&quot;, &quot;created_at&quot;: datetime.now(), &quot;updated_at&quot;: datetime.now(), } ] # Pydantic class DemoBase(BaseModel): username: str class DemoOut(DemoBase): id: int created_at: datetime updated_at: datetime # FastAPI app = FastAPI() @app.get(&quot;/&quot;, response_model=List[DemoOut]) def read_root(): return data"><pre class="notranslate"><span class="pl-c"># TIP: This is full app. Run using `uvicorn main:app --port 5000 --reload`</span> <span class="pl-k">from</span> <span class="pl-s1">datetime</span> <span class="pl-k">import</span> <span class="pl-s1">datetime</span> <span class="pl-k">from</span> <span class="pl-s1">typing</span> <span class="pl-k">import</span> <span class="pl-v">List</span> <span class="pl-k">from</span> <span class="pl-s1">fastapi</span> <span class="pl-k">import</span> <span class="pl-v">FastAPI</span> <span class="pl-k">from</span> <span class="pl-s1">pydantic</span> <span class="pl-k">import</span> <span class="pl-v">BaseModel</span> <span class="pl-c"># Fake Data (database)</span> <span class="pl-s1">data</span> <span class="pl-c1">=</span> [ { <span class="pl-s">"id"</span>: <span class="pl-c1">1</span>, <span class="pl-s">"username"</span>: <span class="pl-s">"johndoe007"</span>, <span class="pl-s">"created_at"</span>: <span class="pl-s1">datetime</span>.<span class="pl-en">now</span>(), <span class="pl-s">"updated_at"</span>: <span class="pl-s1">datetime</span>.<span class="pl-en">now</span>(), } ] <span class="pl-c"># Pydantic</span> <span class="pl-k">class</span> <span class="pl-v">DemoBase</span>(<span class="pl-v">BaseModel</span>): <span class="pl-s1">username</span>: <span class="pl-s1">str</span> <span class="pl-k">class</span> <span class="pl-v">DemoOut</span>(<span class="pl-v">DemoBase</span>): <span class="pl-s1">id</span>: <span class="pl-s1">int</span> <span class="pl-s1">created_at</span>: <span class="pl-s1">datetime</span> <span class="pl-s1">updated_at</span>: <span class="pl-s1">datetime</span> <span class="pl-c"># FastAPI</span> <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">FastAPI</span>() <span class="pl-en">@<span class="pl-s1">app</span>.<span class="pl-en">get</span>(<span class="pl-s">"/"</span>, <span class="pl-s1">response_model</span><span class="pl-c1">=</span><span class="pl-v">List</span>[<span class="pl-v">DemoOut</span>])</span> <span class="pl-k">def</span> <span class="pl-en">read_root</span>(): <span class="pl-k">return</span> <span class="pl-s1">data</span></pre></div> <h3 dir="auto">Description</h3> <p dir="auto">If you visit the app you will get below response:</p> <div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="[ { &quot;username&quot;: &quot;johndoe007&quot;, &quot;id&quot;: 1, &quot;created_at&quot;: &quot;2021-09-13T12:57:55.200998&quot;, &quot;updated_at&quot;: &quot;2021-09-13T12:57:55.201006&quot; } ]"><pre class="notranslate">[ { <span class="pl-ent">"username"</span>: <span class="pl-s"><span class="pl-pds">"</span>johndoe007<span class="pl-pds">"</span></span>, <span class="pl-ent">"id"</span>: <span class="pl-c1">1</span>, <span class="pl-ent">"created_at"</span>: <span class="pl-s"><span class="pl-pds">"</span>2021-09-13T12:57:55.200998<span class="pl-pds">"</span></span>, <span class="pl-ent">"updated_at"</span>: <span class="pl-s"><span class="pl-pds">"</span>2021-09-13T12:57:55.201006<span class="pl-pds">"</span></span> } ]</pre></div> <p dir="auto">It is working fine but the problem is when we want below:</p> <p dir="auto"><strong>1. order the data sent by <code class="notranslate">response_model</code></strong></p> <p dir="auto">In the above response, <code class="notranslate">id</code> is returned at 2nd position but I want to return at the 1st position. Requirement for this can be:</p> <ul dir="auto"> <li>This is how I want my API to respond</li> <li>As a full stack developer I directly render the response in the table and my <code class="notranslate">id</code> column is placed in 2nd column which should be in 1st row.</li> </ul> <p dir="auto"><strong>2. Update the data representation</strong></p> <p dir="auto">In the above response, we get the date as <code class="notranslate">2021-09-13T12:57:55.200998</code> but I want to return the formatted date which should be human-readable. This is just a single example but there can be others as explained in this <a href="https://github.com/samuelcolvin/pydantic/discussions/3144" data-hovercard-type="discussion" data-hovercard-url="/pydantic/pydantic/discussions/3144/hovercard">discussion</a>.</p> <h3 dir="auto">Wanted Solution</h3> <p dir="auto">I guess we can create another magic class that lets us define the field order and value representation but that might introduce code duplication. Sorry but I don't have any perfect solution.</p> <h3 dir="auto">Wanted Code</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="No idea"><pre class="notranslate"><span class="pl-v">No</span> <span class="pl-s1">idea</span></pre></div> <h3 dir="auto">Alternatives</h3> <p dir="auto">None. I might have to raise the same issue to pydantic.</p> <h3 dir="auto">Operating System</h3> <p dir="auto">Linux</p> <h3 dir="auto">Operating System Details</h3> <p dir="auto">Linux Mint 20.2 Cinnamon</p> <h3 dir="auto">FastAPI Version</h3> <p dir="auto">0.68.0</p> <h3 dir="auto">Python Version</h3> <p dir="auto">3.9.x</p> <h3 dir="auto">Additional Context</h3> <p dir="auto">None</p>
0
<h2 dir="auto"><g-emoji class="g-emoji" alias="memo" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png">📝</g-emoji> Provide a description of the new feature</h2> <p dir="auto">I want a feature that helps me to resize my window to specific size given by user input ( 1024x724 or 1280x720).</p> <p dir="auto"><em>What is the expected behavior of the proposed feature? What is the scenario this would be used?</em></p> <p dir="auto">This feature will help me to resize my window to whatever size I want so that I can keep my window to my video resolution.<br> For example, some times I use a 3440x1440 monitor. when I screen record I want to record the video in 1280x720 resolution. So I wan to resize my application window to exactly 1280x720 so that it fits perfectly in my video. currently I'm resizing my window manually by just adjusting it and it's taking very long time. If you can give me this feature then I can just drag and drop my window in that tile and it will automatically get resized to the given size.</p> <hr> <p dir="auto">If you'd like to see this feature implemented, add a 👍 reaction to this post.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1> <p dir="auto">Sizing of custom zones in editor by dragging mouse is a little bit coarse (hit and miss) in terms of getting close to edges of screen symmetrically and allowing window edges of multiple zones to line up neatly. Some possible solutions are suggested for consideration.</p> <h1 dir="auto">Proposed technical implementation details (optional)</h1> <ol dir="auto"> <li> <p dir="auto">Perhaps have an option for the editor to snap to a grid of user specified n pixels.</p> </li> <li> <p dir="auto">Perhaps have optional ability to input window dimension and position directly in both absolute terms (n x n pixels) and in terms of percentage of screen width and height.</p> </li> </ol>
1
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">This was working until recently. Started failing all of the sudden after a Windows 10 update.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt plt.ion() fig = plt.figure('test')"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-s1">plt</span>.<span class="pl-en">ion</span>() <span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>(<span class="pl-s">'test'</span>)</pre></div> <p dir="auto"><strong>Actual outcome</strong></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;C:/###/Code/####/_test_matplitlib_bug.py&quot;, line 4, in &lt;module&gt; fig = plt.figure('test') File &quot;C:\Anaconda3\envs\py27_sp\lib\site-packages\matplotlib\pyplot.py&quot;, line 557, in figure draw_if_interactive() File &quot;C:\Users\#####\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\1##\helpers\pycharm_matplotlib_backend\backend_interagg.py&quot;, line 39, in draw_if_interactive figManager.canvas.show() File &quot;C:\Users\#####\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\1##\helpers\pycharm_matplotlib_backend\backend_interagg.py&quot;, line 62, in show self.figure.tight_layout() File &quot;C:\Anaconda3\envs\py27_sp\lib\site-packages\matplotlib\figure.py&quot;, line 1753, in tight_layout rect=rect) File &quot;C:\Anaconda3\envs\py27_sp\lib\site-packages\matplotlib\tight_layout.py&quot;, line 326, in get_tight_layout_figure max_nrows = max(nrows_list) ValueError: max() arg is an empty sequence"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "C:/###/Code/####/_test_matplitlib_bug.py", line 4, in &lt;module&gt; fig = plt.figure('test') File "C:\Anaconda3\envs\py27_sp\lib\site-packages\matplotlib\pyplot.py", line 557, in figure draw_if_interactive() File "C:\Users\#####\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\1##\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 39, in draw_if_interactive figManager.canvas.show() File "C:\Users\#####\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\1##\helpers\pycharm_matplotlib_backend\backend_interagg.py", line 62, in show self.figure.tight_layout() File "C:\Anaconda3\envs\py27_sp\lib\site-packages\matplotlib\figure.py", line 1753, in tight_layout rect=rect) File "C:\Anaconda3\envs\py27_sp\lib\site-packages\matplotlib\tight_layout.py", line 326, in get_tight_layout_figure max_nrows = max(nrows_list) ValueError: max() arg is an empty sequence </code></pre></div> <p dir="auto"><strong>Expected outcome</strong></p> <p dir="auto">It was working before a Windows 10 update.</p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Operating system: Windows 10 Home (10.0.17134) Build 171 34</li> <li>Matplotlib version: 2.0.2</li> <li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): module://backend_interagg</li> <li>Python version: Python 2.7.13 :: Continuum Analytics, Inc.</li> <li>Jupyter version (if applicable):</li> <li>Other libraries:</li> </ul> <p dir="auto">Installed with conda. Default channels.</p>
<p dir="auto">I have an animated graph using <code class="notranslate">FuncAnimation</code>. I call tight_layout() on resize to fix the layout:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="fig.canvas.mpl_connect('resize_event', lambda *x: plt.tight_layout())"><pre class="notranslate"><code class="notranslate">fig.canvas.mpl_connect('resize_event', lambda *x: plt.tight_layout()) </code></pre></div> <p dir="auto">Mostly resizing the window works fine. Sometimes this leads to an exception:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/usr/lib/python3.5/tkinter/__init__.py&quot;, line 1553, in __call__ return self.func(*args) File &quot;/home/user/project/env/lib/python3.5/site-packages/matplotlib/backends/backend_tkagg.py&quot;, line 279, in resize self.resize_event() File &quot;/home/user/project/env/lib/python3.5/site-packages/matplotlib/backend_bases.py&quot;, line 1833, in resize_event self.callbacks.process(s, event) File &quot;/home/user/project/env/lib/python3.5/site-packages/matplotlib/cbook.py&quot;, line 554, in process proxy(*args, **kwargs) File &quot;/home/user/project/env/lib/python3.5/site-packages/matplotlib/cbook.py&quot;, line 416, in __call__ return mtd(*args, **kwargs) File &quot;./monitor.py&quot;, line 199, in &lt;lambda&gt; fig.canvas.mpl_connect('resize_event', lambda *x: plt.tight_layout()) File &quot;/home/user/project/env/lib/python3.5/site-packages/matplotlib/pyplot.py&quot;, line 1406, in tight_layout fig.tight_layout(pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect) File &quot;/home/user/project/env/lib/python3.5/site-packages/matplotlib/figure.py&quot;, line 1753, in tight_layout rect=rect) File &quot;/home/user/project/env/lib/python3.5/site-packages/matplotlib/tight_layout.py&quot;, line 326, in get_tight_layout_figure max_nrows = max(nrows_list) ValueError: max() arg is an empty sequence Exception in Tkinter callback"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/usr/lib/python3.5/tkinter/__init__.py", line 1553, in __call__ return self.func(*args) File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/backends/backend_tkagg.py", line 279, in resize self.resize_event() File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/backend_bases.py", line 1833, in resize_event self.callbacks.process(s, event) File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/cbook.py", line 554, in process proxy(*args, **kwargs) File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/cbook.py", line 416, in __call__ return mtd(*args, **kwargs) File "./monitor.py", line 199, in &lt;lambda&gt; fig.canvas.mpl_connect('resize_event', lambda *x: plt.tight_layout()) File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/pyplot.py", line 1406, in tight_layout fig.tight_layout(pad=pad, h_pad=h_pad, w_pad=w_pad, rect=rect) File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/figure.py", line 1753, in tight_layout rect=rect) File "/home/user/project/env/lib/python3.5/site-packages/matplotlib/tight_layout.py", line 326, in get_tight_layout_figure max_nrows = max(nrows_list) ValueError: max() arg is an empty sequence Exception in Tkinter callback </code></pre></div> <p dir="auto">I hope for someone this trace is useful. Unfortunately I can not provide a minimal example.</p> <p dir="auto">matplotlib==2.0.1</p>
1
<h3 dir="auto">Bug report</h3> <p dir="auto"><strong>Bug summary</strong></p> <p dir="auto">After setting scale to <code class="notranslate">'log'</code> the default limits can cut off datapoints depending on the order of plotting.</p> <p dir="auto">Note: calling <code class="notranslate">set_xscale</code>/<code class="notranslate">set_yscale</code> before calling <code class="notranslate">scatter</code> does not reproduce this bug.</p> <p dir="auto"><strong>Code for reproduction</strong></p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np import matplotlib.pyplot as plt # smallest span x1 = np.array([1, 10]) y1 = np.array([10, 1]) # largest span x2 = np.array([0.1, 100]) y2 = np.array([100, 0.1]) fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2,2, figsize=(8,8)) ax1.scatter(x1, y1) ax1.scatter(x2, y2) ax1.set_title('linear; smallest span first', color='g') ax2.scatter(x1, y1) ax2.scatter(x2, y2) ax2.set_xscale('log') ax2.set_yscale('log') ax2.set_title('log; smallest span first', color='r') ax3.scatter(x2, y2) ax3.scatter(x1, y1) ax3.set_title('linear; largest span first', color='g') ax4.scatter(x2, y2) ax4.scatter(x1, y1) ax4.set_xscale('log') ax4.set_yscale('log') ax4.set_title('log; largest span first', color='g')"><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">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span> <span class="pl-c"># smallest span</span> <span class="pl-s1">x1</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-c1">10</span>]) <span class="pl-s1">y1</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">10</span>, <span class="pl-c1">1</span>]) <span class="pl-c"># largest span</span> <span class="pl-s1">x2</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">0.1</span>, <span class="pl-c1">100</span>]) <span class="pl-s1">y2</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">array</span>([<span class="pl-c1">100</span>, <span class="pl-c1">0.1</span>]) <span class="pl-s1">fig</span>, ((<span class="pl-s1">ax1</span>, <span class="pl-s1">ax2</span>), (<span class="pl-s1">ax3</span>, <span class="pl-s1">ax4</span>)) <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">subplots</span>(<span class="pl-c1">2</span>,<span class="pl-c1">2</span>, <span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-c1">8</span>,<span class="pl-c1">8</span>)) <span class="pl-s1">ax1</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x1</span>, <span class="pl-s1">y1</span>) <span class="pl-s1">ax1</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x2</span>, <span class="pl-s1">y2</span>) <span class="pl-s1">ax1</span>.<span class="pl-en">set_title</span>(<span class="pl-s">'linear; smallest span first'</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'g'</span>) <span class="pl-s1">ax2</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x1</span>, <span class="pl-s1">y1</span>) <span class="pl-s1">ax2</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x2</span>, <span class="pl-s1">y2</span>) <span class="pl-s1">ax2</span>.<span class="pl-en">set_xscale</span>(<span class="pl-s">'log'</span>) <span class="pl-s1">ax2</span>.<span class="pl-en">set_yscale</span>(<span class="pl-s">'log'</span>) <span class="pl-s1">ax2</span>.<span class="pl-en">set_title</span>(<span class="pl-s">'log; smallest span first'</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'r'</span>) <span class="pl-s1">ax3</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x2</span>, <span class="pl-s1">y2</span>) <span class="pl-s1">ax3</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x1</span>, <span class="pl-s1">y1</span>) <span class="pl-s1">ax3</span>.<span class="pl-en">set_title</span>(<span class="pl-s">'linear; largest span first'</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'g'</span>) <span class="pl-s1">ax4</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x2</span>, <span class="pl-s1">y2</span>) <span class="pl-s1">ax4</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x1</span>, <span class="pl-s1">y1</span>) <span class="pl-s1">ax4</span>.<span class="pl-en">set_xscale</span>(<span class="pl-s">'log'</span>) <span class="pl-s1">ax4</span>.<span class="pl-en">set_yscale</span>(<span class="pl-s">'log'</span>) <span class="pl-s1">ax4</span>.<span class="pl-en">set_title</span>(<span class="pl-s">'log; largest span first'</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'g'</span>)</pre></div> <p dir="auto"><strong>Outcome</strong><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/16648303/39756261-2053c188-52c9-11e8-9853-ab51e7ee99f8.png"><img src="https://user-images.githubusercontent.com/16648303/39756261-2053c188-52c9-11e8-9853-ab51e7ee99f8.png" alt="log-order-bug" style="max-width: 100%;"></a></p> <p dir="auto"><strong>Matplotlib version</strong></p> <ul dir="auto"> <li>Matplotlib version: <code class="notranslate">2.2.2</code></li> <li>Matplotlib backend: <code class="notranslate">MacOSX</code></li> <li>Python version: <code class="notranslate">2.7.14</code> and <code class="notranslate">3.6.4</code></li> </ul>
<p dir="auto">As mentioned <a href="http://stackoverflow.com/q/38800189/3904031" rel="nofollow">in this SE question</a> a scatter plot is not autoscaling to include all of the data if <code class="notranslate">plt.yscale('log')</code> is used after <code class="notranslate">plt.scatter()</code>. This happens for the y-axis but not the x-axis in the example, and does not happen for <code class="notranslate">plt.plot()</code>.</p> <p dir="auto">In an <a href="http://stackoverflow.com/a/18774741/3904031" rel="nofollow">earlier answer</a> by a developer, <code class="notranslate">ax.set_yscale('log')</code> is shown following <code class="notranslate">ax.scatter()</code>, so I am wondering if this may be a bug.</p> <p dir="auto">Using matplotlib version 1.5.1 and python 2.7.11</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/17236804/17460373/045f64e4-5c96-11e6-8477-9702baec4939.png"><img src="https://cloud.githubusercontent.com/assets/17236804/17460373/045f64e4-5c96-11e6-8477-9702baec4939.png" alt="image" style="max-width: 100%;"></a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt X = [0.997, 2.643, 0.354, 0.075, 1.0, 0.03, 2.39, 0.364, 0.221, 0.437] Y = [15.487507, 2.320735, 0.085742, 0.303032, 1.0, 0.025435, 4.436435, 0.025435, 0.000503, 2.320735] plt.figure() plt.subplot(2,2,1) plt.scatter(X, Y) plt.xscale('log') plt.yscale('log') plt.title('scatter - scale last') plt.subplot(2,2,2) plt.plot(X, Y) plt.xscale('log') plt.yscale('log') plt.title('plot - scale last') plt.subplot(2,2,3) plt.xscale('log') plt.yscale('log') plt.scatter(X, Y) plt.title('scatter - scale first') plt.subplot(2,2,4) plt.xscale('log') plt.yscale('log') plt.plot(X, Y) plt.title('plot - scale first') plt.show()"><pre class="notranslate"><code class="notranslate">import matplotlib.pyplot as plt X = [0.997, 2.643, 0.354, 0.075, 1.0, 0.03, 2.39, 0.364, 0.221, 0.437] Y = [15.487507, 2.320735, 0.085742, 0.303032, 1.0, 0.025435, 4.436435, 0.025435, 0.000503, 2.320735] plt.figure() plt.subplot(2,2,1) plt.scatter(X, Y) plt.xscale('log') plt.yscale('log') plt.title('scatter - scale last') plt.subplot(2,2,2) plt.plot(X, Y) plt.xscale('log') plt.yscale('log') plt.title('plot - scale last') plt.subplot(2,2,3) plt.xscale('log') plt.yscale('log') plt.scatter(X, Y) plt.title('scatter - scale first') plt.subplot(2,2,4) plt.xscale('log') plt.yscale('log') plt.plot(X, Y) plt.title('plot - scale first') plt.show() </code></pre></div>
1
<ul class="contains-task-list"> <li>[X ] I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> This has already been asked to the <a href="https://groups.google.com/forum/#!forum/celery-users" rel="nofollow">discussion group</a> first.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have read the relevant section in the<br> <a href="http://docs.celeryproject.org/en/latest/contributing.html#other-bugs" rel="nofollow">contribution guide</a><br> on reporting bugs.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/issues?q=is%3Aissue+label%3A%22Issue+Type%3A+Bug+Report%22+-label%3A%22Category%3A+Documentation%22">issues list</a><br> for similar or identical bug reports.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/pulls?q=is%3Apr+label%3A%22PR+Type%3A+Bugfix%22+-label%3A%22Category%3A+Documentation%22">pull requests list</a><br> for existing proposed fixes.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/celery/celery/commits/master">commit log</a><br> to find out if the bug was already fixed in the master branch.</li> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included all related issues and possible duplicate issues<br> in this issue (If there are none, check this box anyway).</li> </ul> <h2 dir="auto">Mandatory Debugging Information</h2> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="celery==5.0.1 django-celery-beat==2.1.0 Django==3.1.2 kombu==5.0.2"><pre class="notranslate"><code class="notranslate">celery==5.0.1 django-celery-beat==2.1.0 Django==3.1.2 kombu==5.0.2 </code></pre></div> <p dir="auto">My Celery setup is managed by systemd using the examples as in <a href="https://github.com/celery/celery/blob/735f1679047a1358254252edc5cbf2624c86aadc/docs/userguide/daemonizing.rst#id94">https://github.com/celery/celery/blob/735f1679047a1358254252edc5cbf2624c86aadc/docs/userguide/daemonizing.rst#id94</a><br> for both celery and celerybeat (including <code class="notranslate">Restart=always</code>).</p> <p dir="auto">The daemon stops working after a couple of hours (no pattern visible yet). Without any python errors occurring or any messages about it in the log. In the systemd journal I just see:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- Subject: Unit succeeded -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- The unit celerybeat.service has successfully entered the 'dead' state. okt 24 01:50:27 nezzybuild systemd[1]: Stopped Celery Beat Service."><pre class="notranslate"><code class="notranslate">-- Subject: Unit succeeded -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- The unit celerybeat.service has successfully entered the 'dead' state. okt 24 01:50:27 nezzybuild systemd[1]: Stopped Celery Beat Service. </code></pre></div> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-- Subject: Unit succeeded -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- The unit celery.service has successfully entered the 'dead' state."><pre class="notranslate"><code class="notranslate">-- Subject: Unit succeeded -- Defined-By: systemd -- Support: http://www.ubuntu.com/support -- -- The unit celery.service has successfully entered the 'dead' state. </code></pre></div> <p dir="auto">What can I do to help further with debugging to find the cause of Celery crashing so suddenly into a dead state?</p>
<p dir="auto">Under high load we encountered duplicate job execution, as well as <code class="notranslate">WorkerLostError: Worker exited prematurely: exitcode 155</code> exceptions.</p> <p dir="auto">We use <code class="notranslate">--max-memory-per-child</code> which leads to workers recycling (exit code 155) between jobs, and sometime the last job seems to be re-executed, as if the MainProcess didn't get the job result from the WorkerProcess.</p> <h2 dir="auto">Checklist</h2> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have included the output of <code class="notranslate">celery -A proj report</code> in the issue.<br> (if you are not able to do this, then at least specify the Celery<br> version affected).</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@fe29479f29e2:/app# celery -A tasks report software -&gt; celery:4.2.0 (windowlicker) kombu:4.2.1 py:3.6.6 billiard:3.5.0.4 py-amqp:2.3.2 platform -&gt; system:Linux arch:64bit imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:amqp results:db+postgres://postgres:**@db:5432/postgres"><pre class="notranslate"><code class="notranslate">root@fe29479f29e2:/app# celery -A tasks report software -&gt; celery:4.2.0 (windowlicker) kombu:4.2.1 py:3.6.6 billiard:3.5.0.4 py-amqp:2.3.2 platform -&gt; system:Linux arch:64bit imp:CPython loader -&gt; celery.loaders.app.AppLoader settings -&gt; transport:amqp results:db+postgres://postgres:**@db:5432/postgres </code></pre></div> <ul class="contains-task-list"> <li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have verified that the issue exists against the <code class="notranslate">master</code> branch of Celery.<br> Using current master HEAD <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/21baef53c39bc1909fd6eee9a2a20e6ce851e88c/hovercard" href="https://github.com/celery/celery/commit/21baef53c39bc1909fd6eee9a2a20e6ce851e88c"><tt>21baef5</tt></a>:</li> </ul> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="pip install 'git+https://github.com/celery/celery.git@21baef5#egg=celery [sqlalchemy]'"><pre class="notranslate"><code class="notranslate">pip install 'git+https://github.com/celery/celery.git@21baef5#egg=celery [sqlalchemy]' </code></pre></div> <h2 dir="auto">Steps to reproduce</h2> <h3 dir="auto">Global scenario</h3> <ul dir="auto"> <li>with <code class="notranslate">rabbitmq</code> as broker, <code class="notranslate">postgresql</code> as backend using <code class="notranslate">sqlalchemy</code></li> <li>start <code class="notranslate">celery</code> with: <ul dir="auto"> <li>lot's of children worker processes to simulate high load: e.g. 64 workers</li> <li><code class="notranslate">--max-tasks-per-child=1</code> to simulate workers process high churn</li> </ul> </li> <li>send lots of tasks</li> <li>watch <code class="notranslate">celery</code> output for duplicate job execution: <ul dir="auto"> <li><code class="notranslate">[2018-10-17 09:46:15,694: INFO/MainProcess] Received task: work[fc23b1f5-a363-4c22-a1e3-28052811c237] </code></li> <li><code class="notranslate">[2018-10-17 09:46:15,695: WARNING/ForkPoolWorker-5526] do_work:5570</code></li> <li> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[2018-10-17 09:46:12,491: ERROR/MainProcess] Task handler raised error: WorkerLostError('Worker exited prematurely: exitcode 155.',) Traceback (most recent call last): File &quot;/usr/local/lib/python3.6/dist-packages/billiard/pool.py&quot;, line 1223, in mark_as_worker_lost human_status(exitcode)), billiard.exceptions.WorkerLostError: Worker exited prematurely: exitcode 155."><pre class="notranslate"><code class="notranslate">[2018-10-17 09:46:12,491: ERROR/MainProcess] Task handler raised error: WorkerLostError('Worker exited prematurely: exitcode 155.',) Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/billiard/pool.py", line 1223, in mark_as_worker_lost human_status(exitcode)), billiard.exceptions.WorkerLostError: Worker exited prematurely: exitcode 155. </code></pre></div> </li> </ul> </li> </ul> <h3 dir="auto">Scripted scenario</h3> <p dir="auto">I made a reproducible scenario using docker and docker-compose:<br> <a href="https://gist.github.com/thomas-riccardi/6295ca2b39e16619141d349e7b189d75">https://gist.github.com/thomas-riccardi/6295ca2b39e16619141d349e7b189d75</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# get scenario git clone https://gist.github.com/6295ca2b39e16619141d349e7b189d75.git celery-duplicate-jobs cd celery-duplicate-jobs # start everything docker-compose up --build; docker-compose down # in a second terminal, in same directory: watch `celery` output while sleep 1; do echo &quot;&quot; log=$(docker-compose logs worker) echo &quot;MainProcess receved task count uniqueness:&quot; echo &quot;${log}&quot; | grep &quot;Received task:&quot; | awk '{print $8}' | sort | uniq -c | sort -g | awk '{print $1}' | uniq -c echo -n &quot;WorkerLostError: &quot; echo &quot;${log}&quot; | grep &quot;raised error: WorkerLostError&quot; | wc -l echo &quot;Job execution uniqueness (job count per job execution count):&quot; echo &quot;${log}&quot; | grep do_work: | awk '{print $6}' | sort | uniq -c | sort -g | awk '{print $1}' | uniq -c done # to stop everything: just Ctrl-C on `docker-compose` and the bash script"><pre class="notranslate"><code class="notranslate"># get scenario git clone https://gist.github.com/6295ca2b39e16619141d349e7b189d75.git celery-duplicate-jobs cd celery-duplicate-jobs # start everything docker-compose up --build; docker-compose down # in a second terminal, in same directory: watch `celery` output while sleep 1; do echo "" log=$(docker-compose logs worker) echo "MainProcess receved task count uniqueness:" echo "${log}" | grep "Received task:" | awk '{print $8}' | sort | uniq -c | sort -g | awk '{print $1}' | uniq -c echo -n "WorkerLostError: " echo "${log}" | grep "raised error: WorkerLostError" | wc -l echo "Job execution uniqueness (job count per job execution count):" echo "${log}" | grep do_work: | awk '{print $6}' | sort | uniq -c | sort -g | awk '{print $1}' | uniq -c done # to stop everything: just Ctrl-C on `docker-compose` and the bash script </code></pre></div> <h2 dir="auto">Expected behavior</h2> <ul dir="auto"> <li>No (<code class="notranslate">WorkerLostError</code>) error logger.</li> <li>Jobs are executed exactly once.</li> </ul> <h3 dir="auto">Scripted scenario</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MainProcess received task count uniqueness: 1649 1 WorkerLostError: 0 Job execution uniqueness (job count per job execution count): 1534 1"><pre class="notranslate"><code class="notranslate">MainProcess received task count uniqueness: 1649 1 WorkerLostError: 0 Job execution uniqueness (job count per job execution count): 1534 1 </code></pre></div> <ul dir="auto"> <li>The MainProcess received 1649 tasks, all unique.</li> <li>The <code class="notranslate">WorkerLostError</code> exception is never logged.</li> <li>There is no job that was executed multiple times.</li> </ul> <h2 dir="auto">Actual behavior</h2> <ul dir="auto"> <li>Many <code class="notranslate">WorkerLostError</code> exceptions are logged as error.</li> <li>Some jobs are executed multiple times.</li> </ul> <h3 dir="auto">Scripted scenario</h3> <p dir="auto">After some time (~1min on my machine) we start to get <code class="notranslate">WorkerLostError</code> exceptions and jobs executed multiple times:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MainProcess received task count uniqueness: 1649 1 WorkerLostError: 125 Job execution uniqueness (job count per job execution count): 1523 1 11 2"><pre class="notranslate"><code class="notranslate">MainProcess received task count uniqueness: 1649 1 WorkerLostError: 125 Job execution uniqueness (job count per job execution count): 1523 1 11 2 </code></pre></div> <ul dir="auto"> <li>The MainProcess received 1649 tasks, all unique (so it's not a broker-level issue).</li> <li>The WorkerLostError exception is logged 125 times.</li> <li>There are 11 jobs that were executed 2 times.</li> </ul> <h2 dir="auto">More tests</h2> <h3 dir="auto">No backend</h3> <p dir="auto">When disabling the celery backend I could not reproduce the issues:</p> <ul dir="auto"> <li>no <code class="notranslate">WorkerLostError</code> exception</li> <li>no duplicated job execution</li> </ul> <h3 dir="auto">Redis backend</h3> <p dir="auto">With <code class="notranslate">redis</code> as backend instead of <code class="notranslate">postgresql</code>, I quickly have a burst of <code class="notranslate">WorkerLostError</code> but it never increases afterward, and no duplicate job execution:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="MainProcess receved task count uniqueness: 223 1 WorkerLostError: 0 Job execution uniqueness (job count per job execution count): 64 1 MainProcess receved task count uniqueness: 278 1 WorkerLostError: 10 Job execution uniqueness (job count per job execution count): 128 1 ... MainProcess receved task count uniqueness: 10000 1 WorkerLostError: 10 Job execution uniqueness (job count per job execution count): 10000 1"><pre class="notranslate"><code class="notranslate">MainProcess receved task count uniqueness: 223 1 WorkerLostError: 0 Job execution uniqueness (job count per job execution count): 64 1 MainProcess receved task count uniqueness: 278 1 WorkerLostError: 10 Job execution uniqueness (job count per job execution count): 128 1 ... MainProcess receved task count uniqueness: 10000 1 WorkerLostError: 10 Job execution uniqueness (job count per job execution count): 10000 1 </code></pre></div> <p dir="auto">I believe the issue is also there, but the race condition isn't triggered somehow (is redis too fast?).</p> <h3 dir="auto">PostgreSQL backend, Redis broker</h3> <p dir="auto">With <code class="notranslate">redis</code> as broker instead of <code class="notranslate">rabbitmq</code> (and still <code class="notranslate">postgresql</code> as backend) I could not reproduce the issues either:</p> <ul dir="auto"> <li>no <code class="notranslate">WorkerLostError</code> exception</li> <li>no duplicated job execution</li> </ul> <p dir="auto">Same conclusion as before.</p> <h2 dir="auto">More analysis</h2> <p dir="auto">I tried to analyze the issue by adding lots of <code class="notranslate">debug</code> log in <code class="notranslate">billiard/pool.py</code> and <code class="notranslate">celery/concurrency/asynpool.py</code>.<br> What I understood happens:<br> ...</p> <ol dir="auto"> <li><code class="notranslate">MainProcess</code> receives a job from the broker</li> <li><code class="notranslate">MainProcess</code> sends the job to one of its <code class="notranslate">Worker</code></li> <li><code class="notranslate">Worker</code> receives the job</li> <li><code class="notranslate">Worker</code> <code class="notranslate">put</code>s <code class="notranslate">ACK</code> for the job in its out queue</li> <li><code class="notranslate">Worker</code> executes the job and finishes it</li> <li><code class="notranslate">Worker</code> <code class="notranslate">put</code>s the job result it in its out queue</li> <li><code class="notranslate">Worker</code> finds it must stop: (max memory, max task..): it exits with code 155</li> <li><code class="notranslate">MainProcess</code> sees its child <code class="notranslate">Worker</code> process die with code 155</li> <li><code class="notranslate">MainProcess</code> checks pending job passed to this <code class="notranslate">Worker</code>: seems to re-queue them on another <code class="notranslate">Worker</code> =&gt; duplicate job execution</li> <li><code class="notranslate">MainProcess</code> logs exception: <code class="notranslate">2018-10-12 14:08:35,781 celery.worker.request ERROR Task handler raised error: WorkerLostError('Worker exited prematurely: exitcode 155.',)</code></li> <li>another <code class="notranslate">Worker</code> gets the job</li> </ol> <p dir="auto">...</p> <p dir="auto">What I understand should happen:<br> Different behavior starting at step <code class="notranslate">9.</code>:<br> 9. <code class="notranslate">MainProcess</code> should handle all remaining messages in <code class="notranslate">Worker</code> out queue: mark job as finished<br> 10. <code class="notranslate">MainProcess</code> doesn't logs exception as there should be no job currently handled by the <code class="notranslate">Worker</code><br> 11. <code class="notranslate">MainProcess</code> acknowledges the job to the broker/backend</p> <h3 dir="auto">Debug logs</h3> <h4 dir="auto"><code class="notranslate">billiard.ResultHandler on_state_change</code></h4> <p dir="auto"><a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L812-L814">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L812-L814</a><br> Logging here reveals that the <code class="notranslate">MainProcess</code> never processes the job response (state <code class="notranslate">READY = 1</code>), and most of the time not even the <code class="notranslate">ACK</code> (state <code class="notranslate">ACK = 0</code>). This explains why the job is re-executed by another worker.<br> (During my tests I saw the <code class="notranslate">ACK</code> always processed, but it was with a modified celery/billiard, see later hacks.)</p> <h3 dir="auto">Strange things in celery/billiard code/tried some fix/hacks</h3> <h4 dir="auto"><code class="notranslate">billiard.Pool._join_exited_workers</code>, <code class="notranslate">LOST_WORKER_TIMEOUT</code></h4> <p dir="auto">In billiard there seems to be a feature to wait some time after the <code class="notranslate">MainProcess</code> sees a child Worker process die, to have some time to process the remaining messages from it.<br> It's controlled by <code class="notranslate">LOST_WORKER_TIMEOUT</code>.</p> <p dir="auto"><code class="notranslate">billiard.Pool</code>:</p> <ul dir="auto"> <li>when a worker dies, we tag each of its jobs with current timestamp with <code class="notranslate">on_job_process_lost</code> <ul dir="auto"> <li><a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1185-L1187">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1185-L1187</a></li> <li><a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1216-L1217">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1216-L1217</a></li> </ul> </li> <li>then later we check for such tagged jobs if timeout was reached, in which case we really fail these jobs (with <code class="notranslate">mark_as_worker_lost</code>)<br> <a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1131-L1140">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1131-L1140</a></li> </ul> <p dir="auto">Celery <code class="notranslate">AsynPool</code> child class:</p> <ul dir="auto"> <li>it overrides <code class="notranslate">on_job_process_lost</code> to directly call <code class="notranslate">mark_as_worker_lost</code>:<br> <a href="https://github.com/celery/celery/blame/v4.2.1/celery/concurrency/asynpool.py#L1085-L1092">https://github.com/celery/celery/blame/v4.2.1/celery/concurrency/asynpool.py#L1085-L1092</a></li> </ul> <p dir="auto">=&gt; Celery <code class="notranslate">AsynPool</code> child class bypasses the whole <code class="notranslate">LOST_WORKER_TIMEOUT</code> timeout.</p> <h5 dir="auto">Code timeline</h5> <ul dir="auto"> <li> <p dir="auto">2013-05-01 billiard: code refactoring: notably adds <code class="notranslate">on_job_worker_lost</code> hook and <code class="notranslate">mark_as_worker_lost</code>: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/billiard/commit/06bc65e0696acc433c68ff2bb5a64445b17a4c70/hovercard" href="https://github.com/celery/billiard/commit/06bc65e0696acc433c68ff2bb5a64445b17a4c70">celery/billiard@<tt>06bc65e</tt></a></p> </li> <li> <p dir="auto">2013-05-01 celery: adapt code for child class AsynPool: <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/celery/commit/43fda6fa13b466eb377704424f2ed1426c7b75a6/hovercard" href="https://github.com/celery/celery/commit/43fda6fa13b466eb377704424f2ed1426c7b75a6"><tt>43fda6f</tt></a></p> <ul dir="auto"> <li>by implementing the new <code class="notranslate">on_job_worker_lost</code> hook by directly calling <code class="notranslate">mark_as_worker_lost</code>, it bypasses the whole mechanism</li> </ul> </li> <li> <p dir="auto">2013-07-26 first <code class="notranslate">WorkerLostError 155</code> bug report: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17275382" data-permission-text="Title is private" data-url="https://github.com/celery/billiard/issues/67" data-hovercard-type="issue" data-hovercard-url="/celery/billiard/issues/67/hovercard" href="https://github.com/celery/billiard/issues/67">celery/billiard#67</a></p> </li> <li> <p dir="auto">2013-11-28 second bug report: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23424810" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/1703" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/1703/hovercard" href="https://github.com/celery/celery/issues/1703">#1703</a></p> </li> <li> <p dir="auto">2013-11-28 wrong? fix: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23464467" data-permission-text="Title is private" data-url="https://github.com/celery/billiard/issues/87" data-hovercard-type="pull_request" data-hovercard-url="/celery/billiard/pull/87/hovercard" href="https://github.com/celery/billiard/pull/87">celery/billiard#87</a></p> </li> </ul> <h5 dir="auto">Questions</h5> <ul dir="auto"> <li>Is it an issue that this feature was bypassed ?</li> </ul> <h5 dir="auto">Hack/Fix</h5> <h6 dir="auto">Hack 1</h6> <p dir="auto">I tried to restore the feature by removing the Celery <code class="notranslate">AsynPool</code> <code class="notranslate">on_job_process_lost</code> override: it doesn't fix the issue.</p> <h6 dir="auto">Hack 2</h6> <p dir="auto">In fact there seem to be more breakage of this feature:</p> <ul dir="auto"> <li>the timeout stored in <code class="notranslate">job._lost_worker</code> is reset each time <code class="notranslate">_join_exited_workers</code> is called, instead of being set only the first time we check this job when its worker is dead.</li> <li>we also lose the <code class="notranslate">exitcode</code> when checking again a job</li> </ul> <p dir="auto"><code class="notranslate">on_job_process_lost</code> is called here: <a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1180-L1187">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L1180-L1187</a></p> <p dir="auto">I'm not sure how to fix this, either call only once, or make <code class="notranslate">on_job_process_lost</code> idempotent?</p> <p dir="auto">Result: it did not fix the issue either... We just wait for 10 seconds now before calling <code class="notranslate">mark_as_worker_lost</code>: last out queue messages are still not processed.</p> <h4 dir="auto"><code class="notranslate">billiard.Worker.__call__</code>, <code class="notranslate">_do_exit</code></h4> <p dir="auto">Following the previous analysis, I checked the Worker exit code:<br> <a href="https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L274-L310">https://github.com/celery/billiard/blame/v3.5.0.4/billiard/pool.py#L274-L310</a></p> <h5 dir="auto">Questions</h5> <ul dir="auto"> <li>Why do we override <code class="notranslate">sys.exit</code> ?</li> <li>How come we still end up in <code class="notranslate">_do_exit</code> since we seem to call <code class="notranslate">sys.exit</code> when <code class="notranslate">workloop</code> returns with <code class="notranslate">EX_RECYCLE</code> (the infamous <code class="notranslate">155</code>).</li> <li>Why do we do extra work for non win32 platform? <ul dir="auto"> <li>Why <code class="notranslate">put</code> <code class="notranslate">DEATH</code> (<code class="notranslate">4</code>) then <code class="notranslate">sleep 1</code>? <ul dir="auto"> <li>This comes from <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/celery/billiard/commit/896fc0d344bb18249a472153484a26328b6ebbe6/hovercard" href="https://github.com/celery/billiard/commit/896fc0d344bb18249a472153484a26328b6ebbe6">celery/billiard@<tt>896fc0d</tt></a> with no related issue <ul dir="auto"> <li>The <code class="notranslate">MainProcess</code> <code class="notranslate">on_death</code> then kills the worker with <code class="notranslate">SIGTERM</code>, this may risk breaking the explicit <code class="notranslate">155</code> recycle exit code mechanism...</li> </ul> </li> <li>This reveals there is clearly a race condition in the system, sleeping won't help</li> </ul> </li> </ul> </li> <li>Why <code class="notranslate">os._exit</code> instead of <code class="notranslate">sys.exit</code> ? <ul dir="auto"> <li><code class="notranslate">os._exit</code> doesn't seem to close/flush the fd/socket/Pipe, it may explain why the <code class="notranslate">MainProcess</code> misses messages.</li> <li><code class="notranslate">sys.exit</code> may risk closing resources still used by the <code class="notranslate">MainProcess</code>...</li> </ul> </li> </ul> <h5 dir="auto">Hack/Fix</h5> <h6 dir="auto">Hack 3</h6> <p dir="auto">(Cumulative with hack 1 and 2)</p> <ul dir="auto"> <li>Stopped to override <code class="notranslate">sys.exit</code></li> <li>Directly called <code class="notranslate">exit</code></li> <li>In <code class="notranslate">_do_exit</code> called <code class="notranslate">sys.exit</code> <ul dir="auto"> <li>Even tried explicit flush: <code class="notranslate">self.outq._writer.close()</code></li> </ul> </li> </ul> <p dir="auto">Result: still some <code class="notranslate">WorkerLostError</code>.</p> <p dir="auto">I also tried cumulatively to increase the <code class="notranslate">sleep</code>: with <code class="notranslate">sleep(10)</code> it seems to stop reproducing the issues, but it's still an ugly workaround...</p> <h3 dir="auto">Remaining questions</h3> <p dir="auto">I don't have much more time to invest in this without help.</p> <ul dir="auto"> <li>I did not dig into the whole "receiving and handling messages from workers" and how it interacts with the "worker is dead" management code.</li> <li>Maybe we should try to guarantee working on the last messages from a worker when it dies, instead of just waiting 10s (that was even disabled/broken in 2013)</li> <li>And/or maybe we should use a proper shutdown sequence, with a <code class="notranslate">DEATH_ACK</code> ? Something like: <ul dir="auto"> <li><code class="notranslate">Worker</code>: send <code class="notranslate">DEATH</code> at exit, after having sent everything else. Wait for DEATH_ACK</li> <li><code class="notranslate">MainProcess</code>: receive <code class="notranslate">DEATH</code>, read order is guaranteed sequential (is it?): we are sure we already handled all application messages. Send <code class="notranslate">DEATH_ACK</code></li> <li><code class="notranslate">Worker</code>: receive <code class="notranslate">DEATH_ACK</code>: <code class="notranslate">sys.exit(exit_code)</code></li> <li><code class="notranslate">MainProcess</code>: wait for worker process death</li> <li>maybe some retry? maybe some later force-kill?</li> </ul> </li> </ul> <h2 dir="auto">Related issues</h2> <ul dir="auto"> <li>2013-07-26 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="17275382" data-permission-text="Title is private" data-url="https://github.com/celery/billiard/issues/67" data-hovercard-type="issue" data-hovercard-url="/celery/billiard/issues/67/hovercard" href="https://github.com/celery/billiard/issues/67">celery/billiard#67</a></li> <li>2013-11-28 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="23424810" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/1703" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/1703/hovercard" href="https://github.com/celery/celery/issues/1703">#1703</a></li> <li>2016-03-02 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="137939038" data-permission-text="Title is private" data-url="https://github.com/celery/celery/issues/3085" data-hovercard-type="issue" data-hovercard-url="/celery/celery/issues/3085/hovercard" href="https://github.com/celery/celery/issues/3085">#3085</a></li> </ul>
0
<p dir="auto">This is a hypothetical but I couldn't find a good answer to it and thought might ask it here. Let's say my project requires <code class="notranslate">[email protected]</code> and <code class="notranslate">[email protected]</code>. In the meantime, <code class="notranslate">bar</code> requires <code class="notranslate">[email protected]</code>. Which version of <code class="notranslate">foo</code> would be loaded by webpack? Would both versions be loaded? What can I do to prevent both versions from being loaded, if that is the case?</p>
<h1 dir="auto">Bug report</h1> <p dir="auto"><strong>What is the current behavior?</strong></p> <p dir="auto">Our webpack build produces 15 chunks (3 initial <code class="notranslate">manifest</code>, <code class="notranslate">main</code>, <code class="notranslate">vendor</code> + the rest are dynamic chunks via <code class="notranslate">import()</code> or <code class="notranslate">require.ensure()</code>).</p> <p dir="auto">I wanted to experiment with split chunks (<a href="https://webpack.js.org/plugins/split-chunks-plugin/#splitchunks-chunks" rel="nofollow">https://webpack.js.org/plugins/split-chunks-plugin/#splitchunks-chunks</a>) -- as explained <code class="notranslate">splitChunks.chunk</code> can be a method returning a <code class="notranslate">Boolean</code> to decide whether a given chunk should be optimized further (additional code splitting) or not.</p> <p dir="auto">I put in place the following config:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" optimization: { splitChunks: { chunks() { console.dir(chunk.name) return false },"><pre class="notranslate"><code class="notranslate"> optimization: { splitChunks: { chunks() { console.dir(chunk.name) return false }, </code></pre></div> <p dir="auto"><strong>What is the expected behavior?</strong></p> <p dir="auto">I would expect to see all the 15 chunks names, one time each -- each callback would decide whether to optimize a given chunk or not</p> <p dir="auto"><strong>What is the actual behavior?</strong></p> <p dir="auto">I don't see certain chunks getting callback at all, and I see some other chunks listed twice.<br> There's no clear pattern about which kinds of chunks are missing and which are duplicated.</p> <p dir="auto">I.e. expected output:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="chunk1 chunk2 chunk3 ... chunk15"><pre class="notranslate"><code class="notranslate">chunk1 chunk2 chunk3 ... chunk15 </code></pre></div> <p dir="auto">Actual:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="chunk1 chunk2 chunk3 chunk4 chunk3 chunk4 chunk8 chunk9 chunk10 chunk9 chunk10"><pre class="notranslate"><code class="notranslate">chunk1 chunk2 chunk3 chunk4 chunk3 chunk4 chunk8 chunk9 chunk10 chunk9 chunk10 </code></pre></div> <p dir="auto"><strong>Other relevant information:</strong><br> webpack version: 4.26.0<br> Node.js version: 8.11.3<br> Operating System: Win 10</p> <p dir="auto">Does this look like a bug? Did someone encounter this too? Is it work digging further to find a minimum repro?<br> Maybe I misunderstand how this is supposed to work? (the docs are scarce so I'm not fully sure)</p>
0
<p dir="auto">We started getting this deprecation warning but I don't know what to do with it. Is there somewhere in your documentation that would explain this more? Thanks! Example log: <a href="https://github.com/astropy/astropy/runs/6838665326?check_suite_focus=true">https://github.com/astropy/astropy/runs/6838665326?check_suite_focus=true</a></p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="matplotlib._api.deprecation.MatplotlibDeprecationWarning: The checkdep_usetex function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use Vendor the code instead."><pre class="notranslate"><code class="notranslate">matplotlib._api.deprecation.MatplotlibDeprecationWarning: The checkdep_usetex function was deprecated in Matplotlib 3.6 and will be removed two minor releases later. Use Vendor the code instead. </code></pre></div> <p dir="auto">We use it like this:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=" TEX_UNAVAILABLE = not matplotlib.checkdep_usetex(True)"><pre class="notranslate"> <span class="pl-v">TEX_UNAVAILABLE</span> <span class="pl-c1">=</span> <span class="pl-c1">not</span> <span class="pl-s1">matplotlib</span>.<span class="pl-en">checkdep_usetex</span>(<span class="pl-c1">True</span>)</pre></div> <p dir="auto">Hard to tell from the traceback where this is coming from inside matplotlib because the warning went through a generic <code class="notranslate">matplotlib/_api/deprecation.py</code>.</p>
<p dir="auto"><a href="https://sourceforge.net/tracker/?func=detail&amp;aid=3106214&amp;group_id=80706&amp;atid=560721" rel="nofollow">Original report at SourceForge, opened Tue Nov 9 15:40:14 2010</a></p> <p dir="auto">The "pip" installation tool uses this URL to find the correct version of the matplotlib package:<br> <a href="http://pypi.python.org/simple/matplotlib/" rel="nofollow">http://pypi.python.org/simple/matplotlib/</a><br> matplotlib 1.0.0 appears on that page, but pip selects the very old 0.91.1 release for installation instead.</p> <p dir="auto">I'm not expert enough with either matplotlib or pip to determine whether this is a pip bug or a configuration<br> issue in the matplotlib entry on the Python Package Index.</p> <p dir="auto">Python 2.4.3 (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="611170" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/1" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/1/hovercard" href="https://github.com/matplotlib/matplotlib/pull/1">#1</a>, Sep 8 2010, 11:37:47)<br> [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2</p>
0
<p dir="auto">So I cloned from the repo and cover 4 files, it works fine now :)</p>
<p dir="auto">When using a customized version of Bootstrap 3.0 the Glyph icons don't work. The font file sizes differ from the "normal" version.</p>
1
<h3 dir="auto">Bug summary</h3> <p dir="auto">The image added in the text bbox is not saved with savefig if setting a bbox.<br> savefig without option do save the image</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def GrabTextWithImage(): fig = plt.figure() plt.subplot(111) #Display Text txt = plt.gcf().text(0.10, 0.5, &quot; ................\n ................\n ................&quot; ,bbox={'edgecolor':'black','alpha' : 0.2,'facecolor':'white', 'pad':10, 'linewidth' : 2}, verticalalignment='center', horizontalalignment='left', color='black', fontsize=12,zorder = 3) #Add an image an_array = numpy.random.random((20,20)) * 255 fig.figimage(an_array,70,240, zorder = 1) #Grab around text and return image ax = plt.gca() r = fig.canvas.get_renderer() bb = txt.get_window_extent(r) transf = ax.transData.inverted() bb_datacoords = bb.transformed(transf) bbox = bb_datacoords.transformed(ax.transData).transformed(fig.dpi_scale_trans.inverted()) plt.axis('off') fp = tempfile.TemporaryFile() plt.savefig(fp, bbox_inches = bbox) #BUG : image is not displayed # plt.savefig(fp) #Image is displayed im = Image.open(fp) return im if __name__ == &quot;__main__&quot;: import numpy print (mpl.__version__) im = GrabTextWithImage() plt.show() im.show()"><pre class="notranslate"><span class="pl-k">def</span> <span class="pl-v">GrabTextWithImage</span>(): <span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>() <span class="pl-s1">plt</span>.<span class="pl-en">subplot</span>(<span class="pl-c1">111</span>) <span class="pl-c">#Display Text</span> <span class="pl-s1">txt</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">gcf</span>().<span class="pl-en">text</span>(<span class="pl-c1">0.10</span>, <span class="pl-c1">0.5</span>, <span class="pl-s">" ................<span class="pl-cce">\n</span> ................<span class="pl-cce">\n</span> ................"</span> ,<span class="pl-s1">bbox</span><span class="pl-c1">=</span>{<span class="pl-s">'edgecolor'</span>:<span class="pl-s">'black'</span>,<span class="pl-s">'alpha'</span> : <span class="pl-c1">0.2</span>,<span class="pl-s">'facecolor'</span>:<span class="pl-s">'white'</span>, <span class="pl-s">'pad'</span>:<span class="pl-c1">10</span>, <span class="pl-s">'linewidth'</span> : <span class="pl-c1">2</span>}, <span class="pl-s1">verticalalignment</span><span class="pl-c1">=</span><span class="pl-s">'center'</span>, <span class="pl-s1">horizontalalignment</span><span class="pl-c1">=</span><span class="pl-s">'left'</span>, <span class="pl-s1">color</span><span class="pl-c1">=</span><span class="pl-s">'black'</span>, <span class="pl-s1">fontsize</span><span class="pl-c1">=</span><span class="pl-c1">12</span>,<span class="pl-s1">zorder</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span>) <span class="pl-c">#Add an image</span> <span class="pl-s1">an_array</span> <span class="pl-c1">=</span> <span class="pl-s1">numpy</span>.<span class="pl-s1">random</span>.<span class="pl-en">random</span>((<span class="pl-c1">20</span>,<span class="pl-c1">20</span>)) <span class="pl-c1">*</span> <span class="pl-c1">255</span> <span class="pl-s1">fig</span>.<span class="pl-en">figimage</span>(<span class="pl-s1">an_array</span>,<span class="pl-c1">70</span>,<span class="pl-c1">240</span>, <span class="pl-s1">zorder</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>) <span class="pl-c">#Grab around text and return image</span> <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">gca</span>() <span class="pl-s1">r</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-s1">canvas</span>.<span class="pl-en">get_renderer</span>() <span class="pl-s1">bb</span> <span class="pl-c1">=</span> <span class="pl-s1">txt</span>.<span class="pl-en">get_window_extent</span>(<span class="pl-s1">r</span>) <span class="pl-s1">transf</span> <span class="pl-c1">=</span> <span class="pl-s1">ax</span>.<span class="pl-s1">transData</span>.<span class="pl-en">inverted</span>() <span class="pl-s1">bb_datacoords</span> <span class="pl-c1">=</span> <span class="pl-s1">bb</span>.<span class="pl-en">transformed</span>(<span class="pl-s1">transf</span>) <span class="pl-s1">bbox</span> <span class="pl-c1">=</span> <span class="pl-s1">bb_datacoords</span>.<span class="pl-en">transformed</span>(<span class="pl-s1">ax</span>.<span class="pl-s1">transData</span>).<span class="pl-en">transformed</span>(<span class="pl-s1">fig</span>.<span class="pl-s1">dpi_scale_trans</span>.<span class="pl-en">inverted</span>()) <span class="pl-s1">plt</span>.<span class="pl-en">axis</span>(<span class="pl-s">'off'</span>) <span class="pl-s1">fp</span> <span class="pl-c1">=</span> <span class="pl-s1">tempfile</span>.<span class="pl-v">TemporaryFile</span>() <span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s1">fp</span>, <span class="pl-s1">bbox_inches</span> <span class="pl-c1">=</span> <span class="pl-s1">bbox</span>) <span class="pl-c">#BUG : image is not displayed</span> <span class="pl-c"># plt.savefig(fp) #Image is displayed</span> <span class="pl-s1">im</span> <span class="pl-c1">=</span> <span class="pl-v">Image</span>.<span class="pl-en">open</span>(<span class="pl-s1">fp</span>) <span class="pl-k">return</span> <span class="pl-s1">im</span> <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>: <span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-en">print</span> (<span class="pl-s1">mpl</span>.<span class="pl-s1">__version__</span>) <span class="pl-s1">im</span> <span class="pl-c1">=</span> <span class="pl-v">GrabTextWithImage</span>() <span class="pl-s1">plt</span>.<span class="pl-en">show</span>() <span class="pl-s1">im</span>.<span class="pl-en">show</span>()</pre></div> <h3 dir="auto">Actual outcome</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1446742/215844148-8deaf81c-dea5-489f-96a0-26e16734407f.png"><img src="https://user-images.githubusercontent.com/1446742/215844148-8deaf81c-dea5-489f-96a0-26e16734407f.png" alt="image" style="max-width: 100%;"></a></p> <h3 dir="auto">Expected outcome</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1446742/215844238-3718c2f4-c82b-4525-83fc-e1daf343f75d.png"><img src="https://user-images.githubusercontent.com/1446742/215844238-3718c2f4-c82b-4525-83fc-e1daf343f75d.png" alt="image" style="max-width: 100%;"></a></p> <h3 dir="auto">Additional information</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating system</h3> <p dir="auto">Win, Python 3.8, Matplotlib 3.6.2</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.6.2</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto">QtAgg</p> <h3 dir="auto">Python version</h3> <p dir="auto">3.8.2</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">pip</p>
<h3 dir="auto">Bug summary</h3> <p dir="auto">figimage() is producing inconsistent results.</p> <p dir="auto">It appears a transform is sometimes applied to the image and sometimes not.</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="from matplotlib import pyplot plt = pyplot import numpy as np fig = pyplot.figure() ax = fig.subplots() fig_bbox = fig.bbox width, height = fig_bbox.width, fig_bbox.height img = np.zeros((int(height), int(width), 3)) img += (127, 0, 0) fig.figimage(img, 0, 0, zorder=-1) # show the figure, image is not scaled as I would expect plt.show() # save as a png, image is scaled as I would expect fig.savefig('foo.png') # save as an svg, image matches the one in the FigureCanvas window. fig.savefig('foo.svg') # NB reversing the order of the two savefig calls produces images # matching the FigureCanvas version."><pre class="notranslate"><span class="pl-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">import</span> <span class="pl-s1">pyplot</span> <span class="pl-s1">plt</span> <span class="pl-c1">=</span> <span class="pl-s1">pyplot</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-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-s1">pyplot</span>.<span class="pl-en">figure</span>() <span class="pl-s1">ax</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-en">subplots</span>() <span class="pl-s1">fig_bbox</span> <span class="pl-c1">=</span> <span class="pl-s1">fig</span>.<span class="pl-s1">bbox</span> <span class="pl-s1">width</span>, <span class="pl-s1">height</span> <span class="pl-c1">=</span> <span class="pl-s1">fig_bbox</span>.<span class="pl-s1">width</span>, <span class="pl-s1">fig_bbox</span>.<span class="pl-s1">height</span> <span class="pl-s1">img</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">zeros</span>((<span class="pl-en">int</span>(<span class="pl-s1">height</span>), <span class="pl-en">int</span>(<span class="pl-s1">width</span>), <span class="pl-c1">3</span>)) <span class="pl-s1">img</span> <span class="pl-c1">+=</span> (<span class="pl-c1">127</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>) <span class="pl-s1">fig</span>.<span class="pl-en">figimage</span>(<span class="pl-s1">img</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-s1">zorder</span><span class="pl-c1">=</span><span class="pl-c1">-</span><span class="pl-c1">1</span>) <span class="pl-c"># show the figure, image is not scaled as I would expect</span> <span class="pl-s1">plt</span>.<span class="pl-en">show</span>() <span class="pl-c"># save as a png, image is scaled as I would expect</span> <span class="pl-s1">fig</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'foo.png'</span>) <span class="pl-c"># save as an svg, image matches the one in the FigureCanvas window.</span> <span class="pl-s1">fig</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'foo.svg'</span>) <span class="pl-c"># NB reversing the order of the two savefig calls produces images</span> <span class="pl-c"># matching the FigureCanvas version.</span></pre></div> <h3 dir="auto">Actual outcome</h3> <p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/251611/177882811-6c3cbeff-a885-4a67-bf43-65f038b44417.png"><img src="https://user-images.githubusercontent.com/251611/177882811-6c3cbeff-a885-4a67-bf43-65f038b44417.png" alt="foo" style="max-width: 100%;"></a><br> <a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/251611/177882813-b980da1c-0744-4f7e-b422-e77fc1d01df6.svg"><img src="https://user-images.githubusercontent.com/251611/177882813-b980da1c-0744-4f7e-b422-e77fc1d01df6.svg" alt="foo" style="max-width: 100%;"></a></p> <h3 dir="auto">Expected outcome</h3> <p dir="auto">I would expect all images to look like the png image, i.e. scaled to the figure size.</p> <h3 dir="auto">Additional information</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating system</h3> <p dir="auto">Ubuntu 21.10</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.5.0.dev2201+ge9bd017b2d.d20220707</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto">'QtAgg'</p> <h3 dir="auto">Python version</h3> <p dir="auto">Python 3.9.7</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">git checkout</p>
1
<h3 dir="auto">Bug summary</h3> <p dir="auto"><code class="notranslate">FigureCanvasQTAgg.__init__(self, mpl_fig.Figure())</code> gives <code class="notranslate">TypeError: FuncAnimation.__init__() missing 2 required positional arguments: 'fig' and 'func'</code>. Was working in matplotlib 3.5.2. Same Problem appears by using FigureCanvas.</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.figure as mpl_fig import matplotlib.animation as anim from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg class SimulationPrevCanvas(FigureCanvasQTAgg, anim.FuncAnimation): def __init__(self, x:List, y:List) -&gt; None: FigureCanvasQTAgg.__init__(self, mpl_fig.Figure())"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">figure</span> <span class="pl-k">as</span> <span class="pl-s1">mpl_fig</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">animation</span> <span class="pl-k">as</span> <span class="pl-s1">anim</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">backends</span>.<span class="pl-s1">backend_qt5agg</span> <span class="pl-k">import</span> <span class="pl-v">FigureCanvasQTAgg</span> <span class="pl-k">class</span> <span class="pl-v">SimulationPrevCanvas</span>(<span class="pl-v">FigureCanvasQTAgg</span>, <span class="pl-s1">anim</span>.<span class="pl-v">FuncAnimation</span>): <span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">x</span>:<span class="pl-v">List</span>, <span class="pl-s1">y</span>:<span class="pl-v">List</span>) <span class="pl-c1">-&gt;</span> <span class="pl-c1">None</span>: <span class="pl-v">FigureCanvasQTAgg</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">mpl_fig</span>.<span class="pl-v">Figure</span>())</pre></div> <h3 dir="auto">Actual outcome</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" super().__init__() # Typically the GUI widget init (if any). TypeError: FuncAnimation.__init__() missing 2 required positional arguments: 'fig' and 'func'"><pre class="notranslate"><code class="notranslate"> super().__init__() # Typically the GUI widget init (if any). TypeError: FuncAnimation.__init__() missing 2 required positional arguments: 'fig' and 'func' </code></pre></div> <h3 dir="auto">Expected outcome</h3> <p dir="auto">Animated plot inside QT.</p> <h3 dir="auto">Additional information</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Operating system</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.7</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Python version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">conda</p>
<h3 dir="auto">Bug summary</h3> <p dir="auto">Hi 👋🏼<br> When using the recently released PySide 6.5.0 with matplotlib 3.7.1 and python 3.10, an error is raised at FuncAnimation initialization that doesn't happen with the same code on previous PySide versions.</p> <h3 dir="auto">Code for reproduction</h3> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import sys from PySide6.QtCore import Qt from PySide6.QtWidgets import (QApplication, QLabel, QVBoxLayout, QWidget) from matplotlib.artist import Artist from matplotlib.animation import FuncAnimation from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg from matplotlib.figure import Figure import numpy as np class MplCanvas(FigureCanvasQTAgg, FuncAnimation): def __init__(self, parent=None, width=5, height=4, dpi=100): self.fig = Figure(figsize=(width, height), dpi=dpi) self.axes = self.fig.add_subplot(111) self.axes.set_xlim(0, 2) self.axes.set_ylim(-2, 2) self.line, = self.axes.plot([], [], lw=2) self.line.set_data([], []) FigureCanvasQTAgg.__init__(self, self.fig) FuncAnimation.__init__( self, self.fig, func=self.draw_frame, frames=200, interval=20, blit=True, cache_frame_data=False ) def draw_frame(self, frame: int) -&gt; list[Artist]: x = np.linspace(0, 5, 1000) y = np.sin(2 * np.pi * (x - 0.01 * frame)) self.line.set_data(x, y) return [self.line] class MyWidget(QWidget): def __init__(self): QWidget.__init__(self) self.text = QLabel(&quot;Hello World&quot;) self.text.setAlignment(Qt.AlignCenter) sc = MplCanvas(self, width=5, height=4, dpi=100) self.layout = QVBoxLayout() self.layout.addWidget(self.text) self.layout.addWidget(sc) self.setLayout(self.layout) if __name__ == &quot;__main__&quot;: app = QApplication(sys.argv) widget = MyWidget() widget.resize(800, 600) widget.show() sys.exit(app.exec())"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">sys</span> <span class="pl-k">from</span> <span class="pl-v">PySide6</span>.<span class="pl-v">QtCore</span> <span class="pl-k">import</span> <span class="pl-v">Qt</span> <span class="pl-k">from</span> <span class="pl-v">PySide6</span>.<span class="pl-v">QtWidgets</span> <span class="pl-k">import</span> (<span class="pl-v">QApplication</span>, <span class="pl-v">QLabel</span>, <span class="pl-v">QVBoxLayout</span>, <span class="pl-v">QWidget</span>) <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">artist</span> <span class="pl-k">import</span> <span class="pl-v">Artist</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">animation</span> <span class="pl-k">import</span> <span class="pl-v">FuncAnimation</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">backends</span>.<span class="pl-s1">backend_qtagg</span> <span class="pl-k">import</span> <span class="pl-v">FigureCanvasQTAgg</span> <span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">figure</span> <span class="pl-k">import</span> <span class="pl-v">Figure</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">class</span> <span class="pl-v">MplCanvas</span>(<span class="pl-v">FigureCanvasQTAgg</span>, <span class="pl-v">FuncAnimation</span>): <span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">parent</span><span class="pl-c1">=</span><span class="pl-c1">None</span>, <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">4</span>, <span class="pl-s1">dpi</span><span class="pl-c1">=</span><span class="pl-c1">100</span>): <span class="pl-s1">self</span>.<span class="pl-s1">fig</span> <span class="pl-c1">=</span> <span class="pl-v">Figure</span>(<span class="pl-s1">figsize</span><span class="pl-c1">=</span>(<span class="pl-s1">width</span>, <span class="pl-s1">height</span>), <span class="pl-s1">dpi</span><span class="pl-c1">=</span><span class="pl-s1">dpi</span>) <span class="pl-s1">self</span>.<span class="pl-s1">axes</span> <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">fig</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">111</span>) <span class="pl-s1">self</span>.<span class="pl-s1">axes</span>.<span class="pl-en">set_xlim</span>(<span class="pl-c1">0</span>, <span class="pl-c1">2</span>) <span class="pl-s1">self</span>.<span class="pl-s1">axes</span>.<span class="pl-en">set_ylim</span>(<span class="pl-c1">-</span><span class="pl-c1">2</span>, <span class="pl-c1">2</span>) <span class="pl-s1">self</span>.<span class="pl-s1">line</span>, <span class="pl-c1">=</span> <span class="pl-s1">self</span>.<span class="pl-s1">axes</span>.<span class="pl-en">plot</span>([], [], <span class="pl-s1">lw</span><span class="pl-c1">=</span><span class="pl-c1">2</span>) <span class="pl-s1">self</span>.<span class="pl-s1">line</span>.<span class="pl-en">set_data</span>([], []) <span class="pl-v">FigureCanvasQTAgg</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>, <span class="pl-s1">self</span>.<span class="pl-s1">fig</span>) <span class="pl-v">FuncAnimation</span>.<span class="pl-en">__init__</span>( <span class="pl-s1">self</span>, <span class="pl-s1">self</span>.<span class="pl-s1">fig</span>, <span class="pl-s1">func</span><span class="pl-c1">=</span><span class="pl-s1">self</span>.<span class="pl-s1">draw_frame</span>, <span class="pl-s1">frames</span><span class="pl-c1">=</span><span class="pl-c1">200</span>, <span class="pl-s1">interval</span><span class="pl-c1">=</span><span class="pl-c1">20</span>, <span class="pl-s1">blit</span><span class="pl-c1">=</span><span class="pl-c1">True</span>, <span class="pl-s1">cache_frame_data</span><span class="pl-c1">=</span><span class="pl-c1">False</span> ) <span class="pl-k">def</span> <span class="pl-en">draw_frame</span>(<span class="pl-s1">self</span>, <span class="pl-s1">frame</span>: <span class="pl-s1">int</span>) <span class="pl-c1">-&gt;</span> <span class="pl-s1">list</span>[<span class="pl-v">Artist</span>]: <span class="pl-s1">x</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">linspace</span>(<span class="pl-c1">0</span>, <span class="pl-c1">5</span>, <span class="pl-c1">1000</span>) <span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-en">sin</span>(<span class="pl-c1">2</span> <span class="pl-c1">*</span> <span class="pl-s1">np</span>.<span class="pl-s1">pi</span> <span class="pl-c1">*</span> (<span class="pl-s1">x</span> <span class="pl-c1">-</span> <span class="pl-c1">0.01</span> <span class="pl-c1">*</span> <span class="pl-s1">frame</span>)) <span class="pl-s1">self</span>.<span class="pl-s1">line</span>.<span class="pl-en">set_data</span>(<span class="pl-s1">x</span>, <span class="pl-s1">y</span>) <span class="pl-k">return</span> [<span class="pl-s1">self</span>.<span class="pl-s1">line</span>] <span class="pl-k">class</span> <span class="pl-v">MyWidget</span>(<span class="pl-v">QWidget</span>): <span class="pl-k">def</span> <span class="pl-en">__init__</span>(<span class="pl-s1">self</span>): <span class="pl-v">QWidget</span>.<span class="pl-en">__init__</span>(<span class="pl-s1">self</span>) <span class="pl-s1">self</span>.<span class="pl-s1">text</span> <span class="pl-c1">=</span> <span class="pl-v">QLabel</span>(<span class="pl-s">"Hello World"</span>) <span class="pl-s1">self</span>.<span class="pl-s1">text</span>.<span class="pl-en">setAlignment</span>(<span class="pl-v">Qt</span>.<span class="pl-v">AlignCenter</span>) <span class="pl-s1">sc</span> <span class="pl-c1">=</span> <span class="pl-v">MplCanvas</span>(<span class="pl-s1">self</span>, <span class="pl-s1">width</span><span class="pl-c1">=</span><span class="pl-c1">5</span>, <span class="pl-s1">height</span><span class="pl-c1">=</span><span class="pl-c1">4</span>, <span class="pl-s1">dpi</span><span class="pl-c1">=</span><span class="pl-c1">100</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layout</span> <span class="pl-c1">=</span> <span class="pl-v">QVBoxLayout</span>() <span class="pl-s1">self</span>.<span class="pl-s1">layout</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">self</span>.<span class="pl-s1">text</span>) <span class="pl-s1">self</span>.<span class="pl-s1">layout</span>.<span class="pl-en">addWidget</span>(<span class="pl-s1">sc</span>) <span class="pl-s1">self</span>.<span class="pl-en">setLayout</span>(<span class="pl-s1">self</span>.<span class="pl-s1">layout</span>) <span class="pl-k">if</span> <span class="pl-s1">__name__</span> <span class="pl-c1">==</span> <span class="pl-s">"__main__"</span>: <span class="pl-s1">app</span> <span class="pl-c1">=</span> <span class="pl-v">QApplication</span>(<span class="pl-s1">sys</span>.<span class="pl-s1">argv</span>) <span class="pl-s1">widget</span> <span class="pl-c1">=</span> <span class="pl-v">MyWidget</span>() <span class="pl-s1">widget</span>.<span class="pl-en">resize</span>(<span class="pl-c1">800</span>, <span class="pl-c1">600</span>) <span class="pl-s1">widget</span>.<span class="pl-en">show</span>() <span class="pl-s1">sys</span>.<span class="pl-en">exit</span>(<span class="pl-s1">app</span>.<span class="pl-en">exec</span>())</pre></div> <h3 dir="auto">Actual outcome</h3> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Traceback (most recent call last): File &quot;/home/theguy/projects/test_matplotlib/plot.py&quot;, line 59, in &lt;module&gt; widget = MyWidget() File &quot;/home/theguy/projects/test_matplotlib/plot.py&quot;, line 46, in __init__ sc = MplCanvas(self, width=5, height=4, dpi=100) File &quot;/home/theguy/projects/test_matplotlib/plot.py&quot;, line 21, in __init__ FigureCanvasQTAgg.__init__(self, self.fig) File &quot;/home/theguy/.cache/pypoetry/virtualenvs/test-matplotlib-WtQHVv9a-py3.10/lib64/python3.10/site-packages/matplotlib/backends/backend_qt.py&quot;, line 205, in __init__ super().__init__(figure=figure) File &quot;/home/theguy/.cache/pypoetry/virtualenvs/test-matplotlib-WtQHVv9a-py3.10/lib64/python3.10/site-packages/matplotlib/backend_bases.py&quot;, line 1695, in __init__ super().__init__() # Typically the GUI widget init (if any). TypeError: FuncAnimation.__init__() missing 2 required positional arguments: 'fig' and 'func'"><pre class="notranslate"><code class="notranslate">Traceback (most recent call last): File "/home/theguy/projects/test_matplotlib/plot.py", line 59, in &lt;module&gt; widget = MyWidget() File "/home/theguy/projects/test_matplotlib/plot.py", line 46, in __init__ sc = MplCanvas(self, width=5, height=4, dpi=100) File "/home/theguy/projects/test_matplotlib/plot.py", line 21, in __init__ FigureCanvasQTAgg.__init__(self, self.fig) File "/home/theguy/.cache/pypoetry/virtualenvs/test-matplotlib-WtQHVv9a-py3.10/lib64/python3.10/site-packages/matplotlib/backends/backend_qt.py", line 205, in __init__ super().__init__(figure=figure) File "/home/theguy/.cache/pypoetry/virtualenvs/test-matplotlib-WtQHVv9a-py3.10/lib64/python3.10/site-packages/matplotlib/backend_bases.py", line 1695, in __init__ super().__init__() # Typically the GUI widget init (if any). TypeError: FuncAnimation.__init__() missing 2 required positional arguments: 'fig' and 'func' </code></pre></div> <h3 dir="auto">Expected outcome</h3> <p dir="auto">A window opens and renders a simple sine wave animation.</p> <h3 dir="auto">Additional information</h3> <p dir="auto">If I remove the FuncAnimation then the window opens and I can draw some static lines without issue.</p> <p dir="auto">No error is raised when using pyside6_essentials &lt;=6.4.3</p> <p dir="auto">I've looked around the source code and tried a few things out to no avail.</p> <h3 dir="auto">Operating system</h3> <p dir="auto">Arch, Fedora</p> <h3 dir="auto">Matplotlib Version</h3> <p dir="auto">3.7.1</p> <h3 dir="auto">Matplotlib Backend</h3> <p dir="auto">QtAgg</p> <h3 dir="auto">Python version</h3> <p dir="auto">Python 3.10.10</p> <h3 dir="auto">Jupyter version</h3> <p dir="auto"><em>No response</em></p> <h3 dir="auto">Installation</h3> <p dir="auto">pip</p>
1