in_source_id
string
before_files
list
after_files
list
pr_diff
string
issue
string
golden_diff
string
verification_info
string
prompt
string
numpy__numpy-12439
[ { "content": "from __future__ import division, print_function\n\nimport os\nimport sys\nimport pickle\nimport copy\nimport warnings\nimport platform\nfrom os.path import join\nfrom numpy.distutils import log\nfrom distutils.dep_util import newer\nfrom distutils.sysconfig import get_config_var\nfrom numpy._build...
[ { "content": "from __future__ import division, print_function\n\nimport os\nimport sys\nimport pickle\nimport copy\nimport warnings\nimport platform\nfrom os.path import join\nfrom numpy.distutils import log\nfrom distutils.dep_util import newer\nfrom distutils.sysconfig import get_config_var\nfrom numpy._build...
diff --git a/numpy/core/setup.py b/numpy/core/setup.py index efcacfb8e5fc..23a9e268bbaf 100644 --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -379,8 +379,9 @@ def check_mathlib(config_cmd): def visibility_define(config): """Return the define value to use for NPY_VISIBILITY_HIDDEN (may be empty string...
BUG: functions marked with NPY_NO_EXPORT still are exported Steps to reproduce (on linux): - git checkout - `python setup.py build_ext` - choose a random function marked with the `NPY_NO_EXPORT` macro, for instance [`datetime_metadata_divides`](https://github.com/numpy/numpy/blob/v1.15.4/numpy/core/src/multiarray/_d...
diff --git a/numpy/core/setup.py b/numpy/core/setup.py --- a/numpy/core/setup.py +++ b/numpy/core/setup.py @@ -379,8 +379,9 @@ def visibility_define(config): """Return the define value to use for NPY_VISIBILITY_HIDDEN (may be empty string).""" - if config.check_compiler_gcc4(): - return '__attribut...
{"golden_diff": "diff --git a/numpy/core/setup.py b/numpy/core/setup.py\n--- a/numpy/core/setup.py\n+++ b/numpy/core/setup.py\n@@ -379,8 +379,9 @@\n def visibility_define(config):\n \"\"\"Return the define value to use for NPY_VISIBILITY_HIDDEN (may be empty\n string).\"\"\"\n- if config.check_compiler_gcc4(...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BUG: functions marked with NPY_NO_EXPORT still are exported Steps to reproduce (on linux): - git checkout - `python setup.py build_ext` - choose a random function marked with the `NPY_NO_EXPORT` macro, for...
zulip__zulip-21726
[ { "content": "import re\nfrom typing import List, Match, Tuple\n\nfrom bs4 import BeautifulSoup\n\n# The phrases in this list will be ignored. The longest phrase is\n# tried first; this removes the chance of smaller phrases changing\n# the text before longer phrases are tried.\n# The errors shown by `tools/chec...
[ { "content": "import re\nfrom typing import List, Match, Tuple\n\nfrom bs4 import BeautifulSoup\n\n# The phrases in this list will be ignored. The longest phrase is\n# tried first; this removes the chance of smaller phrases changing\n# the text before longer phrases are tried.\n# The errors shown by `tools/chec...
diff --git a/frontend_tests/node_tests/dispatch.js b/frontend_tests/node_tests/dispatch.js index d35f691150ea5..d6161ebf463b3 100644 --- a/frontend_tests/node_tests/dispatch.js +++ b/frontend_tests/node_tests/dispatch.js @@ -40,6 +40,7 @@ const message_lists = mock_esm("../../static/js/message_lists"); const muted_top...
Create collapsible "Private messages" section in left sidebar At present, private messages are collapsed in the left sidebar, unless the user is in a private message narrow. This has a few down sides: 1. Getting to a PM conversation generally requires multiple clicks. 2. It's not immediately clear who send you a ne...
diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py --- a/tools/lib/capitalization.py +++ b/tools/lib/capitalization.py @@ -78,6 +78,9 @@ r"more topics", # Used alone in a parenthetical where capitalized looks worse. r"^deprecated$", + # We want the similar text in the Private Messa...
{"golden_diff": "diff --git a/tools/lib/capitalization.py b/tools/lib/capitalization.py\n--- a/tools/lib/capitalization.py\n+++ b/tools/lib/capitalization.py\n@@ -78,6 +78,9 @@\n r\"more topics\",\n # Used alone in a parenthetical where capitalized looks worse.\n r\"^deprecated$\",\n+ # We want the simil...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Create collapsible "Private messages" section in left sidebar At present, private messages are collapsed in the left sidebar, unless the user is in a private message narrow. This has a few down sides: 1. G...
mars-project__mars-426
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright 1999-2018 Alibaba Group Holding Ltd.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://...
diff --git a/mars/tensor/expressions/datasource/array.py b/mars/tensor/expressions/datasource/array.py index 7cda2d338b..10a8625d27 100644 --- a/mars/tensor/expressions/datasource/array.py +++ b/mars/tensor/expressions/datasource/array.py @@ -129,7 +129,7 @@ def tensor(data, dtype=None, chunk_size=None, gpu=None, spars...
How to perform all tensor on np.array packages Example: ``` import mars.tensor as mt import numpy as np def test_x(): X1 = mt.tensor([0, 1]) X2 = mt.tensor([2, 3]) X = np.array([X1,X2]) print(X.execute()) ``` How to calculate X? How to perform all tensor on np.array packages Example: ``` i...
diff --git a/mars/tensor/expressions/datasource/array.py b/mars/tensor/expressions/datasource/array.py --- a/mars/tensor/expressions/datasource/array.py +++ b/mars/tensor/expressions/datasource/array.py @@ -129,7 +129,7 @@ if dtype is not None and data.dtype != dtype: return data.astype(dtype) ...
{"golden_diff": "diff --git a/mars/tensor/expressions/datasource/array.py b/mars/tensor/expressions/datasource/array.py\n--- a/mars/tensor/expressions/datasource/array.py\n+++ b/mars/tensor/expressions/datasource/array.py\n@@ -129,7 +129,7 @@\n if dtype is not None and data.dtype != dtype:\n return ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- How to perform all tensor on np.array packages Example: ``` import mars.tensor as mt import numpy as np def test_x(): X1 = mt.tensor([0, 1]) X2 = mt.tensor([2, 3]) X = np.array([X1,X2]) ...
ansible__ansible-modules-core-3778
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2013, Dylan Martin <dmartin@seattlecentral.edu>\n# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>\n# (c) 2016, Dag Wieers <dag@wieers.com>\n# (c) 2016, Virgil Dupras <hsoft@hardcoded.net>\...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>\n# (c) 2013, Dylan Martin <dmartin@seattlecentral.edu>\n# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>\n# (c) 2016, Dag Wieers <dag@wieers.com>\n# (c) 2016, Virgil Dupras <hsoft@hardcoded.net>\...
diff --git a/files/unarchive.py b/files/unarchive.py index 2c495abc60b..6492af60633 100644 --- a/files/unarchive.py +++ b/files/unarchive.py @@ -701,6 +701,9 @@ def main(): # supports_check_mode = True, ) + # We screenscrape a huge amount of commands so use C locale anytime we do + module.run_comma...
unarchive issue with ansible 2.1 rc3 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME unarchive ##### ANSIBLE VERSION ``` ansible-playbook 2.1.0.0 config file = /etc/ansible/ansible.cfg configured module search path = ['/home/yannig/dev/ansible-conf/ansible/playbooks/library'] ``` ##### CONFIGURATION None ####...
diff --git a/files/unarchive.py b/files/unarchive.py --- a/files/unarchive.py +++ b/files/unarchive.py @@ -701,6 +701,9 @@ # supports_check_mode = True, ) + # We screenscrape a huge amount of commands so use C locale anytime we do + module.run_command_environ_update = dict(LANG='C', LC_ALL='C', LC_...
{"golden_diff": "diff --git a/files/unarchive.py b/files/unarchive.py\n--- a/files/unarchive.py\n+++ b/files/unarchive.py\n@@ -701,6 +701,9 @@\n # supports_check_mode = True,\n )\n \n+ # We screenscrape a huge amount of commands so use C locale anytime we do\n+ module.run_command_environ_update = dict(...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- unarchive issue with ansible 2.1 rc3 ##### ISSUE TYPE - Bug Report ##### COMPONENT NAME unarchive ##### ANSIBLE VERSION ``` ansible-playbook 2.1.0.0 config file = /etc/ansible/ansible.cfg configured mod...
matrix-org__synapse-6563
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2018 New Vector Ltd\n# Copyright 2019 The Matrix.org Foundation C.I.C.\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 o...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2018 New Vector Ltd\n# Copyright 2019 The Matrix.org Foundation C.I.C.\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 o...
diff --git a/changelog.d/6563.bugfix b/changelog.d/6563.bugfix new file mode 100644 index 000000000000..3325fb1dcfda --- /dev/null +++ b/changelog.d/6563.bugfix @@ -0,0 +1 @@ +Fix GET request on /_synapse/admin/v2/users endpoint. Contributed by Awesome Technologies Innovationslabor GmbH. \ No newline at end of file dif...
/_synapse/admin/v2/users is broken Running the /_synapse/admin/v2/users as documented produces an internal server error Postgres logs: ``` STATEMENT: SELECT name, password_hash, is_guest, admin, user_type, deactivated FROM users WHERE is_guest = false AND deactivated = false ORDER BY name ASC LIMIT 10 OFFSET 0 E...
diff --git a/synapse/storage/data_stores/main/__init__.py b/synapse/storage/data_stores/main/__init__.py --- a/synapse/storage/data_stores/main/__init__.py +++ b/synapse/storage/data_stores/main/__init__.py @@ -526,9 +526,9 @@ attr_filter = {} if not guests: - attr_filter["is_guest"] = Fa...
{"golden_diff": "diff --git a/synapse/storage/data_stores/main/__init__.py b/synapse/storage/data_stores/main/__init__.py\n--- a/synapse/storage/data_stores/main/__init__.py\n+++ b/synapse/storage/data_stores/main/__init__.py\n@@ -526,9 +526,9 @@\n \n attr_filter = {}\n if not guests:\n- attr...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- /_synapse/admin/v2/users is broken Running the /_synapse/admin/v2/users as documented produces an internal server error Postgres logs: ``` STATEMENT: SELECT name, password_hash, is_guest, admin, user_ty...
keras-team__keras-core-348
[ { "content": "from keras_core import backend\nfrom keras_core.api_export import keras_core_export\nfrom keras_core.layers.preprocessing.tf_data_layer import TFDataLayer\nfrom keras_core.utils import image_utils\n\n\n@keras_core_export(\"keras_core.layers.CenterCrop\")\nclass CenterCrop(TFDataLayer):\n \"\"\"...
[ { "content": "from keras_core import backend\nfrom keras_core.api_export import keras_core_export\nfrom keras_core.layers.preprocessing.tf_data_layer import TFDataLayer\nfrom keras_core.utils import image_utils\n\n\n@keras_core_export(\"keras_core.layers.CenterCrop\")\nclass CenterCrop(TFDataLayer):\n \"\"\"...
diff --git a/keras_core/layers/preprocessing/center_crop.py b/keras_core/layers/preprocessing/center_crop.py index c1caaf1f3..de3c5fee9 100644 --- a/keras_core/layers/preprocessing/center_crop.py +++ b/keras_core/layers/preprocessing/center_crop.py @@ -52,6 +52,7 @@ def __init__(self, height, width, data_format=None, *...
keras.layers.CenterCrop raises AttributeError when passed a list of images With tf.keras, the following code works, but not in Keras-Core: ```python import keras_core as keras import numpy as np images = [ np.random.rand(100, 100, 3), np.random.rand(100, 100, 3), ] keras.layers.CenterCrop(height=60,...
diff --git a/keras_core/layers/preprocessing/center_crop.py b/keras_core/layers/preprocessing/center_crop.py --- a/keras_core/layers/preprocessing/center_crop.py +++ b/keras_core/layers/preprocessing/center_crop.py @@ -52,6 +52,7 @@ self.data_format = backend.standardize_data_format(data_format) def cal...
{"golden_diff": "diff --git a/keras_core/layers/preprocessing/center_crop.py b/keras_core/layers/preprocessing/center_crop.py\n--- a/keras_core/layers/preprocessing/center_crop.py\n+++ b/keras_core/layers/preprocessing/center_crop.py\n@@ -52,6 +52,7 @@\n self.data_format = backend.standardize_data_format(data_f...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- keras.layers.CenterCrop raises AttributeError when passed a list of images With tf.keras, the following code works, but not in Keras-Core: ```python import keras_core as keras import numpy as np image...
streamlit__streamlit-6828
[ { "content": "# Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\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) Streamlit Inc. (2018-2022) Snowflake Inc. (2022)\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/e2e/scripts/st_select_slider.py b/e2e/scripts/st_select_slider.py index 403fe937f67a..b4c0d0f8ed4d 100644 --- a/e2e/scripts/st_select_slider.py +++ b/e2e/scripts/st_select_slider.py @@ -88,3 +88,12 @@ def on_change(): ) st.write("Value 8:", st.session_state.select_slider8) st.write("Select s...
Right-side label of `st.slider` and `st.select_slider` overflows when inside `st.expander` ### Checklist - [x] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for similar issues. - [X] I added a very descriptive title to this issue. - [X] I have provided sufficient information ...
diff --git a/e2e/scripts/st_select_slider.py b/e2e/scripts/st_select_slider.py --- a/e2e/scripts/st_select_slider.py +++ b/e2e/scripts/st_select_slider.py @@ -88,3 +88,12 @@ ) st.write("Value 8:", st.session_state.select_slider8) st.write("Select slider changed:", "select_slider_changed" in st.session_st...
{"golden_diff": "diff --git a/e2e/scripts/st_select_slider.py b/e2e/scripts/st_select_slider.py\n--- a/e2e/scripts/st_select_slider.py\n+++ b/e2e/scripts/st_select_slider.py\n@@ -88,3 +88,12 @@\n )\n st.write(\"Value 8:\", st.session_state.select_slider8)\n st.write(\"Select slider changed:\", \"select_slid...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Right-side label of `st.slider` and `st.select_slider` overflows when inside `st.expander` ### Checklist - [x] I have searched the [existing issues](https://github.com/streamlit/streamlit/issues) for simil...
apluslms__a-plus-1310
[ { "content": "import logging\nfrom typing import Any, Dict, List\n\nfrom django import forms\nfrom django.utils.translation import gettext_lazy as _\n\nfrom course.models import CourseModule, LearningObjectCategory\nfrom exercise.models import LearningObject, CourseChapter, BaseExercise, \\\n LTIExercise, St...
[ { "content": "import logging\nfrom typing import Any, Dict, List\n\nfrom django import forms\nfrom django.utils.translation import gettext_lazy as _\n\nfrom course.models import CourseModule, LearningObjectCategory\nfrom exercise.models import LearningObject, CourseChapter, BaseExercise, \\\n LTIExercise, St...
diff --git a/edit_course/exercise_forms.py b/edit_course/exercise_forms.py index adb5ac12d..d40762edc 100644 --- a/edit_course/exercise_forms.py +++ b/edit_course/exercise_forms.py @@ -55,6 +55,8 @@ def init_fields(self, **kwargs): self.fields["parent"].queryset = LearningObject.objects\ .exclude(...
Users should not be able to edit content hierarchy Typically the A+ course content structure is configured from a JSON file generated by gitmanager. However, the teachers have possibility to edit the attributes also in the Edit course / Content view, including the parent learning object. By editing the parent selection...
diff --git a/edit_course/exercise_forms.py b/edit_course/exercise_forms.py --- a/edit_course/exercise_forms.py +++ b/edit_course/exercise_forms.py @@ -55,6 +55,8 @@ self.fields["parent"].queryset = LearningObject.objects\ .exclude(id=self.lobject.id)\ .filter(course_module=self.lobjec...
{"golden_diff": "diff --git a/edit_course/exercise_forms.py b/edit_course/exercise_forms.py\n--- a/edit_course/exercise_forms.py\n+++ b/edit_course/exercise_forms.py\n@@ -55,6 +55,8 @@\n self.fields[\"parent\"].queryset = LearningObject.objects\\\n .exclude(id=self.lobject.id)\\\n .filte...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Users should not be able to edit content hierarchy Typically the A+ course content structure is configured from a JSON file generated by gitmanager. However, the teachers have possibility to edit the attribut...
conan-io__conan-center-index-7774
[ { "content": "import os\n\nfrom conans import ConanFile, tools\nfrom conans.errors import ConanInvalidConfiguration\n\n\nclass SigslotConan(ConanFile):\n name = \"sigslot\"\n description = \"Sigslot is a header-only, thread safe implementation of signal-slots for C++.\"\n topics = (\"signal\", \"slot\"...
[ { "content": "import os\n\nfrom conans import ConanFile, tools\nfrom conans.errors import ConanInvalidConfiguration\n\n\nclass SigslotConan(ConanFile):\n name = \"sigslot\"\n description = \"Sigslot is a header-only, thread safe implementation of signal-slots for C++.\"\n topics = (\"signal\", \"slot\"...
diff --git a/recipes/sigslot/all/conandata.yml b/recipes/sigslot/all/conandata.yml index b033f4e57ec7d..6dc6431ba8df8 100644 --- a/recipes/sigslot/all/conandata.yml +++ b/recipes/sigslot/all/conandata.yml @@ -2,3 +2,6 @@ sources: "1.2.0": sha256: "751852BCB1871AA2CA9F30B34614D028BC44379BBD6F91327744724C652E7CE8...
[request] sigslot/1.2.1 ### Package Details * Package Name/Version: **sigslot/1.2.1** * Changelog: **https://github.com/palacaze/sigslot/releases/tag/v1.2.1** The above mentioned version is newly released by the upstream project and not yet available as a recipe. Please add this version.
diff --git a/recipes/sigslot/all/conanfile.py b/recipes/sigslot/all/conanfile.py --- a/recipes/sigslot/all/conanfile.py +++ b/recipes/sigslot/all/conanfile.py @@ -65,4 +65,4 @@ self.cpp_info.components["_sigslot"].system_libs.append("pthread") if self.settings.os == "Windows": if self...
{"golden_diff": "diff --git a/recipes/sigslot/all/conanfile.py b/recipes/sigslot/all/conanfile.py\n--- a/recipes/sigslot/all/conanfile.py\n+++ b/recipes/sigslot/all/conanfile.py\n@@ -65,4 +65,4 @@\n self.cpp_info.components[\"_sigslot\"].system_libs.append(\"pthread\")\n if self.settings.os == \"Win...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [request] sigslot/1.2.1 ### Package Details * Package Name/Version: **sigslot/1.2.1** * Changelog: **https://github.com/palacaze/sigslot/releases/tag/v1.2.1** The above mentioned version is newly r...
qutip__qutip-1390
[ { "content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation.\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\n# ...
[ { "content": "# This file is part of QuTiP: Quantum Toolbox in Python.\n#\n# Copyright (c) 2011 and later, Paul D. Nation.\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\n# ...
diff --git a/qutip/_mkl/spmv.py b/qutip/_mkl/spmv.py index 66e9a188b3..5774ba6a64 100644 --- a/qutip/_mkl/spmv.py +++ b/qutip/_mkl/spmv.py @@ -50,7 +50,7 @@ def mkl_spmv(A, x): indices = A.indices.ctypes.data_as(POINTER(c_int)) # Allocate output, using same conventions as input - if x.ndim is 1: + ...
Installation of qutip shows various warnings on ubuntu 20.04.1 **Describe the bug** Installing the qutip on ubuntu 20.04.1 shows the following warnings: ``` $ sudo apt install python3-qutip … Entpacken von python3-qutip (4.4.1-6build1) ... python3-qutip (4.4.1-6build1) wird eingerichtet ... /usr/lib/python3/dis...
diff --git a/qutip/_mkl/spmv.py b/qutip/_mkl/spmv.py --- a/qutip/_mkl/spmv.py +++ b/qutip/_mkl/spmv.py @@ -50,7 +50,7 @@ indices = A.indices.ctypes.data_as(POINTER(c_int)) # Allocate output, using same conventions as input - if x.ndim is 1: + if x.ndim == 1: y = np.empty(m,dtype=np.comple...
{"golden_diff": "diff --git a/qutip/_mkl/spmv.py b/qutip/_mkl/spmv.py\n--- a/qutip/_mkl/spmv.py\n+++ b/qutip/_mkl/spmv.py\n@@ -50,7 +50,7 @@\n indices = A.indices.ctypes.data_as(POINTER(c_int))\n \n # Allocate output, using same conventions as input\n- if x.ndim is 1:\n+ if x.ndim == 1:\n y = ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Installation of qutip shows various warnings on ubuntu 20.04.1 **Describe the bug** Installing the qutip on ubuntu 20.04.1 shows the following warnings: ``` $ sudo apt install python3-qutip … Entpacken ...
open-telemetry__opentelemetry-python-3848
[ { "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/docs/examples/fork-process-model/flask-gunicorn/requirements.txt b/docs/examples/fork-process-model/flask-gunicorn/requirements.txt index ad166e35901..e1e8b00aa21 100644 --- a/docs/examples/fork-process-model/flask-gunicorn/requirements.txt +++ b/docs/examples/fork-process-model/flask-gunicorn/requirements...
lint takes a long time Fix that.
diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py --- a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py +++ b/exporter/opentelemetry-exp...
{"golden_diff": "diff --git a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py b/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py\n--- a/exporter/opentelemetry-exporter-opencensus/src/opentelemetry/exporter/opencensus/util.py\n+++ b/exporte...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- lint takes a long time Fix that. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `exporter/opentelemetry-exp...
kivy__kivy-4728
[ { "content": "'''\nPIL: PIL image loader\n'''\n\n__all__ = ('ImageLoaderPIL', )\n\ntry:\n from PIL import Image as PILImage\nexcept:\n import Image as PILImage\n\nfrom kivy.logger import Logger\nfrom kivy.core.image import ImageLoaderBase, ImageData, ImageLoader\n\n\nclass ImageLoaderPIL(ImageLoaderBase):...
[ { "content": "'''\nPIL: PIL image loader\n'''\n\n__all__ = ('ImageLoaderPIL', )\n\ntry:\n from PIL import Image as PILImage\nexcept:\n import Image as PILImage\n\nfrom kivy.logger import Logger\nfrom kivy.core.image import ImageLoaderBase, ImageData, ImageLoader\n\n\nclass ImageLoaderPIL(ImageLoaderBase):...
diff --git a/kivy/core/image/img_pil.py b/kivy/core/image/img_pil.py index 139ff81219..93067516a3 100644 --- a/kivy/core/image/img_pil.py +++ b/kivy/core/image/img_pil.py @@ -102,7 +102,8 @@ def load(self, filename): @staticmethod def save(filename, width, height, fmt, pixels, flipped=False): - image...
Error: fromstring() in core/image/img_pil.py Platform: Linux (OpenSuse, Ubuntu) [INFO ] [Kivy ] v1.9.1 [INFO ] [Python ] v2.7.12 (default, Jul 01 2016, 15:36:53) [GCC] Error: File "/usr/lib64/python2.7/site-packages/kivy/core/image/img_pil.py", line 105, in save image = PILImage.fromstrin...
diff --git a/kivy/core/image/img_pil.py b/kivy/core/image/img_pil.py --- a/kivy/core/image/img_pil.py +++ b/kivy/core/image/img_pil.py @@ -102,7 +102,8 @@ @staticmethod def save(filename, width, height, fmt, pixels, flipped=False): - image = PILImage.fromstring(fmt.upper(), (width, height), pixels) +...
{"golden_diff": "diff --git a/kivy/core/image/img_pil.py b/kivy/core/image/img_pil.py\n--- a/kivy/core/image/img_pil.py\n+++ b/kivy/core/image/img_pil.py\n@@ -102,7 +102,8 @@\n \n @staticmethod\n def save(filename, width, height, fmt, pixels, flipped=False):\n- image = PILImage.fromstring(fmt.upper(), (w...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Error: fromstring() in core/image/img_pil.py Platform: Linux (OpenSuse, Ubuntu) [INFO ] [Kivy ] v1.9.1 [INFO ] [Python ] v2.7.12 (default, Jul 01 2016, 15:36:53) [GCC] Error: File "/...
ethereum__consensus-specs-1131
[ { "content": "import sys\nimport function_puller\n\n\ndef build_phase0_spec(sourcefile, outfile):\n code_lines = []\n code_lines.append(\"\"\"\n\nfrom typing import (\n Any,\n Dict,\n List,\n NewType,\n Tuple,\n)\nfrom eth2spec.utils.minimal_ssz import (\n SSZType,\n hash_tree_root,\n...
[ { "content": "import sys\nimport function_puller\n\n\ndef build_phase0_spec(sourcefile, outfile):\n code_lines = []\n code_lines.append(\"\"\"\n\nfrom typing import (\n Any,\n Dict,\n List,\n NewType,\n Tuple,\n)\nfrom eth2spec.utils.minimal_ssz import *\nfrom eth2spec.utils.hash_function i...
diff --git a/Makefile b/Makefile index a6b379b719..401e4bdc9f 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ install_test: cd $(PY_SPEC_DIR); python3 -m venv venv; . venv/bin/activate; pip3 install -r requirements-testing.txt; test: $(PY_SPEC_ALL_TARGETS) - cd $(PY_SPEC_DIR); . venv/bin/activate; python -m...
BLS and testing Decided I wanted to get this out to explain the current state of testing, and **collect feedback** (implementers please comment) on what you need from testing, and your feelings about BLS usage in tests. # BLS and testing The two pain-points to get a pretty (and large) set of test-vectors out for ...
diff --git a/scripts/phase0/build_spec.py b/scripts/phase0/build_spec.py --- a/scripts/phase0/build_spec.py +++ b/scripts/phase0/build_spec.py @@ -13,17 +13,9 @@ NewType, Tuple, ) -from eth2spec.utils.minimal_ssz import ( - SSZType, - hash_tree_root, - signing_root, -) -from eth2spec.utils.bls_stub ...
{"golden_diff": "diff --git a/scripts/phase0/build_spec.py b/scripts/phase0/build_spec.py\n--- a/scripts/phase0/build_spec.py\n+++ b/scripts/phase0/build_spec.py\n@@ -13,17 +13,9 @@\n NewType,\n Tuple,\n )\n-from eth2spec.utils.minimal_ssz import (\n- SSZType,\n- hash_tree_root,\n- signing_root,\n-)\n-...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BLS and testing Decided I wanted to get this out to explain the current state of testing, and **collect feedback** (implementers please comment) on what you need from testing, and your feelings about BLS usag...
googleapis__python-spanner-django-124
[ { "content": "from datetime import datetime\n\nfrom django.conf import settings\nfrom django.db.backends.base.operations import BaseDatabaseOperations\nfrom django.utils import timezone\nfrom spanner.dbapi.parse_utils import TimestampStr\n\n\nclass DatabaseOperations(BaseDatabaseOperations):\n # Django's loo...
[ { "content": "from datetime import datetime\n\nfrom django.conf import settings\nfrom django.db.backends.base.operations import BaseDatabaseOperations\nfrom django.utils import timezone\nfrom spanner.dbapi.parse_utils import TimestampStr\n\n\nclass DatabaseOperations(BaseDatabaseOperations):\n # Django's loo...
diff --git a/spanner/django/operations.py b/spanner/django/operations.py index 96bae93c5d..e2790b0169 100644 --- a/spanner/django/operations.py +++ b/spanner/django/operations.py @@ -30,7 +30,7 @@ def sql_flush(self, style, tables, sequences, allow_cascade=False): # Cloud Spanner doesn't support TRUNCATE so DE...
dbapi: properly parse and ensure WHERE clause PR #111's task was to add a WHERE clause to missing ones. However, the code in there assumes a single statement not terminated by a SQL terminator `;` and we blindly add ` WHERE 1=1` for missing statements e.g. given ```sql DELETE FROM basic_article; ``` we make it ``...
diff --git a/spanner/django/operations.py b/spanner/django/operations.py --- a/spanner/django/operations.py +++ b/spanner/django/operations.py @@ -30,7 +30,7 @@ # Cloud Spanner doesn't support TRUNCATE so DELETE instead. # A dummy WHERE clause is required. if tables: - delete_sql =...
{"golden_diff": "diff --git a/spanner/django/operations.py b/spanner/django/operations.py\n--- a/spanner/django/operations.py\n+++ b/spanner/django/operations.py\n@@ -30,7 +30,7 @@\n # Cloud Spanner doesn't support TRUNCATE so DELETE instead.\n # A dummy WHERE clause is required.\n if tables:\n-...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- dbapi: properly parse and ensure WHERE clause PR #111's task was to add a WHERE clause to missing ones. However, the code in there assumes a single statement not terminated by a SQL terminator `;` and we blin...
tensorflow__tfx-2189
[ { "content": "# Lint as: python2, python3\n# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/lice...
[ { "content": "# Lint as: python2, python3\n# Copyright 2019 Google LLC. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/lice...
diff --git a/.dockerignore b/.dockerignore index 27a1df850c..0a088a84c7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,7 +9,7 @@ __pycache__/ # Distribution / packaging .Python -build/ +# build/ # build/ contains required files for building tfx package. develop-eggs/ dist/ downloads/ diff --git a/.gitigno...
Project can't be cloned correctly on macOS due to case insensitivity Under the `tfx` folder there's a folder called `build` and a bazel file called `BUILD`. Because macOS is by default case insensitive, only the folder is cloned when `git clone` is run. This means that when trying to build locally, bazel won't be able ...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -108,7 +108,7 @@ def run(self): subprocess.check_call( - [self._bazel_cmd, 'run', '//tfx/build:gen_proto'], + [self._bazel_cmd, 'run', '//build:gen_proto'], # Bazel should be invoked in a directory containing bazel WORKSP...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -108,7 +108,7 @@\n \n def run(self):\n subprocess.check_call(\n- [self._bazel_cmd, 'run', '//tfx/build:gen_proto'],\n+ [self._bazel_cmd, 'run', '//build:gen_proto'],\n # Bazel should be invoked in a directo...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Project can't be cloned correctly on macOS due to case insensitivity Under the `tfx` folder there's a folder called `build` and a bazel file called `BUILD`. Because macOS is by default case insensitive, only ...
akvo__akvo-rsr-3604
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom djang...
[ { "content": "# -*- coding: utf-8 -*-\n\n# Akvo RSR is covered by the GNU Affero General Public License.\n# See more details in the license.txt file located at the root folder of the Akvo RSR module.\n# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.\n\nfrom djang...
diff --git a/akvo/rest/views/report.py b/akvo/rest/views/report.py index 005b829a79..9060551a8d 100644 --- a/akvo/rest/views/report.py +++ b/akvo/rest/views/report.py @@ -58,7 +58,7 @@ def project_reports(request, project_pk): project = get_object_or_404(Project, pk=project_pk) reports = Report.objects.pref...
Organisation report shown in project reports page The "Project overview" report is displayed on the project report page, which is an organisation report and should not be displayed on the project report page.
diff --git a/akvo/rest/views/report.py b/akvo/rest/views/report.py --- a/akvo/rest/views/report.py +++ b/akvo/rest/views/report.py @@ -58,7 +58,7 @@ project = get_object_or_404(Project, pk=project_pk) reports = Report.objects.prefetch_related('formats', 'organisations')\ - .filter...
{"golden_diff": "diff --git a/akvo/rest/views/report.py b/akvo/rest/views/report.py\n--- a/akvo/rest/views/report.py\n+++ b/akvo/rest/views/report.py\n@@ -58,7 +58,7 @@\n \n project = get_object_or_404(Project, pk=project_pk)\n reports = Report.objects.prefetch_related('formats', 'organisations')\\\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Organisation report shown in project reports page The "Project overview" report is displayed on the project report page, which is an organisation report and should not be displayed on the project report page...
numba__numba-3241
[ { "content": "from __future__ import print_function, division, absolute_import\n\nimport numpy as np\n\nfrom collections import namedtuple\n\nfrom numba import types, utils\nfrom numba.typing.templates import (AttributeTemplate, AbstractTemplate,\n infer, infer_getattr, signat...
[ { "content": "from __future__ import print_function, division, absolute_import\n\nimport numpy as np\n\nfrom collections import namedtuple\n\nfrom numba import types, utils\nfrom numba.typing.templates import (AttributeTemplate, AbstractTemplate,\n infer, infer_getattr, signat...
diff --git a/numba/tests/test_fancy_indexing.py b/numba/tests/test_fancy_indexing.py index fd8be585bde..efa037ba5ac 100644 --- a/numba/tests/test_fancy_indexing.py +++ b/numba/tests/test_fancy_indexing.py @@ -117,6 +117,16 @@ def test_getitem_tuple_and_ellipsis(self): self.check_getitem_indices(arr, indices)...
Ellipsis indexing and assignment not working when needed number of `:` is zero I was trying to index using `...` on both sides of assignment so I could use the same function for inputs with 1, 2, or N dimensions. Here is code for the MCVE (using `numba` 0.39.0): ```python import numpy as np import numba def fu...
diff --git a/numba/typing/arraydecl.py b/numba/typing/arraydecl.py --- a/numba/typing/arraydecl.py +++ b/numba/typing/arraydecl.py @@ -144,7 +144,11 @@ elif not check_contiguity(right_indices[::-1]): layout = 'A' - res = ary.copy(ndim=ndim, layout=layout) + if ndim == 0: + ...
{"golden_diff": "diff --git a/numba/typing/arraydecl.py b/numba/typing/arraydecl.py\n--- a/numba/typing/arraydecl.py\n+++ b/numba/typing/arraydecl.py\n@@ -144,7 +144,11 @@\n elif not check_contiguity(right_indices[::-1]):\n layout = 'A'\n \n- res = ary.copy(ndim=ndim, layout=layout)\n...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Ellipsis indexing and assignment not working when needed number of `:` is zero I was trying to index using `...` on both sides of assignment so I could use the same function for inputs with 1, 2, or N dimensi...
Theano__Theano-4343
[ { "content": "\"\"\"\nAbstract conv interface\n\"\"\"\nfrom __future__ import absolute_import, print_function, division\n\nimport logging\nfrom six import reraise, integer_types\nimport sys\n\nimport theano\n\nfrom theano.tensor import as_tensor_variable, patternbroadcast\nfrom theano.tensor import get_scalar_c...
[ { "content": "\"\"\"\nAbstract conv interface\n\"\"\"\nfrom __future__ import absolute_import, print_function, division\n\nimport logging\nfrom six import reraise, integer_types\nimport sys\n\nimport theano\n\nfrom theano.tensor import as_tensor_variable, patternbroadcast\nfrom theano.tensor import get_scalar_c...
diff --git a/theano/tensor/nnet/abstract_conv.py b/theano/tensor/nnet/abstract_conv.py index c3da886ffd5..065102451a8 100644 --- a/theano/tensor/nnet/abstract_conv.py +++ b/theano/tensor/nnet/abstract_conv.py @@ -567,7 +567,7 @@ def bilinear_upsampling(input, subsample=(r...
Bilinear_Upsampling requires to specify batch_size and num_input_channels Referring to this line: https://github.com/Theano/Theano/blob/master/theano/tensor/nnet/abstract_conv.py#L570 this piece of code doesn't work with `batch_size` and/or `num_input_channels` set to `None` it requires to specify the dimensions as sc...
diff --git a/theano/tensor/nnet/abstract_conv.py b/theano/tensor/nnet/abstract_conv.py --- a/theano/tensor/nnet/abstract_conv.py +++ b/theano/tensor/nnet/abstract_conv.py @@ -567,7 +567,7 @@ subsample=(ratio, ratio), filter_...
{"golden_diff": "diff --git a/theano/tensor/nnet/abstract_conv.py b/theano/tensor/nnet/abstract_conv.py\n--- a/theano/tensor/nnet/abstract_conv.py\n+++ b/theano/tensor/nnet/abstract_conv.py\n@@ -567,7 +567,7 @@\n subsample=(ratio, ratio),\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bilinear_Upsampling requires to specify batch_size and num_input_channels Referring to this line: https://github.com/Theano/Theano/blob/master/theano/tensor/nnet/abstract_conv.py#L570 this piece of code does...
openshift__openshift-ansible-3914
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# vim: expandtab:tabstop=4:shiftwidth=4\n'''\nCustom filters for use in openshift-master\n'''\nimport copy\nimport sys\n\n# pylint import-error disabled because pylint cannot find the package\n# when installed in a virtualenv\nfrom distutils.version impo...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n# vim: expandtab:tabstop=4:shiftwidth=4\n'''\nCustom filters for use in openshift-master\n'''\nimport copy\nimport sys\n\n# pylint import-error disabled because pylint cannot find the package\n# when installed in a virtualenv\nfrom distutils.version impo...
diff --git a/roles/openshift_master_facts/filter_plugins/openshift_master.py b/roles/openshift_master_facts/filter_plugins/openshift_master.py index e570392ffd8..386f544ea06 100644 --- a/roles/openshift_master_facts/filter_plugins/openshift_master.py +++ b/roles/openshift_master_facts/filter_plugins/openshift_master.py...
Long DN string with spaces can cause incorrect YAML to be generated in master-config #### Description I have a configuration file where my settings for an LDAP identity provider has a long string containing spaces, when this is converted to YAML, line feeds are inserted on some of the longer DN/LDAP filter strings, th...
diff --git a/roles/openshift_master_facts/filter_plugins/openshift_master.py b/roles/openshift_master_facts/filter_plugins/openshift_master.py --- a/roles/openshift_master_facts/filter_plugins/openshift_master.py +++ b/roles/openshift_master_facts/filter_plugins/openshift_master.py @@ -496,6 +496,7 @@ return u...
{"golden_diff": "diff --git a/roles/openshift_master_facts/filter_plugins/openshift_master.py b/roles/openshift_master_facts/filter_plugins/openshift_master.py\n--- a/roles/openshift_master_facts/filter_plugins/openshift_master.py\n+++ b/roles/openshift_master_facts/filter_plugins/openshift_master.py\n@@ -496,6 +496,7 ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Long DN string with spaces can cause incorrect YAML to be generated in master-config #### Description I have a configuration file where my settings for an LDAP identity provider has a long string containing ...
beeware__toga-1078
[ { "content": "from toga import GROUP_BREAK, SECTION_BREAK\n\nfrom .libs import Size, WinForms\n\n\nclass WinFormsViewport:\n def __init__(self, native, frame):\n self.native = native\n self.frame = frame\n self.baseline_dpi = 96\n\n @property\n def width(self):\n # Treat `na...
[ { "content": "from toga import GROUP_BREAK, SECTION_BREAK\n\nfrom .libs import Size, WinForms\n\n\nclass WinFormsViewport:\n def __init__(self, native, frame):\n self.native = native\n self.frame = frame\n self.baseline_dpi = 96\n\n @property\n def width(self):\n # Treat `na...
diff --git a/src/winforms/toga_winforms/window.py b/src/winforms/toga_winforms/window.py index 4ad54ae907..ff5305b782 100644 --- a/src/winforms/toga_winforms/window.py +++ b/src/winforms/toga_winforms/window.py @@ -187,7 +187,7 @@ def open_file_dialog(self, title, initial_directory, file_types, multiselect): i...
toga-winforms\windows.py openFileDialog needs an "s" **Describe the bug** When using multiselect = True in winforms the returned value is a single file because if dialog.ShowDialog() == WinForms.DialogResult.OK: return dialog.FileName should be if dialog.ShowDialog() == WinForms.DialogRes...
diff --git a/src/winforms/toga_winforms/window.py b/src/winforms/toga_winforms/window.py --- a/src/winforms/toga_winforms/window.py +++ b/src/winforms/toga_winforms/window.py @@ -187,7 +187,7 @@ if multiselect: dialog.Multiselect = True if dialog.ShowDialog() == WinForms.DialogResult.OK: ...
{"golden_diff": "diff --git a/src/winforms/toga_winforms/window.py b/src/winforms/toga_winforms/window.py\n--- a/src/winforms/toga_winforms/window.py\n+++ b/src/winforms/toga_winforms/window.py\n@@ -187,7 +187,7 @@\n if multiselect:\n dialog.Multiselect = True\n if dialog.ShowDialog() == Win...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- toga-winforms\windows.py openFileDialog needs an "s" **Describe the bug** When using multiselect = True in winforms the returned value is a single file because if dialog.ShowDialog() == WinForms.Dialo...
facebookresearch__hydra-2677
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport os\n\nfrom omegaconf import DictConfig\n\nimport hydra\n\n\n@hydra.main(version_base=None)\ndef my_app(_cfg: DictConfig) -> None:\n print(f\"Working directory : {os.getcwd()}\")\n print(f\"Output directory : {hyd...
[ { "content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\nimport os\n\nfrom omegaconf import DictConfig\n\nimport hydra\n\n\n@hydra.main(version_base=None)\ndef my_app(_cfg: DictConfig) -> None:\n print(f\"Working directory : {os.getcwd()}\")\n print(\n f\"Output directo...
diff --git a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py b/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py index 922c84a523..8106e42256 100644 --- a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py +++ b/examples/tutorials/basi...
[Bug] Fix failing tests Several tests are broken on main
diff --git a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py b/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py --- a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py +++ b/examples/tutorials/basic/running_your_hydra_app/3_working_d...
{"golden_diff": "diff --git a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py b/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py\n--- a/examples/tutorials/basic/running_your_hydra_app/3_working_directory/my_app.py\n+++ b/examples/tutorials/basic/running_your_hy...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [Bug] Fix failing tests Several tests are broken on main --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES --- Path: `ex...
Pycord-Development__pycord-888
[ { "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without r...
[ { "content": "\"\"\"\nThe MIT License (MIT)\n\nCopyright (c) 2015-2021 Rapptz\nCopyright (c) 2021-present Pycord Development\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the \"Software\"),\nto deal in the Software without r...
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 57d5955be8..ed8bc60263 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -314,7 +314,7 @@ class be provided, it must be similar enough to :class:`.Context`\'s ctx.invoked_with = invoker # type-chec...
case_insensitive not working properly in 2.0.0b1 ### Summary Commands will only be accepted if they are full lowercase ### Reproduction Steps Implement command with not only lowercase letters Add case_insensitive=True Command is only accessible with full lowercase Tested the same setup in 2.0.0b1 and 1.7...
diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -314,7 +314,7 @@ ctx.invoked_with = invoker # type-checker fails to narrow invoked_prefix type. ctx.prefix = invoked_prefix # type: ignore - ct...
{"golden_diff": "diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py\n--- a/discord/ext/commands/bot.py\n+++ b/discord/ext/commands/bot.py\n@@ -314,7 +314,7 @@\n ctx.invoked_with = invoker\n # type-checker fails to narrow invoked_prefix type.\n ctx.prefix = invoked_prefix # t...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- case_insensitive not working properly in 2.0.0b1 ### Summary Commands will only be accepted if they are full lowercase ### Reproduction Steps Implement command with not only lowercase letters Add ca...
django__channels-1886
[ { "content": "class BaseMiddleware:\n \"\"\"\n Base class for implementing ASGI middleware. Inherit from this and\n override the setup() method if you want to do things before you\n get to.\n\n Note that subclasses of this are not self-safe; don't store state on\n the instance, as it serves mu...
[ { "content": "class BaseMiddleware:\n \"\"\"\n Base class for implementing ASGI middleware.\n\n Note that subclasses of this are not self-safe; don't store state on\n the instance, as it serves multiple application instances. Instead, use\n scope.\n \"\"\"\n\n def __init__(self, inner):\n ...
diff --git a/channels/middleware.py b/channels/middleware.py index 8fcf36531..f3b994246 100644 --- a/channels/middleware.py +++ b/channels/middleware.py @@ -1,8 +1,6 @@ class BaseMiddleware: """ - Base class for implementing ASGI middleware. Inherit from this and - override the setup() method if you want to...
Improve BaseMiddleware class docstring The class docstring of [BaseMiddleware](https://github.com/django/channels/blob/master/channels/middleware.py#L3) should be updated to explain that `__call__` (and `__init__`) must be changed for the middleware. > Base class for implementing ASGI middleware. Inherit from this ...
diff --git a/channels/middleware.py b/channels/middleware.py --- a/channels/middleware.py +++ b/channels/middleware.py @@ -1,8 +1,6 @@ class BaseMiddleware: """ - Base class for implementing ASGI middleware. Inherit from this and - override the setup() method if you want to do things before you - get to....
{"golden_diff": "diff --git a/channels/middleware.py b/channels/middleware.py\n--- a/channels/middleware.py\n+++ b/channels/middleware.py\n@@ -1,8 +1,6 @@\n class BaseMiddleware:\n \"\"\"\n- Base class for implementing ASGI middleware. Inherit from this and\n- override the setup() method if you want to do thi...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Improve BaseMiddleware class docstring The class docstring of [BaseMiddleware](https://github.com/django/channels/blob/master/channels/middleware.py#L3) should be updated to explain that `__call__` (and `__in...
cocotb__cocotb-745
[ { "content": "''' Copyright (c) 2013 Potential Ventures Ltd\nCopyright (c) 2013 SolarFlare Communications Inc\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * Redistributions of source ...
[ { "content": "''' Copyright (c) 2013 Potential Ventures Ltd\nCopyright (c) 2013 SolarFlare Communications Inc\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n * Redistributions of source ...
diff --git a/cocotb/triggers.py b/cocotb/triggers.py index ad59ce7a11..ec69f9a1d0 100644 --- a/cocotb/triggers.py +++ b/cocotb/triggers.py @@ -401,7 +401,13 @@ def set(self, data=None): def wait(self): """This can be yielded to block this coroutine - until another wakes it""" + until anoth...
Waiting on an event that has already fired will hang forever We just need to check that if we have already fired then return a NullTrigger() [Need to modify this function](https://github.com/potentialventures/cocotb/blob/0bb751d5bb80f75e7a03284284f0d46caa209ee4/cocotb/triggers.py#L402) ```python def wait(se...
diff --git a/cocotb/triggers.py b/cocotb/triggers.py --- a/cocotb/triggers.py +++ b/cocotb/triggers.py @@ -401,7 +401,13 @@ def wait(self): """This can be yielded to block this coroutine - until another wakes it""" + until another wakes it + + If the Event has already been fired, th...
{"golden_diff": "diff --git a/cocotb/triggers.py b/cocotb/triggers.py\n--- a/cocotb/triggers.py\n+++ b/cocotb/triggers.py\n@@ -401,7 +401,13 @@\n \n def wait(self):\n \"\"\"This can be yielded to block this coroutine\n- until another wakes it\"\"\"\n+ until another wakes it\n+\n+ If the...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Waiting on an event that has already fired will hang forever We just need to check that if we have already fired then return a NullTrigger() [Need to modify this function](https://github.com/potentialventu...
e-valuation__EvaP-728
[ { "content": "from django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import transaction\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.utils.translation import ugettext as _\n\nfrom evap.evaluation.auth import participant_required...
[ { "content": "from django.contrib import messages\nfrom django.core.exceptions import PermissionDenied\nfrom django.db import transaction\nfrom django.shortcuts import get_object_or_404, redirect, render\nfrom django.utils.translation import ugettext as _\n\nfrom evap.evaluation.auth import participant_required...
diff --git a/evap/static/css/evap.css b/evap/static/css/evap.css index 7a10b6fb7e..83c59be318 100644 --- a/evap/static/css/evap.css +++ b/evap/static/css/evap.css @@ -294,12 +294,12 @@ Side notes for calling out things /* Themes for different contexts */ .bs-callout-danger { - background-color: #fcf2f2; - bor...
Warning in courses with small number of participants In courses with 5 or less participants a warning should be shown above the course's questionnaire: _This course has only a small number of participants. Please remember that your comments will be visible for the responsible person and the contributors you're evaluat...
diff --git a/evap/student/views.py b/evap/student/views.py --- a/evap/student/views.py +++ b/evap/student/views.py @@ -76,6 +76,7 @@ course_form_group=course_form_group, contributor_form_groups=contributor_form_groups, course=course, + participants_warni...
{"golden_diff": "diff --git a/evap/student/views.py b/evap/student/views.py\n--- a/evap/student/views.py\n+++ b/evap/student/views.py\n@@ -76,6 +76,7 @@\n course_form_group=course_form_group,\n contributor_form_groups=contributor_form_groups,\n course=course,\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Warning in courses with small number of participants In courses with 5 or less participants a warning should be shown above the course's questionnaire: _This course has only a small number of participants. P...
WordPress__openverse-api-723
[ { "content": "from drf_yasg import openapi\nfrom drf_yasg.inspectors import SwaggerAutoSchema\nfrom drf_yasg.utils import filter_none, force_real_str\n\n\nclass CustomAutoSchema(SwaggerAutoSchema):\n def get_operation(self, operation_keys=None):\n operation_keys = operation_keys or self.operation_keys...
[ { "content": "from drf_yasg import openapi\nfrom drf_yasg.inspectors import SwaggerAutoSchema\nfrom drf_yasg.utils import filter_none, force_real_str\n\n\nclass CustomAutoSchema(SwaggerAutoSchema):\n def get_pagination_parameters(self):\n \"\"\"\n Since the pagination params are a part of the `...
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 5676ab79e..46d7d5f24 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -142,6 +142,10 @@ jobs: - name: Start API, ingest and index test data run: just init + - name: Smoke test ReDoc site + ...
Swagger/ReDoc page raises an error ## Description <!-- Concisely describe the bug. Compare your experience with what you expected to happen. --> <!-- For example: "I clicked the 'submit' button and instead of seeing a thank you message, I saw a blank page." --> While deploying [v2.5.2](https://github.com/WordPress/open...
diff --git a/api/catalog/custom_auto_schema.py b/api/catalog/custom_auto_schema.py --- a/api/catalog/custom_auto_schema.py +++ b/api/catalog/custom_auto_schema.py @@ -4,6 +4,14 @@ class CustomAutoSchema(SwaggerAutoSchema): + def get_pagination_parameters(self): + """ + Since the pagination params ...
{"golden_diff": "diff --git a/api/catalog/custom_auto_schema.py b/api/catalog/custom_auto_schema.py\n--- a/api/catalog/custom_auto_schema.py\n+++ b/api/catalog/custom_auto_schema.py\n@@ -4,6 +4,14 @@\n \n \n class CustomAutoSchema(SwaggerAutoSchema):\n+ def get_pagination_parameters(self):\n+ \"\"\"\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Swagger/ReDoc page raises an error ## Description <!-- Concisely describe the bug. Compare your experience with what you expected to happen. --> <!-- For example: "I clicked the 'submit' button and instead of...
xorbitsai__inference-758
[ { "content": "# Copyright 2022-2023 XProbe 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 ap...
[ { "content": "# Copyright 2022-2023 XProbe 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 ap...
diff --git a/xinference/model/llm/vllm/core.py b/xinference/model/llm/vllm/core.py index ad5b9e8297..9cdfaa94b7 100644 --- a/xinference/model/llm/vllm/core.py +++ b/xinference/model/llm/vllm/core.py @@ -349,7 +349,7 @@ async def async_chat( full_prompt = self.get_prompt(prompt, chat_history, prompt_style) ...
BUG:vllm bug ### Describe the bug KeyError: [address=172.22.227.26:33767, pid=20969] 'stream' ### To Reproduce To help us to reproduce this bug, please provide information below: ``` Traceback (most recent call last): File "/home/jingtianran/anaconda3/envs/xinference/lib/python3.11/site-packages/xinference/...
diff --git a/xinference/model/llm/vllm/core.py b/xinference/model/llm/vllm/core.py --- a/xinference/model/llm/vllm/core.py +++ b/xinference/model/llm/vllm/core.py @@ -349,7 +349,7 @@ full_prompt = self.get_prompt(prompt, chat_history, prompt_style) sanitized = self._sanitize_chat_config(generate_con...
{"golden_diff": "diff --git a/xinference/model/llm/vllm/core.py b/xinference/model/llm/vllm/core.py\n--- a/xinference/model/llm/vllm/core.py\n+++ b/xinference/model/llm/vllm/core.py\n@@ -349,7 +349,7 @@\n full_prompt = self.get_prompt(prompt, chat_history, prompt_style)\n \n sanitized = self._sanitize_c...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BUG:vllm bug ### Describe the bug KeyError: [address=172.22.227.26:33767, pid=20969] 'stream' ### To Reproduce To help us to reproduce this bug, please provide information below: ``` Traceback (most ...
GeotrekCE__Geotrek-admin-2644
[ { "content": "import os\nfrom datetime import datetime\n\nfrom django.db.models import Q, Min, Max\nfrom django.db.models.functions import ExtractYear\nfrom django.conf import settings\nfrom django.utils.translation import gettext_lazy as _\nfrom django.contrib.contenttypes.fields import GenericForeignKey\nfrom...
[ { "content": "import os\nfrom datetime import datetime\n\nfrom django.db.models import Q, Min, Max\nfrom django.db.models.functions import ExtractYear\nfrom django.conf import settings\nfrom django.utils.translation import gettext_lazy as _\nfrom django.contrib.contenttypes.fields import GenericForeignKey\nfrom...
diff --git a/geotrek/maintenance/models.py b/geotrek/maintenance/models.py index 195fc6e232..1b6a6b1862 100755 --- a/geotrek/maintenance/models.py +++ b/geotrek/maintenance/models.py @@ -179,9 +179,9 @@ def total_cost_mandays_verbose_name(cls): @property def total_cost(self): return self.total_cost_m...
Interventions - calcul des coûts Dans le module intervention, il y a un truc que je comprends pas trop sur le calcul des coûts, en effet les coûts ne se cumulent pas, on dirait qu'il privilégie certains postes. Par exemple si j'ajoute que la sous-traitance c'est bon : ![image](https://user-images.githubusercontent.c...
diff --git a/geotrek/maintenance/models.py b/geotrek/maintenance/models.py --- a/geotrek/maintenance/models.py +++ b/geotrek/maintenance/models.py @@ -179,9 +179,9 @@ @property def total_cost(self): return self.total_cost_mandays + \ - self.material_cost or 0 + \ - self.heliport...
{"golden_diff": "diff --git a/geotrek/maintenance/models.py b/geotrek/maintenance/models.py\n--- a/geotrek/maintenance/models.py\n+++ b/geotrek/maintenance/models.py\n@@ -179,9 +179,9 @@\n @property\n def total_cost(self):\n return self.total_cost_mandays + \\\n- self.material_cost or 0 + \\\...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Interventions - calcul des coûts Dans le module intervention, il y a un truc que je comprends pas trop sur le calcul des coûts, en effet les coûts ne se cumulent pas, on dirait qu'il privilégie certains poste...
pallets__werkzeug-1798
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.useragents\n ~~~~~~~~~~~~~~~~~~~\n\n This module provides a helper to inspect user agent strings. This module\n is far from complete but should work for most of the currently available\n browsers.\n\n\n :copyright: 2007 Pallets\n :li...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\n werkzeug.useragents\n ~~~~~~~~~~~~~~~~~~~\n\n This module provides a helper to inspect user agent strings. This module\n is far from complete but should work for most of the currently available\n browsers.\n\n\n :copyright: 2007 Pallets\n :li...
diff --git a/CHANGES.rst b/CHANGES.rst index 6193f3eec..d275a24e7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,5 +1,12 @@ .. currentmodule:: werkzeug +Version 1.0.2 +------------- + +- Add new "edg" identifier for Edge in UserAgentPreparser. + :issue:`1797` + + Version 1.0.1 ------------- diff --git a/s...
New Microsoft Edge User Agent ## Background Microsoft Edge now based on Chromium and the user agent string is updated. `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36 Edg/81.0.416.68` ## Simple Code ```python @app.route('/browser') def browser...
diff --git a/src/werkzeug/useragents.py b/src/werkzeug/useragents.py --- a/src/werkzeug/useragents.py +++ b/src/werkzeug/useragents.py @@ -47,7 +47,7 @@ ("ask jeeves", "ask"), (r"aol|america\s+online\s+browser", "aol"), (r"opera|opr", "opera"), - ("edge", "edge"), + ("edge|edg",...
{"golden_diff": "diff --git a/src/werkzeug/useragents.py b/src/werkzeug/useragents.py\n--- a/src/werkzeug/useragents.py\n+++ b/src/werkzeug/useragents.py\n@@ -47,7 +47,7 @@\n (\"ask jeeves\", \"ask\"),\n (r\"aol|america\\s+online\\s+browser\", \"aol\"),\n (r\"opera|opr\", \"opera\"),\n- (...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- New Microsoft Edge User Agent ## Background Microsoft Edge now based on Chromium and the user agent string is updated. `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrom...
ansible-collections__community.general-1082
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2015, Paul Markham <pmarkham@netrefinery.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\nDO...
[ { "content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: (c) 2015, Paul Markham <pmarkham@netrefinery.com>\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nfrom __future__ import absolute_import, division, print_function\n__metaclass__ = type\n\nDO...
diff --git a/changelogs/fragments/1081-solaris_zone-python3.yml b/changelogs/fragments/1081-solaris_zone-python3.yml new file mode 100644 index 00000000000..40cd448f5eb --- /dev/null +++ b/changelogs/fragments/1081-solaris_zone-python3.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - solaris_zone - fixed issue trying to config...
solaris_zone: zone configuration fails with python3 <!--- 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 --> ##### SUMMARY <!--- Explain ...
diff --git a/plugins/modules/system/solaris_zone.py b/plugins/modules/system/solaris_zone.py --- a/plugins/modules/system/solaris_zone.py +++ b/plugins/modules/system/solaris_zone.py @@ -193,7 +193,7 @@ self.module.fail_json(msg='Missing required argument: path') if not self.module.check_mode: -...
{"golden_diff": "diff --git a/plugins/modules/system/solaris_zone.py b/plugins/modules/system/solaris_zone.py\n--- a/plugins/modules/system/solaris_zone.py\n+++ b/plugins/modules/system/solaris_zone.py\n@@ -193,7 +193,7 @@\n self.module.fail_json(msg='Missing required argument: path')\n \n if not se...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- solaris_zone: zone configuration fails with python3 <!--- Verify first that your issue is not already reported on GitHub --> <!--- Also test if the latest release and devel branch are affected too --> <!---...
pymedusa__Medusa-6208
[ { "content": "# coding=utf-8\n\n\"\"\"Provider code for Binsearch provider.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\nfrom builtins import zip\nfrom os.path import join\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import conver...
[ { "content": "# coding=utf-8\n\n\"\"\"Provider code for Binsearch provider.\"\"\"\n\nfrom __future__ import unicode_literals\n\nimport logging\nimport re\nfrom builtins import zip\nfrom os.path import join\n\nfrom medusa import tv\nfrom medusa.bs4_parser import BS4Parser\nfrom medusa.helper.common import conver...
diff --git a/medusa/providers/nzb/binsearch.py b/medusa/providers/nzb/binsearch.py index 6e01f31858..88dd22d147 100644 --- a/medusa/providers/nzb/binsearch.py +++ b/medusa/providers/nzb/binsearch.py @@ -272,7 +272,7 @@ def download_nzb_for_post(self, result): return None # Validate that the resu...
[APP SUBMITTED]: TypeError: cannot use a string pattern on a bytes-like object ### INFO **Python Version**: `3.7.2 (default, Jan 3 2019, 02:55:40) [GCC 8.2.0]` **Operating System**: `Linux-4.9.35-v7+-armv7l-with-debian-buster-sid` **Locale**: `UTF-8` **Branch**: [develop](../tree/develop) **Database**: `44.14` **Comm...
diff --git a/medusa/providers/nzb/binsearch.py b/medusa/providers/nzb/binsearch.py --- a/medusa/providers/nzb/binsearch.py +++ b/medusa/providers/nzb/binsearch.py @@ -272,7 +272,7 @@ return None # Validate that the result has the content of a valid nzb. - if not BinSearchProvider.nzb_chec...
{"golden_diff": "diff --git a/medusa/providers/nzb/binsearch.py b/medusa/providers/nzb/binsearch.py\n--- a/medusa/providers/nzb/binsearch.py\n+++ b/medusa/providers/nzb/binsearch.py\n@@ -272,7 +272,7 @@\n return None\n \n # Validate that the result has the content of a valid nzb.\n- if not Bi...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [APP SUBMITTED]: TypeError: cannot use a string pattern on a bytes-like object ### INFO **Python Version**: `3.7.2 (default, Jan 3 2019, 02:55:40) [GCC 8.2.0]` **Operating System**: `Linux-4.9.35-v7+-armv7l...
goauthentik__authentik-3769
[ { "content": "\"\"\"root settings for authentik\"\"\"\n\nimport importlib\nimport logging\nimport os\nfrom hashlib import sha512\nfrom urllib.parse import quote_plus\n\nimport structlog\nfrom celery.schedules import crontab\nfrom sentry_sdk import set_tag\n\nfrom authentik import ENV_GIT_HASH_KEY, __version__\n...
[ { "content": "\"\"\"root settings for authentik\"\"\"\n\nimport importlib\nimport logging\nimport os\nfrom hashlib import sha512\nfrom urllib.parse import quote_plus\n\nimport structlog\nfrom celery.schedules import crontab\nfrom sentry_sdk import set_tag\n\nfrom authentik import ENV_GIT_HASH_KEY, __version__\n...
diff --git a/authentik/lib/default.yml b/authentik/lib/default.yml index 5a2428cd6db3..44925bf5acb1 100644 --- a/authentik/lib/default.yml +++ b/authentik/lib/default.yml @@ -6,6 +6,7 @@ postgresql: user: authentik port: 5432 password: 'env://POSTGRES_PASSWORD' + use_pgbouncer: false listen: listen_http...
Support HA postgresql When using a HA installation of postgresql connection problems with the api server arise during initial load of the user dashboard. Pgbouncer in transaction pooling mode requires custom settings in order to function correctly. It would be nice if the user could specify that a HA installation i...
diff --git a/authentik/root/settings.py b/authentik/root/settings.py --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -270,6 +270,12 @@ } } +if CONFIG.y_bool("postgresql.use_pgbouncer", False): + # https://docs.djangoproject.com/en/4.0/ref/databases/#transaction-pooling-server-side-cursor...
{"golden_diff": "diff --git a/authentik/root/settings.py b/authentik/root/settings.py\n--- a/authentik/root/settings.py\n+++ b/authentik/root/settings.py\n@@ -270,6 +270,12 @@\n }\n }\n \n+if CONFIG.y_bool(\"postgresql.use_pgbouncer\", False):\n+ # https://docs.djangoproject.com/en/4.0/ref/databases/#transaction...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support HA postgresql When using a HA installation of postgresql connection problems with the api server arise during initial load of the user dashboard. Pgbouncer in transaction pooling mode requires cust...
django-extensions__django-extensions-1150
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nimport fnmatch\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.core.management.color import color_style\nfrom django.template.loader import get_template\n\nfrom dja...
[ { "content": "# -*- coding: utf-8 -*-\nimport os\nimport fnmatch\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.core.management.base import BaseCommand, CommandError\nfrom django.core.management.color import color_style\nfrom django.template.loader import get_template\n\nfrom dja...
diff --git a/django_extensions/management/commands/validate_templates.py b/django_extensions/management/commands/validate_templates.py index 0e648be15..dffba7cd1 100644 --- a/django_extensions/management/commands/validate_templates.py +++ b/django_extensions/management/commands/validate_templates.py @@ -85,7 +85,7 @@ d...
validate_template raised false problems Since 1.9.8 I got this problem on our internal ci system but the files exists on the server on the path. Locally there is no error raised. ``` /home/django/.virtualenvs/abb38d6f6e8bbb5c224330bba0513c93/lib/python2.7/site-packages/django/contrib/auth/templates/registration...
diff --git a/django_extensions/management/commands/validate_templates.py b/django_extensions/management/commands/validate_templates.py --- a/django_extensions/management/commands/validate_templates.py +++ b/django_extensions/management/commands/validate_templates.py @@ -85,7 +85,7 @@ if self.ignore...
{"golden_diff": "diff --git a/django_extensions/management/commands/validate_templates.py b/django_extensions/management/commands/validate_templates.py\n--- a/django_extensions/management/commands/validate_templates.py\n+++ b/django_extensions/management/commands/validate_templates.py\n@@ -85,7 +85,7 @@\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- validate_template raised false problems Since 1.9.8 I got this problem on our internal ci system but the files exists on the server on the path. Locally there is no error raised. ``` /home/django/.vir...
xonsh__xonsh-4879
[ { "content": "\"\"\"Aliases for the xonsh shell.\"\"\"\nimport argparse\nimport collections.abc as cabc\nimport functools\nimport inspect\nimport os\nimport re\nimport sys\nimport types\nimport typing as tp\n\nimport xonsh.completers._aliases as xca\nimport xonsh.history.main as xhm\nimport xonsh.xoreutils.whic...
[ { "content": "\"\"\"Aliases for the xonsh shell.\"\"\"\nimport argparse\nimport collections.abc as cabc\nimport functools\nimport inspect\nimport os\nimport re\nimport sys\nimport types\nimport typing as tp\n\nimport xonsh.completers._aliases as xca\nimport xonsh.history.main as xhm\nimport xonsh.xoreutils.whic...
diff --git a/news/xpip_perms.rst b/news/xpip_perms.rst new file mode 100644 index 0000000000..9921f44628 --- /dev/null +++ b/news/xpip_perms.rst @@ -0,0 +1,24 @@ +**Added:** + +* <news item> + +**Changed:** + +* <news item> + +**Deprecated:** + +* <news item> + +**Removed:** + +* <news item> + +**Fixed:** + +* <news it...
xpip doesn't detect/support "pip install --user" installs of xonsh ## xonfig <details> ``` +------------------+----------------------+ | xonsh | 0.9.27 | | Git SHA | 71fe9014 | | Commit Date | Jan 29 08:58:58 2021 | | Python | 3.9.5 ...
diff --git a/xonsh/aliases.py b/xonsh/aliases.py --- a/xonsh/aliases.py +++ b/xonsh/aliases.py @@ -815,7 +815,7 @@ # XXX: Does windows have an installation mode that requires UAC? return basecmd elif not os.access(os.path.dirname(sys.executable), os.W_OK): - return ["sudo"]...
{"golden_diff": "diff --git a/xonsh/aliases.py b/xonsh/aliases.py\n--- a/xonsh/aliases.py\n+++ b/xonsh/aliases.py\n@@ -815,7 +815,7 @@\n # XXX: Does windows have an installation mode that requires UAC?\n return basecmd\n elif not os.access(os.path.dirname(sys.executable), os.W_OK):\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- xpip doesn't detect/support "pip install --user" installs of xonsh ## xonfig <details> ``` +------------------+----------------------+ | xonsh | 0.9.27 | | Git SHA |...
pypi__warehouse-8550
[ { "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/warehouse/legacy/api/json.py b/warehouse/legacy/api/json.py index 234ce5d867ea..8ce44a1c30e5 100644 --- a/warehouse/legacy/api/json.py +++ b/warehouse/legacy/api/json.py @@ -190,7 +190,7 @@ def json_release(release, request): "home_page": release.home_page, "download_url": release...
/pypi/{package}/{version}/json: yanking an older release updates latest release's yanked_reason field **Describe the bug** Yanking an older version of a package leads to unexpected side-effect for latest version's package info provided via the JSON endpoint. In particular, the `yanked_reason` field gets updated. **...
diff --git a/warehouse/legacy/api/json.py b/warehouse/legacy/api/json.py --- a/warehouse/legacy/api/json.py +++ b/warehouse/legacy/api/json.py @@ -190,7 +190,7 @@ "home_page": release.home_page, "download_url": release.download_url, "yanked": release.yanked, - "yanked_r...
{"golden_diff": "diff --git a/warehouse/legacy/api/json.py b/warehouse/legacy/api/json.py\n--- a/warehouse/legacy/api/json.py\n+++ b/warehouse/legacy/api/json.py\n@@ -190,7 +190,7 @@\n \"home_page\": release.home_page,\n \"download_url\": release.download_url,\n \"yanked\": release.y...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- /pypi/{package}/{version}/json: yanking an older release updates latest release's yanked_reason field **Describe the bug** Yanking an older version of a package leads to unexpected side-effect for latest ver...
translate__pootle-5160
[ { "content": "# -*- 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 information.\n\nimport os\nimp...
[ { "content": "# -*- 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 information.\n\nimport os\nimp...
diff --git a/pytest_pootle/plugin.py b/pytest_pootle/plugin.py index 504bf1a2293..57bdfb8f4fa 100644 --- a/pytest_pootle/plugin.py +++ b/pytest_pootle/plugin.py @@ -85,7 +85,7 @@ def tests_use_migration(request, tests_use_db): @pytest.fixture(autouse=True, scope='session') def setup_db_if_needed(request, tests_use_db...
Ensure tests can be run with `--reuse-db` When iterating over a test that require DB access (or a few of them), currently a site-wide setup is made which in such scenario ends up being relatively time-consuming and tedious. Ideally one could use [pytest-django's `--reuse-db` flag](http://pytest-django.readthedocs.org/...
diff --git a/pytest_pootle/plugin.py b/pytest_pootle/plugin.py --- a/pytest_pootle/plugin.py +++ b/pytest_pootle/plugin.py @@ -85,7 +85,7 @@ @pytest.fixture(autouse=True, scope='session') def setup_db_if_needed(request, tests_use_db): """Sets up the site DB only if tests requested to use the DB (autouse).""" - ...
{"golden_diff": "diff --git a/pytest_pootle/plugin.py b/pytest_pootle/plugin.py\n--- a/pytest_pootle/plugin.py\n+++ b/pytest_pootle/plugin.py\n@@ -85,7 +85,7 @@\n @pytest.fixture(autouse=True, scope='session')\n def setup_db_if_needed(request, tests_use_db):\n \"\"\"Sets up the site DB only if tests requested to us...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Ensure tests can be run with `--reuse-db` When iterating over a test that require DB access (or a few of them), currently a site-wide setup is made which in such scenario ends up being relatively time-consumi...
pypi__warehouse-6294
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
[ { "content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw...
diff --git a/tests/unit/forklift/test_legacy.py b/tests/unit/forklift/test_legacy.py index 36d3378cb7b3..003610d8d508 100644 --- a/tests/unit/forklift/test_legacy.py +++ b/tests/unit/forklift/test_legacy.py @@ -170,6 +170,7 @@ def test_validate_legacy_dist_req_valid(self, requirement): "_foo", ...
PyPI accepts packages with dependencies on local versions (e.g., 0.1.0+local) PyPI accepts packages with dependencies on local versions (e.g., 0.1.0+local). I'm not sure if this is intentional or not, since PyPI will reject packages whose version is a local version. I tested this was the case using this test package...
diff --git a/warehouse/forklift/legacy.py b/warehouse/forklift/legacy.py --- a/warehouse/forklift/legacy.py +++ b/warehouse/forklift/legacy.py @@ -252,6 +252,11 @@ "Can't have direct dependency: {!r}".format(requirement) ) + if any(packaging.version.Version(spec.version).local for spec in req...
{"golden_diff": "diff --git a/warehouse/forklift/legacy.py b/warehouse/forklift/legacy.py\n--- a/warehouse/forklift/legacy.py\n+++ b/warehouse/forklift/legacy.py\n@@ -252,6 +252,11 @@\n \"Can't have direct dependency: {!r}\".format(requirement)\n )\n \n+ if any(packaging.version.Version(spec.vers...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- PyPI accepts packages with dependencies on local versions (e.g., 0.1.0+local) PyPI accepts packages with dependencies on local versions (e.g., 0.1.0+local). I'm not sure if this is intentional or not, since P...
pyqtgraph__pyqtgraph-2888
[ { "content": "import warnings\n\nfrom ..Qt import QtCore, QtGui, QtWidgets\nfrom ..widgets.VerticalLabel import VerticalLabel\nfrom .DockDrop import DockDrop\n\n\nclass Dock(QtWidgets.QWidget):\n\n sigStretchChanged = QtCore.Signal()\n sigClosed = QtCore.Signal(object)\n\n def __init__(self, name, area...
[ { "content": "import warnings\n\nfrom ..Qt import QtCore, QtGui, QtWidgets\nfrom ..widgets.VerticalLabel import VerticalLabel\nfrom .DockDrop import DockDrop\n\n\nclass Dock(QtWidgets.QWidget):\n\n sigStretchChanged = QtCore.Signal()\n sigClosed = QtCore.Signal(object)\n\n def __init__(self, name, area...
diff --git a/pyqtgraph/dockarea/Dock.py b/pyqtgraph/dockarea/Dock.py index 99449e1b71..26e43b26ae 100644 --- a/pyqtgraph/dockarea/Dock.py +++ b/pyqtgraph/dockarea/Dock.py @@ -210,7 +210,7 @@ def container(self): def containerChanged(self, c): if self._container is not None: # ask old containe...
Dock restoreState fails silently if a dock object is the only item in a V- or HContainer ### Short description Calling restoreState() on a dockArea where a dock is the only object inside a container leads to the state being not correctly restored. I don't know how it happened that a dock could appear as the only item...
diff --git a/pyqtgraph/dockarea/Dock.py b/pyqtgraph/dockarea/Dock.py --- a/pyqtgraph/dockarea/Dock.py +++ b/pyqtgraph/dockarea/Dock.py @@ -210,7 +210,7 @@ def containerChanged(self, c): if self._container is not None: # ask old container to close itself if it is no longer needed - ...
{"golden_diff": "diff --git a/pyqtgraph/dockarea/Dock.py b/pyqtgraph/dockarea/Dock.py\n--- a/pyqtgraph/dockarea/Dock.py\n+++ b/pyqtgraph/dockarea/Dock.py\n@@ -210,7 +210,7 @@\n def containerChanged(self, c):\n if self._container is not None:\n # ask old container to close itself if it is no long...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Dock restoreState fails silently if a dock object is the only item in a V- or HContainer ### Short description Calling restoreState() on a dockArea where a dock is the only object inside a container leads to...
interactions-py__interactions.py-89
[ { "content": "import logging\nimport typing\nimport discord\nfrom inspect import iscoroutinefunction, getdoc\nfrom discord.ext import commands\nfrom . import http\nfrom . import model\nfrom . import error\nfrom . import context\nfrom .utils import manage_commands\n\n\nclass SlashCommand:\n \"\"\"\n Slash ...
[ { "content": "import logging\nimport typing\nimport discord\nfrom inspect import iscoroutinefunction, getdoc\nfrom discord.ext import commands\nfrom . import http\nfrom . import model\nfrom . import error\nfrom . import context\nfrom .utils import manage_commands\n\n\nclass SlashCommand:\n \"\"\"\n Slash ...
diff --git a/discord_slash/client.py b/discord_slash/client.py index 1e55ddf6e..8818e166d 100644 --- a/discord_slash/client.py +++ b/discord_slash/client.py @@ -425,8 +425,8 @@ def add_subcommand(self, name = name.lower() description = description or getdoc(cmd) - if name in self.commands: - ...
Subcommands are registered to guilds where there are not allowed I've noticed that when I use `guild_ids` on a subcommand for a command which is shared between multiple guilds, that subcommand is registered to all guilds where one of its subcommands is allowed. ## Steps 1. Register a subcommand `s1` for command `c`...
diff --git a/discord_slash/client.py b/discord_slash/client.py --- a/discord_slash/client.py +++ b/discord_slash/client.py @@ -425,8 +425,8 @@ name = name.lower() description = description or getdoc(cmd) - if name in self.commands: - tgt = self.commands[name] + if base in se...
{"golden_diff": "diff --git a/discord_slash/client.py b/discord_slash/client.py\n--- a/discord_slash/client.py\n+++ b/discord_slash/client.py\n@@ -425,8 +425,8 @@\n name = name.lower()\n description = description or getdoc(cmd)\n \n- if name in self.commands:\n- tgt = self.commands[nam...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Subcommands are registered to guilds where there are not allowed I've noticed that when I use `guild_ids` on a subcommand for a command which is shared between multiple guilds, that subcommand is registered t...
translate__pootle-5899
[ { "content": "# -*- 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 information.\n\nimport logging...
[ { "content": "# -*- 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 information.\n\nimport logging...
diff --git a/pootle/apps/pootle_translationproject/models.py b/pootle/apps/pootle_translationproject/models.py index efcf865375f..496d5e89ac0 100644 --- a/pootle/apps/pootle_translationproject/models.py +++ b/pootle/apps/pootle_translationproject/models.py @@ -438,7 +438,10 @@ def scan_projects(**kwargs): if not c...
Add language on pootle_fs/xliff support Ubuntu 16.04 Pootle 2.8.0b3 Have succesfully created a pootle_fs project. Based on xliff, I put a file with my GNU style "messages.<language_code>.<ext>" I tried french and templates as language, both are taken, uploaded and I can translate. But when I add any language, my RQwor...
diff --git a/pootle/apps/pootle_translationproject/models.py b/pootle/apps/pootle_translationproject/models.py --- a/pootle/apps/pootle_translationproject/models.py +++ b/pootle/apps/pootle_translationproject/models.py @@ -438,7 +438,10 @@ if not created or raw: return - for project in Project.object...
{"golden_diff": "diff --git a/pootle/apps/pootle_translationproject/models.py b/pootle/apps/pootle_translationproject/models.py\n--- a/pootle/apps/pootle_translationproject/models.py\n+++ b/pootle/apps/pootle_translationproject/models.py\n@@ -438,7 +438,10 @@\n if not created or raw:\n return\n \n- for p...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add language on pootle_fs/xliff support Ubuntu 16.04 Pootle 2.8.0b3 Have succesfully created a pootle_fs project. Based on xliff, I put a file with my GNU style "messages.<language_code>.<ext>" I tried frenc...
nonebot__nonebot2-430
[ { "content": "from datetime import datetime, timedelta\nfrom io import BytesIO\nfrom ipaddress import IPv4Address\nfrom typing import Any, Dict, List, NoReturn, Optional, Tuple, Union\n\nimport httpx\n\nfrom nonebot.config import Config\nfrom nonebot.typing import overrides\nfrom nonebot.adapters import Bot as ...
[ { "content": "from datetime import datetime, timedelta\nfrom io import BytesIO\nfrom ipaddress import IPv4Address\nfrom typing import Any, Dict, List, NoReturn, Optional, Tuple, Union\n\nimport httpx\n\nfrom nonebot.adapters import Bot as BaseBot\nfrom nonebot.config import Config\nfrom nonebot.drivers import D...
diff --git a/docs/.vuepress/public/plugins.json b/docs/.vuepress/public/plugins.json index 66603ac8d2d7..035737964633 100644 --- a/docs/.vuepress/public/plugins.json +++ b/docs/.vuepress/public/plugins.json @@ -278,5 +278,29 @@ "desc": "用于让机器人撤回自己发出的消息", "author": "MeetWq", "repo": "https://github.com/Me...
Bug: mirai adapter调用upload_image上传图片报错 **描述问题:** mirai adapter调用upload_image上传图片报错: ```powershell httpx.HTTPStatusError: 400 Client Error: Bad Request for url: http://127.0.0.1:8000/uploadImage For more information check: https://httpstatuses.com/400 ``` **如何复现?** ```python with open('file.png', 'rb') a...
diff --git a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py --- a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py +++ b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py @@ -95,6 +95,7 @@ """ files = {...
{"golden_diff": "diff --git a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py\n--- a/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py\n+++ b/packages/nonebot-adapter-mirai/nonebot/adapters/mirai/bot.py\n@@ -95,6 +95,7 @@\n \...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Bug: mirai adapter调用upload_image上传图片报错 **描述问题:** mirai adapter调用upload_image上传图片报错: ```powershell httpx.HTTPStatusError: 400 Client Error: Bad Request for url: http://127.0.0.1:8000/uploadImage For mo...
conda__conda-5232
[ { "content": "# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\nfrom __future__ import absolute_import, division, print_function, u...
[ { "content": "# (c) 2012-2013 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\nfrom __future__ import absolute_import, division, print_function, u...
diff --git a/conda/cli/main_config.py b/conda/cli/main_config.py index 1d44ce1468b..33b44afecc9 100644 --- a/conda/cli/main_config.py +++ b/conda/cli/main_config.py @@ -423,8 +423,12 @@ def clean_element_type(element_types): # config.rc_keys if not args.get: - with open(rc_path, 'w') as rc: - ...
conda config stack trace when can't write config file This situation should be handled nicer. `conda config` doesn't have permission to write the config file. Thanks. ``` An unexpected error has occurred, please consider sending the following traceback to the conda GitHub issue tracker at: https://github.com/c...
diff --git a/conda/cli/main_config.py b/conda/cli/main_config.py --- a/conda/cli/main_config.py +++ b/conda/cli/main_config.py @@ -423,8 +423,12 @@ # config.rc_keys if not args.get: - with open(rc_path, 'w') as rc: - rc.write(yaml_dump(rc_config)) + try: + with open(rc_pa...
{"golden_diff": "diff --git a/conda/cli/main_config.py b/conda/cli/main_config.py\n--- a/conda/cli/main_config.py\n+++ b/conda/cli/main_config.py\n@@ -423,8 +423,12 @@\n \n # config.rc_keys\n if not args.get:\n- with open(rc_path, 'w') as rc:\n- rc.write(yaml_dump(rc_config))\n+ try:\n+...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- conda config stack trace when can't write config file This situation should be handled nicer. `conda config` doesn't have permission to write the config file. Thanks. ``` An unexpected error has occurred,...
evennia__evennia-3042
[ { "content": "\"\"\"\nXYZGrid - Griatch 2021\n\n\"\"\"\n\nfrom . import commands # noqa\nfrom . import example # noqa\nfrom . import launchcmd # noqa\nfrom . import prototypes # noqa\nfrom . import tests # noqa\nfrom . import utils # noqa\nfrom . import xymap # noqa\nfrom . import xymap_legend # noqa\nf...
[ { "content": "\"\"\"\nXYZGrid - Griatch 2021\n\n\"\"\"\nfrom . import (\n example,\n launchcmd,\n prototypes,\n tests,\n utils,\n xymap,\n xymap_legend,\n xyzgrid,\n xyzroom,\n commands,\n)\n", "path": "evennia/contrib/grid/xyzgrid/__init__.py" } ]
diff --git a/evennia/contrib/grid/xyzgrid/__init__.py b/evennia/contrib/grid/xyzgrid/__init__.py index a33e47b6032..8fdc8700099 100644 --- a/evennia/contrib/grid/xyzgrid/__init__.py +++ b/evennia/contrib/grid/xyzgrid/__init__.py @@ -2,14 +2,15 @@ XYZGrid - Griatch 2021 """ - -from . import commands # noqa -from . ...
[BUG] "evennia xyzgrid help" causes TypeError: NoneType takes no arguments #### Describe the bug Fresh migration from git master to main and then installing xyzgrid prevents evennia xyzgrid commands from working. For example, "evennia xyzgrid help" causes TypeError: NoneType takes no arguments #### To Reproduce 1....
diff --git a/evennia/contrib/grid/xyzgrid/__init__.py b/evennia/contrib/grid/xyzgrid/__init__.py --- a/evennia/contrib/grid/xyzgrid/__init__.py +++ b/evennia/contrib/grid/xyzgrid/__init__.py @@ -2,14 +2,15 @@ XYZGrid - Griatch 2021 """ - -from . import commands # noqa -from . import example # noqa -from . import ...
{"golden_diff": "diff --git a/evennia/contrib/grid/xyzgrid/__init__.py b/evennia/contrib/grid/xyzgrid/__init__.py\n--- a/evennia/contrib/grid/xyzgrid/__init__.py\n+++ b/evennia/contrib/grid/xyzgrid/__init__.py\n@@ -2,14 +2,15 @@\n XYZGrid - Griatch 2021\n \n \"\"\"\n-\n-from . import commands # noqa\n-from . import ex...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] "evennia xyzgrid help" causes TypeError: NoneType takes no arguments #### Describe the bug Fresh migration from git master to main and then installing xyzgrid prevents evennia xyzgrid commands from wor...
mkdocs__mkdocs-3700
[ { "content": "from __future__ import annotations\n\nimport logging\nimport os\nimport warnings\nfrom typing import Any, Collection, MutableMapping\n\nimport jinja2\nimport yaml\n\ntry:\n from yaml import CSafeLoader as SafeLoader\nexcept ImportError: # pragma: no cover\n from yaml import SafeLoader # ty...
[ { "content": "from __future__ import annotations\n\nimport logging\nimport os\nimport warnings\nfrom typing import Any, Collection, MutableMapping\n\nimport jinja2\nimport yaml\n\ntry:\n from yaml import CSafeLoader as SafeLoader\nexcept ImportError: # pragma: no cover\n from yaml import SafeLoader # ty...
diff --git a/mkdocs/tests/theme_tests.py b/mkdocs/tests/theme_tests.py index f9989fb3f4..ddc526bfed 100644 --- a/mkdocs/tests/theme_tests.py +++ b/mkdocs/tests/theme_tests.py @@ -104,3 +104,22 @@ def test_inherited_theme(self): ], ) self.assertEqual(theme.static_templates, {'s...
Empty mkdocs_theme.yml breaks build Hello! In the docs its [stated](https://www.mkdocs.org/dev-guide/themes/#theme-configuration) that a theme **can** have an empty `mkdocs_theme.yml` file: > However, if the theme offers no configuration options, the file is still required and can be left blank. Unfortunately thi...
diff --git a/mkdocs/theme.py b/mkdocs/theme.py --- a/mkdocs/theme.py +++ b/mkdocs/theme.py @@ -138,6 +138,9 @@ f"Please upgrade to a current version of the theme." ) + if theme_config is None: + theme_config = {} + log.debug(f"Loaded theme configuration for '{n...
{"golden_diff": "diff --git a/mkdocs/theme.py b/mkdocs/theme.py\n--- a/mkdocs/theme.py\n+++ b/mkdocs/theme.py\n@@ -138,6 +138,9 @@\n f\"Please upgrade to a current version of the theme.\"\n )\n \n+ if theme_config is None:\n+ theme_config = {}\n+\n log.debug(f\"Load...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Empty mkdocs_theme.yml breaks build Hello! In the docs its [stated](https://www.mkdocs.org/dev-guide/themes/#theme-configuration) that a theme **can** have an empty `mkdocs_theme.yml` file: > However, if t...
tensorflow__tensor2tensor-1557
[ { "content": "# coding=utf-8\n# Copyright 2019 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 2019 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/bin/t2t_trainer.py b/tensor2tensor/bin/t2t_trainer.py index e317f8078..0c76819c6 100644 --- a/tensor2tensor/bin/t2t_trainer.py +++ b/tensor2tensor/bin/t2t_trainer.py @@ -372,7 +372,8 @@ def main(argv): # Create HParams. if argv: set_hparams_from_args(argv[1:]) - hparams = create_h...
distributed training on multiple machine fails ### Description I am trying to do distributed training on multiple machines with 1 GPU each. It is failing on the workers. Please look into this! ... ### Environment information ``` OS: Linux - 18 On master i run - t2t-trainer --master=grpc://10.10.1.2:2219 --ps...
diff --git a/tensor2tensor/bin/t2t_trainer.py b/tensor2tensor/bin/t2t_trainer.py --- a/tensor2tensor/bin/t2t_trainer.py +++ b/tensor2tensor/bin/t2t_trainer.py @@ -372,7 +372,8 @@ # Create HParams. if argv: set_hparams_from_args(argv[1:]) - hparams = create_hparams() + if FLAGS.schedule != "run_std_server":...
{"golden_diff": "diff --git a/tensor2tensor/bin/t2t_trainer.py b/tensor2tensor/bin/t2t_trainer.py\n--- a/tensor2tensor/bin/t2t_trainer.py\n+++ b/tensor2tensor/bin/t2t_trainer.py\n@@ -372,7 +372,8 @@\n # Create HParams.\n if argv:\n set_hparams_from_args(argv[1:])\n- hparams = create_hparams()\n+ if FLAGS.sche...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- distributed training on multiple machine fails ### Description I am trying to do distributed training on multiple machines with 1 GPU each. It is failing on the workers. Please look into this! ... ### En...
mindsdb__lightwood-868
[ { "content": "# TODO: _add_implicit_values unit test ensures NO changes for a fully specified file.\nfrom copy import deepcopy\nfrom lightwood.helpers.templating import call, inline_dict, align\nfrom lightwood.api import dtype\nfrom lightwood.api.types import (\n JsonAI,\n TypeInformation,\n Statistica...
[ { "content": "# TODO: _add_implicit_values unit test ensures NO changes for a fully specified file.\nfrom copy import deepcopy\nfrom lightwood.helpers.templating import call, inline_dict, align\nfrom lightwood.api import dtype\nfrom lightwood.api.types import (\n JsonAI,\n TypeInformation,\n Statistica...
diff --git a/lightwood/api/json_ai.py b/lightwood/api/json_ai.py index 756377e06..5a3783ec4 100644 --- a/lightwood/api/json_ai.py +++ b/lightwood/api/json_ai.py @@ -193,7 +193,8 @@ def generate_json_ai( tss = problem_definition.timeseries_settings dtype_dict = type_information.dtypes for k in type_inform...
[TS] error if 'group by' column contains a single value If 'group by' column has single value for all cells, then error appears. Can be replicated with any ts-dataset if add filter to data select query: ``` create predictor p_name from int_name (select * from test_data.ts_dataset where location='good') predict rental...
diff --git a/lightwood/api/json_ai.py b/lightwood/api/json_ai.py --- a/lightwood/api/json_ai.py +++ b/lightwood/api/json_ai.py @@ -193,7 +193,8 @@ tss = problem_definition.timeseries_settings dtype_dict = type_information.dtypes for k in type_information.identifiers: - del dtype_dict[k] + i...
{"golden_diff": "diff --git a/lightwood/api/json_ai.py b/lightwood/api/json_ai.py\n--- a/lightwood/api/json_ai.py\n+++ b/lightwood/api/json_ai.py\n@@ -193,7 +193,8 @@\n tss = problem_definition.timeseries_settings\n dtype_dict = type_information.dtypes\n for k in type_information.identifiers:\n- del ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [TS] error if 'group by' column contains a single value If 'group by' column has single value for all cells, then error appears. Can be replicated with any ts-dataset if add filter to data select query: ``` ...
plone__Products.CMFPlone-2822
[ { "content": "# -*- coding: utf-8 -*-\nfrom Acquisition import aq_base\nfrom datetime import datetime\nfrom plone.registry.interfaces import IRegistry\nfrom plone.resource.file import FilesystemFile\nfrom plone.resource.interfaces import IResourceDirectory\nfrom Products.CMFPlone.interfaces import IBundleRegist...
[ { "content": "# -*- coding: utf-8 -*-\nfrom Acquisition import aq_base\nfrom datetime import datetime\nfrom plone.registry.interfaces import IRegistry\nfrom plone.resource.file import FilesystemFile\nfrom plone.resource.interfaces import IResourceDirectory\nfrom Products.CMFPlone.interfaces import IBundleRegist...
diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py index 2a0d20a63e..b00b4a7656 100644 --- a/Products/CMFPlone/resources/browser/combine.py +++ b/Products/CMFPlone/resources/browser/combine.py @@ -124,9 +124,9 @@ def _write_out(self, resources, postfix): ...
Plone 5.1.4 to 5.1.5 update: resource registry meta bundle generator comments first css construct of individual bundles In one of our projects, after upgrading from Plone 5.1.4 to Plone 5.1.5 A very small part of the css became broken in plone.app.mosaic layouts . Images inside a tile no longer had a "height: auto" on...
diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py --- a/Products/CMFPlone/resources/browser/combine.py +++ b/Products/CMFPlone/resources/browser/combine.py @@ -124,9 +124,9 @@ fi = StringIO() for bname, script in resources.items(): ...
{"golden_diff": "diff --git a/Products/CMFPlone/resources/browser/combine.py b/Products/CMFPlone/resources/browser/combine.py\n--- a/Products/CMFPlone/resources/browser/combine.py\n+++ b/Products/CMFPlone/resources/browser/combine.py\n@@ -124,9 +124,9 @@\n fi = StringIO()\n for bname, script in resource...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Plone 5.1.4 to 5.1.5 update: resource registry meta bundle generator comments first css construct of individual bundles In one of our projects, after upgrading from Plone 5.1.4 to Plone 5.1.5 A very small pa...
lightly-ai__lightly-1177
[ { "content": "\"\"\" Contrastive Loss Functions \"\"\"\n\n# Copyright (c) 2020. Lightly AG and its affiliates.\n# All Rights Reserved\n\nimport torch\nfrom torch import nn\n\nfrom lightly.loss.memory_bank import MemoryBankModule\nfrom lightly.utils import dist\n\n\nclass NTXentLoss(MemoryBankModule):\n \"\"\...
[ { "content": "\"\"\" Contrastive Loss Functions \"\"\"\n\n# Copyright (c) 2020. Lightly AG and its affiliates.\n# All Rights Reserved\n\nimport torch\nfrom torch import nn\n\nfrom lightly.loss.memory_bank import MemoryBankModule\nfrom lightly.utils import dist\n\n\nclass NTXentLoss(MemoryBankModule):\n \"\"\...
diff --git a/lightly/loss/ntx_ent_loss.py b/lightly/loss/ntx_ent_loss.py index 05c157f3c..f8ce8ae52 100644 --- a/lightly/loss/ntx_ent_loss.py +++ b/lightly/loss/ntx_ent_loss.py @@ -161,7 +161,8 @@ def forward(self, out0: torch.Tensor, out1: torch.Tensor): # create labels labels = torch.arang...
CUDA errors in NTXentLoss with gloo backend in multi-gpu training I was wondering if the `gloo` distributed communication package for multi-gpu training is officially supported by lightly. It seems like e.g. NTXentLoss doesn't work with `gloo` (I'm using pytorch lightning): I get CUDA errors, even when setting `gather...
diff --git a/lightly/loss/ntx_ent_loss.py b/lightly/loss/ntx_ent_loss.py --- a/lightly/loss/ntx_ent_loss.py +++ b/lightly/loss/ntx_ent_loss.py @@ -161,7 +161,8 @@ # create labels labels = torch.arange(batch_size, device=device, dtype=torch.long) - labels = labels + dist.rank() * b...
{"golden_diff": "diff --git a/lightly/loss/ntx_ent_loss.py b/lightly/loss/ntx_ent_loss.py\n--- a/lightly/loss/ntx_ent_loss.py\n+++ b/lightly/loss/ntx_ent_loss.py\n@@ -161,7 +161,8 @@\n \n # create labels\n labels = torch.arange(batch_size, device=device, dtype=torch.long)\n- labels = ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- CUDA errors in NTXentLoss with gloo backend in multi-gpu training I was wondering if the `gloo` distributed communication package for multi-gpu training is officially supported by lightly. It seems like e.g....
mars-project__mars-291
[ { "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/docs/Makefile b/docs/Makefile index e6c03e83a8..b684193665 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -13,6 +13,9 @@ BUILDDIR = build I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR) I18NSPHINXLANGS = -l zh_CN +# make mars code available for sphinx builder +export PYTHONPAT...
[BUG] Chinese document layout has a link error. <!-- Thank you for your contribution! Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue. --> **Describe the bug** A clear and concise description of what the bug is. Chinese document layout has a connection...
diff --git a/docs/source/norm_zh.py b/docs/source/norm_zh.py --- a/docs/source/norm_zh.py +++ b/docs/source/norm_zh.py @@ -130,7 +130,7 @@ # only modify recent-changed files modify_time = datetime.datetime.fromtimestamp(os.path.getmtime(path)) - if (datetime.datetime.now() - modif...
{"golden_diff": "diff --git a/docs/source/norm_zh.py b/docs/source/norm_zh.py\n--- a/docs/source/norm_zh.py\n+++ b/docs/source/norm_zh.py\n@@ -130,7 +130,7 @@\n \n # only modify recent-changed files\n modify_time = datetime.datetime.fromtimestamp(os.path.getmtime(path))\n- if (datetim...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] Chinese document layout has a link error. <!-- Thank you for your contribution! Please review https://github.com/mars-project/mars/blob/master/CONTRIBUTING.rst before opening an issue. --> **Des...
keras-team__keras-7552
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport numpy as np\n\nimport copy\nimport types as python_types\nimport warnings\n\nfrom .. import backend as K\nfrom .. import activations\nfrom .. import initializers\nfrom .. import regularizers\...
[ { "content": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport numpy as np\n\nimport copy\nimport types as python_types\nimport warnings\n\nfrom .. import backend as K\nfrom .. import activations\nfrom .. import initializers\nfrom .. import regularizers\...
diff --git a/keras/layers/core.py b/keras/layers/core.py index a89ed39f79a8..557124b5465d 100644 --- a/keras/layers/core.py +++ b/keras/layers/core.py @@ -61,7 +61,7 @@ def compute_mask(self, inputs, mask=None): def call(self, inputs): boolean_mask = K.any(K.not_equal(inputs, self.mask_value), ...
Masking a layer that has an integer dtype raises an error in TensorFlow but not Theano. The following: ```python from keras.layers import Input, Masking document = Input(shape = (10, ), dtype = "int32") mask = Masking(mask_value = 21) document_mask = mask(document) ``` produces this error: ``` ----> 5 docu...
diff --git a/keras/layers/core.py b/keras/layers/core.py --- a/keras/layers/core.py +++ b/keras/layers/core.py @@ -61,7 +61,7 @@ def call(self, inputs): boolean_mask = K.any(K.not_equal(inputs, self.mask_value), axis=-1, keepdims=True) - return inputs * K.cast(boolean_...
{"golden_diff": "diff --git a/keras/layers/core.py b/keras/layers/core.py\n--- a/keras/layers/core.py\n+++ b/keras/layers/core.py\n@@ -61,7 +61,7 @@\n def call(self, inputs):\n boolean_mask = K.any(K.not_equal(inputs, self.mask_value),\n axis=-1, keepdims=True)\n- return ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Masking a layer that has an integer dtype raises an error in TensorFlow but not Theano. The following: ```python from keras.layers import Input, Masking document = Input(shape = (10, ), dtype = "int32") ...
enthought__chaco-731
[ { "content": "\"\"\" Defines the ArrayDataSource class.\"\"\"\n\n# Major library imports\nfrom numpy import array, empty, isfinite, ones, ndarray\nimport numpy as np\n\n# Enthought library imports\nfrom traits.api import Any, Constant, Int, Tuple\n\n# Chaco imports\nfrom .base import NumericalSequenceTrait, rev...
[ { "content": "\"\"\" Defines the ArrayDataSource class.\"\"\"\n\n# Major library imports\nfrom numpy import array, empty, isfinite, ones, ndarray\nimport numpy as np\n\n# Enthought library imports\nfrom traits.api import Any, Constant, Int, Tuple\n\n# Chaco imports\nfrom .base import NumericalSequenceTrait, rev...
diff --git a/chaco/array_data_source.py b/chaco/array_data_source.py index bda9a8b08..379e6ce82 100644 --- a/chaco/array_data_source.py +++ b/chaco/array_data_source.py @@ -155,7 +155,10 @@ def get_data_mask(self): Implements AbstractDataSource. """ if self._cached_mask is None: - ...
ArrayDataSource get_mask_data() fails when data is None See this test here: https://github.com/enthought/chaco/blob/enh/data-source-tests/chaco/tests/arraydatasource_test_case.py#L108 More generally, I think that the behaviour for an empty data source is probably wrong (why a _scalar_ `0.0` instead of `array([])`?) b...
diff --git a/chaco/array_data_source.py b/chaco/array_data_source.py --- a/chaco/array_data_source.py +++ b/chaco/array_data_source.py @@ -155,7 +155,10 @@ Implements AbstractDataSource. """ if self._cached_mask is None: - return self._data, ones(len(self._data), dtype=bool) + ...
{"golden_diff": "diff --git a/chaco/array_data_source.py b/chaco/array_data_source.py\n--- a/chaco/array_data_source.py\n+++ b/chaco/array_data_source.py\n@@ -155,7 +155,10 @@\n Implements AbstractDataSource.\n \"\"\"\n if self._cached_mask is None:\n- return self._data, ones(len(self...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ArrayDataSource get_mask_data() fails when data is None See this test here: https://github.com/enthought/chaco/blob/enh/data-source-tests/chaco/tests/arraydatasource_test_case.py#L108 More generally, I thin...
meltano__meltano-7343
[ { "content": "\"\"\"Interactive configuration handler.\"\"\"\n\nfrom __future__ import annotations\n\nimport click\nfrom jinja2 import BaseLoader, Environment\nfrom rich.console import Console, Group\nfrom rich.markdown import Markdown\nfrom rich.panel import Panel\nfrom rich.table import Table\nfrom rich.text ...
[ { "content": "\"\"\"Interactive configuration handler.\"\"\"\n\nfrom __future__ import annotations\n\nfrom contextlib import suppress\n\n# NOTE: Importing the readline module enables the use of arrow\n# keys for text navigation during interactive config.\n# Refer to https://docs.python.org/3/library...
diff --git a/src/meltano/cli/interactive/config.py b/src/meltano/cli/interactive/config.py index 674aae02f7..705c79fa82 100644 --- a/src/meltano/cli/interactive/config.py +++ b/src/meltano/cli/interactive/config.py @@ -2,6 +2,14 @@ from __future__ import annotations +from contextlib import suppress + +# NOTE: Impo...
feature: Support arrow key text navigation during interactive config ### Feature scope CLI (options, error messages, logging, etc.) ### Description Currently when using interactive config, the arrow keys are interpreted as raw values, rather than as navigation controls: Examples: Pressing the up key to try to ...
diff --git a/src/meltano/cli/interactive/config.py b/src/meltano/cli/interactive/config.py --- a/src/meltano/cli/interactive/config.py +++ b/src/meltano/cli/interactive/config.py @@ -2,6 +2,14 @@ from __future__ import annotations +from contextlib import suppress + +# NOTE: Importing the readline module enables th...
{"golden_diff": "diff --git a/src/meltano/cli/interactive/config.py b/src/meltano/cli/interactive/config.py\n--- a/src/meltano/cli/interactive/config.py\n+++ b/src/meltano/cli/interactive/config.py\n@@ -2,6 +2,14 @@\n \n from __future__ import annotations\n \n+from contextlib import suppress\n+\n+# NOTE: Importing the ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- feature: Support arrow key text navigation during interactive config ### Feature scope CLI (options, error messages, logging, etc.) ### Description Currently when using interactive config, the arrow keys a...
nipy__nipype-3634
[ { "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\"\"\"PETPVC is a toolbox for partial volume correction in positron emission tomography.\"\"\"\nimport os\n\nfrom .base import (\n TraitedSpec,\n CommandLineInputSpec,\n Com...
[ { "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\"\"\"PETPVC is a toolbox for partial volume correction in positron emission tomography.\"\"\"\nimport os\n\nfrom .base import (\n TraitedSpec,\n CommandLineInputSpec,\n Com...
diff --git a/nipype/interfaces/petpvc.py b/nipype/interfaces/petpvc.py index dbd1d805ed..ac388f6b51 100644 --- a/nipype/interfaces/petpvc.py +++ b/nipype/interfaces/petpvc.py @@ -37,6 +37,7 @@ "RBV+VC", "RL", "VC", + "STC", ] @@ -75,6 +76,7 @@ class PETPVCInputSpec(CommandLineInputSpec): * M...
ENH: add STC partial volume correction to PETPVC interface ### Summary Partial Volume Correction using Single-target correction (STC) has been added to PETPVC since the Nipype PETPVC interface was created, and it would therefore be ideal if this could be added to the interface as well. ### Actual behavior The inte...
diff --git a/nipype/interfaces/petpvc.py b/nipype/interfaces/petpvc.py --- a/nipype/interfaces/petpvc.py +++ b/nipype/interfaces/petpvc.py @@ -37,6 +37,7 @@ "RBV+VC", "RL", "VC", + "STC", ] @@ -75,6 +76,7 @@ * Muller Gartner -- ``MG`` * Muller Gartner with Van-Cittert -- ``MG+VC`` ...
{"golden_diff": "diff --git a/nipype/interfaces/petpvc.py b/nipype/interfaces/petpvc.py\n--- a/nipype/interfaces/petpvc.py\n+++ b/nipype/interfaces/petpvc.py\n@@ -37,6 +37,7 @@\n \"RBV+VC\",\n \"RL\",\n \"VC\",\n+ \"STC\",\n ]\n \n \n@@ -75,6 +76,7 @@\n * Muller Gartner -- ``MG``\n * Muller Gartn...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- ENH: add STC partial volume correction to PETPVC interface ### Summary Partial Volume Correction using Single-target correction (STC) has been added to PETPVC since the Nipype PETPVC interface was created, a...
Pyomo__pyomo-797
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin...
[ { "content": "# ___________________________________________________________________________\n#\n# Pyomo: Python Optimization Modeling Objects\n# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC\n# Under the terms of Contract DE-NA0003525 with National Technology and\n# Engineerin...
diff --git a/pyomo/repn/plugins/gams_writer.py b/pyomo/repn/plugins/gams_writer.py index a8b579ef6ec..8bf28a45186 100644 --- a/pyomo/repn/plugins/gams_writer.py +++ b/pyomo/repn/plugins/gams_writer.py @@ -244,7 +244,9 @@ def split_long_line(line): "Found an 80,000+ character string with no spaces")...
gams writer, splitting lines with characters > 80,000 if line is > 80,000 the line is splitted at the last space within the fist 80,000 characters '(function 'split_long_line' of 'gams_writer.py' This mostly works but sometimes leads to an error if the space is followed by an '*' (multiply symbol).
diff --git a/pyomo/repn/plugins/gams_writer.py b/pyomo/repn/plugins/gams_writer.py --- a/pyomo/repn/plugins/gams_writer.py +++ b/pyomo/repn/plugins/gams_writer.py @@ -244,7 +244,9 @@ "Found an 80,000+ character string with no spaces") i -= 1 new_lines += line[:i] + '\n' - ...
{"golden_diff": "diff --git a/pyomo/repn/plugins/gams_writer.py b/pyomo/repn/plugins/gams_writer.py\n--- a/pyomo/repn/plugins/gams_writer.py\n+++ b/pyomo/repn/plugins/gams_writer.py\n@@ -244,7 +244,9 @@\n \"Found an 80,000+ character string with no spaces\")\n i -= 1\n new_lines ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- gams writer, splitting lines with characters > 80,000 if line is > 80,000 the line is splitted at the last space within the fist 80,000 characters '(function 'split_long_line' of 'gams_writer.py' This mostly ...
fossasia__open-event-server-6182
[ { "content": "import random\nfrom datetime import datetime\n\nimport humanize\nimport pytz\nfrom flask import url_for\nfrom flask_scrypt import generate_password_hash, generate_random_salt\nfrom sqlalchemy import event, desc\nfrom sqlalchemy.ext.hybrid import hybrid_property\nfrom sqlalchemy.sql import func\nfr...
[ { "content": "import random\nfrom datetime import datetime\n\nimport humanize\nimport pytz\nfrom flask import url_for\nfrom flask_scrypt import generate_password_hash, generate_random_salt\nfrom sqlalchemy import event, desc\nfrom sqlalchemy.ext.hybrid import hybrid_property\nfrom sqlalchemy.sql import func\nfr...
diff --git a/app/models/user.py b/app/models/user.py index 697f6a97f4..80c3f2f4c9 100644 --- a/app/models/user.py +++ b/app/models/user.py @@ -387,7 +387,7 @@ def first_access_panel(self): def can_download_tickets(self, order): permissible_users = [holder.id for holder in order.ticket_holders] + [order....
Coorganizer and owners can't download tickets, invoices Current config only allows the organizer role to download the tickets
diff --git a/app/models/user.py b/app/models/user.py --- a/app/models/user.py +++ b/app/models/user.py @@ -387,7 +387,7 @@ def can_download_tickets(self, order): permissible_users = [holder.id for holder in order.ticket_holders] + [order.user.id] - if self.is_staff or self.is_organizer(order.even...
{"golden_diff": "diff --git a/app/models/user.py b/app/models/user.py\n--- a/app/models/user.py\n+++ b/app/models/user.py\n@@ -387,7 +387,7 @@\n \n def can_download_tickets(self, order):\n permissible_users = [holder.id for holder in order.ticket_holders] + [order.user.id]\n- if self.is_staff or self...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Coorganizer and owners can't download tickets, invoices Current config only allows the organizer role to download the tickets --- END ISSUE --- Below are some code segments, each from a relevant file. One o...
zulip__zulip-20678
[ { "content": "#!/usr/bin/env python3\nimport argparse\nimport configparser\nimport datetime\nimport functools\nimport hashlib\nimport json\nimport logging\nimport os\nimport pwd\nimport random\nimport re\nimport shlex\nimport shutil\nimport subprocess\nimport sys\nimport time\nimport uuid\nfrom typing import An...
[ { "content": "#!/usr/bin/env python3\nimport argparse\nimport configparser\nimport datetime\nimport functools\nimport hashlib\nimport json\nimport logging\nimport os\nimport pwd\nimport random\nimport re\nimport shlex\nimport shutil\nimport subprocess\nimport sys\nimport time\nimport uuid\nfrom typing import An...
diff --git a/docs/production/deployment.md b/docs/production/deployment.md index e7f5cf678f78b..4b8a782a4d4af 100644 --- a/docs/production/deployment.md +++ b/docs/production/deployment.md @@ -623,6 +623,14 @@ override is useful both Docker systems (where the above algorithm might see the host's memory, not the contai...
Support restarting the server without rejecting any requests In theory, it should be possible with uwsgi and its `master=true` setting to restart the server with 0 requests being rejected due to the service being down (the approach seems to be the obvious thing of queuing requests in the socket until the new processes ...
diff --git a/scripts/lib/zulip_tools.py b/scripts/lib/zulip_tools.py --- a/scripts/lib/zulip_tools.py +++ b/scripts/lib/zulip_tools.py @@ -623,7 +623,7 @@ universal_newlines=True, stdout=subprocess.PIPE, ) - # `supercisorctl status` returns 3 if any are stopped, which is + # `supervisorctl ...
{"golden_diff": "diff --git a/scripts/lib/zulip_tools.py b/scripts/lib/zulip_tools.py\n--- a/scripts/lib/zulip_tools.py\n+++ b/scripts/lib/zulip_tools.py\n@@ -623,7 +623,7 @@\n universal_newlines=True,\n stdout=subprocess.PIPE,\n )\n- # `supercisorctl status` returns 3 if any are stopped, which i...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support restarting the server without rejecting any requests In theory, it should be possible with uwsgi and its `master=true` setting to restart the server with 0 requests being rejected due to the service b...
OCHA-DAP__hdx-ckan-1798
[ { "content": "'''\nCreated on Nov 3, 2014\n\n@author: alexandru-m-g\n'''\n\nimport logging\nimport datetime as dt\nimport decimal\n\nimport pylons.config as config\n\nimport ckan.lib.base as base\nimport ckan.logic as logic\nimport ckan.model as model\nimport ckan.common as common\nimport ckan.lib.helpers as h\...
[ { "content": "'''\nCreated on Nov 3, 2014\n\n@author: alexandru-m-g\n'''\n\nimport logging\nimport datetime as dt\nimport decimal\n\nimport pylons.config as config\n\nimport ckan.lib.base as base\nimport ckan.logic as logic\nimport ckan.model as model\nimport ckan.common as common\nimport ckan.lib.helpers as h\...
diff --git a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py index 6ebe4ce63a..2c261a6c48 100644 --- a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py +++ b/ckanext-hdx_crisis/ckanext/hdx_crisis/contro...
Ebola page: loading second page of datasets reloads to top of page Would it be easy to have it load the page at the `Datasets [41]` line?
diff --git a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py --- a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py +++ b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py @@ -54,7 ...
{"golden_diff": "diff --git a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py\n--- a/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_controller.py\n+++ b/ckanext-hdx_crisis/ckanext/hdx_crisis/controllers/crisis_cont...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Ebola page: loading second page of datasets reloads to top of page Would it be easy to have it load the page at the `Datasets [41]` line? --- END ISSUE --- Below are some code segments, each from a relevan...
plone__Products.CMFPlone-3529
[ { "content": "from AccessControl import getSecurityManager\nfrom AccessControl.Permissions import view as View\nfrom OFS.interfaces import IApplication\nfrom Products.CMFCore.permissions import ManagePortal\nfrom Products.CMFPlone.factory import _DEFAULT_PROFILE\nfrom Products.CMFPlone.factory import addPloneSi...
[ { "content": "from AccessControl import getSecurityManager\nfrom AccessControl.Permissions import view as View\nfrom OFS.interfaces import IApplication\nfrom Products.CMFCore.permissions import ManagePortal\nfrom Products.CMFPlone.factory import _DEFAULT_PROFILE\nfrom Products.CMFPlone.factory import addPloneSi...
diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py index dfa3df808c..972a6c4789 100644 --- a/Products/CMFPlone/browser/admin.py +++ b/Products/CMFPlone/browser/admin.py @@ -343,3 +343,16 @@ def __call__(self): ) return self.index() + + def can_migrate_to_volt...
Allow to migrate to Volto after updating a site to Plone 6 When Plone is updated to 6 the upgrade-view (@@plone-upgrade) should display a link to the migration to Volto. See https://github.com/plone/plone.volto/issues/55 for the migration itself.
diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py --- a/Products/CMFPlone/browser/admin.py +++ b/Products/CMFPlone/browser/admin.py @@ -343,3 +343,16 @@ ) return self.index() + + def can_migrate_to_volto(self): + if not HAS_VOLTO: + return ...
{"golden_diff": "diff --git a/Products/CMFPlone/browser/admin.py b/Products/CMFPlone/browser/admin.py\n--- a/Products/CMFPlone/browser/admin.py\n+++ b/Products/CMFPlone/browser/admin.py\n@@ -343,3 +343,16 @@\n )\n \n return self.index()\n+\n+ def can_migrate_to_volto(self):\n+ if not HAS_V...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Allow to migrate to Volto after updating a site to Plone 6 When Plone is updated to 6 the upgrade-view (@@plone-upgrade) should display a link to the migration to Volto. See https://github.com/plone/plone.vo...
Lightning-Universe__lightning-flash-597
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
[ { "content": "# Copyright The PyTorch Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required ...
diff --git a/flash/core/registry.py b/flash/core/registry.py index ff3c99c336..61794424ce 100644 --- a/flash/core/registry.py +++ b/flash/core/registry.py @@ -56,7 +56,7 @@ def get( """ matches = [e for e in self.functions if key == e["name"]] if not matches: - raise KeyError(f"Key...
Confusing KerError message for flash registry ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> ### To Reproduce Steps to reproduce the behavior: ``` from flash.image import ImageClassificationData, ImageClassifier print(ImageClassifier.backbones.get('abcd')) ``` #### Code sampl...
diff --git a/flash/core/registry.py b/flash/core/registry.py --- a/flash/core/registry.py +++ b/flash/core/registry.py @@ -56,7 +56,7 @@ """ matches = [e for e in self.functions if key == e["name"]] if not matches: - raise KeyError(f"Key: {key} is not in {repr(self)}") + ...
{"golden_diff": "diff --git a/flash/core/registry.py b/flash/core/registry.py\n--- a/flash/core/registry.py\n+++ b/flash/core/registry.py\n@@ -56,7 +56,7 @@\n \"\"\"\n matches = [e for e in self.functions if key == e[\"name\"]]\n if not matches:\n- raise KeyError(f\"Key: {key} is not ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Confusing KerError message for flash registry ## 🐛 Bug <!-- A clear and concise description of what the bug is. --> ### To Reproduce Steps to reproduce the behavior: ``` from flash.image import ...
benoitc__gunicorn-1071
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nfrom datetime import datetime\nimport os\nimport signal\nimport sys\nimport time\nimport traceback\nfrom random import randint\n\n\nfrom gunicorn import util\nfrom g...
[ { "content": "# -*- coding: utf-8 -\n#\n# This file is part of gunicorn released under the MIT license.\n# See the NOTICE for more information.\n\nfrom datetime import datetime\nimport os\nimport signal\nimport sys\nimport time\nimport traceback\nfrom random import randint\n\n\nfrom gunicorn import util\nfrom g...
diff --git a/THANKS b/THANKS index d32d1bbf8..6fb97720e 100644 --- a/THANKS +++ b/THANKS @@ -158,3 +158,4 @@ Kyle Mulka <repalviglator@yahoo.com> Marc Abramowitz <msabramo@gmail.com> Hebert J <hebert@mail.ru> Kevin Littlejohn <kevin@littlejohn.id.au> +Wolfgang Schnerring <wosc@wosc.de> diff --git a/gunicorn/workers/...
Include request URL in error message It would be really helpful if the logged error message were "Error handling request http://host/path/etc" instead of just "Error handling request".
diff --git a/gunicorn/workers/base.py b/gunicorn/workers/base.py --- a/gunicorn/workers/base.py +++ b/gunicorn/workers/base.py @@ -210,7 +210,7 @@ msg = "Invalid request from ip={ip}: {error}" self.log.debug(msg.format(ip=addr[0], error=str(exc))) else: - self.log.exception...
{"golden_diff": "diff --git a/gunicorn/workers/base.py b/gunicorn/workers/base.py\n--- a/gunicorn/workers/base.py\n+++ b/gunicorn/workers/base.py\n@@ -210,7 +210,7 @@\n msg = \"Invalid request from ip={ip}: {error}\"\n self.log.debug(msg.format(ip=addr[0], error=str(exc)))\n else:\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Include request URL in error message It would be really helpful if the logged error message were "Error handling request http://host/path/etc" instead of just "Error handling request". --- END ISSUE --- Be...
wemake-services__wemake-python-styleguide-343
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup ------------------------------...
[ { "content": "# -*- coding: utf-8 -*-\n#\n# Configuration file for the Sphinx documentation builder.\n#\n# This file does only contain a selection of the most common options. For a\n# full list see the documentation:\n# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup ------------------------------...
diff --git a/docs/conf.py b/docs/conf.py index 1d09a1952..86ca65700 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,13 +55,11 @@ def _get_project_meta(): 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.autosummary', + 'sphinx.ext.napoleon', # Used to include .md files: 'm2r',...
Replace `sphinxcontrib-napoleon` It is now bundled with `sphinx` as `sphinx.ext.napoleon`. So, we need to remove this dependency from both: - `pyproject.toml` - `docs/requirements.txt`
diff --git a/docs/conf.py b/docs/conf.py --- a/docs/conf.py +++ b/docs/conf.py @@ -55,13 +55,11 @@ 'sphinx.ext.coverage', 'sphinx.ext.viewcode', 'sphinx.ext.autosummary', + 'sphinx.ext.napoleon', # Used to include .md files: 'm2r', - # Used to write python docstrings in a readable way...
{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -55,13 +55,11 @@\n 'sphinx.ext.coverage',\n 'sphinx.ext.viewcode',\n 'sphinx.ext.autosummary',\n+ 'sphinx.ext.napoleon',\n \n # Used to include .md files:\n 'm2r',\n \n- # Used to write python...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Replace `sphinxcontrib-napoleon` It is now bundled with `sphinx` as `sphinx.ext.napoleon`. So, we need to remove this dependency from both: - `pyproject.toml` - `docs/requirements.txt` --- END ISSUE ---...
LibraryOfCongress__concordia-1208
[ { "content": "from django.conf import settings\nfrom django.conf.urls import url\nfrom django.contrib import admin\nfrom django.http import Http404, HttpResponseForbidden\nfrom django.urls import include, path\nfrom django.urls.converters import register_converter\nfrom django.views.defaults import page_not_fou...
[ { "content": "from django.conf import settings\nfrom django.conf.urls import url\nfrom django.contrib import admin\nfrom django.http import Http404, HttpResponseForbidden\nfrom django.urls import include, path\nfrom django.urls.converters import register_converter\nfrom django.views.defaults import page_not_fou...
diff --git a/concordia/urls.py b/concordia/urls.py index 748323883..61acfedcd 100644 --- a/concordia/urls.py +++ b/concordia/urls.py @@ -107,6 +107,7 @@ ), path("help-center/how-to-tag-esp/", views.simple_page, name="how-to-tag-spanish"), path("for-educators/", views.simple_page, name="for-educators"), +...
Create URL path for staff page We will create a simple page for staff. Need to create the URL path. ex - `crowd.loc.gov/for-staff`
diff --git a/concordia/urls.py b/concordia/urls.py --- a/concordia/urls.py +++ b/concordia/urls.py @@ -107,6 +107,7 @@ ), path("help-center/how-to-tag-esp/", views.simple_page, name="how-to-tag-spanish"), path("for-educators/", views.simple_page, name="for-educators"), + path("for-staff/", views.simpl...
{"golden_diff": "diff --git a/concordia/urls.py b/concordia/urls.py\n--- a/concordia/urls.py\n+++ b/concordia/urls.py\n@@ -107,6 +107,7 @@\n ),\n path(\"help-center/how-to-tag-esp/\", views.simple_page, name=\"how-to-tag-spanish\"),\n path(\"for-educators/\", views.simple_page, name=\"for-educators\"),\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Create URL path for staff page We will create a simple page for staff. Need to create the URL path. ex - `crowd.loc.gov/for-staff` --- END ISSUE --- Below are some code segments, each from a relevant fi...
spack__spack-23320
[ { "content": "# Copyright 2013-2021 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\n\nfrom spack import *\n\n\nclass Bzip2(Package, SourcewarePackage):\n \"\"\"bzip2...
[ { "content": "# Copyright 2013-2021 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\n\nfrom spack import *\n\n\nclass Bzip2(Package, SourcewarePackage):\n \"\"\"bzip2...
diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py index 437dc14dec2ae6..f3211d1c42b22b 100644 --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -54,7 +54,7 @@ def flag_handler(self, name, fl...
Installation issue: bzip2: python error in package.py #23230 appeared to introduce a typo/python error in package.py ### Steps to reproduce the issue ```console $ spack install bzip2 ... ==> Installing bzip2-1.0.8-4efigg64jltb6topl5suvz4dmpvupmei ==> No binary for bzip2-1.0.8-4efigg64jltb6topl5suvz4dmpvupmei ...
diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -54,7 +54,7 @@ return(flags, None, None) def patch(self): - if spec...
{"golden_diff": "diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py\n--- a/var/spack/repos/builtin/packages/bzip2/package.py\n+++ b/var/spack/repos/builtin/packages/bzip2/package.py\n@@ -54,7 +54,7 @@\n return(flags, None, None)\n \n def patch(...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Installation issue: bzip2: python error in package.py #23230 appeared to introduce a typo/python error in package.py ### Steps to reproduce the issue ```console $ spack install bzip2 ... ==> Installi...
ranaroussi__yfinance-1257
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the ...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# yfinance - market data downloader\n# https://github.com/ranaroussi/yfinance\n#\n# Copyright 2017-2019 Ran Aroussi\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the ...
diff --git a/test_yfinance.py b/test_yfinance.py index 69ce9d7dc..abc87ecaa 100644 --- a/test_yfinance.py +++ b/test_yfinance.py @@ -20,8 +20,15 @@ session = None import requests_cache ; session = requests_cache.CachedSession("yfinance.cache", expire_after=24*60*60) -symbols = ['MSFT', 'IWO', 'VFINX', '^GSPC', 'BTC...
utils.py: list index out of range There is a strange behaviour with yfinance 0.1.94 when I try to read ticker "G7W.DU": Sometimes it works and sometimes the utils.py gets a list index out of range error. What I expect (and sometimes works): ``` $ python Python 3.10.9 (main, Dec 11 2022, 14:50:46) [GCC 11.3.0] on...
diff --git a/yfinance/utils.py b/yfinance/utils.py --- a/yfinance/utils.py +++ b/yfinance/utils.py @@ -202,6 +202,9 @@ session = session or _requests html = session.get(url=url, proxies=proxy, headers=user_agent_headers).text + if not "root.App.main =" in html: + return {} + json_str = html.s...
{"golden_diff": "diff --git a/yfinance/utils.py b/yfinance/utils.py\n--- a/yfinance/utils.py\n+++ b/yfinance/utils.py\n@@ -202,6 +202,9 @@\n session = session or _requests\n html = session.get(url=url, proxies=proxy, headers=user_agent_headers).text\n \n+ if not \"root.App.main =\" in html:\n+ return ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- utils.py: list index out of range There is a strange behaviour with yfinance 0.1.94 when I try to read ticker "G7W.DU": Sometimes it works and sometimes the utils.py gets a list index out of range error. ...
kubeflow__pipelines-4118
[ { "content": "#!/usr/bin/env python3\n# Copyright 2020 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# Unl...
[ { "content": "#!/usr/bin/env python3\n# Copyright 2020 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# Unl...
diff --git a/backend/Dockerfile b/backend/Dockerfile index 747e3698658..499946066bc 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -26,7 +26,7 @@ RUN if [ "$use_remote_build" = "true" ]; then \ # Compile FROM python:3.5 as compiler RUN apt-get update -y && \ - apt-get install --no-install-recommends ...
allow output artifact store configuration (vs hard coded) it seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`). see: https://github.com/kubeflow/pipelines/blob/f40a22a3f4a8e06d20cf3e3f425b5058d5c87e0b/sdk/python/kfp/c...
diff --git a/samples/core/iris/iris.py b/samples/core/iris/iris.py --- a/samples/core/iris/iris.py +++ b/samples/core/iris/iris.py @@ -14,10 +14,6 @@ # limitations under the License. """Iris flowers example using TFX. Based on https://github.com/tensorflow/tfx/blob/master/tfx/examples/iris/iris_pipeline_native_keras....
{"golden_diff": "diff --git a/samples/core/iris/iris.py b/samples/core/iris/iris.py\n--- a/samples/core/iris/iris.py\n+++ b/samples/core/iris/iris.py\n@@ -14,10 +14,6 @@\n # limitations under the License.\n \"\"\"Iris flowers example using TFX. Based on https://github.com/tensorflow/tfx/blob/master/tfx/examples/iris/ir...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- allow output artifact store configuration (vs hard coded) it seems like the output artifacts are always stored in a specific minio service, port, namespace, bucket, secrets, etc (`minio-service.kubeflow:9000`...
pallets__click-1839
[ { "content": "\"\"\"\nThis module contains implementations for the termui module. To keep the\nimport time of Click down, some infrequently used functionality is\nplaced in this module and only imported as needed.\n\"\"\"\nimport contextlib\nimport math\nimport os\nimport sys\nimport time\nfrom gettext import g...
[ { "content": "\"\"\"\nThis module contains implementations for the termui module. To keep the\nimport time of Click down, some infrequently used functionality is\nplaced in this module and only imported as needed.\n\"\"\"\nimport contextlib\nimport math\nimport os\nimport sys\nimport time\nfrom gettext import g...
diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py index 0e9860bd8..46ff2190d 100644 --- a/src/click/_termui_impl.py +++ b/src/click/_termui_impl.py @@ -549,11 +549,12 @@ def edit(self, text): def open_url(url, wait=False, locate=False): import subprocess - def _unquote_file(url): - im...
urllib.unquote() no longer exists In [_termui_impl.py](https://github.com/pallets/click/blob/972becff259e4ffcd220a6cad5096f36a89fdd6d/src/click/_termui_impl.py#L556) `urllib.unquote()` is called. But [urllib](https://docs.python.org/3/library/urllib.html) is a package now. Equivalent functionality is available in the u...
diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py --- a/src/click/_termui_impl.py +++ b/src/click/_termui_impl.py @@ -549,11 +549,12 @@ def open_url(url, wait=False, locate=False): import subprocess - def _unquote_file(url): - import urllib + def _unquote_file(url: str) -> str: + ...
{"golden_diff": "diff --git a/src/click/_termui_impl.py b/src/click/_termui_impl.py\n--- a/src/click/_termui_impl.py\n+++ b/src/click/_termui_impl.py\n@@ -549,11 +549,12 @@\n def open_url(url, wait=False, locate=False):\n import subprocess\n \n- def _unquote_file(url):\n- import urllib\n+ def _unquote_...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- urllib.unquote() no longer exists In [_termui_impl.py](https://github.com/pallets/click/blob/972becff259e4ffcd220a6cad5096f36a89fdd6d/src/click/_termui_impl.py#L556) `urllib.unquote()` is called. But [urllib]...
google__turbinia-637
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
[ { "content": "# -*- coding: utf-8 -*-\n# Copyright 2017 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# U...
diff --git a/turbinia/client.py b/turbinia/client.py index 165da5d1d..4e2564331 100644 --- a/turbinia/client.py +++ b/turbinia/client.py @@ -1017,7 +1017,7 @@ def run_local_task(self, task_name, request): if not request.evidence: raise TurbiniaException('TurbiniaRequest does not contain evidence.') log...
Crash when running locally ``` $ turbiniactl -t SSHDAnalysisTask -R rawdisk -l dfchecklist.img [INFO] Turbinia version: 20190819 [INFO] Creating request 5d50f281e7fc4a24bd88993ad8bb34a9 with evidence dfchecklist.img [INFO] Run command "turbiniactl status -r 5d50f281e7fc4a24bd88993ad8bb34a9" to see the status of t...
diff --git a/turbinia/client.py b/turbinia/client.py --- a/turbinia/client.py +++ b/turbinia/client.py @@ -1017,7 +1017,7 @@ if not request.evidence: raise TurbiniaException('TurbiniaRequest does not contain evidence.') log.info('Running Task {0:s} locally'.format(task_name)) - result = task.run_wra...
{"golden_diff": "diff --git a/turbinia/client.py b/turbinia/client.py\n--- a/turbinia/client.py\n+++ b/turbinia/client.py\n@@ -1017,7 +1017,7 @@\n if not request.evidence:\n raise TurbiniaException('TurbiniaRequest does not contain evidence.')\n log.info('Running Task {0:s} locally'.format(task_name))\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Crash when running locally ``` $ turbiniactl -t SSHDAnalysisTask -R rawdisk -l dfchecklist.img [INFO] Turbinia version: 20190819 [INFO] Creating request 5d50f281e7fc4a24bd88993ad8bb34a9 with evidence dfc...
horovod__horovod-3002
[ { "content": "# Copyright 2020 Uber Technologies, 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\...
[ { "content": "# Copyright 2020 Uber Technologies, 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\...
diff --git a/horovod/common/elastic.py b/horovod/common/elastic.py index 84512a299f..f7096eb7ee 100644 --- a/horovod/common/elastic.py +++ b/horovod/common/elastic.py @@ -157,10 +157,10 @@ def wrapper(state, *args, **kwargs): try: while True: - if not skip_sync: - ...
【Elastic Horovod】Should we catch exceptions for state.sync()? **Environment:** 1. Framework: (TensorFlow, Keras, PyTorch, MXNet): Pytorch 2. Framework version: 1.6.0 3. Horovod version: 0.21.3 4. MPI version: 4.0.3 5. CUDA version: 10.2 6. NCCL version: 2.7.6 7. Python version: 3.6 **Checklist:** 1. Did you ...
diff --git a/horovod/common/elastic.py b/horovod/common/elastic.py --- a/horovod/common/elastic.py +++ b/horovod/common/elastic.py @@ -157,10 +157,10 @@ try: while True: - if not skip_sync: - state.sync() - try: + if not skip_...
{"golden_diff": "diff --git a/horovod/common/elastic.py b/horovod/common/elastic.py\n--- a/horovod/common/elastic.py\n+++ b/horovod/common/elastic.py\n@@ -157,10 +157,10 @@\n \n try:\n while True:\n- if not skip_sync:\n- state.sync()\n-\n try:\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- 【Elastic Horovod】Should we catch exceptions for state.sync()? **Environment:** 1. Framework: (TensorFlow, Keras, PyTorch, MXNet): Pytorch 2. Framework version: 1.6.0 3. Horovod version: 0.21.3 4. MPI vers...
scoutapp__scout_apm_python-672
[ { "content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport logging\nfrom collections import namedtuple\n\nimport wrapt\n\nfrom scout_apm.compat import get_pos_args, unwrap_decorators\nfrom scout_apm.core.tracked_request import TrackedRequest\n\ntry...
[ { "content": "# coding=utf-8\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport logging\nfrom collections import namedtuple\n\nimport wrapt\n\nfrom scout_apm.compat import get_pos_args, unwrap_decorators\nfrom scout_apm.core.tracked_request import TrackedRequest\n\ntry...
diff --git a/CHANGELOG.md b/CHANGELOG.md index c66144d9..f7b7cc77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## Pending ### Added +- Added `terms_enum` instrumentation for ElasticSearch 7.14.0. + ([Issue #671](https://github.com/scoutapp/scout_apm_python/issues/671)) ### Fixed diff --git a/s...
Support ElasticSearch 7.14 The python package `elasticsearch-py` introduced the `terms_enum` parameter from ElasticSearch 7.14. This is currently not being instrumented and breaking tests.
diff --git a/src/scout_apm/instruments/elasticsearch.py b/src/scout_apm/instruments/elasticsearch.py --- a/src/scout_apm/instruments/elasticsearch.py +++ b/src/scout_apm/instruments/elasticsearch.py @@ -71,6 +71,7 @@ ClientMethod("search_shards", True), ClientMethod("search_template", True), ClientMethod...
{"golden_diff": "diff --git a/src/scout_apm/instruments/elasticsearch.py b/src/scout_apm/instruments/elasticsearch.py\n--- a/src/scout_apm/instruments/elasticsearch.py\n+++ b/src/scout_apm/instruments/elasticsearch.py\n@@ -71,6 +71,7 @@\n ClientMethod(\"search_shards\", True),\n ClientMethod(\"search_template\"...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Support ElasticSearch 7.14 The python package `elasticsearch-py` introduced the `terms_enum` parameter from ElasticSearch 7.14. This is currently not being instrumented and breaking tests. --- END ISSUE --- ...
arviz-devs__arviz-1043
[ { "content": "\"\"\"PyMC3-specific conversion code.\"\"\"\nimport logging\nfrom typing import Dict, List, Any, Optional, TYPE_CHECKING\nfrom types import ModuleType\n\nimport numpy as np\nimport xarray as xr\nfrom .. import utils\nfrom .inference_data import InferenceData, concat\nfrom .base import requires, di...
[ { "content": "\"\"\"PyMC3-specific conversion code.\"\"\"\nimport logging\nfrom typing import Dict, List, Any, Optional, TYPE_CHECKING\nfrom types import ModuleType\n\nimport numpy as np\nimport xarray as xr\nfrom .. import utils\nfrom .inference_data import InferenceData, concat\nfrom .base import requires, di...
diff --git a/arviz/data/io_pymc3.py b/arviz/data/io_pymc3.py index d0013f4905..f09c4e6079 100644 --- a/arviz/data/io_pymc3.py +++ b/arviz/data/io_pymc3.py @@ -287,6 +287,7 @@ def is_data(name, var) -> bool: var not in self.model.deterministics and var not in self.model.observed_RVs ...
Error with PyMC3 model that contains Potential **Describe the bug** For PyMC3 model that contains Potential, io_pymc3 is attempting to call `eval()` without graph dependence. **To Reproduce** ```python with pm.Model() as m: x = pm.Normal('x', 0., 1.) pm.Potential('z', pm.Normal.dist(x, 1.).logp(np.rando...
diff --git a/arviz/data/io_pymc3.py b/arviz/data/io_pymc3.py --- a/arviz/data/io_pymc3.py +++ b/arviz/data/io_pymc3.py @@ -287,6 +287,7 @@ var not in self.model.deterministics and var not in self.model.observed_RVs and var not in self.model.free_RVs + an...
{"golden_diff": "diff --git a/arviz/data/io_pymc3.py b/arviz/data/io_pymc3.py\n--- a/arviz/data/io_pymc3.py\n+++ b/arviz/data/io_pymc3.py\n@@ -287,6 +287,7 @@\n var not in self.model.deterministics\n and var not in self.model.observed_RVs\n and var not in self.model.free_...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Error with PyMC3 model that contains Potential **Describe the bug** For PyMC3 model that contains Potential, io_pymc3 is attempting to call `eval()` without graph dependence. **To Reproduce** ```python ...
pretix__pretix-2537
[ { "content": "#\n# This file is part of pretix (Community Edition).\n#\n# Copyright (C) 2014-2020 Raphael Michel and contributors\n# Copyright (C) 2020-2021 rami.io GmbH and contributors\n#\n# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General\n# Pu...
[ { "content": "#\n# This file is part of pretix (Community Edition).\n#\n# Copyright (C) 2014-2020 Raphael Michel and contributors\n# Copyright (C) 2020-2021 rami.io GmbH and contributors\n#\n# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General\n# Pu...
diff --git a/src/pretix/presale/views/organizer.py b/src/pretix/presale/views/organizer.py index af56eb5f808..1a5d96ee9ae 100644 --- a/src/pretix/presale/views/organizer.py +++ b/src/pretix/presale/views/organizer.py @@ -225,7 +225,7 @@ def _set_month_to_next_event(self): def _set_month_year(self): if 'da...
Cannot change month in the widget In the current version it is not possible to change the month in the widget. When you hit it, it reloads but does nothing. The cause seems to be because the call https://XXXXX/widget/product_list?lang=es&year=2022&month=03 always returns the same regardless of the value you put in the ...
diff --git a/src/pretix/presale/views/organizer.py b/src/pretix/presale/views/organizer.py --- a/src/pretix/presale/views/organizer.py +++ b/src/pretix/presale/views/organizer.py @@ -225,7 +225,7 @@ def _set_month_year(self): if 'date' in self.request.GET: try: - date = dateuti...
{"golden_diff": "diff --git a/src/pretix/presale/views/organizer.py b/src/pretix/presale/views/organizer.py\n--- a/src/pretix/presale/views/organizer.py\n+++ b/src/pretix/presale/views/organizer.py\n@@ -225,7 +225,7 @@\n def _set_month_year(self):\n if 'date' in self.request.GET:\n try:\n- ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Cannot change month in the widget In the current version it is not possible to change the month in the widget. When you hit it, it reloads but does nothing. The cause seems to be because the call https://XXXX...
getsentry__sentry-21581
[ { "content": "from __future__ import absolute_import\n\nfrom uuid import uuid4\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.db import transaction\nfrom django.utils import timezone\n\nfrom sentry.constants import ObjectStatus\nfrom sentry.exceptions import DeleteAborted\nfrom s...
[ { "content": "from __future__ import absolute_import\n\nfrom uuid import uuid4\n\nfrom django.apps import apps\nfrom django.conf import settings\nfrom django.db import transaction\nfrom django.utils import timezone\n\nfrom sentry.constants import ObjectStatus\nfrom sentry.exceptions import DeleteAborted\nfrom s...
diff --git a/src/sentry/tasks/deletion.py b/src/sentry/tasks/deletion.py index 47b44cdd4ee3c8..3678f5d0c7e53f 100644 --- a/src/sentry/tasks/deletion.py +++ b/src/sentry/tasks/deletion.py @@ -14,8 +14,7 @@ # in prod we run with infinite retries to recover from errors # in debug/development, we assume these tasks gen...
Hardcoded MAX_RETRIES = 1 https://github.com/getsentry/sentry/blob/master/src/sentry/tasks/deletion.py#L18
diff --git a/src/sentry/tasks/deletion.py b/src/sentry/tasks/deletion.py --- a/src/sentry/tasks/deletion.py +++ b/src/sentry/tasks/deletion.py @@ -14,8 +14,7 @@ # in prod we run with infinite retries to recover from errors # in debug/development, we assume these tasks generally shouldn't fail -MAX_RETRIES = 1 if se...
{"golden_diff": "diff --git a/src/sentry/tasks/deletion.py b/src/sentry/tasks/deletion.py\n--- a/src/sentry/tasks/deletion.py\n+++ b/src/sentry/tasks/deletion.py\n@@ -14,8 +14,7 @@\n \n # in prod we run with infinite retries to recover from errors\n # in debug/development, we assume these tasks generally shouldn't fail...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Hardcoded MAX_RETRIES = 1 https://github.com/getsentry/sentry/blob/master/src/sentry/tasks/deletion.py#L18 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these fil...
oppia__oppia-1713
[ { "content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. 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/licen...
[ { "content": "# coding: utf-8\n#\n# Copyright 2014 The Oppia Authors. 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/licen...
diff --git a/core/domain/rule_domain_test.py b/core/domain/rule_domain_test.py index 5afcf9a036f7d..ced4e9429bd7f 100644 --- a/core/domain/rule_domain_test.py +++ b/core/domain/rule_domain_test.py @@ -26,7 +26,7 @@ import feconf -EXPECTED_TOTAL_NUMBER_OF_RULES = 47 +EXPECTED_TOTAL_NUMBER_OF_RULES = 48 class F...
Add an OutputContains rule to the CodeRepl interaction. We've had a request to add an OutputContains rule to the CodeRepl interaction. The use case is as follows: the student will type in the body of a function, and their code will be checked by calling the function on several inputs and printing the results. We don't...
diff --git a/extensions/rules/code_evaluation.py b/extensions/rules/code_evaluation.py --- a/extensions/rules/code_evaluation.py +++ b/extensions/rules/code_evaluation.py @@ -30,6 +30,8 @@ class CodeDoesNotContain(base.CodeEvaluationRule): description = 'has code that does not contain {{x|CodeString}}' +class O...
{"golden_diff": "diff --git a/extensions/rules/code_evaluation.py b/extensions/rules/code_evaluation.py\n--- a/extensions/rules/code_evaluation.py\n+++ b/extensions/rules/code_evaluation.py\n@@ -30,6 +30,8 @@\n class CodeDoesNotContain(base.CodeEvaluationRule):\n description = 'has code that does not contain {{x|Co...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Add an OutputContains rule to the CodeRepl interaction. We've had a request to add an OutputContains rule to the CodeRepl interaction. The use case is as follows: the student will type in the body of a funct...
optuna__optuna-56
[ { "content": "import os\nfrom setuptools import find_packages\nfrom setuptools import setup\nimport sys\n\n\ndef get_version():\n version_filepath = os.path.join(os.path.dirname(__file__), 'pfnopt', 'version.py')\n with open(version_filepath) as f:\n for line in f:\n if line.startswith('...
[ { "content": "import os\nfrom setuptools import find_packages\nfrom setuptools import setup\nimport sys\n\n\ndef get_version():\n version_filepath = os.path.join(os.path.dirname(__file__), 'pfnopt', 'version.py')\n with open(version_filepath) as f:\n for line in f:\n if line.startswith('...
diff --git a/setup.py b/setup.py index 37a5afdda7..909c5da927 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ def get_version(): author='Takuya Akiba', author_email='akiba@preferred.jp', packages=find_packages(), - install_requires=['sqlalchemy', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cl...
Incompatibility with old versions of SQLAlchemy. Connecting to PostgreSQL fails with old versions of SQLAlchemy raising an error: `sqlalchemy.exc.CompileError: Postgresql ENUM type requires a name`. This error is resolved once sqlalchemy version is updated. For example: ```python >>> import sqlalchemy >>> sqlalch...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ author='Takuya Akiba', author_email='akiba@preferred.jp', packages=find_packages(), - install_requires=['sqlalchemy', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'], + install_requires=['sqlalchemy>=1.1.0', 'num...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -25,7 +25,7 @@\n author='Takuya Akiba',\n author_email='akiba@preferred.jp',\n packages=find_packages(),\n- install_requires=['sqlalchemy', 'numpy', 'scipy', 'six', 'typing', 'enum34', 'cliff'],\n+ install_requires=[...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Incompatibility with old versions of SQLAlchemy. Connecting to PostgreSQL fails with old versions of SQLAlchemy raising an error: `sqlalchemy.exc.CompileError: Postgresql ENUM type requires a name`. This erro...
freedomofpress__securedrop-4391
[ { "content": "import operator\nimport os\nimport io\nimport six\n\nfrom datetime import datetime\nfrom flask import (Blueprint, render_template, flash, redirect, url_for, g,\n session, current_app, request, Markup, abort)\nfrom flask_babel import gettext\nfrom sqlalchemy.exc import IntegrityEr...
[ { "content": "import operator\nimport os\nimport io\nimport six\n\nfrom datetime import datetime\nfrom flask import (Blueprint, render_template, flash, redirect, url_for, g,\n session, current_app, request, Markup, abort)\nfrom flask_babel import gettext\nfrom sqlalchemy.exc import IntegrityEr...
diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py index 91481f3157..1ffbaa7ddd 100644 --- a/securedrop/source_app/main.py +++ b/securedrop/source_app/main.py @@ -67,6 +67,13 @@ def create(): # Issue 2386: don't log in on duplicates del session['codename'] + + ...
Source Interface requests fail with 500 error, due to session issue ## Description In some situations, requests to the source interface may start to fail, returning the 500 error page. Once the 500 errors start, they continue until the Tor Browser cache is cleared, either explicitly or by starting a new browser sess...
diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py --- a/securedrop/source_app/main.py +++ b/securedrop/source_app/main.py @@ -67,6 +67,13 @@ # Issue 2386: don't log in on duplicates del session['codename'] + + # Issue 4361: Delete 'logged_in' if it's in th...
{"golden_diff": "diff --git a/securedrop/source_app/main.py b/securedrop/source_app/main.py\n--- a/securedrop/source_app/main.py\n+++ b/securedrop/source_app/main.py\n@@ -67,6 +67,13 @@\n \n # Issue 2386: don't log in on duplicates\n del session['codename']\n+\n+ # Issue 4361: Delete ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Source Interface requests fail with 500 error, due to session issue ## Description In some situations, requests to the source interface may start to fail, returning the 500 error page. Once the 500 errors ...
microsoft__ptvsd-926
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nimport argparse\nimport os.path\nimport sys\n\nfrom ptvsd._attach import attach_main\nfrom ptvsd._local import debug_main, run_main\nfrom pt...
[ { "content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License. See LICENSE in the project root\n# for license information.\n\nimport argparse\nimport os.path\nimport sys\n\nfrom ptvsd._attach import attach_main\nfrom ptvsd._local import debug_main, run_main\nfrom pt...
diff --git a/ptvsd/__main__.py b/ptvsd/__main__.py index 258942784..f6dc445a9 100644 --- a/ptvsd/__main__.py +++ b/ptvsd/__main__.py @@ -157,7 +157,7 @@ def _parse_args(prog, argv): parser.add_argument('--nodebug', action='store_true') parser.add_argument('--client', action='store_true') - parser.add_arg...
Make --host a required switch `--host` is currently optional, and defaults to `localhost`. The old behavior was to default to `0.0.0.0`, which is not a particularly sane default. However, the new default makes things confusing, since it is applied silently - things just work differently. Changing the switch to be expli...
diff --git a/ptvsd/__main__.py b/ptvsd/__main__.py --- a/ptvsd/__main__.py +++ b/ptvsd/__main__.py @@ -157,7 +157,7 @@ parser.add_argument('--nodebug', action='store_true') parser.add_argument('--client', action='store_true') - parser.add_argument('--host') + parser.add_argument('--host', required=Tru...
{"golden_diff": "diff --git a/ptvsd/__main__.py b/ptvsd/__main__.py\n--- a/ptvsd/__main__.py\n+++ b/ptvsd/__main__.py\n@@ -157,7 +157,7 @@\n parser.add_argument('--nodebug', action='store_true')\n parser.add_argument('--client', action='store_true')\n \n- parser.add_argument('--host')\n+ parser.add_argume...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Make --host a required switch `--host` is currently optional, and defaults to `localhost`. The old behavior was to default to `0.0.0.0`, which is not a particularly sane default. However, the new default make...
ResonantGeoData__ResonantGeoData-470
[ { "content": "from base64 import b64encode\nfrom dataclasses import dataclass\nimport getpass\nfrom pathlib import Path\nimport tempfile\nfrom typing import Dict, Iterator, List, Optional, Tuple, Union\n\nfrom tqdm import tqdm\n\nfrom .session import RgdcSession\nfrom .types import DATETIME_OR_STR_TUPLE, SEARCH...
[ { "content": "from base64 import b64encode\nfrom dataclasses import dataclass\nimport getpass\nfrom pathlib import Path\nimport tempfile\nfrom typing import Dict, Iterator, List, Optional, Tuple, Union\n\nfrom tqdm import tqdm\n\nfrom .session import RgdcSession\nfrom .types import DATETIME_OR_STR_TUPLE, SEARCH...
diff --git a/.github/workflows/rgd-client.yml b/.github/workflows/rgd-client.yml index adec6aa96..c9a35469b 100644 --- a/.github/workflows/rgd-client.yml +++ b/.github/workflows/rgd-client.yml @@ -5,25 +5,44 @@ on: pull_request: branches: "**" jobs: - deploy: + rgd-client: runs-on: ubuntu-latest + se...
Proper testing for rgd_client We need to implement real tests for the Python client The tests for this would require running RGD with data prepopulated in the background then executing the client tests
diff --git a/rgd-client/rgd_client/rgdc.py b/rgd-client/rgd_client/rgdc.py --- a/rgd-client/rgd_client/rgdc.py +++ b/rgd-client/rgd_client/rgdc.py @@ -238,7 +238,11 @@ limit=limit, offset=offset, ) - return list(limit_offset_pager(self.session, 'rgd/search', params=params)) + +...
{"golden_diff": "diff --git a/rgd-client/rgd_client/rgdc.py b/rgd-client/rgd_client/rgdc.py\n--- a/rgd-client/rgd_client/rgdc.py\n+++ b/rgd-client/rgd_client/rgdc.py\n@@ -238,7 +238,11 @@\n limit=limit,\n offset=offset,\n )\n- return list(limit_offset_pager(self.session, 'rgd/sear...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Proper testing for rgd_client We need to implement real tests for the Python client The tests for this would require running RGD with data prepopulated in the background then executing the client tests --...
canonical__snapcraft-80
[ { "content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright (C) 2015 Canonical Ltd\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\n# published by the Free Software Foundation.\n#\n# This p...
[ { "content": "# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-\n#\n# Copyright (C) 2015 Canonical Ltd\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 3 as\n# published by the Free Software Foundation.\n#\n# This p...
diff --git a/snapcraft/cmds.py b/snapcraft/cmds.py index 96f7f7d2ac..5dd8d6c39b 100644 --- a/snapcraft/cmds.py +++ b/snapcraft/cmds.py @@ -229,7 +229,7 @@ def run(args): ['ssh'] + ssh_opts + ['ubuntu@localhost', '-p', '8022', 'sudo snappy install *.snap']) # "login" - _check_c...
Logging out from the run environment produces a traceback (amd64)ubuntu@localhost:~$ logout Connection to localhost closed. Traceback (most recent call last): File "/usr/bin/snapcraft", line 33, in <module> snapcraft.main.main() File "/usr/lib/python3/dist-packages/snapcraft/main.py", line 80, in main args....
diff --git a/snapcraft/cmds.py b/snapcraft/cmds.py --- a/snapcraft/cmds.py +++ b/snapcraft/cmds.py @@ -229,7 +229,7 @@ ['ssh'] + ssh_opts + ['ubuntu@localhost', '-p', '8022', 'sudo snappy install *.snap']) # "login" - _check_call( + _call( ['ssh'] + ssh_opt...
{"golden_diff": "diff --git a/snapcraft/cmds.py b/snapcraft/cmds.py\n--- a/snapcraft/cmds.py\n+++ b/snapcraft/cmds.py\n@@ -229,7 +229,7 @@\n ['ssh'] + ssh_opts +\n ['ubuntu@localhost', '-p', '8022', 'sudo snappy install *.snap'])\n # \"login\"\n- _check_call(\n+ _call(\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Logging out from the run environment produces a traceback (amd64)ubuntu@localhost:~$ logout Connection to localhost closed. Traceback (most recent call last): File "/usr/bin/snapcraft", line 33, in <module>...
ManimCommunity__manim-3510
[ { "content": "#!/usr/bin/env python\n\n\nfrom manim import *\n\n# To watch one of these scenes, run the following:\n# python --quality m manim -p example_scenes.py SquareToCircle\n#\n# Use the flag --quality l for a faster rendering at a lower quality.\n# Use -s to skip to the end and just save the final frame\...
[ { "content": "#!/usr/bin/env python\n\n\nfrom manim import *\n\n# To watch one of these scenes, run the following:\n# python --quality m manim -p example_scenes.py SquareToCircle\n#\n# Use the flag --quality l for a faster rendering at a lower quality.\n# Use -s to skip to the end and just save the final frame\...
diff --git a/example_scenes/basic.py b/example_scenes/basic.py index cf5f475223..e61ae01f67 100644 --- a/example_scenes/basic.py +++ b/example_scenes/basic.py @@ -167,8 +167,8 @@ def construct(self): class LineJoints(Scene): def construct(self): t1 = Triangle() - t2 = Triangle(line_join=LineJointT...
keyword argument 'line_join' ## Description of bug / unexpected behavior When I rendering the line joint scene from basic.py from the example scene it shows Mobject.__init__() got an unexpected keyword argument 'line_join' ## How to reproduce the issue <!-- Provide a piece of code illustrating the undesired behavi...
diff --git a/example_scenes/basic.py b/example_scenes/basic.py --- a/example_scenes/basic.py +++ b/example_scenes/basic.py @@ -167,8 +167,8 @@ class LineJoints(Scene): def construct(self): t1 = Triangle() - t2 = Triangle(line_join=LineJointType.ROUND) - t3 = Triangle(line_join=LineJointType...
{"golden_diff": "diff --git a/example_scenes/basic.py b/example_scenes/basic.py\n--- a/example_scenes/basic.py\n+++ b/example_scenes/basic.py\n@@ -167,8 +167,8 @@\n class LineJoints(Scene):\n def construct(self):\n t1 = Triangle()\n- t2 = Triangle(line_join=LineJointType.ROUND)\n- t3 = Triangl...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- keyword argument 'line_join' ## Description of bug / unexpected behavior When I rendering the line joint scene from basic.py from the example scene it shows Mobject.__init__() got an unexpected keyword argum...
deepchecks__deepchecks-728
[ { "content": "# ----------------------------------------------------------------------------\n# Copyright (C) 2021 Deepchecks (https://www.deepchecks.com)\n#\n# This file is part of Deepchecks.\n# Deepchecks is distributed under the terms of the GNU Affero General\n# Public License (version 3 or later).\n# You ...
[ { "content": "# ----------------------------------------------------------------------------\n# Copyright (C) 2021 Deepchecks (https://www.deepchecks.com)\n#\n# This file is part of Deepchecks.\n# Deepchecks is distributed under the terms of the GNU Affero General\n# Public License (version 3 or later).\n# You ...
diff --git a/MANIFEST.in b/MANIFEST.in index e3c8bf6744..b7e63381bf 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include requirements.txt include LICENSE include VERSION -include README.md \ No newline at end of file +include README.md +recursive-include deepchecks/base/resources * \ No newline at end ...
[BUG] resources/suite_output.html file is missing when installing not via git **Describe the bug** can't use save_as_html because suite_output.html file is missing **To Reproduce** pip install deepchecks suite_result.save_as_html() **Expected behavior** save as html **Environment (please complete the follo...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -74,7 +74,6 @@ import setuptools from setuptools import setup -from distutils.util import convert_path import os main_ns = {} @@ -89,9 +88,6 @@ with open(requirementPath) as f: install_requires = f.read().splitlines() - - - setup...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -74,7 +74,6 @@\n \n import setuptools\n from setuptools import setup\n-from distutils.util import convert_path\n import os\n \n main_ns = {}\n@@ -89,9 +88,6 @@\n with open(requirementPath) as f:\n install_requires = f.read...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- [BUG] resources/suite_output.html file is missing when installing not via git **Describe the bug** can't use save_as_html because suite_output.html file is missing **To Reproduce** pip install deepchecks...
zostera__django-bootstrap3-90
[ { "content": "from __future__ import unicode_literals\n\nfrom django.contrib.admin.widgets import AdminFileWidget\nfrom django.forms import HiddenInput, FileInput, CheckboxSelectMultiple, Textarea, TextInput, RadioSelect, \\\n CheckboxInput, ClearableFileInput\nfrom django.forms.extras import SelectDateWidge...
[ { "content": "from __future__ import unicode_literals\n\nfrom django.contrib.admin.widgets import AdminFileWidget\nfrom django.forms import HiddenInput, FileInput, CheckboxSelectMultiple, Textarea, TextInput, RadioSelect, \\\n CheckboxInput, ClearableFileInput\nfrom django.forms.extras import SelectDateWidge...
diff --git a/bootstrap3/forms.py b/bootstrap3/forms.py index 1f99bdec..515c2bac 100644 --- a/bootstrap3/forms.py +++ b/bootstrap3/forms.py @@ -172,6 +172,12 @@ def render_field(field, layout='', form_group_class=FORM_GROUP_CLASS, elif field.form.is_bound: form_group_class = add_css_class(form_group_class,...
Special display of required fields It would be nice if there was some way to render differently required fields, like with boldface, or with and asterisk.
diff --git a/bootstrap3/forms.py b/bootstrap3/forms.py --- a/bootstrap3/forms.py +++ b/bootstrap3/forms.py @@ -172,6 +172,12 @@ elif field.form.is_bound: form_group_class = add_css_class(form_group_class, 'has-success') + # Required and optional classes to the form group + if field.field.required:...
{"golden_diff": "diff --git a/bootstrap3/forms.py b/bootstrap3/forms.py\n--- a/bootstrap3/forms.py\n+++ b/bootstrap3/forms.py\n@@ -172,6 +172,12 @@\n elif field.form.is_bound:\n form_group_class = add_css_class(form_group_class, 'has-success')\n \n+ # Required and optional classes to the form group\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Special display of required fields It would be nice if there was some way to render differently required fields, like with boldface, or with and asterisk. --- END ISSUE --- Below are some code segments, ea...
fossasia__open-event-server-6046
[ { "content": "from celery.signals import after_task_publish\nimport logging\nimport os.path\nfrom envparse import env\n\nimport sys\nfrom flask import Flask, json, make_response\nfrom flask_celeryext import FlaskCeleryExt\nfrom app.settings import get_settings, get_setts\nfrom flask_migrate import Migrate, Migr...
[ { "content": "from celery.signals import after_task_publish\nimport logging\nimport os.path\nfrom envparse import env\n\nimport sys\nfrom flask import Flask, json, make_response\nfrom flask_celeryext import FlaskCeleryExt\nfrom app.settings import get_settings, get_setts\nfrom flask_migrate import Migrate, Migr...
diff --git a/app/__init__.py b/app/__init__.py index 02d300a2ef..26b0c27fb9 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -108,6 +108,7 @@ def create_app(): # setup celery app.config['CELERY_BROKER_URL'] = app.config['REDIS_URL'] app.config['CELERY_RESULT_BACKEND'] = app.config['CELERY_BROKER_URL...
Error logs generated in Celery while sending Mails ``` Traceback (most recent call last): File "/Users/abhinav/Documents/OpenSource/fossassia/open-event-server/venv/lib/python3.6/site-packages/celery/worker/consumer/consumer.py", line 551, in on_task_received payload = message.decode() File "/Users/abhinav/...
diff --git a/app/__init__.py b/app/__init__.py --- a/app/__init__.py +++ b/app/__init__.py @@ -108,6 +108,7 @@ # setup celery app.config['CELERY_BROKER_URL'] = app.config['REDIS_URL'] app.config['CELERY_RESULT_BACKEND'] = app.config['CELERY_BROKER_URL'] + app.config['CELERY_ACCEPT_CONTENT'] = ['json',...
{"golden_diff": "diff --git a/app/__init__.py b/app/__init__.py\n--- a/app/__init__.py\n+++ b/app/__init__.py\n@@ -108,6 +108,7 @@\n # setup celery\n app.config['CELERY_BROKER_URL'] = app.config['REDIS_URL']\n app.config['CELERY_RESULT_BACKEND'] = app.config['CELERY_BROKER_URL']\n+ app.config['CELERY_ACC...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Error logs generated in Celery while sending Mails ``` Traceback (most recent call last): File "/Users/abhinav/Documents/OpenSource/fossassia/open-event-server/venv/lib/python3.6/site-packages/celery/work...
translate__pootle-3380
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2008-2013 Zuza Software Foundation\n# Copyright 2014 Evernote Corporation\n#\n# This file is part of Pootle.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public Lic...
[ { "content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n#\n# Copyright 2008-2013 Zuza Software Foundation\n# Copyright 2014 Evernote Corporation\n#\n# This file is part of Pootle.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public Lic...
diff --git a/.travis.yml b/.travis.yml index 105e076d692..baea2136dac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,24 +4,71 @@ python: - 2.6 - 2.7 env: - - DJANGO_VERSION=1.4.5 -# When we do finally support Django 1.5 - it requires Python 2.6.5, so exclude -# earlier versions (see https://docs.djangoproject...
Core: drop MySQL dependence on MyISAM Core depends on MyISAM at the moment because of low level features used for changeid tracking. We need to migrate that to a more general approach that works on InnoDB and other supported DB engines. - [x] Make resources list work in all DB backends (#3539) - [x] Switch revision co...
diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -43,7 +43,7 @@ requirements = [] for line in open(file_name, 'r').read().split('\n'): # Ignore comments, blank lines and included requirements files - if re.match(r'(\s*#)|(\s*$)|(-r .*$)', line): + if re.match(r'(\s*#)|(...
{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -43,7 +43,7 @@\n requirements = []\n for line in open(file_name, 'r').read().split('\\n'):\n # Ignore comments, blank lines and included requirements files\n- if re.match(r'(\\s*#)|(\\s*$)|(-r .*$)', line):\n+ ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Core: drop MySQL dependence on MyISAM Core depends on MyISAM at the moment because of low level features used for changeid tracking. We need to migrate that to a more general approach that works on InnoDB an...
CiviWiki__OpenCiviWiki-1375
[ { "content": "\"\"\"\nDjango settings for civiwiki project.\nDarius Calliet May 12, 2016\n\nProduction settings file to select proper environment variables.\n\"\"\"\nimport os\n\n# False if not in os.environ\nDEBUG = os.getenv(\"DEBUG\", False)\n\n# defaults to second value if not found in os.environ\nDJANGO_HO...
[ { "content": "\"\"\"\nDjango settings for civiwiki project.\nDarius Calliet May 12, 2016\n\nProduction settings file to select proper environment variables.\n\"\"\"\nimport os\n\n# False if not in os.environ\nDEBUG = os.getenv(\"DEBUG\", False)\n\n# defaults to second value if not found in os.environ\nDJANGO_HO...
diff --git a/.env b/.env new file mode 100644 index 000000000..0af7c0bbc --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +# Note: these environment variables are only for local development. +# Do not use them in production. +DJANGO_SECRET_KEY=123-secret-for-development + +DEBUG=True diff --git a/.env_sample b/.env_sample dele...
Update grammar in contributing guide ### Idea summary Improve the grammar in our contributing guide with an automated grammar checker. ### Further details _No response_
diff --git a/project/core/settings.py b/project/core/settings.py --- a/project/core/settings.py +++ b/project/core/settings.py @@ -107,9 +107,7 @@ MEDIA_ROOT = os.path.join(BASE_DIR, "media") MEDIA_URL = "/media/" -# TODO: re-organize and simplify staticfiles settings -if "CIVIWIKI_LOCAL_NAME" not in os.environ: - ...
{"golden_diff": "diff --git a/project/core/settings.py b/project/core/settings.py\n--- a/project/core/settings.py\n+++ b/project/core/settings.py\n@@ -107,9 +107,7 @@\n MEDIA_ROOT = os.path.join(BASE_DIR, \"media\")\n MEDIA_URL = \"/media/\"\n \n-# TODO: re-organize and simplify staticfiles settings\n-if \"CIVIWIKI_LOC...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Update grammar in contributing guide ### Idea summary Improve the grammar in our contributing guide with an automated grammar checker. ### Further details _No response_ --- END ISSUE --- Below are some c...
opsdroid__opsdroid-1363
[ { "content": "\"\"\"A connector for Slack.\"\"\"\nimport logging\nimport re\nimport os\nimport ssl\nimport certifi\nimport json\n\nimport aiohttp\n\nimport slack\nfrom emoji import demojize\nfrom voluptuous import Required\n\nfrom opsdroid.connector import Connector, register_event\nfrom opsdroid.events import ...
[ { "content": "\"\"\"A connector for Slack.\"\"\"\nimport logging\nimport re\nimport os\nimport ssl\nimport certifi\nimport json\n\nimport aiohttp\n\nimport slack\nfrom emoji import demojize\nfrom voluptuous import Required\n\nfrom opsdroid.connector import Connector, register_event\nfrom opsdroid.events import ...
diff --git a/opsdroid/connector/slack/__init__.py b/opsdroid/connector/slack/__init__.py index ced412be7..b0de8108f 100644 --- a/opsdroid/connector/slack/__init__.py +++ b/opsdroid/connector/slack/__init__.py @@ -144,7 +144,8 @@ async def process_message(self, **payload): _LOGGER.debug(_("Looking up sender use...
opsdroid slack connector intermittently ends up in an exception <!-- Before you post an issue or if you are unsure about something join our matrix channel https://riot.im/app/#/room/#opsdroid-general:matrix.org and ask away! We are more than happy to help you. --> # Description - opsdroid slack connector intermittentl...
diff --git a/opsdroid/connector/slack/__init__.py b/opsdroid/connector/slack/__init__.py --- a/opsdroid/connector/slack/__init__.py +++ b/opsdroid/connector/slack/__init__.py @@ -144,7 +144,8 @@ _LOGGER.debug(_("Looking up sender username.")) try: user_info = await self.lookup_username(me...
{"golden_diff": "diff --git a/opsdroid/connector/slack/__init__.py b/opsdroid/connector/slack/__init__.py\n--- a/opsdroid/connector/slack/__init__.py\n+++ b/opsdroid/connector/slack/__init__.py\n@@ -144,7 +144,8 @@\n _LOGGER.debug(_(\"Looking up sender username.\"))\n try:\n user_info = awai...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- opsdroid slack connector intermittently ends up in an exception <!-- Before you post an issue or if you are unsure about something join our matrix channel https://riot.im/app/#/room/#opsdroid-general:matrix.o...
pyca__cryptography-7644
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\n\nimport os\nimport typing\n\nfrom cryptography import exceptions, utils\nfrom cryptography.hazmat.backends.opens...
[ { "content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\n\nimport os\nimport typing\n\nfrom cryptography import exceptions, utils\nfrom cryptography.hazmat.backends.opens...
diff --git a/src/cryptography/hazmat/primitives/ciphers/aead.py b/src/cryptography/hazmat/primitives/ciphers/aead.py index b4564cfcc8bb..16c97a644440 100644 --- a/src/cryptography/hazmat/primitives/ciphers/aead.py +++ b/src/cryptography/hazmat/primitives/ciphers/aead.py @@ -366,6 +366,8 @@ def _check_params( a...
AESSIV Encryption/Decryption fails if empty data is passed ## Issue description If an empty byte string is passed to `data` parameter of methods `encrypt` and `decrypt` of `AESSIV`, operation fails with `InternalError`. ## Steps to reproduce bug ```python from cryptography.hazmat.primitives.ciphers import aea...
diff --git a/src/cryptography/hazmat/primitives/ciphers/aead.py b/src/cryptography/hazmat/primitives/ciphers/aead.py --- a/src/cryptography/hazmat/primitives/ciphers/aead.py +++ b/src/cryptography/hazmat/primitives/ciphers/aead.py @@ -366,6 +366,8 @@ associated_data: typing.List, ) -> None: utils...
{"golden_diff": "diff --git a/src/cryptography/hazmat/primitives/ciphers/aead.py b/src/cryptography/hazmat/primitives/ciphers/aead.py\n--- a/src/cryptography/hazmat/primitives/ciphers/aead.py\n+++ b/src/cryptography/hazmat/primitives/ciphers/aead.py\n@@ -366,6 +366,8 @@\n associated_data: typing.List,\n ) -...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- AESSIV Encryption/Decryption fails if empty data is passed ## Issue description If an empty byte string is passed to `data` parameter of methods `encrypt` and `decrypt` of `AESSIV`, operation fails with `I...
open-mmlab__mmpose-295
[ { "content": "import copy as cp\nimport os\nimport os.path as osp\nfrom collections import OrderedDict\n\nimport json_tricks as json\nimport numpy as np\n\nfrom mmpose.datasets.builder import DATASETS\nfrom .topdown_base_dataset import TopDownBaseDataset\n\n\n@DATASETS.register_module()\nclass TopDownMpiiTrbDat...
[ { "content": "import copy as cp\nimport os\nimport os.path as osp\nfrom collections import OrderedDict\n\nimport json_tricks as json\nimport numpy as np\n\nfrom mmpose.datasets.builder import DATASETS\nfrom .topdown_base_dataset import TopDownBaseDataset\n\n\n@DATASETS.register_module()\nclass TopDownMpiiTrbDat...
diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py index 58ef18e945..15122ba944 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py @@ -170,7...
Pylint: W0105 ```bash mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py:173:8: W0105: String statement has no effect (pointless-string-statement) ```
diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py --- a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py @@ -170,7 +170,7 @@ for metric in me...
{"golden_diff": "diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py\n--- a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py\n+++ b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py\n@@ -170,7 +170,7 @@\n ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Pylint: W0105 ```bash mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py:173:8: W0105: String statement has no effect (pointless-string-statement) ``` --- END ISSUE --- Below are some code segm...
holoviz__holoviews-5452
[ { "content": "\"\"\"\nCollection of either extremely generic or simple Operation\nexamples.\n\"\"\"\nimport warnings\n\nimport numpy as np\nimport param\n\nfrom param import _is_number\n\nfrom ..core import (Operation, NdOverlay, Overlay, GridMatrix,\n HoloMap, Dataset, Element, Collator, Dim...
[ { "content": "\"\"\"\nCollection of either extremely generic or simple Operation\nexamples.\n\"\"\"\nimport warnings\n\nimport numpy as np\nimport param\n\nfrom param import _is_number\n\nfrom ..core import (Operation, NdOverlay, Overlay, GridMatrix,\n HoloMap, Dataset, Element, Collator, Dim...
diff --git a/holoviews/operation/element.py b/holoviews/operation/element.py index 3c982fe1d7..d70e600f07 100644 --- a/holoviews/operation/element.py +++ b/holoviews/operation/element.py @@ -909,7 +909,8 @@ def _process_layer(self, element, key=None): if len(sliced) > self.p.max_samples: prng = ...
Interpolated charts (Curve, Area, etc) plot data in the provided order, but decimate unsorts data #### ALL software version info | Library | Version | | -- | -- | | python | 3.9.13 | | holoviews | 1.15.0 | | bokeh | 2.4.3 | | pandas | 1.4.4 | | numpy | 1.23.3 | #### Description of expected behavior and the ob...
diff --git a/holoviews/operation/element.py b/holoviews/operation/element.py --- a/holoviews/operation/element.py +++ b/holoviews/operation/element.py @@ -909,7 +909,8 @@ if len(sliced) > self.p.max_samples: prng = np.random.RandomState(self.p.random_seed) - return sliced.iloc[prng.ch...
{"golden_diff": "diff --git a/holoviews/operation/element.py b/holoviews/operation/element.py\n--- a/holoviews/operation/element.py\n+++ b/holoviews/operation/element.py\n@@ -909,7 +909,8 @@\n \n if len(sliced) > self.p.max_samples:\n prng = np.random.RandomState(self.p.random_seed)\n- re...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Interpolated charts (Curve, Area, etc) plot data in the provided order, but decimate unsorts data #### ALL software version info | Library | Version | | -- | -- | | python | 3.9.13 | | holoviews | 1.15.0 ...
interlegis__sapl-979
[ { "content": "import re\nfrom datetime import date\nfrom subprocess import PIPE, call\n\nimport pkg_resources\nimport reversion\nimport yaml\nfrom django.apps import apps\nfrom django.apps.config import AppConfig\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import Con...
[ { "content": "import re\nfrom datetime import date\nfrom subprocess import PIPE, call\n\nimport pkg_resources\nimport reversion\nimport yaml\nfrom django.apps import apps\nfrom django.apps.config import AppConfig\nfrom django.contrib.auth import get_user_model\nfrom django.contrib.contenttypes.models import Con...
diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py index 307eef716..379ac13ad 100644 --- a/sapl/legacy/migration.py +++ b/sapl/legacy/migration.py @@ -633,7 +633,9 @@ def adjust_normajuridica_antes_salvar(new, old): def adjust_normajuridica_depois_salvar(new, old): # Ajusta relação M2M lista_pk...
Erro na função adjust_normajuridica_depois_salvar() ``` File "[...]/sapl/sapl/legacy/migration.py", line 636, in adjust_normajuridica_depois_salvar new.assuntos.add(AssuntoNorma.objects.get(pk=pk_assunto)) ValueError: invalid literal for int() with base 10: '' ``` É preciso verificar porque esse erro está ac...
diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py --- a/sapl/legacy/migration.py +++ b/sapl/legacy/migration.py @@ -633,7 +633,9 @@ def adjust_normajuridica_depois_salvar(new, old): # Ajusta relação M2M lista_pks_assunto = old.cod_assunto.split(',') - for pk_assunto in lista_pks_assunto: + ...
{"golden_diff": "diff --git a/sapl/legacy/migration.py b/sapl/legacy/migration.py\n--- a/sapl/legacy/migration.py\n+++ b/sapl/legacy/migration.py\n@@ -633,7 +633,9 @@\n def adjust_normajuridica_depois_salvar(new, old):\n # Ajusta rela\u00e7\u00e3o M2M\n lista_pks_assunto = old.cod_assunto.split(',')\n- for p...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Erro na função adjust_normajuridica_depois_salvar() ``` File "[...]/sapl/sapl/legacy/migration.py", line 636, in adjust_normajuridica_depois_salvar new.assuntos.add(AssuntoNorma.objects.get(pk=pk_assunt...
uccser__cs-unplugged-862
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nDjango settings for production environment.\n\n- Load secret values from environment variables.\n- Set static URL to Google Cloud Storage Bucket.\n\"\"\"\n\nfrom .base import * # noqa: F403\n\n\n# SECRET CONFIGURATION\n# -------------------------------------------...
[ { "content": "# -*- coding: utf-8 -*-\n\"\"\"\nDjango settings for production environment.\n\n- Load secret values from environment variables.\n- Set static URL to Google Cloud Storage Bucket.\n\"\"\"\n\nfrom .base import * # noqa: F403\n\n\n# SECRET CONFIGURATION\n# -------------------------------------------...
diff --git a/csunplugged/config/settings/production.py b/csunplugged/config/settings/production.py index 3ade6034b..cb1c808a2 100644 --- a/csunplugged/config/settings/production.py +++ b/csunplugged/config/settings/production.py @@ -23,7 +23,10 @@ # URL Configuration # ----------------------------------------------...
Only prepend www for production website It should not be used for development website.
diff --git a/csunplugged/config/settings/production.py b/csunplugged/config/settings/production.py --- a/csunplugged/config/settings/production.py +++ b/csunplugged/config/settings/production.py @@ -23,7 +23,10 @@ # URL Configuration # ------------------------------------------------------------------------------ -...
{"golden_diff": "diff --git a/csunplugged/config/settings/production.py b/csunplugged/config/settings/production.py\n--- a/csunplugged/config/settings/production.py\n+++ b/csunplugged/config/settings/production.py\n@@ -23,7 +23,10 @@\n \n # URL Configuration\n # ---------------------------------------------------------...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Only prepend www for production website It should not be used for development website. --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs....
kivy__kivy-2526
[ { "content": "'''Scroll View\n===========\n\n.. versionadded:: 1.0.4\n\nThe :class:`ScrollView` widget provides a scrollable/pannable viewport that is\nclipped at the scrollview's bounding box.\n\n\nScrolling Behavior\n------------------\n\nThe ScrollView accepts only one child and applies a viewport/window to\...
[ { "content": "'''Scroll View\n===========\n\n.. versionadded:: 1.0.4\n\nThe :class:`ScrollView` widget provides a scrollable/pannable viewport that is\nclipped at the scrollview's bounding box.\n\n\nScrolling Behavior\n------------------\n\nThe ScrollView accepts only one child and applies a viewport/window to\...
diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py index f2bd288144..155607b052 100644 --- a/kivy/uix/scrollview.py +++ b/kivy/uix/scrollview.py @@ -644,7 +644,7 @@ def on_scroll_start(self, touch, check_children=True): self._scroll_y_mouse = self.scroll_y if (ud.get('in_bar_x', False)...
Inspector property list scrolling selects an underlying widget While scrolling with the mouse wheel through the property list of a selected widget, a different widget (one underneath the property list) is selected, when reaching the top or the bottom of the list. The same happens while trying to drag the view with the ...
diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py --- a/kivy/uix/scrollview.py +++ b/kivy/uix/scrollview.py @@ -644,7 +644,7 @@ self._scroll_y_mouse = self.scroll_y if (ud.get('in_bar_x', False) or ud.get('in_bar_y', False)): - return + return True if sc...
{"golden_diff": "diff --git a/kivy/uix/scrollview.py b/kivy/uix/scrollview.py\n--- a/kivy/uix/scrollview.py\n+++ b/kivy/uix/scrollview.py\n@@ -644,7 +644,7 @@\n self._scroll_y_mouse = self.scroll_y\n \n if (ud.get('in_bar_x', False) or ud.get('in_bar_y', False)):\n- return\n+ r...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Inspector property list scrolling selects an underlying widget While scrolling with the mouse wheel through the property list of a selected widget, a different widget (one underneath the property list) is sel...
encode__httpx-721
[ { "content": "import typing\n\nfrom ..backends.base import BaseSemaphore, ConcurrencyBackend, lookup_backend\nfrom ..config import (\n DEFAULT_POOL_LIMITS,\n CertTypes,\n PoolLimits,\n SSLConfig,\n Timeout,\n VerifyTypes,\n)\nfrom ..exceptions import PoolTimeout\nfrom ..models import Origin, R...
[ { "content": "import typing\n\nfrom ..backends.base import BaseSemaphore, ConcurrencyBackend, lookup_backend\nfrom ..config import (\n DEFAULT_POOL_LIMITS,\n CertTypes,\n PoolLimits,\n SSLConfig,\n Timeout,\n VerifyTypes,\n)\nfrom ..exceptions import PoolTimeout\nfrom ..models import Origin, R...
diff --git a/httpx/dispatch/connection_pool.py b/httpx/dispatch/connection_pool.py index 545e204521..3e09b11017 100644 --- a/httpx/dispatch/connection_pool.py +++ b/httpx/dispatch/connection_pool.py @@ -206,6 +206,7 @@ async def close(self) -> None: connections = list(self.keepalive_connections) self....
Keepalive connections aren't released when closing the ConnectionPool Hello. I am having an issue where it looks like connections aren't being closed correctly, and after i reach a number of requests equivalent to "hard_limit" of pool_limits, i get a PoolTimeout exception. I tried upgrading to httpx==0.10.1, with no...
diff --git a/httpx/dispatch/connection_pool.py b/httpx/dispatch/connection_pool.py --- a/httpx/dispatch/connection_pool.py +++ b/httpx/dispatch/connection_pool.py @@ -206,6 +206,7 @@ connections = list(self.keepalive_connections) self.keepalive_connections.clear() for connection in connection...
{"golden_diff": "diff --git a/httpx/dispatch/connection_pool.py b/httpx/dispatch/connection_pool.py\n--- a/httpx/dispatch/connection_pool.py\n+++ b/httpx/dispatch/connection_pool.py\n@@ -206,6 +206,7 @@\n connections = list(self.keepalive_connections)\n self.keepalive_connections.clear()\n for c...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Keepalive connections aren't released when closing the ConnectionPool Hello. I am having an issue where it looks like connections aren't being closed correctly, and after i reach a number of requests equivale...
wright-group__WrightTools-899
[ { "content": "\"\"\"Dataset base class.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport collections\n\nimport numpy as np\n\nimport h5py\n\nfrom . import exceptions as wt_exceptions\nfrom . import kit as wt_kit\nfrom . import units as wt...
[ { "content": "\"\"\"Dataset base class.\"\"\"\n\n\n# --- import --------------------------------------------------------------------------------------\n\n\nimport collections\n\nimport numpy as np\n\nimport h5py\n\nfrom . import exceptions as wt_exceptions\nfrom . import kit as wt_kit\nfrom . import units as wt...
diff --git a/WrightTools/_dataset.py b/WrightTools/_dataset.py index 84b00379e..a898f1b2a 100644 --- a/WrightTools/_dataset.py +++ b/WrightTools/_dataset.py @@ -117,9 +117,12 @@ def _clear_array_attributes_cache(self): @property def _leaf(self): out = self.natural_name + if self.size == 1: + ...
print_tree should print value and units for variables with size 1
diff --git a/WrightTools/_dataset.py b/WrightTools/_dataset.py --- a/WrightTools/_dataset.py +++ b/WrightTools/_dataset.py @@ -117,9 +117,12 @@ @property def _leaf(self): out = self.natural_name + if self.size == 1: + out += f" = {self.points}" if self.units is not None: ...
{"golden_diff": "diff --git a/WrightTools/_dataset.py b/WrightTools/_dataset.py\n--- a/WrightTools/_dataset.py\n+++ b/WrightTools/_dataset.py\n@@ -117,9 +117,12 @@\n @property\n def _leaf(self):\n out = self.natural_name\n+ if self.size == 1:\n+ out += f\" = {self.points}\"\n i...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- print_tree should print value and units for variables with size 1 --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may contain bugs. --- BEGIN FILES ---...
pulp__pulpcore-4156
[ { "content": "from gettext import gettext as _\n\nimport asyncio\nfrom collections import namedtuple\nimport logging\nimport os\nimport tempfile\nfrom urllib.parse import urlsplit\n\nfrom pulpcore.app import pulp_hashlib\nfrom pulpcore.app.models import Artifact\nfrom pulpcore.exceptions import (\n DigestVal...
[ { "content": "from gettext import gettext as _\n\nimport asyncio\nfrom collections import namedtuple\nimport logging\nimport os\nimport tempfile\nfrom urllib.parse import urlsplit\n\nfrom pulpcore.app import pulp_hashlib\nfrom pulpcore.app.models import Artifact\nfrom pulpcore.exceptions import (\n DigestVal...
diff --git a/CHANGES/4107.bugfix b/CHANGES/4107.bugfix new file mode 100644 index 0000000000..73fb394cc7 --- /dev/null +++ b/CHANGES/4107.bugfix @@ -0,0 +1 @@ +Updated the downloader's fetch method to comply with Python 3.11. diff --git a/pulpcore/download/base.py b/pulpcore/download/base.py index 59223deac3..7bbaa4f4c...
BaseDownloader.fetch passes coroutine to asyncio.wait which is forbidden in python 3.11 Python 3.8 deprecated passing coroutines to `asyncio.wait` and Python 3.11 will now [raise an error](https://github.com/python/cpython/blob/a6313d78f21f79ca64dedd38e637509dc530a1b6/Lib/asyncio/tasks.py#L414C13-L414C13). This causes ...
diff --git a/pulpcore/download/base.py b/pulpcore/download/base.py --- a/pulpcore/download/base.py +++ b/pulpcore/download/base.py @@ -182,8 +182,8 @@ Raises: Exception: Any fatal exception emitted during downloading """ - done, _ = asyncio.get_event_loop().run_until_complete(async...
{"golden_diff": "diff --git a/pulpcore/download/base.py b/pulpcore/download/base.py\n--- a/pulpcore/download/base.py\n+++ b/pulpcore/download/base.py\n@@ -182,8 +182,8 @@\n Raises:\n Exception: Any fatal exception emitted during downloading\n \"\"\"\n- done, _ = asyncio.get_event_loop...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- BaseDownloader.fetch passes coroutine to asyncio.wait which is forbidden in python 3.11 Python 3.8 deprecated passing coroutines to `asyncio.wait` and Python 3.11 will now [raise an error](https://github.com/...
ludwig-ai__ludwig-1702
[ { "content": "# Copyright (c) 2019 Uber Technologies, 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 requ...
[ { "content": "# Copyright (c) 2019 Uber Technologies, 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 requ...
diff --git a/ludwig/features/base_feature.py b/ludwig/features/base_feature.py index 1d7d2c5a1e1..251c3131daa 100644 --- a/ludwig/features/base_feature.py +++ b/ludwig/features/base_feature.py @@ -217,6 +217,7 @@ def __init__(self, feature: Dict[str, Any], other_output_features: Dict[str, "Ou logger.debug(" F...
Shape mismatch when introducing multiple levels of dependencies **Describe the bug** When introducing multiple levels of dependencies, the shape of the _concatenated hidden states_ does not match the _input size for the dense layer of the output feature_. In my case, the text output feature `qty_frac` depends on ...
diff --git a/ludwig/features/base_feature.py b/ludwig/features/base_feature.py --- a/ludwig/features/base_feature.py +++ b/ludwig/features/base_feature.py @@ -217,6 +217,7 @@ logger.debug(" FCStack") self.input_size = get_input_size_with_dependencies(self.input_size, self.dependencies, other_output...
{"golden_diff": "diff --git a/ludwig/features/base_feature.py b/ludwig/features/base_feature.py\n--- a/ludwig/features/base_feature.py\n+++ b/ludwig/features/base_feature.py\n@@ -217,6 +217,7 @@\n logger.debug(\" FCStack\")\n \n self.input_size = get_input_size_with_dependencies(self.input_size, self.d...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Shape mismatch when introducing multiple levels of dependencies **Describe the bug** When introducing multiple levels of dependencies, the shape of the _concatenated hidden states_ does not match the _inpu...
pulp__pulpcore-4010
[ { "content": "\"\"\"\nViewSet for replicating repositories and distributions from an upstream Pulp\n\"\"\"\nfrom django.conf import settings\nfrom drf_spectacular.utils import extend_schema\nfrom rest_framework import mixins\nfrom rest_framework.decorators import action\n\nfrom pulpcore.app.models import TaskGr...
[ { "content": "\"\"\"\nViewSet for replicating repositories and distributions from an upstream Pulp\n\"\"\"\nfrom django.conf import settings\nfrom drf_spectacular.utils import extend_schema\nfrom rest_framework import mixins\nfrom rest_framework.decorators import action\n\nfrom pulpcore.app.models import TaskGr...
diff --git a/CHANGES/3995.bugfix b/CHANGES/3995.bugfix new file mode 100644 index 0000000000..acfdd5ad32 --- /dev/null +++ b/CHANGES/3995.bugfix @@ -0,0 +1 @@ +Fix api schema of the `upstream_pulp_replicate` operation requiring no body. diff --git a/pulpcore/app/viewsets/replica.py b/pulpcore/app/viewsets/replica.py in...
RESTAPI document fix for Upstream Pulp Replication API **Version** Pulp installed through the Python modules. "core:3.28.0" "certguard:3.28.0" "file:3.28.0" "python:3.28.0" "rpm:3.28.0" **Describe the bug** Why the attributes of **upstream_pulps_create**/**update** is mentioned again in the **upstream_pulps_...
diff --git a/pulpcore/app/viewsets/replica.py b/pulpcore/app/viewsets/replica.py --- a/pulpcore/app/viewsets/replica.py +++ b/pulpcore/app/viewsets/replica.py @@ -33,6 +33,7 @@ summary="Replicate", description="Trigger an asynchronous repository replication task group. This API is " "provided...
{"golden_diff": "diff --git a/pulpcore/app/viewsets/replica.py b/pulpcore/app/viewsets/replica.py\n--- a/pulpcore/app/viewsets/replica.py\n+++ b/pulpcore/app/viewsets/replica.py\n@@ -33,6 +33,7 @@\n summary=\"Replicate\",\n description=\"Trigger an asynchronous repository replication task group. This AP...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- RESTAPI document fix for Upstream Pulp Replication API **Version** Pulp installed through the Python modules. "core:3.28.0" "certguard:3.28.0" "file:3.28.0" "python:3.28.0" "rpm:3.28.0" **Describe th...
searx__searx-672
[ { "content": "'''\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 in the hope that it will b...
[ { "content": "'''\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 in the hope that it will b...
diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py index 75cbae0dea..438274c410 100644 --- a/searx/plugins/self_info.py +++ b/searx/plugins/self_info.py @@ -29,6 +29,8 @@ # request: flask request object # ctx: the whole local context of the pre search hook def post_search(request, ctx): + if c...
Infinite scroll: answer are repeated on each page How to reproduce : search for ["user agent"](https://searx.me/?q=user+agent) with Infinite scroll activated. Should the answer be disabled except the first page ? or should Infinite Scroll hide the answer ? I vote for the first option : disabled answers except on the ...
diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py --- a/searx/plugins/self_info.py +++ b/searx/plugins/self_info.py @@ -29,6 +29,8 @@ # request: flask request object # ctx: the whole local context of the pre search hook def post_search(request, ctx): + if ctx['search'].pageno > 1: + re...
{"golden_diff": "diff --git a/searx/plugins/self_info.py b/searx/plugins/self_info.py\n--- a/searx/plugins/self_info.py\n+++ b/searx/plugins/self_info.py\n@@ -29,6 +29,8 @@\n # request: flask request object\n # ctx: the whole local context of the pre search hook\n def post_search(request, ctx):\n+ if ctx['search']...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Infinite scroll: answer are repeated on each page How to reproduce : search for ["user agent"](https://searx.me/?q=user+agent) with Infinite scroll activated. Should the answer be disabled except the first p...
fedora-infra__bodhi-4148
[ { "content": "# Copyright © 2019 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or ...
[ { "content": "# Copyright © 2019 Red Hat, Inc. and others.\n#\n# This file is part of Bodhi.\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or ...
diff --git a/bodhi/server/consumers/automatic_updates.py b/bodhi/server/consumers/automatic_updates.py index d553fe6973..bd14056520 100644 --- a/bodhi/server/consumers/automatic_updates.py +++ b/bodhi/server/consumers/automatic_updates.py @@ -199,6 +199,7 @@ def __call__(self, message: fedora_messaging.api.Message) -> ...
Crash in automatic update handler when submitting work_on_bugs_task From bodhi-consumer logs: ``` 2020-10-25 11:17:14,460 INFO [fedora_messaging.twisted.protocol][MainThread] Consuming message from topic org.fedoraproject.prod.buildsys.tag (message id c2d97737-444f-49b4-b4ca-1efb3a05e941) 2020-10-25 11:17:14,463 IN...
diff --git a/bodhi/server/consumers/automatic_updates.py b/bodhi/server/consumers/automatic_updates.py --- a/bodhi/server/consumers/automatic_updates.py +++ b/bodhi/server/consumers/automatic_updates.py @@ -199,6 +199,7 @@ except Exception as e: log.error(f'Problem obsoleting older updates...
{"golden_diff": "diff --git a/bodhi/server/consumers/automatic_updates.py b/bodhi/server/consumers/automatic_updates.py\n--- a/bodhi/server/consumers/automatic_updates.py\n+++ b/bodhi/server/consumers/automatic_updates.py\n@@ -199,6 +199,7 @@\n except Exception as e:\n log.error(f'Problem ob...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Crash in automatic update handler when submitting work_on_bugs_task From bodhi-consumer logs: ``` 2020-10-25 11:17:14,460 INFO [fedora_messaging.twisted.protocol][MainThread] Consuming message from topic o...
falconry__falcon-602
[ { "content": "# Copyright 2013 by Rackspace Hosting, 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 requir...
[ { "content": "# Copyright 2013 by Rackspace Hosting, 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 requir...
diff --git a/falcon/__init__.py b/falcon/__init__.py index 92ecb20dc..c0214b849 100644 --- a/falcon/__init__.py +++ b/falcon/__init__.py @@ -34,6 +34,7 @@ from falcon.errors import * # NOQA from falcon.redirects import * # NOQA from falcon.http_error import HTTPError # NOQA +from falcon.http_status import HTTPSta...
Hoist HTTPStatus into falcon top-level namespace I.e., add an import line to `falcon/__init__.py`
diff --git a/falcon/__init__.py b/falcon/__init__.py --- a/falcon/__init__.py +++ b/falcon/__init__.py @@ -34,6 +34,7 @@ from falcon.errors import * # NOQA from falcon.redirects import * # NOQA from falcon.http_error import HTTPError # NOQA +from falcon.http_status import HTTPStatus # NOQA from falcon.util impo...
{"golden_diff": "diff --git a/falcon/__init__.py b/falcon/__init__.py\n--- a/falcon/__init__.py\n+++ b/falcon/__init__.py\n@@ -34,6 +34,7 @@\n from falcon.errors import * # NOQA\n from falcon.redirects import * # NOQA\n from falcon.http_error import HTTPError # NOQA\n+from falcon.http_status import HTTPStatus # NOQ...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- Hoist HTTPStatus into falcon top-level namespace I.e., add an import line to `falcon/__init__.py` --- END ISSUE --- Below are some code segments, each from a relevant file. One or more of these files may c...
litestar-org__litestar-2244
[ { "content": "from __future__ import annotations\n\nimport sys\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom ._utils import RICH_CLICK_INSTALLED, LitestarEnv, LitestarExtensionGroup\nfrom .commands import core, schema, sessions\n\nif TYPE_CHECKING or not RICH_CLICK_INSTALLED: # pragma: no...
[ { "content": "from __future__ import annotations\n\nimport sys\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom ._utils import RICH_CLICK_INSTALLED, LitestarEnv, LitestarExtensionGroup\nfrom .commands import core, schema, sessions\n\nif TYPE_CHECKING or not RICH_CLICK_INSTALLED: # pragma: no...
diff --git a/litestar/cli/main.py b/litestar/cli/main.py index 4b43ecc888..0fd802e476 100644 --- a/litestar/cli/main.py +++ b/litestar/cli/main.py @@ -27,7 +27,7 @@ click.rich_click.STYLE_ERRORS_SUGGESTION = "magenta italic" click.rich_click.ERRORS_SUGGESTION = "" click.rich_click.ERRORS_EPILOGUE = "" - ...
StaticFilesConfig and virtual directories I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/using.html#). But because ``directories`` is defined as ``DirectoryPath``, pydantic checks if the given directories ...
diff --git a/litestar/cli/main.py b/litestar/cli/main.py --- a/litestar/cli/main.py +++ b/litestar/cli/main.py @@ -27,7 +27,7 @@ click.rich_click.STYLE_ERRORS_SUGGESTION = "magenta italic" click.rich_click.ERRORS_SUGGESTION = "" click.rich_click.ERRORS_EPILOGUE = "" - click.rich_click.MAX_WIDTH = 100 ...
{"golden_diff": "diff --git a/litestar/cli/main.py b/litestar/cli/main.py\n--- a/litestar/cli/main.py\n+++ b/litestar/cli/main.py\n@@ -27,7 +27,7 @@\n click.rich_click.STYLE_ERRORS_SUGGESTION = \"magenta italic\"\n click.rich_click.ERRORS_SUGGESTION = \"\"\n click.rich_click.ERRORS_EPILOGUE = \"\"\n- cli...
We are currently solving the following issue within our repository. Here is the issue text: --- BEGIN ISSUE --- StaticFilesConfig and virtual directories I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/usin...