sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Audit destructors of classes bound using pybind11::class_ to see if they can block; such cases can deadlock
Labels: triaged,module: pybind

I added some code to take out the GIL during destruction and I caused a deadlock described in https://github.com/pytorch/pytorch/pull/56017#issuecomment-821333786

The cause of this deadlock stems from this destructor which can block:

```
ProcessGroupGloo::~ProcessGroupGloo() {
  std::unique_lock<std::mutex> lock(workMutex_);
  workConsumeCV_.wait(lock, [&] { return workQueue_.empty(); });

  // Queue is empty, signal stop
  stop_ = true;

  // Release lock to allow threads to terminate
  lock.unlock();

  workProduceCV_.notify_all();

  // Wait for worker threads to terminate
  for (auto& thread : threads_) {
    thread.join();
  }
}
```

and then a binding of this object via pybind11 which doesn't release the GIL on destruction

```
  auto processGroupGloo = intrusive_ptr_class_<::c10d::ProcessGroupGloo>(
      module, "ProcessGroupGloo", processGroup);
```

as noted in https://github.com/pybind/pybind11/issues/1446

I've devised a wrapper class for intrusive pointer that releases the GIL before destruction

```
// Wrapper to ensure GIL is released before destructing ProcessGroupGloo
template <typename T>
class IntrusivePtrNoGilDestructor {
  c10::intrusive_ptr<T> impl_;
public:
  IntrusivePtrNoGilDestructor() = default;
  IntrusivePtrNoGilDestructor(const IntrusivePtrNoGilDestructor&) = default;
  IntrusivePtrNoGilDestructor(IntrusivePtrNoGilDestructor&&) = default;
  IntrusivePtrNoGilDestructor& operator=(const IntrusivePtrNoGilDestructor&) = default;
  IntrusivePtrNoGilDestructor& operator=(IntrusivePtrNoGilDestructor&&) = default;
  IntrusivePtrNoGilDestructor(c10::intrusive_ptr<T> impl) : impl_(std::move(impl)) {}
  // This ctor is very important; see
  // https://github.com/pybind/pybind11/issues/2957
  IntrusivePtrNoGilDestructor(T* impl) : impl_(c10::intrusive_ptr<T>::reclaim(impl)) {}
  ~IntrusivePtrNoGilDestructor() {
    pybind11::gil_scoped_release release;
    impl_.reset();
  } 
  T& operator*() const noexcept { return *impl_; }
  T* operator->() const noexcept { return impl_.get(); }
  T* get() const noexcept { return impl_.get(); }
  void reset() noexcept { impl_.reset(); }
  operator bool() const noexcept {
    return impl_;
  } 
};
PYBIND11_DECLARE_HOLDER_TYPE(T, IntrusivePtrNoGilDestructor<T>, true);
```

but we must still audit all other destructors of thread management objects and ensure that, if they are used from pybind11, we have appropriately released the GIL in all cases

cc @mrshenli
Repository: flutter
Issue: DataColumn sorting arrow unclear in docs
Labels: framework,f: material design,d: api docs,P2,team-design,triaged-design

## Use case

I am designing a `DataTable` where the `DataColumn`s need a fixed width, which is calculated based on the LayoutBuilder´s maxWidth. <br> Even though I accounted for horizontalMargin , columnSpacing and all Paddings, the calculation did not add up. Problem was that I provided empty `onSort` functions as placeholders and that reserved a width of 18 for every DataColumn. 

However, the debugging process was rather hard as the docs never mention the sorting arrow reserving the space, even though the function does not return anything and no visible arrow is displayed. Even though the empty space can be identified as a `RichText` (with DevTools), that did not shed light on where it came from. <br>
Furthermore, it would be useful to know the exact size of the sorting arrow and if it resized based on the device size.

A screenshot is provided to better understand my point.
<img src="https://user-images.githubusercontent.com/75510543/115084595-71574980-9f09-11eb-97ce-0e82435156e2.jpg"
width=400/>


## Proposal

Add above mentioned informations the [DataColumn](https://api.flutter.dev/flutter/material/DataColumn-class.html) or [onSort](https://api.flutter.dev/flutter/material/DataColumn/onSort.html) documentation.

To reiterate, following information would be valueable:
- space is taken for sorting arrow as soon as `onSort` of DataColumn is not null
- size of onSort arrow


[StackOverflow question regarding topic](https://stackoverflow.com/questions/67117484/why-does-a-richtext-widget-appear-after-my-text-in-datacolumns)
Repository: pytorch
Issue: torch.where with input Tensor and other Scalar raises type mismatch error
Labels: triaged,module: type promotion

## 🐛 Bug

Consider the MWE below.

```
cond = torch.randint(2, (10,), dtype=bool)
input = torch.randn(10)
other = 1.0

torch.where(cond, input, other)   # (1)
torch.where(cond, input, torch.tensor(other))   # (2)
```

`(1)` fails with the error `expected scalar type float but found double` but `(2)` works.

On closer inspection, it seems that `dtype` is not being taken from `input` when `other` is a `Scalar` and vice versa. However, the `device` is being taken when either of `input` or `other` is a `Tensor`.

I would expect that the `dtype` is also taken from `input` and `(1)` shouldn't error out.

cc @nairbv @mruberry
Repository: flutter
Issue: `flutter create .` should avoid creating main.dart and widget_test.dart
Labels: c: new feature,tool,c: proposal,P3,team-tool,triaged-tool

If someone is using `flutter create .`, I think it's likely that they're trying to generate Android/iOS/etc. platform files.  In that case, we shouldn't generate `lib/main.dart` and `test/widget_test.dart`.

Alternatively:
* Generate `test/widget_test.dart` *only* if we generate `lib/main.dart`.  Generating the tests without the corresponding `main.dart` file does not make sense and will just lead to potentially confusing analysis errors.
* Currently it seems that `lib/main.dart` is generated if it doesn't already exist.  This perhaps could be even stricter and generate it only if `lib/` does not contain any existing `.dart` files (or it doesn't contain any existing `.dart` files with a `main()` function).

## Use case

Package examples often include `lib/` and maybe `test/` directories without including generated platform files.  In such cases, it's expected that users run `flutter create .` to run the examples.

(I'm using Flutter 2.1.0-12.2.pre.)
Repository: vscode
Issue: ctrl + f (or h) to find (or replace) string sometimes get the wrong hit count
Labels: bug,editor-find


Issue Type: <b>Bug</b>

Problem:
When I searched a string in a log file (8004 lines) with vscode, I found the *hit count is not correct* in the search help dialog. 

Repro Steps:
1. copy the log string in gist (attached below) and paste in vscode.
2. in vscode, scroll down to the last line .
3. highlight the last "BaseObject dtor~" string in log.
4. press "ctrl+f" and watch the search help dialog.
5. it shows 1998 in 1999. Actually, it should be *1999* in 1999, since it is the last record in this log. Really a silly bug. Also hit this bug with editor replace function.

I have uploaded the test log file in gist.
https://gist.githubusercontent.com/zhuceji8/eadcb16029caaf4e7781f04bfe7a9bab/raw/2b6a4474543dde600002d25a00b2f185790403e4/test.log



VS Code version: Code 1.55.2 (3c4e3df9e89829dce27b7b5c24508306b151f30d, 2021-04-13T09:35:57.887Z)
OS version: Windows_NT x64 10.0.19042

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz (8 x 2112)|
|GPU Status|2d_canvas: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>protected_video_decode: unavailable_off<br>rasterization: enabled<br>skia_renderer: enabled_on<br>video_decode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|15.80GB (5.81GB free)|
|Process Argv|--crash-reporter-id 7dddfe35-0d7d-41f7-b7fd-27fb89e00cae|
|Screen Reader|no|
|VM|50%|
</details><details><summary>Extensions (31)</summary>

Extension|Author (truncated)|Version
---|---|---
Bookmarks|ale|13.0.4
puzzle-vscode|big|0.0.2
cake-vscode|cak|1.0.0
githistory|don|0.6.16
gitlens|eam|11.4.1
gitee|g8u|0.0.6
gc-excelviewer|Gra|3.0.41
svg|joc|1.4.5
MagicPython|mag|1.1.0
fluent-icons|mig|0.0.7
prettify-json|moh|0.0.3
binary-viewer|mom|0.0.1
vscode-docker|ms-|1.12.1
vscode-language-pack-zh-hans|MS-|1.55.2
csharp|ms-|1.23.11
mssql|ms-|1.10.1
python|ms-|2021.3.680753044
vscode-pylance|ms-|2021.4.1
jupyter|ms-|2021.5.745244803
remote-ssh|ms-|0.65.3
remote-ssh-edit|ms-|0.65.3
remote-wsl|ms-|0.54.6
material-icon-theme|PKi|4.6.0
prettyxml|Pra|0.7.2
partial-diff|ryu|1.4.2
vscode-st|Ser|1.10.1
vscode-hexdump|sle|1.8.1
vscodeintellicode|Vis|1.2.12
markdown-all-in-one|yzh|3.4.0
t4-support|zbe|0.5.0
material-theme|zhu|3.10.13


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30259475
pythonvsnew554:30281908
pythontb:30283811
openwslfolder:30282073
vspre833:30267464
pythonptprofiler:30281270
vshan820cf:30276953
pythondataviewer:30285071
vscus158:30286553

```

</details>

<!-- generated by issue reporter -->
Repository: go
Issue: x/tools/gopls: don't show analysis for std and 3rd-party packages
Labels: NeedsDecision,FeatureRequest,gopls,Tools

Warning in `/src/os/exec_unix.go`:

![](https://user-images.githubusercontent.com/30220965/115107505-e95a5980-9f73-11eb-8ade-a7b9b8a26e81.png)

Warning in `github.com/gorilla/mux@v1.8.0/mux.go`:

![](https://user-images.githubusercontent.com/30220965/115107506-ef503a80-9f73-11eb-9a7f-95b0a466ac7a.png)

I think these warnings are not useful, but just distracting. It makes sense to run analyzers only for workspace packages
Repository: pytorch
Issue: Why does output_padding have constraints in ConvTranspose1d?
Labels: module: docs,triaged

## 📚 Documentation
This issue refers to https://pytorch.org/docs/stable/generated/torch.nn.ConvTranspose1d.html. I am trying to understand what `output_padding` really means. Then I run the following script:
```
import torch

image = torch.rand(2, 3, 3).cuda()
net = torch.nn.ConvTranspose1d(3, 4, kernel_size=3, output_padding=1).cuda()
out = net(image)
```
However, it fails:
```
Traceback (most recent call last):
    out = net(image)
  File ".../lib64/python3.6/site-packages/torch/nn/modules/module.py", line 1015, in _call_impl
    return forward_call(*input, **kwargs)
  File ".../lib64/python3.6/site-packages/torch/nn/modules/conv.py", line 752, in forward
    output_padding, self.groups, self.dilation)
RuntimeError: output padding must be smaller than either stride or dilation, but got output_padding_height: 0 output_padding_width: 1 stride_height: 1 stride_width: 1 dilation_height: 1 dilation_width: 1
```

The `RuntimeError` shown above seems to mean that `output_padding` must be smaller than either `stride` or `dilation`.
However, I cannot easily know why such a constraint exists just by reading the API document.

If the `RuntimeError` is expected, could you help me explain it so that I can understand it better? You might want to improve the documentation so that more people can benefit.
Thanks!

cc @brianjo @mruberry
Repository: pytorch
Issue: Change `other` to `src` in torch.Tensor.scatter_add_
Labels: module: docs,triaged

Replacing `other` with `src` in the first sentence makes the meaning clearer to me.

<b>Currrent version<b>

![Screenshot 2021-04-17 at 10 26 09](https://user-images.githubusercontent.com/11690366/115108257-587d8100-9f67-11eb-8a20-c3f04140187d.png)



cc @brianjo @mruberry
Repository: go
Issue: dl: add go1.2.2, go1.3.3 and go1.4.3
Labels: NeedsDecision

These versions don't have the SH256 checksum available, however the SHA1 checkum is listed on https://golang.org/dl, as an example https://golang.org/dl/#go1.4.3.

In order to support them, it is necessary to print a warning in case the SHA256 is not available, instead of terminating the program.
Here is an example of the warning from my CL (not yet submitted):
```
Warning: SHA256 Checksum not found: https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz.sha256: 404 Not Found
The SHA1 Checksum can be found on https://golang.org/dl/#go1.4.3
```
Repository: youtube-dl
Issue: [YouTube Music] correct the title, and add new extractor
Labels: request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Search the bugtracker for similar feature requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a feature request
- [x] I've verified that I'm running youtube-dl version **2021.04.17**
- [x] I've searched the bugtracker for similar feature requests including closed ones


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. Provide any additional information, suggested solution and as much context and examples as possible.
-->

I've just noticed that some title of YouTube Music is different to the link of original YouTube website. Will you please correct the title of downloaded files from YouTube Music? Instead of using original YouTube extractor, will you please create another extractor just for YouTube Music? Let me know if this request is accepted. Thank you ❤️

Here is the example, it's up to you to judge:
**Maria**
https://music.youtube.com/watch?v=GCWdUH18pPc&feature=share

**Maria (마리아 (Maria))**
https://m.youtube.com/watch?v=GCWdUH18pPc&feature=share

**Maria (마리아 (Maria))**
https://www.youtube.com/watch?v=GCWdUH18pPc
Repository: pytorch
Issue: Type checking doesn't match actual type in error message
Labels: module: error checking,triaged

## 🐛 Bug
The error message about type checking for certain parameters of functions seems to be wrong. It wrongly reports the type that the user writes. It always complains that the user gives the wrong type of `tuple`, even if the user is actually giving it a `str` or `float`, etc.
Note that this bug doesn't seems to exist in stable release.
Interestingly enough, it seems to be only reproducible on `nightly version`.

## To Reproduce
```
import torch

t = torch.rand(1, 2, 10, 10)
mod = torch.nn.ConvTranspose2d(2, 4, kernel_size=[1,2], output_padding="0") # use gives a str here!
o = mod(t)
```
The error message is
```
  File ".../nightly/lib64/python3.6/site-packages/torch/nn/modules/module.py", line 1015, in _call_impl
    return forward_call(*input, **kwargs)
  File ".../nightly/lib64/python3.6/site-packages/torch/nn/modules/conv.py", line 898, in forward
    output_padding, self.groups, self.dilation)
TypeError: conv_transpose2d(): argument 'output_padding' (position 6) must be tuple of ints, not tuple
```

The failure message is in C++ code show below.
https://github.com/pytorch/pytorch/blob/6c65ce8ee14faec577582ecd0e17ba436f32c8b3/torch/csrc/utils/python_arg_parser.cpp#L949-L953

## Expected behavior
Please pay attention to the last sentence of the error message "must be tuple of ints, `not tuple`". It is expected to be "`not str`".

## Environment
 - PyTorch Version (e.g., 1.0): Nightly build
 - OS (e.g., Linux): Linux
 - How you installed PyTorch (`conda`, `pip`, source): pip
 - Python version: 3.6

## Additional context

<!-- Add any other context about the problem here. -->
Repository: youtube-dl
Issue: [YouTube Music] extractor for streaming music quality
Labels: site-support-request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.04.17. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.04.17**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://music.youtube.com/watch?v=GCWdUH18pPc&feature=share
- Playlist: https://music.youtube.com/playlist?list=PL6p49sRMgGkFhof6tc3EuQ0eIDhSV55RJ&feature=share


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

since it's hard to log into YouTube, I hope to just extract the audio quality of non registered users. it's equivalent to Free membership of YouTube Music. According to Google, there are four streaming qualities for free membership on YouTube Music. Hopefully you can 
extract those streaming quality and implement this issue. Thank you ☺️



​**Low**
Uses least data
Upper bound of 48kbps AAC

**Normal**
Default setting
Upper bound of 128kbps AAC

**High**
Uses extra data 
Upper bound of 256kbps AAC

**Always High**
Maintains high quality even when connection is poor
Bitrate: 256kbps AAC
Repository: go
Issue: proposal: cmd/go: allow GOPRIVATE to provide source repository URI
Labels: Thinking,Proposal,Proposal-Hold,GoCommand

## Proposal: Allow GOPRIVATE to provide source repository URI 

Last updated: 2021/04/24


### Rationale:

In current state of Go modules' tooling, working with private repositories without setting up a private proxy infrastructure serving modules over https is possible but cumbersome; and still is confined to git VCS only.

For git repositories it is usually done like that:

```bash
go env -w GOPRIVATE=example.com
git config --global url."git@example.com:".insteadOf "https://example.com"
```

This configuration works, but it has to be global (per machine/user). To my knowledge no other VCS allows for such workaround. 

### Related:
#40189 : add a sub command to manage authentication

## Proposal:

Allow [GOPRIVATE](https://golang.org/ref/mod#private-modules) to point to the source repository for a given module path matching _pattern_. Let user provide vcs type, transport, and credentials.

`GOPRIVATE=pattern["["vcs+transport://[userid[:password]@]host[:port][/path]"]"][,...]`

```bash
GOPRIVATE=example.com/[fossil+ssh://internal.example.com]
GOPRIVATE=example.com/[git+ssh://git@internal.example.com]
GOPRIVATE=example.com/[fossil+https://internal.example.com]
GOPRIVATE=example.com/[git+https://testing.example.com/test]
```

If _pattern_ ends with slash, allow URI to be constructed using parts of matched module path represented by five percent-letter variables:
```
   matched.pattern/path/to/module
                           ^^^^^^ %z end element of module path
                   ^^^^           %s start element after the match
                   ^^^^^^^^^^^^^^ %p part after the match
   ^^^^^^^^^^^^^^^                %m matched by (excluding ending slash) 
   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ %w whole module path

example.com[git+file:///repos/%p.git]          # get from bare repos archive
example.com[fossil+file:///repos/%s-%z.fossil]    # or a bag of user fossils
github.com/myuser/[git+file:///gopath/src/%w/] # use old GOPATH as source
example.com/[git+ssh://%s@citest.example.com:2222/%p.git] # per CI domain
```

Reserved characters of [RFC 3986](https://tools.ietf.org/html/rfc3986#section-2.2) that should be literal part of produced URI must be given in [percent-encoding](https://tools.ietf.org/html/rfc3986#section-2.1) form. Literal characters ":", "[", "]", "\", and "@" can also be provided after a backslash character.

----
edits:
- 2021/04/24 add reference to #‍40189; add "reserved characters encoding" note.
Repository: rust
Issue: Imprecise span used when emitting 'borrow later used by call' note
Labels: C-enhancement,A-diagnostics,A-borrow-checker,T-compiler

The following code:

```rust
struct Foo<'a> {
    val: &'a mut bool
}

fn consume(_foo: Foo<'_>, _val: bool) {}

fn bar(val: &mut bool) {
    let foo = Foo { val };
    consume(foo, *val);
}
```

produces the following error:

```
error[E0503]: cannot use `*val` because it was mutably borrowed
 --> src/lib.rs:9:18
  |
8 |     let foo = Foo { val };
  |                     --- borrow of `*val` occurs here
9 |     consume(foo, *val);
  |     -------      ^^^^ use of borrowed `*val`
  |     |
  |     borrow later used by call

error: aborting due to previous error
```

The error message points at the uses of `val`, and the call to `consume`. However, the error message does not indicate that the usage of `foo` in the argument to `consume` is also at fault.
Repository: godot
Issue: Large graphic appears when running (GLES3)
Labels: bug,topic:rendering,confirmed,topic:2d

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
3.3 rc9 mono

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
win10 64
radeon vega 8

**Issue description:**
<!-- What happened, and what was expected. -->

The godot icon appears in a considerable size when executing.
No node has scripts assigned.
I can't minimize the error any more, this is the maximum I can minimize it.
The error does not appear if you do one of these things:
-If you delete the node "dureza"
-If it makes the node "foca" invisible
-If you delete the node "layerHUD"
-If the graph of the node "layerHUD / backgroundHUD" changes.
-If you delete the shader material assigned to the node "AlgasSuperiores" (the shader has no code)
-If you change the node type "CapaProfundidad" (Node2D) to type "CanvasLayer"
And more things that don't make sense and you can't come to a conclusion.
I can't figure out the reason for the appearance of that graph at the start of the run.
In the gif you can see what I mean, I have marked it with "this".

![gif](https://user-images.githubusercontent.com/19652075/115121327-72908100-9fb2-11eb-833b-1040c2139518.gif)

**Steps to reproduce:**
Execute the project.

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
[juegoFoca.zip](https://github.com/godotengine/godot/files/6329770/juegoFoca.zip)