anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: luxonis/depthai
Issue: [BUG] demo handler.py lack of support for video file

**Describe the bug**
In the `handler.py` for [deeplabv3p_person](https://github.com/luxonis/depthai/blob/f8356a7ad7a09b6c51da6b3ea4d2744b4272ec44/resources/nn/deeplabv3p_person/handler.py#L22), it misses the `host` value which is the video option `-vid`

**To Reproduce**
Steps to reproduce the behavior:
1. Run script `python depthai_demo.py -cnn road-segmentation-adas-0001 -vid /media/Workspace/Learning/Github/depthai/videos/CamVid.mp4 -sh 8`
2. Set up a break point on [line 22](https://github.com/luxonis/depthai/blob/f8356a7ad7a09b6c51da6b3ea4d2744b4272ec44/resources/nn/deeplabv3p_person/handler.py#L22), 
3. You will see that the block of code under if statement will never be executed.

**Additional context**
A quick fix is to add `host` inside the bracket.
e.g. `if name in (Previews.color.name, Previews.nn_input.name, 'host'):`

But a proper fix should be applied here.


Changed files:
depthai_helpers/managers.py, resources/nn/deeplabv3p_person/handler.py

diff --git a/depthai_helpers/managers.py b/depthai_helpers/managers.py
index 616f66e1..9652d11e 100644
--- a/depthai_helpers/managers.py
+++ b/depthai_helpers/managers.py
@@ -818,7 +818,7 @@ class PipelineManager:
                     self.nodes.xout_rect_right.setStreamName(Previews.rectified_right.name)
                 nn.passthrough.link(self.nodes.xout_rect_right.input)
 
-            if use_depth:
+            if self.nn_manager.nn_family in ("YOLO", "mobilenet") and use_depth:
                 if not hasattr(self.nodes, "xout_depth"):
                     self.nodes.xout_rgb = self.p.createXLinkOut()
                     self.nodes.xout_rgb.setStreamName(Previews.depth.name)
diff --git a/resources/nn/deeplabv3p_person/handler.py b/resources/nn/deeplabv3p_person/handler.py
index 777c8e89..876fe740 100644
--- a/resources/nn/deeplabv3p_person/handler.py
+++ b/resources/nn/deeplabv3p_person/handler.py
@@ -19,7 +19,7 @@ def draw(nn_manager, data, frames):
         return
 
     for name, frame in frames:
-        if name in (Previews.color.name, Previews.nn_input.name):
+        if name == "color" and nn_manager.source == "color" and not nn_manager.full_fov:
             scale_factor = frame.shape[0] / nn_manager.input_size[1]
             resize_w = int(nn_manager.input_size[0] * scale_factor)
             resized = cv2.resize(data, (resize_w, frame.shape[0])).astype(data.dtype)
@@ -27,3 +27,5 @@ def draw(nn_manager, data, frames):
             tail_w = frame.shape[1] - offset_w - resize_w
             stacked = np.hstack((np.zeros((frame.shape[0], offset_w, 3)).astype(resized.dtype), resized, np.zeros((frame.shape[0], tail_w, 3)).astype(resized.dtype)))
             cv2.addWeighted(frame, 1, stacked, 0.2, 0, frame)
+        elif name in (Previews.color.name, Previews.nn_input.name, "host"):
+            cv2.addWeighted(frame, 1, cv2.resize(data, frame.shape[:2][::-1]), 0.2, 0, frame)
Repository: luxonis/depthai
Issue: [BUG] NNET callbacks without visualizer enabled don't work in 1.10.0

Depthai Sdk 1.10.0 crashes when trying to use callbacks on nnets without the visualizer enabled.

**MRE**
```py
from depthai_sdk import OakCamera

with OakCamera() as oak:
    color = oak.create_camera("color")
    nnet = oak.create_nn("yolov8n_coco_640x352", color)
    oak.callback(nnet, lambda frame: print(frame))
    oak.start(blocking=True)
```

**Traceback**
```sh
Traceback (most recent call last):
  File "/home/filipjeretina/Documents/dev/depthai-sdk-experiments/nnet_cb.py", line 9, in <module>
    oak.start(blocking=True)
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_camera.py", line 353, in start
    self.poll()
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_camera.py", line 381, in poll
    self._oak.check_sync()
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_device.py", line 44, in check_sync
    sync.check_queue(block=False)  # Don't block!
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_outputs/xout/xout_base.py", line 91, in check_queue
    self.on_callback(packet)
  File "/home/filipjeretina/Documents/dev/depthai-viewer/venv/lib/python3.10/site-packages/depthai_sdk/oak_outputs/xout/xout_nn.py", line 102, in on_callback
    self._visualizer.frame_shape = self._frame_shape
AttributeError: 'NoneType' object has no attribute 'frame_shape'
```

Changed files:
depthai_sdk/src/depthai_sdk/oak_outputs/xout/xout_nn.py

diff --git a/depthai_sdk/src/depthai_sdk/oak_outputs/xout/xout_nn.py b/depthai_sdk/src/depthai_sdk/oak_outputs/xout/xout_nn.py
index e37f4073..86b4ec1a 100644
--- a/depthai_sdk/src/depthai_sdk/oak_outputs/xout/xout_nn.py
+++ b/depthai_sdk/src/depthai_sdk/oak_outputs/xout/xout_nn.py
@@ -99,7 +99,8 @@ class XoutNnResults(XoutSeqSync, XoutFrames):
         if self._frame_shape is None:
             # Lazy-load the frame shape
             self._frame_shape = np.array([packet.frame.shape[0], packet.frame.shape[1]])
-            self._visualizer.frame_shape = self._frame_shape
+            if self._visualizer:
+                self._visualizer.frame_shape = self._frame_shape
 
         bbox = BoundingBox().resize_to_aspect_ratio(packet.frame.shape, self._nn_size, self._resize_mode)
Repository: conan-io/conan-center-index
Issue: [package] boost/all: Use `tools.cppstd_flag` from Conan 1.24

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **boost/all**


The recipe is using undocumented Conan API:

https://github.com/conan-io/conan-center-index/blob/9419b6420fe94a453391ccd738bc70eb1c491179/recipes/boost/all/conanfile.py#L3

Conan 1.24 (to be released soon) provides new tool `tools.cppstd_flag` (https://github.com/conan-io/conan/pull/6744) that should replace it.

Changed files:
recipes/boost/all/conanfile.py

diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py
index 70052f9f2..918c27d0c 100644
--- a/recipes/boost/all/conanfile.py
+++ b/recipes/boost/all/conanfile.py
@@ -1,7 +1,6 @@
 from conans import ConanFile
 from conans import tools
-from conans.client.build.cppstd_flags import cppstd_flag
-from conans.tools import Version
+from conans.tools import Version, cppstd_flag
 from conans.errors import ConanException
 
 from conans.errors import ConanInvalidConfiguration
@@ -568,12 +567,7 @@ class BoostConan(ConanFile):
         flags.append("toolset=%s" % self._toolset)
 
         if self.settings.get_safe("compiler.cppstd"):
-            flags.append("cxxflags=%s" % cppstd_flag(
-                    self.settings.get_safe("compiler"),
-                    self.settings.get_safe("compiler.version"),
-                    self.settings.get_safe("compiler.cppstd")
-                )
-            )
+            flags.append("cxxflags=%s" % cppstd_flag(self.settings))
 
         # CXX FLAGS
         cxx_flags = []
Repository: conan-io/conan-center-index
Issue: [package] xz_utils/5.2.4: build_requirements logical error in windows mingw env

### Package and Environment Details
  * Package Name/Version: **xz_utils/5.2.4**
  * Operating System+version: **Windows 10**
  * Compiler+version: **msys2 /mingw64 gcc 8.1**
  * Docker image: **conanio/gcc7**
  * Conan version: **conan 1.21.0**
  * Python version: **Python 3.7.5/none**


### Conan profile
```
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Debug
compiler=gcc
compiler.cppstd=14
compiler.exception=seh
compiler.libcxx=libstdc++11
compiler.threads=posix
compiler.version=8.1
os=Windows
os_build=Windows
[options]
[build_requires]
[env]
CONAN_CMAKE_GENERATOR=MinGW Makefiles
```

```
[requires]
xz_utils/5.2.4
```


### Steps to reproduce

default `build_requirements` logical error in windows mingw env.
```
    @property
    def _is_mingw_windows(self):
        # Linux MinGW doesn't require MSYS2 bash obviously
        return self.settings.compiler == 'gcc' and self.settings.os == 'Windows' and os.name == 'nt'

    def build_requirements(self):
        if self._is_mingw_windows:
            self.build_requires("msys2/20161025")

```

In windows env, with msys2 and mingw both, it not need to loading required. It missed judgment `bash` in windows.
Need to change to:
```
    @property
    def _is_mingw_windows(self):
        # Linux MinGW doesn't require MSYS2 bash obviously
        return self.settings.compiler == 'gcc' and self.settings.os == 'Windows' and os.name == 'nt'

    def build_requirements(self):
        if self._is_mingw_windows and "CONAN_BASH_PATH" not in os.environ:
            self.build_requires("msys2/20190524")
```


Changed files:
recipes/xz_utils/all/conanfile.py

diff --git a/recipes/xz_utils/all/conanfile.py b/recipes/xz_utils/all/conanfile.py
index f52dd2174..0ada1ece4 100644
--- a/recipes/xz_utils/all/conanfile.py
+++ b/recipes/xz_utils/all/conanfile.py
@@ -25,7 +25,7 @@ class XZUtils(ConanFile):
         return self.settings.compiler == 'gcc' and self.settings.os == 'Windows' and os.name == 'nt'
 
     def build_requirements(self):
-        if self._is_mingw_windows:
+        if self._is_mingw_windows and "CONAN_BASH_PATH" not in os.environ and tools.os_info.detect_windows_subsystem() != 'msys2':
             self.build_requires("msys2/20161025")
 
     def _effective_msbuild_type(self):
Repository: conan-io/conan-center-index
Issue: [question] Consistency in package and generator names

After the discussion in https://github.com/conan-io/conan/issues/6269#issuecomment-570182130, most packages got normalized to use the format discussed in this comment (https://github.com/conan-io/conan-center-index/pull/690 and related).

If I understand the intention correctly, in CMake the package should always be added with `CONAN_PKG::{name}` (for example  `openssl`) and conan will then expand the correct `Find*`-macro using `self.cpp_info.names["cmake_find_package"]` or `self.cpp_info.names["cmake_find_package_multi"]` (in this case `OpenSSL`).

Some recipes now use an additonal `self.cpp_info.names['cmake']` (a cursory search found [libcurl](https://github.com/conan-io/conan-center-index/blob/ee20546/recipes/libcurl/all/conanfile.py#L374) and [backward-cpp](https://github.com/conan-io/conan-center-index/blob/ee20546/recipes/backward-cpp/all/conanfile.py#L114)).

This leads to strange behavior:
- the `cmake` generator expects `CONAN_PKG::CURL` and will fail with `CONAN_PKG::libcurl`
- the `cmake_multi` works the opposite way, working with `CONAN_PKG::libcurl` and failing with uppercase `CURL`

In terms of consistency, I tend to say that the behavior of `cmake_multi` is the correct one, but either way, both CMake-variants should at least behave the same way.

I'm not sure if there are any side effects in removing the offending lines.

I didn't check if other generators have a similar behavior for different packages.

It might be a good idea to double-check all occurrences of superfluous or missing `cpp_info.names`, ([tcl](https://github.com/conan-io/conan-center-index/blob/ee20546/recipes/tcl/8.6.10/conanfile.py#L198), for example is missing the _multi_ entry). Is there a specific reason to split `cmake` and `cmake_multi` in this case (maybe a question to move to the main conan repo)?

Changed files:
recipes/libcurl/all/conanfile.py

diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py
index 3dd16082e..0f2453881 100644
--- a/recipes/libcurl/all/conanfile.py
+++ b/recipes/libcurl/all/conanfile.py
@@ -371,7 +371,6 @@ class LibcurlConan(ConanFile):
             os.remove(os.path.join(self.package_folder, 'lib', 'libcurl.la'))
 
     def package_info(self):
-        self.cpp_info.names['cmake'] = 'CURL'
         self.cpp_info.names['cmake_find_package'] = 'CURL'
         self.cpp_info.names['cmake_find_package_multi'] = 'CURL'
Repository: conan-io/conan-center-index
Issue: [package] asio/1.13.0: broken on Andriod

Commit: https://github.com/conan-io/conan-center-index/commit/804be2ad15b2139960fe10efcd6667d1f2dd2e98 breaks Android because there is no `-lpthread` 

Changed files:
recipes/asio/all/conanfile.py

diff --git a/recipes/asio/all/conanfile.py b/recipes/asio/all/conanfile.py
index 5d1a5c9a7..ead1ebd3e 100644
--- a/recipes/asio/all/conanfile.py
+++ b/recipes/asio/all/conanfile.py
@@ -8,6 +8,7 @@ class Asio(ConanFile):
     homepage = "http://think-async.com/Asio"
     description = "Asio is a cross-platform C++ library for network and low-level I/O"
     topics = ("conan", "asio", "network", "io", "low-level")
+    settings = "os"
     license = "BSL-1.0"
 
     no_copy_source = True
@@ -28,7 +29,7 @@ class Asio(ConanFile):
 
     def package_info(self):
         self.cpp_info.defines.append('ASIO_STANDALONE')
-        if tools.os_info.is_linux:
+        if str(self.settings.os) in ["Linux", "Android"]:
             self.cpp_info.libs.append('pthread')
 
     def package_id(self):
Repository: conan-io/conan-center-index
Issue: [spdlog] spdlog/1.5.0: Dependency version is incorrect

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **spdlog/1.5.0**
  * Operating System+version: **Windows 10 1909**
  * Compiler+version: **MSVC 15**
  * Conan version: **conan 1.22.2**
  * Python version: **Python 3.8.1**


### Conan profile (output of `conan profile show default` or `conan profile show <profile>` if custom profile is in use)
```
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.version=15
build_type=Release
[options]
[build_requires]
[env]
```

### Steps to reproduce (Include if Applicable)
Compile and run the following:
```cpp

#include "spdlog/spdlog.h"
#include "spdlog/sinks/rotating_file_sink.h"
#include <string>
int main() {
const std::string name = "logs/serial.txt";
auto dist_sink = std::make_shared<spdlog::sinks::dist_sink_mt>();
dist_sink->add_sink(std::make_shared<spdlog::sinks::rotating_file_sink_mt>("logs/" + name + ".txt", 1048576 * 5, 2, true));
return 0;
}
```
Always crashes trying to use fmt.


Changed files:
recipes/spdlog/all/conanfile.py

diff --git a/recipes/spdlog/all/conanfile.py b/recipes/spdlog/all/conanfile.py
index a5addf459..fffd8a386 100644
--- a/recipes/spdlog/all/conanfile.py
+++ b/recipes/spdlog/all/conanfile.py
@@ -1,6 +1,7 @@
 import os
 from conans import CMake, ConanFile, tools
 from conans.errors import ConanInvalidConfiguration
+from conans.tools import Version
 
 
 class SpdlogConan(ConanFile):
@@ -45,7 +46,10 @@ class SpdlogConan(ConanFile):
             raise ConanInvalidConfiguration("wchar is not yet supported under windows")
 
     def requirements(self):
-        self.requires("fmt/6.0.0")
+        if Version(self.version) >= "1.5.0":
+            self.requires("fmt/6.1.2")
+        else:
+            self.requires("fmt/6.0.0")
 
     def source(self):
         tools.get(**self.conan_data["sources"][self.version])
Repository: conan-io/conan-center-index
Issue: [package] libcurl/7.69.1: Update openssl version to 1.1.1e

Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **libcurl/7.69.1**

Update to `openssl-1.1.1e`

Break on `openssl-1.1.1d` because I have another package that has already update to `openssl-1.1.1e`

Changed files:
recipes/libcurl/all/conanfile.py

diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py
index 0f2453881..b03f7c9b7 100644
--- a/recipes/libcurl/all/conanfile.py
+++ b/recipes/libcurl/all/conanfile.py
@@ -111,7 +111,7 @@ class LibcurlConan(ConanFile):
             elif self.settings.os == "Windows" and self.options.with_winssl:
                 pass
             else:
-                self.requires.add("openssl/1.1.1d")
+                self.requires.add("openssl/1.1.1e")
         if self.options.with_libssh2:
             if self.settings.compiler != "Visual Studio":
                 self.requires.add("libssh2/1.9.0")
Repository: conan-io/conan-center-index
Issue: [OpenSSL] remove obsolete options

moved from https://github.com/conan-community/community/issues/234, by @firewave 

### Description of Problem, Request, or Question

In the latest OpenSSL 1.1.1 the following options are disabled by default and can be removed: `no_zlib`, `no_md2`, `no_rc4`, `no_rc5`

See https://github.com/openssl/openssl/blob/262c00882a2fd7cf16672bf467a86f75b4098a7c/Configure#L449

Also as zlib is no longer needed the dependency can be removed as well.
### Package Details (Include if Applicable)
* Package Name/Version: **OpenSSL/1.1.1c**

Changed files:
recipes/openssl/all/conanfile.py

diff --git a/recipes/openssl/all/conanfile.py b/recipes/openssl/all/conanfile.py
index 5956be8d9..4aeb2a2ea 100644
--- a/recipes/openssl/all/conanfile.py
+++ b/recipes/openssl/all/conanfile.py
@@ -131,9 +131,10 @@ class OpenSSLConan(ConanFile):
         try:
             tools.get(**self.conan_data["sources"][self.version])
         except ConanException:
+            self.output.warn("Downloading OpenSSL from the mirror.")
             url = self.conan_data["sources"][self.version]["url"]
             url = url.replace("https://www.openssl.org/source/",
-                              "https://www.openssl.org/source/old/%s" % self._full_version.base)
+                              "https://www.openssl.org/source/old/%s/" % self._full_version.base)
             tools.get(url, sha256=self.conan_data["sources"][self.version]["sha256"])
         extracted_folder = "openssl-" + self.version
         os.rename(extracted_folder, self._source_subfolder)
@@ -141,6 +142,11 @@ class OpenSSLConan(ConanFile):
     def configure(self):
         del self.settings.compiler.libcxx
         del self.settings.compiler.cppstd
+        if self._full_version >= "1.1.0":
+            del self.options.no_zlib
+            del self.options.no_md2
+            del self.options.no_rc4
+            del self.options.no_rc5
 
     def config_options(self):
         if self.settings.os != "Windows":
@@ -149,7 +155,7 @@ class OpenSSLConan(ConanFile):
             del self.options.fPIC
 
     def requirements(self):
-        if not self.options.no_zlib:
+        if not self.options.get_safe("no_zlib"):
             self.requires("zlib/1.2.11")
 
     @property
@@ -419,7 +425,7 @@ class OpenSSLConan(ConanFile):
         if self.settings.os == "Neutrino":
             args.append("-lsocket no-asm")
 
-        if not self.options.no_zlib:
+        if not self.options.get_safe("no_zlib"):
             zlib_info = self.deps_cpp_info["zlib"]
             include_path = zlib_info.include_paths[0]
             if self.settings.os == "Windows":
Repository: conan-io/conan-center-index
Issue: [package] libevent: name for find_package is wrong

upstream and vcpkg are using `Libevent`, here `libevent`


Changed files:
recipes/libevent/2.1.11/conanfile.py

diff --git a/recipes/libevent/2.1.11/conanfile.py b/recipes/libevent/2.1.11/conanfile.py
index 33fea5dae..f7d04e0a7 100644
--- a/recipes/libevent/2.1.11/conanfile.py
+++ b/recipes/libevent/2.1.11/conanfile.py
@@ -92,6 +92,9 @@ class LibeventConan(ConanFile):
 
     def package_info(self):
         self.cpp_info.libs = tools.collect_libs(self)
+        self.cpp_info.names["cmake_find_package"] = "Libevent"
+        self.cpp_info.names["cmake_find_package_multi"] = "Libevent"
+
         if self.settings.os == "Linux":
             self.cpp_info.system_libs.extend(["rt"])
Repository: conan-io/conan-center-index
Issue: [package] libcurl/all: output misleading


### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **libcurl/all**
  * Operating System+version: **not Windows**
  * Compiler+version: **not Visual Studio**

Implementation of `build()` method for not-Visual Studio contains some output that can lead to misunderstandings:

```python
    def _build_with_autotools(self):
        env_run = RunEnvironment(self)
        # run configure with *LD_LIBRARY_PATH env vars
        # it allows to pick up shared openssl
        self.output.info("Run vars: " + repr(env_run.vars))
```

Conan applies the environment from the profile before entering the `build` function, so the `Run vars:...` message could be improved if it says all the output (see issue https://github.com/conan-io/conan/issues/6586).

Or, even better, we could move this recipe to use `self.run("....", run_environment=True)` which applies the `RunEnvironment` too.



Changed files:
recipes/libcurl/all/conanfile.py

diff --git a/recipes/libcurl/all/conanfile.py b/recipes/libcurl/all/conanfile.py
index 125ceb0a2..ccb48778d 100644
--- a/recipes/libcurl/all/conanfile.py
+++ b/recipes/libcurl/all/conanfile.py
@@ -268,23 +268,22 @@ class LibcurlConan(ConanFile):
                 tools.save(os.path.join('lib', 'Makefile.am'), added_content, append=True)
 
     def _build_with_autotools(self):
-        env_run = RunEnvironment(self)
-        # run configure with *LD_LIBRARY_PATH env vars
-        # it allows to pick up shared openssl
-        self.output.info("Run vars: " + repr(env_run.vars))
-        with tools.environment_append(env_run.vars):
-            with tools.chdir(self._source_subfolder):
-                use_win_bash = self._is_mingw and not tools.cross_building(self.settings)
+        with tools.chdir(self._source_subfolder):
+            use_win_bash = self._is_mingw and not tools.cross_building(self.settings)
 
-                # autoreconf
-                self.run('./buildconf', win_bash=use_win_bash)
+            # autoreconf
+            self.run('./buildconf', win_bash=use_win_bash, run_environment=True)
 
-                # fix generated autotools files on alle to have relocateable binaries
-                if tools.is_apple_os(self.settings.os):
-                    tools.replace_in_file("configure", "-install_name \\\\$rpath/", "-install_name ")
+            # fix generated autotools files on alle to have relocateable binaries
+            if tools.is_apple_os(self.settings.os):
+                tools.replace_in_file("configure", "-install_name \\\\$rpath/", "-install_name ")
 
-                self.run("chmod +x configure")
+            self.run("chmod +x configure")
 
+            env_run = RunEnvironment(self)
+            # run configure with *LD_LIBRARY_PATH env vars it allows to pick up shared openssl
+            self.output.info("Run vars: " + repr(env_run.vars))
+            with tools.environment_append(env_run.vars):
                 autotools, autotools_vars = self._configure_autotools()
                 autotools.make(vars=autotools_vars)
Repository: conan-io/conan-center-index
Issue: [package] thrift/0.13.0: build fails using --profile but works using --profile:host and --profile:build

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **thrift/0.13.0**
  * Operating System+version: **Linux Ubuntu 18.04**
  * Compiler+version: **GCC 7**
  * Conan version: **conan 1.25.2**
  * Python version: **Python 3.6.9**


### Conan profile (output of `conan profile show default` or `conan profile show <profile>` if custom profile is in use)
```
Configuration for profile linux-x64:
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++11
build_type=Debug
[options]
*:fPIC=True
*:shared=True
[build_requires]
[env]
```


### Steps to reproduce (Include if Applicable)
I have a package that uses _thrift/0.13.0_ as build requirement (thrift compiler) and as normal requirement (thrift libs). When I build and create my package with

```conan create . --profile:host linux-x64 --profile:build linux-x64```

the build works perfectly, the thrift sources are compiled with the thrift compiler. When I  use

```conan create . --profile linux-x64```

the build fails when using the thrift compiler. The difference is that in the first case, the binary directories of all build requirement packages are added to PATH environment during build and in the second case, nothing is added to PATH. The cmake build of my package expects the thrift compiler being in PATH.

I was not sure if this is really a package bug and not a conan bug. Sorry if this was the wrong place.



Changed files:
recipes/thrift/all/conanfile.py

diff --git a/recipes/thrift/all/conanfile.py b/recipes/thrift/all/conanfile.py
index e24a45767..caf1f91eb 100644
--- a/recipes/thrift/all/conanfile.py
+++ b/recipes/thrift/all/conanfile.py
@@ -139,3 +139,7 @@ class ConanFileDefault(ConanFile):
             self.cpp_info.defines.append("NOMINMAX")
         elif self.settings.os == "Linux":
             self.cpp_info.system_libs.extend(["m", "pthread"])
+
+        bin_path = os.path.join(self.package_folder, "bin")
+        self.output.info("Appending PATH env var with : {}".format(bin_path))
+        self.env_info.PATH.append(bin_path)
Repository: conan-io/conan-center-index
Issue: zlib recipe overwrites ENV settings

I'm trying to build zlib using the following profile
```
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=clang
compiler.version=6.0
compiler.libcxx=libc++

[env]
CC = clang-6.0
CXX = clang++-6.0
```

Building zlib fails because I don't have _clang_ binary but only _clang-6.0_ binary because it's overwritten by the recipe. You also can't build with a different clang version, only the one provided by your _clang_ binary.

https://github.com/conan-io/conan-center-index/blob/a025bb0e4d523db2cf08c4eb7730079c94368b8e/recipes/zlib/1.2.11/conanfile.py#L68

It was already metioned in #306 but it's still in the recipe.

Changed files:
recipes/zlib/1.2.11/conanfile.py

diff --git a/recipes/zlib/1.2.11/conanfile.py b/recipes/zlib/1.2.11/conanfile.py
index 89f67af9c..370eefaff 100644
--- a/recipes/zlib/1.2.11/conanfile.py
+++ b/recipes/zlib/1.2.11/conanfile.py
@@ -65,7 +65,9 @@ class ZlibConan(ConanFile):
         else:
             make_target = "libz.a"
 
-        env = {"CC": "clang", "CXX": "clang++"} if "clang" in str(self.settings.compiler) else {}
+        env = {}
+        if "clang" in str(self.settings.compiler) and tools.get_env("CC") is None and tools.get_env("CXX") is None:
+            env = {"CC": "clang", "CXX": "clang++"}
         with tools.environment_append(env):
             env_build.configure("../", build=False, host=False, target=False)
             env_build.make(target=make_target)
@@ -80,7 +82,7 @@ class ZlibConan(ConanFile):
 
     def _build_zlib(self):
         with tools.chdir(self._source_subfolder):
-            # https://github.com/madler/zlib/issues/268 
+            # https://github.com/madler/zlib/issues/268
             tools.replace_in_file('gzguts.h',
                                   '#if defined(_WIN32) || defined(__CYGWIN__)',
                                   '#if defined(_WIN32) || defined(__MINGW32__)')
Repository: conan-io/conan-center-index
Issue: [package] yasm/1.3.0: Non-ascii character in description causes python error

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **yasm/1.3.0**
  * Operating System+version: **Linux Ubuntu 18.04**
  * Compiler+version: **GCC 7.4**
  * Conan version: **conan 1.19.2**
  * Python version: **Python 2.7.15+*


### Conan profile (output of `conan profile show default` or `conan profile show <profile>` if custom profile is in use)
```
Put your profile output here
```


### Steps to reproduce (Include if Applicable)

Install yasm/1.3.0

### Logs (Include/Attach if Applicable)
<details><summary>Click to expand log</summary>

```
yasm/1.3.0: Not found in local cache, looking in remotes...
yasm/1.3.0: Trying with 'conan-center'...
Downloading conanmanifest.txt: 100%|##########| 106/106 [00:00<00:00, 101kB/s]
Downloading conanfile.py: 100%|##########| 3.05k/3.05k [00:00<00:00, 3.24MB/s]
Downloading conan_export.tgz: 100%|##########| 257/257 [00:00<00:00, 231kB/s]
Decompressing conan_export.tgz: 265B [00:00, 207kB/s]                    
yasm/1.3.0: Downloaded recipe revision 0
ERROR: Error loading conanfile at '/home/gbbirtla/.conan/data/yasm/1.3.0/_/_/export/conanfile.py': Unable to load conanfile in /home/gbbirtla/.conan/data/yasm/1.3.0/_/_/export/conanfile.py
  File "/home/gbbirtla/.conan/data/yasm/1.3.0/_/_/export/conanfile.py", line 10
SyntaxError: Non-ASCII character '\\xe2' in file /home/gbbirtla/.conan/data/yasm/1.3.0/_/_/export/conanfile.py on line 10, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
```

</details>


Changed files:
recipes/yasm/all/conanfile.py

diff --git a/recipes/yasm/all/conanfile.py b/recipes/yasm/all/conanfile.py
index 25c294cae..5814eab0e 100644
--- a/recipes/yasm/all/conanfile.py
+++ b/recipes/yasm/all/conanfile.py
@@ -7,7 +7,7 @@ class YASMInstallerConan(ConanFile):
     version = "1.3.0"
     url = "https://github.com/conan-io/conan-center-index"
     homepage = "https://github.com/yasm/yasm"
-    description = "Yasm is a complete rewrite of the NASM assembler under the “new” BSD License"
+    description = 'Yasm is a complete rewrite of the NASM assembler under the "new" BSD License'
     license = "BSD"
     settings = "os_build", "arch_build", "compiler"
     _source_subfolder = "sources"
Repository: conan-io/conan-center-index
Issue: [package] boost/1.71.0: test_package uses non-existent option to trigger boost_python test

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **boost/1.71.0**
  * Operating System+version: **All**
  * Compiler+version: **All**
  * Docker image: **All**
  * Conan version: **conan 1.20.1**
  * Python version: **Python 3.7.5**

</details>

The package option to enable the `boost_python` library changed from `python` to `without_python` in [this commit from last year](https://github.com/conan-community/conan-boost/commit/5cd89111396f8b724394167d3de803f636bc9716). The `test_package` was not updated accordingly. It still uses the old option [here](https://github.com/conan-io/conan-center-index/blob/master/recipes/boost/all/test_package/conanfile.py#L17) and [here](https://github.com/conan-io/conan-center-index/blob/master/recipes/boost/all/test_package/conanfile.py#L28). As a result, the `boost_python` portion of the test package has not been getting exercised, and it appears that it is in need of some TLC.

Changed files:
recipes/boost/all/conanfile.py, recipes/boost/all/test_package/conanfile.py

diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py
index dd189902d..c0946aa10 100644
--- a/recipes/boost/all/conanfile.py
+++ b/recipes/boost/all/conanfile.py
@@ -30,7 +30,6 @@ class BoostConan(ConanFile):
     description = "Boost provides free peer-reviewed portable C++ source libraries"
     url = "https://github.com/conan-io/conan-center-index"
     homepage = "https://www.boost.org"
-    author = "Conan Community"
     license = "BSL-1.0"
     topics = ("conan", "boost", "libraries", "cpp")
     # The current python option requires the package to be built locally, to find default Python
diff --git a/recipes/boost/all/test_package/conanfile.py b/recipes/boost/all/test_package/conanfile.py
index ba73db4c5..dbc8a45dd 100644
--- a/recipes/boost/all/test_package/conanfile.py
+++ b/recipes/boost/all/test_package/conanfile.py
@@ -14,7 +14,7 @@ class DefaultNameConan(ConanFile):
             cmake.definitions["HEADER_ONLY"] = "TRUE"
         else:
             cmake.definitions["Boost_USE_STATIC_LIBS"] = not self.options["boost"].shared
-        if self.options["boost"].python:
+        if not self.options["boost"].without_python:
             cmake.definitions["WITH_PYTHON"] = "TRUE"
 
         cmake.configure()
@@ -25,7 +25,7 @@ class DefaultNameConan(ConanFile):
             return
         bt = self.settings.build_type
         self.run('ctest --output-on-error -C %s' % bt, run_environment=True)
-        if self.options["boost"].python:
+        if not self.options["boost"].without_python:
             os.chdir("bin")
             sys.path.append(".")
             import hello_ext
Repository: conan-io/conan-center-index
Issue: [package] Poco/all: Cmake upstream uses Poco, not poco

<!-- 
  Please don't forget to update the issue title.
  Include all applicable information to help us reproduce your problem.
-->

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **poco/all**

Upstream is using Poco and not poco and here. this issue is simuliar to #357 




### Steps to reproduce (Include if Applicable)
conanfile.txt
```txt
[requires]
poco/1.9.4 
[generators]
cmake_find_package
cmake_paths
```


CMakeLists.txt
```cmake
cmake_minimum_required(VERSION 3.10.0)
project(MyProject VERSION 0.1.0)
# does not work with conan
find_package(Poco REQUIRED COMPONENTS Foundation Net Zip )
# does work with conan
find_package(poco REQUIRED COMPONENTS Foundation Net Zip )
add_executable(my_exe main.cpp)
# does work with conan
target_link_libraries(my_exe PUBLIC Poco::Foundation Poco::Zip Poco::Net)
```



Changed files:
recipes/poco/all/conanfile.py

diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py
index 9fb75f4e5..073c5b7ee 100644
--- a/recipes/poco/all/conanfile.py
+++ b/recipes/poco/all/conanfile.py
@@ -7,8 +7,7 @@ from conans.errors import ConanInvalidConfiguration
 class PocoConan(ConanFile):
     name = "poco"
     url = "https://github.com/conan-io/conan-center-index"
-    homepage = "https://pocoproject.org"
-    author = "Poco Project <poco@pocoproject.org>"
+    homepage = "https://pocoproject.org"    
     topics = ("conan", "poco", "building", "networking", "server", "mobile", "embedded")
     exports_sources = "CMakeLists.txt"
     generators = "cmake"
@@ -185,3 +184,5 @@ class PocoConan(ConanFile):
             self.cpp_info.defines.extend(["POCO_STATIC=ON", "POCO_NO_AUTOMATIC_LIBS"])
             if self.settings.compiler == "Visual Studio":
                 self.cpp_info.libs.extend(["ws2_32", "Iphlpapi", "Crypt32"])
+        self.cpp_info.name = "Poco"
+
Repository: csparpa/pyowm
Issue: Parsing of wind values crashes when wind duct is missing

in 'weather.py' file, 'weather_from_dictionary' function:

    # -- wind
    if 'wind' in d:
        wind = d['wind'].copy()
    elif 'last' in d:
        if 'wind' in d['last']:
            wind = d['last']['wind'].copy()

gives:

File "C:\\Python27\\lib\\site-packages\\pyowm\\webapi25\\weather.py", line 464, in weather_from_dictionary
    wind = d['wind'].copy()
AttributeError: 'NoneType' object has no attribute 'copy'

when wind dict is None

Broadly speaking, we should check that _all_ provided dicts are not None before trying to copy/manipulate them.


Changed files:
pyowm/webapi25/weather.py

diff --git a/pyowm/webapi25/weather.py b/pyowm/webapi25/weather.py
index 0e22675..1fac0e7 100644
--- a/pyowm/webapi25/weather.py
+++ b/pyowm/webapi25/weather.py
@@ -458,7 +458,7 @@ def weather_from_dictionary(d):
     else:
         rain = dict()
     # -- wind
-    if 'wind' in d:
+    if 'wind' in d and d['wind'] is not None:
         wind = d['wind'].copy()
     elif 'last' in d:
         if 'wind' in d['last']:
Repository: salib/salib
Issue: SALib IndexError for FAST with low number of samples

Hi,

FAST behaves strangely when a low number of samples is used. I run the Ishigami example model function by using the script

``` python
from SALib.sample import fast_sampler
from SALib.analyze import fast
from SALib.test_functions import Ishigami

problem = {
    'num_vars': 3,
    'names': ['x1', 'x2', 'x3'],
    'bounds': [[-3.14159265359, 3.14159265359],
               [-3.14159265359, 3.14159265359],
               [-3.14159265359, 3.14159265359]]
}

param_values = fast_sampler.sample(problem, 33)

Y = Ishigami.evaluate(param_values)

Si = fast.analyze(problem, Y, print_to_console=False)
```

Using more than 33 samples (tested with > 70) runs perfectly fine. However, using this (33) or lower sample values results in the following error:

```
SALib\\sample\\fast_sampler.py:39: RuntimeWarning: invalid value encountered in remainder
  omega[1:] = np.arange(D - 1) % m + 1
\\SALib\\analyze\\fast.py:70: RuntimeWarning: invalid value encountered in remainder
  omega[1:] = np.arange(D - 1) % m + 1
\\SALib\\analyze\\fast.py:88: RuntimeWarning: invalid value encountered in power
  Sp = np.power(np.absolute(f[np.arange(1, int(N / 2))]) / N, 2)
Traceback (most recent call last):
  File "test.py", line 17, in <module>
    Si = fast.analyze(problem, Y, print_to_console=False)
  File "SALib\\analyze\\fast.py", line 78, in analyze
    Si['S1'][i] = compute_first_order(Y[l], N, M, omega[0])
  File "SALib\\analyze\\fast.py", line 90, in compute_first_order
    D1 = 2 * np.sum(Sp[np.arange(1, M + 1) * int(omega) - 1])
IndexError: index 15 is out of bounds for axis 0 with size 15
```

Although such a low sampling number is rarely needed in practice, it would be good to have an automatic check / warning if the number of samples is too low in case this error should be related to accuracy reasons in the FAST approach.


Changed files:
SALib/sample/fast_sampler.py, examples/fast/fast.py

diff --git a/SALib/sample/fast_sampler.py b/SALib/sample/fast_sampler.py
index fd4c5df..32d9184 100755
--- a/SALib/sample/fast_sampler.py
+++ b/SALib/sample/fast_sampler.py
@@ -27,6 +27,10 @@ def sample(problem, N, M=4):
         Fourier series decomposition (default 4)
     """
 
+    if N < 4*M**2:
+        raise ValueError("""
+        Sample size N > 4M^2 is required. M=4 by default.""")
+
     D = problem['num_vars']
 
     omega = np.empty([D])
diff --git a/examples/fast/fast.py b/examples/fast/fast.py
index 9c24d4a..9c20b77 100644
--- a/examples/fast/fast.py
+++ b/examples/fast/fast.py
@@ -1,14 +1,11 @@
 import sys
+sys.path.append('../..')
 
 from SALib.analyze import fast
 from SALib.sample import fast_sampler
 from SALib.test_functions import Ishigami
 from SALib.util import read_param_file
 
-
-sys.path.append('../..')
-
-
 # Read the parameter range file and generate samples
 problem = read_param_file('../../SALib/test_functions/params/Ishigami.txt')
Repository: interactions-py/interactions.py
Issue: [BUG] Leftover debug prints in synchronize()

**Describe the bug**

Starting the bot always print out the internal list of commands. This is presumably prints used during debugging that should have been removed or changed to proper logging. These lists can be very long if there are many registered commands with many parameters specified.

https://github.com/goverfl0w/interactions.py/blob/unstable/interactions/client.py#L272-L273

**Reproducing steps**

Start any valid bot.

**What's normally expected**
The bot starts up without unnecessary debug output.

**What actually happened**
The bot prints out two lists of application commands regardless of log level.

**Versions**
- [ ] I am using discord.py versions 1.7 and below with my code.
    - [ ] I am using 2.0 or higher, or a modified fork.
- [ ] I am using dis-snek with my code.
- [x] I am not using any of the listed above and am using the library code alone.


Changed files:
interactions/client.py

diff --git a/interactions/client.py b/interactions/client.py
index 043f9f0c..fbfbffce 100644
--- a/interactions/client.py
+++ b/interactions/client.py
@@ -269,8 +269,8 @@ class Client:
             command.get("name") for command in cached_commands if command.get("name")
         ]
 
-        print(cached_commands)
-        print(cached_command_names)
+        log.debug(f"Cached commands: {cached_commands}")
+        log.debug(f"Cached command names: {cached_command_names}")
 
         if cached_commands:
             for command in commands:
Repository: interactions-py/interactions.py
Issue: default_permission doesn't have any effect

Hi,

Thanks a lot for this project!

I am trying to restrict the use of a command to a specific role using the following options, though it does not seem to have any effect:
```
    "default_permission": False,
    "permissions": {
        GUILD_ID : [ create_permission(ROLE_ID, SlashCommandPermissionType.ROLE, True) ]
    },
```
Other options I've tried that don't work:
- Only setting one "positive" permission to the role
- Setting one "negative" permission to the role `@everyone` and one positive to one role (the negative permission has no effect)
- Setting default_permission=False without anything else also has no effect.

The only way I can disallow a role/user to use it is by explicit adding a negative permission for them, meaning that for admin commands I would need to add a negative permission to all the guild users (because some users don't have roles).

I believe that's not the intended behavior and is a bug right?


Changed files:
discord_slash/model.py

diff --git a/discord_slash/model.py b/discord_slash/model.py
index da5f201c..5d4e9619 100644
--- a/discord_slash/model.py
+++ b/discord_slash/model.py
@@ -70,16 +70,18 @@ class CommandData:
 
     :ivar name: Name of the command.
     :ivar description: Description of the command.
+    :ivar default_permission: Indicates whether users should have permissions to run this command by default.
     :ivar options: List of :class:`OptionData`.
     :ivar id: Command id, this is received from discord so may not be present
     :ivar application_id: The application id of the bot, required only when the application id and bot id are different. (old bots)
     """
 
     def __init__(
-            self, name, description, options=None, id=None, application_id=None, version=None, **kwargs
+            self, name, description, options=None, default_permission=True, id=None, application_id=None, version=None, **kwargs
     ):
         self.name = name
         self.description = description
+        self.default_permission = default_permission
         self.id = id
         self.application_id = application_id
         self.version = version
@@ -96,6 +98,7 @@ class CommandData:
                     self.name == other.name
                     and self.description == other.description
                     and self.options == other.options
+                    and self.default_permission == other.default_permission
             )
         else:
             return False
Repository: miurahr/aqtinstall
Issue: Some errors appear after install

When i execute:

```
aqt install -O qt 6.0.1 mac desktop  
```

I got:

```
2021-02-19 14:49:44,531 - aqt - INFO - aqtinstall(aqt) v1.1.1 on Python 3.9.1 [CPython Clang 12.0.0 (clang-1200.0.32.29)]
2021-02-19 14:50:04,901 - aqt - INFO - Patching qt/6.0.1/clang_64/bin/qmake
2021-02-19 14:50:04,920 - aqt - INFO - Finished installation
2021-02-19 14:50:04,920 - aqt - INFO - Time elasped: 20.39480686 second
/usr/local/Cellar/python@3.9/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 4 leaked semaphore objects to clean up at shutdown     
  warnings.warn('resource_tracker: There appear to be %d '
```

How can i solve it?

Changed files:
aqt/installer.py

diff --git a/aqt/installer.py b/aqt/installer.py
index 93076c2..f5d86f7 100644
--- a/aqt/installer.py
+++ b/aqt/installer.py
@@ -171,6 +171,8 @@ class Cli:
             tasks.append((arc, base_dir, sevenzip))
         pool = multiprocessing.Pool(self.settings.concurrency)
         pool.starmap(installer, tasks)
+        pool.close()
+        pool.join()
 
     def run_install(self, args):
         """Run install subcommand"""
Repository: miurahr/aqtinstall
Issue: Exception

```
 Traceback (most recent call last):
  File "c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\\hostedtoolcache\\windows\\Python\\3.7.9\\x64\\Scripts\\aqt.exe\\__main__.py", line 7, in <module>
  File "c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\aqt\\__init__.py", line 31, in main
    return cli.run()
  File "c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\aqt\\installer.py", line 675, in run
    result = args.func(args)
  File "c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\aqt\\installer.py", line 437, in run_tool
    timeout=timeout,
  File "c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\aqt\\archives.py", line 365, in __init__
    os_name, "desktop", version, arch, base, timeout=timeout
  File "c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\aqt\\archives.py", line 174, in __init__
    self._get_archives()
  File "c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\aqt\\archives.py", line 375, in _get_archives
    self._parse_update_xml(archive_url, [])
  File "c:\\hostedtoolcache\\windows\\python\\3.7.9\\x64\\lib\\site-packages\\aqt\\archives.py", line 395, in _parse_update_xml
    if not full_version.base_version == self.version.base_version:
AttributeError: 'Version' object has no attribute 'base_version'a
```

Used command: `aqt tool windows tools_openssl_x64 1.1.1 qt.tools.openssl.win_x64` but it does not happen on my home PC, only on Github runner/actions. It has something to do with deps versions maybe?

Changed files:
aqt/archives.py

diff --git a/aqt/archives.py b/aqt/archives.py
index d6265eb..642898b 100644
--- a/aqt/archives.py
+++ b/aqt/archives.py
@@ -392,7 +392,7 @@ class ToolArchives(QtArchives):
                     downloadable_archives = []
                 named_version = packageupdate.find("Version").text
                 full_version = Version(named_version)
-                if not full_version.base_version == self.version.base_version:
+                if full_version.truncate("patch") != self.version.truncate("patch"):
                     self.logger.warning(
                         "Base Version of {} is different from requested version {} -- skip.".format(
                             named_version, self.version