WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Here is a small test program to demonstrate the bug:

import requests

url = "http://lohas.pixnet.net/blog"
r = requests.get(url)
iter_lines = [line for line in r.iter_lines(chunk_size=7, decode_unicode=False)]
split_lines = r.content.splitlines()
for index, (iline, sline) in enumerate(zip(iter_lines, split_lines)):
if iline != sline:
print("line {} is broken".format(index))
print(iline, len(iline))
print(sline, len(sline))
break

Expected behavior:

r.iter_lines() should give the same result as r.content.splitlines()

Actual behavior:

The test program generates the following output:

line 275 is broken
b'' 0
b'\t\t\t<tbody>' 10

Changing chunk_size can break different lines.

Issue 2:
I'm using a proxy that requires authentication to send request that receives 302 response with Location header. I would like python.requests to follow this redirect and make request via proxy with specified credentials. But it seems like this doesn't happen, if I provide credentials in HTTPProxyAuth they will work ok for 200 responses but will fail for 302. See below code sample:

import requests
from requests.auth import HTTPProxyAuth

sess = requests.Session()
url1 = 'http://httpbin.org/'
url2 = 'http://httpbin.org/redirect/2'
auth = HTTPProxyAuth('frank', 'hunter2')
proxies = {
"http": "http://localhost:9000"
}
response1 = sess.get(url1, proxies=proxies, auth=auth)
response1.raise_for_status()
response2 = sess.get(url2, proxies=proxies, auth=auth)
response2.raise_for_status()

Now launch MITM proxy on localhost

> mitmproxy -p 9000 --singleuser=frank:hunter2

This fails with 407 for me, and proxy logs only two requests

response2.raise_for_status()
File "----------", line 862, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 407 Client Error: Proxy Authentication Required for url: http://httpbin.org/relative-redirect/1

>> GET http://httpbin.org/
← 200 text/html 11.87kB 3.57MB/s
GET http://httpbin.org/redirect/2
← 302 text/html 247B 76.59kB/s

it does not log request to Location.

I see that putting credentials in proxies dictionary somehow fixes this issue when I use MITM proxy but it doesn't fix it for my production proxy (can't share code or proxy details here, need to check closer why it doesn't work for my proxy). I guess some details in setup of proxies might vary.

Is this a bug? I see some issues for proxy auth but they are mostly about HTTPS, not sure if someone reported this thing I describe here. Should this be fixed?

EDIT:

It looks like this always fails if proxy password is empty string.

change auth to

auth = HTTPProxyAuth('frank', '')

proxies = {
"http": "http://frank:@localhost:9000"
}

will now always fail on redirect.

auth = HTTPProxyAuth('frank', 'hunter2')
proxies = {
"http": "http://frank:hunter2@localhost:9000"
}

works fine on redirects, but seems somewhat duplicated.

I noticed this on Ubuntu 14.04, requests 2.11.1, python 2.7.6, mitmproxy 0.10.1
Issue 1:
When I try to start program using command

sudo npx react-devtools

I get error

/usr/local/lib/node_modules/react-devtools/node_modules/electron/index.js:14
throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again')
^

Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
at getElectronPath (/usr/local/lib/node_modules/react-devtools/node_modules/electron/index.js:14:11)

Even I install react-devtools localy by sudo npm install -g react-devtools and after start program by sudo react-devtools, get the same error.

Any idea how to fix this?

Linux Mint 20 Cinnamon

react-devtools Version 4.8.2

Issue 2:
I use systemJs to load a system module in a react project, the module include some react function component use react hooks。

and react project get Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons

React version: 17.0.2

Steps To Reproduce

git clone git@github.com:ytudt/react-systemjs.git

cd base-components npm install && npm run start

cd base-projects npm install && npm run start

open http://localhost:3000/ in the default browser

Link to code example:

https://github.com/ytudt/react-systemjs

The current behavior

Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:

The expected behavior

expected run ok
Issue 1:
DoctrineAbstractBundle contains only the base DI extension used by all Doctrine_Bundles. It was a good idea when we had all bundles in the core but it seems wrong now that they are in different repos, updated at different time. A change in it is likely to break another Doctrine_Bundle as the testsuite does not check this for us to make us update them. So these bundles may easily become broken because of an internal change in DoctrineBundle (like what occurred in 3ca1ccb for instance).

The bad thing about it would be some code duplication between the different bundles. @fabpot @jwage @beberlei @lsmith what do you think about it ?

Btw, the DoctrineBundle DI extension should probably be refactored to use abstract service definitions instead of defining full services in PHP in the extension. It would make it smaller (but this feature was introduced in the DI component after writing DoctrineBundle). I will add it on my todo-list so it is the right time to choose whether we keep the DoctrineAbstractBundle or no (one refactoring is better than two).

Issue 2:
I think we should change YamlExtension::dump method to return $this->encode($value); in the end because it does not output boolean values as string. If a parameter attribute in the request contains the value false or true (for example _template_streamable) in the Profiler application, the result will be an empty string. Of course, we expect to have the string false or true displayed according to the value in the _template_streamable attribute (or whatever request boolean attribute).

If we force a string value containing special characters to be encoded in Yaml, the output in the Profiler will be appended and prepended with single quotes like this:

Before:

Acme\DemoBundle\Controller\DemoController::helloAction

After:

'Acme\DemoBundle\Controller\DemoController::helloAction'

Maybe we can also leave the return statement as is and add this at the beginning of the method:

if (is_bool($value)) {
return (true === $value) ? 'true' : 'false';
}

But it's a duplication of code of what we have in the Symfony\Component\Yaml\Inline::dump method.

So my two questions are:

Should we return $this->encode($value) at the end of the YamlExtension::dump method or should we simply add a test on boolean values at the top of this method to return the strings false or true?

On which branch should we apply the patch?

Thanks.
Issue 1:
Version

2.6.11

Reproduction link

https://codesandbox.io/s/quirky-sid-198zy

Steps to reproduce

change state in deactivated hook

What is expected?

DOM should not be a re-rendered.

What is actually happening?

DOM is re-rendered.

When I change state in beforeDestroy hook, DOM is not re-rendered. However if I do the same thing in deactivate hook, DOM is re-rendered for a second, then move to the other route. I think It's definitely a bug.

Issue 2:
Version

2.6.11

Reproduction link

https://github.com/Robin-Hoodie/vue-test-project

Steps to reproduce

vue create test-project (choose default preset with babel/eslint)

Add src/index.js file which exports generated HelloWorld component export * from ./components/HelloWorld.vue

Create vue.config.js file and add webpack-bundle-analyzer plugin to webpack config (this is just to inspect the bundle size)

Change build command to vue-cli-service build --target lib --name test-project src/index.js

Run yarn build

Inspect generated dist/report.html file

Notice @vue/cli-service/lib/commands/build is included in bundle

What is expected?

Since @vue/cli-service is a devDependency I do not expect anything of this dependency to be included in the output bundle

What is actually happening?

@vue/cli-service/lib/commands/build is included in the output bundle

I am developing a component library for internal use. I noticed the bundle was quite big and upon inspecting the output I noticed the @vue/cli-service/lib/commands/build was being included.

I had already added quite a lot of components, which may be the cause for that dependency taking in a lot more space than in the test project I created (34.63 KB gzipped vs 1.25 KB gzipped)
Issue 1:
I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

When a textfield is focused, only that and the one that got blurred (if any) should be repainted

Current Behavior

When a textfield is focused, all following textfields on that page is repainted

Steps to Reproduce (for bugs)

Have a page with multiple textfields, for example https://material-ui.com/demos/text-fields/

Use dev tools to see which parts of the page is repainted. For example Chromes "paint flashing" or "layer boarders"

Focus a textfield

Context

This is not a huge problem but it does add some extra cost and I have noticed a bit of slowdowns on a phone which would be nice to crush.

I have not tested but my theory is that the line

https://github.com/mui-org/material-ui/blob/e49ce4f7c2df242062fe46a2f3aeb30f78a01ef1/src/Input/Input.js#L453 should be covered by an if-statement to only set state (and therefor rerender) if focused is already false

Your Environment

Tech
Version

Material-UI
1.0.0-beta.21

React
16

browser
Firefox, Chrome

etc

Issue 2:
Style broken on selected date

As the screenshot from Safari, i found that the top value of element is '10px' so the element rendered a wrong position
## Versions

Material-UI: v0.15.0-alpha.2

React:

Browser: Safari Version 9.1 (10601.5.17.4)
Issue 1:
http://getbootstrap.com/javascript/#modals

Is there a way for scroll bar not to take the space of the page?

Just like the normal page

Issue 2:
When launching the modal component (http://getbootstrap.com/javascript/#modals) the entire content will slightly move to the left on mac OS (haven't tried it on windows yet). With the active modal the scrollbar seem to disappear, while the content width still changes.

You can observer the problem on the bootstrap page
Issue 1:
TypeScript Version:

1.7.5 / 1.8.0-beta / nightly (1.9.0-dev.20160217)

Code

class A{
public static get foo(){
return alert("should not execute getter, without accessing it !");
}
}
class B extends A {}

Expected behavior:

Should not alert message above

Actual behavior:

Alerting message above

Link to Playground

Issue 2:
The following code:

var i = 0, j = 0;

class Base {
get instanceAccessor() { return ++i; }
static get staticAccessor() { return ++j; }
toString = () => 'instance: ' + this.instanceAccessor + ' static: ' + Base.staticAccessor;
}

class Derived extends Base {
toString = () => 'instance: ' + this.instanceAccessor + ' static: ' + Derived.staticAccessor;
}

console.log('Base:\n%s\n%s\n%s', new Base(), new Base(), new Base());
console.log('Derived:\n%s\n%s\n%s', new Derived(), new Derived(), new Derived());

generates the following output (with the v1.3 compiler):

Base:
instance: 1 static: 2
instance: 2 static: 3
instance: 3 static: 4
Derived:
instance: 4 static: 1
instance: 5 static: 1
instance: 6 static: 1

Clearly Derived.staticAccessor is no longer an accessor, but a 'snapshot' of the value of Base.staticAccessor when the Derived constructor function called __extends.

Just wondering if this is the expected/correct behaviour?

PS. I haven't run into this problem 'in the wild' as I rarely use classes or accessors, but merely came across a rant/blog post about another compile-to-JS language doing something similar, and was curious how TypeScript handled it.
Issue 1:
Symfony Standard Edition v2.1.2

While looking at some of the form input options, I found an odd problem. When creating a birthday input using a range above 110 (such as the default of 120), any choices above (date('Y') - 110) aren't being displayed even though an option element is being created. Is anyone else having this problem?

public function indexAction() {
$form = $this->createFormBuilder()
->add('birthday', 'birthday')
->add('birthday_working', 'birthday', array(
'years' => range(date('Y') - 110, date('Y')),
))
->getForm();

// Template is the basic form template from the book
return $this->render('ABCDefaultBundle:Default:default.html.twig', array(
'form' => $form->createView(),
));
}

<div id="form_birthday">
<select id="form_birthday_year" name="form[birthday][year]" required="required">
<option value="1892"></option>
<option value="1893"></option>
<option value="1894"></option>
<option value="1895"></option>
<option value="1896"></option>
<option value="1897"></option>
<option value="1898"></option>
<option value="1899"></option>
<option value="1900"></option>
<option value="1901"></option>
<option value="1902">1902</option>
<option value="1903">1903</option>
<option value="1904">1904</option>

... and so on.

Issue 2:
IntlDateFormatter have some issues in transformation of Date.

$fmt = new IntlDateFormatter('en_US', IntlDateFormatter::SHORT, IntlDateFormatter::SHORT, 'UTC', IntlDateFormatter::GREGORIAN, 'yyyy');

$value = new DateTime();
$value->setDate(1900, 1, 1);

var_dump($fmt->format($value));

Expected: string '1900'

Actual: boolean false

Since Date widget base on this formatter, by default it only display years in range 1902-2037.
Issue 1:
Environment

Windows build number:
Microsoft Windows [Version 10.0.18362.267]

Windows Terminal version (if applicable):
Windows Terminal (Preview)
Version: 0.3.2142.0

Any other software?
None

Steps to reproduce

Start terminal. Resize. I pretty consistently get a crash when I get to about the point of the single tab going to zero width.

Start terminal. Add multiple tabs. Resize. I get crashes when the third tab starts to slide under the new tab UI.

Sometimes you can shrink all the way down and back. Sometimes you can shrink all the way down, and it'll crash as it is being expanded.

Expected behavior

Window resizes without crash

Actual behavior

Here's one of the entries from my event log.

Faulting application name: WindowsTerminal.exe, version: 1.0.1908.2002, time stamp: 0x5d448424
Faulting module name: Windows.UI.Xaml.dll, version: 10.0.18362.267, time stamp: 0x3e916038
Exception code: 0xc000027b
Fault offset: 0x00000000007126f0
Faulting process id: 0x2fa8
Faulting application start time: 0x01d54c269fed96bb
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_0.3.2142.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
Report Id: 985f1c17-14dc-45a2-9bf2-2e663574efa9
Faulting package full name: Microsoft.WindowsTerminal_0.3.2142.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App

Here's the feedback hub entry, which should have dx attached to it:

https://aka.ms/AA5roli

Issue 2:
Environment

https://github.com/microsoft/terminal/issues

Steps to reproduce

Open Command Prompt - i.e. run cmd

Open Properties | Options - remove check from 'Use Legacy console' - switch OFF

Close Command Prompt

Open Command Prompt - i.e. run cmd

Open Properties | Options - add check from 'Use Legacy console' - switch ON

Close Command Prompt

Open Command Prompt - i.e. run cmd

Expected behavior

All properties of the terminal should be the same as before step 2. That is to say restoring the 'Use Legacy console' property in step 5 should restore the state of the terminal to what it was before the property was changed.

Actual behavior

After restoring the 'Use Legacy console' to OFF the terminal window is blank because the terminal colours have not been correctly restored to their previous state - both foreground and background are black. Similarly the cursor color is black rather than inverse colour.
Issue 1:
Do you want to request a feature or report a bug?

Bug

What is the current behavior?

Adding NamedModulesPlugin to a project that uses certain global lookups results in what are effectively reference errors.

If the current behavior is a bug, please provide the steps to reproduce.

Add NamedModulePlugins to https://github.com/shakacode/bootstrap-loader/blob/master/examples/basic/webpack.dev.config.js (which uses jquery & bootstrap. Resulting Error).

https://github.com/eggheadio/egghead-ui/blob/master/src/components/Icon/index.js#L65 also breaks with keys being declared not a function.

What is the expected behavior?

That global lookups work.

If this is a feature request, what is motivation or use case for changing the behavior?

Compatibility with other libraries.

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

webpack: 2.2.1

Issue 2:
Adding NamedModulesPlugin to the webpack config somehow removes jquery aliases from the global namespace. Results in the following Bootstrap Utils error:

Uncaught TypeError: Cannot set property 'emulateTransitionEnd' of undefined
at setTransitionEndSupport (webpack:///./\~/bootstrap/js/dist/util.js?./\~/exports-loader?Util:88)
at eval (webpack:///./\~/bootstrap/js/dist/util.js?./\~/exports-loader?Util:146)
at Object.eval (webpack:///./\~/bootstrap/js/dist/util.js?./\~/exports-loader?Util:149)
at eval (webpack:///./\~/bootstrap/js/dist/util.js?./\~/exports-loader?Util:155)
at Object../node_modules/exports-loader/index.js?Util!./node_modules/bootstrap/js/dist/util.js (vendor-client-bundle.js:5770)
at \_\_webpack_require\_\_ (vendor-client-bundle.js:692)
at fn (vendor-client-bundle.js:111)
at eval (webpack:///./~/bootstrap/js/dist/alert.js?:185)
at Object../node_modules/bootstrap/js/dist/alert.js (vendor-client-bundle.js:922)
at \_\_webpack_require\_\_ (vendor-client-bundle.js:692)
Issue 1:
Migrated issue, originally created by Johannes Erdfelt (@jerdfelt)

sqlite treats unique indexes and unique constraints as distinct entities. However, only indexes are reflected and unique constraints aren't.

This is different than mysql (which aliases unique constraints to a unique index) and postgresql (which has distinct unique indexes and unique constraints).

The attached script shows the problem.

Attachments: test_reflection.py | postgres.dump | sqlite.dump

Issue 2:
Describe the use case

Postgresql supports domains using the CREATE DOMAIN and DROP DOMAIN commands. A domain is a data type with additional constraints -- for example, an email address is a specific kind of string, so you can use a domain to define a type that only accepts strings that are correctly formatted as email addresses.

I would like to be able to define and manage domains using SQLAlchemy, in the same kind of way that I am already able to define and manage enums with SQLAlchemy.

Databases / Backends / Drivers targeted

Postgresql only. As far as I can tell, no other database that SQLAlchemy supports, supports domains.

Example Use

import sqlalchemy as sa

Email = Domain(
name="email",
data_type=sa.Text,
constraint=sa.CheckConstraint(r"VALUE ~ '[^@]+@[^@]+\.[^@]+'"),
)
t1 = sa.Table(
"table",
metadata,
sa.Column("id", sa.Integer, primary_key=True),
sa.Column("email", Email),
)

Additional context

No response
Issue 1:
Sick of every time I open Atom having to update stuff...

Issue 2:
Saw an Atom update, closed Atom to get it. Relaunched Atom from the Terminal:

[master] ~/Development/ $ atom .
LSOpenURLsWithRole() failed for the application /Applications/Atom.app with error -10810.

I guess that means: "I'm still downloading! Be patient!" It'd be nice if the message clarified that a bit. Maybe with something relevant like "Fetching necessary valence electrons, please wait a moment." I'll leave the science jokes to you.

Somewhat related, I then had to hit atom . one more time to get it to open. I either shouldn't have to do this (i.e. Atom remembers there's a pending atom command and launches after it's done downloading), or, the release notes provides a button that says "download and restart."
Issue 1:
Is this a request for help? (If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.):

What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.):

created API client, waiting for the control plane to become ready

Related to or a similar discussion happened @ #33544

** BUG REPORT ** (choose one):

Kubernetes version (use kubectl version):

kubectl version

Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.0", GitCommit:"a16c0a7f71a6f93c7e0f222d961f4675cd97a46b", GitTreeState:"clean", BuildDate:"2016-09-26T18:16:57Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}

kubeadm version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-alpha.0.1534+cf7301f16c0363-dirty", GitCommit:"cf7301f16c036363c4fdcb5d4d0c867720214598", GitTreeState:"dirty", BuildDate:"2016-09-27T18:10:39Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}

Environment:

Cloud provider or hardware configuration:

Virtual box, vagrant 1.8.1, bento/ubuntu-16.04, 1.5GB RAM, 1 CPU

OS (e.g. from /etc/os-release):

Distributor ID: Ubuntu

Description: Ubuntu 16.04.1 LTS

Release: 16.04

Codename: xenial

Kernel (e.g. uname -a):

Linux vagrant 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Install tools:

Others:

What happened:

As I try to run kubeadm init, it hangs with

root@vagrant:~# kubeadm init

<master/tokens> generated token: "eca953.0642ac0fa7fc6378"
<master/pki> created keys and certificates in "/etc/kubernetes/pki"
<util/kubeconfig> created "/etc/kubernetes/kubelet.conf"
<util/kubeconfig> created "/etc/kubernetes/admin.conf"
<master/apiclient> created API client configuration
<master/apiclient> created API client, waiting for the control plane to become ready

What you expected to happen:

The command should have succeeded thereby downloading and installing the cluster database and “control plane” components

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

Download and install docker on Ubuntu 16.04 by following https://docs.docker.com/engine/installation/linux/ubuntulinux/

Follow http://kubernetes.io/docs/getting-started-guides/kubeadm/ to install kubernete

Anything else do we need to know:

Issue 2:
Namespace entity, as other entities, contains ObjectMeta (metadata), which contains in turn also a namespace property, which is :

a. duplication of information

b. can be updated to a completely different value than the namespace it's in.

so imho this is a bug and can cause inconsistency and confusion.
Issue 1:
Using the shortcuts for copying and pasting text selections duplicates the last selected

character to the beginning of the newly inserted line.

using copy shortcut and paste from the menu works fine

using copy from the menu and paste shortcut even prepends the last character of the selected line to the new one.

Plattform:

Ubuntu 14.04 64bit

$uname -a
Linux mindcrime 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Atom Version 0.95.0-7cdaaf2

Issue 2:
When editing files over an sshfs connection, it takes long periods of time to perform basic actions (directory expansion, file opening). This is likely because git is running locally, but querying a remote repository many times -- can these behaviors be migrated into a non-blocking request? e.g., allow the file to open before the git repo has been read for any changes.