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
⌀
wger-project__wger-631
Log in as user functionality produces 403 error Hello, when trying to log in from administrator account as user **without** default gym set (that happens when you register through site yourself), I get an 403 error. #### Steps to reproduce Use any of the current deployment methods (docker, docker-compose, VM ...
[ { "content": "# -*- coding: utf-8 -*-\n\n# This file is part of wger Workout Manager.\n#\n# wger Workout Manager is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published by\n# the Free Software Foundation, either version 3 of the License...
[ { "content": "# -*- coding: utf-8 -*-\n\n# This file is part of wger Workout Manager.\n#\n# wger Workout Manager is free software: you can redistribute it and/or modify\n# it under the terms of the GNU Affero General Public License as published by\n# the Free Software Foundation, either version 3 of the License...
diff --git a/wger/core/templates/user/overview.html b/wger/core/templates/user/overview.html index d9186cf63..2be40b2d2 100644 --- a/wger/core/templates/user/overview.html +++ b/wger/core/templates/user/overview.html @@ -469,6 +469,26 @@ <h4>{% trans "Configuration" %}</h4> {# #} {% block options %} {% if pe...
ckan__ckan-4875
Allow to customize the DataProxy URL This will allow users that really want to use it to host their own instance
[ { "content": "# encoding: utf-8\n\nfrom logging import getLogger\n\nfrom ckan.common import json, config\nimport ckan.plugins as p\nimport ckan.plugins.toolkit as toolkit\n\nlog = getLogger(__name__)\nignore_empty = p.toolkit.get_validator('ignore_empty')\nnatural_number_validator = p.toolkit.get_validator('nat...
[ { "content": "# encoding: utf-8\n\nfrom logging import getLogger\n\nfrom ckan.common import json, config\nimport ckan.plugins as p\nimport ckan.plugins.toolkit as toolkit\n\nlog = getLogger(__name__)\nignore_empty = p.toolkit.get_validator('ignore_empty')\nnatural_number_validator = p.toolkit.get_validator('nat...
diff --git a/ckanext/reclineview/plugin.py b/ckanext/reclineview/plugin.py index d17ec967a35..debcc574e5e 100644 --- a/ckanext/reclineview/plugin.py +++ b/ckanext/reclineview/plugin.py @@ -21,6 +21,14 @@ def get_mapview_config(): if k.startswith(namespace)]) +def get_dataproxy_url(): + ''' + ...
liqd__a4-opin-1146
add languages to project detail page in wagtail (user manuals) The titles of the user manuals or only in english and there are no fieldsfor translating them in wagtail. Is it possible to add the languages? :) ![grafik](https://user-images.githubusercontent.com/24652917/36986808-106f0bac-209b-11e8-9170-d48c83d42485.png...
[ { "content": "import bleach\nimport feedparser\nfrom dateutil import parser\nfrom django import template\nfrom django.conf import settings\n\nfrom home.models.snippets import NavigationMenu\n\nregister = template.Library()\n\n\n@register.assignment_tag(takes_context=True)\ndef get_site_root(context):\n retur...
[ { "content": "import bleach\nimport feedparser\nfrom dateutil import parser\nfrom django import template\nfrom django.conf import settings\nfrom django.core.exceptions import ObjectDoesNotExist\n\nfrom home.models.manual_pages import ManualsDetailPage\nfrom home.models.snippets import NavigationMenu\n\nregister...
diff --git a/home/templates/home/blocks/page_collection_block.html b/home/templates/home/blocks/page_collection_block.html index 779650abc..caf9b37ee 100644 --- a/home/templates/home/blocks/page_collection_block.html +++ b/home/templates/home/blocks/page_collection_block.html @@ -1,4 +1,4 @@ -{% load wagtailimages_tags...
ibis-project__ibis-8094
bug: non-string Categorical from pandas crash memtable() ### What happened? ```python import ibis import pandas as pd df = pd.DataFrame( { "cat_string": pd.Series(["a", "b", "c"], dtype="category"), "cat_int": pd.Series([1, 2, 3], dtype="category"), } ) ibis.memtable(df).execute() #...
[ { "content": "from __future__ import annotations\n\nimport contextlib\nimport datetime\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport pandas.api.types as pdt\nimport pyarrow as pa\n\nimport ibis.expr.datatypes as dt\nimport ibis.expr.schema as sch\nfrom ibis.common.temporal import normalize...
[ { "content": "from __future__ import annotations\n\nimport contextlib\nimport datetime\nimport warnings\n\nimport numpy as np\nimport pandas as pd\nimport pandas.api.types as pdt\nimport pyarrow as pa\n\nimport ibis.expr.datatypes as dt\nimport ibis.expr.schema as sch\nfrom ibis.common.temporal import normalize...
diff --git a/ibis/formats/pandas.py b/ibis/formats/pandas.py index 7fa0e4f37137..7badf372de8a 100644 --- a/ibis/formats/pandas.py +++ b/ibis/formats/pandas.py @@ -33,7 +33,9 @@ def to_ibis(cls, typ, nullable=True): elif pdt.is_datetime64_dtype(typ): return dt.Timestamp(nullable=nullable) ...
numpy__numpy-11708
np.loadtxt no longer loads bz2 files in python2 I have been using `np.loadtxt()` to happily load `txt.bz2` files for many years. I recently upgraded to numpy 1.14.2, and I noticed that it no longer seems possible to load a `txt.bz2` file using python2. Was this intensional, or some sort of bug? ``` Traceback (m...
[ { "content": "\"\"\"A file interface for handling local and remote data files.\n\nThe goal of datasource is to abstract some of the file system operations\nwhen dealing with data files so the researcher doesn't have to know all the\nlow-level details. Through datasource, a researcher can obtain and use a\nfile...
[ { "content": "\"\"\"A file interface for handling local and remote data files.\n\nThe goal of datasource is to abstract some of the file system operations\nwhen dealing with data files so the researcher doesn't have to know all the\nlow-level details. Through datasource, a researcher can obtain and use a\nfile...
diff --git a/numpy/lib/_datasource.py b/numpy/lib/_datasource.py index 6f1295f096f5..ab00b1444714 100644 --- a/numpy/lib/_datasource.py +++ b/numpy/lib/_datasource.py @@ -37,6 +37,7 @@ import os import sys +import warnings import shutil import io @@ -85,9 +86,10 @@ def _python2_bz2open(fn, mode, encoding, newli...
litestar-org__litestar-2552
Bug: OpenAPI schema generation doesn't support Ellipsis type hint ### Description if you use an Ellipsis in your type hint, when generating the OpenAPI document the generation of the schema failed with the error `'<' not supported between instances of 'NoneType' and 'OpenAPIType'` it would seem that for v2.0.0 o...
[ { "content": "from __future__ import annotations\n\nfrom collections import deque\nfrom copy import copy\nfrom dataclasses import MISSING, fields\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom enum import Enum, EnumMeta\nfrom ipaddress import IPv4Address, IPv4Interface,...
[ { "content": "from __future__ import annotations\n\nfrom collections import deque\nfrom copy import copy\nfrom dataclasses import MISSING, fields\nfrom datetime import date, datetime, time, timedelta\nfrom decimal import Decimal\nfrom enum import Enum, EnumMeta\nfrom ipaddress import IPv4Address, IPv4Interface,...
diff --git a/litestar/_openapi/schema_generation/schema.py b/litestar/_openapi/schema_generation/schema.py index 228a7c189e..2bee1084c3 100644 --- a/litestar/_openapi/schema_generation/schema.py +++ b/litestar/_openapi/schema_generation/schema.py @@ -372,7 +372,9 @@ def for_object_type(self, field_definition: FieldDefi...
open-mmlab__mmengine-1324
[Bug] build_optim_wrapper raise an Error ### Prerequisite - [X] I have searched [Issues](https://github.com/open-mmlab/mmengine/issues) and [Discussions](https://github.com/open-mmlab/mmengine/discussions) but cannot get the expected help. - [X] The bug has not been fixed in the latest version(https://github.com/open-...
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport inspect\nimport logging\nfrom typing import List, Optional, Union\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn import GroupNorm, LayerNorm\n\nfrom mmengine.logging import print_log\nfrom mmengine.registry import (OPTIM_WRAPPER_CONSTR...
[ { "content": "# Copyright (c) OpenMMLab. All rights reserved.\nimport inspect\nimport logging\nfrom typing import List, Optional, Union\n\nimport torch\nimport torch.nn as nn\nfrom torch.nn import GroupNorm, LayerNorm\n\nfrom mmengine.logging import print_log\nfrom mmengine.registry import (OPTIM_WRAPPER_CONSTR...
diff --git a/mmengine/optim/optimizer/default_constructor.py b/mmengine/optim/optimizer/default_constructor.py index 0b4f67d4c1..95233d86bb 100644 --- a/mmengine/optim/optimizer/default_constructor.py +++ b/mmengine/optim/optimizer/default_constructor.py @@ -299,7 +299,8 @@ def __call__(self, model: nn.Module) -> Optim...
jazzband__django-axes-604
ModuleNotFoundError: No module named 'ipware.ip2' -- error in django-axes==5.0.7, Django==2.2, Python==3.8 `django-ipware` has no module `ipware.ip2` in recent version. Please fix this ASAP. In the `helpers.py` file import `ipware.ip2` is breaking for new version of django-ipware. ``` django_1 | Traceba...
[ { "content": "from datetime import timedelta\nfrom hashlib import md5\nfrom logging import getLogger\nfrom string import Template\nfrom typing import Callable, Optional, Type, Union\n\nfrom django.core.cache import caches, BaseCache\nfrom django.http import (\n HttpRequest,\n HttpResponse,\n HttpRespon...
[ { "content": "from datetime import timedelta\nfrom hashlib import md5\nfrom logging import getLogger\nfrom string import Template\nfrom typing import Callable, Optional, Type, Union\n\nfrom django.core.cache import caches, BaseCache\nfrom django.http import (\n HttpRequest,\n HttpResponse,\n HttpRespon...
diff --git a/axes/helpers.py b/axes/helpers.py index ff0b5239..fd01561b 100644 --- a/axes/helpers.py +++ b/axes/helpers.py @@ -15,7 +15,7 @@ from django.shortcuts import render from django.utils.module_loading import import_string -import ipware.ip2 +import ipware.ip from axes.conf import settings from axes.mod...
openai__gym-1149
Why is there a restiction on shape in multi discrete? https://github.com/openai/gym/blob/422c9c7bb3c3c5a756c3b12dfe99733bfbfe3920/gym/spaces/multi_discrete.py#L10 Why is this imposed? Say one may need a high dimensional space like a (3,3,3) grid with discretised values for each element in the grid. It can be very...
[ { "content": "import gym\nimport numpy as np\n\nclass MultiDiscrete(gym.Space):\n def __init__(self, nvec):\n \"\"\"\n nvec: vector of counts of each categorical variable\n \"\"\"\n self.nvec = np.asarray(nvec, dtype=np.int32)\n assert self.nvec.ndim == 1, 'nvec should be a...
[ { "content": "import gym\nimport numpy as np\n\nclass MultiDiscrete(gym.Space):\n def __init__(self, nvec):\n \"\"\"\n nvec: vector of counts of each categorical variable\n \"\"\"\n self.nvec = np.asarray(nvec, dtype=np.int32)\n gym.Space.__init__(self, (self.nvec.shape,), ...
diff --git a/gym/spaces/multi_discrete.py b/gym/spaces/multi_discrete.py index 197f35ec7f6..db42e76884b 100644 --- a/gym/spaces/multi_discrete.py +++ b/gym/spaces/multi_discrete.py @@ -7,10 +7,9 @@ def __init__(self, nvec): nvec: vector of counts of each categorical variable """ self.nvec = n...
aio-libs__aiohttp-5958
optional auto_decompress for HttpRequestParser ### Is your feature request related to a problem? auto_decompress can be disabled for client but unfortunately not for server. ### Describe the solution you'd like Export the API (I'm going to open a PR few minutes after filing this issue) ### Describe alternatives you...
[ { "content": "import asyncio\nimport asyncio.streams\nimport dataclasses\nimport traceback\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom http import HTTPStatus\nfrom logging import Logger\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awa...
[ { "content": "import asyncio\nimport asyncio.streams\nimport dataclasses\nimport traceback\nfrom collections import deque\nfrom contextlib import suppress\nfrom html import escape as html_escape\nfrom http import HTTPStatus\nfrom logging import Logger\nfrom typing import (\n TYPE_CHECKING,\n Any,\n Awa...
diff --git a/CHANGES/5957.feature b/CHANGES/5957.feature new file mode 100644 index 00000000000..80a1adb1dc4 --- /dev/null +++ b/CHANGES/5957.feature @@ -0,0 +1 @@ +Added optional auto_decompress argument for HttpRequestParser diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index f18943eb5bc..1e8b3ec3614 100644 --- a/...
internetarchive__openlibrary-9139
Should default return type for is_loaned_out_on_ia should be False not None? ### Problem #### Evidence / Screenshot https://github.com/internetarchive/openlibrary/blob/ce273d84cf14f66c5e07b081247a1c3c342666ff/openlibrary/core/lending.py#L564-L572 This code returns `None`. I'm fairly certain we should not re...
[ { "content": "\"\"\"Module for providing core functionality of lending on Open Library.\n\"\"\"\n\nfrom typing import TYPE_CHECKING, Literal, TypedDict, cast\n\nimport web\nimport datetime\nimport logging\nimport time\nimport uuid\n\nimport eventer\nimport requests\n\nfrom infogami.utils.view import public\nfro...
[ { "content": "\"\"\"Module for providing core functionality of lending on Open Library.\n\"\"\"\n\nfrom typing import TYPE_CHECKING, Literal, TypedDict, cast\n\nimport web\nimport datetime\nimport logging\nimport time\nimport uuid\n\nimport eventer\nimport requests\n\nfrom infogami.utils.view import public\nfro...
diff --git a/openlibrary/core/lending.py b/openlibrary/core/lending.py index 65ece717d7c..0ba3c0bd470 100644 --- a/openlibrary/core/lending.py +++ b/openlibrary/core/lending.py @@ -551,7 +551,7 @@ def is_loaned_out(identifier: str) -> bool: return ( is_loaned_out_on_ol(identifier) or is_loaned_ou...
spack__spack-12932
Installation issue: py-adios ### Steps to reproduce the issue ```console $ spack install -j 64 py-adios ^python@3.0: ``` The result is lots of errors like: ```adios_mpi.cpp:47080:21: error: 'PyThreadState' {aka 'struct _ts'} has no member named 'exc_type'; did you mean 'curexc_type'?``` And similar. ### Pl...
[ { "content": "# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass PyAdios(PythonPackage):\n \"\"\"NumPy bindings of ADIOS1\"\"\...
[ { "content": "# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass PyAdios(PythonPackage):\n \"\"\"NumPy bindings of ADIOS1\"\"\...
diff --git a/var/spack/repos/builtin/packages/py-adios/package.py b/var/spack/repos/builtin/packages/py-adios/package.py index a297f39fc9d1c3..2149c0e22368f1 100644 --- a/var/spack/repos/builtin/packages/py-adios/package.py +++ b/var/spack/repos/builtin/packages/py-adios/package.py @@ -35,6 +35,14 @@ class PyAdios(Pyth...
NVIDIA__NeMo-4786
Use of undeclared `logger`. `logger` is used here but not defined https://github.com/NVIDIA/NeMo/blob/6abfbbfda654f44313068b950edb0f70b01449b1/nemo/collections/nlp/data/language_modeling/text_memmap_dataset.py#L157 I believe this should be switched to `logging`, which is used throughout the rest of the module.
[ { "content": "# Copyright (c) 2022, NVIDIA CORPORATION. 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....
[ { "content": "# Copyright (c) 2022, NVIDIA CORPORATION. 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....
diff --git a/nemo/collections/nlp/data/language_modeling/text_memmap_dataset.py b/nemo/collections/nlp/data/language_modeling/text_memmap_dataset.py index 4f978f493fca..1d67dbc864e9 100644 --- a/nemo/collections/nlp/data/language_modeling/text_memmap_dataset.py +++ b/nemo/collections/nlp/data/language_modeling/text_mem...
quantumlib__Cirq-2682
Need a better compilation for swap_to_sqrt_iswap Right now it uses 4 sqrtiswaps to support arbitrary angle. For a plain ol' `SWAP` (common for routing qubits around) you should be able to get away with 3 ```python yield cirq.Y(a) ** 0.5 yield cirq.Y(b) ** 0.5 yield SQRT_ISWAP(a, b) ...
[ { "content": "# Copyright 2019 The Cirq Developers\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...
[ { "content": "# Copyright 2019 The Cirq Developers\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...
diff --git a/cirq/google/optimizers/convert_to_sqrt_iswap.py b/cirq/google/optimizers/convert_to_sqrt_iswap.py index 240aa946dad..4a81d37cfb3 100644 --- a/cirq/google/optimizers/convert_to_sqrt_iswap.py +++ b/cirq/google/optimizers/convert_to_sqrt_iswap.py @@ -262,6 +262,21 @@ def swap_to_sqrt_iswap(a, b, turns): ...
pyg-team__pytorch_geometric-8519
CycleMotif lack of label, therefore do not support GNNExplainer. ### 🐛 Describe the bug when running ./examples/explain/gnn_explainer_ba_shapes.py, when I replace the dataset: ``` dataset = ExplainerDataset( graph_generator=BAGraph(num_nodes=300, num_edges=5), motif_generator='house', num_motifs=80, ...
[ { "content": "from typing import Any, Callable, Dict, Optional, Union\n\nimport torch\n\nfrom torch_geometric.data import InMemoryDataset\nfrom torch_geometric.datasets.graph_generator import GraphGenerator\nfrom torch_geometric.datasets.motif_generator import MotifGenerator\nfrom torch_geometric.explain import...
[ { "content": "from typing import Any, Callable, Dict, Optional, Union\n\nimport torch\n\nfrom torch_geometric.data import InMemoryDataset\nfrom torch_geometric.datasets.graph_generator import GraphGenerator\nfrom torch_geometric.datasets.motif_generator import MotifGenerator\nfrom torch_geometric.explain import...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 14f5220a7cbd..a0e64f692d5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Changed +- `ExplainerDataset` will now contain node labels for any motif generator ([#8519](ht...
HypothesisWorks__hypothesis-1593
PyPy for Python 3.5 In version 5.7, PyPy added beta support for Python 3.5. We should check that Hypothesis works on this, and add it to CI either way.
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f...
[ { "content": "# coding=utf-8\n#\n# This file is part of Hypothesis, which may be found at\n# https://github.com/HypothesisWorks/hypothesis-python\n#\n# Most of this work is copyright (C) 2013-2018 David R. MacIver\n# (david@drmaciver.com), but it contains contributions by others. See\n# CONTRIBUTING.rst for a f...
diff --git a/.travis.yml b/.travis.yml index 31a136e26f..ddd240c64a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -45,6 +45,7 @@ jobs: - stage: main env: TASK=check-coverage - env: TASK=check-pypy + - env: TASK=check-pypy3 - env: TASK=check-py36 - env: TASK=check-py27 - env: TASK=chec...
getpelican__pelican-1577
{tag} syntax doesn't generate correct links when used in pages When using the `{tag}tagname` syntax in an article, it results in the correct link to `/tag/tagname.html`. When using it in a page, however, it translates to `/pages/tag/tagname.html`, which is a nonexistent location. Ref: http://stackoverflow.com/q/26621...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\nfrom six.moves.urllib.parse import (unquote, urlparse, urlunparse)\n\nimport copy\nimport locale\nimport logging\nimport functools\nimport os\nimport re\nimport sys\n\nimport pytz\n\nfrom pelican import s...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals, print_function\nimport six\nfrom six.moves.urllib.parse import (unquote, urlparse, urlunparse)\n\nimport copy\nimport locale\nimport logging\nimport functools\nimport os\nimport re\nimport sys\n\nimport pytz\n\nfrom pelican import s...
diff --git a/pelican/contents.py b/pelican/contents.py index c3d1230bc..69c014386 100644 --- a/pelican/contents.py +++ b/pelican/contents.py @@ -257,9 +257,9 @@ def replacer(m): 'limit_msg': ("Other resources were not found " "and their urls not re...
Kinto__kinto-408
kinto start fails: no module named functools32 ``` kinto start Starting subprocess with file monitor 2015-11-29 10:12:24,821 INFO [venusian][MainThread] kinto 1.9.0 starting. Traceback (most recent call last): File "/var/www/kinto.leplat.re/venv/bin/kinto", line 9, in <module> load_entry_point('kinto==1.9.0', '...
[ { "content": "import codecs\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read_file(filename):\n \"\"\"Open a related file and return its content.\"\"\"\n with codecs.open(os.path.join(here, filename), encoding='utf-8') as...
[ { "content": "import codecs\nimport os\nimport sys\nfrom setuptools import setup, find_packages\n\nhere = os.path.abspath(os.path.dirname(__file__))\n\n\ndef read_file(filename):\n \"\"\"Open a related file and return its content.\"\"\"\n with codecs.open(os.path.join(here, filename), encoding='utf-8') as...
diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 0696cd4ba..72e272687 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -22,3 +22,13 @@ was added in PostgreSQL 9.4. This is a hard requirement for postgresql backends, therefore you will either need to **use PostgreSQL 9.4 (o...
OCA__manufacture-130
is:issue is:open [8.0][mrp_production_real_cost] Error when produce product Hi, there's new error from mrp_production_real_cost, after I do git pull from the last commit ``` ERROR demo1 openerp.sql_db: Programming error: can't adapt type 'mrp.production', in query SELECT "mrp_production"."id" FROM "mrp_production"...
[ { "content": "# -*- coding: utf-8 -*-\n# © 2014-2015 Avanzosc\n# © 2014-2015 Pedro M. Baeza\n# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html\n\nfrom openerp import api, fields, models\n\n\nclass MrpProduction(models.Model):\n _inherit = 'mrp.production'\n\n @api.multi\n @api.depends('a...
[ { "content": "# -*- coding: utf-8 -*-\n# © 2014-2015 Avanzosc\n# © 2014-2015 Pedro M. Baeza\n# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html\n\nfrom openerp import api, fields, models\n\n\nclass MrpProduction(models.Model):\n _inherit = 'mrp.production'\n\n @api.multi\n @api.depends('a...
diff --git a/mrp_production_real_cost/models/mrp_production.py b/mrp_production_real_cost/models/mrp_production.py index 23dcbf9c5c8..94f5bc5e35e 100644 --- a/mrp_production_real_cost/models/mrp_production.py +++ b/mrp_production_real_cost/models/mrp_production.py @@ -31,8 +31,15 @@ def _compute_real_cost(self): @...
lutris__lutris-2558
AttributeError: type object 'TreeModelSort' has no attribute 'sort_new_with_model' **Describe the bug** Lutris is failing to launch with the below error. I am using Python 3.6. Lutris used to work, but it recently started failing. I'm using Gentoo. Maybe this is related to a GTK update. My gtk is version 3.24.13 ``...
[ { "content": "\"\"\"Store object for a list of games\"\"\"\n# pylint: disable=not-an-iterable\nimport concurrent.futures\nfrom gi.repository import Gtk, GObject, GLib\nfrom gi.repository.GdkPixbuf import Pixbuf\nfrom lutris import pga\nfrom lutris.gui.widgets.utils import get_pixbuf_for_game\nfrom lutris.util.r...
[ { "content": "\"\"\"Store object for a list of games\"\"\"\n# pylint: disable=not-an-iterable\nimport concurrent.futures\nfrom gi.repository import Gtk, GObject, GLib\nfrom gi.repository.GdkPixbuf import Pixbuf\nfrom lutris import pga\nfrom lutris.gui.widgets.utils import get_pixbuf_for_game\nfrom lutris.util.r...
diff --git a/lutris/gui/views/store.py b/lutris/gui/views/store.py index 9bab31587c..9e843e9e42 100644 --- a/lutris/gui/views/store.py +++ b/lutris/gui/views/store.py @@ -140,7 +140,7 @@ def __init__( self.prevent_sort_update = False # prevent recursion with signals self.modelfilter = self.store.filt...
Lightning-AI__pytorch-lightning-2255
CPU/GPU Template ## 🐛 Bug The GPU or CPU template do not run currently on master after changes including the setup hook. ``` python -m pl_examples.basic_examples.gpu_template --gpus 4 --distributed_backend ddp python -m pl_examples.basic_examples.cpu_template ``` CPU Template Error: ``` Traceback (m...
[ { "content": "\"\"\"\nRuns a model on a single node across multiple gpus.\n\"\"\"\nimport os\nfrom argparse import ArgumentParser\n\nimport numpy as np\nimport torch\n\nimport pytorch_lightning as pl\nfrom pl_examples.models.lightning_template import LightningTemplateModel\n\nSEED = 2334\ntorch.manual_seed(SEED...
[ { "content": "\"\"\"\nRuns a model on a single node across multiple gpus.\n\"\"\"\nimport os\nfrom argparse import ArgumentParser\n\nimport numpy as np\nimport torch\n\nimport pytorch_lightning as pl\nfrom pl_examples.models.lightning_template import LightningTemplateModel\n\nSEED = 2334\ntorch.manual_seed(SEED...
diff --git a/pl_examples/basic_examples/gpu_template.py b/pl_examples/basic_examples/gpu_template.py index c5fa94a3cf140..94818ce7f0b06 100644 --- a/pl_examples/basic_examples/gpu_template.py +++ b/pl_examples/basic_examples/gpu_template.py @@ -23,7 +23,7 @@ def main(hparams): # ------------------------ # 1 I...
Cog-Creators__Red-DiscordBot-5178
Allow to use 0 point warnings again Paaain. We actively used 0 point warnings. This also was not in the CL _Originally posted by @Crossedfall in https://github.com/Cog-Creators/Red-DiscordBot/issues/5120#issuecomment-873485148_
[ { "content": "import asyncio\nimport contextlib\nfrom datetime import timezone\nfrom collections import namedtuple\nfrom copy import copy\nfrom typing import Union, Optional, Literal\n\nimport discord\n\nfrom redbot.cogs.warnings.helpers import (\n warning_points_add_check,\n get_command_for_exceeded_poin...
[ { "content": "import asyncio\nimport contextlib\nfrom datetime import timezone\nfrom collections import namedtuple\nfrom copy import copy\nfrom typing import Union, Optional, Literal\n\nimport discord\n\nfrom redbot.cogs.warnings.helpers import (\n warning_points_add_check,\n get_command_for_exceeded_poin...
diff --git a/redbot/cogs/warnings/warnings.py b/redbot/cogs/warnings/warnings.py index ea1f488af02..9c8df40ffc1 100644 --- a/redbot/cogs/warnings/warnings.py +++ b/redbot/cogs/warnings/warnings.py @@ -395,8 +395,8 @@ async def warn( if (reason_type := registered_reasons.get(reason.lower())) is None: ...
pwndbg__pwndbg-1648
The heuristic for `malloc_par` is wrong That's because it defined the wrong type at: https://github.com/pwndbg/pwndbg/blob/59e759e0363cd474e662f28503f8de726baf7d20/pwndbg/heap/structs.py#L694 and https://github.com/pwndbg/pwndbg/blob/59e759e0363cd474e662f28503f8de726baf7d20/pwndbg/heap/structs.py#L770 ---- The...
[ { "content": "import ctypes\n\nimport gdb\n\nimport pwndbg.gdblib.arch\nimport pwndbg.gdblib.memory\nimport pwndbg.gdblib.typeinfo\nimport pwndbg.glibc\nfrom pwndbg.gdblib.ctypes import Structure\n\n\ndef request2size(req):\n if req + SIZE_SZ + MALLOC_ALIGN_MASK < MINSIZE:\n return MINSIZE\n return...
[ { "content": "import ctypes\n\nimport gdb\n\nimport pwndbg.gdblib.arch\nimport pwndbg.gdblib.memory\nimport pwndbg.gdblib.typeinfo\nimport pwndbg.glibc\nfrom pwndbg.gdblib.ctypes import Structure\n\n\ndef request2size(req):\n if req + SIZE_SZ + MALLOC_ALIGN_MASK < MINSIZE:\n return MINSIZE\n return...
diff --git a/pwndbg/heap/structs.py b/pwndbg/heap/structs.py index 72d40f5b40d..8ec77be54f1 100644 --- a/pwndbg/heap/structs.py +++ b/pwndbg/heap/structs.py @@ -691,7 +691,7 @@ class c_malloc_par_2_26(Structure): ("sbrk_base", c_pvoid), ("tcache_bins", c_size_t), ("tcache_max_bytes", c_size_t...
huggingface__diffusers-4582
vae is not use in the doc ### Describe the bug https://huggingface.co/diffusers/controlnet-canny-sdxl-1.0?fbclid=IwAR3CTWQ3hLP1VxTpgFHVP82zhkYm7rnlKJ4HPq32rPAI9ltOWPbIcA2PFys ![image](https://github.com/huggingface/diffusers/assets/18206728/183e7371-d865-4d85-b12e-3accade005a0) https://huggingface.co/docs/diffus...
[ { "content": "# Copyright 2023 The HuggingFace Team. 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#...
[ { "content": "# Copyright 2023 The HuggingFace Team. 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#...
diff --git a/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py b/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py index 02c75ca14628..d06a49421e0b 100644 --- a/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl.py +++ b/src/diffusers/pipelines/controlnet/pipeline_controlnet_sd_xl....
mathesar-foundation__mathesar-3269
Add openAPI Specification for /users/ endpoint Generate spec for `users` endpoint
[ { "content": "def custom_preprocessing_hook(endpoints):\n filtered = []\n for (path, path_regex, method, callback) in endpoints:\n # Remove all but DRF API endpoints\n if path.startswith(\"/api/db/v0/databases/\") or path.startswith(\"/api/db/v0/data_files/\") or path.startswith(\"/api/db/v0...
[ { "content": "def custom_preprocessing_hook(endpoints):\n prefixes = [\n \"/api/db/v0/databases/\",\n \"/api/db/v0/data_files/\",\n \"/api/db/v0/schemas/\",\n \"/api/db/v0/tables/\",\n \"/api/db/v0/links/\",\n \"/api/db/v0/queries/\",\n \"/api/ui/v0/databases/...
diff --git a/config/settings/openapi.py b/config/settings/openapi.py index 1095acbd77..70f12192da 100644 --- a/config/settings/openapi.py +++ b/config/settings/openapi.py @@ -1,9 +1,15 @@ def custom_preprocessing_hook(endpoints): - filtered = [] - for (path, path_regex, method, callback) in endpoints: - #...
rootpy__rootpy-282
many 'no dictionary for class' warnings using get_file() Using get_file() results in many 'no dictionary for class' warnings: ``` python >>> from rootpy.testdata import get_file >>> get_file() INFO:rootpy.logger] | No default log handler configured. See `logging` module | INFO:rootpy.logger] \ To suppress: 'rootpy....
[ { "content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThis module enhances IO-related ROOT functionality\n\"\"\"\nimport ROOT\n\nfrom ..core import Object\nfrom ..decorators import snake_case_methods\nfrom .. import asrootpy, QROOT\nfrom ....
[ { "content": "# Copyright 2012 the rootpy developers\n# distributed under the terms of the GNU General Public License\n\"\"\"\nThis module enhances IO-related ROOT functionality\n\"\"\"\nimport ROOT\n\nfrom ..core import Object\nfrom ..decorators import snake_case_methods\nfrom .. import asrootpy, QROOT\nfrom ....
diff --git a/rootpy/io/file.py b/rootpy/io/file.py index 3c2adaca..450d3761 100644 --- a/rootpy/io/file.py +++ b/rootpy/io/file.py @@ -183,6 +183,8 @@ class File(_DirectoryBase, QROOT.TFile): """ def __init__(self, name, *args, **kwargs): + # trigger finalSetup + ROOT.kTRUE super(File...
django-cms__django-cms-3559
CMSSitemaps display overlapping URLs when multiple sites exist Adding a sitemap [per the guide](http://docs.django-cms.org/en/latest/advanced/sitemap.html) ignores the Sites framework, giving URLs for all Sites. So if I have the sites: - example.com - foo.com - bar.com a sitemap at example.com/en/sitemap.xml would di...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom django.contrib.sitemaps import Sitemap\nfrom django.db.models import Q\nfrom django.utils import translation\n\nfrom cms.models import Title\n\n\ndef from_iterable(iterables):\n \"\"\"\n Backport of itertools.chain.from_iterable\n \"\"\"\n for it in iter...
[ { "content": "# -*- coding: utf-8 -*-\n\nfrom django.contrib.sitemaps import Sitemap\nfrom django.contrib.sites.models import Site\nfrom django.db.models import Q\nfrom django.utils import translation\n\nfrom cms.models import Title\n\n\ndef from_iterable(iterables):\n \"\"\"\n Backport of itertools.chain...
diff --git a/cms/sitemaps/cms_sitemap.py b/cms/sitemaps/cms_sitemap.py index 8c97290e301..e9f01265ff8 100644 --- a/cms/sitemaps/cms_sitemap.py +++ b/cms/sitemaps/cms_sitemap.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- from django.contrib.sitemaps import Sitemap +from django.contrib.sites.models import Site from dja...
huggingface__diffusers-7013
Color channel order for watermark embedding ### Describe the bug The encoder from the invisible watermark library expects input images with the channel order BGR, which is the default in OpenCV. This can be seen [here](https://github.com/ShieldMnt/invisible-watermark/blob/68d0376d94a4701ed240af0841ec12e00676e325/imwat...
[ { "content": "import numpy as np\nimport torch\n\nfrom ...utils import is_invisible_watermark_available\n\n\nif is_invisible_watermark_available():\n from imwatermark import WatermarkEncoder\n\n\n# Copied from https://github.com/Stability-AI/generative-models/blob/613af104c6b85184091d42d374fef420eddb356d/scr...
[ { "content": "import numpy as np\nimport torch\n\nfrom ...utils import is_invisible_watermark_available\n\n\nif is_invisible_watermark_available():\n from imwatermark import WatermarkEncoder\n\n\n# Copied from https://github.com/Stability-AI/generative-models/blob/613af104c6b85184091d42d374fef420eddb356d/scr...
diff --git a/src/diffusers/pipelines/stable_diffusion_xl/watermark.py b/src/diffusers/pipelines/stable_diffusion_xl/watermark.py index 5b6e36d9f447..f457cdbdb1eb 100644 --- a/src/diffusers/pipelines/stable_diffusion_xl/watermark.py +++ b/src/diffusers/pipelines/stable_diffusion_xl/watermark.py @@ -28,9 +28,15 @@ def ap...
localstack__localstack-9632
SQS: ChangeMessageVisibility not working Using the most recent version of LocalStack and the most recent version of the AWS CLI... ``` awslocal sqs create-queue --queue-name foo ...
[ { "content": "import hashlib\nimport heapq\nimport inspect\nimport json\nimport logging\nimport re\nimport threading\nimport time\nfrom queue import Empty, PriorityQueue, Queue\nfrom typing import Dict, Optional, Set\n\nfrom localstack import config\nfrom localstack.aws.api import RequestContext\nfrom localstac...
[ { "content": "import hashlib\nimport heapq\nimport inspect\nimport json\nimport logging\nimport re\nimport threading\nimport time\nfrom queue import Empty, PriorityQueue, Queue\nfrom typing import Dict, Optional, Set\n\nfrom localstack import config\nfrom localstack.aws.api import RequestContext\nfrom localstac...
diff --git a/localstack/services/sqs/models.py b/localstack/services/sqs/models.py index 94d9c5df6dbdc..cd0deb8b26d4d 100644 --- a/localstack/services/sqs/models.py +++ b/localstack/services/sqs/models.py @@ -14,7 +14,6 @@ from localstack.aws.api.sqs import ( InvalidAttributeName, Message, - MessageNotInf...
kartoza__prj.app-1165
rst export currently broken for QGIS 3.12 Somebody with the right permissions should be able to download the rst+images in a zip: https://changelog.qgis.org/en/qgis/version/3.12/download/ This morning it throws a 500 error.
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"**View classes for Version**\n\n\"\"\"\n\n# noinspection PyUnresolvedReferences\n# import logging\nfrom base.models import Project\n# LOGGER = logging.getLogger(__name__)\nimport re\nimport zipfile\nfrom io import BytesIO\nimport pypandoc\nfrom bs4 import BeautifulSo...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"**View classes for Version**\n\n\"\"\"\n\n# noinspection PyUnresolvedReferences\n# import logging\nfrom base.models import Project\n# LOGGER = logging.getLogger(__name__)\nimport re\nimport zipfile\nfrom io import BytesIO\nimport pypandoc\nfrom bs4 import BeautifulSo...
diff --git a/django_project/changes/views/version.py b/django_project/changes/views/version.py index 4ff695c4e..477cd834c 100644 --- a/django_project/changes/views/version.py +++ b/django_project/changes/views/version.py @@ -603,10 +603,13 @@ def _prepare_zip_archive(self, document, version_obj): with zipfile....
vyperlang__vyper-3240
`enum` members can have unexpected structure ### Version Information * vyper Version (output of `vyper --version`): 0.3.8+commit.4ae2527f * OS: OSX * Python Version (output of `python --version`): 3.8.0 Any AST node with an `value` field storing an AST node which itself has an `id` field could be considered a...
[ { "content": "from functools import cached_property\nfrom typing import Dict, List, Optional, Tuple, Union\n\nfrom vyper import ast as vy_ast\nfrom vyper.abi_types import ABI_Address, ABI_GIntM, ABI_Tuple, ABIType\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n EnumDecl...
[ { "content": "from functools import cached_property\nfrom typing import Dict, List, Optional, Tuple, Union\n\nfrom vyper import ast as vy_ast\nfrom vyper.abi_types import ABI_Address, ABI_GIntM, ABI_Tuple, ABIType\nfrom vyper.ast.validation import validate_call_args\nfrom vyper.exceptions import (\n EnumDecl...
diff --git a/tests/parser/syntax/test_enum.py b/tests/parser/syntax/test_enum.py index 6860e438c1..267de2180f 100644 --- a/tests/parser/syntax/test_enum.py +++ b/tests/parser/syntax/test_enum.py @@ -76,6 +76,27 @@ def foo(x: Roles) -> bool: """, InvalidOperation, ), + ( + """ +enum Function...
StackStorm__st2-6028
St2 auth logs leak sensitive information ## SUMMARY St2 writes http requests with unsanitised username/password pair to `st2.auth.log` when log level set to ``DEBUG``. ### STACKSTORM VERSION ``st2 3.8.0, on Python 3.6.9`` ##### OS, environment, install method ``` lsb_release -a No LSB modules are availab...
[ { "content": "# Copyright 2020 The StackStorm Authors.\n# Copyright 2019 Extreme Networks, 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/l...
[ { "content": "# Copyright 2020 The StackStorm Authors.\n# Copyright 2019 Extreme Networks, 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/l...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 59f4ab2406..ad8cb12637 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -13,6 +13,8 @@ Fixed * Bumped `paramiko` to `2.10.5` to fix an issue with SSH Certs - https://github.com/paramiko/paramiko/issues/2017 Contributed by @jk464 +* Avoid logging sensitive informat...
digitalfabrik__integreat-cms-769
User creation not working ### Describe the Bug <!-- A clear and concise description of what the bug is. --> Due to a problem in the user form's logging, an error occurs when new users are created and a new role is assigned in the creation process ### Steps to Reproduce 1. Go to the user management 2. Create ne...
[ { "content": "import logging\n\nfrom django import forms\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group as Role\nfrom django.contrib.auth.password_validation import (\n validate_password,\n password_validators_help_texts,\n)\nfrom django.utils.translation imp...
[ { "content": "import logging\n\nfrom django import forms\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.models import Group as Role\nfrom django.contrib.auth.password_validation import (\n validate_password,\n password_validators_help_texts,\n)\nfrom django.utils.translation imp...
diff --git a/src/cms/forms/users/user_form.py b/src/cms/forms/users/user_form.py index 376a93c6d6..818bb0b3a1 100644 --- a/src/cms/forms/users/user_form.py +++ b/src/cms/forms/users/user_form.py @@ -92,7 +92,10 @@ def save(self, *args, **kwargs): # assign all selected roles which the user does not have already...
google__clusterfuzz-1726
in local development, zip uploads are broken ``` | File "/build/clusterfuzz/src/appengine/handlers/jobs.py", line 132, in post | blob_info = self.get_upload() | File "/build/clusterfuzz/src/appengine/handlers/base_handler.py", line 317, in get_upload | blob_info = storage.GcsBlobInfo.from_key(upload_key...
[ { "content": "# Copyright 2019 Google LLC\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 applicab...
[ { "content": "# Copyright 2019 Google LLC\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 applicab...
diff --git a/src/local/butler/run_server.py b/src/local/butler/run_server.py index e8bba7ef87..13c45548bb 100644 --- a/src/local/butler/run_server.py +++ b/src/local/butler/run_server.py @@ -59,7 +59,12 @@ def bootstrap_gcs(storage_path): os.mkdir(local_gcs_buckets_path) config = local_config.ProjectConfig() ...
WordPress__openverse-api-476
Replace PYTHON_ENV with ENVIRONMENT ## Description <!-- Concisely describe the bug. --> Our deployment infrastructure already configures an `ENVIRONMENT` variable and it is already used in the ingestion server code. Rather than introduce a new one that duplicates that, we can just use that everywhere. Making this ...
[ { "content": "\"\"\"\nDjango settings for catalog project.\n\nGenerated by 'django-admin startproject' using Django 2.0.5.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2...
[ { "content": "\"\"\"\nDjango settings for catalog project.\n\nGenerated by 'django-admin startproject' using Django 2.0.5.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2...
diff --git a/api/catalog/settings.py b/api/catalog/settings.py index 6ead0abaf..6c726f9f8 100644 --- a/api/catalog/settings.py +++ b/api/catalog/settings.py @@ -39,7 +39,7 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = config("DJANGO_DEBUG_ENABLED", default=False, cast=bool) -PYTHON_EN...
flask-admin__flask-admin-901
Idea: Editable List View It would be useful to be able to bulk edit records from the list view, like this: ![editable_listview2](https://cloud.githubusercontent.com/assets/992533/5567370/15760168-8f09-11e4-959d-a2f170ff0f5e.png) I've made some progress on getting the form fields to show on the list view: https://githu...
[ { "content": "import itertools\n\nfrom wtforms.validators import ValidationError\nfrom wtforms.fields import FieldList, FormField, SelectFieldBase\n\ntry:\n from wtforms.fields import _unset_value as unset_value\nexcept ImportError:\n from wtforms.utils import unset_value\n\nfrom flask_admin._compat impor...
[ { "content": "import itertools\n\nfrom wtforms.validators import ValidationError\nfrom wtforms.fields import FieldList, FormField, SelectFieldBase\n\ntry:\n from wtforms.fields import _unset_value as unset_value\nexcept ImportError:\n from wtforms.utils import unset_value\n\nfrom flask_admin._compat impor...
diff --git a/flask_admin/model/fields.py b/flask_admin/model/fields.py index 452100728..af90f55fe 100644 --- a/flask_admin/model/fields.py +++ b/flask_admin/model/fields.py @@ -141,11 +141,11 @@ def __init__(self, *args, **kwargs): def _extract_indices(self, prefix, formdata): offset = len(prefix) + 1 -...
encode__httpx-653
`params` overrides query string in url Hi, I noticed a difference between `httpx` and `requests` when processing query parameters. I provided the `params` for the url with query string, `requests` would **merge** `params` into query string, but `httpx` replaces the whole query string. Here is a simple script: ...
[ { "content": "import cgi\nimport datetime\nimport email.message\nimport json as jsonlib\nimport typing\nimport urllib.request\nimport warnings\nfrom collections.abc import MutableMapping\nfrom http.cookiejar import Cookie, CookieJar\nfrom urllib.parse import parse_qsl, urlencode\n\nimport chardet\nimport rfc398...
[ { "content": "import cgi\nimport datetime\nimport email.message\nimport json as jsonlib\nimport typing\nimport urllib.request\nimport warnings\nfrom collections.abc import MutableMapping\nfrom http.cookiejar import Cookie, CookieJar\nfrom urllib.parse import parse_qsl, urlencode\n\nimport chardet\nimport rfc398...
diff --git a/httpx/models.py b/httpx/models.py index ad3599b717..fc938c3ebf 100644 --- a/httpx/models.py +++ b/httpx/models.py @@ -90,9 +90,14 @@ def __init__( if self.is_absolute_url: self._uri_reference = self._uri_reference.normalize() - # Add any query parameters. + # Add any q...
ansible-collections__amazon.aws-1480
cloudwatch_metric_alarm - Existing alarms always report 'changed' even when no changes have been made ### Summary When running CloudWatch metric alarm playbooks, existing alarms always report 'changed' even when no changes have been made to the alarm settings/props. After digging into the *cloudwatch_metric_alarm* ...
[ { "content": "#!/usr/bin/python\n# This file is part of Ansible\n#\n# Ansible 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 version 3 of the License, or\n# (at your option) any later version...
[ { "content": "#!/usr/bin/python\n# This file is part of Ansible\n#\n# Ansible 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 version 3 of the License, or\n# (at your option) any later version...
diff --git a/changelogs/fragments/1440-cloudwatch_metric_alarm-fix-change-detection.yml b/changelogs/fragments/1440-cloudwatch_metric_alarm-fix-change-detection.yml new file mode 100644 index 00000000000..0cbde555d32 --- /dev/null +++ b/changelogs/fragments/1440-cloudwatch_metric_alarm-fix-change-detection.yml @@ -0,0 ...
streamlit__streamlit-4986
UnhashableTypeError: Cannot hash object of type _json.Scanner... ### Summary When attempting to use st.cache decorator (with streamlit 1.10.0) on a json data loader method, streamlit returns an unhashable error for a _json.Scanner. This behavior does not exist in the previous version (1.9.2). ### Steps to repro...
[ { "content": "# Copyright 2018-2022 Streamlit 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# Unless required by a...
[ { "content": "# Copyright 2018-2022 Streamlit 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# Unless required by a...
diff --git a/lib/streamlit/runtime/legacy_caching/hashing.py b/lib/streamlit/runtime/legacy_caching/hashing.py index ac1d5826d692..39a6054afa28 100644 --- a/lib/streamlit/runtime/legacy_caching/hashing.py +++ b/lib/streamlit/runtime/legacy_caching/hashing.py @@ -712,14 +712,14 @@ def _code_to_bytes(self, code, context:...
pypi__warehouse-439
Double check conditional HTTP implementation The conditional HTTP implementation doesn't check the status code of the response at all. Determine if it should, and if it should update it to do the right thing.
[ { "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/cache/test_http.py b/tests/cache/test_http.py index 4dfbea9ef95a..b0ddf93eace3 100644 --- a/tests/cache/test_http.py +++ b/tests/cache/test_http.py @@ -165,16 +165,18 @@ def test_explicit_etag(self): assert handler.calls == [pretend.call(request)] assert response.conditional_respons...
napari__napari-3328
Launching two viewers broken ## 🐛 Bug Unfortunately I think this is a blocking regression for 0.4.11. The following script crashes on master without any error message: ```python import napari v1 = napari.Viewer() v2 = napari.Viewer() napari.run() ``` I traced the regression to #3034 07f35e652ca136de3...
[ { "content": "from __future__ import annotations\n\nimport os\nimport sys\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING\nfrom warnings import warn\n\nfrom qtpy.QtCore import Qt\nfrom qtpy.QtGui import QIcon\nfrom qtpy.QtWidgets import QApplication\n\nfrom .. import __version__\nfrom ....
[ { "content": "from __future__ import annotations\n\nimport os\nimport sys\nfrom contextlib import contextmanager\nfrom typing import TYPE_CHECKING\nfrom warnings import warn\n\nfrom qtpy.QtCore import Qt\nfrom qtpy.QtGui import QIcon\nfrom qtpy.QtWidgets import QApplication\n\nfrom .. import __version__\nfrom ....
diff --git a/napari/_qt/_tests/test_app.py b/napari/_qt/_tests/test_app.py index eb76d1f04e0..93340067e23 100644 --- a/napari/_qt/_tests/test_app.py +++ b/napari/_qt/_tests/test_app.py @@ -1,8 +1,10 @@ import os +from unittest.mock import Mock import pytest -from napari._qt.qt_event_loop import set_app_id +from n...
conda__conda-6525
TypeError: not all arguments converted during string formatting "command": "C:\\Users\\court\\Anaconda3\\Scripts\\conda install matplotlib" "user_agent": "conda/4.4.1 requests/2.18.4 CPython/3.6.3 Windows/10 Windows/10.0.16299" ``` Traceback (most recent call last): File \"C:\\Users\\court\\Anaconda3\\l...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom enum import Enum\nfrom genericpath import exists\nfrom logging import DEBUG, getLogger\nfrom os.path import join\nimport sys\nfrom textwrap import dedent\n\nfrom .index import get_re...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom enum import Enum\nfrom genericpath import exists\nfrom logging import DEBUG, getLogger\nfrom os.path import join\nimport sys\nfrom textwrap import dedent\n\nfrom .index import get_re...
diff --git a/conda/core/solve.py b/conda/core/solve.py index edde099a0a6..b6c1c46950c 100644 --- a/conda/core/solve.py +++ b/conda/core/solve.py @@ -241,7 +241,7 @@ def solve_final_state(self, deps_modifier=NULL, prune=NULL, ignore_pinned=NULL, the output of 'conda info' and 'conda list' for the ac...
paperless-ngx__paperless-ngx-2023
[BUG] Regression in API create date Hi all, I like using paperless; it is a quite fine web application. I recently updated to paperless-ngx 1.10.0-beta running in a docker container on a Raspi 4B (4 GB). Besides uploading new files via the browser (works fine), I also use the REST API to provide new documents....
[ { "content": "import hashlib\nimport logging\nimport os\nimport shutil\nimport uuid\nfrom pathlib import Path\nfrom typing import Type\n\nimport tqdm\nfrom asgiref.sync import async_to_sync\nfrom celery import shared_task\nfrom channels.layers import get_channel_layer\nfrom django.conf import settings\nfrom dja...
[ { "content": "import hashlib\nimport logging\nimport os\nimport shutil\nimport uuid\nfrom datetime import datetime\nfrom pathlib import Path\nfrom typing import Type\n\nimport tqdm\nfrom asgiref.sync import async_to_sync\nfrom celery import shared_task\nfrom channels.layers import get_channel_layer\nfrom django...
diff --git a/src/documents/tasks.py b/src/documents/tasks.py index 667c3d9dfc4..f5bad665ad0 100644 --- a/src/documents/tasks.py +++ b/src/documents/tasks.py @@ -3,6 +3,7 @@ import os import shutil import uuid +from datetime import datetime from pathlib import Path from typing import Type @@ -98,6 +99,14 @@ def c...
pytest-dev__pytest-django-668
pytest-django fails pytest (django.core.exceptions.ImproperlyConfigured) - I installed both pytest and pytest-django libraries in my laptop. Then I wanted to run pytest in a folder in which tests have no dependency of django. * Expected: I expected everything to run smoothing * What actually happeened? pytest fai...
[ { "content": "\"\"\"\nHelpers to load Django lazily when Django settings can't be configured.\n\"\"\"\n\nimport os\nimport sys\n\nimport pytest\n\n\ndef skip_if_no_django():\n \"\"\"Raises a skip exception when no Django settings are available\"\"\"\n if not django_settings_is_configured():\n pytes...
[ { "content": "\"\"\"\nHelpers to load Django lazily when Django settings can't be configured.\n\"\"\"\n\nimport os\nimport sys\n\nimport pytest\n\n\ndef skip_if_no_django():\n \"\"\"Raises a skip exception when no Django settings are available\"\"\"\n if not django_settings_is_configured():\n pytes...
diff --git a/pytest_django/lazy_django.py b/pytest_django/lazy_django.py index b2d49bc70..9fd715bf9 100644 --- a/pytest_django/lazy_django.py +++ b/pytest_django/lazy_django.py @@ -15,16 +15,18 @@ def skip_if_no_django(): def django_settings_is_configured(): - # Avoid importing Django if it has not yet been imp...
conan-io__conan-5841
Use of python_requires with enabled short_paths fails In Windows conan fails when a recipe uses `python_requires` and `short_paths = True` at the same time. To reproduce the issue, it's enough to just add `short_paths = True` into the consumer conanfile of the `python_requires` example. Conan will end with ``` ...
[ { "content": "import os\nimport shutil\nimport time\n\nfrom conans.client import tools\nfrom conans.client.file_copier import report_copied_files\nfrom conans.client.generators import TXTGenerator, write_generators\nfrom conans.client.graph.graph import BINARY_BUILD, BINARY_CACHE, BINARY_DOWNLOAD, BINARY_MISSIN...
[ { "content": "import os\nimport shutil\nimport time\n\nfrom conans.client import tools\nfrom conans.client.file_copier import report_copied_files\nfrom conans.client.generators import TXTGenerator, write_generators\nfrom conans.client.graph.graph import BINARY_BUILD, BINARY_CACHE, BINARY_DOWNLOAD, BINARY_MISSIN...
diff --git a/conans/client/installer.py b/conans/client/installer.py index 1bd24f6aab7..dac9c92a717 100644 --- a/conans/client/installer.py +++ b/conans/client/installer.py @@ -427,7 +427,7 @@ def _build_package(self, node, output, keep_build, remotes): assert python_require.ref.revision is not None, \ ...
streamlit__streamlit-3836
df.dtypes fails with Arrow ### Summary Using `df.dtypes` to show the datatypes for a dataframe fails when you're using the Arrow codepath. ### Steps to reproduce Code snippet: ``` import streamlit as st import pandas as pd df = pd.read_json("https://cdn.jsdelivr.net/npm/vega-datasets@2/data/penguins.js...
[ { "content": "# Copyright 2018-2021 Streamlit 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# Unless required by a...
[ { "content": "# Copyright 2018-2021 Streamlit 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# Unless required by a...
diff --git a/lib/streamlit/type_util.py b/lib/streamlit/type_util.py index 4f2cc7ba614c..028646de3286 100644 --- a/lib/streamlit/type_util.py +++ b/lib/streamlit/type_util.py @@ -368,9 +368,21 @@ def data_frame_to_bytes(df: DataFrame) -> bytes: A dataframe to convert. """ - - table = pa.Table.from_pa...
conan-io__conan-center-index-586
[package] libpq/11.5: Cannot be cross compiled Using the default `build.py` script created when calling `conan new` will not compile. This is a huge problem since building a package from source which depends on libpq using the conan package tools will fail by default. Additionally, if you really want to cross compile (...
[ { "content": "from conans import ConanFile, AutoToolsBuildEnvironment, tools\nfrom conans.errors import ConanInvalidConfiguration\nfrom conans.tools import os_info\nimport os\n\n\nclass LibpqConan(ConanFile):\n name = \"libpq\"\n description = \"The library used by all the standard PostgreSQL tools.\"\n ...
[ { "content": "from conans import ConanFile, AutoToolsBuildEnvironment, tools\nfrom conans.errors import ConanInvalidConfiguration\nfrom conans.tools import os_info\nimport os\n\n\nclass LibpqConan(ConanFile):\n name = \"libpq\"\n description = \"The library used by all the standard PostgreSQL tools.\"\n ...
diff --git a/recipes/libpq/all/conanfile.py b/recipes/libpq/all/conanfile.py index fe84def04aef8..06570ef3c4aa8 100644 --- a/recipes/libpq/all/conanfile.py +++ b/recipes/libpq/all/conanfile.py @@ -64,6 +64,8 @@ def _configure_autotools(self): args = ['--without-readline'] args.append('--with-z...
biopython__biopython-2943
Installing on old pythons. ### Setup I am reporting a problem with Biopython source, and Python 3.5. This stems from the pypi packages not declaring for which versions of python they are compatible (not specifying `python_requires="....",` in the call to `setup()` in `setup.py`. ### Expected behaviour Trying t...
[ { "content": "\"\"\"setuptools based setup script for Biopython.\n\nThis uses setuptools which is now the standard python mechanism for\ninstalling packages. If you have downloaded and uncompressed the\nBiopython source code, or fetched it from git, for the simplest\ninstallation just type the command::\n\n ...
[ { "content": "\"\"\"setuptools based setup script for Biopython.\n\nThis uses setuptools which is now the standard python mechanism for\ninstalling packages. If you have downloaded and uncompressed the\nBiopython source code, or fetched it from git, for the simplest\ninstallation just type the command::\n\n ...
diff --git a/setup.py b/setup.py index 7fec485022f..fbf0f013b80 100644 --- a/setup.py +++ b/setup.py @@ -47,10 +47,11 @@ # Make sure we have the right Python version. -if sys.version_info[:2] < (3, 6): +MIN_PY_VER = (3, 6) +if sys.version_info[:2] < MIN_PY_VER: sys.stderr.write( - "Biopython requires P...
translate__pootle-4579
Priority is displayed even if no virtual folders are being used This is a regression: in a server with no virtual folders, units still display a default priority of _1.0_.
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright (C) Pootle contributors.\n#\n# This file is a part of the Pootle project. It is distributed under the GPL3\n# or later license. See the LICENSE file for a copy of the license and the\n# AUTHORS file for copyright and authorship informa...
diff --git a/pootle/apps/pootle_store/views.py b/pootle/apps/pootle_store/views.py index 2cf5f88d006..05e2be6eb2f 100644 --- a/pootle/apps/pootle_store/views.py +++ b/pootle/apps/pootle_store/views.py @@ -492,11 +492,15 @@ def get_sources(self): return sources def get_context_data(self, *args, **kwargs)...
cloudtools__troposphere-1938
Apigateway CanarySettings PercentTraffic definition is wrong I attempted to use PercentTraffic and it gave an error that it expected a list of doubles: `TypeError: <class 'troposphere.apigateway.CanarySetting'>: None.PercentTraffic is <class 'float'>, expected [<function double at 0x10e783200>]` I wrapped the dou...
[ { "content": "from . import AWSObject, AWSProperty, Tags\nfrom .validators import boolean, double, integer_range, json_checker, positive_integer\n\n\ndef validate_authorizer_ttl(ttl_value):\n \"\"\"Validate authorizer ttl timeout\n :param ttl_value: The TTL timeout in seconds\n :return: The provided TT...
[ { "content": "from . import AWSObject, AWSProperty, Tags\nfrom .validators import boolean, double, integer_range, json_checker, positive_integer\n\n\ndef validate_authorizer_ttl(ttl_value):\n \"\"\"Validate authorizer ttl timeout\n :param ttl_value: The TTL timeout in seconds\n :return: The provided TT...
diff --git a/troposphere/apigateway.py b/troposphere/apigateway.py index 5d27f1d23..88b7b09f0 100644 --- a/troposphere/apigateway.py +++ b/troposphere/apigateway.py @@ -78,7 +78,7 @@ class CanarySetting(AWSProperty): props = { "DeploymentId": (str, False), - "PercentTraffic": ([double], False), +...
conan-io__conan-5849
Use of python_requires with enabled short_paths fails In Windows conan fails when a recipe uses `python_requires` and `short_paths = True` at the same time. To reproduce the issue, it's enough to just add `short_paths = True` into the consumer conanfile of the `python_requires` example. Conan will end with ``` ...
[ { "content": "import os\nimport shutil\nimport time\n\nfrom conans.client import tools\nfrom conans.client.file_copier import report_copied_files\nfrom conans.client.generators import TXTGenerator, write_generators\nfrom conans.client.graph.graph import BINARY_BUILD, BINARY_CACHE, BINARY_DOWNLOAD, BINARY_MISSIN...
[ { "content": "import os\nimport shutil\nimport time\n\nfrom conans.client import tools\nfrom conans.client.file_copier import report_copied_files\nfrom conans.client.generators import TXTGenerator, write_generators\nfrom conans.client.graph.graph import BINARY_BUILD, BINARY_CACHE, BINARY_DOWNLOAD, BINARY_MISSIN...
diff --git a/conans/client/installer.py b/conans/client/installer.py index 1bd24f6aab7..dac9c92a717 100644 --- a/conans/client/installer.py +++ b/conans/client/installer.py @@ -427,7 +427,7 @@ def _build_package(self, node, output, keep_build, remotes): assert python_require.ref.revision is not None, \ ...
dmlc__dgl-3256
relgraphconv basis_message_func bug ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> ## To Reproduce Use a small graph where #nodes * num_classes < hidden dimension of the graph convolutional layer. And use nodeID as the input feature. The bug lies in the basis_message_func function. Ste...
[ { "content": "\"\"\"Torch Module for Relational graph convolution layer\"\"\"\n# pylint: disable= no-member, arguments-differ, invalid-name\nimport functools\nimport numpy as np\nimport torch as th\nfrom torch import nn\n\nfrom .... import function as fn\nfrom .. import utils\nfrom ....base import DGLError\nfro...
[ { "content": "\"\"\"Torch Module for Relational graph convolution layer\"\"\"\n# pylint: disable= no-member, arguments-differ, invalid-name\nimport functools\nimport numpy as np\nimport torch as th\nfrom torch import nn\n\nfrom .... import function as fn\nfrom .. import utils\nfrom ....base import DGLError\nfro...
diff --git a/examples/pytorch/rgcn/README.md b/examples/pytorch/rgcn/README.md index 81c8fb54a4e4..a6234e9b0e69 100644 --- a/examples/pytorch/rgcn/README.md +++ b/examples/pytorch/rgcn/README.md @@ -17,43 +17,43 @@ pip install requests torch rdflib pandas Example code was tested with rdflib 4.2.2 and pandas 0.23.4 ...
Kinto__kinto-1925
Remove deprecation warning: Resource `mapping` is deprecated, use `schema` ``` tests/core/resource/test_viewset.py::ViewSetTest::test_a_default_schema_is_added_when_method_doesnt_match /home/mathieu/Code/Mozilla/kinto/kinto/core/resource/viewset.py:160: DeprecationWarning: Resource `mapping` is deprecated, use `sch...
[ { "content": "import functools\nimport warnings\n\nimport colander\nfrom cornice.validators import colander_validator\nfrom pyramid.settings import asbool\n\nfrom kinto.core import authorization\n\nfrom .schema import (\n PermissionsSchema,\n RequestSchema,\n PayloadRequestSchema,\n PatchHeaderSchem...
[ { "content": "import functools\n\nimport colander\nfrom cornice.validators import colander_validator\nfrom pyramid.settings import asbool\n\nfrom kinto.core import authorization\n\nfrom .schema import (\n PermissionsSchema,\n RequestSchema,\n PayloadRequestSchema,\n PatchHeaderSchema,\n Collectio...
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9d803efc7..3bd105ecb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -12,6 +12,7 @@ This document describes changes between each past release. **Internal changes** +- Remove depreciation warning for `mapping` (#1904) - Fix depreciated warn method (#1903) - Use f...
mars-project__mars-332
Implement __array_function__ protocol to provide interoperability with numpy <!-- Thank you for your contribution! Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue. --> **Is your feature request related to a problem? Please describe.** `__array_function_...
[ { "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/.travis.yml b/.travis.yml index b21beeeae6..ecc0fb0977 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: python env: global: - COVERALLS_PARALLEL=true + - NUMPY_EXPERIMENTAL_ARRAY_FUNCTION='1' notifications: webhooks: - https://coveralls.io/webhook diff --git a/appve...
jazzband__django-debug-toolbar-1498
Include instructions on APP_DIRS in Prerequisites docs So I was having `TemplateDoesNotExist` errors when trying to set up everything. It took me some time to realize that for this package to work, you need to have `APP_DIRS: True` for debug_toolbar to include its templates in the projects. Perhaps it's a good id...
[ { "content": "import inspect\n\nfrom django.apps import AppConfig\nfrom django.conf import settings\nfrom django.core.checks import Warning, register\nfrom django.middleware.gzip import GZipMiddleware\nfrom django.utils.module_loading import import_string\nfrom django.utils.translation import gettext_lazy as _\...
[ { "content": "import inspect\n\nfrom django.apps import AppConfig\nfrom django.conf import settings\nfrom django.core.checks import Warning, register\nfrom django.middleware.gzip import GZipMiddleware\nfrom django.utils.module_loading import import_string\nfrom django.utils.translation import gettext_lazy as _\...
diff --git a/debug_toolbar/apps.py b/debug_toolbar/apps.py index eec750a3b..69464c64d 100644 --- a/debug_toolbar/apps.py +++ b/debug_toolbar/apps.py @@ -23,6 +23,20 @@ def check_middleware(app_configs, **kwargs): gzip_index = None debug_toolbar_indexes = [] + if all(not config.get("APP_DIRS", False) for ...
localstack__localstack-993
Send SMS via SNS fails with 502 Hi, we are trying to mock the SMS sending via SMS. ``` aws --endpoint-url=http://localhost:4575 --region=us-east-1 sns publish --message "lorem ipsum" --phone-number 12345 ``` Checking the localstack image I can see a Python error in the logs: ``` 2018-10-30T13:46:19:ERROR:localsta...
[ { "content": "import ast\nimport json\nimport logging\nimport requests\nimport uuid\nimport xmltodict\nfrom requests.models import Response\nfrom six.moves.urllib import parse as urlparse\nfrom localstack.utils.aws import aws_stack\nfrom localstack.utils.common import short_uid, to_str\nfrom localstack.services...
[ { "content": "import ast\nimport json\nimport logging\nimport requests\nimport uuid\nimport xmltodict\nfrom requests.models import Response\nfrom six.moves.urllib import parse as urlparse\nfrom localstack.utils.aws import aws_stack\nfrom localstack.utils.common import short_uid, to_str\nfrom localstack.services...
diff --git a/localstack/services/sns/sns_listener.py b/localstack/services/sns/sns_listener.py index 5915c5a006ecb..0f1e9161aba5d 100644 --- a/localstack/services/sns/sns_listener.py +++ b/localstack/services/sns/sns_listener.py @@ -65,7 +65,7 @@ def forward_request(self, method, path, data, headers): elif...
Lightning-AI__torchmetrics-2491
Specificity if TN + FN = 0 The specificity is defined as $\text{Specificity} = \frac{\text{TN}}{\text{TN} + \text{FP}}$. As far as I see, in case $\text{FP} = 0$, the specificity should be 1. The docs say that in case $\text{FP} + \text{TP} = 0$, the metric is not defined (see reference below). To put this into wor...
[ { "content": "# Copyright The 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 by appli...
[ { "content": "# Copyright The 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 by appli...
diff --git a/src/torchmetrics/classification/specificity.py b/src/torchmetrics/classification/specificity.py index a297cfe9ca5..caca10dfa2b 100644 --- a/src/torchmetrics/classification/specificity.py +++ b/src/torchmetrics/classification/specificity.py @@ -453,7 +453,7 @@ class Specificity(_ClassificationTaskWrapper): ...
pretix__pretix-1443
Required file question breaks validation on edit Editing an order with a product with a required file question breaks when the customer tries to edit the order. In that case even if the customer already provided a file earlier the validation for the question fails on edit. Required file question breaks validation on ed...
[ { "content": "import os\n\nfrom django import forms\nfrom django.utils.formats import get_format\nfrom django.utils.functional import lazy\nfrom django.utils.timezone import now\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom pretix.base.models import OrderPosition\nfrom pretix.multidomain.urlr...
[ { "content": "import os\n\nfrom django import forms\nfrom django.utils.formats import get_format\nfrom django.utils.functional import lazy\nfrom django.utils.timezone import now\nfrom django.utils.translation import ugettext_lazy as _\n\nfrom pretix.base.models import OrderPosition\nfrom pretix.multidomain.urlr...
diff --git a/src/pretix/base/forms/widgets.py b/src/pretix/base/forms/widgets.py index 6adb50e2528..442ee535536 100644 --- a/src/pretix/base/forms/widgets.py +++ b/src/pretix/base/forms/widgets.py @@ -46,6 +46,14 @@ def __init__(self, attrs=None, time_format=None): class UploadedFileWidget(forms.ClearableFileInput):...
ansible-collections__community.vmware-1310
VMware Inventory Plugin does not select correct IP address on hosts with multiple NICs <!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!--- Complete *all* sections as described, this form is processed automatically -...
[ { "content": "#\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>\n# Copyright: (c) 2020, dacrystal\n#\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_fu...
[ { "content": "#\n# Copyright: (c) 2018, Ansible Project\n# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>\n# Copyright: (c) 2020, dacrystal\n#\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_fu...
diff --git a/plugins/inventory/vmware_vm_inventory.py b/plugins/inventory/vmware_vm_inventory.py index f76fdb9a41..7ae2e9243e 100644 --- a/plugins/inventory/vmware_vm_inventory.py +++ b/plugins/inventory/vmware_vm_inventory.py @@ -340,6 +340,26 @@ - 'guest.ipAddress' - 'guest.guestFamily' - 'guest....
bookwyrm-social__bookwyrm-3067
AWS_S3_CUSTOM_DOMAIN not set error for Amazon S3 Buckets **Describe the bug** According to the documentation ( https://docs.joinbookwyrm.com/external-storage.html ), Custom domain doesn't need to be set for Amazon S3 buckets. So I didn't. **To Reproduce** Steps to reproduce the behavior: Running the following com...
[ { "content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom typing import AnyStr\n\nfrom environs import Env\n\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\nfrom django.core.exceptions import ImproperlyConfigured\n\n\n# pylint: disable=line-too-long\n\nenv = En...
[ { "content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom typing import AnyStr\n\nfrom environs import Env\n\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\nfrom django.core.exceptions import ImproperlyConfigured\n\n\n# pylint: disable=line-too-long\n\nenv = En...
diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 16241f9df3..4cecc4df68 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -366,9 +366,9 @@ AWS_ACCESS_KEY_ID = env("AWS_ACCESS_KEY_ID") AWS_SECRET_ACCESS_KEY = env("AWS_SECRET_ACCESS_KEY") AWS_STORAGE_BUCKET_NAME = env("AWS_STORA...
scverse__scanpy-2231
`highly_variable_genes()` with `flavor="cell_ranger"` fails there are less normalized dispersions than `n_top_genes` - [x] I have checked that this issue has not already been reported. - [x] I have confirmed this bug exists on the latest version of scanpy. - [ ] (optional) I have confirmed this bug exists on the mast...
[ { "content": "import warnings\nfrom typing import Optional\nimport numpy as np\nimport pandas as pd\nimport scipy.sparse as sp_sparse\nfrom anndata import AnnData\n\n\nfrom .. import logging as logg\nfrom .._settings import settings, Verbosity\nfrom .._utils import sanitize_anndata, check_nonnegative_integers\n...
[ { "content": "import warnings\nfrom typing import Optional\nimport numpy as np\nimport pandas as pd\nimport scipy.sparse as sp_sparse\nfrom anndata import AnnData\n\n\nfrom .. import logging as logg\nfrom .._settings import settings, Verbosity\nfrom .._utils import sanitize_anndata, check_nonnegative_integers\n...
diff --git a/docs/release-notes/1.9.2.md b/docs/release-notes/1.9.2.md index 1aff3bcc9f..b467621b96 100644 --- a/docs/release-notes/1.9.2.md +++ b/docs/release-notes/1.9.2.md @@ -7,7 +7,7 @@ ```{rubric} Bug fixes ``` - {func}`~scanpy.pp.highly_variable_genes` `layer` argument now works in tandem with `batches` {pr}`...
python-poetry__poetry-5889
`poetry publish` fails on 1.2.0 <!-- Checked checkbox should look like this: [x] --> - [x] I am on the [latest](https://github.com/python-poetry/poetry/releases/latest) Poetry version. - [x] I have searched the [issues](https://github.com/python-poetry/poetry/issues) of this repo and believe that this is not a duplic...
[ { "content": "from __future__ import annotations\n\nimport logging\n\nfrom typing import TYPE_CHECKING\n\nfrom poetry.publishing.uploader import Uploader\nfrom poetry.utils.authenticator import Authenticator\n\n\nif TYPE_CHECKING:\n from pathlib import Path\n\n from cleo.io import BufferedIO\n from cle...
[ { "content": "from __future__ import annotations\n\nimport logging\n\nfrom typing import TYPE_CHECKING\n\nfrom poetry.publishing.uploader import Uploader\nfrom poetry.utils.authenticator import Authenticator\n\n\nif TYPE_CHECKING:\n from pathlib import Path\n\n from cleo.io import BufferedIO\n from cle...
diff --git a/src/poetry/publishing/publisher.py b/src/poetry/publishing/publisher.py index dd31e5c00e3..df4bb0410d8 100644 --- a/src/poetry/publishing/publisher.py +++ b/src/poetry/publishing/publisher.py @@ -74,15 +74,6 @@ def publish( resolved_cert = cert or certificates.cert or certificates.verify ...
aio-libs__aiohttp-3752
tests_require: add trustme It is required since https://github.com/aio-libs/aiohttp/pull/3487. <!-- Thank you for your contribution! --> ## What do these changes do? <!-- Please give a short brief about these changes. --> ## Are there changes in behavior for the user? <!-- Outline any notable behaviour f...
[ { "content": "import codecs\nimport pathlib\nimport re\nimport sys\nfrom distutils.command.build_ext import build_ext\nfrom distutils.errors import (CCompilerError, DistutilsExecError,\n DistutilsPlatformError)\n\nfrom setuptools import Extension, setup\n\n\nif sys.version_info < (3...
[ { "content": "import codecs\nimport pathlib\nimport re\nimport sys\nfrom distutils.command.build_ext import build_ext\nfrom distutils.errors import (CCompilerError, DistutilsExecError,\n DistutilsPlatformError)\n\nfrom setuptools import Extension, setup\n\n\nif sys.version_info < (3...
diff --git a/setup.py b/setup.py index 27355a5581f..8c2deaf201d 100644 --- a/setup.py +++ b/setup.py @@ -83,16 +83,6 @@ def read(f): return (here / f).read_text('utf-8').strip() -NEEDS_PYTEST = {'pytest', 'test'}.intersection(sys.argv) -pytest_runner = ['pytest-runner'] if NEEDS_PYTEST else [] - -tests_require...
interlegis__sapl-3013
Anexo da Norma Jurídica vazio <!--- Forneça um resumo geral da _issue_ no título acima --> ## Comportamento Esperado <!--- Se você está descrevendo um _bug_, conte-nos o que deveria acontecer. --> <!--- Se você está sugerindo uma mudança/melhoria, conte-nos como deve funcionar. --> Evitar que o usuário possa adic...
[ { "content": "\nimport logging\n\nfrom sapl.crispy_layout_mixin import SaplFormHelper\nfrom crispy_forms.layout import Fieldset, Layout\nfrom django import forms\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models\nfrom django.db.models import Q\nfrom django.for...
[ { "content": "\nimport logging\n\nfrom sapl.crispy_layout_mixin import SaplFormHelper\nfrom crispy_forms.layout import Fieldset, Layout\nfrom django import forms\nfrom django.core.exceptions import ObjectDoesNotExist, ValidationError\nfrom django.db import models\nfrom django.db.models import Q\nfrom django.for...
diff --git a/sapl/norma/forms.py b/sapl/norma/forms.py index 803cd2751..6631d50dc 100644 --- a/sapl/norma/forms.py +++ b/sapl/norma/forms.py @@ -266,6 +266,11 @@ def clean(self): class AnexoNormaJuridicaForm(FileFieldCheckMixin, ModelForm): + + logger = logging.getLogger(__name__) + + anexo_arquivo =...
nautobot__nautobot-5128
Sync Git Repository requires different permissions for UI vs API ### Environment * Nautobot version (Docker tag too if applicable): v1.6.2b1 * Python version: 3.11 * Database platform, version: pg15 * Middleware(s): n/a From the API it requires “add” and “change” permissions for “extras > Git repository” to sync...
[ { "content": "from datetime import timedelta\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.forms import ValidationError as FormsValidationError\nfrom django.http import FileResponse, Http404\nfrom django.shortcuts import get_object_or_404\nfrom djan...
[ { "content": "from datetime import timedelta\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.forms import ValidationError as FormsValidationError\nfrom django.http import FileResponse, Http404\nfrom django.shortcuts import get_object_or_404\nfrom djan...
diff --git a/changes/4444.fixed b/changes/4444.fixed new file mode 100644 index 00000000000..15dd4721a9e --- /dev/null +++ b/changes/4444.fixed @@ -0,0 +1 @@ +Fixed Sync Git Repository requires non-matching permissions for UI vs API. diff --git a/nautobot/extras/api/views.py b/nautobot/extras/api/views.py index 12490bc...
django-oscar__django-oscar-2782
1.6.3 does not actually add support for Django 2.1 ### Issue Summary 1.6.3 does not actually add support for Django 2.1 ### Steps to Reproduce ``` $ pip install Django ... $ pip install django-oscar ... Found existing installation: Django 2.1 Uninstalling Django-2.1: Successfully uninstalled...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nInstallation script:\n\nTo release a new version to PyPi:\n- Ensure the version is correctly set in oscar.__init__.py\n- Run: make release\n\"\"\"\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_DIR = os.path.dirname(__file...
[ { "content": "#!/usr/bin/env python\n\"\"\"\nInstallation script:\n\nTo release a new version to PyPi:\n- Ensure the version is correctly set in oscar.__init__.py\n- Run: make release\n\"\"\"\nimport os\nimport re\nimport sys\n\nfrom setuptools import find_packages, setup\n\nPROJECT_DIR = os.path.dirname(__file...
diff --git a/docs/source/releases/index.rst b/docs/source/releases/index.rst index 3035cdb5879..3cb2abf20bd 100644 --- a/docs/source/releases/index.rst +++ b/docs/source/releases/index.rst @@ -14,6 +14,7 @@ Release notes for each version of Oscar published to PyPI. v1.6.1 v1.6.2 v1.6.3 + v1.6.4 1...
interactions-py__interactions.py-1169
[BUG] Cannot pop from Cache during dispatch. ### Describe the bug. When running functions leading to delete events, for example `channel.purge` the cache encounters a KeyError and kills the whole Process. This is caused by the implementation of #482 ### List the steps. n/A ### What you expected. n/A ...
[ { "content": "from collections import OrderedDict\nfrom typing import Generic, TypeVar\n\n__all__ = (\"FIFODict\", \"LRUDict\")\n\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\n\nclass FIFODict(OrderedDict, Generic[_KT, _VT]):\n \"\"\"A dictionary that removes the old keys if over the item limit\"\"\"\n\...
[ { "content": "from collections import OrderedDict\nfrom typing import Generic, TypeVar\n\nfrom .missing import MISSING\n\n__all__ = (\"FIFODict\", \"LRUDict\")\n\n_KT = TypeVar(\"_KT\")\n_VT = TypeVar(\"_VT\")\n\n\nclass FIFODict(OrderedDict, Generic[_KT, _VT]):\n \"\"\"A dictionary that removes the old keys...
diff --git a/interactions/utils/dict_caches.py b/interactions/utils/dict_caches.py index a88662c52..6ed749d45 100644 --- a/interactions/utils/dict_caches.py +++ b/interactions/utils/dict_caches.py @@ -1,6 +1,8 @@ from collections import OrderedDict from typing import Generic, TypeVar +from .missing import MISSING +...
ros__ros_comm-1787
Coverity - forward null Event null_check: Comparing "f" to a null-like value implies that "f" might be null-like. https://github.com/ros/ros_comm/blob/29053c4832229efa7160fb944c05e3bc82e11540/tools/rosgraph/src/rosgraph/roslogging.py#L61-L62 Event property_access: | Accessing a property of null-like value "f". htt...
[ { "content": "# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redistributions of so...
[ { "content": "# Software License Agreement (BSD License)\n#\n# Copyright (c) 2008, Willow Garage, Inc.\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# * Redistributions of so...
diff --git a/tools/rosgraph/src/rosgraph/roslogging.py b/tools/rosgraph/src/rosgraph/roslogging.py index bbf1d9f49c..24038ee8e2 100644 --- a/tools/rosgraph/src/rosgraph/roslogging.py +++ b/tools/rosgraph/src/rosgraph/roslogging.py @@ -66,10 +66,11 @@ def findCaller(self, dummy=False): # Dummy second arg to match Python...
spack__spack-17427
Errors untaring source tarballs Docker Some source tarballs are created in a way that tries to preserve user and group perms. Yes, it's a bad to create a source tarball for release with these properties -- but I suspect it's easy to go undetected until you run in a security constrained linux. Cython is one example...
[ { "content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport re\nimport os\nfrom itertools import product\nfrom spack.util.executable import which\n\...
[ { "content": "# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nimport re\nimport os\nfrom itertools import product\nfrom spack.util.executable import which\n\...
diff --git a/lib/spack/spack/util/compression.py b/lib/spack/spack/util/compression.py index 1688b49f1b1a12..ebbe0519d04f20 100644 --- a/lib/spack/spack/util/compression.py +++ b/lib/spack/spack/util/compression.py @@ -14,7 +14,7 @@ NOTAR_EXTS = ["zip", "tgz", "tbz2", "txz"] # Add PRE_EXTS and EXTS last so that .ta...
wright-group__WrightTools-726
Group is not defined in collection https://github.com/wright-group/WrightTools/blob/ca056aa600f341501a99d2ea4d11f7d74047bc26/WrightTools/_open.py#L48 Statement will cause an attribute error. Not tested currently
[ { "content": "\"\"\"Generic open method for wt5 files.\"\"\"\n\n\n# --- import -------------------------------------------------------------------------------------\n\n\nimport posixpath\n\nimport h5py\n\nfrom . import collection as wt_collection\nfrom . import data as wt_data\n\n\n# --- define ----------------...
[ { "content": "\"\"\"Generic open method for wt5 files.\"\"\"\n\n\n# --- import -------------------------------------------------------------------------------------\n\n\nimport posixpath\n\nimport h5py\n\nfrom . import collection as wt_collection\nfrom . import data as wt_data\nfrom . import _group as wt_group\...
diff --git a/WrightTools/_open.py b/WrightTools/_open.py index 4bd8f6d9c..f6226abd5 100644 --- a/WrightTools/_open.py +++ b/WrightTools/_open.py @@ -10,6 +10,7 @@ from . import collection as wt_collection from . import data as wt_data +from . import _group as wt_group # --- define -----------------------------...
mindsdb__lightwood-434
LightGBM is not deterministic * Lightwood version: 0.58.0 Currently, our LightGBM mixer is not deterministic, presenting slight performance differences when trained for the same dataset. We should fix the corresponding random seeds so that this is doesn't happen anymore.
[ { "content": "import numpy as np\nimport optuna.integration.lightgbm as lgb\nimport lightgbm\nimport optuna\nimport torch\nimport logging\nimport time\n\nfrom lightwood.constants.lightwood import COLUMN_DATA_TYPES\nfrom lightwood.helpers.device import get_devices\nfrom lightwood.mixers import BaseMixer\nfrom sk...
[ { "content": "import numpy as np\nimport optuna.integration.lightgbm as lgb\nimport lightgbm\nimport optuna\nimport torch\nimport logging\nimport time\n\nfrom lightwood.constants.lightwood import COLUMN_DATA_TYPES\nfrom lightwood.helpers.device import get_devices\nfrom lightwood.mixers import BaseMixer\nfrom sk...
diff --git a/lightwood/mixers/lightgbm.py b/lightwood/mixers/lightgbm.py index 82b778488..0d5bde353 100644 --- a/lightwood/mixers/lightgbm.py +++ b/lightwood/mixers/lightgbm.py @@ -123,6 +123,7 @@ def _fit(self, train_ds, test_ds=None): if max_itt >= num_iterations and seconds_for_one_iteration < 10: ...
beetbox__beets-3688
Sanitize colons in drive-letter-like positions in Windows filenames like path separators I have an album containing an artist named "F:A.R.". When doing any activity that involves moving this artist, the file is not moved to "M:\F:A.R." (I'm using unicode replacements instead of underscores), but to "M:\F:\A.R.". ##...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
[ { "content": "# -*- coding: utf-8 -*-\n# This file is part of beets.\n# Copyright 2016, Adrian Sampson.\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, in...
diff --git a/beets/config_default.yaml b/beets/config_default.yaml index 0fd6eb592e..c75778b801 100644 --- a/beets/config_default.yaml +++ b/beets/config_default.yaml @@ -44,6 +44,7 @@ replace: '^\s+': '' '^-': _ path_sep_replace: _ +drive_sep_replace: _ asciify_paths: false art_filename: cover max_filena...
strawberry-graphql__strawberry-2863
resolve_async missing from NodeExtension ## Describe the Bug One new bug from `graphql/type/definition.py", line 811` as `TypeError: Query fields cannot be resolved. Cannot add sync-only extension(s) NodeExtension to the async resolver of Field hardware_details. Please add a resolve_async method to the extension(s)....
[ { "content": "from __future__ import annotations\n\nimport asyncio\nimport dataclasses\nimport inspect\nfrom collections import defaultdict\nfrom collections.abc import AsyncIterable\nfrom typing import (\n TYPE_CHECKING,\n Any,\n AsyncIterator,\n Callable,\n DefaultDict,\n Dict,\n ForwardR...
[ { "content": "from __future__ import annotations\n\nimport asyncio\nimport dataclasses\nimport inspect\nfrom collections import defaultdict\nfrom collections.abc import AsyncIterable\nfrom typing import (\n TYPE_CHECKING,\n Any,\n AsyncIterator,\n Callable,\n DefaultDict,\n Dict,\n ForwardR...
diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..5219f49fb2 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,4 @@ +Release type: patch + +This release adds resolve_async to NodeExtension to allow it to +be used together with other field async extensions/permissions. diff --git a/strawberry/relay/fie...
mozilla__pontoon-2856
Daily sync errors for android-l10n project *This issue was created automatically by a [script](https://github.com/mathjazz/bugzilla2github/).* ## [Bug 1726957](https://bugzilla.mozilla.org/show_bug.cgi?id=1726957) Bug Reporter: @flodolo CC: @mathjazz Starting August 18, we constantly get Sync errors from android-l10...
[ { "content": "from abc import ABC, abstractmethod\nimport logging\nimport os\nimport subprocess\n\nfrom django.conf import settings\n\nfrom pontoon.base.models import Repository\n\nlog = logging.getLogger(__name__)\n\n\nclass PullFromRepositoryException(Exception):\n pass\n\n\nclass PullFromRepository:\n ...
[ { "content": "from abc import ABC, abstractmethod\nimport logging\nimport os\nimport subprocess\n\nfrom django.conf import settings\n\nfrom pontoon.base.models import Repository\n\nlog = logging.getLogger(__name__)\n\n\nclass PullFromRepositoryException(Exception):\n pass\n\n\nclass PullFromRepository:\n ...
diff --git a/pontoon/sync/vcs/repositories.py b/pontoon/sync/vcs/repositories.py index 94dd86ee8f..6477588f7c 100644 --- a/pontoon/sync/vcs/repositories.py +++ b/pontoon/sync/vcs/repositories.py @@ -171,8 +171,18 @@ def commit(self, path=None, message=None, user=None, branch=None): push = ["git", "push", sel...
comic__grand-challenge.org-1016
Ability to remove readers, editors (and users) We need to be able to remove Readers from a reader study as an Editor. Could this be added?
[ { "content": "import csv\nimport re\n\nfrom dal import autocomplete\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.mixins import (\n PermissionRequiredMixin,\n UserPassesTestMixin,\n)\nfrom django.contrib.mes...
[ { "content": "import csv\nimport re\n\nfrom dal import autocomplete\nfrom django.conf import settings\nfrom django.contrib import messages\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.auth.mixins import (\n PermissionRequiredMixin,\n UserPassesTestMixin,\n)\nfrom django.contrib.mes...
diff --git a/app/grandchallenge/reader_studies/templates/reader_studies/readerstudy_detail.html b/app/grandchallenge/reader_studies/templates/reader_studies/readerstudy_detail.html index ba283ab37f..17cc47e604 100644 --- a/app/grandchallenge/reader_studies/templates/reader_studies/readerstudy_detail.html +++ b/app/gran...
netbox-community__netbox-11285
VM Interface CSV Export have empty lines if two ip adresses assigned to VM Interface ### NetBox version v3.4.1 ### Python version 3.10 ### Steps to Reproduce VM Interface Export open export.csv ### Expected Behavior no empty lines should displayed second lines should have the same information about device ...
[ { "content": "import django_tables2 as tables\n\nfrom ipam.models import *\nfrom netbox.tables import NetBoxTable, columns\n\n__all__ = (\n 'FHRPGroupTable',\n 'FHRPGroupAssignmentTable',\n)\n\n\nIPADDRESSES = \"\"\"\n{% for ip in value.all %}\n <a href=\"{{ ip.get_absolute_url }}\">{{ ip }}</a><br />\n{...
[ { "content": "import django_tables2 as tables\n\nfrom ipam.models import *\nfrom netbox.tables import NetBoxTable, columns\n\n__all__ = (\n 'FHRPGroupTable',\n 'FHRPGroupAssignmentTable',\n)\n\n\nIPADDRESSES = \"\"\"\n{% for ip in value.all %}\n <a href=\"{{ ip.get_absolute_url }}\">{{ ip }}</a><br />\n{...
diff --git a/netbox/dcim/tables/devices.py b/netbox/dcim/tables/devices.py index 7b8ea1ed310..7a2ea50babb 100644 --- a/netbox/dcim/tables/devices.py +++ b/netbox/dcim/tables/devices.py @@ -506,6 +506,9 @@ class BaseInterfaceTable(NetBoxTable): verbose_name='Tagged VLANs' ) + def value_ip_addresses(se...
archlinux__archinstall-722
Install failed, key error "Encrypted" During manual disk partitioning, you can realize that the "encrypted" key is not created in the dictionary, resulting in the error as we see below: ```log { "/dev/sda": { "partitions": [ { "boot": true, "filesystem": ...
[ { "content": "import time\nfrom typing import Union\nimport logging\nimport os\nimport shutil\nimport shlex\nimport pathlib\nimport subprocess\nimport glob\nfrom .disk import get_partitions_in_use, Partition\nfrom .general import SysCommand\nfrom .hardware import has_uefi, is_vm, cpu_vendor\nfrom .locale_helper...
[ { "content": "import time\nfrom typing import Union\nimport logging\nimport os\nimport shutil\nimport shlex\nimport pathlib\nimport subprocess\nimport glob\nfrom .disk import get_partitions_in_use, Partition\nfrom .general import SysCommand\nfrom .hardware import has_uefi, is_vm, cpu_vendor\nfrom .locale_helper...
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py index df0ddcdb0c..40f6410b0f 100644 --- a/archinstall/lib/installer.py +++ b/archinstall/lib/installer.py @@ -175,7 +175,7 @@ def mount_ordered_layout(self, layouts :dict): for mountpoint in sorted(mountpoints.keys()): log(f"Mounting {mou...
graphql-python__graphene-django-1460
Fix graphiql explorer styles by including official CSS, and update local example app for testing Resolves https://github.com/graphql-python/graphene-django/issues/1417 (For the graphiql explorer styles recently added in https://github.com/graphql-python/graphene-django/pull/1397) Followed the official graphiql-pl...
[ { "content": "import inspect\nimport json\nimport re\n\nfrom django.db import connection, transaction\nfrom django.http import HttpResponse, HttpResponseNotAllowed\nfrom django.http.response import HttpResponseBadRequest\nfrom django.shortcuts import render\nfrom django.utils.decorators import method_decorator\...
[ { "content": "import inspect\nimport json\nimport re\n\nfrom django.db import connection, transaction\nfrom django.http import HttpResponse, HttpResponseNotAllowed\nfrom django.http.response import HttpResponseBadRequest\nfrom django.shortcuts import render\nfrom django.utils.decorators import method_decorator\...
diff --git a/graphene_django/views.py b/graphene_django/views.py index 71c087b3c..c6090b08c 100644 --- a/graphene_django/views.py +++ b/graphene_django/views.py @@ -167,6 +167,7 @@ def dispatch(self, request, *args, **kwargs): subscriptions_transport_ws_sri=self.subscriptions_transport_ws_sri, ...
Lightning-AI__pytorch-lightning-701
batch may not have the copy method ## 🐛 Bug In this commit: https://github.com/PyTorchLightning/pytorch-lightning/commit/48b797fdb046bab73fc04ef6d6780f05d3623485 The training `batch` is copied before `transfer_batch_to_gpu `, but a batch may not have the `copy` method. Thus, the following error will be raised in ...
[ { "content": "\"\"\"\nThe lightning training loop handles everything except the actual computations of your model.\n To decide what will happen in your training loop, define the `training_step` function.\n\nBelow are all the things lightning automates for you in the training loop.\n\nAccumulated gradients\n----...
[ { "content": "\"\"\"\nThe lightning training loop handles everything except the actual computations of your model.\n To decide what will happen in your training loop, define the `training_step` function.\n\nBelow are all the things lightning automates for you in the training loop.\n\nAccumulated gradients\n----...
diff --git a/pytorch_lightning/trainer/training_loop.py b/pytorch_lightning/trainer/training_loop.py index 48bb359713977..7c8d0143b80c3 100644 --- a/pytorch_lightning/trainer/training_loop.py +++ b/pytorch_lightning/trainer/training_loop.py @@ -151,7 +151,7 @@ def training_step(self, batch, batch_idx): """ - +impo...
tensorflow__tensor2tensor-1247
Cannot download MRPC data ### Description I get `UnicodeDecodeError` when trying to generate the "MSR Paraphrase Corpus" data. It happens when using either `t2t-datagen` or `t2t-trainer`. ### Environment information ``` OS: macOS 10.13.4 $ pip freeze | grep tensor mesh-tensorflow==0.0.4 tensor2tensor==1....
[ { "content": "# coding=utf-8\n# Copyright 2018 The Tensor2Tensor 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# http://www.apache.org/licenses/LICENSE-2.0\n#...
[ { "content": "# coding=utf-8\n# Copyright 2018 The Tensor2Tensor 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# http://www.apache.org/licenses/LICENSE-2.0\n#...
diff --git a/tensor2tensor/data_generators/mrpc.py b/tensor2tensor/data_generators/mrpc.py index 14822428d..46ed39168 100644 --- a/tensor2tensor/data_generators/mrpc.py +++ b/tensor2tensor/data_generators/mrpc.py @@ -38,8 +38,8 @@ class MSRParaphraseCorpus(text_problems.TextConcat2ClassProblem): # Link to data from ...
qutebrowser__qutebrowser-440
AttributeError because url is None in adblock_update Report: http://paste.the-compiler.org/view/a76e0750 ``` Traceback (most recent call last): File "/usr/lib/python3.4/site-packages/qutebrowser/commands/runners.py", line 298, in run_safely self.run(text, count) File "/usr/lib/python3.4/site-packages/qutebrows...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License...
diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index c7669f4ffa2..17d812dab5a 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -517,7 +517,7 @@ 'http://winhelp2002.mvps.org/hosts.zip,' 'http://malwared...
buildbot__buildbot-3918
Transferring Files with LocalWorker seems not working This ticket is a migrated Trac ticket [3628](http://trac.buildbot.net/ticket/3628) People contributed to the original ticket: @unknown_contributor, @sa2ajj Ticket created on: `Oct 20 2016` Ticket last modified on: `Oct 27 2016` --- Hi, I just update my buildbot ...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
[ { "content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n...
diff --git a/master/buildbot/newsfragments/localworker_transfer.bugfix b/master/buildbot/newsfragments/localworker_transfer.bugfix new file mode 100644 index 000000000000..81c4274ae5a0 --- /dev/null +++ b/master/buildbot/newsfragments/localworker_transfer.bugfix @@ -0,0 +1 @@ +Fix maximum recursion limit issue when tra...
geopandas__geopandas-360
Invalid scheme should raise exception instead of being modified to 'Quantiles' IMO, an invalid, unsupported, or typo scheme should not [revert to using Quantiles](https://github.com/geopandas/geopandas/blob/master/geopandas/plotting.py#L324). Warning messages aren't always visible, and an unsupported scheme being used ...
[ { "content": "from __future__ import print_function\n\nimport warnings\n\nimport numpy as np\nfrom six import next\nfrom six.moves import xrange\nfrom shapely.geometry import Polygon\n\n\ndef plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5, linewidth=1.0, **kwargs):\n \"\"\" Plot a singl...
[ { "content": "from __future__ import print_function\n\nimport warnings\n\nimport numpy as np\nfrom six import next\nfrom six.moves import xrange\nfrom shapely.geometry import Polygon\n\n\ndef plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5, linewidth=1.0, **kwargs):\n \"\"\" Plot a singl...
diff --git a/geopandas/plotting.py b/geopandas/plotting.py index 4174408544..29a78c26e9 100644 --- a/geopandas/plotting.py +++ b/geopandas/plotting.py @@ -318,12 +318,9 @@ class identifier and the bins. schemes['equal_interval'] = Equal_Interval schemes['quantiles'] = Quantiles schemes['fishe...
nipy__nipype-3596
Error in Mrtrix3's DWIPreproc ### Summary The `_list_outputs` method of `DWIPreproc` tries to set up an input called "`export_grad_mrtrix`", which should be "`out_grad_mrtrix`", causing it to fail. ### Actual behavior ```python AttributeError: 'DWIPreprocInputSpec' object has no attribute 'export_grad_mrtrix' ``...
[ { "content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n# -*- coding: utf-8 -*-\n\nimport os.path as op\n\nfrom ..base import (\n CommandLine,\n CommandLineInputSpec,\n Directory,\n File,\n InputMultiObject,\n TraitedSpe...
[ { "content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n# -*- coding: utf-8 -*-\n\nimport os.path as op\n\nfrom ..base import (\n CommandLine,\n CommandLineInputSpec,\n Directory,\n File,\n InputMultiObject,\n TraitedSpe...
diff --git a/.zenodo.json b/.zenodo.json index 807d1c5c4f..4b8ae1f2a6 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -320,7 +320,7 @@ }, { "affiliation": "Sagol School of Neuroscience, Tel Aviv University", - "name": "Ben-Zvi, Gal", + "name": "Kepler, Gal", "orcid": "0000-0002-5655-94...
networkx__networkx-5800
Bipartite Closeness centrality algorithm does not report nodes with zero value. ### Current Behavior The function saves closeness values of '0.0' always at closeness[len(nodes)] which is closeness[n]. This results a returned dictionary with less elements than number of nodes in the graph. ### Expected Behavior The...
[ { "content": "import networkx as nx\n\n__all__ = [\"degree_centrality\", \"betweenness_centrality\", \"closeness_centrality\"]\n\n\ndef degree_centrality(G, nodes):\n r\"\"\"Compute the degree centrality for nodes in a bipartite network.\n\n The degree centrality for a node `v` is the fraction of nodes\n ...
[ { "content": "import networkx as nx\n\n__all__ = [\"degree_centrality\", \"betweenness_centrality\", \"closeness_centrality\"]\n\n\ndef degree_centrality(G, nodes):\n r\"\"\"Compute the degree centrality for nodes in a bipartite network.\n\n The degree centrality for a node `v` is the fraction of nodes\n ...
diff --git a/networkx/algorithms/bipartite/centrality.py b/networkx/algorithms/bipartite/centrality.py index cc3d370d72b..3eab83422db 100644 --- a/networkx/algorithms/bipartite/centrality.py +++ b/networkx/algorithms/bipartite/centrality.py @@ -252,7 +252,7 @@ def closeness_centrality(G, nodes, normalized=True): ...
ansible__ansible-39093
network_cli times out at self._ssh_shell.recv(256) randomly <!--- Verify first that your issue/request is not already reported on GitHub. Also test if the latest release, and devel branch are affected too. Always add information AFTER of these html comments. --> ##### ISSUE TYPE <!--- Pick one below and delete ...
[ { "content": "#\n# (c) 2016 Red Hat Inc.\n#\n# This file is part of Ansible\n#\n# Ansible 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 version 3 of the License, or\n# (at your option) any l...
[ { "content": "#\n# (c) 2016 Red Hat Inc.\n#\n# This file is part of Ansible\n#\n# Ansible 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 version 3 of the License, or\n# (at your option) any l...
diff --git a/changelogs/fragments/ios_iosxr_terminal_prompt.yaml b/changelogs/fragments/ios_iosxr_terminal_prompt.yaml new file mode 100644 index 00000000000000..1d4dc9bc0f7bbb --- /dev/null +++ b/changelogs/fragments/ios_iosxr_terminal_prompt.yaml @@ -0,0 +1,2 @@ +bugfixes: +- ios_iosxr_terminal - fixed issue with ios...
pypa__pipenv-5628
pipenv check looks at installed packages, not Pipfile.lock ## Use Case I would like to run `pipenv check` as a separate job from the build/test job inside a CI pipeline without rebuilding environment. I discovered that I must actually install all packages to a `pipenv` environment before using `pipenv check`. Ideall...
[ { "content": "import io\nimport json as simplejson\nimport os\nimport sys\nimport tempfile\nfrom pathlib import Path\n\nfrom pipenv import exceptions, pep508checker\nfrom pipenv.utils.processes import run_command\nfrom pipenv.utils.project import ensure_project\nfrom pipenv.utils.shell import cmd_list_to_shell,...
[ { "content": "import io\nimport json as simplejson\nimport os\nimport sys\nimport tempfile\nfrom pathlib import Path\n\nfrom pipenv import exceptions, pep508checker\nfrom pipenv.utils.processes import run_command\nfrom pipenv.utils.project import ensure_project\nfrom pipenv.utils.shell import cmd_list_to_shell,...
diff --git a/news/5628.trivial.rst b/news/5628.trivial.rst new file mode 100644 index 0000000000..724ee853c2 --- /dev/null +++ b/news/5628.trivial.rst @@ -0,0 +1 @@ +Show a different message for ``pipenv check`` depending on the ``--use-installed`` option. diff --git a/pipenv/routines/check.py b/pipenv/routines/check.p...
encode__django-rest-framework-2473
Settings should be updated when overridden in Django tests DRF has its own settings object at `rest_framework.settings.api_settings`. It appears that these are generated once and not updated when `override_settings` is used in Django testing. ## Failing test With this in a settings file: ``` REST_FRAMEWORK = { 'P...
[ { "content": "\"\"\"\nSettings for REST framework are all namespaced in the REST_FRAMEWORK setting.\nFor example your project's `settings.py` file might look like this:\n\nREST_FRAMEWORK = {\n 'DEFAULT_RENDERER_CLASSES': (\n 'rest_framework.renderers.JSONRenderer',\n 'rest_framework.renderers.Y...
[ { "content": "\"\"\"\nSettings for REST framework are all namespaced in the REST_FRAMEWORK setting.\nFor example your project's `settings.py` file might look like this:\n\nREST_FRAMEWORK = {\n 'DEFAULT_RENDERER_CLASSES': (\n 'rest_framework.renderers.JSONRenderer',\n 'rest_framework.renderers.Y...
diff --git a/rest_framework/settings.py b/rest_framework/settings.py index fc6dfecda9..e5e5edafeb 100644 --- a/rest_framework/settings.py +++ b/rest_framework/settings.py @@ -18,6 +18,7 @@ back to the defaults. """ from __future__ import unicode_literals +from django.test.signals import setting_changed from django....
statsmodels__statsmodels-5292
DOC: Matplotlib 3.0.0 seems to no longer have "matplotlib.sphinxext.only_directives" Docbuild is failing. Seems we used to reference this in the sphinx build: https://github.com/matplotlib/matplotlib/blob/2e0eb748d3c1b808ed89e86e80a2d1565b4cd896/lib/matplotlib/sphinxext/only_directives.py But that module is n...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# statsmodels documentation build configuration file, created by\n# sphinx-quickstart on Sat Jan 22 11:17:58 2011.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in t...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# statsmodels documentation build configuration file, created by\n# sphinx-quickstart on Sat Jan 22 11:17:58 2011.\n#\n# This file is execfile()d with the current directory set to its containing dir.\n#\n# Note that not all possible configuration values are present in t...
diff --git a/docs/source/conf.py b/docs/source/conf.py index 5472b207a71..f71d73fee6e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -35,7 +35,6 @@ 'sphinx.ext.autosummary', 'sphinx.ext.inheritance_diagram', 'matplotlib.sphinxext.plot_directive', - ...
pydantic__pydantic-4862
Change default cython flags to have smaller compiled files Pip install results in a much larger lib artefact compared to conda install (both in a conda environment): - `pip install pydantic`: 80M - `conda install pydantic -c conda-forge`: 6.6M I don't know if this is expected or not. I encountered this while tryin...
[ { "content": "import os\nimport re\nimport sys\nfrom importlib.machinery import SourceFileLoader\nfrom pathlib import Path\n\nfrom setuptools import setup\n\nif os.name == 'nt':\n from setuptools.command import build_ext\n\n def get_export_symbols(self, ext):\n \"\"\"\n Slightly modified fro...
[ { "content": "import os\nimport re\nimport sys\nfrom importlib.machinery import SourceFileLoader\nfrom pathlib import Path\n\nfrom setuptools import setup\n\nif os.name == 'nt':\n from setuptools.command import build_ext\n\n def get_export_symbols(self, ext):\n \"\"\"\n Slightly modified fro...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98e6d5a7eb7..00cc0b5c6cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -308,8 +308,6 @@ jobs: build: name: build py3.${{ matrix.python-version }} on ${{ matrix.platform || matrix.os }} - needs: [lint, test-linu...
ansible__ansible-modules-core-4998
ini_file module doesn't match existing key when it is indented ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME `ini_file` module ##### ANSIBLE VERSION <!--- Paste verbatim output from “ansible --version” between quotes below --> ``` ansible 2.1.1.0 ``` ##### CONFIGURATION N/A ##### OS / ENVIRONMENT N/A ##### SU...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Jan-Piet Mens <jpmens () gmail.com>\n# (c) 2015, Ales Nosek <anosek.nosek () gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Jan-Piet Mens <jpmens () gmail.com>\n# (c) 2015, Ales Nosek <anosek.nosek () gmail.com>\n#\n# This file is part of Ansible\n#\n# Ansible is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public...
diff --git a/files/ini_file.py b/files/ini_file.py index 2fc3d96f5f3..e26949a923f 100644 --- a/files/ini_file.py +++ b/files/ini_file.py @@ -109,7 +109,7 @@ def match_opt(option, line): option = re.escape(option) - return re.match('%s( |\t)*=' % option, line) \ + return re.match(' *%s( |\t)*=' % option, line) \...
django-import-export__django-import-export-1786
Confirmation page displays incorrect fields **Describe the bug** This has been introduced in v4. When previewing an import via the Admin site, the field order is incorrect. (note 'display classes' field) ### v4 (incorrect) ![image](https://github.com/django-import-export/django-import-export/assets/6249838...
[ { "content": "import functools\nimport logging\nimport traceback\nfrom collections import OrderedDict\nfrom copy import deepcopy\nfrom html import escape\nfrom warnings import warn\n\nimport tablib\nfrom diff_match_patch import diff_match_patch\nfrom django.conf import settings\nfrom django.core.exceptions impo...
[ { "content": "import functools\nimport logging\nimport traceback\nfrom collections import OrderedDict\nfrom copy import deepcopy\nfrom html import escape\nfrom warnings import warn\n\nimport tablib\nfrom diff_match_patch import diff_match_patch\nfrom django.conf import settings\nfrom django.core.exceptions impo...
diff --git a/docs/changelog.rst b/docs/changelog.rst index 7f42d3b5f..ed5798fe1 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -9,6 +9,7 @@ Changelog ----------------------- - Add form error if source file contains invalid header (#1780) +- Fix for incorrect header order on 'confirm' page (#1786) 4....
nautobot__nautobot-4519
Expose django slugify in jinja filters As a Network Automation Engineer, I want the django slugify utility function to be exposed for use in Nautobot jinija2 templates, so that I can have feature parity with the fact it is already exposed as a django template filter. I will know this is complete when the django slugi...
[ { "content": "import datetime\nimport json\nimport logging\nimport re\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.staticfiles.finders import find\nfrom django.templatetags.static import StaticNode, static\nfrom django.urls import NoReverseMatch, reverse\nfrom django.uti...
[ { "content": "import datetime\nimport json\nimport logging\nimport re\n\nfrom django import template\nfrom django.conf import settings\nfrom django.contrib.staticfiles.finders import find\nfrom django.templatetags.static import StaticNode, static\nfrom django.urls import NoReverseMatch, reverse\nfrom django.uti...
diff --git a/changes/4477.added b/changes/4477.added new file mode 100644 index 00000000000..b732e245389 --- /dev/null +++ b/changes/4477.added @@ -0,0 +1 @@ +Added the `slugify` Django template tag as a Jinja filter. diff --git a/nautobot/core/templatetags/helpers.py b/nautobot/core/templatetags/helpers.py index a6096...
freedomofpress__securedrop-237
Possible path confusion / traversal via imprecise store.verify() The method `store.verify()` checks file paths provided via URL and other ways and raises an exception if they are not matching the validation criteria. A problem with this validation process was spotted: `os.path.commonprefix()` is not sufficient to chec...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nimport re\nimport config\nimport zipfile\nimport crypto_util\nimport uuid\nimport tempfile\n\nVALIDATE_FILENAME = re.compile(\n \"^(reply-)?[a-f0-9-]+(_msg|_doc\\.zip|)\\.gpg$\").match\n\n\nclass PathException(Exception):\n\n '''An exception raised by `sto...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nimport re\nimport config\nimport zipfile\nimport crypto_util\nimport uuid\nimport tempfile\n\nVALIDATE_FILENAME = re.compile(\n \"^(reply-)?[a-f0-9-]+(_msg|_doc\\.zip|)\\.gpg$\").match\n\n\nclass PathException(Exception):\n\n '''An exception raised by `sto...
diff --git a/securedrop/store.py b/securedrop/store.py index 3407d6b62f..2feea81778 100644 --- a/securedrop/store.py +++ b/securedrop/store.py @@ -35,13 +35,13 @@ def verify(p): if not p == os.path.abspath(p): raise PathException("The path is not absolute and/or normalized") - if os.path.commonprefix...
napari__napari-1723
Broadcast error when viewing ome-zarr data 7d288e5c37a2c46c3ca3f4c31d8a3f51a4603797 / #1673 broke viewing ome-zarr multiscale data. I'm not sure yet what exactly is broken. Reproducible example (requires `pip install ome-zarr`): ```python import napari with napari.gui_qt(): v = napari.Viewer() v.open('...
[ { "content": "import warnings\nfrom abc import ABC, abstractmethod\nfrom contextlib import contextmanager\nfrom typing import List, Optional\n\nimport numpy as np\n\nfrom ...components import Dims\nfrom ...utils.dask_utils import configure_dask\nfrom ...utils.events import EmitterGroup, Event\nfrom ...utils.key...
[ { "content": "import warnings\nfrom abc import ABC, abstractmethod\nfrom contextlib import contextmanager\nfrom typing import List, Optional\n\nimport numpy as np\n\nfrom ...components import Dims\nfrom ...utils.dask_utils import configure_dask\nfrom ...utils.events import EmitterGroup, Event\nfrom ...utils.key...
diff --git a/napari/_vispy/_tests/test_vispy_multiscale.py b/napari/_vispy/_tests/test_vispy_multiscale.py index 26ac14e4006..5e90e756689 100644 --- a/napari/_vispy/_tests/test_vispy_multiscale.py +++ b/napari/_vispy/_tests/test_vispy_multiscale.py @@ -158,3 +158,20 @@ def test_image_screenshot_zoomed(make_test_viewer)...
projectmesa__mesa-1160
lint-black breaking workflow lint-black is breaking the workflow. My impression is this also a contributor guide issue, but could be wrong.
[ { "content": "\"\"\"\nMesa Space Module\n=================\n\nObjects used to add a spatial component to a model.\n\nGrid: base grid, a simple list-of-lists.\nSingleGrid: grid which strictly enforces one object per cell.\nMultiGrid: extension to Grid where each cell is a set of objects.\n\n\"\"\"\n# Instruction...
[ { "content": "\"\"\"\nMesa Space Module\n=================\n\nObjects used to add a spatial component to a model.\n\nGrid: base grid, a simple list-of-lists.\nSingleGrid: grid which strictly enforces one object per cell.\nMultiGrid: extension to Grid where each cell is a set of objects.\n\n\"\"\"\n# Instruction...
diff --git a/examples/sugarscape_cg/sugarscape_cg/agents.py b/examples/sugarscape_cg/sugarscape_cg/agents.py index 3374cc5336b..6966572af65 100644 --- a/examples/sugarscape_cg/sugarscape_cg/agents.py +++ b/examples/sugarscape_cg/sugarscape_cg/agents.py @@ -14,7 +14,7 @@ def get_distance(pos_1, pos_2): x2, y2 = pos...
qutebrowser__qutebrowser-2747
Empty space after the last tab <!-- If this is a bug report, please remember to mention your version info from the `qute:version` page or `qutebrowser --version` --> Right after the last tab there's an empty space (occupying as much space as a single tab). It doesn't exist when there are fewer tabs (right now I ha...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License...
[ { "content": "# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:\n\n# Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org>\n#\n# This file is part of qutebrowser.\n#\n# qutebrowser is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License...
diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 2c4eb6eabe0..3dd0d28da3d 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -760,6 +760,19 @@ def subElementRect(self, sr, opt, widget=None): rct = super().subElementRect(...
ResonantGeoData__ResonantGeoData-311
psycopg2.errors.UniqueViolation: duplicate key value error When running the demo data commands that I have, if the celery worker is set up to run in the background, an integretiy error for duplicate keys happens on the `image_entry.save()` call here: https://github.com/ResonantGeoData/ResonantGeoData/blob/998a6c3995...
[ { "content": "from functools import reduce\nimport os\nfrom urllib.request import urlopen\n\nfrom django.db.models import Count\n\nfrom rgd.geodata import models, tasks\nfrom rgd.geodata.datastore import datastore, registry\nfrom rgd.geodata.models.imagery.etl import read_image_file\nfrom rgd.utility import get...
[ { "content": "from functools import reduce\nimport os\nfrom urllib.request import urlopen\n\nfrom django.db.models import Count\n\nfrom rgd.geodata import models, tasks\nfrom rgd.geodata.datastore import datastore, registry\nfrom rgd.geodata.models.imagery.etl import read_image_file\nfrom rgd.utility import get...
diff --git a/rgd/geodata/management/commands/_data_helper.py b/rgd/geodata/management/commands/_data_helper.py index 3cb28efb9..580784617 100644 --- a/rgd/geodata/management/commands/_data_helper.py +++ b/rgd/geodata/management/commands/_data_helper.py @@ -40,11 +40,12 @@ def _get_or_download_checksum_file(name): def ...
pypa__cibuildwheel-88
'wheel' missing from setup.py install_requires list? While trying to use a vanilla cibuildwheel configuration with AppVeyor, I kept running into this error, ``` cibuildwheel: Failed to get name of the package. Command was ['c:\\python27\\python.exe', '.\\setup.py', '--name'] ``` It was only after running that com...
[ { "content": "from __future__ import print_function\nimport argparse, os, subprocess, sys, textwrap\n\nimport cibuildwheel\nimport cibuildwheel.linux, cibuildwheel.windows, cibuildwheel.macos\nfrom cibuildwheel.environment import parse_environment, EnvironmentParseError\nfrom cibuildwheel.util import BuildSkipp...
[ { "content": "from __future__ import print_function\nimport argparse, os, subprocess, sys, textwrap\n\nimport cibuildwheel\nimport cibuildwheel.linux, cibuildwheel.windows, cibuildwheel.macos\nfrom cibuildwheel.environment import parse_environment, EnvironmentParseError\nfrom cibuildwheel.util import BuildSkipp...
diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 1a9e3c5ee..ce742d10b 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -108,9 +108,10 @@ def main(): print('cibuildwheel: Could not find setup.py at root of project', file=sys.stderr) exit(2) ...
OpenNMT__OpenNMT-py-1206
ImportError for get_rank function While running the **preprocess.py** I am getting an ImportError of get_rank function from Pytorch. What I have found on the internet that it is now deprecated and is inside the deprecated module. I can send a pull request for a fix of that?
[ { "content": "\"\"\" Statistics calculation utility \"\"\"\nfrom __future__ import division\nimport time\nimport math\nimport sys\n\nfrom torch.distributed import get_rank\nfrom onmt.utils.distributed import all_gather_list\nfrom onmt.utils.logging import logger\n\n\nclass Statistics(object):\n \"\"\"\n A...
[ { "content": "\"\"\" Statistics calculation utility \"\"\"\nfrom __future__ import division\nimport time\nimport math\nimport sys\n\nfrom onmt.utils.logging import logger\n\n\nclass Statistics(object):\n \"\"\"\n Accumulator for loss statistics.\n Currently calculates:\n\n * accuracy\n * perplexi...
diff --git a/onmt/utils/statistics.py b/onmt/utils/statistics.py index 4145e8cf7c..e4a90a6565 100644 --- a/onmt/utils/statistics.py +++ b/onmt/utils/statistics.py @@ -4,8 +4,6 @@ import math import sys -from torch.distributed import get_rank -from onmt.utils.distributed import all_gather_list from onmt.utils.loggi...