WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
Examples bug report

Example name

with-ant-design

Describe the bug

Antd v4 (alpha) builds should include only actually used icons. But in with-ant-design example all 1Mb of icons are bundled.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Download and unpack two attached archives. Both contain same example but one with nextjs and one with create-react-app

Run npm i in both examples

Run npm run stats in both examples

See at icons-svg size inside @and-design. With create react app it will be about 9Kb. With nextjs it will be about 800Kb.

cra-antico4.zip

next-antico4.zip

Expected behavior

Same antd snippets should have approximately same budle size with nextjs and create-react-app

Screenshots

With next

With cra

System information

OS: MacOS

Version of Next.js: 9.1.1

Code to reproduce

Issue 2:
Bug report

Describe the bug

Importing react-dom in a page or in one of its dependent component will cause react-dom.production.min.js to be included in the page bundle, adding about 32K gzipped size to a page.

This is pretty common, examples:

ReactDOM.createPortal

react-transition-group also imports react-dom

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Go to 'pages/any-page.js'

Add import ReactDOM from 'react-dom';

In the render function, do console.log(ReactDOM). Just to use that dependency.

Production build the project and inspect the bundle size

Expected behavior

react-dom should just be in the common bundle, not included again here.

This does not happen with Next 8.

Screenshots

System information

OS: macOS

Version of Next.js: 9.0.1

Additional context

Add any other context about the problem here.
Issue 1:
Environment

Windows build number: [Version 10.0.18363.836]
PowerToys version: v0.18.1
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run

Steps to reproduce

Start PowerToys run with Austrian/German localization and try to use , as dot for calculation.

Expected behavior

Excepted that PowerToys Run gets the delimiter from the OS settings and allows to use , for austrian or german Windows and . (dot) for US.

I'm using Windows in English but have set my Regional Format to German (Austria).

Actual behavior

Nothing.

Screenshots

When you use dot, then everything works as expected:

Issue 2:
I'm using version 0.18 of PowerToys and I'm talking about the integrated calculator in PowerToys Run here:

In the german area, we use the comma and not the period as a decimal-delimiter. The current version of the calculator in PowerToys Run only accepts periods as decimal-delimiter. Please add support for the comma and auto-detect Windows settings for regional format, as the Windows regional format has a setting for this.

Thank you!
Issue 1:
Today I discovered a strange behavior: When I am writing a DataFrame with .to_excel(), it cuts columns. Compared with the same DataFrame with .to_csv() or .head(), you can see the difference, that the last 8 columns are missing.

You can reproduce this by downloading Features.pkl from here and then:

import pandas as pd
df = pd.read_pickle('Features.pkl')
df.head() # see the last 8 columns!
df.to_excel('Features.xlsx', index=False, header=False)
# see the Excel, you do not have these last 8 columns
# in a .to_csv() you have them

Funny part: If you df.ix[:,-71:].to_excel('Features.xlsx', index=False, header=False) you have one of the missing columns. If you do df.ix[:,-70:].to_excel('Features.xlsx', index=False, header=False) you have two and so on...

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.10.final.0
python-bits: 64
OS: Darwin
OS-release: 14.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: de_DE.UTF-8

pandas: 0.16.2
nose: 1.3.7
Cython: 0.22.1
numpy: 1.9.2
scipy: 0.16.0
statsmodels: 0.6.1
IPython: 3.2.0
sphinx: 1.3.1
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.4
bottleneck: 1.0.0
tables: 3.2.0
numexpr: 2.4.3
matplotlib: 1.4.3
openpyxl: 1.8.6
xlrd: 0.9.3
xlwt: 1.0.0
xlsxwriter: 0.7.3
lxml: 3.4.4
bs4: 4.3.2
html5lib: None
httplib2: 0.9
apiclient: None
sqlalchemy: 1.0.5
pymysql: None
psycopg2: None

Issue 2:
Code Sample, a copy-pastable example if possible

I often find my self doing

In [2]: df = pd.Series(index=pd.MultiIndex.from_product([['A', 'B'], ['a', 'b']]))

In [3]: df.index.get_level_values(0).unique()
Out[3]: Index(['A', 'B'], dtype='object')

Problem description

The above is very inefficient, because first a Series is built which includes a copy of the entire level (possibly using way more memory than the index itself), and only then duplicates are stripped. Other people on SO have faced the same problem, and this is also blocking a fix I wrote for #17845.

I'm pushing a simple PR in seconds.

Expected Output

Same as above, but in an efficient way.

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.5.3.final.0

python-bits: 64

OS: Linux

OS-release: 4.9.0-3-amd64

machine: x86_64

processor:

byteorder: little

LC_ALL: None

LANG: it_IT.UTF-8

LOCALE: it_IT.UTF-8

pandas: 0.21.0rc1+19.gb15d92d14

pytest: 3.0.6

pip: 9.0.1

setuptools: None

Cython: 0.25.2

numpy: 1.12.1

scipy: 0.19.0

pyarrow: None

xarray: None

IPython: 5.1.0.dev

sphinx: 1.5.6

patsy: 0.4.1

dateutil: 2.6.0

pytz: 2017.2

blosc: None

bottleneck: 1.2.1

tables: 3.3.0

numexpr: 2.6.1

feather: 0.3.1

matplotlib: 2.0.0

openpyxl: None

xlrd: 1.0.0

xlwt: 1.1.2

xlsxwriter: 0.9.6

lxml: None

bs4: 4.5.3

html5lib: 0.999999999

sqlalchemy: 1.0.15

pymysql: None

psycopg2: None

jinja2: 2.9.6

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: 0.2.1
Issue 1:
Implement change detection on properties only. (This is needed to allow work on the HTML compiler to proceed.)

Issue 2:
We would like to implement bare bones change detection so that we can unblock ourselves for other parts of the system and work on them in parallel.

https://github.com/mhevery/angular/blob/master/modules/change_detection/src/watch_group.js

https://github.com/mhevery/angular/blob/master/modules/change_detection/src/record.js

I would love to get a very simple change detection going which can only watch simple properties such as foo or bar ie no (foo.bar or foo().bar or anything of that sort)

We should be able to implement this without the need for parser.

class Person {
var age;
}

var person = new Person();
var pwg = new ProtoWatchGroup();
pwg.watch('age');
var wg = pwg.instantiate();
wg.setContext(person);
var cd = new ChangeDetection(wg);
cd.detectChanges();

Make this test pass:

angular/modules/change_detection/test/change_detection_spec.js

Line 9
in
69210e4

it('should do simple watching', function() {
Issue 1:
Hi, I am new to SVM and get a little confused when using SVC:

In the document, its description says

The multiclass support is handled according to a one-vs-one scheme.

while in input argument fields, it says

decision_function_shape : ‘ovo’, ‘ovr’, default=’ovr’

I personally tried both ovo and ovr with linear kernel, expected to get a large difference in training time, but got similar result. My data consists of 1694 classes with 512 features, and N instances per class (N=1~10). Theoretically, I expect the difference between O(n) and O(n^2) is significant.

Is SVC by default uses ovr, but is fixed to use ovo when applying multi-class scenario? Changing decision_function_shape seems not working.

Issue 2:
The docs should probably state more cleary that decision_function_shape in SVC doesn't influence the multi-class strategy used in SVC but is only a hack to satisfy the sklearn API - and it should probably explain there or in the dev docs how it is done.
Issue 1:
I'm requesting we reconsider the unconditional use of "urllib3.contrib.pyopenssl.inject_into_urllib3()".

Added 7 years ago, the goal was to "add SNI support for Python 2" #749

"urllib3.contrib.pyopenssl.inject_into_urllib3()" is described to "Monkey-patch urllib3 with PyOpenSSL-backed SSL-support.": (https://github.com/urllib3/urllib3/blob/master/src/urllib3/contrib/pyopenssl.py)

Request justification:

1: Security/stability: Monkey patching to swap out standard library use for a 3rd party library should arguably be more surgical, especially for ssl. If the patch is for support in Python2, then at least check for a major version. Or even better, check if SNI support is already present ssl.HAS_SNI.

2: Unnecessary: As of Dec. 10, 2014, the entirety of Python 3.4's ssl module has been backported for Python 2.7.9. See PEP 466 for justification. https://www.python.org/downloads/release/python-279/. This enables SNI support in the standard library for > v2.7.9

3: Inflexible: As implemented, there is no way to disable this behavior. The only option to prevent requests use of pyopenssl context is to uninstall pyopenssl for my entire python environment.

Summary.

@WhyNotHugo

Issue 2:
Requests added the requests[security] dependency many, many years ago because the ssl module in Python's stdlib was lacking some features. Since PEP 466 has been implemented in Python 2.7.9, the ssl module supports hostname verification and SNI. 2.7.9 was released in 2014. Python 3.7.0 improved the situation even further by delegating hostname verification to OpenSSL. The PyOpenSSL compatibility layer in urllib3 uses the deprecated ssl.match_hostname function or a backport.

Unconditional monkey-patching of urllib3 with urllib3.contrib.pyopenssl.inject_into_urllib3 is causing issues, too.

PyOpenSSL uses dynamic libffi callbacks (also known as cffi old-style callbacks). The callbacks are implemented with trampolines and dynamic creation of native machine code. This either uses executable and writeable memory pages or some hacks with shared mmap() regions. Dynamic callbacks are a security risk and blocked by security frameworks like SELinux for good reasons (deny_execmem). Armin Rigo and I explored various ways to work around these problems, but there is simply solution. Eventually Armin implemented a new callback system for cffi. Some of the issues with old callbacks are documented at https://cffi.readthedocs.io/en/latest/using.html#callbacks-old-style .

PyOpenSSL currently pulls in a versions of cryptography, which itself depends on asn1crypto. A problem with asn1crypto and ctypes causes Python to segfault on recent macOS, pyca/pyopenssl#874 and wbond/asn1crypto#158 .

Due to bugs like https://bugzilla.redhat.com/show_bug.cgi?id=1535689 I convinced the Fedora and RHEL maintainers to patch requests and drop inject_into_urllib3 a while ago. The distros have been running with patch https://src.fedoraproject.org/rpms/python-requests/blob/master/f/Don-t-inject-pyopenssl-into-urllib3.patch for over a year without any reported issues.

I propose to:

Remove requests[security] extra requires.

Remove unconditionally monkey-patch of urllib3 from requests.
Issue 1:
Szczepan Kuzniarz opened SPR-6268 and commented

In the following example:

package test
@Controller
class TestController {
@RequestMapping(value = "/testGroovy.do", method = RequestMethod.GET)
public String handler(HttpServletRequest request) {
return "success"
}
}

<context:annotation-config/>
<context:component-scan base-package="test"/>
<lang:groovy script-source="classpath:test/TestController.groovy" refresh-check-delay="1000"/>

<servlet>
<servlet-name>test</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>test</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

DefaultAnnotationHandlerMapping class discovers the Groovy controller and registers a handler as it logs:

INFO: Mapped URL path [/testGroovy.do] onto handler [test.TestController@134237]

but accessing such a controller causes ServletException:

javax.servlet.ServletException: No adapter for handler [test.TestController@134237]: Does your handler implement a supported interface like Controller?
org.springframework.web.servlet.DispatcherServlet.getHandlerAdapter(DispatcherServlet.java:992)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:780)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:726)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:636)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:545)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

I'm not 100% sure, but it seems AnnotationMethodHandlerAdapter.getMethodResolver is unable to determine proper type of the handler. It uses ClassUtils.getUserClass (which returns proxy as a type) but for Groovy script the right type is it's MetaClass (getMethodResolver should use something like ((groovy.lang.GroovyObject) handler).getMetaClass().getTheClass()).

Maybe the problem with Groovy scripts is more general, and not limited to a MVC controller case?

Affects: 3.0 RC1

Issue Links:

#15317 lang:groovy tag in version 2.5 and higher doesn't work for refreshable Spring MVC endpoints

#10419 AspectJ pointcut advisors are not working with Groovy script beans

Referenced from: commits 64fd0b0, 8e35734

1 votes, 4 watchers

Issue 2:
Naresh Narayana opened SPR-5749* and commented

It seems that AOP is not working for Groovy beans.

Affects: 2.5.6

Reference URL: http://forum.springsource.org/showthread.php?t=71389

Attachments:

testProject.zip (10.75 kB)

Issue Links:

#10935 Annotated Groovy controllers don't work properly

Referenced from: commits bd0f68d

1 votes, 3 watchers
Issue 1:
I've pulled together a list of questionable licenses that license scanners will pick up for Airflow. Ideally we should look to remove the dependencies from the project.

Project
License
PR

astroid
LGPL-3.0

certifi
MPL-2.0

chardet
LGPL-2.1

JayDeBeApi
LGPL-3.0

ldap3
LGPL-3.0

mysql-connector-python
GPL-3.0

paramiko
LGPL-3.0

pathspec
MPL-2.0

psycopg2-binary
LGPL-3.0

pycountry
LGPL-2.1

PyGithub
LGPL-3.0

pymssql
LGPL-3.0

PySmbClient
GPL-3.0

pytest-rerunfailures
MPL-2.0

text-unidecode
Artistic-2.0

Unidecode
GPL-3.0
#10665

yamllint
GPL-3.0

Issue 2:
We need to avoid GPL.

Apache 2 software can therefore be included in GPLv3 projects, because the GPLv3 license accepts our software into GPLv3 works. However, GPLv3 software cannot be included in Apache projects. The licenses are incompatible in one direction only, and it is a result of ASF’s licensing philosophy and the GPLv3 authors’ interpretation of copyright law.

Snyk is reporting the following dependencies in our requirements.txt for python 3.6, 3.7, 3.8 are GPL v3:

jaydebeapi v1.2.3

mysql-connector-python v8.0.18

pysmbclient	v0.1.5

unidecode v1.1.1

yamllint v1.23.0

I see some previous discussion + mitigation for unidecode but not all of these.
Issue 1:
when added into the vertices PointCloud new vertices,

adding occurs,

because: in function setParticleBuffers

When copying in vertexArray of vertices,

not all vertices are copied,

because:

vertexArray declared as Float32Array and Float32Array does not resize

so I suggest:

in function setParticleBuffers when length of vertices not equal number of vertices in PointCloud

re-create all the necessary Float32Array

, and to make such changes

function setParticleBuffers(geometry, hint, object) {

"+" if (geometry.__webglParticleCount !== geometry.vertices.length)

"+" initParticleBuffers(geometry, object);

var v, c, vertex, offset, color,

Issue 2:
Description of the problem

This form is for three.js bug reports and feature requests only.

This is NOT a help site. Do not ask help questions here.

If you need help, please use the forum or stackoverflow.

Describe the bug or feature request in detail.

Are there any plans to port the three.js library to WebGL 2.0?

Always include a code snippet, screenshots, and any relevant models or textures to help us understand your issue.

Please also include a live example if possible. You can start from these templates:

jsfiddle (latest release branch)

jsfiddle (dev branch)

codepen (latest release branch)

codepen (dev branch)

Three.js version

Dev

r97

...

Browser

All of them

Chrome

Firefox

Internet Explorer

OS

All of them

Windows

macOS

Linux

Android

iOS

Hardware Requirements (graphics card, VR Device, ...)

Are there any plans to port the three.js library to WebGL 2.0?
Issue 1:
It would be nice if http://flask.pocoo.org/docs/0.12/deploying/mod_wsgi/ and hence flask/docs/deploying/mod_wsgi.rst sported some information on Python 3's venv virtual environment:

The information needed to deploy with venvis available here:

https://modwsgi.readthedocs.io/en/develop/user-guides/virtual-environments.html

Basically no activate_this-code is needed in the .wsgi file, just WSGIDaemonProcess myapp python-home=/usr/local/venvs/myapp in your httpd/apache config.

I'll draft something to merge if you think it is a good idea, otherwise this will have to serve as reference.

Issue 2:
It says in the documentation (the last section - "Working with Virtual Environments"):

For Python 3 add the following lines to the top of your .wsgi file:

activate_this = '/path/to/env/bin/activate_this.py'
with open(activate_this) as file_:
exec(file_.read(), dict(__file__=activate_this))

However activate_this.py is no longer present in pyvenv (see http://bugs.python.org/issue21496), thus the above code doesn't work. I found a stackoverflow answer where it said that just copying activate_this.py from a 2.7 virtualenv might work, however I didn't go down that route.

How I managed to get it working:

I added WSGIPythonHome /path/to/env to the top level of my apache config (ie. outside of VirtualEnv). However that might be a little to big of a hammer if people want to run multiple applications in the same Apache instance. In that case setting python-path on WSGIDaemonProcess might work (however I didn't try it out).
Issue 1:
It seems that whitespace in a character array is treated as if it is zero. An example of this is shown below with details about the environment. This seems to match up with how character arrays work. Still this seems a bit surprising from a Python perspective. Am trying to understand if this is intentional and also if there is an builtin element-wise operator that we can use to reproduce this behavior.

Code snippet:

In [1]: import numpy as np

In [2]: s = np.array(list("hello world"))

In [3]: s
Out[3]:
array(['h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd'],
dtype='|S1')

In [4]: s.nonzero()
Out[4]: (array([ 0, 1, 2, 3, 4, 6, 7, 8, 9, 10]),)

Environment:

name: np2
channels:
- conda-forge
- defaults
dependencies:
- appnope=0.1.0=py27_0
- backports.shutil_get_terminal_size=1.0.0=py27_1
- blas=1.1=openblas
- ca-certificates=2017.4.17=0
- certifi=2017.4.17=py27_0
- decorator=4.1.1=py27_0
- enum34=1.1.6=py27_1
- ipython=5.4.1=py27_0
- ipython_genutils=0.2.0=py27_0
- libgfortran=3.0.0=0
- ncurses=5.9=10
- numpy=1.13.1=py27_blas_openblas_200
- openblas=0.2.19=2
- openssl=1.0.2l=0
- pathlib2=2.3.0=py27_0
- pexpect=4.2.1=py27_0
- pickleshare=0.7.3=py27_0
- pip=9.0.1=py27_0
- prompt_toolkit=1.0.14=py27_0
- ptyprocess=0.5.2=py27_0
- pygments=2.2.0=py27_0
- python=2.7.13=1
- readline=6.2=0
- scandir=1.5=py27_1
- setuptools=36.2.2=py27_0
- simplegeneric=0.8.1=py27_0
- six=1.10.0=py27_1
- sqlite=3.13.0=1
- tk=8.5.19=1
- traitlets=4.3.2=py27_0
- wcwidth=0.1.7=py27_0
- wheel=0.29.0=py27_0
- zlib=1.2.11=0
- pip:
- backports.shutil-get-terminal-size==1.0.0
- ipython-genutils==0.2.0
- prompt-toolkit==1.0.14

Issue 2:
The following table shows the extents of the problem

x : str
sc = np.str_(x)
arr = np.array(x, np.str_)

x
bool(x)
bool(sc)
bool(arr[()])
bool(arr)
sc.astype(bool)

''
False
False
False
False
ValueError

'\0'
True
True
False
False
ValueError

' '
True
True
True
False
ValueError

' \0'
True
True
True
False
ValueError

'0'
True
True
True
True
False

'1'
True
True
True
True
True

'\0 '
True
True
True
True
ValueError

' \0 '
True
True
True
True
ValueError

def call_or_exc(f):
try:
return f()
except Exception as e:
return e

def truthiness(x):
x_arr = np.array(x)
x_sc = np.unicode_(x)
x_sc2 = x_arr[()]
return bool(x), bool(x_sc), bool(x_sc2), bool(x_arr), call_or_exc(lambda: x_sc.astype(bool))

def fmt(x):
if isinstance(x, str): return repr(x).replace(r'\x00', r'\0')
if isinstance(x, Exception): return type(x).__name__
return repr(x)

print(' | '.join("`{}`".format(x) for x in ['x', 'bool(x)', 'bool(sc)', 'bool(arr[()])', 'bool(arr)', 'sc.astype(bool)']))
print(' | '.join(['--'] * 6))
for val in ['', '\0', ' ', ' \0', '0', '1', '\0 ', ' \0 ']:
print(' | '.join("`{}`".format(fmt(x)) for x in (val,)+truthiness(val)))

Generated with...

The differences come down to:

bool(arr[()]) - indexing string arrays causes trailing nulls to be truncated. This is unavoidable.

bool(arr) - has special handling to treat spaces as falsy. This seems unpythonic, since that's not how str.__bool__ behaves - are we stuck with it

arr.astype(bool) - treated as arr.astype(int).astype(bool), which seems bizarre
Issue 1:
From @Zanthras on 2016-08-09T18:06:24Z

ISSUE TYPE

Bug Report

COMPONENT NAME

networking/ios_config

ANSIBLE VERSION

ansible 2.1.0.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides

CONFIGURATION

Fully default

OS / ENVIRONMENT

Ansible is running off a RHEL6.8 system

SUMMARY

IOS_config "replace: block" does not replace the block when there are no parents defined.

STEPS TO REPRODUCE

Existing config:

access-list 1 remark #### This line will be sent ####

access-list 1 remark ### This line wont be sent ###

tasks:
- name: Block replace failure
ios_config:
provider: "{{ provider }}"
authorize: yes
replace: block
match: line
lines:
- "access-list 1 remark ### This line will be sent ###"
- "access-list 1 remark ### This line wont be sent ###"
before:
- "no access-list 1"

EXPECTED RESULTS

access-list 1 remark ### This line will be sent ###

access-list 1 remark ### This line wont be sent ###

ACTUAL RESULTS

access-list 1 remark ### This line will be sent ###

Copied from original issue: ansible/ansible-modules-core#4368

Issue 2:
ISSUE TYPE

Bug Report

COMPONENT NAME

apt_repository_module

ANSIBLE VERSION

ansible 2.1.1.0

OS / ENVIRONMENT

Ubuntu 14.04

SUMMARY

I tried to add ppa on ubuntu 14.04 server but getting "invalid repository" error. But when I try to add it from the server cli, it works fine.

- name: Add PHP repo
apt_repository:
repo: 'ppa:ondrej/php'

Error output

fatal: [ip]: FAILED! => {"changed": false, "failed": true, "msg": "Invalid repository string: ppa:ondrej/php"}