in_source_id stringlengths 13 58 | issue stringlengths 3 241k | before_files listlengths 0 3 | after_files listlengths 0 3 | pr_diff stringlengths 109 107M ⌀ |
|---|---|---|---|---|
scipy__scipy-16173 | BUG: curve_fit gives wrong results with Pandas float32
### Describe your issue.
This issue is related to previous issues with curve_fit and float32, which were partially resolved in PR #10076. Incorrect fitting still happens when passing data as a float32 Pandas Series. Here is an example adapted from #2280.
### ... | [
{
"content": "import warnings\nfrom . import _minpack\n\nimport numpy as np\nfrom numpy import (atleast_1d, dot, take, triu, shape, eye,\n transpose, zeros, prod, greater,\n asarray, inf,\n finfo, inexact, issubdtype, dtype)\nfrom scipy.linalg import svd, ch... | [
{
"content": "import warnings\nfrom . import _minpack\n\nimport numpy as np\nfrom numpy import (atleast_1d, dot, take, triu, shape, eye,\n transpose, zeros, prod, greater,\n asarray, inf,\n finfo, inexact, issubdtype, dtype)\nfrom scipy.linalg import svd, ch... | diff --git a/scipy/optimize/_minpack_py.py b/scipy/optimize/_minpack_py.py
index ecbb2e798eea..2d4c20ddbdb3 100644
--- a/scipy/optimize/_minpack_py.py
+++ b/scipy/optimize/_minpack_py.py
@@ -699,6 +699,9 @@ def curve_fit(f, xdata, ydata, p0=None, sigma=None, absolute_sigma=False,
Notes
-----
+ Users shou... |
PyGithub__PyGithub-1179 | MainGithub get_organizations unexpected return type
Hello. I have started writting a Git interaction tool for my current workplace. We have our own instance of GHE and organise everything into orgs. I have started used PyGithub, currently using v1.43.7, which should be the latest one.
Apologies if this has been ask... | [
{
"content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2013 AKFish <akfish@gmail.com> #\n# Copyright 2013 Ed Jacks... | [
{
"content": "# -*- coding: utf-8 -*-\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2013 AKFish <akfish@gmail.com> #\n# Copyright 2013 Ed Jacks... | diff --git a/github/MainClass.py b/github/MainClass.py
index de81b2042e..f41c201561 100644
--- a/github/MainClass.py
+++ b/github/MainClass.py
@@ -273,7 +273,7 @@ def get_organizations(self, since=github.GithubObject.NotSet):
if since is not github.GithubObject.NotSet:
url_parameters["since"] = si... |
strawberry-graphql__strawberry-1726 | `dacite` library doesn't compatible after 0.69.0 strawberry-graphql. (unhasable type 'StrawberryOptional' problem)
I have a regression issue with StrawberryOptional (breaking changes in 0.69.0)
When I use dacite library to convert dict to strawberry.type class instance, it works in 0.67.x version.
```
from dacit... | [
{
"content": "from __future__ import annotations\n\nfrom abc import ABC, abstractmethod\nfrom typing import TYPE_CHECKING, List, Mapping, TypeVar, Union\n\n\nif TYPE_CHECKING:\n from .types.types import TypeDefinition\n\n\nclass StrawberryType(ABC):\n @property\n def type_params(self) -> List[TypeVar]:... | [
{
"content": "from __future__ import annotations\n\nfrom abc import ABC, abstractmethod\nfrom typing import TYPE_CHECKING, List, Mapping, TypeVar, Union\n\n\nif TYPE_CHECKING:\n from .types.types import TypeDefinition\n\n\nclass StrawberryType(ABC):\n @property\n def type_params(self) -> List[TypeVar]:... | diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 0000000000..82b3b94ede
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,5 @@
+Release type: patch
+
+This release makes StrawberryOptional and StrawberryList hashable,
+allowing to use strawberry types with libraries like dacite and
+dataclasses_json.
diff --git ... |
comic__grand-challenge.org-1152 | Add functionality to filter ImageFile objects by RawImageUploadSession from a client
**Is your feature request related to a problem? Please describe.**
I would like to know which ImageFile was generated by a specific RawImageUploadSession from gcapi
**Describe the solution you'd like**
Add an additional item to the ... | [
{
"content": "from django.contrib import messages\nfrom django.http import Http404\nfrom django.views.generic import DetailView\nfrom guardian.mixins import (\n LoginRequiredMixin,\n PermissionRequiredMixin as ObjectPermissionRequiredMixin,\n)\nfrom rest_framework import status\nfrom rest_framework.decora... | [
{
"content": "from django.contrib import messages\nfrom django.http import Http404\nfrom django.views.generic import DetailView\nfrom guardian.mixins import (\n LoginRequiredMixin,\n PermissionRequiredMixin as ObjectPermissionRequiredMixin,\n)\nfrom rest_framework import status\nfrom rest_framework.decora... | diff --git a/app/grandchallenge/cases/views.py b/app/grandchallenge/cases/views.py
index f9d80786c2..1030ec4bbf 100644
--- a/app/grandchallenge/cases/views.py
+++ b/app/grandchallenge/cases/views.py
@@ -51,6 +51,7 @@ def get_queryset(self):
filters = {
"worklist": self.request.query_params.get("wo... |
xonsh__xonsh-3964 | 'Window' object has no attribute 'children'
<!--- Provide a general summary of the issue in the Title above -->
<!--- If you have a question along the lines of "How do I do this Bash command in xonsh"
please first look over the Bash to Xonsh translation guide: https://xon.sh/bash_to_xsh.html
If you don't find an ans... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Completer implementation to use with prompt_toolkit.\"\"\"\nimport os\nimport builtins\n\nfrom prompt_toolkit.completion import Completer, Completion\nfrom prompt_toolkit.auto_suggest import AutoSuggestFromHistory\nfrom prompt_toolkit.application.current import get_a... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"Completer implementation to use with prompt_toolkit.\"\"\"\nimport os\nimport builtins\n\nfrom prompt_toolkit.completion import Completer, Completion\nfrom prompt_toolkit.auto_suggest import AutoSuggestFromHistory\nfrom prompt_toolkit.application.current import get_a... | diff --git a/news/fix-ptk-completion-window-reserve_space.rst b/news/fix-ptk-completion-window-reserve_space.rst
new file mode 100644
index 0000000000..17b08cfcde
--- /dev/null
+++ b/news/fix-ptk-completion-window-reserve_space.rst
@@ -0,0 +1,23 @@
+**Added:**
+
+* <news item>
+
+**Changed:**
+
+* <news item>
+
+**Depr... |
zestedesavoir__zds-site-5295 | Paramètre GET pour activer la miniature twitter en `summary_large_image`
Ajouter une vérification `?twittercard=large` pour activer la twittercard en large dans le front.
Minimum : 300 x 157 idéal : 600 x 314
https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/summary-card-with-large-image.h... | [
{
"content": "from os.path import join\nfrom pathlib import Path\n\nfrom django.utils.translation import gettext_lazy as _\n\nfrom .config import config\nfrom .base_dir import BASE_DIR\n\n\nzds_config = config.get('zds', {})\n\n\nGEOIP_PATH = join(BASE_DIR, 'geodata')\n\n\nES_ENABLED = True\n\nES_CONNECTIONS = ... | [
{
"content": "from os.path import join\nfrom pathlib import Path\n\nfrom django.utils.translation import gettext_lazy as _\n\nfrom .config import config\nfrom .base_dir import BASE_DIR\n\n\nzds_config = config.get('zds', {})\n\n\nGEOIP_PATH = join(BASE_DIR, 'geodata')\n\n\nES_ENABLED = True\n\nES_CONNECTIONS = ... | diff --git a/templates/base.html b/templates/base.html
index 0c1e0250eb..f8a9683cfa 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -67,7 +67,11 @@
{# Twitter cards #}
<meta property="twitter:domain" content="{{app.site.url}}/">
- <meta property="twitter:card" content="summary">
+ {% if ... |
kserve__kserve-704 | storage-initialiser fails to copy model from S3
Upon using a Secret and Service account that look like this:
```
apiVersion: v1
metadata:
name: kfserving-aws-secret
namespace: {namespace}
annotations:
serving.kubeflow.org/s3-endpoint: s3.eu-east-1.amazonaws.com
serving.kubeflow.org/s3-usehttps: ... | [
{
"content": "# Copyright 2020 kubeflow.org.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | [
{
"content": "# Copyright 2020 kubeflow.org.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | diff --git a/config/default/configmap/inferenceservice.yaml b/config/default/configmap/inferenceservice.yaml
index 504bcb12a74..5728cb1f0c9 100644
--- a/config/default/configmap/inferenceservice.yaml
+++ b/config/default/configmap/inferenceservice.yaml
@@ -18,7 +18,7 @@ data:
"1.13.0",
"... |
pymodbus-dev__pymodbus-1663 | Simulator server cannot start in current dev branch
<!--
Before opening a new issue, make sure you do the following:
- Check that your issue isn't already filed: https://github.com/pymodbus-dev/pymodbus/issues
- Check the discussions forum https://github.com/pymodbus-dev/pymodbus/discussions
- Prepare a short, ru... | [
{
"content": "\"\"\"HTTP server for modbus simulator.\"\"\"\nimport asyncio\nimport dataclasses\nimport importlib\nimport json\nimport os\nfrom time import time\nfrom typing import List\n\n\ntry:\n from aiohttp import web\nexcept ImportError:\n web = None\n\nfrom pymodbus.datastore import ModbusServerCont... | [
{
"content": "\"\"\"HTTP server for modbus simulator.\"\"\"\nimport asyncio\nimport dataclasses\nimport importlib\nimport json\nimport os\nfrom time import time\nfrom typing import List\n\n\ntry:\n from aiohttp import web\nexcept ImportError:\n web = None\n\nfrom pymodbus.datastore import ModbusServerCont... | diff --git a/pymodbus/server/simulator/http_server.py b/pymodbus/server/simulator/http_server.py
index 02e3c4ea9..3ed05da64 100644
--- a/pymodbus/server/simulator/http_server.py
+++ b/pymodbus/server/simulator/http_server.py
@@ -149,7 +149,6 @@ def __init__(
else:
custom_actions_dict = None
... |
mozilla__bugbug-1713 | Set up Sentry for bugbug
Adding it will help investigate issues (like the Mercurial woes).
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport os\nimport sys\n\nfrom redis import Red... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport os\nimport sys\n\nimport sentry_sdk\nfr... | diff --git a/.isort.cfg b/.isort.cfg
index 987f4f36a5..93d5778dd2 100644
--- a/.isort.cfg
+++ b/.isort.cfg
@@ -3,4 +3,4 @@ multi_line_output=3
include_trailing_comma=True
line_length=88
known_first_party = bugbug,bugbug_http
-known_third_party = _pytest,adr,apispec,apispec_webframeworks,boto3,cerberus,dateutil,flask... |
Pycord-Development__pycord-119 | ViewStore.remove_view raises TypeError
### Summary
ViewStore.remove_view raises TypeError
### Reproduction Steps
I couldn't find a pattern for this error.
### Minimal Reproducible Code
_No response_
### Expected Results
View.children only contains Items.
### Actual Results
View.children seem to contain Compone... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nth... | [
{
"content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-present Rapptz\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without restriction, including without limitation\nth... | diff --git a/discord/ui/view.py b/discord/ui/view.py
index acabd20c13..670f05eff5 100644
--- a/discord/ui/view.py
+++ b/discord/ui/view.py
@@ -402,7 +402,7 @@ def refresh(self, components: List[Component]):
item = _component_to_item(component)
if not item.is_dispatchable():
... |
statsmodels__statsmodels-8320 | MAINT: `pre`-tests with dev versions are not running anymore
from latest merge commit test run
https://dev.azure.com/statsmodels/statsmodels-testing/_build/results?buildId=4558&view=logs&j=3618ddf5-2391-5260-f9eb-8f35f95d270b&t=a24edd62-b2b9-54c8-9892-98a88509521b
pytest problems with pandas or pytest config prob... | [
{
"content": "from statsmodels.compat.pandas import Appender, is_numeric_dtype\n\nfrom typing import Sequence, Union\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.core.dtypes.common import is_categorical_dtype\nfrom scipy import stats\n\nfrom statsmodels.iolib.table import SimpleTable\nfrom statsmodel... | [
{
"content": "from statsmodels.compat.pandas import Appender, is_numeric_dtype\n\nfrom typing import Sequence, Union\n\nimport numpy as np\nimport pandas as pd\nfrom pandas.core.dtypes.common import is_categorical_dtype\nfrom scipy import stats\n\nfrom statsmodels.iolib.table import SimpleTable\nfrom statsmodel... | diff --git a/setup.cfg b/setup.cfg
index 72f2e0d8395..9351a84f997 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -43,7 +43,6 @@ filterwarnings =
error:recarray support has been deprecated:FutureWarning
error:The value returned will change to a:FutureWarning
error:The default value of lags:FutureWarning
- e... |
MongoEngine__mongoengine-2800 | “AttributeError: ‘_thread._local’ object has no attribute ‘no_dereferencing_class’ in Multithreaded Environment”
Hi,
### Details :
In my project, I’m using ASGI’s **sync_to_async** utility. I believe this utility creates multiple threads using a thread pool executor, and each thread has its own thread-local stor... | [
{
"content": "import threading\nfrom contextlib import contextmanager\n\nfrom pymongo.read_concern import ReadConcern\nfrom pymongo.write_concern import WriteConcern\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.connection import DEFAULT_CONNECTION_NAME, get_db\nfrom mongoengine.pymongo_supp... | [
{
"content": "import threading\nfrom contextlib import contextmanager\n\nfrom pymongo.read_concern import ReadConcern\nfrom pymongo.write_concern import WriteConcern\n\nfrom mongoengine.common import _import_class\nfrom mongoengine.connection import DEFAULT_CONNECTION_NAME, get_db\nfrom mongoengine.pymongo_supp... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 0c767b576..81e1cf59e 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -8,6 +8,10 @@ Development
===========
- (Fill this out as you fix issues and develop your features).
+Changes in 0.28.1
+=================
+- Fix bug related with recent update... |
encode__django-rest-framework-1511 | Possible error in Docstring,
In the `Field` class, the [docstring](https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/fields.py#L167) for the `initialize` method seems to have a mistake.
The comment refers to a `model_field` parameter, but the parameters in the function are called `parent`... | [
{
"content": "\"\"\"\nSerializer fields perform validation on incoming data.\n\nThey are very similar to Django's form fields.\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport copy\nimport datetime\nimport inspect\nimport re\nimport warnings\nfrom decimal import Decimal, DecimalException\nfrom django ... | [
{
"content": "\"\"\"\nSerializer fields perform validation on incoming data.\n\nThey are very similar to Django's form fields.\n\"\"\"\nfrom __future__ import unicode_literals\n\nimport copy\nimport datetime\nimport inspect\nimport re\nimport warnings\nfrom decimal import Decimal, DecimalException\nfrom django ... | diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index 68b956822a..946a595456 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -164,7 +164,7 @@ def initialize(self, parent, field_name):
Called to set up a field prior to field_to_native or field_from_native.
par... |
pyro-ppl__numpyro-1687 | Specify python version for pip
Can the python version be specified for pip in the setup.py? Specifically using the method here:
- https://stackoverflow.com/questions/45778790/specifying-the-minimum-python-version-required-for-a-module-in-pip
i.e. `python_requires` so that it's picked up by pip
Currently, the up... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\n_jax_versio... | [
{
"content": "# Copyright Contributors to the Pyro project.\n# SPDX-License-Identifier: Apache-2.0\n\nfrom __future__ import absolute_import, division, print_function\n\nimport os\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_PATH = os.path.dirname(os.path.abspath(__file__))\n_jax_versio... | diff --git a/setup.py b/setup.py
index dd9304fcf..a14e56a9b 100644
--- a/setup.py
+++ b/setup.py
@@ -86,6 +86,7 @@
"tpu": f"jax[tpu]{_jax_version_constraints}",
"cuda": f"jax[cuda]{_jax_version_constraints}",
},
+ python_requires=">=3.9",
long_description=long_description,
long_descr... |
geopandas__geopandas-2849 | ENH: More descriptive error if duplicate geometry column is detected
I was dealing with a vague error for a while until I found out that the problem was caused by a duplicate `geom` column (the query was quite complex with a lot of CTES and joins, and it ended with a `SELECT * FROM...` so it took a while to figure out ... | [
{
"content": "import warnings\nfrom contextlib import contextmanager\n\nimport pandas as pd\n\nimport shapely\nimport shapely.wkb\n\nfrom geopandas import GeoDataFrame\n\nfrom .. import _compat as compat\n\n\n@contextmanager\ndef _get_conn(conn_or_engine):\n \"\"\"\n Yield a connection within a transactio... | [
{
"content": "import warnings\nfrom contextlib import contextmanager\n\nimport pandas as pd\n\nimport shapely\nimport shapely.wkb\n\nfrom geopandas import GeoDataFrame\n\nfrom .. import _compat as compat\n\n\n@contextmanager\ndef _get_conn(conn_or_engine):\n \"\"\"\n Yield a connection within a transactio... | diff --git a/geopandas/io/sql.py b/geopandas/io/sql.py
index bbbc62228a..89090c4277 100644
--- a/geopandas/io/sql.py
+++ b/geopandas/io/sql.py
@@ -65,6 +65,12 @@ def _df_to_geodf(df, geom_col="geom", crs=None):
if geom_col not in df:
raise ValueError("Query missing geometry column '{}'".format(geom_col))
... |
ansible-collections__amazon.aws-458 | Documentation for "groups" in aws_ec2.py module
### Summary
The module does not have any examples of how to use `groups`. I think this is what I would use to add all items from a specific inventory configuration to a dynamic group for use in playbooks.
### Issue Type
Documentation Report
### Component Name
aws_ec2... | [
{
"content": "# Copyright (c) 2017 Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = type\n\nDOCUMENTATION = '''\n name: aws_ec2\n plugin_type: inventory\n ... | [
{
"content": "# Copyright (c) 2017 Ansible Project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import (absolute_import, division, print_function)\n__metaclass__ = type\n\nDOCUMENTATION = '''\n name: aws_ec2\n plugin_type: inventory\n ... | diff --git a/plugins/inventory/aws_ec2.py b/plugins/inventory/aws_ec2.py
index 71a7ec30f23..061ca2193c6 100644
--- a/plugins/inventory/aws_ec2.py
+++ b/plugins/inventory/aws_ec2.py
@@ -188,6 +188,23 @@
exclude_filters:
- tag:Name:
- 'my_first_tag'
+
+# Example using groups to assign the running hosts to a group ba... |
google__jax-16068 | Potential typo for `jax.log_compiles`
### Description
`jax.log_compiles()` currently sets the flag for `jax_log_checkpoint_residuals` instead of `jax_log_compiles`, which looks like a typo.
This looks like a copy-paste error introduced by 6b4262d9f6ee36aea16ba7cfac639904b499661c.
https://github.com/google/jax/bl... | [
{
"content": "# Copyright 2018 The JAX Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | [
{
"content": "# Copyright 2018 The JAX Authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by ap... | diff --git a/jax/_src/config.py b/jax/_src/config.py
index 68d448111867..b09e3084dea3 100644
--- a/jax/_src/config.py
+++ b/jax/_src/config.py
@@ -742,7 +742,7 @@ def update_thread_local_jit_state(**kw):
'option is set, the log level is WARNING; otherwise the level is '
'DEBUG.'))
-log_compiles ... |
secdev__scapy-3148 | Can't concat str to bytes
#### Brief description
<!-- describe the main issue in one sentence -->
<!-- if possible, describe what components / protocols could be affected by the issue (e.g. wrpcap() + IPv6, it is likely this also affects XXX) -->
Hello everyone,
I have a DHCP listener which uses L2 socket thi... | [
{
"content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n# This program is published under a GPLv2 license\n\n\"\"\"LLTD Protocol\n\nhttps://msdn.microsoft.com/en-us/library/cc233983.aspx\n\n\"\"\"\n\nfrom __f... | [
{
"content": "# This file is part of Scapy\n# See http://www.secdev.org/projects/scapy for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n# This program is published under a GPLv2 license\n\n\"\"\"LLTD Protocol\n\nhttps://msdn.microsoft.com/en-us/library/cc233983.aspx\n\n\"\"\"\n\nfrom __f... | diff --git a/scapy/layers/lltd.py b/scapy/layers/lltd.py
index c9ce0c0adb6..30af08719da 100644
--- a/scapy/layers/lltd.py
+++ b/scapy/layers/lltd.py
@@ -111,8 +111,8 @@ def mysummary(self):
def hashret(self):
tos, function = self.tos, self.function
- return "%c%c" % self.answer_hashret.get((tos, ... |
conan-io__conan-3033 | [bug] SystemPackageTool doesn't correctly detect when apt packages are installed
**Summary**
`SystemPackageTool` uses `dpkg -s <package_name>` to detect whether a package is installed via apt. This is not a sufficient check, and fails to detect that a package has been uninstalled.
Line where the issue is:
https://... | [
{
"content": "import os\nfrom conans.client.runner import ConanRunner\nfrom conans.client.tools.oss import OSInfo\nfrom conans.errors import ConanException\nfrom conans.util.env_reader import get_env\n\n_global_output = None\n\n\nclass SystemPackageTool(object):\n\n def __init__(self, runner=None, os_info=No... | [
{
"content": "import os\nfrom conans.client.runner import ConanRunner\nfrom conans.client.tools.oss import OSInfo\nfrom conans.errors import ConanException\nfrom conans.util.env_reader import get_env\n\n_global_output = None\n\n\nclass SystemPackageTool(object):\n\n def __init__(self, runner=None, os_info=No... | diff --git a/conans/client/tools/system_pm.py b/conans/client/tools/system_pm.py
index 2e69f614121..89c0f9d415e 100644
--- a/conans/client/tools/system_pm.py
+++ b/conans/client/tools/system_pm.py
@@ -135,7 +135,7 @@ def install(self, package_name):
_run(self._runner, "%sapt-get install -y %s%s" % (self._sudo_... |
CTFd__CTFd-1033 | Exporting always downloads the same zip
**Environment**:
- CTFd Version/Commit: 2.1.2
- Operating System: Standard docker-compose launch on Linux
- Web Browser and Version: Firefox 67.0.3
**What happened?**
When exporting the challenges from `/admin/config#backup`, the same zip downloads as the first e... | [
{
"content": "from flask import (\n current_app as app,\n render_template,\n request,\n redirect,\n url_for,\n Blueprint,\n abort,\n render_template_string,\n send_file,\n)\n\nfrom CTFd.utils.decorators import admins_only\nfrom CTFd.utils.user import is_admin\nfrom CTFd.utils.security... | [
{
"content": "from flask import (\n current_app as app,\n render_template,\n request,\n redirect,\n url_for,\n Blueprint,\n abort,\n render_template_string,\n send_file,\n)\n\nfrom CTFd.utils.decorators import admins_only\nfrom CTFd.utils.user import is_admin\nfrom CTFd.utils.security... | diff --git a/CTFd/admin/__init__.py b/CTFd/admin/__init__.py
index f12465be9..8872fe499 100644
--- a/CTFd/admin/__init__.py
+++ b/CTFd/admin/__init__.py
@@ -110,7 +110,9 @@ def export_ctf():
ctf_name = ctf_config.ctf_name()
day = datetime.datetime.now().strftime("%Y-%m-%d")
full_name = u"{}.{}.zip".forma... |
pyodide__pyodide-2913 | https://pyodide.org/en/latest/console.html doesn't show latest `main` version
## 🐛 Bug
The https://pyodide.org/en/latest/console.html console is stuck at `v0.21.0a3`. I believe this is because the version wasn't bumped to the next 'dev' version after the `v0.21.0a3` release, so somebody probably needs to run
```
... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n\n# -- Path setup --------------------------------------------------------------\n\nimport atexit\nimport os\nimport shutil\nimport subprocess\nimport sys\nfrom pathlib import Path\nfrom typing import Any\nfrom unittest import mock\n\n# -... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n\n# -- Path setup --------------------------------------------------------------\n\nimport atexit\nimport os\nimport shutil\nimport subprocess\nimport sys\nfrom pathlib import Path\nfrom typing import Any\nfrom unittest import mock\n\n# -... | diff --git a/docs/conf.py b/docs/conf.py
index 528b1e8eb32..756dc810471 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -17,7 +17,7 @@
copyright = "2019-2022, Pyodide contributors and Mozilla"
pyodide_version = "0.21.0a3"
-if ".dev" in pyodide_version:
+if ".dev" in pyodide_version or os.environ.get("READTHEDOCS_VE... |
openfun__richie-2270 | Organization page / Organization list placeholder
## Feature Request
**Is your feature request related to a problem or unsupported use case? Please describe.**
Some organizations are actually consortiums. For those kind of organization, editor should be able to list on the organization page, all organizations inclu... | [
{
"content": "\"\"\"\nDefault settings for the Richie courses app.\n\nIf you use Django Configuration for your settings, you can use our mixin to import these\ndefault settings:\n ```\n from configurations import Configuration\n from richie.apps.courses.settings.mixins import RichieCoursesConfiguration... | [
{
"content": "\"\"\"\nDefault settings for the Richie courses app.\n\nIf you use Django Configuration for your settings, you can use our mixin to import these\ndefault settings:\n ```\n from configurations import Configuration\n from richie.apps.courses.settings.mixins import RichieCoursesConfiguration... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 325d5ee026..6dd63f853d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,10 @@ Versioning](https://semver.org/spec/v2.0.0.html).
## [Unrealeased]
+### Added
+
+- `related_organizations` placeholder on organization detail page
+
### Changed
- Upgrade to node ... |
ipython__ipython-14172 | Unable to run `ipapp.py`
There is a problem with the `ipython/terminal/ipapp.py` file.
On the first line is this:
```python
#!/usr/bin/env python
```
this is an mistake, because further down in the code there is a relative import that makes the file not executable with `./ipapp.py`.
So please remove `#!/usr/bin... | [
{
"content": "#!/usr/bin/env python\n# encoding: utf-8\n\"\"\"\nThe :class:`~traitlets.config.application.Application` object for the command\nline :command:`ipython` program.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\n\nimport logging\nim... | [
{
"content": "# encoding: utf-8\n\"\"\"\nThe :class:`~traitlets.config.application.Application` object for the command\nline :command:`ipython` program.\n\"\"\"\n\n# Copyright (c) IPython Development Team.\n# Distributed under the terms of the Modified BSD License.\n\n\nimport logging\nimport os\nimport sys\nim... | diff --git a/IPython/terminal/ipapp.py b/IPython/terminal/ipapp.py
index 6280bce3b20..eed452c935c 100755
--- a/IPython/terminal/ipapp.py
+++ b/IPython/terminal/ipapp.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
# encoding: utf-8
"""
The :class:`~traitlets.config.application.Application` object for the command
@@ -337,7... |
conda__conda-4789 | CondaError resulting from incorrect path
I ran `conda update --all` and got:
```
jessime@jessime-Q502LA:~$ conda update --all
Fetching package metadata .........
Solving package specifications: .
Package plan for installation in environment /home/jessime/anaconda2:
The following NEW packages will be INSTALL... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom abc import ABCMeta, abstractmethod, abstractproperty\nfrom errno import EXDEV\nimport json\nfrom logging import getLogger\nfrom os.path import dirname, join\nimport re\n\nfrom .linke... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom abc import ABCMeta, abstractmethod, abstractproperty\nfrom errno import EXDEV\nimport json\nfrom logging import getLogger\nfrom os.path import dirname, join\nimport re\n\nfrom .linke... | diff --git a/conda/core/path_actions.py b/conda/core/path_actions.py
index 31ac276f15d..e5789f0e4b4 100644
--- a/conda/core/path_actions.py
+++ b/conda/core/path_actions.py
@@ -811,6 +811,7 @@ def execute(self):
target_package_cache[package_cache_entry.dist] = package_cache_entry
def reverse(self):
+ ... |
evennia__evennia-3507 | [BUG] Prototype wizard loses changes to prototype when updating spawned objects
(Resolved by https://github.com/evennia/evennia/pull/3507.)
#### Describe the bug
When updating existing objects from a template, you are asked twice if you want to save changes to the template -- once when you use `sa` to save and ag... | [
{
"content": "\"\"\"\nSpawner\n\nThe spawner takes input files containing object definitions in\ndictionary forms. These use a prototype architecture to define\nunique objects without having to make a Typeclass for each.\n\nThere main function is `spawn(*prototype)`, where the `prototype`\nis a dictionary like... | [
{
"content": "\"\"\"\nSpawner\n\nThe spawner takes input files containing object definitions in\ndictionary forms. These use a prototype architecture to define\nunique objects without having to make a Typeclass for each.\n\nThere main function is `spawn(*prototype)`, where the `prototype`\nis a dictionary like... | diff --git a/evennia/prototypes/spawner.py b/evennia/prototypes/spawner.py
index b77651a6db6..3dfad73b312 100644
--- a/evennia/prototypes/spawner.py
+++ b/evennia/prototypes/spawner.py
@@ -323,7 +323,7 @@ def prototype_from_object(obj):
prot["prototype_locks"] = "spawn:all();edit:all()"
prot["prototyp... |
docker__docker-py-820 | POST /volumes is now POST /volumes/create
https://github.com/docker/docker/pull/17136
| [
{
"content": "from .. import utils\n\n\nclass VolumeApiMixin(object):\n @utils.minimum_version('1.21')\n def volumes(self, filters=None):\n params = {\n 'filter': utils.convert_filters(filters) if filters else None\n }\n url = self._url('/volumes')\n return self._res... | [
{
"content": "from .. import utils\n\n\nclass VolumeApiMixin(object):\n @utils.minimum_version('1.21')\n def volumes(self, filters=None):\n params = {\n 'filter': utils.convert_filters(filters) if filters else None\n }\n url = self._url('/volumes')\n return self._res... | diff --git a/docker/api/volume.py b/docker/api/volume.py
index e9e71273f..a404f658b 100644
--- a/docker/api/volume.py
+++ b/docker/api/volume.py
@@ -12,7 +12,7 @@ def volumes(self, filters=None):
@utils.minimum_version('1.21')
def create_volume(self, name, driver=None, driver_opts=None):
- url = self... |
openstates__openstates-scrapers-1173 | TN: 109th Session, Legislators, Upper - Senator name extraction fails for district 19
Trying to run the scraper locally, I encountered the following exception for TN's [19th senate district in the 109th general assembly](http://www.capitol.tn.gov/senate/archives/109GA/members/s19.html) (Sen. Thelma Hale):
```
File ... | [
{
"content": "import HTMLParser\n\nfrom billy.scrape.legislators import LegislatorScraper, Legislator\nimport lxml.html\nfrom scrapelib import HTTPError\nfrom openstates.utils import LXMLMixin\n\nclass TNLegislatorScraper(LegislatorScraper, LXMLMixin):\n jurisdiction = 'tn'\n\n def scrape(self, chamber, t... | [
{
"content": "import HTMLParser\n\nfrom billy.scrape.legislators import LegislatorScraper, Legislator\nimport lxml.html\nfrom scrapelib import HTTPError\nfrom openstates.utils import LXMLMixin\n\nclass TNLegislatorScraper(LegislatorScraper, LXMLMixin):\n jurisdiction = 'tn'\n\n def scrape(self, chamber, t... | diff --git a/openstates/tn/legislators.py b/openstates/tn/legislators.py
index b3e49d6071..e6d8a2bb41 100644
--- a/openstates/tn/legislators.py
+++ b/openstates/tn/legislators.py
@@ -76,7 +76,7 @@ def scrape(self, chamber, term):
member_page = lxml.html.fromstring(member_page)
try:
- ... |
freedomofpress__securedrop-1901 | Wordlists are not being parsed correctly
# Bug
## Description
`crypo_util.{words,nouns,adjectives}` all contain an empty string as their last element.
| [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom base64 import b32encode\nimport os\nimport subprocess\n\nfrom Crypto.Random import random\nimport gnupg\nfrom gnupg._util import _is_stream, _make_binary_stream\nimport scrypt\n\nimport config\nimport store\n\n# to fix gpg error #78 on product... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nfrom base64 import b32encode\nimport os\nimport subprocess\n\nfrom Crypto.Random import random\nimport gnupg\nfrom gnupg._util import _is_stream, _make_binary_stream\nimport scrypt\n\nimport config\nimport store\n\n# to fix gpg error #78 on product... | diff --git a/securedrop/crypto_util.py b/securedrop/crypto_util.py
index cb6cd71a24..567dab1e38 100644
--- a/securedrop/crypto_util.py
+++ b/securedrop/crypto_util.py
@@ -46,9 +46,9 @@ def do_runtime_tests():
gpg = gnupg.GPG(binary='gpg2', homedir=config.GPG_KEY_DIR)
-words = open(config.WORD_LIST).read().split('\... |
getredash__redash-4792 | Bug: Redshift data source unable to refresh schema
Redash version: 8.0.0+b32245 (a16f551e)
Data Source: Redshift
Redshift cluster version: 1.0.14436
Error:

API: `/api/data_sources/1/schema?refresh=true... | [
{
"content": "import os\nimport logging\nimport select\nfrom uuid import uuid4\n\nimport psycopg2\nfrom psycopg2.extras import Range\n\nfrom redash.query_runner import *\nfrom redash.utils import JSONEncoder, json_dumps, json_loads\n\nlogger = logging.getLogger(__name__)\n\ntry:\n import boto3\n\n IAM_ENA... | [
{
"content": "import os\nimport logging\nimport select\nfrom uuid import uuid4\n\nimport psycopg2\nfrom psycopg2.extras import Range\n\nfrom redash.query_runner import *\nfrom redash.utils import JSONEncoder, json_dumps, json_loads\n\nlogger = logging.getLogger(__name__)\n\ntry:\n import boto3\n\n IAM_ENA... | diff --git a/redash/query_runner/pg.py b/redash/query_runner/pg.py
index b21dc420e0..4cb0def49c 100644
--- a/redash/query_runner/pg.py
+++ b/redash/query_runner/pg.py
@@ -328,6 +328,7 @@ def _get_tables(self, schema):
ordinal_position AS pos
FROM svv_columns
WHERE ... |
Gallopsled__pwntools-1242 | AttributeError: 'IntervalTree' object has no attribute 'search'
Running the latest version of pwntools from pip and python2:
```
In [1]: from pwn import *
In [2]: elf = ELF("./age_calc")
---------------------------------------------------------------------------
AttributeError Traceb... | [
{
"content": "#!/usr/bin/env python2\nimport glob\nimport os\nimport platform\nimport sys\nimport traceback\nfrom distutils.command.install import INSTALL_SCHEMES\nfrom distutils.sysconfig import get_python_inc\nfrom distutils.util import convert_path\n\nfrom setuptools import find_packages\nfrom setuptools imp... | [
{
"content": "#!/usr/bin/env python2\nimport glob\nimport os\nimport platform\nimport sys\nimport traceback\nfrom distutils.command.install import INSTALL_SCHEMES\nfrom distutils.sysconfig import get_python_inc\nfrom distutils.util import convert_path\n\nfrom setuptools import find_packages\nfrom setuptools imp... | diff --git a/setup.py b/setup.py
index 99d4a029a..2dd0a81df 100644
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,7 @@
'pypandoc',
'packaging',
'psutil>=3.3.0',
- 'intervaltree',
+ 'intervaltree<3.0', # ... |
archlinux__archinstall-565 | Exit code 256 in networking.py
While doing PR #562 I noticed that we check if exit code is 256. I thought for any process it was an 8 bit value and could be 0 through 255, so I'm not sure about this logic. I'd like to figure out why it was written in this manner and it probably should be fixed. Maybe drop the exit code... | [
{
"content": "import fcntl\nimport logging\nimport os\nimport socket\nimport struct\nfrom collections import OrderedDict\n\nfrom .exceptions import *\nfrom .general import SysCommand\nfrom .output import log\nfrom .storage import storage\n\n\ndef get_hw_addr(ifname):\n\ts = socket.socket(socket.AF_INET, socket.... | [
{
"content": "import fcntl\nimport logging\nimport os\nimport socket\nimport struct\nfrom collections import OrderedDict\n\nfrom .exceptions import *\nfrom .general import SysCommand\nfrom .output import log\nfrom .storage import storage\n\n\ndef get_hw_addr(ifname):\n\ts = socket.socket(socket.AF_INET, socket.... | diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py
index 2c26133402..49970ec4e6 100644
--- a/archinstall/lib/networking.py
+++ b/archinstall/lib/networking.py
@@ -31,9 +31,8 @@ def list_interfaces(skip_loopback=True):
def check_mirror_reachable():
if (exit_code := SysCommand("pacman -Sy").exi... |
google__mobly-72 | Refresh adb connection to a device at the end of AndroidDevice teardown.
Execute `adb -s <serial> reconnect` at the end of AndroidDevice controller object cleanup.
It has several benefits:
1. Kills any lingering adb processes/cmds that the test may have started and does not clean up properly.
2. Releases all forwa... | [
{
"content": "#!/usr/bin/env python3.4\n#\n# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | [
{
"content": "#!/usr/bin/env python3.4\n#\n# Copyright 2016 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n... | diff --git a/mobly/controllers/android_device.py b/mobly/controllers/android_device.py
index dfa69d1a..200f17ec 100644
--- a/mobly/controllers/android_device.py
+++ b/mobly/controllers/android_device.py
@@ -98,6 +98,10 @@ def destroy(ads):
for ad in ads:
try:
ad.stop_services()
+ #... |
napari__napari-1250 | working on fixing tests
## 🐛 Bug
here are some crazy observations that started from looking into the test failure in #923, and may have some implications for general test fixes that we want to look into in #921. I'll patch it in a PR soon, but just want to document this somewhere, in case it becomes pertinent to #... | [
{
"content": "from ._version import get_versions\n\n__version__ = get_versions()['version']\ndel get_versions\n\nimport os\nfrom distutils.version import StrictVersion\nfrom pathlib import Path\nfrom qtpy import API_NAME\nfrom ._version import get_versions\n\n# putting up higher due to circular imports if plugi... | [
{
"content": "from ._version import get_versions\n\n__version__ = get_versions()['version']\ndel get_versions\n\nimport os\nfrom distutils.version import StrictVersion\nfrom pathlib import Path\nfrom qtpy import API_NAME\nfrom ._version import get_versions\n\n# putting up higher due to circular imports if plugi... | diff --git a/napari/__init__.py b/napari/__init__.py
index 048e79081be..60a9cda7e34 100644
--- a/napari/__init__.py
+++ b/napari/__init__.py
@@ -69,13 +69,5 @@
# register napari object types with magicgui if it is installed
_magicgui.register_types_with_magicgui()
-
-# this unused import is here to fix a very stran... |
scrapy__scrapy-4646 | Allow run pyw scripts
scrapy/commands/runspider.py check for Python script source but it fails to allow .pyw files.
Check at row 14 is:
` if fext != '.py':`
but it should be:
` if fext != '.py' and fext != '.pyw':`
| [
{
"content": "import sys\nimport os\nfrom importlib import import_module\n\nfrom scrapy.utils.spider import iter_spider_classes\nfrom scrapy.exceptions import UsageError\nfrom scrapy.commands import BaseRunSpiderCommand\n\n\ndef _import_file(filepath):\n abspath = os.path.abspath(filepath)\n dirname, file... | [
{
"content": "import sys\nimport os\nfrom importlib import import_module\n\nfrom scrapy.utils.spider import iter_spider_classes\nfrom scrapy.exceptions import UsageError\nfrom scrapy.commands import BaseRunSpiderCommand\n\n\ndef _import_file(filepath):\n abspath = os.path.abspath(filepath)\n dirname, file... | diff --git a/scrapy/commands/runspider.py b/scrapy/commands/runspider.py
index aedd8c2ce01..b957c29fbd2 100644
--- a/scrapy/commands/runspider.py
+++ b/scrapy/commands/runspider.py
@@ -11,7 +11,7 @@ def _import_file(filepath):
abspath = os.path.abspath(filepath)
dirname, file = os.path.split(abspath)
fna... |
mesonbuild__meson-8069 | i18n module does not seem to respect MESON_INSTALL_QUIET environment variable
**Describe the bug**
When using `meson install --quiet`, there's still output generated by what I presume is gettext:
```
Installing /root/build/po/be.gmo to /root/dest/usr/share/locale/be/LC_MESSAGES/systemd.mo
Installing /root/build... | [
{
"content": "# Copyright 2016 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required... | [
{
"content": "# Copyright 2016 The Meson development team\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required... | diff --git a/mesonbuild/scripts/gettext.py b/mesonbuild/scripts/gettext.py
index 547d14f0d8dc..64c228b63b55 100644
--- a/mesonbuild/scripts/gettext.py
+++ b/mesonbuild/scripts/gettext.py
@@ -86,7 +86,8 @@ def do_install(src_sub: str, bld_sub: str, dest: str, pkgname: str, langs: T.Lis
os.makedirs(os.path.dirna... |
spotify__luigi-766 | `S3FlagTarget` checks for slash terminated path with `is` instead of `==`
See https://github.com/spotify/luigi/blob/master/luigi/s3.py#L510
This screws up situations where the provided data may be a unicode string. Is this deliberate?
| [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | [
{
"content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#... | diff --git a/luigi/s3.py b/luigi/s3.py
index 606c446520..0c65626ea5 100644
--- a/luigi/s3.py
+++ b/luigi/s3.py
@@ -507,7 +507,7 @@ def __init__(self, path, format=None, client=None, flag='_SUCCESS'):
:param flag:
:type flag: str
"""
- if path[-1] is not "/":
+ if path[-1] != "/"... |
readthedocs__readthedocs.org-4892 | Warnings on build
## Details
* Read the Docs project URL: [https://readthedocs.org/](https://readthedocs.org/)
* Build URL (if applicable): [http://127.0.0.1:8000/](http://127.0.0.1:8000/)
* Read the Docs username (if applicable): NA
* When I am building the project, a warning is being shown.
## Expected Resul... | [
{
"content": "# -*- coding: utf-8 -*-\n# pylint: disable=missing-docstring\n\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals)\n\nimport os\n\nfrom celery.schedules import crontab\n\nfrom readthedocs.core.settings import Settings\n\n\ntry:\n import readthedocsext # ... | [
{
"content": "# -*- coding: utf-8 -*-\n# pylint: disable=missing-docstring\n\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals)\n\nimport os\n\nfrom celery.schedules import crontab\n\nfrom readthedocs.core.settings import Settings\n\n\ntry:\n import readthedocsext # ... | diff --git a/readthedocs/settings/base.py b/readthedocs/settings/base.py
index 6d4696f73c6..8556e6be4ee 100644
--- a/readthedocs/settings/base.py
+++ b/readthedocs/settings/base.py
@@ -365,7 +365,7 @@ def USE_PROMOS(self): # noqa
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', ... |
pallets__werkzeug-2459 | Default Content-Type header re-applied when using test client
When using 'make_response' in a view function, default headers can be cleared, such as the default 'Content-Type' header. This works fine when using `flask run`, but when using the test client, the default 'Content-Type' header is re-applied, causing the tes... | [
{
"content": "import typing as t\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom datetime import timezone\nfrom http import HTTPStatus\n\nfrom .._internal import _to_str\nfrom ..datastructures import Headers\nfrom ..datastructures import HeaderSet\nfrom ..http import dump_cookie\nfrom ..htt... | [
{
"content": "import typing as t\nfrom datetime import datetime\nfrom datetime import timedelta\nfrom datetime import timezone\nfrom http import HTTPStatus\n\nfrom .._internal import _to_str\nfrom ..datastructures import Headers\nfrom ..datastructures import HeaderSet\nfrom ..http import dump_cookie\nfrom ..htt... | diff --git a/CHANGES.rst b/CHANGES.rst
index 455cc2c42..c98511668 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -22,6 +22,7 @@ Version 2.2.0
to sansio/http.py. :issue:`2408`
- Extracted utility get_content_length, get_query_string, get_path_info
functions from wsgi.py. :pr:`2415`
+- Don't assume a mimety... |
pypa__setuptools-2853 | Adopt a logo
Setuptools could have a logo.
Thinking about the elements of design, I’d want to discourage elements of “installer” and focus on elements that hint at “builder” or “compiler” or “tool”. If one draws inspiration from the [Warehouse](https://pypi.org) logo, note that Setuptools is one of many tools that c... | [
{
"content": "extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']\n\nmaster_doc = \"index\"\n\nlink_files = {\n '../CHANGES.rst': dict(\n using=dict(\n BB='https://bitbucket.org',\n GH='https://github.com',\n ),\n replace=[\n dict... | [
{
"content": "extensions = ['sphinx.ext.autodoc', 'jaraco.packaging.sphinx', 'rst.linker']\n\nmaster_doc = \"index\"\n\nlink_files = {\n '../CHANGES.rst': dict(\n using=dict(\n BB='https://bitbucket.org',\n GH='https://github.com',\n ),\n replace=[\n dict... | diff --git a/changelog.d/2227.doc.1.rst b/changelog.d/2227.doc.1.rst
new file mode 100644
index 0000000000..ba7acb7fd9
--- /dev/null
+++ b/changelog.d/2227.doc.1.rst
@@ -0,0 +1,2 @@
+Added new setuptools logo, including editable files and artwork documentation
+-- by :user:`abravalheri`
diff --git a/changelog.d/2227.do... |
pypa__setuptools-1665 | v40.7.1 omits port in index download
In this commit https://github.com/pypa/setuptools/commit/3a351aa00e2110c3b3df0302b1ed6bcf66a1f8d8 is used host instead of netloc, but host does not contain port. Version 40.6.3 works OK.
v40.7.1 omits port in index download
In this commit https://github.com/pypa/setuptools/commit/3a... | [
{
"content": "\"\"\"PyPI and direct package downloading\"\"\"\nimport sys\nimport os\nimport re\nimport shutil\nimport socket\nimport base64\nimport hashlib\nimport itertools\nimport warnings\nfrom functools import wraps\n\nfrom setuptools.extern import six\nfrom setuptools.extern.six.moves import urllib, http_... | [
{
"content": "\"\"\"PyPI and direct package downloading\"\"\"\nimport sys\nimport os\nimport re\nimport shutil\nimport socket\nimport base64\nimport hashlib\nimport itertools\nimport warnings\nfrom functools import wraps\n\nfrom setuptools.extern import six\nfrom setuptools.extern.six.moves import urllib, http_... | diff --git a/changelog.d/1665.change.rst b/changelog.d/1665.change.rst
new file mode 100644
index 0000000000..55a1c0f1db
--- /dev/null
+++ b/changelog.d/1665.change.rst
@@ -0,0 +1 @@
+Restore port in URL handling in package_index.
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 7e9517cefa..... |
mozmeao__snippets-service-1177 | Fix ASRSnippetBundle.empty calculation to work with Jobs
| [
{
"content": "import hashlib\nimport json\nfrom datetime import datetime\nfrom urllib.parse import urljoin, urlparse\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.core.files.base import ContentFile\nfrom django.core.files.storage import defau... | [
{
"content": "import hashlib\nimport json\nfrom datetime import datetime\nfrom urllib.parse import urljoin, urlparse\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.cache import cache\nfrom django.core.files.base import ContentFile\nfrom django.core.files.storage import defau... | diff --git a/snippets/base/bundles.py b/snippets/base/bundles.py
index 51fff6cd9..4cda11a34 100644
--- a/snippets/base/bundles.py
+++ b/snippets/base/bundles.py
@@ -205,6 +205,10 @@ def key(self):
key_string = '_'.join(key_properties)
return hashlib.sha1(key_string.encode('utf-8')).hexdigest()
+ ... |
ibis-project__ibis-4866 | Inconsistent support of pandas.DataFrame in `create_table` and `insert`
Assuming the following setup:
```python
>>> import ibis
>>> import pandas as pd
>>> df = pd.DataFrame({"x": range(3)})
>>> conn = ibis.duckdb.connect()
```
I find it non-intuitive that the following fails:
```python
>>> conn.create... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport getpass\nfrom operator import methodcaller\nfrom typing import TYPE_CHECKING, Any, Literal\n\nimport sqlalchemy as sa\n\nimport ibis\nimport ibis.expr.operations as ops\nimport ibis.expr.schema as sch\nimport ibis.expr.types as ir\nim... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport getpass\nfrom operator import methodcaller\nfrom typing import TYPE_CHECKING, Any, Literal\n\nimport sqlalchemy as sa\n\nimport ibis\nimport ibis.expr.operations as ops\nimport ibis.expr.schema as sch\nimport ibis.expr.types as ir\nim... | diff --git a/ibis/backends/base/sql/alchemy/__init__.py b/ibis/backends/base/sql/alchemy/__init__.py
index 6da065b1ff77..c4a20405a1f2 100644
--- a/ibis/backends/base/sql/alchemy/__init__.py
+++ b/ibis/backends/base/sql/alchemy/__init__.py
@@ -473,6 +473,12 @@ def insert(
'yet implemented'
... |
Mailu__Mailu-834 | Cannot create an Authorisation Token for an IPv6 address
On `/admin/ui/token/create` when one enters an IPv6 address it responds with "invalid ip address" because wtforms.validators.IPAddress understands IPv4 only.
I'm also not sure if the other parts that handle auth tokens support IPv6.
| [
{
"content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass... | [
{
"content": "from wtforms import validators, fields, widgets\nfrom wtforms_components import fields as fields_\nfrom flask_babel import lazy_gettext as _\n\nimport flask_login\nimport flask_wtf\nimport re\n\nLOCALPART_REGEX = \"^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*$\"\n\nclass... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c50806f5a..35d05f782 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ upgrading Freposte.io as some changes will include useful notes.
v1.6.1 - unreleased
-------------------
- Enhancement: Make Unbound drop privileges after binding to port
+- Enhancement: C... |
nltk__nltk-3151 | TclError resizing download dialog table column
When attempting to resize a column in the downloader dialog, and error is raised and the column does not resize.
Steps to reproduce:
- Run `nltk.download()` to open downloading interface
- Try resizing any of the table columns (e.g. "Identifier" in the first tab)
A... | [
{
"content": "# Natural Language Toolkit: Table widget\n#\n# Copyright (C) 2001-2023 NLTK Project\n# Author: Edward Loper <edloper@gmail.com>\n# URL: <https://www.nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nTkinter widgets for displaying multi-column listboxes and tables.\n\"\"\"\n\nimport... | [
{
"content": "# Natural Language Toolkit: Table widget\n#\n# Copyright (C) 2001-2023 NLTK Project\n# Author: Edward Loper <edloper@gmail.com>\n# URL: <https://www.nltk.org/>\n# For license information, see LICENSE.TXT\n\n\"\"\"\nTkinter widgets for displaying multi-column listboxes and tables.\n\"\"\"\n\nimport... | diff --git a/nltk/draw/table.py b/nltk/draw/table.py
index 1319b1ce5e..c32e4cf272 100644
--- a/nltk/draw/table.py
+++ b/nltk/draw/table.py
@@ -193,7 +193,7 @@ def _resize_column_motion_cb(self, event):
x1 = event.x + event.widget.winfo_x()
x2 = lb.winfo_x() + lb.winfo_width()
- lb["width"] = ... |
pypa__pipenv-5321 | Pipenv lock fails for packages with extras as of 2022.8.13
### Issue description
There was a regression in the ability to lock Pipfiles containing packages with extras on the 2022.8.13 release. This was working fine on versions prior to 2022.8.13. I believe this is as a result of the changes introduced in [#5234]... | [
{
"content": "import os\nfrom contextlib import contextmanager\nfrom typing import Mapping, Sequence\n\nfrom pipenv.patched.pip._vendor.packaging.markers import Marker\nfrom pipenv.patched.pip._vendor.packaging.version import parse\nfrom pipenv.vendor.requirementslib.models.requirements import (\n InstallReq... | [
{
"content": "import os\nfrom contextlib import contextmanager\nfrom typing import Mapping, Sequence\n\nfrom pipenv.patched.pip._vendor.packaging.markers import Marker\nfrom pipenv.patched.pip._vendor.packaging.version import parse\nfrom pipenv.vendor.requirementslib.models.requirements import (\n InstallReq... | diff --git a/news/5273.bugfix.rst b/news/5273.bugfix.rst
new file mode 100644
index 0000000000..93e8fad698
--- /dev/null
+++ b/news/5273.bugfix.rst
@@ -0,0 +1 @@
+Fix issue where unnamed constraints were provided but which are not allowed by ``pip`` resolver.
diff --git a/pipenv/utils/dependencies.py b/pipenv/utils/dep... |
mars-project__mars-216 | [BUG][TENSOR] Chunks with same shape tiled by ones as well as zeros generate different key
<!--
Thank you for your contribution!
Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue.
-->
**Describe the bug**
Chunks with same shape tiled by `ones` as well as ... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://... | diff --git a/mars/scheduler/tests/test_analyzer.py b/mars/scheduler/tests/test_analyzer.py
index b25c20eb4f..bb8ae6fe53 100644
--- a/mars/scheduler/tests/test_analyzer.py
+++ b/mars/scheduler/tests/test_analyzer.py
@@ -42,8 +42,8 @@ def testDepths(self):
self.assertLessEqual(2, depths[n.op.key])
... |
freqtrade__freqtrade-2014 | hyperopt don't use the dataframe indicators of populate_indicators (of curent file) when optimize only roi stoploss
## Step 3: Describe the problem:
when running hyperopt with --spaces roi stoploss the populate_buy_trend use the indicators of i think default_strategy instead of use the indicators of the populate_ind... | [
{
"content": "# pragma pylint: disable=too-many-instance-attributes, pointless-string-statement\n\n\"\"\"\nThis module contains the hyperopt logic\n\"\"\"\n\nimport logging\nimport os\nimport sys\nfrom math import exp\nfrom operator import itemgetter\nfrom pathlib import Path\nfrom pprint import pprint\nfrom ty... | [
{
"content": "# pragma pylint: disable=too-many-instance-attributes, pointless-string-statement\n\n\"\"\"\nThis module contains the hyperopt logic\n\"\"\"\n\nimport logging\nimport os\nimport sys\nfrom math import exp\nfrom operator import itemgetter\nfrom pathlib import Path\nfrom pprint import pprint\nfrom ty... | diff --git a/freqtrade/optimize/hyperopt.py b/freqtrade/optimize/hyperopt.py
index 7fd9bf5d96d..0a51a8fb72d 100644
--- a/freqtrade/optimize/hyperopt.py
+++ b/freqtrade/optimize/hyperopt.py
@@ -288,9 +288,8 @@ def start(self) -> None:
(max_date - min_date).days
)
- if self.has_space('buy')... |
iterative__dvc-7908 | config: option for `--jobs` value
Several DVC commands have a `--jobs` option that has default values (e.g, https://dvc.org/doc/commands-reference/gc).
Afaik there is no way to change the default value. Having the option to change it through `dvc config` would be useful.
Can you consider adding it?
Thanks
| [
{
"content": "from urllib.parse import urlparse\n\n# pylint: disable=unused-import\nfrom dvc_objects.fs import utils # noqa: F401\nfrom dvc_objects.fs import ( # noqa: F401\n FS_MAP,\n AzureFileSystem,\n GDriveFileSystem,\n GSFileSystem,\n HDFSFileSystem,\n HTTPFileSystem,\n HTTPSFileSyst... | [
{
"content": "from urllib.parse import urlparse\n\n# pylint: disable=unused-import\nfrom dvc_objects.fs import utils # noqa: F401\nfrom dvc_objects.fs import ( # noqa: F401\n FS_MAP,\n AzureFileSystem,\n GDriveFileSystem,\n GSFileSystem,\n HDFSFileSystem,\n HTTPFileSystem,\n HTTPSFileSyst... | diff --git a/dvc/fs/__init__.py b/dvc/fs/__init__.py
index a21eea5d02..8736ee2ae1 100644
--- a/dvc/fs/__init__.py
+++ b/dvc/fs/__init__.py
@@ -104,11 +104,6 @@ def get_cloud_fs(repo, **kwargs):
except Invalid as exc:
raise RepoConfigError(str(exc)) from None
- if "jobs" not in remote_conf:
- j... |
pwndbg__pwndbg-2005 | Feature request: RVA-based breakpoints
**Is your feature request related to a problem? Please describe.**
I am missing a command that would allow creating a breakpoint relative to some image - either main program or a library - for example at offset 0x1337 from libc base.
**Describe the solution you'd like**
A new... | [
{
"content": "\"\"\"\nPut all functions defined for gdb in here.\n\nThis file might be changed into a module in the future.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport functools\nfrom typing import Any\nfrom typing import Callable\nfrom typing import List\n\nimport gdb\n\nimport pwndbg.gdblib.elf\ni... | [
{
"content": "\"\"\"\nPut all functions defined for gdb in here.\n\nThis file might be changed into a module in the future.\n\"\"\"\n\nfrom __future__ import annotations\n\nimport functools\nfrom typing import Any\nfrom typing import Callable\nfrom typing import List\n\nimport gdb\n\nimport pwndbg.gdblib.elf\ni... | diff --git a/pwndbg/gdblib/functions.py b/pwndbg/gdblib/functions.py
index adc9e0dd5d5..a8e8f7a58c7 100644
--- a/pwndbg/gdblib/functions.py
+++ b/pwndbg/gdblib/functions.py
@@ -53,3 +53,16 @@ def rebase(addr: gdb.Value | int) -> int:
"""Return rebased address."""
base = pwndbg.gdblib.elf.exe().address
re... |
jazzband__pip-tools-1867 | Improve --allow-unsafe warning comment
Currently, if `pip-compile` suppresses a requirement because the `--allow-unsafe` flag wasn't passed, it includes a warning that reads something like this:
```
# WARNING: The following packages were not pinned, but pip requires them to be
# pinned when the requirements file i... | [
{
"content": "from __future__ import annotations\n\nimport io\nimport os\nimport re\nimport sys\nfrom itertools import chain\nfrom typing import BinaryIO, Iterable, Iterator, cast\n\nfrom click import unstyle\nfrom click.core import Context\nfrom pip._internal.models.format_control import FormatControl\nfrom pi... | [
{
"content": "from __future__ import annotations\n\nimport io\nimport os\nimport re\nimport sys\nfrom itertools import chain\nfrom typing import BinaryIO, Iterable, Iterator, cast\n\nfrom click import unstyle\nfrom click.core import Context\nfrom pip._internal.models.format_control import FormatControl\nfrom pi... | diff --git a/piptools/writer.py b/piptools/writer.py
index c21664ac0..1ae341d60 100644
--- a/piptools/writer.py
+++ b/piptools/writer.py
@@ -32,7 +32,8 @@
MESSAGE_UNSAFE_PACKAGES_UNPINNED = comment(
"# WARNING: The following packages were not pinned, but pip requires them to be"
- "\n# pinned when the requir... |
microsoft__torchgeo-579 | Landcover.ai download link
It looks like the landcover.ai domain name expired (breaking our download). The dataset is now hosted at https://landcover.ai.linuxpolska.com/.
| [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"LandCover.ai dataset.\"\"\"\n\nimport glob\nimport hashlib\nimport os\nfrom functools import lru_cache\nfrom typing import Callable, Dict, Optional\n\nimport matplotlib.pyplot as plt\nimport num... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"LandCover.ai dataset.\"\"\"\n\nimport glob\nimport hashlib\nimport os\nfrom functools import lru_cache\nfrom typing import Callable, Dict, Optional\n\nimport matplotlib.pyplot as plt\nimport num... | diff --git a/torchgeo/datasets/landcoverai.py b/torchgeo/datasets/landcoverai.py
index 0d7e9f22881..b34ba8a5edf 100644
--- a/torchgeo/datasets/landcoverai.py
+++ b/torchgeo/datasets/landcoverai.py
@@ -60,7 +60,7 @@ class LandCoverAI(VisionDataset):
the train/val/test split
"""
- url = "https://landc... |
getsentry__sentry-python-1566 | Incorrect attribute check
### How do you use Sentry?
Self-hosted/on-premise
### Version
1.9.4
### Steps to Reproduce
I guess it's incorrect attribute name is checking here:
https://github.com/getsentry/sentry-python/blob/8588dbeb023a124c6f8c35b66391a7d8caa8bf35/sentry_sdk/integrations/starlette.py#L149
### Expec... | [
{
"content": "from __future__ import absolute_import\n\nimport asyncio\nimport functools\n\nfrom sentry_sdk._compat import iteritems\nfrom sentry_sdk._types import MYPY\nfrom sentry_sdk.hub import Hub, _should_send_default_pii\nfrom sentry_sdk.integrations import DidNotEnable, Integration\nfrom sentry_sdk.integ... | [
{
"content": "from __future__ import absolute_import\n\nimport asyncio\nimport functools\n\nfrom sentry_sdk._compat import iteritems\nfrom sentry_sdk._types import MYPY\nfrom sentry_sdk.hub import Hub, _should_send_default_pii\nfrom sentry_sdk.integrations import DidNotEnable, Integration\nfrom sentry_sdk.integ... | diff --git a/sentry_sdk/integrations/starlette.py b/sentry_sdk/integrations/starlette.py
index a58c9e9bd6..f4af729c3f 100644
--- a/sentry_sdk/integrations/starlette.py
+++ b/sentry_sdk/integrations/starlette.py
@@ -146,7 +146,9 @@ async def _sentry_patched_exception_handler(self, *args, **kwargs):
# type: ... |
scikit-hep__pyhf-1821 | Use of `del` for staterror in writexml necessary?
In PR #435 the use of `del` was added in
https://github.com/scikit-hep/pyhf/blob/e3d879f3e4982ac629bec7bf92d78b00025e52dc/src/pyhf/writexml.py#L186-L191
I assume because later on in the PR it mentions
https://github.com/scikit-hep/pyhf/blob/e3d879f3e4982ac629b... | [
{
"content": "import logging\n\nfrom pathlib import Path\nimport shutil\nimport xml.etree.ElementTree as ET\nimport numpy as np\n\nimport uproot\n\nfrom pyhf.mixins import _ChannelSummaryMixin\nfrom pyhf.schema import path as schema_path\n\n_ROOT_DATA_FILE = None\n\nlog = logging.getLogger(__name__)\n\n__all__ ... | [
{
"content": "import logging\n\nfrom pathlib import Path\nimport shutil\nimport xml.etree.ElementTree as ET\nimport numpy as np\n\nimport uproot\n\nfrom pyhf.mixins import _ChannelSummaryMixin\nfrom pyhf.schema import path as schema_path\n\n_ROOT_DATA_FILE = None\n\nlog = logging.getLogger(__name__)\n\n__all__ ... | diff --git a/src/pyhf/writexml.py b/src/pyhf/writexml.py
index 3eaa1c1d32..0567c94031 100644
--- a/src/pyhf/writexml.py
+++ b/src/pyhf/writexml.py
@@ -188,6 +188,7 @@ def build_modifier(spec, modifierspec, channelname, samplename, sampledata):
attrs['HistoName'] = _make_hist_name(
channelname, sam... |
python-pillow__Pillow-5055 | Docs: add logo to menu
We can add the Pillow logo to the docs menu:
> **`html_logo`**
> If given, this must be the name of an image file (path relative to the configuration directory) that is the logo of the docs. It is placed at the top of the sidebar; its width should therefore not exceed 200 pixels. Default: `No... | [
{
"content": "#\n# Pillow (PIL Fork) documentation build configuration file, created by\n# sphinx-quickstart on Sat Apr 4 07:54:11 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogener... | [
{
"content": "#\n# Pillow (PIL Fork) documentation build configuration file, created by\n# sphinx-quickstart on Sat Apr 4 07:54:11 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogener... | diff --git a/docs/conf.py b/docs/conf.py
index b5f8ad59d6a..a8f10114140 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -143,7 +143,7 @@
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
-# html_logo = None
+html_logo = "resources/pillow-logo.png"
# The name of an ima... |
rotki__rotki-2245 | Using a cryptocompare API key can result in api call errors
## Problem Definition
As can be seen by the [OSX nightlies](https://github.com/rotki/rotki/runs/1803162702?check_suite_focus=true) we have had some failures related to cryptocompare.
It seems that we only use cryptocompare api keys in OSX due to the rate... | [
{
"content": "import logging\nimport os\nimport re\nfrom collections import deque\nfrom json.decoder import JSONDecodeError\nfrom pathlib import Path\nfrom typing import Any, Deque, Dict, Iterable, Iterator, List, NamedTuple, NewType, Optional, Tuple\n\nimport gevent\nimport requests\nfrom typing_extensions imp... | [
{
"content": "import logging\nimport os\nimport re\nfrom collections import deque\nfrom json.decoder import JSONDecodeError\nfrom pathlib import Path\nfrom typing import Any, Deque, Dict, Iterable, Iterator, List, NamedTuple, NewType, Optional, Tuple\n\nimport gevent\nimport requests\nfrom typing_extensions imp... | diff --git a/docs/changelog.rst b/docs/changelog.rst
index 63f6699a1f..8729a557a7 100755
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -2,6 +2,7 @@
Changelog
=========
+* :bug:`2244` Fix edge case where using a cryptocompare api key could result in the all coins endpoint to error if no cache already existed.... |
mne-tools__mne-bids-pipeline-427 | CTF source localization bug
During Step-10 I get an error. Bids pipeline is trying to find a fif file in the original bids meg directory, but the original dataset is a CTF .ds. The BIDSPath is also trying to find the -ave.fif file, so the designation of 'extension' during the BIDSPath initiation is ambiguous.
ERRO... | [
{
"content": "\"\"\"\n====================\n10. Forward solution\n====================\n\nCalculate forward solution for MEG channels.\n\"\"\"\n\nimport itertools\nimport logging\nfrom typing import Optional\n\nimport mne\nfrom mne.utils import BunchConst\nfrom mne.parallel import parallel_func\nfrom mne.datase... | [
{
"content": "\"\"\"\n====================\n10. Forward solution\n====================\n\nCalculate forward solution for MEG channels.\n\"\"\"\n\nimport itertools\nimport logging\nfrom typing import Optional\n\nimport mne\nfrom mne.utils import BunchConst\nfrom mne.parallel import parallel_func\nfrom mne.datase... | diff --git a/docs/source/changes.md b/docs/source/changes.md
index 6a017d1b4..97cba74aa 100644
--- a/docs/source/changes.md
+++ b/docs/source/changes.md
@@ -189,3 +189,5 @@ authors:
- Parameters retrieved from the BIDS dataset were not limited to the modality
("data type") we meant to process, sometimes leading to ... |
scikit-hep__pyhf-999 | Keep tighter version constraints on TensorFlow releases
# Description
As Issue #997 makes it clear that minor releases might as well be major releases for TensorFlow, then it is probably worth keeping tighter version constraints on them and just watching the releases of TensorFlow and TensorFlow Probability to see w... | [
{
"content": "from setuptools import setup\n\nextras_require = {\n 'shellcomplete': ['click_completion'],\n 'tensorflow': [\n 'tensorflow~=2.0',\n 'tensorflow-probability~=0.10', # TODO: Temp patch until tfp v0.11\n ],\n 'torch': ['torch~=1.2'],\n 'jax': ['jax~=0.1,>0.1.51', 'jaxli... | [
{
"content": "from setuptools import setup\n\nextras_require = {\n 'shellcomplete': ['click_completion'],\n 'tensorflow': [\n 'tensorflow~=2.2.0', # TensorFlow minor releases are as volatile as major\n 'tensorflow-probability~=0.10.0',\n ],\n 'torch': ['torch~=1.2'],\n 'jax': ['jax... | diff --git a/setup.py b/setup.py
index dd79ebffeb..1e457a906f 100644
--- a/setup.py
+++ b/setup.py
@@ -3,8 +3,8 @@
extras_require = {
'shellcomplete': ['click_completion'],
'tensorflow': [
- 'tensorflow~=2.0',
- 'tensorflow-probability~=0.10', # TODO: Temp patch until tfp v0.11
+ 'tenso... |
Cog-Creators__Red-DiscordBot-2001 | [V3/Streams] streamalert list command is missing a doc string.
#### What were you trying to do?
call `[p]help` on streamalert list`
#### What were you expecting to happen?
Help message from the doc string would be displayed.
#### What actually happened?
No help message information was displayed, because the ... | [
{
"content": "import discord\nfrom redbot.core import Config, checks, commands\nfrom redbot.core.utils.chat_formatting import pagify\nfrom redbot.core.bot import Red\nfrom redbot.core.i18n import Translator, cog_i18n\nfrom .streamtypes import (\n Stream,\n TwitchStream,\n HitboxStream,\n MixerStream... | [
{
"content": "import discord\nfrom redbot.core import Config, checks, commands\nfrom redbot.core.utils.chat_formatting import pagify\nfrom redbot.core.bot import Red\nfrom redbot.core.i18n import Translator, cog_i18n\nfrom .streamtypes import (\n Stream,\n TwitchStream,\n HitboxStream,\n MixerStream... | diff --git a/redbot/cogs/streams/streams.py b/redbot/cogs/streams/streams.py
index ca4bed5b80c..ec81e7a3f7d 100644
--- a/redbot/cogs/streams/streams.py
+++ b/redbot/cogs/streams/streams.py
@@ -209,6 +209,7 @@ async def streamalert_stop(self, ctx: commands.Context, _all: bool = False):
@streamalert.command(name="... |
Lightning-AI__pytorch-lightning-3438 | Cometml Logger epoch is not set.
<!--
### Common bugs:
1. Tensorboard not showing in Jupyter-notebook see [issue 79](https://github.com/PyTorchLightning/pytorch-lightning/issues/79).
2. PyTorch 1.1.0 vs 1.2.0 support [see FAQ](https://github.com/PyTorchLightning/pytorch-lightning#faq)
-->
## 🐛 Bug
W... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | [
{
"content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ... | diff --git a/pytorch_lightning/loggers/comet.py b/pytorch_lightning/loggers/comet.py
index e3e8d82ed7618..7a52d6c4dc0dc 100644
--- a/pytorch_lightning/loggers/comet.py
+++ b/pytorch_lightning/loggers/comet.py
@@ -229,7 +229,10 @@ def log_metrics(
if is_tensor(val):
metrics[key] = val.cpu()... |
tensorflow__tfx-3813 | Update tensorflow-hub requirement to allow 0.12.0?
If the feature is related to a specific library below, please raise an issue in
the respective repo directly:
[TensorFlow Data Validation Repo](https://github.com/tensorflow/data-validation/issues)
[TensorFlow Model Analysis Repo](https://github.com/tensorflow/m... | [
{
"content": "# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/tfx/dependencies.py b/tfx/dependencies.py
index 9717214d34..662062f939 100644
--- a/tfx/dependencies.py
+++ b/tfx/dependencies.py
@@ -88,7 +88,7 @@ def make_required_install_packages():
'pyarrow>=1,<3',
'pyyaml>=3.12,<6',
'tensorflow>=1.15.2,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,<3',... |
dbt-labs__dbt-core-5270 | [CT-159] [Bug] Partial parsing fails to find new doc block after `git pull`
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Current Behavior
After pulling changes from a remote git branch that include new docblocks, I get an error on compile/run:
```
Running with dbt=... | [
{
"content": "import os\nfrom copy import deepcopy\nfrom typing import MutableMapping, Dict, List\nfrom dbt.contracts.graph.manifest import Manifest\nfrom dbt.contracts.files import (\n AnySourceFile,\n ParseFileType,\n parse_file_type_to_parser,\n)\nfrom dbt.events.functions import fire_event\nfrom db... | [
{
"content": "import os\nfrom copy import deepcopy\nfrom typing import MutableMapping, Dict, List\nfrom dbt.contracts.graph.manifest import Manifest\nfrom dbt.contracts.files import (\n AnySourceFile,\n ParseFileType,\n parse_file_type_to_parser,\n)\nfrom dbt.events.functions import fire_event\nfrom db... | diff --git a/.changes/unreleased/Fixes-20220518-134610.yaml b/.changes/unreleased/Fixes-20220518-134610.yaml
new file mode 100644
index 00000000000..4fe9c2c9269
--- /dev/null
+++ b/.changes/unreleased/Fixes-20220518-134610.yaml
@@ -0,0 +1,7 @@
+kind: Fixes
+body: Remove docs file from manifest when removing doc node
+t... |
hpcaitech__ColossalAI-1063 | [BUG]: Process significantly slowed down and huge memory taken when dealling with images with different sizes
### 🐛 Describe the bug
Describe the bug:
The process was slowed down and huge memory was taken during the training process of DeTr. We found that it might be because of the COCO dataset's variant shape of in... | [
{
"content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\nimport argparse\nimport os\nimport pprint\nfrom pathlib import Path\nfrom typing import Callable, Dict, Iterable, List, Optional, Tuple, Union\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn.modules.loss import _Loss\nfrom torch.nn.parallel... | [
{
"content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\nimport argparse\nimport os\nimport pprint\nfrom pathlib import Path\nfrom typing import Callable, Dict, Iterable, List, Optional, Tuple, Union\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn.modules.loss import _Loss\nfrom torch.nn.parallel... | diff --git a/colossalai/initialize.py b/colossalai/initialize.py
index fb0de4e201d7..fd7a202b740f 100644
--- a/colossalai/initialize.py
+++ b/colossalai/initialize.py
@@ -270,7 +270,7 @@ def initialize(model: nn.Module,
ranks=[0])
# cudnn
- cudnn_benchmark = config.get('cudnn_benchmark', True)
+ ... |
getsentry__sentry-3604 | New Auth Tokens cannot pass sudo check
The new auth token based API access never passes sudo:
``` python
def is_considered_sudo(request):
return request.is_sudo() or \
isinstance(request.auth, ApiKey)
```
| [
{
"content": "from __future__ import absolute_import\n\nimport json\n\nfrom django.http import HttpResponse\nfrom functools import wraps\n\nfrom sentry.models import ApiKey\n\n\ndef is_considered_sudo(request):\n return request.is_sudo() or \\\n isinstance(request.auth, ApiKey)\n\n\ndef sudo_required(... | [
{
"content": "from __future__ import absolute_import\n\nimport json\n\nfrom django.http import HttpResponse\nfrom functools import wraps\n\nfrom sentry.models import ApiKey, ApiToken\n\n\ndef is_considered_sudo(request):\n return request.is_sudo() or \\\n isinstance(request.auth, ApiKey) or \\\n ... | diff --git a/src/sentry/api/decorators.py b/src/sentry/api/decorators.py
index 0113daf1f3e211..e4ed12745741c0 100644
--- a/src/sentry/api/decorators.py
+++ b/src/sentry/api/decorators.py
@@ -5,12 +5,13 @@
from django.http import HttpResponse
from functools import wraps
-from sentry.models import ApiKey
+from sentry... |
kovidgoyal__kitty-1116 | Grid layout neighbors not working for < 4 windows
**kitty version**: 0.12.3
**OS**: arch linux 4.14.71-1
When I try to move or focus neighbors on the grid layout and there are less than 4 windows open, nothing happens. The keyboard shortcut I have mapped to that command is ignored.
| [
{
"content": "#!/usr/bin/env python\n# vim:fileencoding=utf-8\n# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>\n\nfrom collections import namedtuple\nfrom functools import partial\nfrom itertools import islice, repeat\n\nfrom .constants import WindowGeometry\nfrom .fast_data_types impor... | [
{
"content": "#!/usr/bin/env python\n# vim:fileencoding=utf-8\n# License: GPL v3 Copyright: 2016, Kovid Goyal <kovid at kovidgoyal.net>\n\nfrom collections import namedtuple\nfrom functools import partial\nfrom itertools import islice, repeat\n\nfrom .constants import WindowGeometry\nfrom .fast_data_types impor... | diff --git a/kitty/layout.py b/kitty/layout.py
index aa522efb04f..cf6c1a1696c 100644
--- a/kitty/layout.py
+++ b/kitty/layout.py
@@ -721,7 +721,7 @@ def minimal_borders(self, windows, active_window, needs_borders_map):
def neighbors_for_window(self, window, windows):
n = len(windows)
if n < 4:
- ... |
scrapy__scrapy-3735 | Name parameters uniformly (Cache Policy API)
https://github.com/scrapy/scrapy/blob/92801850546121f2faf95fd21c923904fde35c28/scrapy/extensions/httpcache.py#L34
It will look better if we name the second parameter as `cachedresponse` (in place of just `response`).
In fact, implementation of policy for RFC2616 compli... | [
{
"content": "from __future__ import print_function\nimport os\nimport gzip\nimport logging\nfrom six.moves import cPickle as pickle\nfrom importlib import import_module\nfrom time import time\nfrom weakref import WeakKeyDictionary\nfrom email.utils import mktime_tz, parsedate_tz\nfrom w3lib.http import headers... | [
{
"content": "from __future__ import print_function\nimport os\nimport gzip\nimport logging\nfrom six.moves import cPickle as pickle\nfrom importlib import import_module\nfrom time import time\nfrom weakref import WeakKeyDictionary\nfrom email.utils import mktime_tz, parsedate_tz\nfrom w3lib.http import headers... | diff --git a/scrapy/extensions/httpcache.py b/scrapy/extensions/httpcache.py
index 1b5e05b1b3d..35c77add849 100644
--- a/scrapy/extensions/httpcache.py
+++ b/scrapy/extensions/httpcache.py
@@ -31,7 +31,7 @@ def should_cache_request(self, request):
def should_cache_response(self, response, request):
return... |
pypa__setuptools-1666 | v40.7.1 omits port in index download
In this commit https://github.com/pypa/setuptools/commit/3a351aa00e2110c3b3df0302b1ed6bcf66a1f8d8 is used host instead of netloc, but host does not contain port. Version 40.6.3 works OK.
v40.7.1 omits port in index download
In this commit https://github.com/pypa/setuptools/commit/3a... | [
{
"content": "\"\"\"PyPI and direct package downloading\"\"\"\nimport sys\nimport os\nimport re\nimport shutil\nimport socket\nimport base64\nimport hashlib\nimport itertools\nimport warnings\nfrom functools import wraps\n\nfrom setuptools.extern import six\nfrom setuptools.extern.six.moves import urllib, http_... | [
{
"content": "\"\"\"PyPI and direct package downloading\"\"\"\nimport sys\nimport os\nimport re\nimport shutil\nimport socket\nimport base64\nimport hashlib\nimport itertools\nimport warnings\nfrom functools import wraps\n\nfrom setuptools.extern import six\nfrom setuptools.extern.six.moves import urllib, http_... | diff --git a/changelog.d/1666.change.rst b/changelog.d/1666.change.rst
new file mode 100644
index 0000000000..55a1c0f1db
--- /dev/null
+++ b/changelog.d/1666.change.rst
@@ -0,0 +1 @@
+Restore port in URL handling in package_index.
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 7e9517cefa..... |
secdev__scapy-1089 | DNSRR issue
I am testing newest scapy with python3 and I've found a problem with DNSRR packet:
```python
p = DNS(qr=1, qd=DNSQR(qtype='A', qname='example.com'), an=DNSRR(type='A', rdata='1.2.3.4'))
bytes(p)
```
```
Traceback (most recent call last):
File "src/scapy/scapy/compat.py", line 96, in raw
re... | [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nDNS: Domain Name System.\n\"\"\"\n\nfrom __future__ import absolute_import\nimport soc... | [
{
"content": "## This file is part of Scapy\n## See http://www.secdev.org/projects/scapy for more informations\n## Copyright (C) Philippe Biondi <phil@secdev.org>\n## This program is published under a GPLv2 license\n\n\"\"\"\nDNS: Domain Name System.\n\"\"\"\n\nfrom __future__ import absolute_import\nimport soc... | diff --git a/scapy/layers/dns.py b/scapy/layers/dns.py
index 17a7711f06d..a52acbaefe7 100755
--- a/scapy/layers/dns.py
+++ b/scapy/layers/dns.py
@@ -224,7 +224,7 @@ def m2i(self, pkt, s):
def i2m(self, pkt, s):
if pkt.type == 1: # A
if s:
- s = inet_aton(s)
+ s =... |
jupyterhub__jupyterhub-1030 | c.Spawner.port is not configurable
**How to reproduce the issue**
1. Set `c.Spawner.port = 8888` in jupyterhub_config.py
**What you expected to happen**
1. `self.port` inside a Spawner should be 8888
**What actually happens**
1. `self.port` inside spawner is actually still 0
**Share what version of Jupyte... | [
{
"content": "\"\"\"\nContains base Spawner class & default implementation\n\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport errno\nimport os\nimport pipes\nimport pwd\nimport shutil\nimport signal\nimport sys\nimport grp\nimport warnings\... | [
{
"content": "\"\"\"\nContains base Spawner class & default implementation\n\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport errno\nimport os\nimport pipes\nimport pwd\nimport shutil\nimport signal\nimport sys\nimport grp\nimport warnings\... | diff --git a/jupyterhub/spawner.py b/jupyterhub/spawner.py
index 34043b2bf0..0f2b2ee23f 100644
--- a/jupyterhub/spawner.py
+++ b/jupyterhub/spawner.py
@@ -77,9 +77,13 @@ class Spawner(LoggingConfigurable):
Defaults to `0`, which uses a randomly allocated port number each time.
+ If set to a non-zero... |
mathesar-foundation__mathesar-788 | Install.py script assumes database to exist
## Description
The install.py script has a hard check on the hostname to check if we're using the docker created postgres container and only creates the databases if we do.
`if DATABASES[database_key]["HOST"] == "db":`
In https://github.com/centerofci/mathesar/pull/747... | [
{
"content": "\"\"\"\nThis script installs functions and types for Mathesar onto the configured DB.\n\"\"\"\nfrom config.settings import DATABASES\nfrom db import install\nimport sys\nimport getopt\n\n\ndef main():\n skip_confirm = False\n (opts, _) = getopt.getopt(sys.argv[1:], \":s\", [\"skip-confirm\"]... | [
{
"content": "\"\"\"\nThis script installs functions and types for Mathesar onto the configured DB.\n\"\"\"\nfrom config.settings import DATABASES\nfrom db import install\nimport sys\nimport getopt\n\n\ndef main():\n skip_confirm = False\n (opts, _) = getopt.getopt(sys.argv[1:], \":s\", [\"skip-confirm\"]... | diff --git a/install.py b/install.py
index bc389811b5..e1bff8ea75 100644
--- a/install.py
+++ b/install.py
@@ -18,7 +18,7 @@ def main():
def install_on_db_with_key(database_key, skip_confirm):
- if DATABASES[database_key]["HOST"] == "db":
+ if DATABASES[database_key]["HOST"] == "mathesar_db":
# if w... |
pyca__cryptography-3215 | HKDF key-length inconsistency
For too small key sizes, `HKDF.derive()` outputs an empty array instead of a small key:
Program:
```python
#!/usr/bin/env python3.5
import cryptography
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
from cryptography.hazm... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\... | diff --git a/src/cryptography/hazmat/primitives/kdf/hkdf.py b/src/cryptography/hazmat/primitives/kdf/hkdf.py
index f738bbdc72e5..82ed9b1c85e9 100644
--- a/src/cryptography/hazmat/primitives/kdf/hkdf.py
+++ b/src/cryptography/hazmat/primitives/kdf/hkdf.py
@@ -91,7 +91,7 @@ def _expand(self, key_material):
outpu... |
napalm-automation__napalm-692 | pip >= 10.0.0 incompatibility
I am not going to create these for every single napalm module... but did for https://github.com/napalm-automation/napalm-ansible/issues/123 where I also saw this issue
pip 10.x no longer provides pip.req as needed in setup.py
https://github.com/pypa/pip/issues/5156
| [
{
"content": "\"\"\"setup.py file.\"\"\"\nimport uuid\n\nfrom setuptools import setup, find_packages\n\nfrom pip.req import parse_requirements\n\n\ninstall_reqs = parse_requirements('requirements.txt', session=uuid.uuid1())\nreqs = [str(ir.req) for ir in install_reqs]\n\n__author__ = 'David Barroso <dbarrosop@d... | [
{
"content": "\"\"\"setup.py file.\"\"\"\nfrom setuptools import setup, find_packages\n\nwith open(\"requirements.txt\", \"r\") as fs:\n reqs = [r for r in fs.read().splitlines() if (len(r) > 0 and not r.startswith(\"#\"))]\n\n\n__author__ = 'David Barroso <dbarrosop@dravetech.com>'\n\nsetup(\n name=\"nap... | diff --git a/setup.py b/setup.py
index 8b1ad8382..64606947e 100644
--- a/setup.py
+++ b/setup.py
@@ -1,13 +1,9 @@
"""setup.py file."""
-import uuid
-
from setuptools import setup, find_packages
-from pip.req import parse_requirements
-
+with open("requirements.txt", "r") as fs:
+ reqs = [r for r in fs.read().spl... |
awslabs__gluonts-759 | "info" field is broken
Seems to have been introduced in cfe27298deb (worked fine before that)
## To Reproduce
```python
import numpy as np
from gluonts.model.simple_feedforward import SimpleFeedForwardEstimator
from gluonts.dataset.common import ListDataset
from gluonts.trainer import Trainer
dataset = L... | [
{
"content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\").\n# You may not use this file except in compliance with the License.\n# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE... | [
{
"content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\").\n# You may not use this file except in compliance with the License.\n# A copy of the License is located at\n#\n# http://www.apache.org/licenses/LICE... | diff --git a/src/gluonts/dataset/parallelized_loader.py b/src/gluonts/dataset/parallelized_loader.py
index f9cbb0a3a3..c1bb9cbef9 100644
--- a/src/gluonts/dataset/parallelized_loader.py
+++ b/src/gluonts/dataset/parallelized_loader.py
@@ -126,12 +126,8 @@ def stack(
stack(t, multi_processing, dtype, single... |
pre-commit__pre-commit-2345 | pre-push hook failed with "ValueError: too many values to unpack (expected 4)"
### describe your issue
I ran
```
git push --dry-run origin HEAD^"{/^[a-zA-Z]+: }":refs/for/main%wip
```
and expected the hook to run properly, but it failed with a somewhat subtle error:
```
An unexpected error has occurred: Va... | [
{
"content": "from __future__ import annotations\n\nimport argparse\nimport os.path\nimport subprocess\nimport sys\nfrom typing import Sequence\n\nfrom pre_commit.commands.run import run\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.parse_shebang import normalize_cmd\nfrom pre_commit.store impo... | [
{
"content": "from __future__ import annotations\n\nimport argparse\nimport os.path\nimport subprocess\nimport sys\nfrom typing import Sequence\n\nfrom pre_commit.commands.run import run\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.parse_shebang import normalize_cmd\nfrom pre_commit.store impo... | diff --git a/pre_commit/commands/hook_impl.py b/pre_commit/commands/hook_impl.py
index 18e5e9f59..f315c04de 100644
--- a/pre_commit/commands/hook_impl.py
+++ b/pre_commit/commands/hook_impl.py
@@ -114,7 +114,8 @@ def _pre_push_ns(
remote_url = args[1]
for line in stdin.decode().splitlines():
- local_... |
streamlink__streamlink-5480 | Unexpected FFmpeg version output while running ['/usr/bin/ffmpeg', '-version']
### Checklist
- [X] This is a bug report and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checke... | [
{
"content": "import asyncio\nfrom contextlib import suppress\nfrom typing import Callable, List, Optional\n\n\nclass ProcessOutput:\n def __init__(self, command: List[str], timeout: Optional[float] = None):\n self.command = command\n self.timeout = timeout\n\n def run(self) -> bool: # prag... | [
{
"content": "import asyncio\nfrom contextlib import suppress\nfrom typing import Callable, List, Optional\n\n\nclass ProcessOutput:\n def __init__(self, command: List[str], timeout: Optional[float] = None):\n self.command = command\n self.timeout = timeout\n\n def run(self) -> bool: # prag... | diff --git a/src/streamlink/utils/processoutput.py b/src/streamlink/utils/processoutput.py
index 85ed631ba48..1e14b53936b 100644
--- a/src/streamlink/utils/processoutput.py
+++ b/src/streamlink/utils/processoutput.py
@@ -48,9 +48,9 @@ async def onoutput(callback: Callable[[int, str], Optional[bool]], streamreader:
... |
OpenNMT__OpenNMT-py-1949 | UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3 in position 0: invalid continuation byt
with the current V2.0.0rc2, on Windows 10, Python 3.7.7. onmt_build_vocab doesn't save utf-8 src/tgt files.
I build a data set and it's fine, but when I try to train I get
```PS C:\Users\Admin\Documents\pytorch\bug... | [
{
"content": "#!/usr/bin/env python\n\"\"\"Get vocabulary coutings from transformed corpora samples.\"\"\"\nfrom onmt.utils.logging import init_logger\nfrom onmt.utils.misc import set_random_seed, check_path\nfrom onmt.utils.parse import ArgumentParser\nfrom onmt.opts import dynamic_prepare_opts\nfrom onmt.inpu... | [
{
"content": "#!/usr/bin/env python\n\"\"\"Get vocabulary coutings from transformed corpora samples.\"\"\"\nfrom onmt.utils.logging import init_logger\nfrom onmt.utils.misc import set_random_seed, check_path\nfrom onmt.utils.parse import ArgumentParser\nfrom onmt.opts import dynamic_prepare_opts\nfrom onmt.inpu... | diff --git a/onmt/bin/build_vocab.py b/onmt/bin/build_vocab.py
index fbb05f1b28..462469be3e 100644
--- a/onmt/bin/build_vocab.py
+++ b/onmt/bin/build_vocab.py
@@ -40,7 +40,7 @@ def build_vocab_main(opts):
def save_counter(counter, save_path):
check_path(save_path, exist_ok=opts.overwrite, log=logger.war... |
kivy__kivy-4047 | Pygame text provider does not render text opacity properly
Text renders as if opacity is set to 100% regardless of what's set in a Label's color attribute.
SDL2 works just fine.
Tested with master pulled today on Linux.
Pygame text provider does not render text opacity properly
Text renders as if opacity is set to 1... | [
{
"content": "'''\nText Pygame: Draw text with pygame\n'''\n\n__all__ = ('LabelPygame', )\n\nfrom kivy.compat import PY2\nfrom kivy.core.text import LabelBase\nfrom kivy.core.image import ImageData\n\ntry:\n import pygame\nexcept:\n raise\n\npygame_cache = {}\npygame_font_handles = {}\npygame_cache_order ... | [
{
"content": "'''\nText Pygame: Draw text with pygame\n'''\n\n__all__ = ('LabelPygame', )\n\nfrom kivy.compat import PY2\nfrom kivy.core.text import LabelBase\nfrom kivy.core.image import ImageData\n\ntry:\n import pygame\nexcept:\n raise\n\npygame_cache = {}\npygame_font_handles = {}\npygame_cache_order ... | diff --git a/kivy/core/text/text_pygame.py b/kivy/core/text/text_pygame.py
index ced2b721c5..2f873dfb41 100644
--- a/kivy/core/text/text_pygame.py
+++ b/kivy/core/text/text_pygame.py
@@ -97,6 +97,7 @@ def _render_text(self, text, x, y):
color[0], color[2] = color[2], color[0]
try:
text = ... |
aio-libs__aiohttp-3503 | web._cancel_all_tasks causes spurious errors on Python <3.7
## Long story short
Python 3.5's `asyncio.Task.all_tasks` differs from Python 3.7's `asyncio.all_tasks` in that it [includes completed tasks](https://github.com/python/cpython/blob/ddc613f20394eba25f2420f6d2fa62b277c95058/Lib/asyncio/tasks.py#L42). However,... | [
{
"content": "\"\"\"Various helper functions\"\"\"\n\nimport asyncio\nimport base64\nimport binascii\nimport cgi\nimport functools\nimport inspect\nimport netrc\nimport os\nimport platform\nimport re\nimport sys\nimport time\nimport warnings\nimport weakref\nfrom collections import namedtuple\nfrom contextlib i... | [
{
"content": "\"\"\"Various helper functions\"\"\"\n\nimport asyncio\nimport base64\nimport binascii\nimport cgi\nimport functools\nimport inspect\nimport netrc\nimport os\nimport platform\nimport re\nimport sys\nimport time\nimport warnings\nimport weakref\nfrom collections import namedtuple\nfrom contextlib i... | diff --git a/CHANGES/3497.bugfix b/CHANGES/3497.bugfix
new file mode 100644
index 00000000000..a20b8f9b3bf
--- /dev/null
+++ b/CHANGES/3497.bugfix
@@ -0,0 +1 @@
+Ignore done tasks when cancels pending activities on ``web.run_app`` finalization.
diff --git a/aiohttp/helpers.py b/aiohttp/helpers.py
index a44a407fea2..cbf... |
scikit-hep__awkward-2543 | `NumpyArray` should not be string-like
### Version of Awkward Array
main
### Description and code to reproduce
At present, we have [code that implies `NumpyArray` can be a string](https://github.com/scikit-hep/awkward/blob/f3ce29e0a6014ebbce8a722826abc6fc7ae14791/src/awkward/contents/numpyarray.py#L665) (list ... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\nfrom __future__ import annotations\n\nimport copy\nfrom collections.abc import MutableMapping, Sequence\n\nimport awkward as ak\nfrom awkward._backends.backend import Backend\nfrom awkward._backends.dispatch i... | [
{
"content": "# BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE\nfrom __future__ import annotations\n\nimport copy\nfrom collections.abc import MutableMapping, Sequence\n\nimport awkward as ak\nfrom awkward._backends.backend import Backend\nfrom awkward._backends.dispatch i... | diff --git a/src/awkward/contents/numpyarray.py b/src/awkward/contents/numpyarray.py
index 476bc208f0..a251c42233 100644
--- a/src/awkward/contents/numpyarray.py
+++ b/src/awkward/contents/numpyarray.py
@@ -674,9 +674,7 @@ def _as_unique_strings(self, offsets):
def _numbers_to_type(self, name, including_unknown)... |
freqtrade__freqtrade-2697 | db-url defaults during dryrun
In the [docker doc](https://www.freqtrade.io/en/latest/docker/#create-your-database-file) the doc recommend to create the database in live with ` touch tradesv3.sqlite`, and in dryrun with`touch tradesv3.dryrun.sqlite`.
But then in the note below it says :
> db-url defaults to sqlit... | [
{
"content": "# pragma pylint: disable=too-few-public-methods\n\n\"\"\"\nbot constants\n\"\"\"\nDEFAULT_CONFIG = 'config.json'\nDEFAULT_EXCHANGE = 'bittrex'\nPROCESS_THROTTLE_SECS = 5 # sec\nHYPEROPT_EPOCH = 100 # epochs\nRETRY_TIMEOUT = 30 # sec\nDEFAULT_HYPEROPT_LOSS = 'DefaultHyperOptLoss'\nDEFAULT_DB_PRO... | [
{
"content": "# pragma pylint: disable=too-few-public-methods\n\n\"\"\"\nbot constants\n\"\"\"\nDEFAULT_CONFIG = 'config.json'\nDEFAULT_EXCHANGE = 'bittrex'\nPROCESS_THROTTLE_SECS = 5 # sec\nHYPEROPT_EPOCH = 100 # epochs\nRETRY_TIMEOUT = 30 # sec\nDEFAULT_HYPEROPT_LOSS = 'DefaultHyperOptLoss'\nDEFAULT_DB_PRO... | diff --git a/docs/bot-usage.md b/docs/bot-usage.md
index 86a9909462f..e856755d28b 100644
--- a/docs/bot-usage.md
+++ b/docs/bot-usage.md
@@ -45,14 +45,17 @@ optional arguments:
-h, --help show this help message and exit
--db-url PATH Override trades database URL, this is useful in custom
... |
ietf-tools__datatracker-6133 | /secr/sreq doesn't allow listing rswg as a conflict
From Paul Hoffman:
> I was creating my session request, and did not see RSWG in the drop-downs for conflicts. It might not be there because the form doesn't do the Editorial stream, or it might not be there because the list has not been recently updated.
| [
{
"content": "# Copyright The IETF Trust 2013-2022, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nfrom django import forms\nfrom django.template.defaultfilters import pluralize\n\nimport debug # pyflakes:ignore\n\nfrom ietf.name.models import TimerangeName, ConstraintName\nfrom ie... | [
{
"content": "# Copyright The IETF Trust 2013-2022, All Rights Reserved\n# -*- coding: utf-8 -*-\n\n\nfrom django import forms\nfrom django.template.defaultfilters import pluralize\n\nimport debug # pyflakes:ignore\n\nfrom ietf.name.models import TimerangeName, ConstraintName\nfrom ie... | diff --git a/ietf/secr/sreq/forms.py b/ietf/secr/sreq/forms.py
index 0c112a063a..1100bc7c8a 100644
--- a/ietf/secr/sreq/forms.py
+++ b/ietf/secr/sreq/forms.py
@@ -28,7 +28,7 @@
# Helper Functions
# -------------------------------------------------
def allowed_conflicting_groups():
- return Group.objects.filter(ty... |
aws__aws-cli-2510 | Version 1.11.17 and above breaks EC2 describe volumes with JSON input
Related Issue: #1976
JSON File:
```json
{
"VolumeIds": [
"vol-<id>"
]
}
```
Command:
```
aws ec2 describe-volumes --region <region> --cli-input-json file://<file-name>.json
```
Error Message:
```
An error occurred (Inval... | [
{
"content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#... | [
{
"content": "# Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#... | diff --git a/.changes/next-release/bugfix-ec2-77933.json b/.changes/next-release/bugfix-ec2-77933.json
new file mode 100644
index 000000000000..744c9652fd68
--- /dev/null
+++ b/.changes/next-release/bugfix-ec2-77933.json
@@ -0,0 +1,5 @@
+{
+ "description": "Fixed a bug causing some ec2 commands to fail with an invalid... |
conan-io__conan-5102 | [BUG] Conan Tools does not export detected_os
To help us debug your issue please explain:
When I was updating cmake_installer, I just found that `detected_os` is not exported by conans.tools
Conan Version 1.15.0
```python
from conans import tools
if __name__ == "__main__":
tools.detected_os()
```
**E... | [
{
"content": "\"\"\"\n Conan tools: classes and function in this module are intended to be used out of the box\n with the Conan configuration already currified into them. This configuration refers\n mainly to two items:\n - requester: on network calls, this will include proxy definition.\n - ou... | [
{
"content": "\"\"\"\n Conan tools: classes and function in this module are intended to be used out of the box\n with the Conan configuration already currified into them. This configuration refers\n mainly to two items:\n - requester: on network calls, this will include proxy definition.\n - ou... | diff --git a/conans/test/unittests/client/conf/detect/detected_os_test.py b/conans/test/unittests/client/conf/detect/detected_os_test.py
index e5a1aac9a03..1da5b708a14 100644
--- a/conans/test/unittests/client/conf/detect/detected_os_test.py
+++ b/conans/test/unittests/client/conf/detect/detected_os_test.py
@@ -5,6 +5,... |
vispy__vispy-887 | Focus problem in Qt
When embedding a VisPy canvas in a QMainWindow dock widget, the keyboard events are not received by VisPy. It might be a focus problem. You can test this in the primitive_qt_viewer example, by implement an `on_key_press` event in the canvas. Any ideas?
| [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2014, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\nBase code for the Qt backends. Note that this is *not* (anymore) a\nbackend by itself! One has to explicitly use either PySide, PyQt4 or\nPyQ... | [
{
"content": "# -*- coding: utf-8 -*-\n# Copyright (c) 2014, Vispy Development Team.\n# Distributed under the (new) BSD License. See LICENSE.txt for more info.\n\n\"\"\"\nBase code for the Qt backends. Note that this is *not* (anymore) a\nbackend by itself! One has to explicitly use either PySide, PyQt4 or\nPyQ... | diff --git a/vispy/app/backends/_qt.py b/vispy/app/backends/_qt.py
index d20e44c8e9..d3fbcb076b 100644
--- a/vispy/app/backends/_qt.py
+++ b/vispy/app/backends/_qt.py
@@ -579,6 +579,7 @@ def _init_specific(self, p, kwargs):
if not self.isValid():
raise RuntimeError('context could not be created')
... |
aio-libs__aiohttp-3500 | web._cancel_all_tasks causes spurious errors on Python <3.7
## Long story short
Python 3.5's `asyncio.Task.all_tasks` differs from Python 3.7's `asyncio.all_tasks` in that it [includes completed tasks](https://github.com/python/cpython/blob/ddc613f20394eba25f2420f6d2fa62b277c95058/Lib/asyncio/tasks.py#L42). However,... | [
{
"content": "\"\"\"Various helper functions\"\"\"\n\nimport asyncio\nimport base64\nimport binascii\nimport cgi\nimport functools\nimport inspect\nimport netrc\nimport os\nimport platform\nimport re\nimport sys\nimport time\nimport warnings\nimport weakref\nfrom collections import namedtuple\nfrom contextlib i... | [
{
"content": "\"\"\"Various helper functions\"\"\"\n\nimport asyncio\nimport base64\nimport binascii\nimport cgi\nimport functools\nimport inspect\nimport netrc\nimport os\nimport platform\nimport re\nimport sys\nimport time\nimport warnings\nimport weakref\nfrom collections import namedtuple\nfrom contextlib i... | diff --git a/CHANGES/3497.bugfix b/CHANGES/3497.bugfix
new file mode 100644
index 00000000000..a20b8f9b3bf
--- /dev/null
+++ b/CHANGES/3497.bugfix
@@ -0,0 +1 @@
+Ignore done tasks when cancels pending activities on ``web.run_app`` finalization.
diff --git a/aiohttp/helpers.py b/aiohttp/helpers.py
index a44a407fea2..cbf... |
zulip__zulip-16512 | New line character issue when using create_user management command
The create_user management command reads password from a text file created by the server admin. To run this command I tried creating this text file using VIM, nano and echo (` echo pass > password.txt` without using `-n` flag). Each and every time new ... | [
{
"content": "import argparse\nimport sys\nfrom typing import Any\n\nfrom django.core import validators\nfrom django.core.exceptions import ValidationError\nfrom django.core.management.base import CommandError\nfrom django.db.utils import IntegrityError\n\nfrom zerver.lib.actions import do_create_user\nfrom zer... | [
{
"content": "import argparse\nimport sys\nfrom typing import Any\n\nfrom django.core import validators\nfrom django.core.exceptions import ValidationError\nfrom django.core.management.base import CommandError\nfrom django.db.utils import IntegrityError\n\nfrom zerver.lib.actions import do_create_user\nfrom zer... | diff --git a/zerver/management/commands/create_user.py b/zerver/management/commands/create_user.py
index 71b378b4ffac1..e6599837de452 100644
--- a/zerver/management/commands/create_user.py
+++ b/zerver/management/commands/create_user.py
@@ -71,7 +71,7 @@ def handle(self, *args: Any, **options: Any) -> None:
tr... |
readthedocs__readthedocs.org-11354 | Project version filter returns 500
It seems the `ProjectVersionListFilterSet.get_visibility()` is receiving the wrong amount of arguments.
To reproduce, just hit https://beta.readthedocs.org/projects/bigo-live-hack/?privacy=&sort=&visibility=hidden
Sentry issue: https://read-the-docs.sentry.io/issues/4721614191/?... | [
{
"content": "\"\"\"Filters used in project dashboard.\"\"\"\n\nimport structlog\nfrom django.db.models import Count, F, Max\nfrom django.utils.translation import gettext_lazy as _\nfrom django_filters import ChoiceFilter, OrderingFilter\n\nfrom readthedocs.core.filters import FilteredModelChoiceFilter, ModelFi... | [
{
"content": "\"\"\"Filters used in project dashboard.\"\"\"\n\nimport structlog\nfrom django.db.models import Count, F, Max\nfrom django.utils.translation import gettext_lazy as _\nfrom django_filters import ChoiceFilter, OrderingFilter\n\nfrom readthedocs.core.filters import FilteredModelChoiceFilter, ModelFi... | diff --git a/readthedocs/projects/filters.py b/readthedocs/projects/filters.py
index 3f1d69e64c4..d57d4ea1bc7 100644
--- a/readthedocs/projects/filters.py
+++ b/readthedocs/projects/filters.py
@@ -234,7 +234,7 @@ def get_version_queryset(self):
# This query is passed in at instantiation
return self.qu... |
blakeblackshear__frigate-5800 | [Support]: RTSP password not correctly masked / in log file
### Describe the problem you are having
Password is shown in Log FIle
```
Ffmpeg process crashed unexpectedly for E1ProBabyRoom.
The following ffmpeg logs include the last 100 lines prior to exit.
rtsp://*:*@192.168.1.3:554/h264Preview_01_sub: Protoco... | [
{
"content": "import copy\nimport datetime\nimport logging\nimport shlex\nimport subprocess as sp\nimport json\nimport re\nimport signal\nimport traceback\nimport urllib.parse\nimport yaml\n\nfrom abc import ABC, abstractmethod\nfrom collections import Counter\nfrom collections.abc import Mapping\nfrom multipro... | [
{
"content": "import copy\nimport datetime\nimport logging\nimport shlex\nimport subprocess as sp\nimport json\nimport re\nimport signal\nimport traceback\nimport urllib.parse\nimport yaml\n\nfrom abc import ABC, abstractmethod\nfrom collections import Counter\nfrom collections.abc import Mapping\nfrom multipro... | diff --git a/frigate/test/test_camera_pw.py b/frigate/test/test_camera_pw.py
index dd72fcc7d7..92aec48d87 100644
--- a/frigate/test/test_camera_pw.py
+++ b/frigate/test/test_camera_pw.py
@@ -36,3 +36,14 @@ def test_no_special_char_password(self):
"""Test that no change is made to path with no special character... |
zalando__patroni-2127 | etcd machines_cache can have duplicate entries
**Describe the bug**
While researching retries in case of DCS failures, I noticed that `_calculate_timeouts()` gets 7 as `etcd_nodes` when I use etcd, but only 3 if I use etcd3. In both cases, etcd is running locally on a 3-node Patroni cluster, and all three nodes are ... | [
{
"content": "from __future__ import absolute_import\nimport abc\nimport etcd\nimport json\nimport logging\nimport os\nimport urllib3.util.connection\nimport random\nimport six\nimport socket\nimport time\n\nfrom dns.exception import DNSException\nfrom dns import resolver\nfrom urllib3 import Timeout\nfrom urll... | [
{
"content": "from __future__ import absolute_import\nimport abc\nimport etcd\nimport json\nimport logging\nimport os\nimport urllib3.util.connection\nimport random\nimport six\nimport socket\nimport time\n\nfrom dns.exception import DNSException\nfrom dns import resolver\nfrom urllib3 import Timeout\nfrom urll... | diff --git a/patroni/dcs/etcd.py b/patroni/dcs/etcd.py
index ec510a042..185b1ae75 100644
--- a/patroni/dcs/etcd.py
+++ b/patroni/dcs/etcd.py
@@ -184,7 +184,7 @@ def machines(self):
for base_uri in machines_cache:
try:
- machines = list(self._get_members(base_uri, **kwargs))
+ ... |
lutris__lutris-4203 | error running "lutris --list-steam-folders" - TypeError: 'dict_values' object is not subscriptable
### Bug description
running "lutris --list-steam-folders" produces the error:
TypeError: 'dict_values' object is not subscriptable
I assume the above is also why steam games do not show up in lutris.
### How to R... | [
{
"content": "# pylint: disable=wrong-import-position\n#\n# Copyright (C) 2021 Mathieu Comandon <strider@strycore.com>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either versio... | [
{
"content": "# pylint: disable=wrong-import-position\n#\n# Copyright (C) 2021 Mathieu Comandon <strider@strycore.com>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either versio... | diff --git a/lutris/gui/application.py b/lutris/gui/application.py
index cfbd24ca8c..dbe02024e6 100644
--- a/lutris/gui/application.py
+++ b/lutris/gui/application.py
@@ -778,8 +778,8 @@ def execute_command(command):
def print_steam_folders(self, command_line):
steamapps_paths = get_steamapps_paths()
- ... |
urllib3__urllib3-2204 | is_connection_dropped checks against None but uses False as default value for getattr
I happened to read this line and the code looks fishy. I did not otherwise verify the potential bug.
See implementation of `is_connection_dropped(conn: socket.socket) -> bool`:
https://github.com/urllib3/urllib3/blob/287052a16a5... | [
{
"content": "import socket\nfrom typing import List, Optional, Tuple, Union\n\nfrom urllib3.exceptions import LocationParseError\n\nfrom .wait import wait_for_read\n\nSOCKET_GLOBAL_DEFAULT_TIMEOUT = socket._GLOBAL_DEFAULT_TIMEOUT # type: ignore\nSocketOptions = List[Tuple[int, int, Union[int, bytes]]]\n\n\nde... | [
{
"content": "import socket\nfrom typing import List, Optional, Tuple, Union\n\nfrom urllib3.exceptions import LocationParseError\n\nfrom .wait import wait_for_read\n\nSOCKET_GLOBAL_DEFAULT_TIMEOUT = socket._GLOBAL_DEFAULT_TIMEOUT # type: ignore\nSocketOptions = List[Tuple[int, int, Union[int, bytes]]]\n\n\nde... | diff --git a/src/urllib3/util/connection.py b/src/urllib3/util/connection.py
index 182ca3662e..b9e14eeefb 100644
--- a/src/urllib3/util/connection.py
+++ b/src/urllib3/util/connection.py
@@ -16,7 +16,7 @@ def is_connection_dropped(conn: socket.socket) -> bool: # Platform-specific
:param conn:
:class:`htt... |
python-pillow__Pillow-4828 | TypeError: exif.startswith(b"Exif\x00\x00"): arg must be str
https://github.com/python-pillow/Pillow/blob/893489c57227f76cff8816de167ad329e5862756/src/PIL/PngImagePlugin.py#L1306
This line hits a TypeError when trying to save a png file (while trying to save a thumbnail of a png image)
```python
if exif.startswith... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# PNG support code\n#\n# See \"PNG (Portable Network Graphics) Specification, version 1.0;\n# W3C Recommendation\", 1996-10-01, Thomas Boutell (ed.).\n#\n# history:\n# 1996-05-06 fl Created (couldn't resist it)\n# 1996-12-14 fl Upgraded, added read ... | [
{
"content": "#\n# The Python Imaging Library.\n# $Id$\n#\n# PNG support code\n#\n# See \"PNG (Portable Network Graphics) Specification, version 1.0;\n# W3C Recommendation\", 1996-10-01, Thomas Boutell (ed.).\n#\n# history:\n# 1996-05-06 fl Created (couldn't resist it)\n# 1996-12-14 fl Upgraded, added read ... | diff --git a/Tests/images/exif_text.png b/Tests/images/exif_text.png
new file mode 100644
index 00000000000..e2d8dc0fffa
Binary files /dev/null and b/Tests/images/exif_text.png differ
diff --git a/Tests/test_file_png.py b/Tests/test_file_png.py
index 9891b639999..146162140af 100644
--- a/Tests/test_file_png.py
+++ b/Te... |
pyca__cryptography-3216 | HKDF key-length inconsistency
For too small key sizes, `HKDF.derive()` outputs an empty array instead of a small key:
Program:
```python
#!/usr/bin/env python3.5
import cryptography
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.hkdf import HKDF
from cryptography.hazm... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport six\n\nfrom cryptography import utils\... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 0bfd3281faee..9b0bf29de519 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,13 @@
Changelog
=========
+1.5.3 - 2016-11-05
+~~~~~~~~~~~~~~~~~~
+
+* **SECURITY ISSUE**: Fixed a bug where ``HKDF`` would return an empty
+ byte-string if used with a ``length`` l... |
ivy-llc__ivy-17878 | divide
implementing the divide for paddle frontend
| [
{
"content": "# local\r\nimport ivy\r\nimport ivy.functional.frontends.paddle as paddle_frontend\r\nfrom ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes\r\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\r\n\r\n\r\nclass Tensor:\r\n def __init__(self, array, dtyp... | [
{
"content": "# local\r\nimport ivy\r\nimport ivy.functional.frontends.paddle as paddle_frontend\r\nfrom ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes\r\nfrom ivy.functional.frontends.paddle.func_wrapper import _to_ivy_array\r\n\r\n\r\nclass Tensor:\r\n def __init__(self, array, dtyp... | diff --git a/ivy/functional/frontends/paddle/tensor/tensor.py b/ivy/functional/frontends/paddle/tensor/tensor.py
index 7d7a6f1c74cdb..e8a91120590ac 100644
--- a/ivy/functional/frontends/paddle/tensor/tensor.py
+++ b/ivy/functional/frontends/paddle/tensor/tensor.py
@@ -294,6 +294,10 @@ def greater_than(self, y, name=Non... |
cowrie__cowrie-1356 | Unicode-objects must be encoded before hashing
Hello,
**Describe the bug**
When user type ssh user@server the honeypot produce an error.
**To Reproduce**
Steps to reproduce the behavior:
1. Lanch honeypot
2. Connect to fake system
3. type ssh user@qsdqsd.fr
4. See error in logs
**Server (please complet... | [
{
"content": "# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\nfrom __future__ import absolute_import, division\n\nimport getopt\nimport hashlib\nimport re\nimport socket\nimport time\n\nfrom twisted.internet import reactor\nfrom twisted.python import log\... | [
{
"content": "# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com>\n# See the COPYRIGHT file for more information\n\nfrom __future__ import absolute_import, division\n\nimport getopt\nimport hashlib\nimport re\nimport socket\nimport time\n\nfrom twisted.internet import reactor\nfrom twisted.python import log\... | diff --git a/src/cowrie/commands/ssh.py b/src/cowrie/commands/ssh.py
index 690bc712df..0c9808d0a6 100644
--- a/src/cowrie/commands/ssh.py
+++ b/src/cowrie/commands/ssh.py
@@ -71,7 +71,7 @@ def start(self):
Name or service not known\n' % (host,))
self.exit()
else:
- ... |
kornia__kornia-421 | Fix simple typo: suports -> supports
There is a small typo in kornia/filters/laplacian.py.
Should read `supports` rather than `suports`.
| [
{
"content": "from typing import Tuple\n\nimport torch\nimport torch.nn as nn\n\nimport kornia\nfrom kornia.filters.kernels import get_laplacian_kernel2d\nfrom kornia.filters.kernels import normalize_kernel2d\n\n\nclass Laplacian(nn.Module):\n r\"\"\"Creates an operator that returns a tensor using a Laplacia... | [
{
"content": "from typing import Tuple\n\nimport torch\nimport torch.nn as nn\n\nimport kornia\nfrom kornia.filters.kernels import get_laplacian_kernel2d\nfrom kornia.filters.kernels import normalize_kernel2d\n\n\nclass Laplacian(nn.Module):\n r\"\"\"Creates an operator that returns a tensor using a Laplacia... | diff --git a/kornia/filters/laplacian.py b/kornia/filters/laplacian.py
index f395e42ded..d24489d74c 100644
--- a/kornia/filters/laplacian.py
+++ b/kornia/filters/laplacian.py
@@ -12,7 +12,7 @@ class Laplacian(nn.Module):
r"""Creates an operator that returns a tensor using a Laplacian filter.
The operator sm... |
pypi__warehouse-8050 | Audit 'recovery code' copy against copywriting guidelines
I noticed that some of the text introduced in the new 2fa recovery codes interfaces do not meet the [guidelines](https://warehouse.readthedocs.io/ui-principles/#write-clearly-with-consistent-style-and-terminology), mostly by using `Title Case` instead of `Senten... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/accounts/test_forms.py b/tests/unit/accounts/test_forms.py
index 9f0be3a34ddc..7f03ca71c081 100644
--- a/tests/unit/accounts/test_forms.py
+++ b/tests/unit/accounts/test_forms.py
@@ -730,7 +730,7 @@ def test_invalid_recovery_code(self, pyramid_config):
)
assert not form.valid... |
nextcloud__appstore-619 | Verify email addresses after E-Mail change
When a user changes their email address, it should be verified. allauth provides some views for that which may or may not be useful. Unsure whether email addresses currently are verified at signup, but it would be appropriate for it to use the same mechanism.
| [
{
"content": "from allauth.account.models import EmailAddress\nfrom allauth.account.views import PasswordChangeView\nfrom django.contrib import messages\nfrom django.contrib.auth.mixins import LoginRequiredMixin\nfrom django.urls import reverse_lazy\nfrom django.shortcuts import redirect, render, get_object_or_... | [
{
"content": "from allauth.account.models import EmailAddress\nfrom allauth.account.views import PasswordChangeView\nfrom django.contrib import messages\nfrom django.contrib.auth.mixins import LoginRequiredMixin\nfrom django.urls import reverse_lazy\nfrom django.shortcuts import redirect, render, get_object_or_... | diff --git a/nextcloudappstore/user/views.py b/nextcloudappstore/user/views.py
index 0d0b86f4dcd..3b456c01686 100644
--- a/nextcloudappstore/user/views.py
+++ b/nextcloudappstore/user/views.py
@@ -70,8 +70,7 @@ def get_context_data(self, **kwargs):
def form_valid(self, form):
email = EmailAddress.object... |
liqd__a4-meinberlin-3710 | testing 4293: change wording for template
**URL:** module template in dashboard
**user:** initiator
**expected behaviour:** correct template description
**behaviour:** needs to be adapted
**important screensize:**
**device & browser:**
**Comment/Question:**
change wording from:
Die Teilnehmenden können auf ... | [
{
"content": "from django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.dashboard.blueprints import ProjectBlueprint\nfrom adhocracy4.polls import phases as poll_phases\nfrom meinberlin.apps.budgeting import phases as budgeting_phases\nfrom meinberlin.apps.documents import phases as documents_p... | [
{
"content": "from django.utils.translation import ugettext_lazy as _\n\nfrom adhocracy4.dashboard.blueprints import ProjectBlueprint\nfrom adhocracy4.polls import phases as poll_phases\nfrom meinberlin.apps.budgeting import phases as budgeting_phases\nfrom meinberlin.apps.documents import phases as documents_p... | diff --git a/locale/de_DE/LC_MESSAGES/django.po b/locale/de_DE/LC_MESSAGES/django.po
index 65235afbbb..35325f566f 100644
--- a/locale/de_DE/LC_MESSAGES/django.po
+++ b/locale/de_DE/LC_MESSAGES/django.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: a4-meinberlin\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation... |
acl-org__acl-anthology-2313 | Ingestion request: Generation challenges at INLG 2022
This is to complete the ingestions of all papers from INLG; the Generation Challenges papers still needed to be uploaded. See #1897 for the other papers.
Here are the papers and metadata from the INLG generation challenges, as generated using ACLPUB2: https://dr... | [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"\nTakes a list of XML files on STDIN, and prints all the volumes\nwithin each of those files. e.g.,\n\n git diff --name-only master | ./bin/volumes_from_xml.py https://preview.aclanthology.org/BRANCH\n\nUsed to find the list of volumes to generate previews for.\n... | [
{
"content": "#!/usr/bin/env python3\n\n\"\"\"\nTakes a list of XML files on STDIN, and prints all the volumes\nwithin each of those files. e.g.,\n\n git diff --name-only master | ./bin/volumes_from_xml.py https://preview.aclanthology.org/BRANCH\n\nUsed to find the list of volumes to generate previews for.\n... | diff --git a/bin/volumes_from_diff.py b/bin/volumes_from_diff.py
index bdcebe585a..806c4d6313 100755
--- a/bin/volumes_from_diff.py
+++ b/bin/volumes_from_diff.py
@@ -27,7 +27,7 @@
continue
root = tree.getroot()
collection_id = root.attrib["id"]
- for volume in root:
+ for volume in root.findal... |
getsentry__sentry-python-2497 | Crons django-celery-beat timezone glitch
### How do you use Sentry?
Sentry Saas (sentry.io)
### Version
1.29.2
### Steps to Reproduce
1. Setup django-celery-beat
2. Create a Periodic task via the admin and set a wacked timezone for it
3. setup Sentry with CeleryIntegration(monitor_beat_tasks=True),
4. See the r... | [
{
"content": "from __future__ import absolute_import\n\nimport sys\nimport time\n\nfrom sentry_sdk.api import continue_trace\nfrom sentry_sdk.consts import OP\nfrom sentry_sdk._compat import reraise\nfrom sentry_sdk._functools import wraps\nfrom sentry_sdk.crons import capture_checkin, MonitorStatus\nfrom sentr... | [
{
"content": "from __future__ import absolute_import\n\nimport sys\nimport time\n\nfrom sentry_sdk.api import continue_trace\nfrom sentry_sdk.consts import OP\nfrom sentry_sdk._compat import reraise\nfrom sentry_sdk._functools import wraps\nfrom sentry_sdk.crons import capture_checkin, MonitorStatus\nfrom sentr... | diff --git a/sentry_sdk/integrations/celery.py b/sentry_sdk/integrations/celery.py
index a0c86ea982..88c85d1264 100644
--- a/sentry_sdk/integrations/celery.py
+++ b/sentry_sdk/integrations/celery.py
@@ -444,7 +444,15 @@ def _get_monitor_config(celery_schedule, app, monitor_name):
if schedule_unit is not None:
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.