in_source_id stringlengths 13 58 | issue stringlengths 3 241k | before_files listlengths 0 3 | after_files listlengths 0 3 | pr_diff stringlengths 109 107M ⌀ |
|---|---|---|---|---|
chainer__chainer-764 | cuda.cupy.clip errors
If I runt he code
`cuda.cupy.clip(cuda.cupy.arange(10), 2, 7)`
I get the following error
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-e529e5fea46e> in <module>()
---... | [
{
"content": "from cupy import core\n\n\n# TODO(okuta): Implement convolve\n\n\ndef clip(a, a_min, a_max, out=None):\n '''Clips the values of an array to a given interval.\n\n This is equivalent to ``maximum(minimum(a, a_max), a_min)``, while this\n function is more efficient.\n\n Args:\n a (... | [
{
"content": "from cupy import core\n\n\n# TODO(okuta): Implement convolve\n\n\ndef clip(a, a_min, a_max, out=None):\n '''Clips the values of an array to a given interval.\n\n This is equivalent to ``maximum(minimum(a, a_max), a_min)``, while this\n function is more efficient.\n\n Args:\n a (... | diff --git a/cupy/math/misc.py b/cupy/math/misc.py
index 434da3ce9c3b..01697aee8c0b 100644
--- a/cupy/math/misc.py
+++ b/cupy/math/misc.py
@@ -23,7 +23,7 @@ def clip(a, a_min, a_max, out=None):
'''
# TODO(okuta): check type
- return a(a_min, a_max, out=out)
+ return a.clip(a_min, a_max, out=out)
... |
dask__dask-6299 | importing fails when calling python -OO
This was discovered by `xarray`'s `upstream-dev` CI ([environment](https://dev.azure.com/xarray/xarray/_build/results?buildId=2996&view=logs&j=2280efed-fda1-53bd-9213-1fa8ec9b4fa8&t=031ddd67-e55f-5fbd-2283-1ff4dfed6587)) a few days ago, but we were a bit slow in reporting so this... | [
{
"content": "from functools import partial\nfrom itertools import product\n\nimport numpy as np\n\nfrom tlz import curry\n\nfrom ..base import tokenize\nfrom ..utils import funcname\nfrom .core import Array, normalize_chunks\nfrom .utils import meta_from_array\n\n\ndef _parse_wrap_args(func, args, kwargs, shap... | [
{
"content": "from functools import partial\nfrom itertools import product\n\nimport numpy as np\n\nfrom tlz import curry\n\nfrom ..base import tokenize\nfrom ..utils import funcname\nfrom .core import Array, normalize_chunks\nfrom .utils import meta_from_array\n\n\ndef _parse_wrap_args(func, args, kwargs, shap... | diff --git a/dask/array/wrap.py b/dask/array/wrap.py
index af3d1487f1a..7d06ce01c1b 100644
--- a/dask/array/wrap.py
+++ b/dask/array/wrap.py
@@ -170,6 +170,4 @@ def full_like(a, fill_value, *args, **kwargs):
full.__doc__ = _full.__doc__
-full.__name__ = _full.__name__
full_like.__doc__ = _full_like.__doc__
-full_... |
unionai-oss__pandera-1419 | Date type not exported
**Describe the bug**
In the `__all__` list [here](https://github.com/unionai-oss/pandera/blob/37c24d94ae719dcf4cdc36d1f204478539fce74a/pandera/__init__.py#L104-L106), the type `Date` is missing, causing complaints from mypy if you refer to the type as `pa.Date` -- you have to fully qualify it as... | [
{
"content": "\"\"\"A flexible and expressive pandas validation library.\"\"\"\nimport platform\n\nimport pandera.backends\nfrom pandera import errors, external_config, typing\nfrom pandera.accessors import pandas_accessor\nfrom pandera.api import extensions\nfrom pandera.api.checks import Check\nfrom pandera.a... | [
{
"content": "\"\"\"A flexible and expressive pandas validation library.\"\"\"\nimport platform\n\nimport pandera.backends\nfrom pandera import errors, external_config, typing\nfrom pandera.accessors import pandas_accessor\nfrom pandera.api import extensions\nfrom pandera.api.checks import Check\nfrom pandera.a... | diff --git a/pandera/__init__.py b/pandera/__init__.py
index 1ebee0126..ecbc07a7c 100644
--- a/pandera/__init__.py
+++ b/pandera/__init__.py
@@ -101,6 +101,7 @@
"Complex64",
"Complex128",
"Complex256",
+ "Date",
"DataType",
"DateTime",
"Float",
|
pyodide__pyodide-2939 | Add lzma
As mentioned by @hoodmane in https://github.com/pyodide/pyodide/discussions/2930#discussioncomment-3316181
> Is there an issue open about lzma? What is our position on it again? That we want it but there is no emscripten port and we haven't gotten to it?
I think the main concern was the size increase for... | [
{
"content": "import contextlib\nimport functools\nimport os\nimport subprocess\nimport sys\nfrom collections.abc import Generator, Iterable, Iterator, Mapping\nfrom pathlib import Path\n\nimport tomli\nfrom packaging.tags import Tag, compatible_tags, cpython_tags\nfrom packaging.utils import parse_wheel_filena... | [
{
"content": "import contextlib\nimport functools\nimport os\nimport subprocess\nimport sys\nfrom collections.abc import Generator, Iterable, Iterator, Mapping\nfrom pathlib import Path\n\nimport tomli\nfrom packaging.tags import Tag, compatible_tags, cpython_tags\nfrom packaging.utils import parse_wheel_filena... | diff --git a/Makefile.envs b/Makefile.envs
index 207c7ecdcb5..d53d266ef91 100644
--- a/Makefile.envs
+++ b/Makefile.envs
@@ -145,7 +145,7 @@ export MAIN_MODULE_CFLAGS= $(CFLAGS_BASE) \
-I$(PYTHONINCLUDE) \
-s EXCEPTION_CATCHING_ALLOWED=['we only want to allow exception handling in side modules']
-export STDLIB_MO... |
wemake-services__wemake-python-styleguide-776 | Add `reveal_type` to forbidden functions
Now it is not recognised as invalid.
However, there's no reason to use it in production.
| [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThis module contains list of white- and black-listed ``python`` members.\n\nIt contains lists of keywords and built-in functions we discourage to use.\nIt also contains some exceptions that we allow to use in our codebase.\n\"\"\"\n\nimport re\n\nfrom typing_exte... | [
{
"content": "# -*- coding: utf-8 -*-\n\n\"\"\"\nThis module contains list of white- and black-listed ``python`` members.\n\nIt contains lists of keywords and built-in functions we discourage to use.\nIt also contains some exceptions that we allow to use in our codebase.\n\"\"\"\n\nimport re\n\nfrom typing_exte... | diff --git a/wemake_python_styleguide/constants.py b/wemake_python_styleguide/constants.py
index 5db381af4..0ce2b4050 100644
--- a/wemake_python_styleguide/constants.py
+++ b/wemake_python_styleguide/constants.py
@@ -46,6 +46,9 @@
# OOP:
'staticmethod',
+
+ # Mypy:
+ 'reveal_type',
))
#: List of m... |
e2nIEE__pandapower-2242 | connected_components documentation error
### Feature Checklist
- [X] Searched the [issues page](https://github.com/e2nIEE/pandapower/issues) for similar reports
- [X] Read the relevant sections of the [documentation](https://pandapower.readthedocs.io/en/latest/about.html)
- [ ] Browse the [tutorials](https://github.... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nimport networkx as nx\nimport pandas as pd\nfrom collections import deque\nfrom itertools import combi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2016-2023 by University of Kassel and Fraunhofer Institute for Energy Economics\n# and Energy System Technology (IEE), Kassel. All rights reserved.\n\n\nimport networkx as nx\nimport pandas as pd\nfrom collections import deque\nfrom itertools import combi... | diff --git a/pandapower/topology/graph_searches.py b/pandapower/topology/graph_searches.py
index d3adeffab..2490646c9 100644
--- a/pandapower/topology/graph_searches.py
+++ b/pandapower/topology/graph_searches.py
@@ -70,7 +70,7 @@ def connected_components(mg, notravbuses=set()):
mg = top.create_nxgraph(net)... |
pyqtgraph__pyqtgraph-868 | Crash on closing Matplotlib export
E.g. when opening the Matplotlib exporter multiple times, and closing the windows again, Python crashes with a segmentation fault.
This is caused by the Matplotlib QMainWindow listening to the closeEvent and deleting the only reference of the window before it is closed properly.
| [
{
"content": "from ..Qt import QtGui, QtCore\nfrom .Exporter import Exporter\nfrom .. import PlotItem\nfrom .. import functions as fn\n\n__all__ = ['MatplotlibExporter']\n\n\"\"\"\nIt is helpful when using the matplotlib Exporter if your\n.matplotlib/matplotlibrc file is configured appropriately.\nThe following... | [
{
"content": "from ..Qt import QtGui, QtCore\nfrom .Exporter import Exporter\nfrom .. import PlotItem\nfrom .. import functions as fn\n\n__all__ = ['MatplotlibExporter']\n\n\"\"\"\nIt is helpful when using the matplotlib Exporter if your\n.matplotlib/matplotlibrc file is configured appropriately.\nThe following... | diff --git a/pyqtgraph/exporters/Matplotlib.py b/pyqtgraph/exporters/Matplotlib.py
index 2da979b118..dedc2b8741 100644
--- a/pyqtgraph/exporters/Matplotlib.py
+++ b/pyqtgraph/exporters/Matplotlib.py
@@ -124,5 +124,4 @@ def __getattr__(self, attr):
def closeEvent(self, ev):
MatplotlibExporter.win... |
nautobot__nautobot-987 | FileVar job variable causes Server Error
<!--
NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED.
This form is only for reporting reproducible bugs. If you need assistance
with Nautobot installation, or if you have a general question, please start a
discussion instead: https://gi... | [
{
"content": "import os\nimport platform\n\nfrom django.contrib.messages import constants as messages\n\nfrom nautobot import __version__\nfrom nautobot.core.settings_funcs import is_truthy, parse_redis_connection\n\n#\n# Environment setup\n#\n\n# This is used for display in the UI.\nVERSION = __version__\n\n# ... | [
{
"content": "import os\nimport platform\n\nfrom django.contrib.messages import constants as messages\n\nfrom nautobot import __version__\nfrom nautobot.core.settings_funcs import is_truthy, parse_redis_connection\n\n#\n# Environment setup\n#\n\n# This is used for display in the UI.\nVERSION = __version__\n\n# ... | diff --git a/nautobot/core/settings.py b/nautobot/core/settings.py
index 5a8f0fd8de5..6cf4e63b811 100644
--- a/nautobot/core/settings.py
+++ b/nautobot/core/settings.py
@@ -304,6 +304,7 @@
"health_check",
"health_check.cache",
"health_check.storage",
+ "db_file_storage",
]
# Middleware
diff --git ... |
CTFd__CTFd-863 | get_config return default
get_config(key) should probably be get_config(key, default=None). This helps in some ideas where you want to do different behavior if get_config returns None.
| [
{
"content": "import sys\nimport os\n\nfrom distutils.version import StrictVersion\nfrom flask import Flask, Request\nfrom werkzeug.utils import cached_property\nfrom werkzeug.contrib.fixers import ProxyFix\nfrom jinja2 import FileSystemLoader\nfrom jinja2.sandbox import SandboxedEnvironment\nfrom six.moves imp... | [
{
"content": "import sys\nimport os\n\nfrom distutils.version import StrictVersion\nfrom flask import Flask, Request\nfrom werkzeug.utils import cached_property\nfrom werkzeug.contrib.fixers import ProxyFix\nfrom jinja2 import FileSystemLoader\nfrom jinja2.sandbox import SandboxedEnvironment\nfrom six.moves imp... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5f8fc51fb..b9edd2324 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,31 @@
+2.0.4 / 2019-01-30
+==================
+
+**General**
+* Block user & team name changes if name changes are disabled (Closes #835)
+* Set accounts to unconfirmed if email is changed while `... |
pydantic__pydantic-2139 | `underscore_attrs_are_private` breaks generics
### Checks
* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a bug
# Bug
Ou... | [
{
"content": "import warnings\nimport weakref\nfrom collections import OrderedDict, defaultdict, deque\nfrom copy import deepcopy\nfrom itertools import islice\nfrom types import BuiltinFunctionType, CodeType, FunctionType, GeneratorType, LambdaType, ModuleType\nfrom typing import (\n TYPE_CHECKING,\n Abs... | [
{
"content": "import warnings\nimport weakref\nfrom collections import OrderedDict, defaultdict, deque\nfrom copy import deepcopy\nfrom itertools import islice\nfrom types import BuiltinFunctionType, CodeType, FunctionType, GeneratorType, LambdaType, ModuleType\nfrom typing import (\n TYPE_CHECKING,\n Abs... | diff --git a/changes/2138-PrettyWood.md b/changes/2138-PrettyWood.md
new file mode 100644
index 00000000000..e58d0ed169b
--- /dev/null
+++ b/changes/2138-PrettyWood.md
@@ -0,0 +1 @@
+fix: support `underscore_attrs_are_private` with generic models
\ No newline at end of file
diff --git a/pydantic/utils.py b/pydantic/uti... |
qtile__qtile-1837 | 0.16.0: impossible to build from github sources (to run tests)
<!--
Please do not ask general questions here! There are [community
contact](https://github.com/qtile/qtile#community) options for that.
-->
# Issue description
Hi! I package qtile for Arch Linux. I'm currently trying to build 0.16.0.
Usually I al... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) 2008 Aldo Cortesi\n# Copyright (c) 2011 Mounier Florian\n# Copyright (c) 2012 dmpayton\n# Copyright (c) 2014 Sean Vig\n# Copyright (c) 2014 roger\n# Copyright (c) 2014 Pedro Algarvio\n# Copyright (c) 2014-2015 Tycho Andersen\n#\n# Permission is hereby gran... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) 2008 Aldo Cortesi\n# Copyright (c) 2011 Mounier Florian\n# Copyright (c) 2012 dmpayton\n# Copyright (c) 2014 Sean Vig\n# Copyright (c) 2014 roger\n# Copyright (c) 2014 Pedro Algarvio\n# Copyright (c) 2014-2015 Tycho Andersen\n#\n# Permission is hereby gran... | diff --git a/MANIFEST.in b/MANIFEST.in
index 08975f6dc1..0f66062037 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -16,11 +16,11 @@ exclude logo.png
graft libqtile/resources
graft resources
+graft test
prune bin
prune docs
prune scripts
-prune test
prune rpm
include bin/dqtile-cmd
include bin/iqshell
diff --... |
facebookresearch__fairseq-62 | installation from source requires installing cffi
This is a very minor documentation issue
note: using python3/pip3 as there is a comment about requiring python 3 for fairseq-py
not using anaconda..I have had issues with package consistency..so I avoid it
fairseq-py installed with
git clone https://github.com/face... | [
{
"content": "# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the LICENSE file in\n# the root directory of this source tree. An additional grant of patent rights\n# can be found in the PATENTS file in the same directory.\n#\n\n\"... | [
{
"content": "# Copyright (c) 2017-present, Facebook, Inc.\n# All rights reserved.\n#\n# This source code is licensed under the license found in the LICENSE file in\n# the root directory of this source tree. An additional grant of patent rights\n# can be found in the PATENTS file in the same directory.\n#\n\n\"... | diff --git a/fairseq/progress_bar.py b/fairseq/progress_bar.py
index 713f73b7b2..2c4acf833f 100644
--- a/fairseq/progress_bar.py
+++ b/fairseq/progress_bar.py
@@ -13,7 +13,6 @@
from collections import OrderedDict
import json
from numbers import Number
-import sys
from tqdm import tqdm
diff --git a/requirements.... |
pex-tool__pex-795 | pex --index-url=... fails in 2.0.0
Hello,
In my team we have an issue since this morning with the new version of PEX
This is a big Django project but with simple configuration.
Here is an extract of the setup.py
```
setuptools.setup(
name='rackguru-api',
version=find_version(),
install_requi... | [
{
"content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\n\"\"\"\nThe pex.bin.pex utility builds PEX environments and .pex files specified by\nsources, requirements and their dependencies.\n\"\"\"\n\nfrom __future__ impor... | [
{
"content": "# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).\n# Licensed under the Apache License, Version 2.0 (see LICENSE).\n\n\"\"\"\nThe pex.bin.pex utility builds PEX environments and .pex files specified by\nsources, requirements and their dependencies.\n\"\"\"\n\nfrom __future__ impor... | diff --git a/pex/bin/pex.py b/pex/bin/pex.py
index 1376c3bbc..7268aa712 100755
--- a/pex/bin/pex.py
+++ b/pex/bin/pex.py
@@ -60,7 +60,7 @@ def process_disable_cache(option, option_str, option_value, parser):
class PyPiSentinel(object):
def __str__(self):
- 'https://pypi.org/simple'
+ return 'https://pypi.or... |
liberapay__liberapay.com-726 | The list of top individuals is incomplete
While looking at https://liberapay.com/explore/individuals I realized that ploum isn't listed. It's because he doesn't have a profile statement. The thinking was that without a statement there isn't much to see on a profile page, so there's little point in linking to it. Howeve... | [
{
"content": "# coding: utf8\nfrom __future__ import print_function, unicode_literals\n\nfrom collections import namedtuple, OrderedDict\nfrom datetime import date, datetime, timedelta\nfrom decimal import Decimal, ROUND_UP\nimport re\n\nfrom jinja2 import StrictUndefined\nfrom pando.utils import utc\n\n\nclass... | [
{
"content": "# coding: utf8\nfrom __future__ import print_function, unicode_literals\n\nfrom collections import namedtuple, OrderedDict\nfrom datetime import date, datetime, timedelta\nfrom decimal import Decimal, ROUND_UP\nimport re\n\nfrom jinja2 import StrictUndefined\nfrom pando.utils import utc\n\n\nclass... | diff --git a/liberapay/constants.py b/liberapay/constants.py
index 47b3c9dccd..c03372d92a 100644
--- a/liberapay/constants.py
+++ b/liberapay/constants.py
@@ -232,6 +232,8 @@ def make_standard_tip(label, weekly):
make_standard_tip(_("Maximum"), DONATION_WEEKLY_MAX),
)
+SUMMARY_MAX_SIZE = 100
+
USERNAME_MAX_SIZ... |
scikit-hep__pyhf-1540 | Split "Use in Publications" into use cases and general citations
> Technically speaking we don't actually use `pyhf` to obtain the results of our paper,
Yeah, as you correctly point out we just have the "list of citations and use cases of `pyhf`" under "[Use in Publications](https://scikit-hep.org/pyhf/citations.htm... | [
{
"content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#... | [
{
"content": "#\n# pyhf documentation build configuration file, created by\n# sphinx-quickstart on Fri Feb 9 11:58:49 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#... | diff --git a/docs/bib/general_citations.bib b/docs/bib/general_citations.bib
new file mode 100644
index 0000000000..481fc91c2c
--- /dev/null
+++ b/docs/bib/general_citations.bib
@@ -0,0 +1,75 @@
+% 2021-07-27
+@article{Tastet:2021vwp,
+ author = "Tastet, Jean-Loup and Ruchayskiy, Oleg and Timiryasov, Inar",
+ tit... |
cython__cython-4842 | [BUG] Fused type not subscriptable in uncompiled pure python
**Describe the bug**
Fused type can't be subscribed in pure python syntax when `cython.compiled == False`
**To Reproduce**
Code to reproduce the behaviour:
```python
import cython
int_or_float = cython.fused_type(cython.int, cython.float)
def fun... | [
{
"content": "# cython.* namespace for pure mode.\nfrom __future__ import absolute_import\n\n__version__ = \"3.0.0a10\"\n\ntry:\n from __builtin__ import basestring\nexcept ImportError:\n basestring = str\n\n\n# BEGIN shameless copy from Cython/minivect/minitypes.py\n\nclass _ArrayType(object):\n\n is_... | [
{
"content": "# cython.* namespace for pure mode.\nfrom __future__ import absolute_import\n\n__version__ = \"3.0.0a10\"\n\ntry:\n from __builtin__ import basestring\nexcept ImportError:\n basestring = str\n\n\n# BEGIN shameless copy from Cython/minivect/minitypes.py\n\nclass _ArrayType(object):\n\n is_... | diff --git a/Cython/Shadow.py b/Cython/Shadow.py
index 48bc249e01f..78d950ce231 100644
--- a/Cython/Shadow.py
+++ b/Cython/Shadow.py
@@ -385,7 +385,7 @@ def __repr__(self):
__getitem__ = index_type
class _FusedType(CythonType):
- pass
+ __getitem__ = index_type
def fused_type(*args):
|
conda__conda-3524 | Progress bar broken

```
C:\Users\Korijn\dev\myproject>conda info
Current conda install:
platform : win-64
conda version : 4.2.7
conda is private : False
conda-env versio... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nThis file should hold almost all string literals and magic numbers used throughout the code base.\nThe exception is if a literal is specifically meant to be private to and isolated within a module.\n\"\"\"\nfrom __future__ import absolute_import, division, print_fu... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nThis file should hold almost all string literals and magic numbers used throughout the code base.\nThe exception is if a literal is specifically meant to be private to and isolated within a module.\n\"\"\"\nfrom __future__ import absolute_import, division, print_fu... | diff --git a/conda/base/constants.py b/conda/base/constants.py
index e9ae93e008c..5816bf5174d 100644
--- a/conda/base/constants.py
+++ b/conda/base/constants.py
@@ -99,6 +99,9 @@ class _Null(object):
def __nonzero__(self):
return False
+ def __bool__(self):
+ return False
+
NULL = _Null()
... |
twisted__twisted-11622 | Release 22.8.0
This is the ticket to track the release of 22.8.0
| [
{
"content": "\"\"\"\nProvides Twisted version information.\n\"\"\"\n\n# This file is auto-generated! Do not edit!\n# Use `python -m incremental.update Twisted` to change this file.\n\nfrom incremental import Version\n\n__version__ = Version(\"Twisted\", 22, 4, 0, post=0)\n__all__ = [\"__version__\"]\n",
"p... | [
{
"content": "\"\"\"\nProvides Twisted version information.\n\"\"\"\n\n# This file is auto-generated! Do not edit!\n# Use `python -m incremental.update Twisted` to change this file.\n\nfrom incremental import Version\n\n__version__ = Version(\"Twisted\", 22, 8, 0, post=0)\n__all__ = [\"__version__\"]\n",
"p... | diff --git a/NEWS.rst b/NEWS.rst
index b91359d22fc..f96d726e59b 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -1,4 +1,4 @@
-This file contains the release notes for the Twisted.
+This file contains the release notes for Twisted.
It only contains high-level changes that are of interest to Twisted library users.
Users of T... |
dbt-labs__dbt-core-2057 | Create -t flag as alias for dbt run --target
I love the `-m` flag as an alias for `--models` (in #1161) but now it's completely messed up my muscle memory for `--target`! I'm now repeatedly typing `-target` instead of `--target` when I want to run dbt on production.
| [
{
"content": "from dbt.logger import GLOBAL_LOGGER as logger, log_cache_events, log_manager\n\nimport argparse\nimport os.path\nimport sys\nimport traceback\nfrom contextlib import contextmanager\n\nimport dbt.version\nimport dbt.flags as flags\nimport dbt.task.run as run_task\nimport dbt.task.compile as compil... | [
{
"content": "from dbt.logger import GLOBAL_LOGGER as logger, log_cache_events, log_manager\n\nimport argparse\nimport os.path\nimport sys\nimport traceback\nfrom contextlib import contextmanager\n\nimport dbt.version\nimport dbt.flags as flags\nimport dbt.task.run as run_task\nimport dbt.task.compile as compil... | diff --git a/core/dbt/main.py b/core/dbt/main.py
index 6136350b44a..f5c0cd75949 100644
--- a/core/dbt/main.py
+++ b/core/dbt/main.py
@@ -244,6 +244,7 @@ def _build_base_subparser():
)
base_subparser.add_argument(
+ '-t',
'--target',
default=None,
type=str,
|
aws-cloudformation__cfn-lint-2900 | E1017 Select does not find already supported function when using complex list with nested Selects
### CloudFormation Lint Version
cfn-lint 0.80.4
### What operating system are you using?
Mac
### Describe the bug
When launching a template with complex nested Selects and list to extract value from, it seems to be re... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass Select(CloudFormationLintRule):\n \"\"\"Check if Select values are correct\"\"\"\n\n id = \"E1017\"\n ... | [
{
"content": "\"\"\"\nCopyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\nSPDX-License-Identifier: MIT-0\n\"\"\"\nfrom cfnlint.rules import CloudFormationLintRule, RuleMatch\n\n\nclass Select(CloudFormationLintRule):\n \"\"\"Check if Select values are correct\"\"\"\n\n id = \"E1017\"\n ... | diff --git a/src/cfnlint/rules/functions/Select.py b/src/cfnlint/rules/functions/Select.py
index a463abcc42..d9f034aaca 100644
--- a/src/cfnlint/rules/functions/Select.py
+++ b/src/cfnlint/rules/functions/Select.py
@@ -20,6 +20,7 @@ class Select(CloudFormationLintRule):
"Fn::If",
"Fn::Split",
... |
twisted__twisted-1695 | Release 22.2.0
|[<img alt="adiroiban's avatar" src="https://avatars.githubusercontent.com/u/204609?s=50" width="50" height="50">](https://github.com/adiroiban)| @adiroiban reported|
|-|-|
|Trac ID|trac#10306|
|Type|enhancement|
|Created|2022-02-08 14:05:11Z|
<details><summary>Searchable metadata</summary>
```
trac-... | [
{
"content": "\"\"\"\nProvides Twisted version information.\n\"\"\"\n\n# This file is auto-generated! Do not edit!\n# Use `python -m incremental.update Twisted` to change this file.\n\nfrom incremental import Version\n\n__version__ = Version(\"Twisted\", 22, 1, 0, post=0)\n__all__ = [\"__version__\"]\n",
"p... | [
{
"content": "\"\"\"\nProvides Twisted version information.\n\"\"\"\n\n# This file is auto-generated! Do not edit!\n# Use `python -m incremental.update Twisted` to change this file.\n\nfrom incremental import Version\n\n__version__ = Version(\"Twisted\", 22, 2, 0, post=0)\n__all__ = [\"__version__\"]\n",
"p... | diff --git a/NEWS.rst b/NEWS.rst
index b6880590715..66a31d0742a 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -3,6 +3,78 @@ http://twistedmatrix.com/trac/ticket/<number>
.. towncrier release notes start
+Twisted 22.2.0 (2022-03-01)
+===========================
+
+Bugfixes
+--------
+
+- twisted.internet.gireactor.Portab... |
scrapy__scrapy-1566 | signals docs are confusing
It seems it is not explained how to connect a callback to a singnal anywhere in Scrapy docs.
http://doc.scrapy.org/en/latest/topics/signals.html tells:
> You can connect to signals (or send your own) through the [Signals API](http://doc.scrapy.org/en/latest/topics/api.html#topics-api-signal... | [
{
"content": "\"\"\"Helper functions which doesn't fit anywhere else\"\"\"\nimport re\nimport hashlib\nfrom importlib import import_module\nfrom pkgutil import iter_modules\n\nimport six\nfrom w3lib.html import replace_entities\n\nfrom scrapy.utils.python import flatten, to_unicode\nfrom scrapy.item import Base... | [
{
"content": "\"\"\"Helper functions which don't fit anywhere else\"\"\"\nimport re\nimport hashlib\nfrom importlib import import_module\nfrom pkgutil import iter_modules\n\nimport six\nfrom w3lib.html import replace_entities\n\nfrom scrapy.utils.python import flatten, to_unicode\nfrom scrapy.item import BaseIt... | diff --git a/docs/topics/media-pipeline.rst b/docs/topics/media-pipeline.rst
index 4ee4f17583c..5ed6ce97d4b 100644
--- a/docs/topics/media-pipeline.rst
+++ b/docs/topics/media-pipeline.rst
@@ -7,7 +7,7 @@ Downloading and processing files and images
.. currentmodule:: scrapy.pipelines.images
Scrapy provides reusable... |
blaze__blaze-475 | Make blaze.test() return True or False
@asmeurer suggests this. Currently we're passing through pytest.main() which is like the error code from command line programs.
<!---
@huboard:{"order":398.859375,"milestone_order":452,"custom_state":""}
-->
| [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport logging\n\nfrom dynd import nd\nfrom pandas import DataFrame\nimport h5py\n\nfrom multipledispatch import halt_ordering, restart_ordering\n\nhalt_ordering() # Turn off multipledispatch ordering\n\nfrom .expr import *\nfrom ... | [
{
"content": "from __future__ import absolute_import, division, print_function\n\nimport logging\n\nfrom dynd import nd\nfrom pandas import DataFrame\nimport h5py\n\nfrom multipledispatch import halt_ordering, restart_ordering\n\nhalt_ordering() # Turn off multipledispatch ordering\n\nfrom .expr import *\nfrom ... | diff --git a/blaze/__init__.py b/blaze/__init__.py
index 94239fde3..b6cd8e108 100644
--- a/blaze/__init__.py
+++ b/blaze/__init__.py
@@ -139,4 +139,4 @@ def test(verbose=False, junitfile=None, exit=False):
error_code = pytest.main(args=args)
if exit:
return sys.exit(error_code)
- return error_code... |
ocadotechnology__aimmo-232 | Test coverage
Some first extra tests written to get the test coverage up a bit.
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom setuptools import find_packages, setup\n\n\nsetup(\n name='aimmo-game-creator',\n packages=find_packages(),\n include_package_data=True,\n install_requires=[\n 'eventlet',\n 'pykube',\n ],\n tests_require=[\n 'httmock',\n ],\n... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom setuptools import find_packages, setup\n\n\nsetup(\n name='aimmo-game-creator',\n packages=find_packages(),\n include_package_data=True,\n install_requires=[\n 'eventlet',\n 'pykube',\n ],\n tests_require=[\n 'httmock',\n ... | diff --git a/aimmo-game-creator/setup.py b/aimmo-game-creator/setup.py
index 6f7ef60c8..1f147d967 100644
--- a/aimmo-game-creator/setup.py
+++ b/aimmo-game-creator/setup.py
@@ -12,6 +12,7 @@
],
tests_require=[
'httmock',
+ 'mock',
],
test_suite='tests',
zip_safe=False,
diff --gi... |
ansible-collections__community.aws-1886 | mq_broker: Tagging a broker on creation does not work
### Summary
When creating a new MQ broker using the following task, the broker does not get tagged.
```
- name: create broker with minimal parameters
mq_broker:
broker_name: "{{ broker_name }}"
security_groups: "{{ broker_sg_ids.split(',') }}"
... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Contributors to the Ansible project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: mq_broker\nversion_added: 6.0.0\nshort_description: MQ broker manage... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Contributors to the Ansible project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: mq_broker\nversion_added: 6.0.0\nshort_description: MQ broker manage... | diff --git a/changelogs/fragments/1832-mq_broker_tags.yml b/changelogs/fragments/1832-mq_broker_tags.yml
new file mode 100644
index 00000000000..b2320dd3c71
--- /dev/null
+++ b/changelogs/fragments/1832-mq_broker_tags.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - mq_broker - ensure broker is created with ``tags`` when passed (ht... |
pytorch__torchdynamo-1539 | Remove the triton dependency of Inductor CPU codegen
We import triton library even we compile the CPU codegen, e.g:
```
from ctypes import c_void_p, c_long
import torch
import random
from torch import empty_strided, as_strided, device
from torchinductor.codecache import AsyncCompile
aten = torch.ops.aten
asyn... | [
{
"content": "import collections\nimport functools\nimport operator\nimport time\nfrom importlib import import_module\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\n\nimport numpy as np\nimport sympy\nimport torch\nfrom torch.fx.immutable_collections import immutable_dict\nfrom torch... | [
{
"content": "import collections\nimport functools\nimport operator\nimport time\nfrom importlib import import_module\nfrom typing import Any\nfrom typing import Dict\nfrom typing import List\n\nimport numpy as np\nimport sympy\nimport torch\nfrom torch.fx.immutable_collections import immutable_dict\nfrom torch... | diff --git a/torchinductor/utils.py b/torchinductor/utils.py
index 4716dd4daa..37722807f5 100644
--- a/torchinductor/utils.py
+++ b/torchinductor/utils.py
@@ -26,6 +26,8 @@
@functools.lru_cache(None)
def has_triton():
+ if not torch.cuda.is_available():
+ return False
try:
import triton
|
microsoft__superbenchmark-209 | V0.3.0 Release Plan
# Release Manager
@TobeyQin
# Endgame
Code freeze: 9/1/2021
Bug Bash date: 9/2/2021
Release date: 9/17/2021
# Main Features
## SuperBench Framework
### SB Runner -- @abuccts
- [x] MPI mode implementation
PR: #146
### SB Benchmarks -- @guoshzhao
- [x] Docker Base
... | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\n\n\"\"\"SuperBench Python module.\n\nProvide hardware and software benchmarks for AI systems.\n\"\"\"\n\n__version__ = '0.2.1'\n__author__ = 'Microsoft'\n",
"path": "superbench/__init__.py"
}
] | [
{
"content": "# Copyright (c) Microsoft Corporation.\n# Licensed under the MIT License.\n\n\"\"\"SuperBench Python module.\n\nProvide hardware and software benchmarks for AI systems.\n\"\"\"\n\n__version__ = '0.3.0'\n__author__ = 'Microsoft'\n",
"path": "superbench/__init__.py"
}
] | diff --git a/README.md b/README.md
index 320ecca21..eaefbf308 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
__SuperBench__ is a validation and profiling tool for AI infrastructure.
-📢 [v0.2.1](https://github.com/microsoft/superbenchmark/releases/tag/v0.2.1) has been released!
+📢 [v0.3.0](https://githu... |
ansible-collections__community.aws-1971 | mq_broker: Tagging a broker on creation does not work
### Summary
When creating a new MQ broker using the following task, the broker does not get tagged.
```
- name: create broker with minimal parameters
mq_broker:
broker_name: "{{ broker_name }}"
security_groups: "{{ broker_sg_ids.split(',') }}"
... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Contributors to the Ansible project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: mq_broker\nversion_added: 6.0.0\nshort_description: MQ broker manage... | [
{
"content": "#!/usr/bin/python\n# -*- coding: utf-8 -*-\n\n# Copyright: Contributors to the Ansible project\n# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)\n\nDOCUMENTATION = r\"\"\"\n---\nmodule: mq_broker\nversion_added: 6.0.0\nshort_description: MQ broker manage... | diff --git a/changelogs/fragments/1832-mq_broker_tags.yml b/changelogs/fragments/1832-mq_broker_tags.yml
new file mode 100644
index 00000000000..b2320dd3c71
--- /dev/null
+++ b/changelogs/fragments/1832-mq_broker_tags.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - mq_broker - ensure broker is created with ``tags`` when passed (ht... |
chainer__chainer-239 | Add type check to Identity Function
Related to #123
| [
{
"content": "from chainer import function\n\n\nclass Identity(function.Function):\n\n \"\"\"Identity function.\"\"\"\n\n def forward(self, xs):\n return xs\n\n def backward(self, xs, gys):\n return gys\n\n\ndef identity(*inputs):\n \"\"\"Just returns input variables.\"\"\"\n return... | [
{
"content": "from chainer import function\n\n\nclass Identity(function.Function):\n\n \"\"\"Identity function.\"\"\"\n\n def check_type_forward(self, in_types):\n pass\n\n def forward(self, xs):\n return xs\n\n def backward(self, xs, gys):\n return gys\n\n\ndef identity(*inputs... | diff --git a/chainer/functions/identity.py b/chainer/functions/identity.py
index 300f5ddb223e..80938c408e48 100644
--- a/chainer/functions/identity.py
+++ b/chainer/functions/identity.py
@@ -5,6 +5,9 @@ class Identity(function.Function):
"""Identity function."""
+ def check_type_forward(self, in_types):
+ ... |
oppia__oppia-3843 | AssertionError in controllers/base.py
Bug found when doing a sanity testpass on oppiatestserver for the 2.5.4 release.
Steps to reproduce:
- Go to https://oppiatestserver.appspot.com
- Ensure you're logged out
- From the splash screen, click 'Create your own lesson'
- Observe 'Error Communicating with Server' sn... | [
{
"content": "# 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/licenses/LICENSE-2.0\n#\n... | [
{
"content": "# 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/licenses/LICENSE-2.0\n#\n... | diff --git a/core/storage/base_model/gae_models.py b/core/storage/base_model/gae_models.py
index bbc9a7ae46287..ce1fab8f8b139 100644
--- a/core/storage/base_model/gae_models.py
+++ b/core/storage/base_model/gae_models.py
@@ -29,7 +29,7 @@
# Constants used for generating ids.
MAX_RETRIES = 10
-RAND_RANGE = (1 << 60)... |
litestar-org__litestar-2648 | Bug: Schema generation partially broken since litestar version 2.3.0
### Description
2.2.1 is my last working version of litestar.
Before:
<img width="467" alt="image" src="https://github.com/litestar-org/litestar/assets/85191795/dc9594b1-4b09-4607-9061-dcd65bf0a09f">
After:
I first get this `internal server ... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any\n\nfrom typing_extensions import get_type_hints\n\nfrom litestar.types import Empty\nfrom litestar.utils import is_class_and_subclass\nfrom litestar.utils.predicates import is_generic\nfrom litestar.utils.typing import (\n... | [
{
"content": "from __future__ import annotations\n\nfrom typing import TYPE_CHECKING, Any\n\nfrom typing_extensions import get_type_hints\n\nfrom litestar.types import Empty\nfrom litestar.utils import is_class_and_subclass\nfrom litestar.utils.predicates import is_generic\nfrom litestar.utils.typing import (\n... | diff --git a/litestar/contrib/pydantic/utils.py b/litestar/contrib/pydantic/utils.py
index cae63d58e8..8a03d6c413 100644
--- a/litestar/contrib/pydantic/utils.py
+++ b/litestar/contrib/pydantic/utils.py
@@ -162,4 +162,4 @@ def is_pydantic_2_model(
def is_pydantic_undefined(value: Any) -> bool:
- return value in... |
xonsh__xonsh-3049 | Exception on startup (pygments_cache)
<!--- Provide a general summary of the issue in the Title above -->
<!--- If you have a question along the lines of "How do I do this Bash command in xonsh"
please first look over the Bash to Xonsh translation guide: http://xon.sh/bash_to_xsh.html
If you don't find an answer the... | [
{
"content": "# must come before ptk / pygments imports\nfrom xonsh.lazyasd import load_module_in_background\n\nload_module_in_background(\n \"pkg_resources\",\n debug=\"XONSH_DEBUG\",\n replacements={\"pygments.plugin\": \"pkg_resources\"},\n)\n",
"path": "xonsh/ptk2/__init__.py"
}
] | [
{
"content": "",
"path": "xonsh/ptk2/__init__.py"
}
] | diff --git a/news/nllpr-ptk2.rst b/news/nllpr-ptk2.rst
new file mode 100644
index 0000000000..e7bbfdf5b5
--- /dev/null
+++ b/news/nllpr-ptk2.rst
@@ -0,0 +1,27 @@
+**Added:**
+
+* <news item>
+
+**Changed:**
+
+* <news item>
+
+**Deprecated:**
+
+* <news item>
+
+**Removed:**
+
+* <news item>
+
+**Fixed:**
+
+* Fixed is... |
django-wiki__django-wiki-1084 | Release to support django 3.1
Hi,
The current release on pypi is limiting the ability to upgrade to django 3.1. And, as far as I can tell, there's no incompatibilities with the version 0.6 and django 3.1.
Would it be possible to release a 0.6.1 release or something like that loosening that requirement?
| [
{
"content": "# This package and all its sub-packages are part of django-wiki,\n# except where otherwise stated.\n#\n# django-wiki is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of ... | [
{
"content": "# This package and all its sub-packages are part of django-wiki,\n# except where otherwise stated.\n#\n# django-wiki is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of ... | diff --git a/docs/release_notes.rst b/docs/release_notes.rst
index 619c56331..e4465b297 100644
--- a/docs/release_notes.rst
+++ b/docs/release_notes.rst
@@ -10,16 +10,16 @@ Release plan
* **0.4.x** supports Django 1.11 and Django 2.1 and Python 3.4+.
* **0.5.x** Remove Django 1.11 support, adds Django 2.2 and 3.x sup... |
django-wiki__django-wiki-919 | jquery 1.12.4 is bundled, some security holes exist
see [CVE-2015-9251](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2015-9251) and others
| [
{
"content": "# This package and all its sub-packages are part of django-wiki,\n# except where otherwise stated.\n#\n# django-wiki is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of ... | [
{
"content": "# This package and all its sub-packages are part of django-wiki,\n# except where otherwise stated.\n#\n# django-wiki is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 3 of ... | diff --git a/docs/release_notes.rst b/docs/release_notes.rst
index bf4f6ba15..8b97e081f 100644
--- a/docs/release_notes.rst
+++ b/docs/release_notes.rst
@@ -8,9 +8,17 @@ Release plan
* **0.3** series supported Django 1.11. As with the upstream Django release, 0.3 was be the last series with Python 2.7 support.
* **... |
mdn__kuma-6489 | Can't browse users in django admin now that tags are gone
https://sentry.prod.mozaws.net/operations/mdn-prod/issues/7273070/
```
Resolver404: {'tried': [[<RegexURLPattern None ^media/(?:redesign/)?css/(?P<doc>.*)-min.css$>], [<RegexURLPattern None ^media/(?:redesign/)?js/(?P<doc>.*)-min.js$>], [<RegexURLPattern None ^... | [
{
"content": "from django.contrib import admin\nfrom django.contrib.auth.admin import UserAdmin as BaseUserAdmin\nfrom django.utils.html import format_html\n\nfrom kuma.core.urlresolvers import reverse\nfrom kuma.core.utils import urlparams\n\nfrom .models import User, UserBan\n\n\n@admin.register(UserBan)\ncla... | [
{
"content": "from django.contrib import admin\nfrom django.contrib.auth.admin import UserAdmin as BaseUserAdmin\nfrom django.utils.html import format_html\n\nfrom kuma.core.urlresolvers import reverse\nfrom kuma.core.utils import urlparams\n\nfrom .models import User, UserBan\n\n\n@admin.register(UserBan)\ncla... | diff --git a/kuma/users/admin.py b/kuma/users/admin.py
index d47b8088fcd..bc2aa7265b6 100644
--- a/kuma/users/admin.py
+++ b/kuma/users/admin.py
@@ -43,7 +43,6 @@ class UserAdmin(BaseUserAdmin):
"organization",
"location",
"email",
- "tags__name",
)
def revisions(self, obj)... |
pulp__pulpcore-3462 | Database errors raised when importing content
**Version**
Main pulpcore branch. The issue arose after merging the labels refractor work (https://github.com/pulp/pulpcore/commit/4e25949176d72c5dbe1c7623a9c47d253a18b085) .
Reproducible in pulp_file and pulp_rpm.
**Describe the bug**
```
pulp [d32341b1-78b2-44d... | [
{
"content": "from import_export import fields\nfrom import_export.widgets import ForeignKeyWidget\nfrom logging import getLogger\n\nfrom pulpcore.app.models.content import (\n Artifact,\n Content,\n ContentArtifact,\n)\nfrom pulpcore.app.models.repository import Repository\nfrom pulpcore.constants imp... | [
{
"content": "from import_export import fields\nfrom import_export.widgets import ForeignKeyWidget\nfrom logging import getLogger\n\nfrom pulpcore.app.models.content import (\n Artifact,\n Content,\n ContentArtifact,\n)\nfrom pulpcore.app.models.repository import Repository\nfrom pulpcore.constants imp... | diff --git a/CHANGES/3461.misc b/CHANGES/3461.misc
new file mode 100644
index 0000000000..c0f67471b9
--- /dev/null
+++ b/CHANGES/3461.misc
@@ -0,0 +1 @@
+Taught Repository to not export pulp_labels.
diff --git a/pulpcore/app/modelresource.py b/pulpcore/app/modelresource.py
index def5962597..6e957a60f4 100644
--- a/pulp... |
SCons__scons-4374 | Configure.CheckLib() error with -Wstrict-prototypes
This is a continuation of #3095. As noted in [this comment](https://github.com/SCons/scons/pull/3096/files#r1257532304), there was one more instance that was missed in PR #3096:
https://github.com/SCons/scons/blob/810ca6c8895b01cbd636d83079f6a848dc36adf6/SCons/Conf... | [
{
"content": "# MIT License\n#\n# Copyright The SCons Foundation\n# Copyright (c) 2003 Stichting NLnet Labs\n# Copyright (c) 2001, 2002, 2003 Steven Knight\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software... | [
{
"content": "# MIT License\n#\n# Copyright The SCons Foundation\n# Copyright (c) 2003 Stichting NLnet Labs\n# Copyright (c) 2001, 2002, 2003 Steven Knight\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software... | diff --git a/CHANGES.txt b/CHANGES.txt
index ee08ab7019..7cd71dda41 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -97,6 +97,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
- Cleaned up dblite module (checker warnings, etc.).
- Some cleanup in the FortranCommon tool.
+ From Jonathon Reinhart:
+ - Fix a... |
DDMAL__CantusDB-328 | Representation of Notation objects
When I recently tried to edit a source, I was presented with an error message, and found that I was missing several required fields, including this one: :\n name = models.CharField(max_length=63)\n",
"path": "django/cantusdb_project/main_app/models/notation.py"
}
] | [
{
"content": "from django.db import models\nfrom main_app.models import BaseModel\n\n\nclass Notation(BaseModel):\n name = models.CharField(max_length=63)\n def __str__(self):\n return f\"{self.name} ({self.id})\"",
"path": "django/cantusdb_project/main_app/models/notation.py"
}
] | diff --git a/django/cantusdb_project/main_app/models/notation.py b/django/cantusdb_project/main_app/models/notation.py
index a6a4469f0..52faa2b90 100644
--- a/django/cantusdb_project/main_app/models/notation.py
+++ b/django/cantusdb_project/main_app/models/notation.py
@@ -4,3 +4,5 @@
class Notation(BaseModel):
... |
encode__uvicorn-1279 | Include a environment variable to change arg commands
Hello,
I'm testing the FASTAPI (https://fastapi.tiangolo.com/) and there's a nice environment variable when running with gunicorn (https://docs.gunicorn.org/en/stable/settings.html#settings) `GUNICORN_CMD_ARGS`, it include command line args using enviroment varia... | [
{
"content": "import logging\nimport os\nimport platform\nimport ssl\nimport sys\nimport typing\n\nimport click\nfrom asgiref.typing import ASGIApplication\n\nimport uvicorn\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n INTERFACES,\n LIFESPAN,\n LOG_LEVELS,\n LOGGING_CONFIG,\n LOOP_SETUPS,... | [
{
"content": "import logging\nimport os\nimport platform\nimport ssl\nimport sys\nimport typing\n\nimport click\nfrom asgiref.typing import ASGIApplication\n\nimport uvicorn\nfrom uvicorn.config import (\n HTTP_PROTOCOLS,\n INTERFACES,\n LIFESPAN,\n LOG_LEVELS,\n LOGGING_CONFIG,\n LOOP_SETUPS,... | diff --git a/docs/settings.md b/docs/settings.md
index b9055a94f..3edf4b3c3 100644
--- a/docs/settings.md
+++ b/docs/settings.md
@@ -7,6 +7,13 @@ equivalent keyword arguments, eg. `uvicorn.run("example:app", port=5000, reload=
Please note that in this case, if you use `reload=True` or `workers=NUM`,
you should put `u... |
mlcommons__GaNDLF-744 | Make `black` version static
**Is your feature request related to a problem? Please describe.**
Different versions of black behave differently WRT linting, which creates issues, such as PRs having linting changes where they are not needed.
**Describe the solution you'd like**
Fix the version of `black`.
**Descri... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"REA... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"REA... | diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml
index b9144f9d7..80c8729f9 100644
--- a/.github/workflows/black.yml
+++ b/.github/workflows/black.yml
@@ -20,7 +20,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- python -m pip... |
liqd__a4-meinberlin-3701 | testing 4293: can't edit polls somebody else created even if I have the rights
**URL:** https://meinberlin-dev.liqd.net/dashboard/modules/umfrage-24-4/poll/
**user:** group member
**expected behaviour:** I can edit polls somebody else created if I have the right to do so
**behaviour:** cannot save, getting an red al... | [
{
"content": "import rules\n\nfrom adhocracy4.modules import predicates as module_predicates\n\nrules.set_perm(\n 'a4polls.change_poll',\n module_predicates.is_context_initiator |\n module_predicates.is_context_moderator\n)\n",
"path": "meinberlin/apps/polls/rules.py"
}
] | [
{
"content": "import rules\n\nfrom adhocracy4.modules import predicates as module_predicates\n\nrules.set_perm(\n 'a4polls.change_poll',\n module_predicates.is_project_admin\n)\n",
"path": "meinberlin/apps/polls/rules.py"
}
] | diff --git a/meinberlin/apps/polls/rules.py b/meinberlin/apps/polls/rules.py
index 3dd6d6d57c..069e13b191 100644
--- a/meinberlin/apps/polls/rules.py
+++ b/meinberlin/apps/polls/rules.py
@@ -4,6 +4,5 @@
rules.set_perm(
'a4polls.change_poll',
- module_predicates.is_context_initiator |
- module_predicates.i... |
TheAlgorithms__Python-7054 | Add typing to maths/segmented_sieve.py
### Describe your change:
* [ ] Add an algorithm?
* [ ] Fix a bug or typo in an existing algorithm?
* [ ] Documentation change?
### Checklist:
* [ ] I have read [CONTRIBUTING.md](https://github.com/TheAlgorithms/Python/blob/master/CONTRIBUTING.md).
* [ ] This pull re... | [
{
"content": "\"\"\"Segmented Sieve.\"\"\"\r\n\r\nimport math\r\n\r\n\r\ndef sieve(n):\r\n \"\"\"Segmented Sieve.\"\"\"\r\n in_prime = []\r\n start = 2\r\n end = int(math.sqrt(n)) # Size of every segment\r\n temp = [True] * (end + 1)\r\n prime = []\r\n\r\n while start <= end:\r\n if... | [
{
"content": "\"\"\"Segmented Sieve.\"\"\"\r\n\r\nimport math\r\n\r\n\r\ndef sieve(n: int) -> list[int]:\r\n \"\"\"Segmented Sieve.\"\"\"\r\n in_prime = []\r\n start = 2\r\n end = int(math.sqrt(n)) # Size of every segment\r\n temp = [True] * (end + 1)\r\n prime = []\r\n\r\n while start <= ... | diff --git a/maths/segmented_sieve.py b/maths/segmented_sieve.py
index 0054b0595be5..35ed9702b3be 100644
--- a/maths/segmented_sieve.py
+++ b/maths/segmented_sieve.py
@@ -3,7 +3,7 @@
import math
-def sieve(n):
+def sieve(n: int) -> list[int]:
"""Segmented Sieve."""
in_prime = []
start = 2
|
pypa__setuptools-2427 | Sphinx setup should be stricter
I noticed that some of the docs pages are unreachable when navigating from the main RTD page. In particular, _I know_ that there's `history.rst` that is only accessible if one knows the URL upfront.
I tracked this to https://github.com/pypa/setuptools/pull/2097 which removes entries f... | [
{
"content": "import subprocess\nimport sys\nimport os\n\n\n# hack to run the bootstrap script so that jaraco.packaging.sphinx\n# can invoke setup.py\n'READTHEDOCS' in os.environ and subprocess.check_call(\n [sys.executable, '-m', 'bootstrap'],\n cwd=os.path.join(os.path.dirname(__file__), os.path.pardir)... | [
{
"content": "import subprocess\nimport sys\nimport os\n\n\n# hack to run the bootstrap script so that jaraco.packaging.sphinx\n# can invoke setup.py\n'READTHEDOCS' in os.environ and subprocess.check_call(\n [sys.executable, '-m', 'bootstrap'],\n cwd=os.path.join(os.path.dirname(__file__), os.path.pardir)... | diff --git a/CHANGES.rst b/CHANGES.rst
index c35c4a8792..c96fb0bc9d 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -22,9 +22,9 @@ v50.2.0
* #2355: When pip is imported as part of a build, leave distutils patched.
* #2380: There are some setuptools specific changes in the
- `setuptools.command.bdist_rpm` module that... |
cloud-custodian__cloud-custodian-1510 | Feature request - tenancy
Would be nice to look for resources with `dedicated|default|host` tenancy
* [ec2](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-instance.html)
* [rds](http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_VPC.WorkingWithRDSInstanceinaVPC.html) *this is done at the vpc l... | [
{
"content": "# Copyright 2015-2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | [
{
"content": "# Copyright 2015-2017 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless requi... | diff --git a/c7n/resources/ec2.py b/c7n/resources/ec2.py
index c2903ad7c7e..6930570ba77 100644
--- a/c7n/resources/ec2.py
+++ b/c7n/resources/ec2.py
@@ -1166,6 +1166,7 @@ def process(self, instances):
'tag-key': str,
'tag-value': str,
'tag:': str,
+ 'tenancy': ('dedicated', 'default', 'host'),
'v... |
flairNLP__flair-2322 | can't load ner-multi : 'LanguageModel' object has no attribute '_load_state_dict_pre_hooks'
**Describe the bug**
Multi lingual models (both ner or pos) fails to load after download inside torch nn.
I don't have any problems with other ner packages
**To Reproduce**
> from flair.data import Sentence
> from flair... | [
{
"content": "from pathlib import Path\n\nimport torch.nn as nn\nimport torch\nimport math\nfrom typing import Union, Tuple\nfrom typing import List\n\nfrom torch.optim import Optimizer\n\nimport flair\nfrom flair.data import Dictionary\n\n\nclass LanguageModel(nn.Module):\n \"\"\"Container module with an en... | [
{
"content": "from pathlib import Path\n\nimport torch.nn as nn\nimport torch\nimport math\nfrom typing import Union, Tuple\nfrom typing import List\n\nfrom torch.optim import Optimizer\n\nimport flair\nfrom flair.data import Dictionary\n\n\nclass LanguageModel(nn.Module):\n \"\"\"Container module with an en... | diff --git a/flair/models/language_model.py b/flair/models/language_model.py
index 27f4b245ee..85232a8329 100644
--- a/flair/models/language_model.py
+++ b/flair/models/language_model.py
@@ -445,7 +445,7 @@ def __setstate__(self, d):
self.eval()
else:
- self.__dict__ = d
+ ... |
hpcaitech__ColossalAI-2608 | [tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
[BUG]: Testing failed due to triton
### 🐛 Describe the bug
The build on PR workflow failed with the following errors:
<img width="1509" alt="Screenshot 2023-02-07 at 10 30 17" src="https://user-images.githubusercontent.com/31818... | [
{
"content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\nimport torch.nn as nn\ntry:\n import apex.amp as apex_amp\nexcept ImportError:\n pass\n\nfrom torch import Tensor\n\nfrom colossalai.nn.optimizer import ColossalaiOptimizer\nfrom colossalai.utils import clip_grad_norm_fp32\n\n\nclass ApexAM... | [
{
"content": "#!/usr/bin/env python\n# -*- encoding: utf-8 -*-\n\nimport torch.nn as nn\n\ntry:\n import apex.amp as apex_amp\nexcept ImportError:\n pass\n\nfrom torch import Tensor\n\nfrom colossalai.nn.optimizer import ColossalaiOptimizer\nfrom colossalai.utils import clip_grad_norm_fp32\n\n\nclass Apex... | diff --git a/.github/workflows/build_on_pr.yml b/.github/workflows/build_on_pr.yml
index 82b671acea93..c7882db6ec61 100644
--- a/.github/workflows/build_on_pr.yml
+++ b/.github/workflows/build_on_pr.yml
@@ -52,6 +52,7 @@ jobs:
**/*.h
**/*.cpp
**/*.cu
+ **/*.txt
... |
buildbot__buildbot-4244 | Broken links to and unsuccessful docs building at Read the Docs
PDFs unavailable.
http://media.readthedocs.org/pdf/buildbot/v1.3.0/buildbot.pdf
https://docs.buildbot.net/
https://readthedocs.org/projects/buildbot/
https://readthedocs.org/projects/buildbot/downloads/
https://readthedocs.org/projects/buildbot/buil... | [
{
"content": "#!/usr/bin/env python\n#\n# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it wil... | [
{
"content": "#!/usr/bin/env python\n#\n# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it wil... | diff --git a/master/setup.py b/master/setup.py
index e7ec7c131624..d79e2dc9890e 100755
--- a/master/setup.py
+++ b/master/setup.py
@@ -540,7 +540,8 @@ def define_plugin_entries(groups):
'pyenchant',
'docutils>=0.8',
'sphinx-jinja',
- 'towncrier'
+ 'towncrier',
+ 'yaml'
... |
TheAlgorithms__Python-7390 | [PYTEST WARNING] Horn schunk
### Feature description
@skief @poyea Please could you resolve this warning
```
computer_vision/horn_schunck.py:15
/home/runner/work/Python/Python/computer_vision/horn_schunck.py:15:
DeprecationWarning: Please use `convolve` from the `scipy.ndimage` namespace, the `scipy.ndimag... | [
{
"content": "\"\"\"\n The Horn-Schunck method estimates the optical flow for every single pixel of\n a sequence of images.\n It works by assuming brightness constancy between two consecutive frames\n and smoothness in the optical flow.\n\n Useful resources:\n Wikipedia: https://en.wikipedia.o... | [
{
"content": "\"\"\"\n The Horn-Schunck method estimates the optical flow for every single pixel of\n a sequence of images.\n It works by assuming brightness constancy between two consecutive frames\n and smoothness in the optical flow.\n\n Useful resources:\n Wikipedia: https://en.wikipedia.o... | diff --git a/computer_vision/horn_schunck.py b/computer_vision/horn_schunck.py
index 2a153d06ddae..b63e0268294c 100644
--- a/computer_vision/horn_schunck.py
+++ b/computer_vision/horn_schunck.py
@@ -12,7 +12,7 @@
from typing import SupportsIndex
import numpy as np
-from scipy.ndimage.filters import convolve
+from s... |
mlcommons__GaNDLF-722 | Move unit testing data to the MLCommons Storage
**Is your feature request related to a problem? Please describe.**
Currently, the unit testing data is on UPenn Box - which is inconvenient for someone without access who wants to make any updates.
**Describe the solution you'd like**
Changing this to the MLCommons ... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"REA... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"REA... | diff --git a/setup.py b/setup.py
index e744e4835..332d6087a 100644
--- a/setup.py
+++ b/setup.py
@@ -92,7 +92,7 @@ def run(self):
"pyyaml",
"tiffslide",
"matplotlib",
- "requests>=2.25.0",
+ "gdown",
"pytest",
"coverage",
"pytest-cov",
diff --git a/testing/test_full.py b/testing/test... |
bookwyrm-social__bookwyrm-2128 | When adding multiple authors to one book, only the first is added
**Describe the bug**
I would like to add multiple authors to a book (it's an anthology). When I add multiple authors to the book, via the "Add Another Author" button, only the first one is added.
**To Reproduce**
1. Edit book
2. Fill the info f... | [
{
"content": "\"\"\" the good stuff! the books! \"\"\"\nfrom re import sub, findall\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.contrib.postgres.search import SearchRank, SearchVector\nfrom django.db import transaction\nfrom django.http import HttpResponseBadRequ... | [
{
"content": "\"\"\" the good stuff! the books! \"\"\"\nfrom re import sub, findall\nfrom django.contrib.auth.decorators import login_required, permission_required\nfrom django.contrib.postgres.search import SearchRank, SearchVector\nfrom django.db import transaction\nfrom django.http import HttpResponseBadRequ... | diff --git a/bookwyrm/tests/views/books/test_edit_book.py b/bookwyrm/tests/views/books/test_edit_book.py
index cabfe972d6..c7869807bc 100644
--- a/bookwyrm/tests/views/books/test_edit_book.py
+++ b/bookwyrm/tests/views/books/test_edit_book.py
@@ -9,6 +9,7 @@
from django.test.client import RequestFactory
from bookwy... |
sktime__sktime-3618 | [BUG] ShapeletTransformClassifier numba error when dtype is not float64
**Describe the bug**
Seems that when using `ShapeletTransformClassifier` there is some Numba accelerated functions that break if the data in the input data frame are of type `int32`.
**To Reproduce**
MRE as below:
```python
import warnings... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"General numba utilities.\"\"\"\n\nimport numpy as np\nfrom numba import njit\n\n\n@njit(fastmath=True, cache=True)\ndef unique_count(X):\n \"\"\"Numba unique count function for a 1D array.\"\"\"\n if len(X) > 0:\n X = np.sort(X)\n unique = np.zero... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"General numba utilities.\"\"\"\n\nimport numpy as np\nfrom numba import njit\n\n\n@njit(fastmath=True, cache=True)\ndef unique_count(X):\n \"\"\"Numba unique count function for a 1D array.\"\"\"\n if len(X) > 0:\n X = np.sort(X)\n unique = np.zero... | diff --git a/sktime/utils/estimators/tests/__init__.py b/sktime/utils/estimators/tests/__init__.py
index 79740faf9fc..095656a554e 100644
--- a/sktime/utils/estimators/tests/__init__.py
+++ b/sktime/utils/estimators/tests/__init__.py
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
-"""Tests for Mock Estimnators."""
+"""Tests f... |
mlcommons__GaNDLF-766 | `gdown` does not seem to be working
**Describe the bug**
Current CI seems to be broken.
**To Reproduce**
Steps to reproduce the behavior:
1. Run any CI test
2. See error:
```python-traceback
[SNIP!]
if gdrive_file_id and is_gdrive_download_link:
content_disposition = six.moves.urllib_pars... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"REA... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"REA... | diff --git a/setup.py b/setup.py
index 464f7a603..4917c2432 100644
--- a/setup.py
+++ b/setup.py
@@ -98,7 +98,7 @@ def run(self):
"pyyaml",
"tiffslide",
"matplotlib",
- "gdown",
+ "gdown==4.6.3",
"pytest",
"coverage",
"pytest-cov",
diff --git a/testing/test_full.py b/testing/test_ful... |
facebookresearch__hydra-1808 | [Bug] hydra-optuna-sweeper 1.1.0 requires numpy<1.20.0
# 🐛 Bug
## Description
<!-- A clear and concise description of what the bug is. -->
I used the guide from
https://hydra.cc/docs/plugins/optuna_sweeper/
And install hydra-optuna-sweeper:
```bash
pip install hydra-optuna-sweeper --upgrade
```
But i... | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\n__version__ = \"1.1.0\"\n",
"path": "plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/__init__.py"
}
] | [
{
"content": "# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved\n\n__version__ = \"1.1.1\"\n",
"path": "plugins/hydra_optuna_sweeper/hydra_plugins/hydra_optuna_sweeper/__init__.py"
}
] | diff --git a/plugins/hydra_optuna_sweeper/NEWS.md b/plugins/hydra_optuna_sweeper/NEWS.md
index 704308ed298..9b29b7e101b 100644
--- a/plugins/hydra_optuna_sweeper/NEWS.md
+++ b/plugins/hydra_optuna_sweeper/NEWS.md
@@ -1,3 +1,11 @@
+1.1.1 (2021-09-01)
+=======================
+
+### Maintenance Changes
+
+- Update optuna... |
jupyterhub__jupyterhub-2545 | Releasing 1.0
With #2435 rounding out the final thing I think we need for the next release, I think it's time to put together the 1.0 release.
This should consist of:
- [x] assembling changelog #2440
- [x] making sure new features are well documented
- [x] publishing beta release
- [x] test beta (perhaps by ad... | [
{
"content": "\"\"\"JupyterHub version info\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nversion_info = (\n 1,\n 0,\n 0,\n \"b2\", # release (b1, rc1, or \"\" for final or dev)\n # \"dev\", # dev or nothing\n)\n\n# pep 440 versi... | [
{
"content": "\"\"\"JupyterHub version info\"\"\"\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nversion_info = (\n 1,\n 0,\n 0,\n # \"b2\", # release (b1, rc1, or \"\" for final or dev)\n # \"dev\", # dev or nothing\n)\n\n# pep 440 ver... | diff --git a/docs/source/changelog.md b/docs/source/changelog.md
index 69848748ff..4cd14dbdff 100644
--- a/docs/source/changelog.md
+++ b/docs/source/changelog.md
@@ -9,7 +9,7 @@ command line for details.
## 1.0
-### [1.0.0] 2019-04-XX
+### [1.0.0] 2019-05-03
JupyterHub 1.0 is a major milestone for JupyterHub.
... |
nipy__nipype-3199 | REL: 1.5.0
## Summary
Prep for new feature release 1.5.0, targeting release on Monday, February 24.
Given that we just released 1.4.2 about a week ago, I'm inclined to hold this one off for any feature PRs that would like to shoot for inclusion.
Require merge or postponement decision on all issues/PRs in https... | [
{
"content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs. In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\n\n# nipype version information\n# Remove -dev for release\n__v... | [
{
"content": "\"\"\" This file contains defines parameters for nipy that we use to fill\nsettings in setup.py, the nipy top-level docstring, and for building the\ndocs. In setup.py in particular, we exec this file, so it cannot import nipy\n\"\"\"\n\n# nipype version information\n# Remove -dev for release\n__v... | diff --git a/.mailmap b/.mailmap
index 4df0aff6e5..f603849d24 100644
--- a/.mailmap
+++ b/.mailmap
@@ -45,6 +45,8 @@ Colin Buchanan <colinrbuchanan@gmail.com> <mankind@MacBook.local>
Daniel Brenner <daniel.brenner@me.com>
Daniel Clark <danieljclark87@gmail.com>
Daniel Geisler <daniel.geisler@gmail.com>
+Daniel Geisl... |
yt-project__yt-1532 | AHF answer tests are flaky
We're seeing random failures from the AHF answer tests on some PRs.
See e.g. https://tests.yt-project.org/job/yt_py3_git/414/.
| [
{
"content": "\"\"\"\nAHF data structures\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2017, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with... | [
{
"content": "\"\"\"\nAHF data structures\n\n\n\n\"\"\"\n\n#-----------------------------------------------------------------------------\n# Copyright (c) 2017, yt Development Team.\n#\n# Distributed under the terms of the Modified BSD License.\n#\n# The full license is in the file COPYING.txt, distributed with... | diff --git a/tests/tests.yaml b/tests/tests.yaml
index 8f2f9406945..bdc7279f13a 100644
--- a/tests/tests.yaml
+++ b/tests/tests.yaml
@@ -35,7 +35,7 @@ answer_tests:
local_gizmo_002:
- yt/frontends/gizmo/tests/test_outputs.py
- local_halos_003:
+ local_halos_004:
- yt/analysis_modules/halo_analysis/test... |
zostera__django-bootstrap4-191 | Building docs locally gives ImportError
The `make docs` command raises `ImportError`.
```
WARNING: autodoc: failed to import function 'templatetags.bootstrap4.bootstrap_form' from module 'bootstrap4'; the following exception was raised:
Traceback (most recent call last):
File "/Users/dylan/Projects/django-boots... | [
{
"content": "try:\n from _version import version\nexcept ImportError:\n try:\n from setuptools_scm import get_version\n\n version = get_version()\n except ImportError:\n version = \"???\"\n__version__ = version\n",
"path": "src/bootstrap4/__init__.py"
}
] | [
{
"content": "try:\n from ._version import version\nexcept ImportError:\n try:\n from setuptools_scm import get_version\n\n version = get_version()\n except ImportError:\n version = \"???\"\n__version__ = version\n",
"path": "src/bootstrap4/__init__.py"
}
] | diff --git a/src/bootstrap4/__init__.py b/src/bootstrap4/__init__.py
index 17f62110..1f96b1a4 100644
--- a/src/bootstrap4/__init__.py
+++ b/src/bootstrap4/__init__.py
@@ -1,5 +1,5 @@
try:
- from _version import version
+ from ._version import version
except ImportError:
try:
from setuptools_scm im... |
learningequality__kolibri-6355 | tasks got cleared without triggering a 'clear task' action
### Observed behavior
Observed that my list of tasks got cleared after initiating a new import
### Expected behavior
tasks should not be cleared until explicitly done by the user
### User-facing consequences
loss of data: historical context
##... | [
{
"content": "from django.core.cache import cache\nfrom django.db.models import Manager\nfrom django.db.models import Sum\nfrom django.db.models.query import RawQuerySet\nfrom le_utils.constants import content_kinds\nfrom rest_framework import serializers\n\nfrom kolibri.core.content.models import AssessmentMet... | [
{
"content": "from django.core.cache import cache\nfrom django.db.models import Manager\nfrom django.db.models import Sum\nfrom django.db.models.query import RawQuerySet\nfrom le_utils.constants import content_kinds\nfrom rest_framework import serializers\n\nfrom kolibri.core.content.models import AssessmentMet... | diff --git a/kolibri/core/content/serializers.py b/kolibri/core/content/serializers.py
index da871d2f6ec..326e6497fa9 100644
--- a/kolibri/core/content/serializers.py
+++ b/kolibri/core/content/serializers.py
@@ -67,6 +67,7 @@ class Meta:
"version",
"available",
"num_coach_content... |
doccano__doccano-693 | CORS error when running locally in development mode
How to reproduce the behaviour
---------
1. `git clone https://github.com/doccano/doccano.git`
2. `cd doccano`
3. `docker-compose -f docker-compose.dev.yml up`
4. Visit `http://localhost:3000/auth`
5. Login with user `admin` and password `password`
Your Envir... | [
{
"content": "\"\"\"\nDjango settings for app project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2.0/ref/settings/\n\nAny setting that is configured via an environmen... | [
{
"content": "\"\"\"\nDjango settings for app project.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/2.0/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/2.0/ref/settings/\n\nAny setting that is configured via an environmen... | diff --git a/app/app/settings.py b/app/app/settings.py
index b55abca0e6..56307df505 100644
--- a/app/app/settings.py
+++ b/app/app/settings.py
@@ -314,4 +314,5 @@
CORS_ORIGIN_WHITELIST = (
'http://127.0.0.1:3000',
'http://0.0.0.0:3000',
+ 'http://localhost:3000'
)
|
scikit-hep__pyhf-1460 | Logging configuration in contrib/utils
# Question
`pyhf.contrib.utils` sets up logging:
https://github.com/scikit-hep/pyhf/blob/6b769fd6f5e1473deba2b4c55d49ebdb3db5b447/src/pyhf/contrib/utils.py#L9
This interferes with custom logging users may want to set up. To achieve this now, they would have to do so before... | [
{
"content": "\"\"\"Helper utilities for common tasks.\"\"\"\n\nfrom urllib.parse import urlparse\nimport tarfile\nfrom io import BytesIO\nimport logging\nfrom .. import exceptions\n\nlogging.basicConfig()\nlog = logging.getLogger(__name__)\n\n__all__ = [\"download\"]\n\n\ndef __dir__():\n return __all__\n\n... | [
{
"content": "\"\"\"Helper utilities for common tasks.\"\"\"\n\nfrom urllib.parse import urlparse\nimport tarfile\nfrom io import BytesIO\nimport logging\nfrom .. import exceptions\n\nlog = logging.getLogger(__name__)\n\n__all__ = [\"download\"]\n\n\ndef __dir__():\n return __all__\n\n\ntry:\n import requ... | diff --git a/src/pyhf/contrib/utils.py b/src/pyhf/contrib/utils.py
index da60ac01fb..06020bac39 100644
--- a/src/pyhf/contrib/utils.py
+++ b/src/pyhf/contrib/utils.py
@@ -6,7 +6,6 @@
import logging
from .. import exceptions
-logging.basicConfig()
log = logging.getLogger(__name__)
__all__ = ["download"]
|
jazzband__pip-tools-2042 | Broken build due to failed `linkcheck` job
I've noticed that matrix badges are frequently inaccessible, see README:
<img width="893" alt="image" src="https://github.com/jazzband/pip-tools/assets/7377671/94c2d45a-12ef-4237-8a85-434ee1bd7c05">
Sometimes, a certain issue even results in CI builds [breaking](https://gi... | [
{
"content": "# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\nfrom __future__ import annotations\n\nfrom importlib.metadata import version as get_version\nfrom pathlib import Path\n\nfrom sphinx.util import logging\nfrom sp... | [
{
"content": "# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\"\"\"Configuration file for the Sphinx documentation builder.\"\"\"\n\nfrom __future__ import annotations\n\nfrom importlib.metadata import version as get_version\nfrom pathlib import Path\n\nfrom sphinx.util import logging\nfrom sp... | diff --git a/docs/conf.py b/docs/conf.py
index 1f8491603..7e886590f 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -54,6 +54,7 @@
linkcheck_ignore = [
r"^https://matrix\.to/#",
+ r"^https://img.shields.io/matrix",
]
suppress_warnings = ["myst.xref_missing"]
|
keras-team__keras-2992 | Why TF-IDF matrix generated by keras.preprocessing.text.Tokenizer() has negative values?
Say, if run the following script:
> > > import keras
> > > tk = keras.preprocessing.text.Tokenizer()
> > > texts = ['I love you.', 'I love you, too.']
> > > tk.fit_on_texts(texts)
> > > tk.texts_to_matrix(texts, mode='tfidf')
The... | [
{
"content": "# -*- coding: utf-8 -*-\n'''These preprocessing utilities would greatly benefit\nfrom a fast Cython rewrite.\n'''\nfrom __future__ import absolute_import\n\nimport string\nimport sys\nimport numpy as np\nfrom six.moves import range\nfrom six.moves import zip\n\nif sys.version_info < (3,):\n mak... | [
{
"content": "# -*- coding: utf-8 -*-\n'''These preprocessing utilities would greatly benefit\nfrom a fast Cython rewrite.\n'''\nfrom __future__ import absolute_import\nfrom __future__ import division\n\nimport string\nimport sys\nimport numpy as np\nfrom six.moves import range\nfrom six.moves import zip\n\nif ... | diff --git a/keras/preprocessing/text.py b/keras/preprocessing/text.py
index 4c4e45155057..c543666cef1a 100644
--- a/keras/preprocessing/text.py
+++ b/keras/preprocessing/text.py
@@ -3,6 +3,7 @@
from a fast Cython rewrite.
'''
from __future__ import absolute_import
+from __future__ import division
import string
... |
mitmproxy__mitmproxy-6117 | Warn new users about the lazy creation of connections (when requests are expected to be served in the script fully and only)
#### Problem Description
The [example script](https://docs.mitmproxy.org/stable/addons-examples/#http-reply-from-proxy) for not sending any data to the server does not prevent mitmproxy from **e... | [
{
"content": "\"\"\"Send a reply from the proxy without sending any data to the remote server.\"\"\"\nfrom mitmproxy import http\n\n\ndef request(flow: http.HTTPFlow) -> None:\n if flow.request.pretty_url == \"http://example.com/path\":\n flow.response = http.Response.make(\n 200, # (optio... | [
{
"content": "\"\"\"Send a reply from the proxy without sending the request to the remote server.\"\"\"\nfrom mitmproxy import http\n\n\ndef request(flow: http.HTTPFlow) -> None:\n if flow.request.pretty_url == \"http://example.com/path\":\n flow.response = http.Response.make(\n 200, # (op... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 16a539b060..a018cf5ed1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased: mitmproxy next
+* Change wording in the [http-reply-from-proxy.py example](https://github.com/mitmproxy/mitmproxy/blob/main/examples/addons/http-reply-from-proxy.py).
+ ... |
pwndbg__pwndbg-908 | telescope skipping repeated vals is incorrect for last elements
@anthraxx see this pls, for count being 16 we are not showing the repeated value :(
```
pwndbg> telescope 0x21c108086888 15
00:0000│ 0x21c108086888 ◂— 0x3ff199999999999a
01:0008│ 0x21c108086890 ◂— 0x3ff3333333333333
02:0010│ 0x21c108086898 ◂— 0x3ff... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nPrints out pointer chains starting at some address in memory.\n\nGenerally used to print out the stack or register values.\n\"\"\"\n\nimport argparse\nimport collections\nimport math\n\nimport pwndbg.arch\nimport pwndbg.chain\nimport pwndbg.c... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\nPrints out pointer chains starting at some address in memory.\n\nGenerally used to print out the stack or register values.\n\"\"\"\n\nimport argparse\nimport collections\nimport math\n\nimport pwndbg.arch\nimport pwndbg.chain\nimport pwndbg.c... | diff --git a/pwndbg/commands/telescope.py b/pwndbg/commands/telescope.py
index 1385590c4c1..c524705eb00 100644
--- a/pwndbg/commands/telescope.py
+++ b/pwndbg/commands/telescope.py
@@ -131,6 +131,7 @@ def collapse_repeating_values():
result.append(line)
+ collapse_repeating_values()
telescope.offse... |
ipython__ipython-3013 | cython_pyximport reload broken in python3
python3.3 notebook, tested in 0.13.1 but the code looks the same in HEAD:
%%cython_pyximport foo
def f(x):
return 4.0*x
execute twice and you get
```
/usr/lib/python3/dist-packages/IPython/extensions/cythonmagic.py in cython_pyximport(self, line, cell)
99 i... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n=====================\nCython related magics\n=====================\n\nUsage\n=====\n\n``%%cython``\n\n{CYTHON_DOC}\n\n``%%cython_inline``\n\n{CYTHON_INLINE_DOC}\n\n``%%cython_pyximport``\n\n{CYTHON_PYXIMPORT_DOC}\n\nAuthor:\n* Brian Granger\n\nParts of this code w... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\n=====================\nCython related magics\n=====================\n\nUsage\n=====\n\n``%%cython``\n\n{CYTHON_DOC}\n\n``%%cython_inline``\n\n{CYTHON_INLINE_DOC}\n\n``%%cython_pyximport``\n\n{CYTHON_PYXIMPORT_DOC}\n\nAuthor:\n* Brian Granger\n\nParts of this code w... | diff --git a/IPython/extensions/cythonmagic.py b/IPython/extensions/cythonmagic.py
index a4217943269..45a529bdcd5 100644
--- a/IPython/extensions/cythonmagic.py
+++ b/IPython/extensions/cythonmagic.py
@@ -41,6 +41,11 @@
import sys
import time
+try:
+ reload
+except NameError: # Python 3
+ from imp import re... |
PyGithub__PyGithub-1807 | Adding new attribute fails in case new name is the last in the list
### Problem Statement
```bash
$ python scripts/add_attribute.py Permissions triage bool
Traceback (most recent call last):
File "<...>\PyGithub\scripts\add_attribute.py", line 124, in <module>
line = lines[i].rstrip()
IndexError: list ind... | [
{
"content": "#!/usr/bin/env python\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #\n# Copyright 2014 Thialfihar... | [
{
"content": "#!/usr/bin/env python\n\n############################ Copyrights and license ############################\n# #\n# Copyright 2013 Vincent Jacques <vincent@vincent-jacques.net> #\n# Copyright 2014 Thialfihar... | diff --git a/scripts/add_attribute.py b/scripts/add_attribute.py
index d8b29be2e0..73bc1a58c5 100644
--- a/scripts/add_attribute.py
+++ b/scripts/add_attribute.py
@@ -119,7 +119,7 @@
added = False
-inInit = False
+inInit = line.endswith("def _initAttributes(self):")
while not added:
line = lines[i].rstrip()
... |
sanic-org__sanic-1559 | 2 failed tests when tox is not used (missing fixture "benchmark")
`pytest-benchmark` is not present in `tests_require`, so there are 2 failed tests in `tests/benchmark/test_route_resolution_benchmark.py` when tox is not used.
This requirement is present in `tox.ini` so tox and Travis CI are working fine.
(I don't... | [
{
"content": "\"\"\"\nSanic\n\"\"\"\nimport codecs\nimport os\nimport re\nimport sys\nfrom distutils.util import strtobool\n\nfrom setuptools import setup\nfrom setuptools.command.test import test as TestCommand\n\n\nclass PyTest(TestCommand):\n \"\"\"\n Provide a Test runner to be used from setup.py to r... | [
{
"content": "\"\"\"\nSanic\n\"\"\"\nimport codecs\nimport os\nimport re\nimport sys\nfrom distutils.util import strtobool\n\nfrom setuptools import setup\nfrom setuptools.command.test import test as TestCommand\n\n\nclass PyTest(TestCommand):\n \"\"\"\n Provide a Test runner to be used from setup.py to r... | diff --git a/setup.py b/setup.py
index 05d1363729..4a682151de 100644
--- a/setup.py
+++ b/setup.py
@@ -96,6 +96,7 @@ def open_local(paths, mode="r", encoding="utf8"):
ujson,
"pytest-sanic",
"pytest-sugar",
+ "pytest-benchmark",
]
if strtobool(os.environ.get("SANIC_NO_UJSON", "no")):
|
SCons__scons-4475 | Pseudo() global function missing
Initiated from discord discussion https://discord.com/channels/571796279483564041/571796280146133047/1204494883369263154
The documentation indicates both `Pseudo` and `env.Pseudo` work; in practice, the global function form does not work, generating an `AttributeError`.
A quick ex... | [
{
"content": "# MIT License\n#\n# Copyright The SCons Foundation\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the right... | [
{
"content": "# MIT License\n#\n# Copyright The SCons Foundation\n#\n# Permission is hereby granted, free of charge, to any person obtaining\n# a copy of this software and associated documentation files (the\n# \"Software\"), to deal in the Software without restriction, including\n# without limitation the right... | diff --git a/CHANGES.txt b/CHANGES.txt
index 44a458a8f7..b3a0d6ec4e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -74,6 +74,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
Fixes #3529.
- Clarify/fix documentation of Scanners in User Guide and Manpage.
Fixes #4468.
+ - Add Pseudo() to global funct... |
wagtail__wagtail-8940 | __str__ method doesn't return a string.
This code sample:
>>> from wagtail.contrib.forms.models import FormSubmission
>>> FormSubmission.objects.count()
1
>>> FormSubmission.objects.first()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "lib64/py... | [
{
"content": "import datetime\nimport os\n\nfrom django.conf import settings\nfrom django.core.serializers.json import DjangoJSONEncoder\nfrom django.core.validators import validate_email\nfrom django.db import models\nfrom django.template.response import TemplateResponse\nfrom django.utils.formats import date_... | [
{
"content": "import datetime\nimport os\n\nfrom django.conf import settings\nfrom django.core.serializers.json import DjangoJSONEncoder\nfrom django.core.validators import validate_email\nfrom django.db import models\nfrom django.template.response import TemplateResponse\nfrom django.utils.formats import date_... | diff --git a/wagtail/contrib/forms/models.py b/wagtail/contrib/forms/models.py
index f864c5195b16..a56deedc5361 100644
--- a/wagtail/contrib/forms/models.py
+++ b/wagtail/contrib/forms/models.py
@@ -59,7 +59,7 @@ def get_data(self):
}
def __str__(self):
- return self.form_data
+ return f"{... |
mlcommons__GaNDLF-809 | `gdown` does not seem to be working
**Describe the bug**
Current CI seems to be broken.
**To Reproduce**
Steps to reproduce the behavior:
1. Run any CI test
2. See error:
```python-traceback
[SNIP!]
if gdrive_file_id and is_gdrive_download_link:
content_disposition = six.moves.urllib_pars... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"REA... | [
{
"content": "#!/usr/bin/env python\n\n\"\"\"The setup script.\"\"\"\n\n\nimport sys, re, os\nfrom setuptools import setup, find_packages\nfrom setuptools.command.install import install\nfrom setuptools.command.develop import develop\nfrom setuptools.command.egg_info import egg_info\n\ntry:\n with open(\"REA... | diff --git a/setup.py b/setup.py
index 3d9b06820..93222d5f4 100644
--- a/setup.py
+++ b/setup.py
@@ -98,7 +98,7 @@ def run(self):
"pyyaml",
"tiffslide",
"matplotlib",
- "gdown==4.6.3",
+ "gdown==5.1.0",
"pytest",
"coverage",
"pytest-cov",
|
numpy__numpy-3245 | 2to3 run `standarderror` fixer
| [
{
"content": "#!/usr/bin/env python3\n# -*- python -*-\n\"\"\"\n%prog SUBMODULE...\n\nHack to pipe submodules of Numpy through 2to3 and build them in-place\none-by-one.\n\nExample usage:\n\n python3 tools/py3tool.py testing distutils core\n\nThis will copy files to _py3k/numpy, add a dummy __init__.py and\nv... | [
{
"content": "#!/usr/bin/env python3\n# -*- python -*-\n\"\"\"\n%prog SUBMODULE...\n\nHack to pipe submodules of Numpy through 2to3 and build them in-place\none-by-one.\n\nExample usage:\n\n python3 tools/py3tool.py testing distutils core\n\nThis will copy files to _py3k/numpy, add a dummy __init__.py and\nv... | diff --git a/tools/py3tool.py b/tools/py3tool.py
index 48d5ba2f75c5..a6fd5b3f4b4f 100755
--- a/tools/py3tool.py
+++ b/tools/py3tool.py
@@ -64,7 +64,7 @@
'imports2',
'input',
'intern',
-# 'isinstance',
+ 'isinstance',
'itertools',
'itertools_imports',
'long',
|
fail2ban__fail2ban-249 | weak regex'es for apache
See email on fail2ban-users
| [
{
"content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-\n# vi: set ft=python sts=4 ts=4 sw=4 noet :\n\n# This file is part of Fail2Ban.\n#\n# Fail2Ban is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# ... | [
{
"content": "# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-\n# vi: set ft=python sts=4 ts=4 sw=4 noet :\n\n# This file is part of Fail2Ban.\n#\n# Fail2Ban is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# ... | diff --git a/ChangeLog b/ChangeLog
index e58bce068d..230ee10d45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,17 +4,23 @@
|_| \__,_|_|_/___|_.__/\__,_|_||_|
================================================================================
-Fail2Ban (version 0.8.9.dev) ... |
statsmodels__statsmodels-3976 | The compat modules should use absolute imports
The [statsmodels.compat.collections](https://github.com/statsmodels/statsmodels/blob/a88830efc3a99cfbe0ebc9fbfd77820fe748fc59/statsmodels/compat/collections.py#L7) imports the namesake standard library module without requesting absolute imports. While it seems to work in ... | [
{
"content": "'''backported compatibility functions for Python's collections\n\n'''\n\ntry:\n #python >= 2.7\n from collections import OrderedDict\nexcept ImportError:\n #http://code.activestate.com/recipes/576693/\n #author: Raymond Hettinger\n from .ordereddict import OrderedDict\n\ntry:\n #... | [
{
"content": "'''backported compatibility functions for Python's collections\n\n'''\nfrom __future__ import absolute_import\n\ntry:\n #python >= 2.7\n from collections import OrderedDict\nexcept ImportError:\n #http://code.activestate.com/recipes/576693/\n #author: Raymond Hettinger\n from .order... | diff --git a/statsmodels/compat/collections.py b/statsmodels/compat/collections.py
index c6366b5810d..f796b340ad2 100644
--- a/statsmodels/compat/collections.py
+++ b/statsmodels/compat/collections.py
@@ -1,6 +1,7 @@
'''backported compatibility functions for Python's collections
'''
+from __future__ import absolute... |
graphql-python__graphene-django-701 | Found different types with the same name in the schema: ErrorType, ErrorType.
After updating from 2.1.3 to 2.1.6 this error shows up.
It seems that importing `ErrorType` from `graphene_django/forms/types.py` is obsolete now, as `ErrorType` now lives in `graphene_django/types.py`
This module should be removed or it ju... | [
{
"content": "import graphene\n\n\nclass ErrorType(graphene.ObjectType):\n field = graphene.String()\n messages = graphene.List(graphene.String)\n",
"path": "graphene_django/forms/types.py"
}
] | [
{
"content": "import graphene\n\nfrom ..types import ErrorType # noqa Import ErrorType for backwards compatability\n",
"path": "graphene_django/forms/types.py"
}
] | diff --git a/graphene_django/forms/types.py b/graphene_django/forms/types.py
index 1fe33f38e..5005040f6 100644
--- a/graphene_django/forms/types.py
+++ b/graphene_django/forms/types.py
@@ -1,6 +1,3 @@
import graphene
-
-class ErrorType(graphene.ObjectType):
- field = graphene.String()
- messages = graphene.Lis... |
aws__aws-cli-3790 | The aws-cli bundle package uses an insecure version of PyYAML
### awscli version:<br>
`aws-cli/1.16.52 Python/2.7.15 Linux/4.14.77-69.57.amzn1.x86_64 exec-env/AWS_ECS_EC2 botocore/1.12.42`
[NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2017-18342)
This issue was found when vulnerability alerts started appearin... | [
{
"content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# ... | [
{
"content": "# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"). You\n# may not use this file except in compliance with the License. A copy of\n# the License is located at\n#\n# http://aws.amazon.com/apache2.0/\n#\n# ... | diff --git a/awscli/customizations/ecs/filehelpers.py b/awscli/customizations/ecs/filehelpers.py
index c3b023589791..4001af70cf6a 100644
--- a/awscli/customizations/ecs/filehelpers.py
+++ b/awscli/customizations/ecs/filehelpers.py
@@ -78,4 +78,4 @@ def parse_appspec(appspec_str):
try:
return json.loads(ap... |
hpcaitech__ColossalAI-3944 | [tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
[elixir] make README consistent in style
The README for the `Elixir` module is rather a draft, we should polish it to make it consistent with the README files found in other modules.
| [
{
"content": "from .wrapper import ElixirModule, ElixirOptimizer\n",
"path": "colossalai/elixir/__init__.py"
}
] | [
{
"content": "from .search import minimum_waste_search, optimal_search\nfrom .wrapper import ElixirModule, ElixirOptimizer\n\n__all__ = ['ElixirModule', 'ElixirOptimizer', 'minimum_waste_search', 'optimal_search']\n",
"path": "colossalai/elixir/__init__.py"
}
] | diff --git a/colossalai/elixir/README.md b/colossalai/elixir/README.md
index 8adce38dc822..40ac7f79493e 100644
--- a/colossalai/elixir/README.md
+++ b/colossalai/elixir/README.md
@@ -1,47 +1,96 @@
-# Elixir (Gemini2.0)
-Elixir, also known as Gemini, is a technology designed to facilitate the training of large models on... |
django-cms__django-filer-1408 | Field verbose_name should use gettext_lazy
Hi,
model field verbose_names should use gettext_lazy, because it creates migrations based on user language settings.
https://github.com/django-cms/django-filer/blob/master/filer/models/foldermodels.py#L9
This is migration generated after upgrade to django-filer 3.0
... | [
{
"content": "\"\"\"\nSee PEP 386 (https://www.python.org/dev/peps/pep-0386/)\n\nRelease logic:\n 1. Increase version number (change __version__ below).\n 2. Check that all changes have been documented in CHANGELOG.rst.\n 3. git add filer/__init__.py CHANGELOG.rst\n 4. git commit -m 'Bump to {new version}'\n 5.... | [
{
"content": "\"\"\"\nSee PEP 386 (https://www.python.org/dev/peps/pep-0386/)\n\nRelease logic:\n 1. Increase version number (change __version__ below).\n 2. Check that all changes have been documented in CHANGELOG.rst.\n 3. git add filer/__init__.py CHANGELOG.rst\n 4. git commit -m 'Bump to {new version}'\n 5.... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index d8a599f1f..3f9c0ccf8 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -2,13 +2,13 @@
CHANGELOG
=========
-unreleased
-==========
+3.0.4 (2023-08-04)
+==================
* Fix bug when submitting permission admin form
* Fix folder select field css of permission a... |
pyjanitor-devs__pyjanitor-497 | [DOC] Clarify Python version requirements
# Brief Description of Fix
I was looking through documentation (for users and contributors), and it was unclear to me which python versions we actually support. It seems that we support python 3.6 + 3.7. This arose as I was updating the `pyproject.toml` file to avoid the war... | [
{
"content": "from setuptools import setup\n\n\ndef requirements():\n with open(\"requirements.txt\", \"r+\") as f:\n return f.read()\n\n\nsetup(\n name=\"pyjanitor\",\n version=\"0.18.0\",\n description=\"Tools for cleaning pandas DataFrames\",\n author=\"Eric J. Ma\",\n author_email=\... | [
{
"content": "from setuptools import setup\n\n\ndef requirements():\n with open(\"requirements.txt\", \"r+\") as f:\n return f.read()\n\n\nsetup(\n name=\"pyjanitor\",\n version=\"0.18.0\",\n description=\"Tools for cleaning pandas DataFrames\",\n author=\"Eric J. Ma\",\n author_email=\... | diff --git a/AUTHORS.rst b/AUTHORS.rst
index 1090d2f03..cf1883228 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -20,7 +20,7 @@ Leads
- `@szuckerman <https://github.com/szuckerman>`_ | `contributions <https://github.com/ericmjl/pyjanitor/pulls?utf8=%E2%9C%93&q=is%3Aclosed+mentions%3Aszuckerman>`_
- `@zbarry <https://g... |
typeddjango__django-stubs-871 | Mypy version 0.940 released, causes tests to fail
On [11th March 2022, Mypy version 0.940](https://pypi.org/project/mypy/#history) was released, causing django-stubs tests run by pytest to fail in Github Actions started on or after 11th Match.
We either need to use version 0.931 of mypy for local testing and Github ac... | [
{
"content": "import os\nfrom distutils.core import setup\nfrom typing import List\n\nfrom setuptools import find_packages\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n ... | [
{
"content": "import os\nfrom distutils.core import setup\nfrom typing import List\n\nfrom setuptools import find_packages\n\n\ndef find_stub_files(name: str) -> List[str]:\n result = []\n for root, dirs, files in os.walk(name):\n for file in files:\n if file.endswith(\".pyi\"):\n ... | diff --git a/requirements.txt b/requirements.txt
index 485644f5f..d6bb5025c 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -9,3 +9,4 @@ pytest-mypy-plugins==1.9.3
psycopg2-binary
-e ./django_stubs_ext
-e .
+mypy==0.931
diff --git a/setup.py b/setup.py
index 91a770c8b..75fd48357 100644
--- a/setup.py
+++ b/s... |
google-deepmind__dm-haiku-48 | Jax version upgrade (AttributeError: CallPrimitive)
Using the current version of master 66f9c69 of Haiku, I am getting the following error on Colab
```
AttributeError Traceback (most recent call last)
<ipython-input-3-3a9e6adbfff5> in <module>()
----> 1 import haiku as hk
/usr/local/li... | [
{
"content": "# Lint as: python3\n# Copyright 2019 DeepMind Technologies Limited. 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.apach... | [
{
"content": "# Lint as: python3\n# Copyright 2019 DeepMind Technologies Limited. 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.apach... | diff --git a/setup.py b/setup.py
index 0734734ec..c91e06295 100644
--- a/setup.py
+++ b/setup.py
@@ -37,8 +37,8 @@ def _parse_requirements(requirements_txt_path):
_VERSION = _get_version()
EXTRA_PACKAGES = {
- 'jax': ['jax>=0.1.55'],
- 'jaxlib': ['jaxlib>=0.1.37'],
+ 'jax': ['jax>=0.1.71'],
+ 'jaxlib': ... |
kserve__kserve-2726 | Knative installation keeps failing in e2e tests
/kind bug
**What steps did you take and what happened:**
[A clear and concise description of what the bug is.]
The e2e tests are failing every now and then while running the knative installation step, more specifically while patching the configmap. A solution has to ... | [
{
"content": "# Copyright 2021 The KServe 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 a... | [
{
"content": "# Copyright 2021 The KServe 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 a... | diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml
index e1c455b8ee5..9234cee89b7 100644
--- a/.github/workflows/e2e-test.yml
+++ b/.github/workflows/e2e-test.yml
@@ -324,6 +324,9 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: '1.17.3'
+ - uses: actions/... |
mindee__doctr-123 | [docs] Enable documentation of multiple versions at once
As of now, the documentation that would be deployed publicly is only the latest version. The better alternative would be:
- having the latest version by default
- having the documentation of each release accessible as well using a displayed selector
Hugginfa... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | [
{
"content": "# Configuration file for the Sphinx documentation builder.\n#\n# This file only contains a selection of the most common options. For a full\n# list see the documentation:\n# https://www.sphinx-doc.org/en/master/usage/configuration.html\n\n# -- Path setup -------------------------------------------... | diff --git a/.github/workflows/doc-deploy.yaml b/.github/workflows/doc-deploy.yaml
index 6cccc30b57..498972adf1 100644
--- a/.github/workflows/doc-deploy.yaml
+++ b/.github/workflows/doc-deploy.yaml
@@ -31,8 +31,7 @@ jobs:
pip install -r docs/requirements.txt
- name: Build documentation
- run... |
rasterio__rasterio-892 | Decimated read result differs depending on GDAL version
```
$ rio insp tests/data/alpha_masked_values.tif
Rasterio 1.0a1 Interactive Inspector (Python 3.5.1)
Type "src.meta", "src.read(1)", or "help(src)" for more information.
>>> src.read(4, out_shape=(19, 19), masked=False)[-2:, 0:5]
array([[ 0, 0, 0, 255, 0],... | [
{
"content": "\"\"\"Rasterio's GDAL/AWS environment\"\"\"\n\nimport logging\n\nfrom rasterio._drivers import (\n GDALEnv, del_gdal_config, get_gdal_config, set_gdal_config)\nfrom rasterio.dtypes import check_dtype\nfrom rasterio.errors import EnvError\nfrom rasterio.compat import string_types\nfrom rasterio.... | [
{
"content": "\"\"\"Rasterio's GDAL/AWS environment\"\"\"\n\nimport logging\n\nfrom rasterio._drivers import (\n GDALEnv, del_gdal_config, get_gdal_config, set_gdal_config)\nfrom rasterio.dtypes import check_dtype\nfrom rasterio.errors import EnvError\nfrom rasterio.compat import string_types\nfrom rasterio.... | diff --git a/rasterio/env.py b/rasterio/env.py
index 0191a2f8a..64c77e176 100644
--- a/rasterio/env.py
+++ b/rasterio/env.py
@@ -18,7 +18,8 @@
# Rasterio defaults
default_options = {
- 'CHECK_WITH_INVERT_PROJ': True
+ 'CHECK_WITH_INVERT_PROJ': True,
+ 'GTIFF_IMPLICIT_JPEG_OVR': False
}
class Env(object... |
jazzband__pip-tools-28 | pip-review should compare version, not test equality
```
$ pip-review
pelican==3.0.1 is available (you have 3.1)
```
I'm locally testing this package, and `pip-review` will just test if current installed version is the same as the latest version in `pip`. Which causes problem as shown above.
| [
{
"content": "\"\"\"\npip-tools keeps your pinned dependencies fresh.\n\"\"\"\nimport sys\nfrom setuptools import setup\n\n\ndef get_dependencies():\n deps = []\n if sys.version_info < (2, 7):\n deps += ['argparse']\n return deps\n\n\nsetup(\n name='pip-tools',\n version='0.2.1',\n url=... | [
{
"content": "\"\"\"\npip-tools keeps your pinned dependencies fresh.\n\"\"\"\nimport sys\nfrom setuptools import setup\n\n\ndef get_dependencies():\n deps = ['verlib']\n if sys.version_info < (2, 7):\n deps += ['argparse']\n return deps\n\n\nsetup(\n name='pip-tools',\n version='0.2.1',\n... | diff --git a/bin/pip-review b/bin/pip-review
index 165e97a17..cd541562b 100755
--- a/bin/pip-review
+++ b/bin/pip-review
@@ -7,6 +7,7 @@ import logging
import urllib2
import json
from urllib2 import HTTPError
+from verlib import NormalizedVersion, suggest_normalized_version
try:
from subprocess import check_ou... |
facebookresearch__habitat-lab-66 | Mistake in Agent class' docs
Agent's class docs string states that user has to implement 2 methods: `reset` and `step`. However, If I understood correctly, there's no method named `step` and there is method `act` instead. This is quite tiny issue but still.
https://github.com/facebookresearch/habitat-api/blob/c7443c39... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom habitat.core.simulator import Observations\n\n\nclass Agent:\n \"\"\"Abstract class ... | [
{
"content": "#!/usr/bin/env python3\n\n# Copyright (c) Facebook, Inc. and its affiliates.\n# This source code is licensed under the MIT license found in the\n# LICENSE file in the root directory of this source tree.\n\nfrom habitat.core.simulator import Observations\n\n\nclass Agent:\n \"\"\"Abstract class ... | diff --git a/habitat/core/agent.py b/habitat/core/agent.py
index eab2c4395e..bb39009207 100644
--- a/habitat/core/agent.py
+++ b/habitat/core/agent.py
@@ -13,7 +13,7 @@ class standardizes agents to allow seamless benchmarking. To implement an
agent the user has to implement two methods:
reset
- s... |
google-parfait__tensorflow-federated-1748 | Error in loading the GLDv2 dataset
Hello! Thanks for the fantastic library. I have run into an error while loading the GLDv2 dataset via TFF.
Please see the snippet below:
```
>>> import tensorflow_federated as tff
>>> dataset = tff.simulation.datasets.gldv2.load_data()
Traceback (most recent call last):
Fil... | [
{
"content": "# Copyright 2020, The TensorFlow Federated 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# Unl... | [
{
"content": "# Copyright 2020, The TensorFlow Federated 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# Unl... | diff --git a/tensorflow_federated/python/simulation/datasets/gldv2.py b/tensorflow_federated/python/simulation/datasets/gldv2.py
index ac782fb409..ec76f69466 100644
--- a/tensorflow_federated/python/simulation/datasets/gldv2.py
+++ b/tensorflow_federated/python/simulation/datasets/gldv2.py
@@ -15,6 +15,7 @@
import c... |
open-mmlab__mmsegmentation-77 | CUDA error: an illegal memory access was encountered
```python
sys.platform: linux
Python: 3.7.7 (default, May 7 2020, 21:25:33) [GCC 7.3.0]
CUDA available: True
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 10.0, V10.0.130
GPU 0,1: GeForce GTX 1080 Ti
GCC: gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7... | [
{
"content": "import mmcv\n\nfrom .version import __version__, version_info\n\nMMCV_MIN = '1.0.5'\nMMCV_MAX = '1.0.5'\n\n\ndef digit_version(version_str):\n digit_version = []\n for x in version_str.split('.'):\n if x.isdigit():\n digit_version.append(int(x))\n elif x.find('rc') !... | [
{
"content": "import mmcv\n\nfrom .version import __version__, version_info\n\nMMCV_MIN = '1.0.5'\nMMCV_MAX = '1.1.0'\n\n\ndef digit_version(version_str):\n digit_version = []\n for x in version_str.split('.'):\n if x.isdigit():\n digit_version.append(int(x))\n elif x.find('rc') !... | diff --git a/docs/tutorials/new_dataset.md b/docs/tutorials/new_dataset.md
index 0ad1019e0e..6118904765 100644
--- a/docs/tutorials/new_dataset.md
+++ b/docs/tutorials/new_dataset.md
@@ -38,6 +38,9 @@ Only
`data/my_dataset/ann_dir/train/xxx{seg_map_suffix}`,
`data/my_dataset/ann_dir/train/zzz{seg_map_suffix}` will be... |
keras-team__keras-637 | Misiing import in list_pictures
`list_pictures` abborts with error `NameError: global name 're' is not defined`
| [
{
"content": "from __future__ import absolute_import\n\nimport numpy as np\nfrom scipy import ndimage\nfrom scipy import linalg\n\nfrom os import listdir\nfrom os.path import isfile, join\nimport random, math\nfrom six.moves import range\n\n'''\n Fairly basic set of tools for realtime data augmentation on im... | [
{
"content": "from __future__ import absolute_import\n\nimport numpy as np\nimport re\nfrom scipy import ndimage\nfrom scipy import linalg\n\nfrom os import listdir\nfrom os.path import isfile, join\nimport random, math\nfrom six.moves import range\n\n'''\n Fairly basic set of tools for realtime data augment... | diff --git a/keras/preprocessing/image.py b/keras/preprocessing/image.py
index 90abe2bf1116..5b64a588ad9e 100644
--- a/keras/preprocessing/image.py
+++ b/keras/preprocessing/image.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
import numpy as np
+import re
from scipy import ndimage
from scipy import li... |
mathesar-foundation__mathesar-2759 | Support Importing Semicolon Separated Values file
## Problem
Currently Mathesar allows importing [DSV](https://en.wikipedia.org/wiki/Delimiter-separated_values) files with following delimiters:
`,`
`\t`
`:`
`|`
Apart from them, semicolons`;` are popular delimiters used in industries (as address and integer gen... | [
{
"content": "from io import TextIOWrapper\n\nimport clevercsv as csv\n\nfrom db.identifiers import truncate_if_necessary\nfrom db.tables.operations.alter import update_pk_sequence_to_latest\nfrom mathesar.database.base import create_mathesar_engine\nfrom mathesar.models.base import Table\nfrom db.records.opera... | [
{
"content": "from io import TextIOWrapper\n\nimport clevercsv as csv\n\nfrom db.identifiers import truncate_if_necessary\nfrom db.tables.operations.alter import update_pk_sequence_to_latest\nfrom mathesar.database.base import create_mathesar_engine\nfrom mathesar.models.base import Table\nfrom db.records.opera... | diff --git a/mathesar/imports/csv.py b/mathesar/imports/csv.py
index 19c8d8f950..2329b7891b 100644
--- a/mathesar/imports/csv.py
+++ b/mathesar/imports/csv.py
@@ -16,7 +16,7 @@
from mathesar.state import reset_reflection
-ALLOWED_DELIMITERS = ",\t:|"
+ALLOWED_DELIMITERS = ",\t:|;"
SAMPLE_SIZE = 20000
CHECK_ROWS ... |
google__jax-9658 | [QoL] Add copy button in docs code snippets
Since I'm a bit lazy, I'd like to have a "copy to clipboard" button in jax docs to copy over code snippets instead of drag-select-copying it. Like this:

Dupi... | [
{
"content": "# Copyright 2018 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2018 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# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/docs/conf.py b/docs/conf.py
index c75d97ec95ce..42e5bc261200 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -70,6 +70,7 @@
'sphinx_autodoc_typehints',
'myst_nb',
"sphinx_remove_toctrees",
+ 'sphinx_copybutton',
'jax_extensions',
]
diff --git a/docs/requirements.txt b/docs/require... |
numpy__numpy-3235 | 2to3 run `itertools_imports` fixer
| [
{
"content": "#!/usr/bin/env python3\n# -*- python -*-\n\"\"\"\n%prog SUBMODULE...\n\nHack to pipe submodules of Numpy through 2to3 and build them in-place\none-by-one.\n\nExample usage:\n\n python3 tools/py3tool.py testing distutils core\n\nThis will copy files to _py3k/numpy, add a dummy __init__.py and\nv... | [
{
"content": "#!/usr/bin/env python3\n# -*- python -*-\n\"\"\"\n%prog SUBMODULE...\n\nHack to pipe submodules of Numpy through 2to3 and build them in-place\none-by-one.\n\nExample usage:\n\n python3 tools/py3tool.py testing distutils core\n\nThis will copy files to _py3k/numpy, add a dummy __init__.py and\nv... | diff --git a/tools/py3tool.py b/tools/py3tool.py
index 9d67bf2c52fc..6fca72ebae45 100755
--- a/tools/py3tool.py
+++ b/tools/py3tool.py
@@ -66,7 +66,7 @@
'intern',
# 'isinstance',
# 'itertools',
-# 'itertools_imports',
+ 'itertools_imports',
# 'long',
'map',
'metaclass',
|
sunpy__sunpy-3973 | We don't close VSO connections
When I run the some of the examples that call the VSO, I see this in the output in my terminal:
```
generating gallery for generated/gallery/acquiring_data... [100%] searching_vso.py ... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nThis module provides a wrapper around the VSO API.\n\"\"\"\n\nimport os\nimport re\nimport cgi\nimport socket\nimport datetime\nimport warnings\nimport itertools\nfrom functools import partial\nfrom collections import defaultdict\nfrom urllib.error import URLError,... | [
{
"content": "# -*- coding: utf-8 -*-\n\"\"\"\nThis module provides a wrapper around the VSO API.\n\"\"\"\n\nimport os\nimport re\nimport cgi\nimport socket\nimport datetime\nimport warnings\nimport itertools\nfrom functools import partial\nfrom collections import defaultdict\nfrom urllib.error import URLError,... | diff --git a/changelog/3973.bugfix.rst b/changelog/3973.bugfix.rst
new file mode 100644
index 00000000000..a512749c567
--- /dev/null
+++ b/changelog/3973.bugfix.rst
@@ -0,0 +1 @@
+Closed the session in the destructor of VSOClient thus solving the problem of socket being left open
diff --git a/sunpy/net/tests/test_fido.... |
Nitrate__Nitrate-603 | Upgrade celery to 4.3.0
As per title. Remove `skipIf` from test `test_uses_celery`.
| [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\n\nwith open('VERSION.txt', 'r') as f:\n pkg_version = f.read().strip()\n\n\ndef get_long_description():\n with open('README.rst', 'r') as f:\n return f.read()\n\n\ninstall_requires = [\n 'beautifulsoup4 >= 4.... | [
{
"content": "# -*- coding: utf-8 -*-\n\nfrom setuptools import setup, find_packages\n\n\nwith open('VERSION.txt', 'r') as f:\n pkg_version = f.read().strip()\n\n\ndef get_long_description():\n with open('README.rst', 'r') as f:\n return f.read()\n\n\ninstall_requires = [\n 'beautifulsoup4 >= 4.... | diff --git a/setup.py b/setup.py
index 566a6623..00700d43 100644
--- a/setup.py
+++ b/setup.py
@@ -61,7 +61,7 @@ def get_long_description():
# Required packages required to run async tasks
'async': [
- 'celery == 4.2.0',
+ 'celery == 4.4.2',
],
'multiauth': [
diff --git a/src/tests... |
cisagov__manage.get.gov-1672 | In the request form, make the behavior for submitting domain requests and alternates the same
### Issue description
In the request form, the "What .gov domain do you want?" and "Alternative domains (optional)" fields behave differently when given input.
* `What .gov...`, the first field, requires a user to click "Che... | [
{
"content": "from __future__ import annotations # allows forward references in annotations\nfrom itertools import zip_longest\nimport logging\nfrom typing import Callable\nfrom api.views import DOMAIN_API_MESSAGES\nfrom phonenumber_field.formfields import PhoneNumberField # type: ignore\n\nfrom django import... | [
{
"content": "from __future__ import annotations # allows forward references in annotations\nfrom itertools import zip_longest\nimport logging\nfrom typing import Callable\nfrom api.views import DOMAIN_API_MESSAGES\nfrom phonenumber_field.formfields import PhoneNumberField # type: ignore\n\nfrom django import... | diff --git a/src/registrar/assets/js/get-gov.js b/src/registrar/assets/js/get-gov.js
index de7ef6172..52f88bb1d 100644
--- a/src/registrar/assets/js/get-gov.js
+++ b/src/registrar/assets/js/get-gov.js
@@ -130,7 +130,7 @@ function inlineToast(el, id, style, msg) {
}
}
-function _checkDomainAvailability(el) {
+func... |
pyca__cryptography-3010 | rsa.rsa_recover_prime_factors() should return p > q
The documentation for `rsa_recover_prime_factors()` warns that it returns `p` and `q` such that `p < q`. However, things like OpenSSL and BoringSSL seem to require that `p > q`. Given this, would it be feasible to change the order around in cryptography so that it lin... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport abc\nfrom fractions import gcd\n\nimpo... | [
{
"content": "# This file is dual licensed under the terms of the Apache License, Version\n# 2.0, and the BSD License. See the LICENSE file in the root of this repository\n# for complete details.\n\nfrom __future__ import absolute_import, division, print_function\n\nimport abc\nfrom fractions import gcd\n\nimpo... | diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index 4cf9fa78673e..10e48b4a7078 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -509,7 +509,9 @@ this without having to do the math themselves.
.. note::
... |
ietf-tools__datatracker-5809 | Dev mode PDFization broken
### Describe the issue
The `STATIC_IETF_ORG_INTERNAL` stuff in https://github.com/ietf-tools/datatracker/blob/2bf7e8250c3fc2fcaf9a6223c331a52d1f6d89a4/ietf/doc/models.py#L630 causes a Python error in the dev environment.
CC @NGPixel
### Code of Conduct
- [X] I agree to follow the [IETF... | [
{
"content": "# Copyright The IETF Trust 2007-2019, All Rights Reserved\n# -*- coding: utf-8 -*-\n\nfrom ietf.settings import * # pyflakes:ignore\n\nALLOWED_HOSTS = ['*']\n\nfrom ietf.settings_postgresqldb import DATABASES # pyflakes:ignore\n\nIDSUBMIT_IDNITS_BINARY = ... | [
{
"content": "# Copyright The IETF Trust 2007-2019, All Rights Reserved\n# -*- coding: utf-8 -*-\n\nfrom ietf.settings import * # pyflakes:ignore\n\nALLOWED_HOSTS = ['*']\n\nfrom ietf.settings_postgresqldb import DATABASES # pyflakes:ignore\n\nIDSUBMIT_IDNITS_BINARY = ... | diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json
index 422e77cf54..14a0d5ea90 100644
--- a/.devcontainer/devcontainer.json
+++ b/.devcontainer/devcontainer.json
@@ -67,7 +67,7 @@
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
- "... |
svthalia__concrexit-3475 | Switch to cached_db session backend
### What?
Once we have Redis set up (mainly for celery, #3357, #3361) we can use it to cache sessions.
See https://docs.djangoproject.com/en/4.2/topics/http/sessions/#using-cached-sessions
### Why?
A little performance boost for virtually no effort.
| [
{
"content": "\"\"\"Django settings for concrexit.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\n\"\"\"\n\nimport base64\nimport json\nimport logging\n... | [
{
"content": "\"\"\"Django settings for concrexit.\n\nFor more information on this file, see\nhttps://docs.djangoproject.com/en/dev/topics/settings/\n\nFor the full list of settings and their values, see\nhttps://docs.djangoproject.com/en/dev/ref/settings/\n\"\"\"\n\nimport base64\nimport json\nimport logging\n... | diff --git a/website/thaliawebsite/settings.py b/website/thaliawebsite/settings.py
index 6be42eefe..d06e004be 100644
--- a/website/thaliawebsite/settings.py
+++ b/website/thaliawebsite/settings.py
@@ -744,6 +744,8 @@ def from_env(
},
}
+SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
+
WSGI_APPLI... |
gratipay__gratipay.com-1802 | default country on cc form should be USA
Suggested by @toddbranch on [Twitter]().
Can we be less imperialist, somehow? [Maxmind](http://www.maxmind.com/) it?
| [
{
"content": "import locale\nimport time\n\nimport gittip\nfrom aspen import log_dammit, Response\nfrom aspen.utils import typecheck\nfrom tornado.escape import linkify\nfrom postgres.cursors import SimpleCursorBase\n\n\nCOUNTRIES = (\n ('AF', u'Afghanistan'),\n ('AX', u'\\xc5land Islands'),\n ('AL', u... | [
{
"content": "import locale\nimport time\n\nimport gittip\nfrom aspen import log_dammit, Response\nfrom aspen.utils import typecheck\nfrom tornado.escape import linkify\nfrom postgres.cursors import SimpleCursorBase\n\n\nCOUNTRIES = (\n ('US', u'United States'),\n ('AF', u'Afghanistan'),\n ('AX', u'\\x... | diff --git a/gittip/utils/__init__.py b/gittip/utils/__init__.py
index 42aeb18aa5..05327d5046 100644
--- a/gittip/utils/__init__.py
+++ b/gittip/utils/__init__.py
@@ -9,6 +9,7 @@
COUNTRIES = (
+ ('US', u'United States'),
('AF', u'Afghanistan'),
('AX', u'\xc5land Islands'),
('AL', u'Albania'),
|
codespell-project__codespell-3218 | Codespell don't handle KeyboardInterrupt exception
This should be catched and the program should stop gracefully but instead show default stack trace:
```
^CTraceback (most recent call last):
File "/home/kuba/.local/bin/codespell", line 8, in <module>
sys.exit(_script_main())
^^^^^^^^^^^^^^
... | [
{
"content": "import sys\n\nfrom ._codespell import _script_main\n\nif __name__ == \"__main__\":\n sys.exit(_script_main())\n",
"path": "codespell_lib/__main__.py"
}
] | [
{
"content": "import sys\n\nfrom ._codespell import _script_main\n\nif __name__ == \"__main__\":\n try:\n sys.exit(_script_main())\n except KeyboardInterrupt:\n pass\n",
"path": "codespell_lib/__main__.py"
}
] | diff --git a/codespell_lib/__main__.py b/codespell_lib/__main__.py
index ecc82e092b..0a8630df52 100644
--- a/codespell_lib/__main__.py
+++ b/codespell_lib/__main__.py
@@ -3,4 +3,7 @@
from ._codespell import _script_main
if __name__ == "__main__":
- sys.exit(_script_main())
+ try:
+ sys.exit(_script_mai... |
cupy__cupy-1028 | cupy.copyto behaves differently from numpy.copyto when src is a python scalar
Code:
```python
import numpy
import cupy
def copyto_check(xp):
x = xp.zeros(3, dtype=numpy.float32)
# replace first and third items with 1.0
xp.copyto(x, 1.0, where=xp.asarray([True, False, True]))
print(x)
print(... | [
{
"content": "import numpy\nimport six\n\nfrom cupy import core\n\n\ndef copyto(dst, src, casting='same_kind', where=None):\n \"\"\"Copies values from one array to another with broadcasting.\n\n This function can be called for arrays on different devices. In this case,\n casting, ``where``, and broadca... | [
{
"content": "import numpy\nimport six\n\nfrom cupy import core\n\n\ndef copyto(dst, src, casting='same_kind', where=None):\n \"\"\"Copies values from one array to another with broadcasting.\n\n This function can be called for arrays on different devices. In this case,\n casting, ``where``, and broadca... | diff --git a/cupy/manipulation/basic.py b/cupy/manipulation/basic.py
index b5dffd3103a..b6f029b1de1 100644
--- a/cupy/manipulation/basic.py
+++ b/cupy/manipulation/basic.py
@@ -39,7 +39,7 @@ def copyto(dst, src, casting='same_kind', where=None):
if dst.size == 0:
return
- if src_is_python_scalar:
+ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.