in_source_id
string
before_files
list
after_files
list
pr_diff
string
issue
string
golden_diff
string
verification_info
string
prompt
string
searx__searx-2132
[ { "content": "#!/usr/bin/env python\n\n'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed i...
[ { "content": "#!/usr/bin/env python\n\n'''\nsearx is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nsearx is distributed i...
diff --git a/searx/templates/__common__/opensearch.xml b/searx/templates/__common__/opensearch.xml index 7fdc1f7d87..244e101321 100644 --- a/searx/templates/__common__/opensearch.xml +++ b/searx/templates/__common__/opensearch.xml @@ -6,7 +6,7 @@ <Image>{{ urljoin(host, url_for('static', filename='img/favicon.png'))...
Chromium-based browsers (Android) don't detect searx
diff --git a/searx/webapp.py b/searx/webapp.py --- a/searx/webapp.py +++ b/searx/webapp.py @@ -463,6 +463,9 @@ request.errors = [] preferences = Preferences(themes, list(categories.keys()), engines, plugins) + user_agent = request.headers.get('User-Agent', '').lower() + if 'webkit' in user_agent and '...
{"golden_diff": "diff --git a/searx/webapp.py b/searx/webapp.py\n--- a/searx/webapp.py\n+++ b/searx/webapp.py\n@@ -463,6 +463,9 @@\n request.errors = []\n \n preferences = Preferences(themes, list(categories.keys()), engines, plugins)\n+ user_agent = request.headers.get('User-Agent', '').lower()\n+ if 'we...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Chromium-based browsers (Android) don't detect searx --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `searx...
sanic-org__sanic-2452
[ { "content": "from __future__ import annotations\n\nfrom typing import Dict, List, Optional, Tuple, Type, Union\n\nfrom sanic.config import Config\nfrom sanic.errorpages import (\n DEFAULT_FORMAT,\n BaseRenderer,\n TextRenderer,\n exception_response,\n)\nfrom sanic.exceptions import (\n ContentRa...
[ { "content": "from __future__ import annotations\n\nfrom typing import Dict, List, Optional, Tuple, Type, Union\n\nfrom sanic.config import Config\nfrom sanic.errorpages import (\n DEFAULT_FORMAT,\n BaseRenderer,\n TextRenderer,\n exception_response,\n)\nfrom sanic.exceptions import (\n ContentRa...
diff --git a/sanic/handlers.py b/sanic/handlers.py index b3f01566a5..917edd234a 100644 --- a/sanic/handlers.py +++ b/sanic/handlers.py @@ -78,7 +78,7 @@ def _warn_fallback_deprecation(): @classmethod def _get_fallback_value(cls, error_handler: ErrorHandler, config: Config): if error_handler._fallback...
Error Handler mismatch warning The warning for error handler mismatch is triggering on v22.3 accidentally when setting `FALLBACK_ERROR_FORMAT`. ```python app.config.FALLBACK_ERROR_FORMAT = "text" @app.get("/") async def handler(request: Request): 1 / 0 ``` This can be resolved as follows: ```pytho...
diff --git a/sanic/handlers.py b/sanic/handlers.py --- a/sanic/handlers.py +++ b/sanic/handlers.py @@ -78,7 +78,7 @@ @classmethod def _get_fallback_value(cls, error_handler: ErrorHandler, config: Config): if error_handler._fallback is not _default: - if config._FALLBACK_ERROR_FORMAT is _de...
{"golden_diff": "diff --git a/sanic/handlers.py b/sanic/handlers.py\n--- a/sanic/handlers.py\n+++ b/sanic/handlers.py\n@@ -78,7 +78,7 @@\n @classmethod\n def _get_fallback_value(cls, error_handler: ErrorHandler, config: Config):\n if error_handler._fallback is not _default:\n- if config._FALL...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Error Handler mismatch warning The warning for error handler mismatch is triggering on v22.3 accidentally when setting `FALLBACK_ERROR_FORMAT`. ```python app.config.FALLBACK_ERROR_FORMAT = "text" @ap...
microsoft__knossos-ksc-1027
[ { "content": "import torch\nimport ksc.torch_frontend as knossos\n\n# run-bench: Knossos source, and \"nice\" PyTorch implementation\n# BEGINDOC\n@knossos.register\ndef sqrl(x: torch.Tensor):\n \"\"\"\n sqrl: Squared Leaky Relu\n Like a capsule from /Stuck in a Rut/\n Typically x is a 4x4 tensor, po...
[ { "content": "import torch\nimport ksc.torch_frontend as knossos\n\n# run-bench: Knossos source, and \"nice\" PyTorch implementation\n# BEGINDOC\n@knossos.register\ndef sqrl(x: torch.Tensor):\n \"\"\"\n sqrl: Squared Leaky Relu\n Like a capsule from /Stuck in a Rut/\n Typically x is a 4x4 tensor, po...
diff --git a/examples/dl-capsule/sqrl.py b/examples/dl-capsule/sqrl.py index f4f94791e..2f022b265 100644 --- a/examples/dl-capsule/sqrl.py +++ b/examples/dl-capsule/sqrl.py @@ -23,12 +23,12 @@ def sqrl(x: torch.Tensor): # run-bench: PyTorch "fast" implementation def sqrl_pytorch(x: torch.Tensor): - return sqrl(x...
Bug: Segmentation fault in sqrl_pytorch-PyTorch CUDA Just saw this while working on something else. I haven't done a lot to debug it, but note that it's in copydown, on a fairly innocuous operation (aten::sum(Tensor 2) -> Float), so might be something to do with KS_ALLOCATOR not being defined? Or could just be out o...
diff --git a/examples/dl-capsule/sqrl.py b/examples/dl-capsule/sqrl.py --- a/examples/dl-capsule/sqrl.py +++ b/examples/dl-capsule/sqrl.py @@ -23,12 +23,12 @@ # run-bench: PyTorch "fast" implementation def sqrl_pytorch(x: torch.Tensor): - return sqrl(x) + return sqrl.raw_f(x) # run-bench: PyTorch "nice" ...
{"golden_diff": "diff --git a/examples/dl-capsule/sqrl.py b/examples/dl-capsule/sqrl.py\n--- a/examples/dl-capsule/sqrl.py\n+++ b/examples/dl-capsule/sqrl.py\n@@ -23,12 +23,12 @@\n \n # run-bench: PyTorch \"fast\" implementation\n def sqrl_pytorch(x: torch.Tensor):\n- return sqrl(x)\n+ return sqrl.raw_f(x)\n \n \...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bug: Segmentation fault in sqrl_pytorch-PyTorch CUDA Just saw this while working on something else. I haven't done a lot to debug it, but note that it's in copydown, on a fairly innocuous operation (aten::s...
learningequality__kolibri-7238
[ { "content": "import fnmatch\nimport logging\nimport os\n\nfrom django.core.cache import cache\nfrom sqlalchemy.exc import DatabaseError\n\nfrom .paths import get_content_database_dir_path\nfrom .sqlalchemybridge import Bridge\nfrom kolibri.core.discovery.utils.filesystem import enumerate_mounted_disk_partition...
[ { "content": "import fnmatch\nimport logging\nimport os\n\nfrom django.core.cache import cache\nfrom sqlalchemy.exc import DatabaseError\n\nfrom .paths import get_content_database_dir_path\nfrom .sqlalchemybridge import Bridge\nfrom kolibri.core.discovery.utils.filesystem import enumerate_mounted_disk_partition...
diff --git a/kolibri/core/assets/src/views/BottomAppBar.vue b/kolibri/core/assets/src/views/BottomAppBar.vue index 7c063606fbc..e285bcdd983 100644 --- a/kolibri/core/assets/src/views/BottomAppBar.vue +++ b/kolibri/core/assets/src/views/BottomAppBar.vue @@ -65,6 +65,8 @@ } .inner-bottom { + height: 100%; + ...
import footer styling regression ### Observed behavior ![image](https://user-images.githubusercontent.com/2367265/85073073-fef1cd80-b16e-11ea-98c5-8e2342430929.png) ### Expected behavior button and text should be vertically centered, or the footer should be shorter in height ### Steps to reproduce ...
diff --git a/kolibri/core/content/utils/channels.py b/kolibri/core/content/utils/channels.py --- a/kolibri/core/content/utils/channels.py +++ b/kolibri/core/content/utils/channels.py @@ -123,7 +123,7 @@ "id": channel.id, "name": channel.name, "description": channel.description, - ...
{"golden_diff": "diff --git a/kolibri/core/content/utils/channels.py b/kolibri/core/content/utils/channels.py\n--- a/kolibri/core/content/utils/channels.py\n+++ b/kolibri/core/content/utils/channels.py\n@@ -123,7 +123,7 @@\n \"id\": channel.id,\n \"name\": channel.name,\n \"descripti...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- import footer styling regression ### Observed behavior ![image](https://user-images.githubusercontent.com/2367265/85073073-fef1cd80-b16e-11ea-98c5-8e2342430929.png) ### Expected behavior button a...
cocotb__cocotb-2079
[ { "content": "#!/usr/bin/env python\n\n# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications 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 are met:\n...
[ { "content": "#!/usr/bin/env python\n\n# Copyright (c) 2013 Potential Ventures Ltd\n# Copyright (c) 2013 SolarFlare Communications 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 are met:\n...
diff --git a/cocotb/handle.py b/cocotb/handle.py index 0e1e08145c..5225e24206 100755 --- a/cocotb/handle.py +++ b/cocotb/handle.py @@ -249,6 +249,10 @@ def __get_sub_handle_by_name(self, name): except KeyError: pass + if not self._discovered: + self._discover_all() + ...
Hierarchy access for generate statement When we instantiate some block with generate statement. How to access that hierarchical module? example) When I want to access "SubBlock[3].u_SubModule.a". genvar i; generate for(i=0;i<5;i=i+1) begin : SubBlock SubModule u_SubModule( .a(...), .b(....
diff --git a/cocotb/handle.py b/cocotb/handle.py --- a/cocotb/handle.py +++ b/cocotb/handle.py @@ -249,6 +249,10 @@ except KeyError: pass + if not self._discovered: + self._discover_all() + return self.__get_sub_handle_by_name(name) + # Cache to avoid a call...
{"golden_diff": "diff --git a/cocotb/handle.py b/cocotb/handle.py\n--- a/cocotb/handle.py\n+++ b/cocotb/handle.py\n@@ -249,6 +249,10 @@\n except KeyError:\n pass\n \n+ if not self._discovered:\n+ self._discover_all()\n+ return self.__get_sub_handle_by_name(name)\n+\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Hierarchy access for generate statement When we instantiate some block with generate statement. How to access that hierarchical module? example) When I want to access "SubBlock[3].u_SubModule.a". genva...
hylang__hy-92
[ { "content": "# -*- encoding: utf-8 -*-\n#\n# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>\n# Copyright (c) 2013 Julien Danjou <julien@danjou.info>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Softwar...
[ { "content": "# -*- encoding: utf-8 -*-\n#\n# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>\n# Copyright (c) 2013 Julien Danjou <julien@danjou.info>\n#\n# Permission is hereby granted, free of charge, to any person obtaining a\n# copy of this software and associated documentation files (the \"Softwar...
diff --git a/hy/compiler.py b/hy/compiler.py index 76b266a30..38566166d 100644 --- a/hy/compiler.py +++ b/hy/compiler.py @@ -167,10 +167,10 @@ def compile_do_expression(self, expr): @builds("throw") @builds("raise") - @checkargs(min=1) + @checkargs(max=1) def compile_throw_expression(self, expr):...
Allow (raise) That's actually valid in Python to re-raise the last catched exception.
diff --git a/hy/compiler.py b/hy/compiler.py --- a/hy/compiler.py +++ b/hy/compiler.py @@ -167,10 +167,10 @@ @builds("throw") @builds("raise") - @checkargs(min=1) + @checkargs(max=1) def compile_throw_expression(self, expr): expr.pop(0) - exc = self.compile(expr.pop(0)) + e...
{"golden_diff": "diff --git a/hy/compiler.py b/hy/compiler.py\n--- a/hy/compiler.py\n+++ b/hy/compiler.py\n@@ -167,10 +167,10 @@\n \n @builds(\"throw\")\n @builds(\"raise\")\n- @checkargs(min=1)\n+ @checkargs(max=1)\n def compile_throw_expression(self, expr):\n expr.pop(0)\n- exc = self...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Allow (raise) That's actually valid in Python to re-raise the last catched exception. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs....
zulip__zulip-14678
[ { "content": "# System documented in https://zulip.readthedocs.io/en/latest/subsystems/logging.html\n\nfrom django.utils.timezone import now as timezone_now\nfrom django.utils.timezone import utc as timezone_utc\n\nimport hashlib\nimport logging\nimport threading\nimport traceback\nfrom typing import Optional, ...
[ { "content": "# System documented in https://zulip.readthedocs.io/en/latest/subsystems/logging.html\n\nfrom django.utils.timezone import now as timezone_now\nfrom django.utils.timezone import utc as timezone_utc\n\nimport hashlib\nimport logging\nimport threading\nimport traceback\nfrom typing import Optional, ...
diff --git a/zerver/lib/logging_util.py b/zerver/lib/logging_util.py index 6f5bf023873ac..43c9030ebb10a 100644 --- a/zerver/lib/logging_util.py +++ b/zerver/lib/logging_util.py @@ -119,7 +119,7 @@ def skip_200_and_304(record: logging.LogRecord) -> bool: # Apparently, `status_code` is added by Django and is not an ...
AttributeError: 'LogRecord' object has no attribute 'status_code' I have a development environment with the latest Git version. After performing many requests, I get blocked because of rate limiting. Then, the following error is logged in the console: ``` ---------------------------------------- Exception happened...
diff --git a/zerver/lib/logging_util.py b/zerver/lib/logging_util.py --- a/zerver/lib/logging_util.py +++ b/zerver/lib/logging_util.py @@ -119,7 +119,7 @@ # Apparently, `status_code` is added by Django and is not an actual # attribute of LogRecord; as a result, mypy throws an error if we # access the `st...
{"golden_diff": "diff --git a/zerver/lib/logging_util.py b/zerver/lib/logging_util.py\n--- a/zerver/lib/logging_util.py\n+++ b/zerver/lib/logging_util.py\n@@ -119,7 +119,7 @@\n # Apparently, `status_code` is added by Django and is not an actual\n # attribute of LogRecord; as a result, mypy throws an error if we...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- AttributeError: 'LogRecord' object has no attribute 'status_code' I have a development environment with the latest Git version. After performing many requests, I get blocked because of rate limiting. Then, th...
mkdocs__mkdocs-2800
[ { "content": "import jinja2\n\nfrom mkdocs.utils import normalize_url\n\n\n@jinja2.contextfilter\ndef url_filter(context, value):\n \"\"\" A Template filter to normalize URLs. \"\"\"\n return normalize_url(value, page=context['page'], base=context['base_url'])\n", "path": "mkdocs/utils/filters.py" }...
[ { "content": "try:\n from jinja2 import pass_context as contextfilter\nexcept ImportError:\n from jinja2 import contextfilter\n\nfrom mkdocs.utils import normalize_url\n\n\n@contextfilter\ndef url_filter(context, value):\n \"\"\" A Template filter to normalize URLs. \"\"\"\n return normalize_url(val...
diff --git a/mkdocs/utils/filters.py b/mkdocs/utils/filters.py index abf715f9ac..c3049db9aa 100644 --- a/mkdocs/utils/filters.py +++ b/mkdocs/utils/filters.py @@ -1,9 +1,12 @@ -import jinja2 +try: + from jinja2 import pass_context as contextfilter +except ImportError: + from jinja2 import contextfilter from mk...
jinja2 3.1.0 breaks mkdocs since the jinja2 3.1.0 release mkdocs does not work any more: ``` admin@host ui % pip install jinja2==3.1.0 Collecting jinja2==3.1.0 Using cached Jinja2-3.1.0-py3-none-any.whl (132 kB) Installing collected packages: jinja2 Attempting uninstall: jinja2 Found existing installat...
diff --git a/mkdocs/utils/filters.py b/mkdocs/utils/filters.py --- a/mkdocs/utils/filters.py +++ b/mkdocs/utils/filters.py @@ -1,9 +1,12 @@ -import jinja2 +try: + from jinja2 import pass_context as contextfilter +except ImportError: + from jinja2 import contextfilter from mkdocs.utils import normalize_url ...
{"golden_diff": "diff --git a/mkdocs/utils/filters.py b/mkdocs/utils/filters.py\n--- a/mkdocs/utils/filters.py\n+++ b/mkdocs/utils/filters.py\n@@ -1,9 +1,12 @@\n-import jinja2\n+try:\n+ from jinja2 import pass_context as contextfilter\n+except ImportError:\n+ from jinja2 import contextfilter\n \n from mkdocs.util...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- jinja2 3.1.0 breaks mkdocs since the jinja2 3.1.0 release mkdocs does not work any more: ``` admin@host ui % pip install jinja2==3.1.0 Collecting jinja2==3.1.0 Using cached Jinja2-3.1.0-py3-none-any.w...
cloud-custodian__cloud-custodian-4194
[ { "content": "# Copyright 2016-2017 Capital One Services, 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 requi...
[ { "content": "# Copyright 2016-2017 Capital One Services, 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 requi...
diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py index 095aa01b780..d51e87a6bc6 100644 --- a/c7n/resources/cw.py +++ b/c7n/resources/cw.py @@ -163,7 +163,11 @@ class resource_type(object): dimension = 'LogGroupName' date = 'creationTime' - augment = universal_augment + def augment(self, ...
Can't filter log-group using creationTime age I'm trying, but failing to filter log groups that were created more than 30 days ago using the following filter: ``` policies: - name: OldLogGroups resource: log-group filters: - type: value key: creationTime op: gt value_type: age value: 3...
diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py --- a/c7n/resources/cw.py +++ b/c7n/resources/cw.py @@ -163,7 +163,11 @@ dimension = 'LogGroupName' date = 'creationTime' - augment = universal_augment + def augment(self, resources): + resources = universal_augment(self, resources)...
{"golden_diff": "diff --git a/c7n/resources/cw.py b/c7n/resources/cw.py\n--- a/c7n/resources/cw.py\n+++ b/c7n/resources/cw.py\n@@ -163,7 +163,11 @@\n dimension = 'LogGroupName'\n date = 'creationTime'\n \n- augment = universal_augment\n+ def augment(self, resources):\n+ resources = universa...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Can't filter log-group using creationTime age I'm trying, but failing to filter log groups that were created more than 30 days ago using the following filter: ``` policies: - name: OldLogGroups resour...
gratipay__gratipay.com-302
[ { "content": "import datetime\nimport locale\nimport os\nfrom decimal import Decimal\n\n\ntry: # XXX This can't be right.\n locale.setlocale(locale.LC_ALL, \"en_US.utf8\")\nexcept locale.Error:\n locale.setlocale(locale.LC_ALL, \"en_US.UTF-8\")\n\n\nBIRTHDAY = datetime.date(2012, 6, 1)\nCARDINALS = ['zer...
[ { "content": "import datetime\nimport locale\nimport os\nfrom decimal import Decimal\n\n\ntry: # XXX This can't be right.\n locale.setlocale(locale.LC_ALL, \"en_US.utf8\")\nexcept locale.Error:\n locale.setlocale(locale.LC_ALL, \"en_US.UTF-8\")\n\n\nBIRTHDAY = datetime.date(2012, 6, 1)\nCARDINALS = ['zer...
diff --git a/gittip/__init__.py b/gittip/__init__.py index 856ffa0418..a176a4934c 100644 --- a/gittip/__init__.py +++ b/gittip/__init__.py @@ -215,6 +215,17 @@ def get_tips_and_total(tipper, for_payday=False, db=None): return tips, total +def get_histogram_of_giving(user): + SQL = """ + SELECT amount, co...
Show how many total fundees and the donation amount they're in for. As a reciever of money I'd like to know how diversified my $13/wk is so that I know how volatile my income is likely to be. How I see this working is a Histogram similar to: $1 [---] 1 $3 [] $6 [] $12 [---] 1 $24 [] which shows that I have 2 fu...
diff --git a/gittip/__init__.py b/gittip/__init__.py --- a/gittip/__init__.py +++ b/gittip/__init__.py @@ -215,6 +215,17 @@ return tips, total +def get_histogram_of_giving(user): + SQL = """ + SELECT amount, count(amount) num_contributing FROM tips t WHERE + tippee=%s GROUP BY (amount) + """ + r...
{"golden_diff": "diff --git a/gittip/__init__.py b/gittip/__init__.py\n--- a/gittip/__init__.py\n+++ b/gittip/__init__.py\n@@ -215,6 +215,17 @@\n return tips, total\n \n \n+def get_histogram_of_giving(user):\n+ SQL = \"\"\"\n+ SELECT amount, count(amount) num_contributing FROM tips t WHERE\n+ tippee=%s GRO...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Show how many total fundees and the donation amount they're in for. As a reciever of money I'd like to know how diversified my $13/wk is so that I know how volatile my income is likely to be. How I see this ...
chainer__chainer-3129
[ { "content": "import collections\nimport contextlib\nimport copy\nimport warnings\n\nimport numpy\nimport six\n\nfrom chainer import cuda\nfrom chainer import initializers\nfrom chainer import variable\n\n\ndef _is_shape(value):\n if value is None:\n return True\n elif isinstance(value, collections...
[ { "content": "import collections\nimport contextlib\nimport copy\nimport warnings\n\nimport numpy\nimport six\n\nfrom chainer import cuda\nfrom chainer import initializers\nfrom chainer import variable\n\n\ndef _is_shape(value):\n if value is None:\n return True\n elif isinstance(value, collections...
diff --git a/chainer/link.py b/chainer/link.py index 57b3803bb210..bd25006b1022 100644 --- a/chainer/link.py +++ b/chainer/link.py @@ -820,6 +820,13 @@ def __init__(self, *links): for link in links: self.add_link(link) + def __setattr__(self, name, value): + if self.within_init_scope a...
ChainList doesn't warn self.init_scope() The following code has a bug. Chainer doesn't warn the usage of `with self.init_scope()` in the subclass of ChainList. Could you add a warning message for such mistakes? * Code to reproduce ```python import chainer from chainer import Chain, ChainList import chainer.fun...
diff --git a/chainer/link.py b/chainer/link.py --- a/chainer/link.py +++ b/chainer/link.py @@ -820,6 +820,13 @@ for link in links: self.add_link(link) + def __setattr__(self, name, value): + if self.within_init_scope and isinstance(value, Link): + raise TypeError( + ...
{"golden_diff": "diff --git a/chainer/link.py b/chainer/link.py\n--- a/chainer/link.py\n+++ b/chainer/link.py\n@@ -820,6 +820,13 @@\n for link in links:\n self.add_link(link)\n \n+ def __setattr__(self, name, value):\n+ if self.within_init_scope and isinstance(value, Link):\n+ r...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ChainList doesn't warn self.init_scope() The following code has a bug. Chainer doesn't warn the usage of `with self.init_scope()` in the subclass of ChainList. Could you add a warning message for such mista...
fonttools__fonttools-1715
[ { "content": "from fontTools.misc.py23 import *\nfrom fontTools.misc import sstruct\nfrom fontTools.misc.textTools import safeEval\nfrom fontTools.misc.fixedTools import (\n\tensureVersionIsLong as fi2ve, versionToFixed as ve2fi)\nfrom . import DefaultTable\nimport math\n\n\nhheaFormat = \"\"\"\n\t\t> # big en...
[ { "content": "from fontTools.misc.py23 import *\nfrom fontTools.misc import sstruct\nfrom fontTools.misc.textTools import safeEval\nfrom fontTools.misc.fixedTools import (\n\tensureVersionIsLong as fi2ve, versionToFixed as ve2fi)\nfrom . import DefaultTable\nimport math\n\n\nhheaFormat = \"\"\"\n\t\t> # big en...
diff --git a/Lib/fontTools/ttLib/tables/_h_h_e_a.py b/Lib/fontTools/ttLib/tables/_h_h_e_a.py index 2520fb3b76..0f5ec51d9d 100644 --- a/Lib/fontTools/ttLib/tables/_h_h_e_a.py +++ b/Lib/fontTools/ttLib/tables/_h_h_e_a.py @@ -35,6 +35,19 @@ class table__h_h_e_a(DefaultTable.DefaultTable): dependencies = ['hmtx', 'glyf...
ascender and ascent The [opentype spec ](https://docs.microsoft.com/en-gb/typography/opentype/spec/hhea) calls the first two substantive entries in the `hhea` table "`ascender`" and "`descender`". fonttools calls them "`ascent`" and "`descent`". This was surprising! Maybe it's too late to change then but can we at l...
diff --git a/Lib/fontTools/ttLib/tables/_h_h_e_a.py b/Lib/fontTools/ttLib/tables/_h_h_e_a.py --- a/Lib/fontTools/ttLib/tables/_h_h_e_a.py +++ b/Lib/fontTools/ttLib/tables/_h_h_e_a.py @@ -35,6 +35,19 @@ dependencies = ['hmtx', 'glyf', 'CFF '] + # OpenType spec renamed these, add aliases for compatibility + @proper...
{"golden_diff": "diff --git a/Lib/fontTools/ttLib/tables/_h_h_e_a.py b/Lib/fontTools/ttLib/tables/_h_h_e_a.py\n--- a/Lib/fontTools/ttLib/tables/_h_h_e_a.py\n+++ b/Lib/fontTools/ttLib/tables/_h_h_e_a.py\n@@ -35,6 +35,19 @@\n \n \tdependencies = ['hmtx', 'glyf', 'CFF ']\n \n+\t# OpenType spec renamed these, add aliases f...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ascender and ascent The [opentype spec ](https://docs.microsoft.com/en-gb/typography/opentype/spec/hhea) calls the first two substantive entries in the `hhea` table "`ascender`" and "`descender`". fonttools c...
celery__celery-7553
[ { "content": "\"\"\"Functional-style utilities.\"\"\"\nimport inspect\nimport sys\nfrom collections import UserList\nfrom functools import partial\nfrom itertools import islice, tee, zip_longest\n\nfrom kombu.utils.functional import LRUCache, dictfilter, is_list, lazy, maybe_evaluate, maybe_list, memoize\nfrom ...
[ { "content": "\"\"\"Functional-style utilities.\"\"\"\nimport inspect\nimport sys\nfrom collections import UserList\nfrom functools import partial\nfrom itertools import islice, tee, zip_longest\n\nfrom kombu.utils.functional import LRUCache, dictfilter, is_list, lazy, maybe_evaluate, maybe_list, memoize\nfrom ...
diff --git a/celery/utils/functional.py b/celery/utils/functional.py index bcc15a3c788..9402a123658 100644 --- a/celery/utils/functional.py +++ b/celery/utils/functional.py @@ -311,7 +311,7 @@ def head_from_fun(fun, bound=False, debug=False): # with an empty body, meaning it has the same performance as # as j...
Use callable in utils.functional.head_from_fun After the discussion in #3952, we should investigate whether an improvement can be applied using the builtin `callable` instead of `hasattr(fun, '__call__')`. https://docs.python.org/2/library/functions.html#callable
diff --git a/celery/utils/functional.py b/celery/utils/functional.py --- a/celery/utils/functional.py +++ b/celery/utils/functional.py @@ -311,7 +311,7 @@ # with an empty body, meaning it has the same performance as # as just calling a function. is_function = inspect.isfunction(fun) - is_callable = ha...
{"golden_diff": "diff --git a/celery/utils/functional.py b/celery/utils/functional.py\n--- a/celery/utils/functional.py\n+++ b/celery/utils/functional.py\n@@ -311,7 +311,7 @@\n # with an empty body, meaning it has the same performance as\n # as just calling a function.\n is_function = inspect.isfunction(fun...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Use callable in utils.functional.head_from_fun After the discussion in #3952, we should investigate whether an improvement can be applied using the builtin `callable` instead of `hasattr(fun, '__call__')`. h...
translate__pootle-4270
[ { "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_app/management/commands/__init__.py b/pootle/apps/pootle_app/management/commands/__init__.py index 6ff99e222bb..eaba4eaf6e7 100644 --- a/pootle/apps/pootle_app/management/commands/__init__.py +++ b/pootle/apps/pootle_app/management/commands/__init__.py @@ -136,7 +136,7 @@ def handle_all(...
PootleCommand handles obsolete translation projects `update_stores` command can make obsolete TP directory many times. It doesn't affect us much except we get extra unnecessary log messages like this: ``` set(['get_last_updated', 'get_checks', 'get_mtime', 'get_suggestion_count', 'get_last_action', 'get_wordcount_sta...
diff --git a/pootle/apps/pootle_app/management/commands/__init__.py b/pootle/apps/pootle_app/management/commands/__init__.py --- a/pootle/apps/pootle_app/management/commands/__init__.py +++ b/pootle/apps/pootle_app/management/commands/__init__.py @@ -136,7 +136,7 @@ project_query = project_query.filter(cod...
{"golden_diff": "diff --git a/pootle/apps/pootle_app/management/commands/__init__.py b/pootle/apps/pootle_app/management/commands/__init__.py\n--- a/pootle/apps/pootle_app/management/commands/__init__.py\n+++ b/pootle/apps/pootle_app/management/commands/__init__.py\n@@ -136,7 +136,7 @@\n project_query = pro...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- PootleCommand handles obsolete translation projects `update_stores` command can make obsolete TP directory many times. It doesn't affect us much except we get extra unnecessary log messages like this: ``` s...
Pylons__pyramid-3076
[ { "content": "from zope.deprecation import deprecated\nfrom zope.interface import providedBy\n\nfrom pyramid.interfaces import (\n IAuthenticationPolicy,\n IAuthorizationPolicy,\n ISecuredView,\n IView,\n IViewClassifier,\n )\n\nfrom pyramid.compat import map_\nfrom pyramid.threadlocal import ...
[ { "content": "from zope.deprecation import deprecated\nfrom zope.interface import providedBy\n\nfrom pyramid.interfaces import (\n IAuthenticationPolicy,\n IAuthorizationPolicy,\n ISecuredView,\n IView,\n IViewClassifier,\n )\n\nfrom pyramid.compat import map_\nfrom pyramid.threadlocal import ...
diff --git a/pyramid/security.py b/pyramid/security.py index 82e6b73a91..035f09f775 100644 --- a/pyramid/security.py +++ b/pyramid/security.py @@ -21,10 +21,13 @@ class AllPermissionsList(object): """ Stand in 'permission list' to represent all permissions """ + def __iter__(self): - return () + ...
`AllPermissionsList.__iter__` returns tuple(). Should return iter(tuple())? My understanding is that __iter__ should [return an iterator object](https://docs.python.org/3.5/library/stdtypes.html#container.__iter__). However, [`AllPermissionsList.__iter__`](https://github.com/Pylons/pyramid/blob/master/pyramid/securi...
diff --git a/pyramid/security.py b/pyramid/security.py --- a/pyramid/security.py +++ b/pyramid/security.py @@ -21,10 +21,13 @@ class AllPermissionsList(object): """ Stand in 'permission list' to represent all permissions """ + def __iter__(self): - return () + return iter(()) + def __con...
{"golden_diff": "diff --git a/pyramid/security.py b/pyramid/security.py\n--- a/pyramid/security.py\n+++ b/pyramid/security.py\n@@ -21,10 +21,13 @@\n \n class AllPermissionsList(object):\n \"\"\" Stand in 'permission list' to represent all permissions \"\"\"\n+\n def __iter__(self):\n- return ()\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `AllPermissionsList.__iter__` returns tuple(). Should return iter(tuple())? My understanding is that __iter__ should [return an iterator object](https://docs.python.org/3.5/library/stdtypes.html#container.__i...
conan-io__conan-center-index-789
[ { "content": "from conans import ConanFile, CMake, tools\nfrom conans.errors import ConanInvalidConfiguration\nimport os\n\n\nclass BackwardCppConan(ConanFile):\n name = \"backward-cpp\"\n description = \"A beautiful stack trace pretty printer for C++\"\n homepage = \"https://github.com/bombela/backwar...
[ { "content": "from conans import ConanFile, CMake, tools\nfrom conans.errors import ConanInvalidConfiguration\nimport os\n\n\nclass BackwardCppConan(ConanFile):\n name = \"backward-cpp\"\n description = \"A beautiful stack trace pretty printer for C++\"\n homepage = \"https://github.com/bombela/backwar...
diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py index 4fddde8f6a781..d96d1bc4063bc 100644 --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -111,7 +111,6 @@ def package(self): os.remove(os.path.join(self.package_folder, "lib", ...
[question] Consistency in package and generator names After the discussion in https://github.com/conan-io/conan/issues/6269#issuecomment-570182130, most packages got normalized to use the format discussed in this comment (https://github.com/conan-io/conan-center-index/pull/690 and related). If I understand the inten...
diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py --- a/recipes/backward-cpp/all/conanfile.py +++ b/recipes/backward-cpp/all/conanfile.py @@ -111,7 +111,6 @@ os.remove(os.path.join(self.package_folder, "lib", "backward", "BackwardConfig.cmake")) def package_info(...
{"golden_diff": "diff --git a/recipes/backward-cpp/all/conanfile.py b/recipes/backward-cpp/all/conanfile.py\n--- a/recipes/backward-cpp/all/conanfile.py\n+++ b/recipes/backward-cpp/all/conanfile.py\n@@ -111,7 +111,6 @@\n os.remove(os.path.join(self.package_folder, \"lib\", \"backward\", \"BackwardConfig.cmake\"...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [question] Consistency in package and generator names After the discussion in https://github.com/conan-io/conan/issues/6269#issuecomment-570182130, most packages got normalized to use the format discussed in ...
openstates__openstates-scrapers-2041
[ { "content": "import os\nimport datetime\n\nfrom pupa.scrape import Scraper, Bill, VoteEvent\nfrom pupa.scrape.base import ScrapeError\n\nimport xlrd\nimport scrapelib\nimport lxml.html\nimport pytz\n\n\nclass OHBillScraper(Scraper):\n _tz = pytz.timezone('US/Eastern')\n\n def scrape(self, session=None, c...
[ { "content": "import os\nimport datetime\n\nfrom pupa.scrape import Scraper, Bill, VoteEvent\nfrom pupa.scrape.base import ScrapeError\n\nimport xlrd\nimport scrapelib\nimport lxml.html\nimport pytz\n\n\nclass OHBillScraper(Scraper):\n _tz = pytz.timezone('US/Eastern')\n\n def scrape(self, session=None, c...
diff --git a/openstates/oh/bills.py b/openstates/oh/bills.py index e99c7a31b1..723725af5a 100644 --- a/openstates/oh/bills.py +++ b/openstates/oh/bills.py @@ -333,8 +333,8 @@ def get_legislator_ids(self, base_url): doc = self.get(url.format(chamber=chamber)) leg_json = doc.json() ...
OH failing since at least 2017-12-23 OH has been failing since 2017-12-23 Based on automated runs it appears that OH has not run successfully in 2 days (2017-12-23). ``` 23:01:27 INFO pupa: save post 85 as post_7fa5619a-e867-11e7-97ee-0242ac110002.json 23:01:27 INFO pupa: save post 86 as post_7fa562c6-e867-11e7-97...
diff --git a/openstates/oh/bills.py b/openstates/oh/bills.py --- a/openstates/oh/bills.py +++ b/openstates/oh/bills.py @@ -333,8 +333,8 @@ doc = self.get(url.format(chamber=chamber)) leg_json = doc.json() for leg in leg_json["items"]: - legislators[leg["med_id"]] = ...
{"golden_diff": "diff --git a/openstates/oh/bills.py b/openstates/oh/bills.py\n--- a/openstates/oh/bills.py\n+++ b/openstates/oh/bills.py\n@@ -333,8 +333,8 @@\n doc = self.get(url.format(chamber=chamber))\n leg_json = doc.json()\n for leg in leg_json[\"items\"]:\n- leg...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- OH failing since at least 2017-12-23 OH has been failing since 2017-12-23 Based on automated runs it appears that OH has not run successfully in 2 days (2017-12-23). ``` 23:01:27 INFO pupa: save post 85 ...
aio-libs__aiohttp-1431
[ { "content": "import asyncio\nimport base64\nimport binascii\nimport io\nimport json\nimport mimetypes\nimport os\nimport re\nimport sys\nimport uuid\nimport warnings\nimport zlib\nfrom collections import Mapping, Sequence, deque\nfrom pathlib import Path\nfrom urllib.parse import parse_qsl, quote, unquote, url...
[ { "content": "import asyncio\nimport base64\nimport binascii\nimport io\nimport json\nimport mimetypes\nimport os\nimport re\nimport sys\nimport uuid\nimport warnings\nimport zlib\nfrom collections import Mapping, Sequence, deque\nfrom pathlib import Path\nfrom urllib.parse import parse_qsl, quote, unquote, url...
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index a26b3e5ad9b..ea2d92b41ee 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -39,6 +39,7 @@ If you like to use *virtualenv* please run: $ cd aiohttp $ virtualenv --python=`which python3` venv + $ . venv/bin/activate For standard python *venv*: ...
Method "read_chunk" of "BodyPartReader" returns zero bytes before eof ## Long story short I've implemented a multipart file upload handler inspired on code from the [docs](http://aiohttp.readthedocs.io/en/stable/web.html#file-uploads). My code is truncating part's data. I believe the problem is in the method `_read_...
diff --git a/aiohttp/multipart.py b/aiohttp/multipart.py --- a/aiohttp/multipart.py +++ b/aiohttp/multipart.py @@ -332,10 +332,6 @@ chunk = window[len(self._prev_chunk):idx] if not chunk: self._at_eof = True - if 0 < len(chunk) < len(sub) and not self._content_eof: - ...
{"golden_diff": "diff --git a/aiohttp/multipart.py b/aiohttp/multipart.py\n--- a/aiohttp/multipart.py\n+++ b/aiohttp/multipart.py\n@@ -332,10 +332,6 @@\n chunk = window[len(self._prev_chunk):idx]\n if not chunk:\n self._at_eof = True\n- if 0 < len(chunk) < len(sub) and not...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Method "read_chunk" of "BodyPartReader" returns zero bytes before eof ## Long story short I've implemented a multipart file upload handler inspired on code from the [docs](http://aiohttp.readthedocs.io/en/...
cookiecutter__cookiecutter-608
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.generate\n---------------------\n\nFunctions for generating a project from a project template.\n\"\"\"\nfrom __future__ import unicode_literals\nfrom collections import OrderedDict\nimport fnmatch\nimport io\nimport json\nimpor...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n\"\"\"\ncookiecutter.generate\n---------------------\n\nFunctions for generating a project from a project template.\n\"\"\"\nfrom __future__ import unicode_literals\nfrom collections import OrderedDict\nimport fnmatch\nimport io\nimport json\nimpor...
diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py index 7a4d4619c..aa9873434 100755 --- a/cookiecutter/generate.py +++ b/cookiecutter/generate.py @@ -87,9 +87,9 @@ def generate_context(context_file='cookiecutter.json', default_context=None, context = {} - file_handle = open(context_file) ...
file_handle.close() is never called -- and it causes a bug!! In https://github.com/audreyr/cookiecutter/blob/master/cookiecutter/generate.py#L90, `file_handle.close()` is never called, and there's no need for it to remain open. This is the first time in over 10 years of python programming that I've run into an actual ...
diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py --- a/cookiecutter/generate.py +++ b/cookiecutter/generate.py @@ -87,9 +87,9 @@ context = {} - file_handle = open(context_file) try: - obj = json.load(file_handle, object_pairs_hook=OrderedDict) + with open(context_file) as ...
{"golden_diff": "diff --git a/cookiecutter/generate.py b/cookiecutter/generate.py\n--- a/cookiecutter/generate.py\n+++ b/cookiecutter/generate.py\n@@ -87,9 +87,9 @@\n \n context = {}\n \n- file_handle = open(context_file)\n try:\n- obj = json.load(file_handle, object_pairs_hook=OrderedDict)\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- file_handle.close() is never called -- and it causes a bug!! In https://github.com/audreyr/cookiecutter/blob/master/cookiecutter/generate.py#L90, `file_handle.close()` is never called, and there's no need for...
openai__gym-1730
[ { "content": "import numpy as np\n\nfrom .space import Space\n\n\nclass Box(Space):\n \"\"\"\n A (possibly unbounded) box in R^n. Specifically, a Box represents the\n Cartesian product of n closed intervals. Each interval has the form of one\n of [a, b], (-oo, b], [a, oo), or (-oo, oo).\n \n T...
[ { "content": "import numpy as np\n\nfrom .space import Space\n\n\nclass Box(Space):\n \"\"\"\n A (possibly unbounded) box in R^n. Specifically, a Box represents the\n Cartesian product of n closed intervals. Each interval has the form of one\n of [a, b], (-oo, b], [a, oo), or (-oo, oo).\n \n T...
diff --git a/gym/spaces/box.py b/gym/spaces/box.py index e137b807c1e..5b3edf15b15 100644 --- a/gym/spaces/box.py +++ b/gym/spaces/box.py @@ -93,6 +93,8 @@ def sample(self): sample[bounded] = self.np_random.uniform(low=self.low[bounded], high=high[bounded], ...
Sampling Bug Gym Version: 0.15.3 issue: Box samples numbers above the `high` parameter. ``` from gym.spaces import Box observation_space = Box(low=-3, high=-1, shape=(9,), dtype='int') print(observation_space.sample()) >> [ 0 -2 0 -2 0 -1 0 -2 0] ``` The current implementation samples float numbers from u...
diff --git a/gym/spaces/box.py b/gym/spaces/box.py --- a/gym/spaces/box.py +++ b/gym/spaces/box.py @@ -93,6 +93,8 @@ sample[bounded] = self.np_random.uniform(low=self.low[bounded], high=high[bounded], size=bounded[bounde...
{"golden_diff": "diff --git a/gym/spaces/box.py b/gym/spaces/box.py\n--- a/gym/spaces/box.py\n+++ b/gym/spaces/box.py\n@@ -93,6 +93,8 @@\n sample[bounded] = self.np_random.uniform(low=self.low[bounded], \n high=high[bounded],\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Sampling Bug Gym Version: 0.15.3 issue: Box samples numbers above the `high` parameter. ``` from gym.spaces import Box observation_space = Box(low=-3, high=-1, shape=(9,), dtype='int') print(observatio...
urllib3__urllib3-1304
[ { "content": "from __future__ import absolute_import\nimport datetime\nimport logging\nimport os\nimport sys\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnectio...
[ { "content": "from __future__ import absolute_import\nimport datetime\nimport logging\nimport os\nimport sys\nimport socket\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport warnings\nfrom .packages import six\nfrom .packages.six.moves.http_client import HTTPConnection as _HTTPConnectio...
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 4ef1684b97..22b4c04a48 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -246,5 +246,8 @@ In chronological order: * Akamai (through Jesse Shapiro) <jshapiro@akamai.com> * Ongoing maintenance +* Dominique Leuenberger <dimstar@opensuse.org> + * Minor fix...
RECENT_DATE needs to be bumped Test suite started failing, as RECENT_DATE is not recent enough: ``` [ 62s] def test_recent_date(self): [ 62s] # This test is to make sure that the RECENT_DATE value [ 62s] # doesn't get too far behind what the current date is. [ 62s] # When this...
diff --git a/urllib3/connection.py b/urllib3/connection.py --- a/urllib3/connection.py +++ b/urllib3/connection.py @@ -56,10 +56,11 @@ 'https': 443, } -# When updating RECENT_DATE, move it to -# within two years of the current date, and no -# earlier than 6 months ago. -RECENT_DATE = datetime.date(2016, 1, 1) +...
{"golden_diff": "diff --git a/urllib3/connection.py b/urllib3/connection.py\n--- a/urllib3/connection.py\n+++ b/urllib3/connection.py\n@@ -56,10 +56,11 @@\n 'https': 443,\n }\n \n-# When updating RECENT_DATE, move it to\n-# within two years of the current date, and no\n-# earlier than 6 months ago.\n-RECENT_DATE = ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- RECENT_DATE needs to be bumped Test suite started failing, as RECENT_DATE is not recent enough: ``` [ 62s] def test_recent_date(self): [ 62s] # This test is to make sure that the RECENT_D...
conan-io__conan-3284
[ { "content": "import os\nimport shutil\nfrom six.moves.urllib.parse import urlparse\n\nfrom conans.tools import unzip\nfrom conans.util.files import rmdir, mkdir\nfrom conans.client.remote_registry import RemoteRegistry\nfrom conans import tools\nfrom conans.errors import ConanException\nimport subprocess\n\n\n...
[ { "content": "import os\nimport shutil\nfrom six.moves.urllib.parse import urlparse\n\nfrom conans.tools import unzip\nfrom conans.util.files import rmdir, mkdir\nfrom conans.client.remote_registry import RemoteRegistry\nfrom conans import tools\nfrom conans.errors import ConanException\nimport subprocess\n\n\n...
diff --git a/conans/client/conf/config_installer.py b/conans/client/conf/config_installer.py index 73af07c8789..04aa640e820 100644 --- a/conans/client/conf/config_installer.py +++ b/conans/client/conf/config_installer.py @@ -44,7 +44,7 @@ def _process_git_repo(repo_url, client_cache, output, tmp_folder, verify_ssl): ...
Consider turning off template directories in Git for conan config install To help us debug your issue please explain: - [x] I've read the [CONTRIBUTING guide](https://raw.githubusercontent.com/conan-io/conan/develop/.github/CONTRIBUTING.md). - [x] I've specified the Conan version, operating system version and any t...
diff --git a/conans/client/conf/config_installer.py b/conans/client/conf/config_installer.py --- a/conans/client/conf/config_installer.py +++ b/conans/client/conf/config_installer.py @@ -44,7 +44,7 @@ with tools.chdir(tmp_folder): try: - subprocess.check_output('git -c http.sslVerify=%s clone...
{"golden_diff": "diff --git a/conans/client/conf/config_installer.py b/conans/client/conf/config_installer.py\n--- a/conans/client/conf/config_installer.py\n+++ b/conans/client/conf/config_installer.py\n@@ -44,7 +44,7 @@\n \n with tools.chdir(tmp_folder):\n try:\n- subprocess.check_output('git -c...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Consider turning off template directories in Git for conan config install To help us debug your issue please explain: - [x] I've read the [CONTRIBUTING guide](https://raw.githubusercontent.com/conan-io/con...
googleapis__google-cloud-python-1481
[ { "content": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless...
[ { "content": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless...
diff --git a/gcloud/pubsub/message.py b/gcloud/pubsub/message.py index e8db230aa7b6..832a5d554c44 100644 --- a/gcloud/pubsub/message.py +++ b/gcloud/pubsub/message.py @@ -71,6 +71,6 @@ def from_api_repr(cls, api_repr): :type api_repr: dict or None :param api_repr: The API representation of the message...
pubsub fails if data key is not present If a message is published with a string of 0 length (`topic.publish( '', url=url, title=title)`) when the message is received there is no data field in the message and a key error is thrown when trying to transform the message from the PubSub API representation. https://github.c...
diff --git a/gcloud/pubsub/message.py b/gcloud/pubsub/message.py --- a/gcloud/pubsub/message.py +++ b/gcloud/pubsub/message.py @@ -71,6 +71,6 @@ :type api_repr: dict or None :param api_repr: The API representation of the message """ - data = base64.b64decode(api_repr['data']) + ...
{"golden_diff": "diff --git a/gcloud/pubsub/message.py b/gcloud/pubsub/message.py\n--- a/gcloud/pubsub/message.py\n+++ b/gcloud/pubsub/message.py\n@@ -71,6 +71,6 @@\n :type api_repr: dict or None\n :param api_repr: The API representation of the message\n \"\"\"\n- data = base64.b64decode(...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- pubsub fails if data key is not present If a message is published with a string of 0 length (`topic.publish( '', url=url, title=title)`) when the message is received there is no data field in the message and ...
open-telemetry__opentelemetry-python-2093
[ { "content": "# Copyright The OpenTelemetry 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#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry 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#\n# Unless required by...
diff --git a/CHANGELOG.md b/CHANGELOG.md index 241c8252d5d..4e07232d068 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#2096](https://github.com/open-telemetry/opentelemetry-python/pull/2096)) - Fix propagation bug ca...
RuntimeError: Requested component 'jaeger' not found in entry points for 'opentelemetry_exporter' From the exporters selection of [spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/sdk-environment-variables.md#exporter-selection) >Known values for OTEL_TRACES_EXPORTER are: ...
diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py --- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py @@ -109,7 +109,7 @@ ...
{"golden_diff": "diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py\n--- a/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py\n+++ b/opentelemetry-sdk/src/opentelemetry/sdk/_configuration/__init__.py\n@@ -1...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- RuntimeError: Requested component 'jaeger' not found in entry points for 'opentelemetry_exporter' From the exporters selection of [spec](https://github.com/open-telemetry/opentelemetry-specification/blob/main...
open-telemetry__opentelemetry-python-636
[ { "content": "# Copyright The OpenTelemetry 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#\n# Unless required by...
[ { "content": "# Copyright The OpenTelemetry 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#\n# Unless required by...
diff --git a/ext/opentelemetry-ext-flask/tests/base_test.py b/ext/opentelemetry-ext-flask/tests/base_test.py index 7147afd7193..42341826df0 100644 --- a/ext/opentelemetry-ext-flask/tests/base_test.py +++ b/ext/opentelemetry-ext-flask/tests/base_test.py @@ -19,6 +19,7 @@ from werkzeug.wrappers import BaseResponse fr...
Add a standard way to "reset" a Configuration object for testing It is a common occurrence in tests that the global `Configuration` object needs to be "reset" between tests. This means that its attributes need to be set back to their original values. Since the `Configuration` object is immutable by design, some additio...
diff --git a/opentelemetry-api/src/opentelemetry/configuration/__init__.py b/opentelemetry-api/src/opentelemetry/configuration/__init__.py --- a/opentelemetry-api/src/opentelemetry/configuration/__init__.py +++ b/opentelemetry-api/src/opentelemetry/configuration/__init__.py @@ -122,3 +122,20 @@ def __getattr__(s...
{"golden_diff": "diff --git a/opentelemetry-api/src/opentelemetry/configuration/__init__.py b/opentelemetry-api/src/opentelemetry/configuration/__init__.py\n--- a/opentelemetry-api/src/opentelemetry/configuration/__init__.py\n+++ b/opentelemetry-api/src/opentelemetry/configuration/__init__.py\n@@ -122,3 +122,20 @@\n \n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add a standard way to "reset" a Configuration object for testing It is a common occurrence in tests that the global `Configuration` object needs to be "reset" between tests. This means that its attributes nee...
adamchainz__django-mysql-486
[ { "content": "# -*- coding:utf-8 -*-\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals,\n)\n\nfrom django.core.checks import Tags, Warning, register\nfrom django.db import DEFAULT_DB_ALIAS, connections\n\nfrom django_mysql.utils import collapse_spaces\n\n\ndef register_c...
[ { "content": "# -*- coding:utf-8 -*-\nfrom __future__ import (\n absolute_import, division, print_function, unicode_literals,\n)\n\nfrom django.core.checks import Tags, Warning, register\nfrom django.db import DEFAULT_DB_ALIAS, connections\n\nfrom django_mysql.utils import collapse_spaces\n\n\ndef register_c...
diff --git a/django_mysql/checks.py b/django_mysql/checks.py index 9ac65235..b483b650 100644 --- a/django_mysql/checks.py +++ b/django_mysql/checks.py @@ -17,7 +17,7 @@ def check_variables(app_configs, **kwargs): errors = [] for alias, connection in mysql_connections(): - with connection.cursor() as ...
dangling connection created during system check may become unusable *Summary*: mysql connection created during system check is not closed timely. This connection might (mysteriously) become unusable afterwards (for reason I could not fully understand for now), which blocks the database access in application logic. *...
diff --git a/django_mysql/checks.py b/django_mysql/checks.py --- a/django_mysql/checks.py +++ b/django_mysql/checks.py @@ -17,7 +17,7 @@ errors = [] for alias, connection in mysql_connections(): - with connection.cursor() as cursor: + with connection.temporary_connection() as cursor: ...
{"golden_diff": "diff --git a/django_mysql/checks.py b/django_mysql/checks.py\n--- a/django_mysql/checks.py\n+++ b/django_mysql/checks.py\n@@ -17,7 +17,7 @@\n errors = []\n \n for alias, connection in mysql_connections():\n- with connection.cursor() as cursor:\n+ with connection.temporary_connecti...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- dangling connection created during system check may become unusable *Summary*: mysql connection created during system check is not closed timely. This connection might (mysteriously) become unusable afterward...
napari__napari-1371
[ { "content": "try:\n from ._version import version as __version__\nexcept ImportError:\n __version__ = \"not-installed\"\n\nimport os\nfrom distutils.version import StrictVersion\nfrom pathlib import Path\n\ntry:\n from qtpy import API_NAME\nexcept Exception as e:\n if 'No Qt bindings could be found...
[ { "content": "try:\n from ._version import version as __version__\nexcept ImportError:\n __version__ = \"not-installed\"\n\nimport os\nfrom distutils.version import StrictVersion\nfrom pathlib import Path\n\ntry:\n from qtpy import API_NAME\nexcept Exception as e:\n if 'No Qt bindings could be found...
diff --git a/docs/release/release_0_3_5.md b/docs/release/release_0_3_5.md index 49135c5a43f..de028686f79 100644 --- a/docs/release/release_0_3_5.md +++ b/docs/release/release_0_3_5.md @@ -28,13 +28,13 @@ including plans for the future. ## Improvements - Factor out ImageSlice and ImageView from Image (#1343) - ## ...
Napari 0.3.4 release crashes when switching to volume rendering ## 🐛 Bug Napari 0.3.4 (release version) crashes when trying to render volume in 3D. ## To Reproduce Steps to reproduce the behavior: 1. Load a volume 2. Display and navigate through slices in 2D 3. Switch to 3D -> Crash ![napari_vol_c...
diff --git a/napari/__init__.py b/napari/__init__.py --- a/napari/__init__.py +++ b/napari/__init__.py @@ -75,5 +75,14 @@ # register napari object types with magicgui if it is installed _magicgui.register_types_with_magicgui() + +# this unused import is here to fix a very strange bug. +# there is some mysterious ma...
{"golden_diff": "diff --git a/napari/__init__.py b/napari/__init__.py\n--- a/napari/__init__.py\n+++ b/napari/__init__.py\n@@ -75,5 +75,14 @@\n # register napari object types with magicgui if it is installed\n _magicgui.register_types_with_magicgui()\n \n+\n+# this unused import is here to fix a very strange bug.\n+# t...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Napari 0.3.4 release crashes when switching to volume rendering ## 🐛 Bug Napari 0.3.4 (release version) crashes when trying to render volume in 3D. ## To Reproduce Steps to reproduce the behavior:...
ytdl-org__youtube-dl-18343
[ { "content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n int_or_none,\n float_or_none,\n qualities,\n ExtractorError,\n)\n\n\nclass GfycatIE(InfoExtractor):\n _VALID_URL = r'https?://(?:www\\.)?gfycat\\.com/(?:ifr/|gifs/d...
[ { "content": "# coding: utf-8\nfrom __future__ import unicode_literals\n\nfrom .common import InfoExtractor\nfrom ..utils import (\n int_or_none,\n float_or_none,\n qualities,\n ExtractorError,\n)\n\n\nclass GfycatIE(InfoExtractor):\n _VALID_URL = r'https?://(?:www\\.)?gfycat\\.com/(?:ifr/|gifs/d...
diff --git a/youtube_dl/extractor/gfycat.py b/youtube_dl/extractor/gfycat.py index a0670b6456a..c1b36a59b51 100644 --- a/youtube_dl/extractor/gfycat.py +++ b/youtube_dl/extractor/gfycat.py @@ -53,7 +53,7 @@ def _real_extract(self, url): video_id = self._match_id(url) gfy = self._download_json( - ...
Gfycat cajax json endpoint is gone ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.11.23*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be...
diff --git a/youtube_dl/extractor/gfycat.py b/youtube_dl/extractor/gfycat.py --- a/youtube_dl/extractor/gfycat.py +++ b/youtube_dl/extractor/gfycat.py @@ -53,7 +53,7 @@ video_id = self._match_id(url) gfy = self._download_json( - 'http://gfycat.com/cajax/get/%s' % video_id, + 'h...
{"golden_diff": "diff --git a/youtube_dl/extractor/gfycat.py b/youtube_dl/extractor/gfycat.py\n--- a/youtube_dl/extractor/gfycat.py\n+++ b/youtube_dl/extractor/gfycat.py\n@@ -53,7 +53,7 @@\n video_id = self._match_id(url)\n \n gfy = self._download_json(\n- 'http://gfycat.com/cajax/get/%s' % v...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Gfycat cajax json endpoint is gone ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.11.23*. If it's not, read [this FAQ entry](https://github.com/r...
watchdogpolska__feder-349
[ { "content": "from atom.views import (ActionMessageMixin, ActionView, CreateMessageMixin,\n DeleteMessageMixin, UpdateMessageMixin)\nfrom braces.views import (FormValidMessageMixin, PrefetchRelatedMixin,\n SelectRelatedMixin, UserFormKwargsMixin)\nfrom cached_prop...
[ { "content": "from atom.views import (ActionMessageMixin, ActionView, CreateMessageMixin,\n DeleteMessageMixin, UpdateMessageMixin)\nfrom braces.views import (FormValidMessageMixin, PrefetchRelatedMixin,\n SelectRelatedMixin, UserFormKwargsMixin)\nfrom cached_prop...
diff --git a/feder/tasks/locale/pl/LC_MESSAGES/django.mo b/feder/tasks/locale/pl/LC_MESSAGES/django.mo index 6ca3639b9..d24182059 100644 Binary files a/feder/tasks/locale/pl/LC_MESSAGES/django.mo and b/feder/tasks/locale/pl/LC_MESSAGES/django.mo differ diff --git a/feder/tasks/locale/pl/LC_MESSAGES/django.po b/feder/ta...
Przyjazny komunikat o aktualizacji wiarygodności ![zaznaczenie_1027](https://user-images.githubusercontent.com/3618479/30726463-49ccc99c-9f4b-11e7-8b74-db3108ac4e45.png)
diff --git a/feder/tasks/views.py b/feder/tasks/views.py --- a/feder/tasks/views.py +++ b/feder/tasks/views.py @@ -142,7 +142,10 @@ self.object.save() def get_success_message(self): - return _("Survey {object} selected!").format(object=self.object) + if self.direction == 'up': + ...
{"golden_diff": "diff --git a/feder/tasks/views.py b/feder/tasks/views.py\n--- a/feder/tasks/views.py\n+++ b/feder/tasks/views.py\n@@ -142,7 +142,10 @@\n self.object.save()\n \n def get_success_message(self):\n- return _(\"Survey {object} selected!\").format(object=self.object)\n+ if self.dire...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Przyjazny komunikat o aktualizacji wiarygodności ![zaznaczenie_1027](https://user-images.githubusercontent.com/3618479/30726463-49ccc99c-9f4b-11e7-8b74-db3108ac4e45.png) --- END ISSUE --- Below are some c...
pytorch__vision-810
[ { "content": "from __future__ import division\nimport torch\nimport sys\nimport math\nfrom PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION\ntry:\n import accimage\nexcept ImportError:\n accimage = None\nimport numpy as np\nimport numbers\nimport collections\nimport warnings\n\nif sys.version_info...
[ { "content": "from __future__ import division\nimport torch\nimport sys\nimport math\nfrom PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION\ntry:\n import accimage\nexcept ImportError:\n accimage = None\nimport numpy as np\nimport numbers\nimport collections\nimport warnings\n\nif sys.version_info...
diff --git a/torchvision/transforms/functional.py b/torchvision/transforms/functional.py index 71c0ff87bf5..14e3d794283 100644 --- a/torchvision/transforms/functional.py +++ b/torchvision/transforms/functional.py @@ -203,8 +203,8 @@ def normalize(tensor, mean, std, inplace=False): if not inplace: tensor =...
`UserWarning` when applying `Normalize` Hi! pytorch's version: 1.0.1.post2 torchvision's version: 0.2.2.post3 Sorry for the formatting, but you need to scroll the snippet to the right in order to see the warning. ```python >>> from torch import tensor >>> from torchvision.transforms import Normalize >>> n = ...
diff --git a/torchvision/transforms/functional.py b/torchvision/transforms/functional.py --- a/torchvision/transforms/functional.py +++ b/torchvision/transforms/functional.py @@ -203,8 +203,8 @@ if not inplace: tensor = tensor.clone() - mean = torch.tensor(mean, dtype=torch.float32, device=tensor.dev...
{"golden_diff": "diff --git a/torchvision/transforms/functional.py b/torchvision/transforms/functional.py\n--- a/torchvision/transforms/functional.py\n+++ b/torchvision/transforms/functional.py\n@@ -203,8 +203,8 @@\n if not inplace:\n tensor = tensor.clone()\n \n- mean = torch.tensor(mean, dtype=torch.fl...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `UserWarning` when applying `Normalize` Hi! pytorch's version: 1.0.1.post2 torchvision's version: 0.2.2.post3 Sorry for the formatting, but you need to scroll the snippet to the right in order to see the...
cowrie__cowrie-1761
[ { "content": "# Copyright (c) 2013 Bas Stottelaar <basstottelaar [AT] gmail [DOT] com>\n\nfrom __future__ import annotations\n\nimport getopt\nimport os\nimport random\nimport re\nimport time\n\nfrom twisted.internet import reactor # type: ignore\nfrom twisted.internet.defer import Deferred\n\nfrom cowrie.core...
[ { "content": "# Copyright (c) 2013 Bas Stottelaar <basstottelaar [AT] gmail [DOT] com>\n\nfrom __future__ import annotations\n\nimport getopt\nimport os\nimport random\nimport re\nimport time\n\nfrom twisted.internet import reactor # type: ignore\nfrom twisted.internet.defer import Deferred\n\nfrom cowrie.core...
diff --git a/src/cowrie/commands/gcc.py b/src/cowrie/commands/gcc.py index 2e62fcb0ce..45e9db9e99 100644 --- a/src/cowrie/commands/gcc.py +++ b/src/cowrie/commands/gcc.py @@ -133,7 +133,7 @@ def start(self): # Schedule call to make it more time consuming and real self.scheduled = reactor.cal...
Gcc "compile" file quits cowrie **Describe the bug** By running gcc to "compile" a file just quits cowrie **To Reproduce** Steps to reproduce the behavior: 1. Login on the honeypot 2. Compile the file with `gcc file.c` 4. See error and cowrie will quit(`Connection to localhost closed by remote host.`) **E...
diff --git a/src/cowrie/commands/gcc.py b/src/cowrie/commands/gcc.py --- a/src/cowrie/commands/gcc.py +++ b/src/cowrie/commands/gcc.py @@ -133,7 +133,7 @@ # Schedule call to make it more time consuming and real self.scheduled = reactor.callLater( # type: ignore[attr-defined] - ...
{"golden_diff": "diff --git a/src/cowrie/commands/gcc.py b/src/cowrie/commands/gcc.py\n--- a/src/cowrie/commands/gcc.py\n+++ b/src/cowrie/commands/gcc.py\n@@ -133,7 +133,7 @@\n \n # Schedule call to make it more time consuming and real\n self.scheduled = reactor.callLater( # type: ignore[attr-d...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Gcc "compile" file quits cowrie **Describe the bug** By running gcc to "compile" a file just quits cowrie **To Reproduce** Steps to reproduce the behavior: 1. Login on the honeypot 2. Compile the file ...
facebookresearch__hydra-1887
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n# type: ignore\nfrom pathlib import Path\n\nfrom read_version import read_version\nfrom setuptools import find_namespace_packages, setup\n\nsetup(\n name=\"hydra-ray-launcher\",\n version=read_version(\"hydra_plugins/hyd...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n# type: ignore\nfrom pathlib import Path\n\nfrom read_version import read_version\nfrom setuptools import find_namespace_packages, setup\n\nsetup(\n name=\"hydra-ray-launcher\",\n version=read_version(\"hydra_plugins/hyd...
diff --git a/plugins/hydra_ray_launcher/integration_test_tools/README.md b/plugins/hydra_ray_launcher/integration_test_tools/README.md new file mode 100644 index 00000000000..eb3a4a12b4a --- /dev/null +++ b/plugins/hydra_ray_launcher/integration_test_tools/README.md @@ -0,0 +1,21 @@ +## Setting up a new testing AMI for...
[Ray-Plugin] Add support for Python 3.9 Python 3.9 support depends on https://github.com/ray-project/ray/issues/12788 Related to #1062
diff --git a/plugins/hydra_ray_launcher/setup.py b/plugins/hydra_ray_launcher/setup.py --- a/plugins/hydra_ray_launcher/setup.py +++ b/plugins/hydra_ray_launcher/setup.py @@ -19,7 +19,7 @@ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.7", "Programming Language...
{"golden_diff": "diff --git a/plugins/hydra_ray_launcher/setup.py b/plugins/hydra_ray_launcher/setup.py\n--- a/plugins/hydra_ray_launcher/setup.py\n+++ b/plugins/hydra_ray_launcher/setup.py\n@@ -19,7 +19,7 @@\n \"License :: OSI Approved :: MIT License\",\n \"Programming Language :: Python :: 3.7\",\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Ray-Plugin] Add support for Python 3.9 Python 3.9 support depends on https://github.com/ray-project/ray/issues/12788 Related to #1062 --- END ISSUE --- Below are some code segments, each from a relevan...
mitmproxy__mitmproxy-6127
[ { "content": "\"\"\"Take incoming HTTP requests and replay them with modified parameters.\"\"\"\nfrom mitmproxy import ctx\n\n\ndef request(flow):\n # Avoid an infinite loop by not replaying already replayed requests\n if flow.is_replay == \"request\":\n return\n flow = flow.copy()\n # Only i...
[ { "content": "\"\"\"Take incoming HTTP requests and replay them with modified parameters.\"\"\"\nfrom mitmproxy import ctx\n\n\ndef request(flow):\n # Avoid an infinite loop by not replaying already replayed requests\n if flow.is_replay == \"request\":\n return\n flow = flow.copy()\n # Only i...
diff --git a/examples/addons/duplicate-modify-replay.py b/examples/addons/duplicate-modify-replay.py index 7138e5b6f3..f11eb7c582 100644 --- a/examples/addons/duplicate-modify-replay.py +++ b/examples/addons/duplicate-modify-replay.py @@ -10,6 +10,6 @@ def request(flow): # Only interactive tools have a view. If we...
`view.flows.add` command does not exist but the examples reference it #### Problem Description The `view.flows.add` command does not exist but the example `duplicate-modify-replay.py` shows this command being used. `replay.client` seems to perform both the "add to view" and "replay" function.
diff --git a/examples/addons/duplicate-modify-replay.py b/examples/addons/duplicate-modify-replay.py --- a/examples/addons/duplicate-modify-replay.py +++ b/examples/addons/duplicate-modify-replay.py @@ -10,6 +10,6 @@ # Only interactive tools have a view. If we have one, add a duplicate entry # for our flow. ...
{"golden_diff": "diff --git a/examples/addons/duplicate-modify-replay.py b/examples/addons/duplicate-modify-replay.py\n--- a/examples/addons/duplicate-modify-replay.py\n+++ b/examples/addons/duplicate-modify-replay.py\n@@ -10,6 +10,6 @@\n # Only interactive tools have a view. If we have one, add a duplicate entry\n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- `view.flows.add` command does not exist but the examples reference it #### Problem Description The `view.flows.add` command does not exist but the example `duplicate-modify-replay.py` shows this command be...
pyodide__pyodide-55
[ { "content": "#!/usr/bin/env python3\n\n\"\"\"\nBuilds a Pyodide package.\n\"\"\"\n\nimport argparse\nimport hashlib\nimport os\nimport shutil\nimport subprocess\n\n\nimport common\n\n\nROOTDIR = os.path.abspath(os.path.dirname(__file__))\n\n\ndef check_checksum(path, pkg):\n \"\"\"\n Checks that a tarbal...
[ { "content": "#!/usr/bin/env python3\n\n\"\"\"\nBuilds a Pyodide package.\n\"\"\"\n\nimport argparse\nimport hashlib\nimport os\nimport shutil\nimport subprocess\n\n\nimport common\n\n\nROOTDIR = os.path.abspath(os.path.dirname(__file__))\n\n\ndef check_checksum(path, pkg):\n \"\"\"\n Checks that a tarbal...
diff --git a/Makefile b/Makefile index d879478edad..11f33f893f9 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,7 @@ build/pyodide.asm.js: src/main.bc src/jsimport.bc src/jsproxy.bc src/js2python.b build/pyodide.asm.data: root/.built - python2 $(FILEPACKAGER) build/pyodide.asm.data --preload root/lib@lib --js-ou...
Make work on Chrome Make work on Chrome
diff --git a/tools/buildpkg.py b/tools/buildpkg.py --- a/tools/buildpkg.py +++ b/tools/buildpkg.py @@ -144,7 +144,8 @@ '--js-output={}'.format(os.path.join(buildpath, name + '.js')), '--export-name=pyodide', '--exclude', '*.wasm.pre', - '--exclude', '__pycache__'], check=True) + ...
{"golden_diff": "diff --git a/tools/buildpkg.py b/tools/buildpkg.py\n--- a/tools/buildpkg.py\n+++ b/tools/buildpkg.py\n@@ -144,7 +144,8 @@\n '--js-output={}'.format(os.path.join(buildpath, name + '.js')),\n '--export-name=pyodide',\n '--exclude', '*.wasm.pre',\n- '--exclude', '__pycache__...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Make work on Chrome Make work on Chrome --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `tools/buildpkg.py...
pallets__click-1587
[ { "content": "import inspect\nimport io\nimport itertools\nimport os\nimport struct\nimport sys\n\nfrom ._compat import DEFAULT_COLUMNS\nfrom ._compat import get_winterm_size\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions import Abort\nfrom .exceptions ...
[ { "content": "import inspect\nimport io\nimport itertools\nimport os\nimport struct\nimport sys\n\nfrom ._compat import DEFAULT_COLUMNS\nfrom ._compat import get_winterm_size\nfrom ._compat import isatty\nfrom ._compat import strip_ansi\nfrom ._compat import WIN\nfrom .exceptions import Abort\nfrom .exceptions ...
diff --git a/CHANGES.rst b/CHANGES.rst index efc39145c..5721fd734 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -16,6 +16,8 @@ Unreleased - ``version_option`` uses ``importlib.metadata`` (or the ``importlib_metadata`` backport) instead of ``pkg_resources``. :issue:`1582` +- If validation fails for a prom...
click.prompt(type=int, hide_input=True) outputs rejected input Despite asking `click.prompt()` to hide input it will still outputs the input if it rejects it. I get the same behavior for `7.0` from PyPI, `7.x` from Git, and `master` from Git. ```bash altendky@p1:~$ venv/bin/python -c 'import click; click.prompt("p...
diff --git a/src/click/termui.py b/src/click/termui.py --- a/src/click/termui.py +++ b/src/click/termui.py @@ -153,7 +153,10 @@ try: result = value_proc(value) except UsageError as e: - echo(f"Error: {e.message}", err=err) # noqa: B306 + if hide_input: + ...
{"golden_diff": "diff --git a/src/click/termui.py b/src/click/termui.py\n--- a/src/click/termui.py\n+++ b/src/click/termui.py\n@@ -153,7 +153,10 @@\n try:\n result = value_proc(value)\n except UsageError as e:\n- echo(f\"Error: {e.message}\", err=err) # noqa: B306\n+ i...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- click.prompt(type=int, hide_input=True) outputs rejected input Despite asking `click.prompt()` to hide input it will still outputs the input if it rejects it. I get the same behavior for `7.0` from PyPI, `7....
chainer__chainer-271
[ { "content": "import numpy\nimport six\n\nfrom chainer import cuda\n\n\nclass FunctionSet(object):\n\n \"\"\"Set of objects with ``parameters`` and ``gradients`` properties.\n\n :class:`FunctionSet` is useful to collect parameters and gradients of\n multiple parameterized :class:`Function` objects. :cl...
[ { "content": "import numpy\nimport six\n\nfrom chainer import cuda\n\n\nclass FunctionSet(object):\n\n \"\"\"Set of objects with ``parameters`` and ``gradients`` properties.\n\n :class:`FunctionSet` is useful to collect parameters and gradients of\n multiple parameterized :class:`Function` objects. :cl...
diff --git a/chainer/function_set.py b/chainer/function_set.py index ca4ac1ab3466..6c1d5a6e37fb 100644 --- a/chainer/function_set.py +++ b/chainer/function_set.py @@ -81,7 +81,7 @@ def copy_parameters_from(self, params): for dst, src in zip(self.parameters, params): if isinstance(dst, numpy.ndarra...
FunctionSet.copy_parameters_from() Hi all! The code in 'FunctionSet.copy_parameters_from()' does not work, when 'src' and 'dst' are both numpy.ndarrays? ``` python if isinstance(dst, numpy.ndarray): if isinstance(src, numpy.ndarray): dst.copy(src) # this gives a ValueError ``` I think this should read ...
diff --git a/chainer/function_set.py b/chainer/function_set.py --- a/chainer/function_set.py +++ b/chainer/function_set.py @@ -81,7 +81,7 @@ for dst, src in zip(self.parameters, params): if isinstance(dst, numpy.ndarray): if isinstance(src, numpy.ndarray): - dst...
{"golden_diff": "diff --git a/chainer/function_set.py b/chainer/function_set.py\n--- a/chainer/function_set.py\n+++ b/chainer/function_set.py\n@@ -81,7 +81,7 @@\n for dst, src in zip(self.parameters, params):\n if isinstance(dst, numpy.ndarray):\n if isinstance(src, numpy.ndarray):\n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- FunctionSet.copy_parameters_from() Hi all! The code in 'FunctionSet.copy_parameters_from()' does not work, when 'src' and 'dst' are both numpy.ndarrays? ``` python if isinstance(dst, numpy.ndarray): if ...
Qiskit__qiskit-1024
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n\"\"\"Tools for compiling a batch of quantum circuits.\"\"\"\nfrom copy import deepcopy\nimport ...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Copyright 2018, IBM.\n#\n# This source code is licensed under the Apache License, Version 2.0 found in\n# the LICENSE.txt file in the root directory of this source tree.\n\n\"\"\"Tools for compiling a batch of quantum circuits.\"\"\"\nfrom copy import deepcopy\nimport ...
diff --git a/qiskit/transpiler/_transpiler.py b/qiskit/transpiler/_transpiler.py index 4479b35b6706..7f6c68392af2 100644 --- a/qiskit/transpiler/_transpiler.py +++ b/qiskit/transpiler/_transpiler.py @@ -457,9 +457,10 @@ def _matches_coupling_map(dag, coupling_map): for _, data in dag.multi_graph.nodes(data=True): ...
_matches_coupling_map seems to check single qubit ops too and fails <!-- ⚠️ If you do not respect this template, your issue will be closed --> <!-- ⚠️ Make sure to browse the opened and closed issues --> ### Informations - **Qiskit Terra version**: 0.6.0 - **Python version**: 3.6 - **Operating system**: macos ...
diff --git a/qiskit/transpiler/_transpiler.py b/qiskit/transpiler/_transpiler.py --- a/qiskit/transpiler/_transpiler.py +++ b/qiskit/transpiler/_transpiler.py @@ -457,9 +457,10 @@ for _, data in dag.multi_graph.nodes(data=True): if data['type'] == 'op': gate_map = [qr[1] for qr in data['qargs...
{"golden_diff": "diff --git a/qiskit/transpiler/_transpiler.py b/qiskit/transpiler/_transpiler.py\n--- a/qiskit/transpiler/_transpiler.py\n+++ b/qiskit/transpiler/_transpiler.py\n@@ -457,9 +457,10 @@\n for _, data in dag.multi_graph.nodes(data=True):\n if data['type'] == 'op':\n gate_map = [qr[1...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- _matches_coupling_map seems to check single qubit ops too and fails <!-- ⚠️ If you do not respect this template, your issue will be closed --> <!-- ⚠️ Make sure to browse the opened and closed issues --> ...
ARM-DOE__ACT-396
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Atmospheric data Community Toolkit documentation build configuration file, created by\n# sphinx-quickstart on Thu Jun 28 12:35:56 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not ...
[ { "content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Atmospheric data Community Toolkit documentation build configuration file, created by\n# sphinx-quickstart on Thu Jun 28 12:35:56 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not ...
diff --git a/docs/source/conf.py b/docs/source/conf.py index b3f210966e..252d718671 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -126,7 +126,9 @@ # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} +html_theme_options = { + 'google_ana...
Add Google Analytics ID Add a Google Analytics ID to the `conf.py` file used by sphinx. For those interested in having access the analytics, you will need to send over your gmail address Fixes #396
diff --git a/docs/source/conf.py b/docs/source/conf.py --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -126,7 +126,9 @@ # further. For a list of options available for each theme, see the # documentation. # -# html_theme_options = {} +html_theme_options = { + 'google_analytics_id': 'UA-179020619-3', +} ...
{"golden_diff": "diff --git a/docs/source/conf.py b/docs/source/conf.py\n--- a/docs/source/conf.py\n+++ b/docs/source/conf.py\n@@ -126,7 +126,9 @@\n # further. For a list of options available for each theme, see the\n # documentation.\n #\n-# html_theme_options = {}\n+html_theme_options = {\n+ 'google_analytics_id'...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add Google Analytics ID Add a Google Analytics ID to the `conf.py` file used by sphinx. For those interested in having access the analytics, you will need to send over your gmail address Fixes #396 --- E...
evennia__evennia-2748
[ { "content": "\"\"\"\nThis implements the common managers that are used by the\nabstract models in dbobjects.py (and which are thus shared by\nall Attributes and TypedObjects).\n\n\"\"\"\nimport shlex\nfrom django.db.models import F, Q, Count, ExpressionWrapper, FloatField\nfrom django.db.models.functions impor...
[ { "content": "\"\"\"\nThis implements the common managers that are used by the\nabstract models in dbobjects.py (and which are thus shared by\nall Attributes and TypedObjects).\n\n\"\"\"\nimport shlex\nfrom django.db.models import F, Q, Count, ExpressionWrapper, FloatField\nfrom django.db.models.functions impor...
diff --git a/evennia/typeclasses/managers.py b/evennia/typeclasses/managers.py index c8ad666e234..e5d1130f123 100644 --- a/evennia/typeclasses/managers.py +++ b/evennia/typeclasses/managers.py @@ -286,7 +286,7 @@ def get_by_tag(self, key=None, category=None, tagtype=None, **kwargs): categories = make_iter(cate...
[BUG - Develop] `get_by_tag` category list fails on None #### Describe the bug When using a list for the `category` kwarg that contains an entry of `None` (which is a valid category), it fails with a traceback. Presumably due to the use of `sorted` here <https://github.com/evennia/evennia/blob/develop/evennia/typeclas...
diff --git a/evennia/typeclasses/managers.py b/evennia/typeclasses/managers.py --- a/evennia/typeclasses/managers.py +++ b/evennia/typeclasses/managers.py @@ -286,7 +286,7 @@ categories = make_iter(category) if category else [] n_keys = len(keys) n_categories = len(categories) - unique...
{"golden_diff": "diff --git a/evennia/typeclasses/managers.py b/evennia/typeclasses/managers.py\n--- a/evennia/typeclasses/managers.py\n+++ b/evennia/typeclasses/managers.py\n@@ -286,7 +286,7 @@\n categories = make_iter(category) if category else []\n n_keys = len(keys)\n n_categories = len(cate...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG - Develop] `get_by_tag` category list fails on None #### Describe the bug When using a list for the `category` kwarg that contains an entry of `None` (which is a valid category), it fails with a traceba...
openfun__richie-1960
[ { "content": "\"\"\"\nAPI endpoints for the courses app.\n\"\"\"\nfrom django.conf import settings\nfrom django.db.models import Q\n\nfrom cms import signals as cms_signals\nfrom cms.models import Page\nfrom rest_framework.decorators import api_view\nfrom rest_framework.exceptions import ValidationError\nfrom r...
[ { "content": "\"\"\"\nAPI endpoints for the courses app.\n\"\"\"\nfrom django.conf import settings\nfrom django.db.models import Q\n\nfrom cms import signals as cms_signals\nfrom cms.models import Page\nfrom rest_framework.decorators import api_view\nfrom rest_framework.exceptions import ValidationError\nfrom r...
diff --git a/CHANGELOG.md b/CHANGELOG.md index ecda16668b..eba4e14cf7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ Versioning](https://semver.org/spec/v2.0.0.html). ## [Unrealeased] +### Fixed + +- Fix error `MultipleObjectsReturned` during synchronization due to missing + `distinct`. + ## [2.21...
MultipleObjectsReturned error during sync course from LMS to Richie ## Bug Report **Problematic Behavior** Error synchronizing course from LMS to Richie after adding a course code. **Expected behavior/code** Richie API raises: ``` get() returned more than one Course -- it returned 2! ERROR 2023-04-06 17:06:3...
diff --git a/src/richie/apps/courses/api.py b/src/richie/apps/courses/api.py --- a/src/richie/apps/courses/api.py +++ b/src/richie/apps/courses/api.py @@ -160,7 +160,7 @@ # Look for the course targeted by the resource link course_code = normalize_code(lms.extract_course_code(data)) try: - course =...
{"golden_diff": "diff --git a/src/richie/apps/courses/api.py b/src/richie/apps/courses/api.py\n--- a/src/richie/apps/courses/api.py\n+++ b/src/richie/apps/courses/api.py\n@@ -160,7 +160,7 @@\n # Look for the course targeted by the resource link\n course_code = normalize_code(lms.extract_course_code(data))\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- MultipleObjectsReturned error during sync course from LMS to Richie ## Bug Report **Problematic Behavior** Error synchronizing course from LMS to Richie after adding a course code. **Expected behavior/...
spotify__luigi-880
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Copyright 2012-2015 Spotify AB\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n#...
diff --git a/luigi/task_register.py b/luigi/task_register.py index 858430243c..15d18f7007 100644 --- a/luigi/task_register.py +++ b/luigi/task_register.py @@ -135,8 +135,6 @@ def __get_reg(cls): # We return this in a topologically sorted list of inheritance: this is useful in some cases (#822) reg = O...
Fix external dynamic deps Since running tasks communicate with worker via a queue, all dynamic dependencies that they yield must be serialized and then deserialized back. This doesn't work if a task has `run = NotImplemented`, since there was a specific check for that in Register for unclear reason. This PR adds a tes...
diff --git a/luigi/task_register.py b/luigi/task_register.py --- a/luigi/task_register.py +++ b/luigi/task_register.py @@ -135,8 +135,6 @@ # We return this in a topologically sorted list of inheritance: this is useful in some cases (#822) reg = OrderedDict() for cls in cls._reg: - ...
{"golden_diff": "diff --git a/luigi/task_register.py b/luigi/task_register.py\n--- a/luigi/task_register.py\n+++ b/luigi/task_register.py\n@@ -135,8 +135,6 @@\n # We return this in a topologically sorted list of inheritance: this is useful in some cases (#822)\n reg = OrderedDict()\n for cls in ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Fix external dynamic deps Since running tasks communicate with worker via a queue, all dynamic dependencies that they yield must be serialized and then deserialized back. This doesn't work if a task has `run ...