WhereIsAI/github-issue-similarity huggingface dataset:
Issue 1:
In documentation it is written:

Plugins run before Presets.
Plugin ordering is first to last.
Preset ordering is reversed (last to first).

I wrote my own plugin which works with const and let. It works good, but when I use "es2015" preset, my plugin does not work because all const and let become var. Why does my plugin run after presets?

Here is my babel config:

{
"presets": [
"es2015"
],
"plugins": [
"./babel-plugin-transform-const-name"
]
}

And I use "babel-cli": "^6.18.0"

Issue 2:
Issue originally made by @kaigth

Bug information

Babel version: 6.1.18

Node version: 5.0.0

npm version: 3.3.9

Input code

npm pre-reqs "5.0.0"

"babel": "^6.1.18",
"babel-core": "^6.1.21",
"babel-loader": "^6.2.0",
"babel-plugin-transform-runtime": "^6.1.18",
"babel-polyfill": "^6.1.19",
"babel-preset-es2015": "^6.1.18",
"babel-preset-stage-0": "^6.1.18",
"babel-runtime": "^6.1.21"

webpack: "^1.9.7"

loaders: [
{
test: /\.js$/,
exclude: /node_modules|public|app\/vendor/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'stage-0']
}
}
]

top of app:

require('babel-polyfill');

export default class someClass {
constructor() {
}

async _loadData() {
try {
const response = await this._loadJSON('content');
console.log(response);
} catch (error) {
throw error;
}
}
}

Description

Seems to be a dependency issue with the 2015 transform classes module when running npm 3 or greater. The error regeneratorRuntime is not defined occurs. Seems it's not loading the runtime sub dependency properly. Issue goes away when rolling back to "babel-plugin-transform-es2015-classes": "6.1.21" in npm while still using the latest babel.

Sorry for the lack of clarification. The issue happens when exporting a new class and calling a new es7 feature such as async or await. Input code was updated to reflect changes.

I also attempted to run the polyfill in the entry file before app and the issue still exists.
Issue 1:
Environment

Windows build number: 19041.329
PowerToys version: 0.1.9.1
PowerToy module for which you are reporting the bug (if applicable): PowerToys Run

Steps to reproduce

After updating to version 0.1.9.1 press the default shortcut ALT+Space to invoke PT Run.

Expected behavior

PT Run should be invoked.

Actual behavior

Nothing is happening. Downgrading to 0.1.9.0 doesn't fix it either.

Screenshots

Issue 2:
Environment

Windows build number: 10.0.19041.329
PowerToys version: 0.19.1
PowerToy module for which you are reporting the bug (if applicable): PT Run

Run at Startup and Always Run as Administrator are both on. PowerToys Runner shows up in Task Manager.

Steps to reproduce

Make sure your keyboard shortcut to open PT run is Alt+Space

Press Alt+Space

Expected behaviour

PT run opens

Actual behaviour

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

mi = pd.MultiIndex.from_product([['a','b','c'],[1,2]], names=['ll','nn'])
df = pd.DataFrame({'x': [i for i in range(len(mi))], 'y' : [i*10 for i in range(len(mi))]}, index=mi)
df.rename(columns={'x':'z'}) # This works to change name of one column
df.rename_axis({'x' : 'z'}, axis='columns') # This also works to change name of one column (but you get a deprecation warning)
df.rename(index={'nn':'zz'}) # This does not work to change name of one level of a MultiIndex
df.rename_axis({'nn' : 'zz'}, axis='index') # This does not work to change name of one level of a MultiIndex

Problem description

Ideally, if you call df.rename_axis(dict, axis='index'), only the names specified in the dictionary would be changed in the corresponding MultiIndex

Expected Output

For the expression

df.rename_axis({'nn' : 'zz'}, axis='index')

the output should be:

x y
zz ll
1 a 0 0
b 1 10
c 2 20
2 a 3 30
b 4 40
c 5 50

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.6.4.final.0

python-bits: 64

OS: Windows

OS-release: 10

machine: AMD64

processor: Intel64 Family 6 Model 60 Stepping 3, GenuineIntel

byteorder: little

LC_ALL: None

LANG: None

LOCALE: None.None

pandas: 0.22.0

pytest: 3.3.2

pip: 9.0.1

setuptools: 38.4.0

Cython: 0.27.3

numpy: 1.14.0

scipy: 1.0.0

pyarrow: None

xarray: None

IPython: 6.2.1

sphinx: 1.6.6

patsy: 0.5.0

dateutil: 2.6.1

pytz: 2017.3

blosc: None

bottleneck: 1.2.1

tables: 3.4.2

numexpr: 2.6.4

feather: None

matplotlib: 2.1.2

openpyxl: 2.4.10

xlrd: 1.1.0

xlwt: 1.3.0

xlsxwriter: 1.0.2

lxml: 4.1.1

bs4: 4.6.0

html5lib: 1.0.1

sqlalchemy: 1.2.1

pymysql: 0.7.11.None

psycopg2: None

jinja2: 2.10

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: None

In [ ]:

​

Issue 2:
xref #14139 for empty MI

Hi everybody,

in the current version renaming of MultiIndex DataFrames does not work. Lets take the following example:

import datetime as DT
import pandas as pd
df = pd.DataFrame({
'Branch' : 'A A A A A B'.split(),
'Buyer': 'Carl Mark Carl Joe Mark Carl'.split(),
'Quantity': [1,3,5,8,9,3],
'Date' : [
DT.datetime(2013,9,1,13,0),
DT.datetime(2013,9,1,13,5),
DT.datetime(2013,10,1,20,0),
DT.datetime(2013,10,3,10,0),
DT.datetime(2013,12,2,12,0),
DT.datetime(2013,12,2,14,0),
]})

and the following query:

test_df = df[df['Buyer'].isin(['Carl', 'Mark'])].set_index('Buyer', append=True)[['Date']].unstack(['Buyer'])

Now, the following renaming does not work

test_df.rename(columns={('Date', 'Carl'): 'Carl'}, inplace=True)

Thanks in advance

Andy
Issue 1:
Describe the bug

There is a bug when API is organized with different versions (FastAPI apps) which mounted via global app.mount.

ReDoc duplicates mount's prefix. For example, http://127.0.0.1:8000/v1/v1/test.

It works well in default OpenAPI Docs.

Environment:

OS: [e.g. Linux / Windows / macOS]

FastAPI Version [e.g. 0.3.0], get it with: 0.40.0

Additional context

import fastapi
from fastapi import APIRouter

app = fastapi.FastAPI(docs_url=None, redoc_url=None)
router = APIRouter()

@router.get("/users/", tags=["users"])
async def read_users():
return [{"username": "Foo"}, {"username": "Bar"}]

apiV1 = fastapi.FastAPI(openapi_prefix="/v1", version="1.0.0")
apiV1.include_router(router)
app.mount("/v1", apiV1)

Screenshot

Issue 2:
First Check

I added a very descriptive title to this issue.

I used the GitHub search to find a similar issue and didn't find it.

I searched the FastAPI documentation, with the integrated search.

I already searched in Google "How to X in FastAPI" and didn't find any information.

I already read and followed all the tutorial in the docs and didn't find an answer.

I already checked if it is not related to FastAPI but to Pydantic.

I already checked if it is not related to FastAPI but to Swagger UI.

I already checked if it is not related to FastAPI but to ReDoc.

Commit to Help

I commit to help with one of those options 👆

Example Code

from fastapi import FastAPI, Header, Request, HTTPException

app = FastAPI()

@app.get("/greet")
def greet_version(request: Request, X_API_Version: int = Header(int(1))):
"""
This request uses X-API-Version header to determine version

- **X-API-Version**: request must have a version either 1 or 2 is accepted.
"""
version = request.headers.get('X-API-Version')
if version == '1':
return {'message': "Hello"}
if version == '2':
return {'notice': "Hello"}
else:
raise HTTPException(status_code=404, detail="Version not found")

Description

I want to create FastAPI app with custom header versioning and the only solution I found is to add the check in the request itself what is the header value and based on that return the adjusted response. This approach is not very good in terms of code organization(nested if-else for versioning), data validation ex. what in case version two would require different query parameters, I cannot set both in the same request. Also, this will not be described properly with OpenAPI docs. I would rather have requests under the same path and define them according to version changes based on additional header parameters but I am not sure how to approach this especially since two requests cannot have the same path and I don't want to use redirects ex. with the decorator:

@app.get("/greet")
@header_version(1)
def greet_version(request: Request, X_API_Version: int = Header(int(1))):
return {'message': "Hello"}

@app.get("/greet")
@header_version(2)
def greet_version(request: Request, X_API_Version: int = Header(int(2))):
return {'notice': "Hello"}

Operating System

Linux

Operating System Details

No response

FastAPI Version

0.66.0

Python Version

3.8.10

Additional Context

No response
Issue 1:
Hi, I'm not sure the exact state of deno right now. I was just introduced to it. One of the things I was wondering, was how we can handle running commands similarly to nodejs in the package.json.

So previously we could define, for example:

"build": "webpack ."

Is there a way to do this in deno, otherwise, how should a development environment be done?

Issue 2:
Since it is not necessary to have package.json file with deno, how can I as a developer have a similar experience just as we have with npm scripts in package.json while using node.js environment?
Issue 1:
Description

Let's assume I have two routes:

/notes

/users/{user_id}/notes

Both will return the same format of the response but the route prefixed by /users/{user_id} will be additionally filtering notes by specific user_id.

I would like to not duplicate the logic unnecessarily and have something like function below to parse parameters:

async def params(user_id: Optional[str] = Path(None)) -> Optional[str]:
return user_id

@api.get("/notes")
async def root_get(user_id: Optional[str] = Depends(params)):
pass

@api.get("/users/{user_id}/notes")
async def user_get(user_id: Optional[str] = Depends(params)):
pass

However Path only accepts defined str and doesn't allow None.

Is there any way to make path parameters optional?

Issue 2:
I would like to exclude the ValidationError model from the OpenAPI Schema because I have completely overwritten it like this

from fastapi import FastAPI, Request
from fastapi.exceptions import RequestValidationError
from fastapi.responses import ORJSONResponse
from starlette.exceptions import HTTPException

app = FastAPI(default_response_class=ORJSONResponse)

def exception_handler(req: Request, err: Exception) -> ORJSONResponse:
# ...

app.add_exception_handler(HTTPException, exception_handler)
app.add_exception_handler(RequestValidationError, exception_handler)
app.add_exception_handler(Exception, exception_handler)

# ...

and I can't find any current training without directly updating the JSON schema to do so.

Is there any other way to exclude it?
Issue 1:
Apache Airflow version

2.5.1

What happened

After triggering any DAG and trying to open Calendar tab I see this:

Here is the logs:

[2023-02-09T23:19:27.482+0000] {app.py:1741} ERROR - Exception on /dags/dtap_dag_with_bash/calendar [GET]
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/home/airflow/.local/lib/python3.9/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/airflow/.local/lib/python3.9/site-packages/airflow/www/auth.py", line 47, in decorated
return func(*args, **kwargs)
File "/home/airflow/.local/lib/python3.9/site-packages/airflow/www/decorators.py", line 166, in view_func
return f(*args, **kwargs)
File "/home/airflow/.local/lib/python3.9/site-packages/airflow/www/decorators.py", line 125, in wrapper
return f(*args, **kwargs)
File "/home/airflow/.local/lib/python3.9/site-packages/airflow/utils/session.py", line 75, in wrapper
return func(*args, session=session, **kwargs)
File "/home/airflow/.local/lib/python3.9/site-packages/airflow/www/views.py", line 2756, in calendar
if curr_info.logical_date <= prev_logical_date:
TypeError: can't compare offset-naive and offset-aware datetimes

What you think should happen instead

No response

How to reproduce

No response

Operating System

Ubuntu 20.04.5

Versions of Apache Airflow Providers

No response

Deployment

Other Docker-based deployment

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct

Issue 2:
Apache Airflow version

2.5.1

What happened

/calendar page give a problem, here is the capture

What you think should happen instead

No response

How to reproduce

No response

Operating System

Ubuntu 22.04.1 LTS

Versions of Apache Airflow Providers

Distributor ID: Ubuntu

Description: Ubuntu 22.04.1 LTS

Release: 22.04

Codename: jammy

Deployment

Other

Deployment details

Distributor ID: Ubuntu

Description: Ubuntu 22.04.1 LTS

Release: 22.04

Codename: jammy

Anything else

No response

Are you willing to submit PR?

Yes I am willing to submit a PR!

Code of Conduct

I agree to follow this project's Code of Conduct
Issue 1:
Problem Description

https://github.com/ffxsam/autocomplete-bug

There are multiple issues:

openOnFocus does not work (clicking in the field has no effect)

When typing 'a' and clicking on an item that is outside the dialog, the event bubbles up and causes the dialog to close

Repo install instructions: (or just copy into a webpack boilerplate)

npm install

Install Meteor if not already installed (curl https://install.meteor.com/ | sh).

meteor

Versions

Material-UI: 0.15.0-alpha.1

React: 0.14.7

Browser: Chrome 49

Issue 2:
Greetings.

On my react application, im using material-ui AutoComplete.

Im using "showAllItems" version, that passes the property triggerUpdateOnFocus with true value, mounted on a dialog (from material-ui too)

Whene I click inside the input, it shows the menu list, but it disappears instantly on mouse click up.

I can state that if i click and leave mouse button down, that it does not disappear.

Im using the last version of materail-ui and my browser is chrome.

Best regards awatting for a feedback,

Ricardo Ferreira
Issue 1:
Hi,

I have a suite of tests that takes ~3 minutes without using the awesome video feature and ~4+ minutes (133%) with the video feature.

I looked at the logs and saw that each context closing takes few more seconds than without video.

2021-02-08T10:52:04.726Z pw:api => browserContext.close started
2021-02-08T10:52:15.962Z pw:api <= browserContext.close succeeded
Success notification after 11 seconds

2021-02-08T10:51:11.580Z pw:api => browserContext.close started
2021-02-08T10:51:20.406Z pw:api <= browserContext.close succeeded
Success notification after 9 seconds

Is there a way to prevent this duration increase?

Issue 2:
Context:

Playwright Version: ^1.8.0-next-1611032356000

Operating System: MacOS 10.15.7

Node.js version: v12.18.3

Browser: Chromium

Describe the bug

Hi, guys! I’ve added video recording to my tests as described in the documentation. Between tests I want to close all contexts except one, because I need sometimes 2, sometimes 1 context (I use approach 1 context = 1 page, because it’s easier to maintain for my application).

So, the problem is: when I’m closing context after 2-contexts test I see:

pw:api => browserContext.close started +1ms
pw:api <= browserContext.close succeeded +51s

It takes 50-60 seconds, so it's too long. I have a lot of such "switches".

I can provide additional logs if you tell me what to do. Could you please help? Maybe I'm doing something wrong.

Thanks in advance!

Code Snippet

// how I create context and page
let parameters = {};
if (config.get('recordFailedTestVideo')) {
parameters = {
recordVideo: {
dir: config.get('videosDir'),
},
};
}

const ctx = await this._instance.newContext(parameters);
this._contexts.push({
ctx: ctx,
occupied: true,
});

const page = await ctx.newPage();
page.setDefaultTimeout(Timeouts.FifteenSecondsTimeout);
this._pages.push({
page: page,
occupied: true,
});

// how I close contexts
for (let i = 1; i < this._contexts.length; i++) {
await this._contexts[i].ctx.close(); // here is the problem
this._contexts.splice(i, 1);
this._pages.splice(i, 1);
}

Update: here is repo to reproduce: https://github.com/viraxslot/close-context-problem.git

Hope it'll help.
Issue 1:
I have a simple Angular2 Application, which contains App, P1, P2, Child in total 4 components, where App uses P1 and P2, and both P1 and P2 uses Child.

Here is the code:

@Component({
selector: 'child',
template: '<div> child <div>',
})
export class ChildCmp {}

@Component({
selector: 'p1',
template: '<div> P1: <child></child></div>',
directives:[ChildCmp],
})
export class P1Cmp {}

@Component({
selector: 'p2',
template: '<div> P2: <child></child><child></child></div>',
directives:[ChildCmp],
})
export class P2Cmp {}

@Component({
selector: 'my-test',
template: '<p1></p1><p2></p2>',
directives:[P1Cmp, P2Cmp],
})
export class TestApp {}

bootstrap(TestApp);

The index.html to trigger the app is plain <my-test></my-test> with all required libs of Angular2.

You can check the demo in Plunker, console log shows

EXCEPTION: TypeError: viewFactory_ChildCmp0 is not a function

Why it breaks?

This only happen when I put the Child into the both P1 and P2, where they are in the same parent component.

I think it is normal for developer to buildup some reusable component like child then use it all around?

The Angular version is beta.01 and I tried this in Chrome and Firefox in both Ubuntu and Mac.

Issue 2:
While updating to beta.1, I encountered an error with nested components. Depending on the order I use the components, it fails unexpectedly with the following error:

EXCEPTION: TypeError: viewFactory_BlueBox0 is not a function.

This may be related to the change in 7ae23ad

I reproduced the error in this plunkr:

http://plnkr.co/edit/8Zl0JdbV5fuBMxDqcg1L?p=preview
Issue 1:
I'm using Symfony 3.0.2 with:

nginx version: nginx/1.4.6 (Ubuntu)

php version: 7.0.3-4+deb.sury.org~trusty+1

Everything works fine except when I try to enter the Symfony profiler where I get the following message:

Warning: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/www/Symfony/app/../var/sessions/dev)

After that I get this error on every page. To be able to see regular pages again I just need to delete session cookie from my browser. But again, it works fine till I try to enter the Symfony profiler.

This error occurs only when I add to nginx config file this line:

fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;

However, when using php5 by adding the following line everything works fine:

fastcgi_pass unix:/var/run/php5-fpm.sock;

BTW. I have another project which is build on Symfony 3.0.1, and there is no such a problem.

Issue 2:
Hi,

I'm using the new symfony3 distribution with PHP7 on Vagrant.

If I run the app, I get a strange error message:

Warning: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/www/api/app/../var/sessions/dev)

What could this be?

Greetings
Issue 1:
I'm not certain if this is a regression in matplotlib or a bug in seaborn, but a user reported this difference with seaborn between matplotlib 3.0 and 3.1 (original issue):

Example code:

import numpy as np
import pandas as pd
import seaborn as sns

np.random.seed(0)
data = pd.DataFrame(np.random.randint(0, 10, (10, 10)))
sns.heatmap(data, annot=True);

Output in matplotlib 3.0:

Output in matplotlib 3.1:

Issue 2:
With seaborn 0.9.0 and matplotlib 3.1.1, the topmost and bottommost row of boxes in a seaborn plot are partially cut off:

import seaborn as sns
import numpy as np

np.random.seed(42)
sns.heatmap(np.random.random((10, 10)))

As another example, consider this demo from the gallery:

import matplotlib.pyplot as plt
import seaborn as sns
sns.set()

# Load the example flights dataset and conver to long-form
flights_long = sns.load_dataset("flights")
flights = flights_long.pivot("month", "year", "passengers")

# Draw a heatmap with the numeric values in each cell
f, ax = plt.subplots(figsize=(9, 6))
sns.heatmap(flights, annot=True, fmt="d", linewidths=.5, ax=ax)

This is a pretty major visual issue. Apologies if this has been reported before, but I couldn't find a record of such in the GH issues.
Issue 1:
FWIK, Deno currently fetch dependencies only support download ts/js file(s) individually, it's not a good idea for middle or even large project dependencies fetch(hundreds of or even thounds of dependencies).

So I think it's a good idea to support gzipped file through deno fetch https://foo.gz which contains the mod.ts file in the root and (or) git repo through deno fetch https://foo.git just like golang go get

Issue 2:
test

Describe the bug

When using Go to references, the extension doesn't find references in files that are not opened in the editor.

To Reproduce

// a.ts
export const a = 0;

// b.ts
import { a } from "./a.ts";

// c.ts
import { a } from "./a.ts";

Open a.ts and b.ts, go to references of a. No references in c.ts.

Expected behavior

c.ts should appear in the panel.

This makes this feature useless if you have to open every file in your project to find references

Screenshots

Versions

vscode: 1.57.1 deno: 1.11.3 extension: 3.6.1
Issue 1:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

12.0.1

What operating system are you using?

Windows

Operating System Version

Windows 10 version 20H2

What arch are you using?

x64

Last Known Working Electron version

No response

Expected Behavior

Run "window.open" to display the three levels of browsers in the Electron browser.

Actual Behavior

The parent screen -> child screen is displayed, but the child screen -> grandchild screen is not displayed correctly.

Testcase Gist URL

No response

Test github.io repository

https://github.com/takman00/electron-test

Test github.io pages

https://takman00.github.io/electron-test/

Operation image

Electron oparation

Chrome oparation

Issue 2:
Preflight Checklist

I have read the Contributing Guidelines for this project.

I agree to follow the Code of Conduct that this project adheres to.

I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Electron Version

12.0.4

What operating system are you using?

macOS

Operating System Version

macOS Catalina 10.15.7

What arch are you using?

x64

Last Known Working Electron version

11.4.5

Expected Behavior

With either the sandbox option or the nativeWindowOpen option enabled:

When you open a new window using window.open from a window that is created using window.open, I expect to see 3 windows rendering their own html.

Actual Behavior

When you open a new window using window.open from a window that is created using window.open, the second window goes blank (white screen). Closing either of these two windows closes the other window.

Step to reproduce:

Run the attached sample:

Click open window to create a new window

Click open window from the new window to create third window

Observe second window is blank

Testcase Gist URL

https://gist.github.com/naineshsolanki-lmi/587f79ad7a4f0c794f9561f9ec85b389

Additional Information

No response