WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
jsl1 opened SPR-9343 and commented

org.springframework.core.convert.Property class performs expensive operations in its constructor such as resolveAnnotations() method.

The annotations could be lazy loaded instead (when calling getAnnotations())

I noticed that while profiling an application using BeanWrapperImpl to set java bean properties values (see screenshot attached).

Affects: 3.1.1

Attachments:

spring_bug.png (26.25 kB)

Issue Links:

#14304 Poor Performance with lots of Prototype Scoped Beans ("duplicates")

Issue 2:
Kevin Mudrick opened SPR-9670 and commented

We are seeing a pretty substantial performance hit with the creation of large quantities of prototype-scoped beans in the 3.1.x branch versus 3.0.x (and 2.5.6)

In our example, we have call context.getBean() with a bean consisting of 2 levels of nested bean referenced, in a pretty large loop.

3.0.7: 40604ms

3.1.2: 685150ms

The only difference between these runs is the version of the spring dependencies.

After profiling using YourKit, I found the hotspots in 3.1.x to be in the following places:

org.springframework.beans.TypeConverterDelegate: This seems to be the bigger problem.

The changes introduced in 3.1 (specifically, in commit 6f14673) to findDefaultEditor() end up (expensively) initializing an editor registry every time this is called. Since we get here each time we apply a property on every bean creation, this really adds up. Previously, the commented-out code ended up shortcutting this. I found that replacing the commented out code (the part that relied on the now-removed PropertyTypeDescriptor/PropertyDescriptor with static use of PropertyEditorManager.findEditor(), cuts down on the slowness considerably, at the expense of relying on java.beans - which a few commit comments seem to indicate is something to be avoided for better platform compatibility.

org.springframework.core.convert.Property: This also seems to be a problem.

The overhead of the annotation parsing via reflection is already noted in #13981 - but that issue doesn't seem to mention this example. My profiling is showing that this is being constructed for every property found on every bean being created. With lots of prototype beans - this comes to light pretty quickly. Perhaps if ReflectionUtils used a similar caching strategy to apache commons-beanutils PropertyUtilsBean for annotations, this performance hit could be mitigated.

Affects: 3.1.2

Issue Links:

#13981 org.springframework.core.convert.Property class performs expensive operations in its constructor ("is duplicated by")

#12081 Concurrent prototype creation causes NullPointerException

#13109 TypeConverterDelegate contains commented out code

0 votes, 6 watchers
Issue 1:
When I add screenshots to a test, the test report displays the name twice. While, functionally, this isn't an issue, the detail oriented part of me is annoyed by this :)

const screenshot = await page.screenshot({ fullPage: true });
await test.info().attach(name, { body: screenshot, contentType: 'image/png' });

I have tried specifying the path when taking a screenshot, and that does not produce the duplicate file name in the report, however, I want to use the default behavior in Playwright for taking screenshots, as it cleans up the screenshot directory every time the tests are run.

Issue 2:
System info

Playwright Version: 1.32.2

Operating System: maxOs 13.2.1

Browser: All

Other info:

Source code

I provided exact source code that allows reproducing the issue locally

Config file

import { defineConfig, devices } from "@playwright/test";

export default defineConfig({
testDir: "./tests",
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
});

Test file (self-contained)

import { test } from "@playwright/test";
import { PassThrough } from "stream";

test("pipe to stdout", async ({ page }) => {
const writable = new PassThrough();
writable.pipe(process.stdout);
writable.write("hello");
});

Steps

yarn playwright test --ui

Run the test in the UI

Expected

No error in the console

Actual

Error: ReferenceError: Buffer is not defined
at Be._onStdIO (http://localhost:62118/trace/watch.575ca3b3.js:1:4187)
at Be.dispatch (http://localhost:62118/trace/watch.575ca3b3.js:1:2309)
at window.dispatch (http://localhost:62118/trace/watch.575ca3b3.js:3:296)
at eval (eval at evaluate (:195:30), <anonymous>:2:10)
at UtilityScript.evaluate (<anonymous>:197:17)
at UtilityScript.<anonymous> (<anonymous>:1:44)

Additionally, no output to be seen anywhere from tests
Issue 1:
It would save a bit of hassle (especially when updating all PCs in a team) if Typescript VS installer asked about PATH update to the latest Typescript bin directory (ie. remove old Typescript from PATH , add new Typescript to PATH).

Managing all developers and asking them to update the PATH manually leads to problems - incoherent versions of command line tools can lead to erratic compilation errors between team members.

Issue 2:
Can we fix this or is cmd too limited? After installing 1.4 out of band (https://visualstudiogallery.msdn.microsoft.com/2d42d8dc-e085-45eb-a30b-3f7d50d55304) on top of VS2013 my command prompt experience is still stuck at 1.0:

C:\>tsc -v
Version 1.0.0.0

C:\>where tsc
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\tsc.js
C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.9\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\0.9\tsc.js
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.1\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.1\tsc.js
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\tsc.exe
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\tsc.js
Issue 1:
For some tests I would like to simulate the current time because my web app have some functionalities that active depends of the time.

For example, if the time is between 20hrs and 6hrs the app have to show a maintenance page. This feature will be awesome because I can execute my test in any time of the day, I wouldn’t have to wait for a time to run it.

Issue 2:
See #6347 (comment) for a current workaround.

Edited by the Playwright team.

Hello,

We are using playwright to run automated tests on some websites, we record external requests to be able to replace the tests in isolation.

We would love have a way to set the internal clock, same as clock() from cypress to improve reproductibility

This has already been mentioned here #820 but I did not found any follow up issues :)
Issue 1:
In an example in the stats.power_divergence docstring, the incorrect use of "method" instead of "lambda_" as option name is used. Fix in pull request #3652

Issue 2:
I have no problems interpolating over small arrays like this.

import numpy as np
from scipy.interpolate import interp2d

x = np.arange(900)
y = np.arange(400)
z = np.random.randint(-1000, high=1000, size=(400, 900))
f = interp2d(x, y, z, kind='linear')
# No errors

But errors are produced when x, y and z are large, as shown below.

Reproducing code example:

import numpy as np
from scipy.interpolate import interp2d

x = np.arange(90000)
y = np.arange(40000)
z = np.random.randint(-1000, high=1000, size=(40000, 90000))
f = interp2d(x, y, z, kind='linear')

Error message:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/data/software/Anaconda3-4.3.1-Linux-x86_64/lib/python3.6/site-packages/scipy/interpolate/interpolate.py", line 225, in __init__
kx=kx, ky=ky, s=0.0)
dfitpack.error: (len(z)==mx*my) failed for 3rd argument z

Scipy/Numpy/Python version information:

>>> import sys, scipy, numpy; print(scipy.__version__, numpy.__version__, sys.version_info)
0.19.1 1.12.1 sys.version_info(major=3, minor=6, micro=0, releaselevel='final', serial=0)
Issue 1:
What's Happening?

When (somehow) which "defaultProfile" is not able to run like miss-typing "commandline" goes like "powershell.ex" (no e) so there is no program to run it, windows terminal just shuts down when opening terminal, (or not the command line program, like office program WINWORD.EXE => opens word program and terminal shuts down.) and never can be opened before finding profiles.json and change wrong thing manually or change defaultProfile to which it can be run on windows terminal.

Proposed technical implementation details

So, If something that (Cannot use Windows terminal because of profiles.json) happens, Opening a popup "Can't load Terminal" with button open profiles.json before Windows Terminal shuts down like the image

or just not load any kind of commandline and make a select screen which profile to load for user like this image

BTW I just made image using mspaint

Issue 2:
From #1343

Even more correct would be to specifically display a message that there was no default profile (though that might be too much for this release).

If we load the profiles.json and the defaultProfile doesn't exist in the list of profiles, we should display an error specific to that failure case.

We should also use the first profile as the default temporarily. We'll need to make sure not to persist this runtime change.

Maybe also:

Check if the commandline is a path to a single executable, and if it is, warn if it doesn't exist? Dunno how we'd get the first arg from the commandline easily but it could totally be done.
Issue 1:
The recently added config option for adding a custom bootstrap file to the main bundle is mentioned only in comments here and there so far, so thought to turn this into an actual task for clarity.

References:

#2969 (comment)

#1556 (comment)

I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I'd expect to

find config.clientBootstrap documented in main README

find an example showing how to use this (suggestion: use something common like babel-polyfill in the example to help issues such as #2468)

As a side note, it seems that there are no tests exercising this config option, but perhaps that can be seen as a different task than these docs.

Notes

Something to be aware of with this config (and the docs): sadly this option does not help with everything. I tried to add EventSource polyfill for webpack-hot-middleware to make the dev mode work in IE11, but this custom bootstrap is injected too late and thus it does not help with this kind of polyfilling.

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When creating a callback reference to a dynamically imported component, the reference should resolve to the component as if it had been imported normally.

Current Behavior

The ref behaves strangely. The reference to the component doesn't seem to have any of the attributes or state of the component -- all undefined.

Steps to Reproduce (for bugs)

Here's a nice smallish example. Bring your own boilerplate components/page.js

pages/refs.js

import React, { Component } from 'react'
import dynamic from 'next/dynamic'
import Page from '../components/page'

const Child = dynamic(
import('../components/child')
)

class Parent extends Component {

onSubmit = () => {
console.log(this.child.state.value) // undefined
console.log(this.child.getValue()) // throws
}

render() {
return (
<div>
<Child ref={ (child) => { this.child = child } } />
<button onClick={ this.onSubmit }>Submit</button>
</div>
)
}
}

export default class extends Page {
render() {
return <Parent />
}
}

components/child.js

import React, { Component } from 'react'

export default class extends Component {
constructor(props) {
super(props)
this.state = {
value: 23
}
this.getValue = () => String(this.state.value)
}
render() { return <div>{this.state.value}</div> }
}

Context

I'm trying to create a wrapper around a wrapper around React-RTE. The first layer wrapper has a getValue() method one can use to extract the transformed value from React-RTE. The transformation is non-trivial and kind of expensive, so it makes sense to do it on-demand, and the component that should demand it is in the second-layer component. The first layer wrapper needs to be loaded dynamically (with SSR disabled).

Your Environment

Tech
Version

next
3.0.6

node
6.9.1

OS
macOS 10.12.6

browser
Chrome 60.0.3112.90 (Official Build) (64-bit)
Issue 1:
I'd like to be able to register "sub-blueprints" using Blueprint.register_blueprint(*args, **kwargs). This would register the nested blueprints with an app when the "parent" is registered with it. All parameters are preserved, other than url_prefix, which is handled similarly to in add_url_rule. A naíve implementation could look like this:

class Blueprint(object):
...

def register_blueprint(self, blueprint, **options):
def deferred(state):
url_prefix = options.get('url_prefix')
if url_prefix is None:
url_prefix = blueprint.url_prefix
if 'url_prefix' in options:
del options['url_prefix']

state.app.register_blueprint(blueprint, url_prefix, **options)
self.record(deferred)

Issue 2:
On Heroku, we can't add a local config instance/config.py that's not part of the repo. Instead, they support configuration through env vars. Document this pattern.

myapp/config.py:

MAIL_USERNAME = os.environ.get('FLASK_MAIL_USERNAME', 'default')
LDAP_PORT = int(os.environ.get('FLASK_LDAP_PORT', 636))
Issue 1:
The detection seems incorrect? (I think 9600KF has native FMA support?)

On 1.7.0

julia> versioninfo()
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_CUDA_VERSION = 11.4.0

julia> @code_native fma(1.0,1.0,1.0)
.text
; ┌ @ floatfuncs.jl:347 within `fma`
pushq %rbp
movq %rsp, %rbp
; │┌ @ floatfuncs.jl:336 within `fma_llvm`
vfmadd213sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + xmm2
; │└
popq %rbp
retq
nopl (%rax,%rax)

on master

julia> versioninfo()
Julia Version 1.8.0-DEV.1090
Commit d16f4806e9 (2021-12-01 10:54 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-9600KF CPU @ 3.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_CUDA_VERSION = 11.4.0

julia> @code_native fma(1.0,1.0,1.0)
.text
.file "fma"
.globl julia_fma_552 # -- Begin function julia_fma_552
.p2align 4, 0x90
.type julia_fma_552,@function
julia_fma_552: # @julia_fma_552
; ┌ @ floatfuncs.jl:416 within `fma`
.cfi_startproc
# %bb.0: # %L5
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset %rbp, -16
movq %rsp, %rbp
.cfi_def_cfa_register %rbp
subq $32, %rsp
movabsq $j_fma_emulated_554, %rax
callq *%rax
addq $32, %rsp
popq %rbp
retq
.Lfunc_end0:
.size julia_fma_552, .Lfunc_end0-julia_fma_552
.cfi_endproc
; └
# -- End function
.section ".note.GNU-stack","",@progbits

Issue 2:
julia> func=fma;
julia> @test func(-1.9369631f13, 2.1513551f-7, -1.7354427f-24) == -4.1670958f6
Test Passed

julia> for func in (fma, fma)
@test func(-1.9369631f13, 2.1513551f-7, -1.7354427f-24) == -4.1670958f6
end
Test Failed at REPL[37]:2
Expression: func(-1.9369631f13, 2.1513551f-7, -1.7354427f-24) == -4.1670958f6
Evaluated: -4.1670955f6 == -4.1670958f6
ERROR: There was an error during testing

I'm really not sure how this is possible (This is the case both on 1.6 and master)
Issue 1:
Bug summary

When using matplotlib.colorbar.make_axes function, plt.close() does not clear the new colorbar axes from memory. Tested for the Qt5 backend only. Maybe related to #22002, at least in the sense that I see no leak for Qt5 when no colorbar axes are added.

Code for reproduction

%pylab qt5
from matplotlib import colorbar
import psutil
import gc

p = psutil.Process()
for i in range(5):
fig, ax = plt.subplots(1,1)
ax.imshow(random.normal(size=(100,100)))
cax = colorbar.make_axes(ax)
plt.savefig("test.png")
plt.pause(0.1)
plt.close(fig)
del fig
del ax
del cax
gc.collect()
print(p.memory_full_info().uss/1e6)

Actual outcome

250.744832

255.209472

259.514368

264.13056

268.099584

Expected outcome

Constant memory usage, as is when the line

cax = colorbar.make_axes(ax)

is commented out.

Additional information

No response

Operating system

Windows

Matplotlib Version

3.4.2

Matplotlib Backend

Qt5Agg (PyQt)

Python version

3.7.6

Jupyter version

No response

Installation

from source (.tar.gz)

Issue 2:
Python version: 2.7; Windows version: 7; Matplotlib version 1.2.1

I'm making an interactive plot (set with plt.ion()) while some other parts of my script do some calculations, and I update the plot frequently with calls to plt.draw(). I noticed that when I click the figure window of the interactively drawn plot and try to move it around, the figure stops updating and Windows tags the process "Not Responding", but the script continues to run without a problem. If I don't click the figure window, everything is ok.

I've read that some people have had this issue before on other forums and they got around the problem by using different backends, but my computer doesn't respond differently to other backends. What can I do?
Issue 1:
Feature request:

Coming from Android background, a feature commonly used to perform complex tasks is annotation processors.

Since Dart usage is moving to the strong side such a feature can enable all sorts of code generation previous to user code compilation, which is very valuable to catch errors early on with compilation checks. Some of the existing Android libraries are starting to pop up, but instead the user has to manually perform the code generation step and (probably) commit those files to disk.

https://github.com/google/inject.dart/tree/master/example/coffee

https://github.com/IdanAizikNissim/Cosmic

Not yet in Flutter there are some good sources for inspiration

Android's Room database's highlights come from annotation processor to generate code and validate user code

I also have plans to scan the assets and generate code to access them from a class with fields (inspired by Android's asset system - R.drawable.bunny). If an automated tool that runs pre-build is available I can hook into that, but otherwise the only way is to modify packages/flutter_tools (related to #4890)

Issue 2:
It's not sustainable for the flutter tool to support all the commands that all developers collectively desire. It's much more sustainable to support an extensibility model where the tool itself can be extended by adding in "tools plugins".

Run Dart commend / do codegen: #13607

Generate app icon: #10387

Determining the size of an app: #13189

Customize the build: #9870
Issue 1:
Extracted from #23491 (comment)

This appears to be leaking journalctl processes originating here: https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/google/cadvisor/utils/oomparser/oomparser.go#L169

#23491 set kubelet unit files to restart just the kubelet process and this ends up orphaning and leaking journalctl processes launched by cAdvisor.

AFAIK, this behavior can leak many other processes like du, ls, mount, etc.

@kubernetes/sig-node we need to fix this.

I recommend reverting #23491 to begin with as suggested by @wwwtyro

Issue 2:
Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.10", GitCommit:"c3e367ec9eae7338ac4e2a57f293634891319b7c", GitTreeState:"clean", BuildDate:"2016-10-31T21:25:43Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}

Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.3", GitCommit:"4957b090e9a4f6a68b4a40375408fdc74a212260", GitTreeState:"clean", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/amd64"}

Environment:

NAME=Fedora

VERSION="22 (Twenty Two)"

ID=fedora

VERSION_ID=22

PRETTY_NAME="Fedora 22 (Twenty Two)"

ANSI_COLOR="0;34"

CPE_NAME="cpe:/o:fedoraproject:fedora:22"

HOME_URL="https://fedoraproject.org/"

BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Fedora"

REDHAT_BUGZILLA_PRODUCT_VERSION=22

REDHAT_SUPPORT_PRODUCT="Fedora"

REDHAT_SUPPORT_PRODUCT_VERSION=22

PRIVACY_POLICY_URL=https://fedoraproject.org/wiki/Legal:PrivacyPolicy

VARIANT="Workstation Edition"

VARIANT_ID=workstation

Linux mori.mattharris.org 4.4.14-200.fc22.x86_64 #1 SMP Fri Jun 24 21:19:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

minikube version: v0.12.2

What happened:

Merged two configs together and ran kubectl create -f newmergedfile.yml, did not error on validation when missing --- between a service and a deployment

What you expected to happen:

to create the correct pieces and error on the invalid

How to reproduce it (as minimally and precisely as possible):

kind: Service
metadata:
name: kong-app
spec:
type: NodePort
ports:
- port: 8000
targetPort: 8000
name: http
- port: 8001
targetPort: 8001
name: admin
selector:
name: kong-app

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kong-app
spec:
template:
metadata:
labels:
name: kong-app
tier: development
spec:
containers:
- name: kong-app
image: kong
env:
- name: KONG_DATABASE
value: cassandra
- name: KONG_CASSANDRA_CONTACT_POINTS
value: kong-database
ports:
- containerPort: 8000
- containerPort: 8001
- containerPort: 7946
- containerPort: 7946
protocol: UDP

apiVersion: v1
kind: Service
metadata:
name: kong-database
spec:
type: NodePort
ports:
- port: 9042
targetPort: 9042
nodePort: 30042
selector:
name: kong-database

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: kong-database
spec:
template:
metadata:
labels:
name: kong-database
tier: development
spec:
containers:
- name: kong-database
image: cassandra:2.2
ports:
- containerPort: 9042

and run create

Anything else do we need to know:

nope