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 ⌀ |
|---|---|---|---|---|
pytorch__torchdynamo-1205 | debug saving pre- and post-fusion IR doesn't work
Running repro in #1178 with TORCHINDUCTOR_TRACE=1 results in
```
File "/scratch/ngimel/work/repos/torchdynamo/torchinductor/debug.py", line 304, in ir_post_fusion
self._write_ir("ir_post_fusion.txt", nodes)
File "/scratch/ngimel/work/repos/torchdynamo/torch... | [
{
"content": "import collections\nimport dataclasses\nimport functools\nimport itertools\nimport logging\nimport os\nimport pprint\nimport textwrap\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Set\nfrom typing import Union\n\nimport numpy as np\nimport sympy... | [
{
"content": "import collections\nimport dataclasses\nimport functools\nimport itertools\nimport logging\nimport os\nimport pprint\nimport textwrap\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\nfrom typing import Set\nfrom typing import Union\n\nimport numpy as np\nimport sympy... | diff --git a/torchinductor/scheduler.py b/torchinductor/scheduler.py
index 24588a9484..fa0d5e5bda 100644
--- a/torchinductor/scheduler.py
+++ b/torchinductor/scheduler.py
@@ -35,6 +35,9 @@
def pformat(obj):
+ if isinstance(obj, set):
+ # pformat has trouble with sets of sympy exprs
+ obj = sorted(... |
ray-project__ray-5169 | [autoscaler] GCP error missing required parameter body
<!--
General questions should be asked on the mailing list ray-dev@googlegroups.com.
Questions about how to use Ray should be asked on
[StackOverflow](https://stackoverflow.com/questions/tagged/ray).
Before submitting an issue, please fill out the following f... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport logging\nimport time\n\nfrom cryptography.hazmat.primitives import serialization\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nfrom cryptography.hazmat.... | [
{
"content": "from __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport os\nimport logging\nimport time\n\nfrom cryptography.hazmat.primitives import serialization\nfrom cryptography.hazmat.primitives.asymmetric import rsa\nfrom cryptography.hazmat.... | diff --git a/python/ray/autoscaler/gcp/config.py b/python/ray/autoscaler/gcp/config.py
index d165fb8b7b09..ba5026700e51 100644
--- a/python/ray/autoscaler/gcp/config.py
+++ b/python/ray/autoscaler/gcp/config.py
@@ -383,7 +383,8 @@ def _add_iam_policy_binding(service_account, roles):
email = service_account["email"... |
googleapis__google-auth-library-python-913 | Setuptools as dependency is problematic w/ pip-tools
https://github.com/googleapis/google-auth-library-python/commit/908da752d01fef728bd5cb3eb5b13f2b5c335e51 (#322) added `setuptools` as a dependency in this package. However, the [pip-tools](https://github.com/jazzband/pip-tools) package that's commonly used for pinnin... | [
{
"content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | [
{
"content": "# Copyright 2014 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applica... | diff --git a/setup.py b/setup.py
index 301e99643..44c512128 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,6 @@
'rsa>=3.1.4,<5; python_version >= "3.6"',
# install enum34 to support 2.7. enum34 only works up to python version 3.3.
'enum34>=1.1.10; python_version < "3.4"',
- "setuptools>=40.3.0",
... |
encode__uvicorn-1269 | Shutdown process is broken in 0.15
### Checklist
<!-- Please make sure you check all these items before submitting your bug report. -->
- [x] The bug is reproducible against the latest release and/or `master`.
- [x] There are no similar issues or pull requests to fix it yet.
### Describe the bug
My FastAPI... | [
{
"content": "import asyncio\nimport logging\nimport os\nimport platform\nimport signal\nimport socket\nimport sys\nimport threading\nimport time\nfrom email.utils import formatdate\nfrom types import FrameType\nfrom typing import TYPE_CHECKING, Any, List, Optional, Set, Tuple, Union\n\nimport click\n\nfrom uvi... | [
{
"content": "import asyncio\nimport logging\nimport os\nimport platform\nimport signal\nimport socket\nimport sys\nimport threading\nimport time\nfrom email.utils import formatdate\nfrom types import FrameType\nfrom typing import TYPE_CHECKING, Any, List, Optional, Set, Tuple, Union\n\nimport click\n\nfrom uvi... | diff --git a/uvicorn/server.py b/uvicorn/server.py
index 6aa694cae..bc5a4fddf 100644
--- a/uvicorn/server.py
+++ b/uvicorn/server.py
@@ -310,7 +310,7 @@ def install_signal_handlers(self) -> None:
def handle_exit(self, sig: signal.Signals, frame: FrameType) -> None:
- if self.should_exit:
+ if sel... |
projectmesa__mesa-989 | Color patches takes a long time to load
When you hit "reset" to load the color patches example, it takes a long time to load.
Not sure why. As a result, I thought it was broken.
To recreate...
```
cd examples/color_patches
python run.py
```
Wait for patches to load when browser window pops up.
OR hit rese... | [
{
"content": "\"\"\"\nhandles the definition of the canvas parameters and\nthe drawing of the model representation on the canvas\n\"\"\"\n# import webbrowser\n\nfrom mesa.visualization.modules import CanvasGrid\nfrom mesa.visualization.ModularVisualization import ModularServer\n\nfrom .model import ColorPatches... | [
{
"content": "\"\"\"\nhandles the definition of the canvas parameters and\nthe drawing of the model representation on the canvas\n\"\"\"\n# import webbrowser\n\nfrom mesa.visualization.modules import CanvasGrid\nfrom mesa.visualization.ModularVisualization import ModularServer\n\nfrom .model import ColorPatches... | diff --git a/examples/color_patches/color_patches/server.py b/examples/color_patches/color_patches/server.py
index 711c31304bb..e0636c2492b 100644
--- a/examples/color_patches/color_patches/server.py
+++ b/examples/color_patches/color_patches/server.py
@@ -62,7 +62,7 @@ def color_patch_draw(cell):
ColorPatches,
... |
getnikola__nikola-2363 | output of 'nikola auto' not visible with light themes
I use solarized-light theme in my(gnome) terminal and when I e.g. run 'nikola build', most of the output is not clearly visible - see the shot: http://pasteboard.co/1pIJ9kw9.png, so wonder if something can be done to make it more ui-friendly for light color themes?
... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2016 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2016 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including wi... | diff --git a/CHANGES.txt b/CHANGES.txt
index b51bf68dd6..c221b36f34 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,7 @@ New in master
Features
--------
+* Option to disable color output using NIKOLA_MONO envvar (Issue #2360)
* Improved locale detection in Windows (Issue #2343)
* Added ``enclosure_length`` ... |
django-json-api__django-rest-framework-json-api-831 | Drop end of life Django versions (2.1, 1.11)
This has been discussed but it is good to have its own single issue for dropping and adding features :smile:
See https://www.djangoproject.com/download/ for release schedule.
| [
{
"content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {'bdist_wheel'}.intersection(sys.argv)\nwheel = ['wheel'] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from paths an... | [
{
"content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {'bdist_wheel'}.intersection(sys.argv)\nwheel = ['wheel'] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from paths an... | diff --git a/.travis.yml b/.travis.yml
index 301ed0cc..ad495df9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,11 +5,6 @@ cache: pip
# Favor explicit over implicit and use an explicit build matrix.
matrix:
allow_failures:
- - env: TOXENV=py35-django111-drfmaster
- - env: TOXENV=py36-django111-drfmaster
- ... |
googleapis__python-bigquery-648 | chore: use paths for --cov arguments in noxfile
https://github.com/googleapis/python-bigquery/blob/6a48e80bc7d347f381b181f4cf81fef105d0ad0d/noxfile.py#L80-L81
To pull https://github.com/googleapis/synthtool/pull/859 from templates.
| [
{
"content": "# Copyright 2016 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"content": "# Copyright 2016 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/noxfile.py b/noxfile.py
index 7ba081660..654bbd093 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -77,8 +77,8 @@ def default(session, install_extras=True):
session.run(
"py.test",
"--quiet",
- "--cov=google.cloud.bigquery",
- "--cov=tests.unit",
+ "--cov=google/clou... |
bookwyrm-social__bookwyrm-695 | Remove the "Cover" text from the alt text of book covers if one is present
Currently, when a book cover is present and is displayed, it's alt text consists of the book title, the text *Cover*, edition name, and the first published date.
For example, via VoiceOver under Safari:
```
image The Night Circus cover (H... | [
{
"content": "''' database schema for books and shelves '''\nimport re\n\nfrom django.db import models\nfrom model_utils.managers import InheritanceManager\n\nfrom bookwyrm import activitypub\nfrom bookwyrm.settings import DOMAIN\n\nfrom .activitypub_mixin import OrderedCollectionPageMixin, ObjectMixin\nfrom .b... | [
{
"content": "''' database schema for books and shelves '''\nimport re\n\nfrom django.db import models\nfrom model_utils.managers import InheritanceManager\n\nfrom bookwyrm import activitypub\nfrom bookwyrm.settings import DOMAIN\n\nfrom .activitypub_mixin import OrderedCollectionPageMixin, ObjectMixin\nfrom .b... | diff --git a/bookwyrm/models/book.py b/bookwyrm/models/book.py
index f1f2083033..6a1a18b1ea 100644
--- a/bookwyrm/models/book.py
+++ b/bookwyrm/models/book.py
@@ -91,7 +91,7 @@ def edition_info(self):
@property
def alt_text(self):
''' image alt test '''
- text = '%s cover' % self.title
+ ... |
apache__airflow-16108 | Could not get scheduler_job_id
**Apache Airflow version:**
2.0.0
**Kubernetes version (if you are using kubernetes) (use kubectl version):**
1.18.3
**Environment:**
Cloud provider or hardware configuration: AWS
**What happened:**
When trying to run a DAG, it gets scheduled, but task is never run. W... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | [
{
"content": "#\n# Licensed to the Apache Software Foundation (ASF) under one\n# or more contributor license agreements. See the NOTICE file\n# distributed with this work for additional information\n# regarding copyright ownership. The ASF licenses this file\n# to you under the Apache License, Version 2.0 (th... | diff --git a/airflow/cli/commands/task_command.py b/airflow/cli/commands/task_command.py
index 6c05d7776d3ea..c0cfb03f66258 100644
--- a/airflow/cli/commands/task_command.py
+++ b/airflow/cli/commands/task_command.py
@@ -88,6 +88,7 @@ def _run_task_by_executor(args, dag, ti):
print(e)
raise e
... |
LMFDB__lmfdb-5179 | PIP dependencies
We have several deprecated dependencies that we should fix ASAP
```
flask<=1.1.4
markupsafe<=2.0.1
itsdangerous<=2.0.1
```
in particular, this prevents using lmfdb in an environment with jupyterlab installed, which is something we would like to have working on a short time basis.
| [
{
"content": "# -*- coding: utf-8 -*-\nfrom lmfdb.app import app\nfrom lmfdb.logger import make_logger\nfrom flask import Blueprint, request, redirect\n\nlocal_fields_page = Blueprint(\"local_fields\", __name__, template_folder='templates', static_folder=\"static\")\nlogger = make_logger(local_fields_page)\n\n\... | [
{
"content": "# -*- coding: utf-8 -*-\nfrom lmfdb.app import app\nfrom lmfdb.logger import make_logger\nfrom flask import Blueprint, request, redirect\n\nlocal_fields_page = Blueprint(\"local_fields\", __name__, template_folder='templates', static_folder=\"static\")\nlogger = make_logger(local_fields_page)\n\n\... | diff --git a/lmfdb/local_fields/__init__.py b/lmfdb/local_fields/__init__.py
index fbb8b9cb60..d7f659084b 100644
--- a/lmfdb/local_fields/__init__.py
+++ b/lmfdb/local_fields/__init__.py
@@ -27,7 +27,6 @@ def redirect_local():
app.register_blueprint(local_fields_page, url_prefix="/padicField")
-app.register_bluepr... |
ansible-collections__community.general-6695 | read_csv - Key 'Name' was not found in the CSV header fields
##### SUMMARY
The `read_csv` module fails to identify a field, yet displaces the field in the list of available fields.
##### ISSUE TYPE
- Bug Report
##### COMPONENT NAME
read_csv
##### ANSIBLE VERSION
```
ansible 2.9.10
config file = /home... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2021, Andrew Pantuso (@ajpantuso) <ajpantuso@gmail.com>\n# Copyright (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Ide... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright (c) 2021, Andrew Pantuso (@ajpantuso) <ajpantuso@gmail.com>\n# Copyright (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com>\n# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)\n# SPDX-License-Ide... | diff --git a/changelogs/fragments/6662-csv-bom.yml b/changelogs/fragments/6662-csv-bom.yml
new file mode 100644
index 00000000000..e9c617219c8
--- /dev/null
+++ b/changelogs/fragments/6662-csv-bom.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - csv module utils - detects and remove unicode BOM markers from incoming CSV content (ht... |
netbox-community__netbox-12012 | Support for multiple remote auth backends
### NetBox version
v3.4.6
### Feature type
New functionality
### Proposed functionality
Currently, [REMOTE_AUTH_BACKEND](https://docs.netbox.dev/en/stable/configuration/remote-authentication/#remote_auth_backend) only supports a single auth backend. Modify REMOTE... | [
{
"content": "import hashlib\nimport importlib\nimport importlib.util\nimport os\nimport platform\nimport sys\nimport warnings\nfrom urllib.parse import urlsplit\n\nimport django\nimport sentry_sdk\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfigure... | [
{
"content": "import hashlib\nimport importlib\nimport importlib.util\nimport os\nimport platform\nimport sys\nimport warnings\nfrom urllib.parse import urlsplit\n\nimport django\nimport sentry_sdk\nfrom django.contrib.messages import constants as messages\nfrom django.core.exceptions import ImproperlyConfigure... | diff --git a/docs/configuration/remote-authentication.md b/docs/configuration/remote-authentication.md
index 07adf5c6a24..1fda8d0d35d 100644
--- a/docs/configuration/remote-authentication.md
+++ b/docs/configuration/remote-authentication.md
@@ -16,7 +16,7 @@ If true, NetBox will automatically create local accounts for ... |
sbi-dev__sbi-674 | small bug about the variable clipped_batch_size in SNRE
I believe this line of code
https://github.com/mackelab/sbi/blob/4bcba0568ba408156eab28328a562425fb8ba89d/sbi/inference/snre/snre_base.py#L172
should read `clipped_batch_size = min(training_batch_size, val_loader.batch_size)`. Is that correct or am I fundamental... | [
{
"content": "from abc import ABC, abstractmethod\nfrom copy import deepcopy\nfrom typing import Any, Callable, Dict, Optional, Union\n\nimport torch\nfrom torch import Tensor, eye, nn, ones, optim\nfrom torch.distributions import Distribution\nfrom torch.nn.utils.clip_grad import clip_grad_norm_\nfrom torch.ut... | [
{
"content": "from abc import ABC, abstractmethod\nfrom copy import deepcopy\nfrom typing import Any, Callable, Dict, Optional, Union\n\nimport torch\nfrom torch import Tensor, eye, nn, ones, optim\nfrom torch.distributions import Distribution\nfrom torch.nn.utils.clip_grad import clip_grad_norm_\nfrom torch.ut... | diff --git a/sbi/inference/snre/snre_base.py b/sbi/inference/snre/snre_base.py
index cc9be42d4..09898527e 100644
--- a/sbi/inference/snre/snre_base.py
+++ b/sbi/inference/snre/snre_base.py
@@ -169,7 +169,7 @@ def train(
dataloader_kwargs=dataloader_kwargs,
)
- clipped_batch_size = min(tra... |
getredash__redash-1119 | User should be able to delete an Alert
Can't remove Alert with UI.
Directly run sql as below.
``` sql
delete from alerts where id = 〜
```
| [
{
"content": "import time\n\nfrom flask import request\nfrom funcy import project\n\nfrom redash import models\nfrom redash.permissions import require_access, require_admin_or_owner, view_only, require_permission\nfrom redash.handlers.base import BaseResource, require_fields, get_object_or_404\n\n\nclass AlertR... | [
{
"content": "import time\n\nfrom flask import request\nfrom funcy import project\n\nfrom redash import models\nfrom redash.permissions import require_access, require_admin_or_owner, view_only, require_permission\nfrom redash.handlers.base import BaseResource, require_fields, get_object_or_404\n\n\nclass AlertR... | diff --git a/rd_ui/app/scripts/controllers/alerts.js b/rd_ui/app/scripts/controllers/alerts.js
index 342792785a..c444e388e1 100644
--- a/rd_ui/app/scripts/controllers/alerts.js
+++ b/rd_ui/app/scripts/controllers/alerts.js
@@ -67,10 +67,12 @@
if ($scope.alertId === "new") {
$scope.alert = new Alert({optio... |
microsoft__torchgeo-1755 | SustainBenchCropYield download doesn't work
### Description
Downloading the SustainBenchCropYield dataset doesn't work as expected
### Steps to reproduce
```
ds = SustainBenchCropYield("data/", download=True)
```
This downloads a file called `soybeans` then fails unzipping `soybeans.zip`. Works if you rename to... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"SustainBench Crop Yield dataset.\"\"\"\n\nimport os\nfrom typing import Any, Callable, Optional\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport torch\nfrom matplotlib.figure impor... | [
{
"content": "# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n\n\"\"\"SustainBench Crop Yield dataset.\"\"\"\n\nimport os\nfrom typing import Any, Callable, Optional\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport torch\nfrom matplotlib.figure impor... | diff --git a/torchgeo/datasets/sustainbench_crop_yield.py b/torchgeo/datasets/sustainbench_crop_yield.py
index 5dca4e6d969..564524f9479 100644
--- a/torchgeo/datasets/sustainbench_crop_yield.py
+++ b/torchgeo/datasets/sustainbench_crop_yield.py
@@ -211,7 +211,7 @@ def _download(self) -> None:
download_url(
... |
geopandas__geopandas-28 | Minor typo?
It looks like line 121 in geoseries.py (in function `_series_unary_op`) should read:
``` python
return Series([getattr(geom, op) for geom in self],
```
rather than
``` python
return GeoSeries([getattr(geom, op) for geom in self],
```
This is a very minor bug, so I didn't bother with a PR, but am happy ... | [
{
"content": "from warnings import warn\nfrom functools import partial\n\nimport numpy as np\nfrom pandas import Series, DataFrame\n\nimport pyproj\nfrom shapely.geometry import shape, Polygon, Point\nfrom shapely.geometry.collection import GeometryCollection\nfrom shapely.geometry.base import BaseGeometry\nfro... | [
{
"content": "from warnings import warn\nfrom functools import partial\n\nimport numpy as np\nfrom pandas import Series, DataFrame\n\nimport pyproj\nfrom shapely.geometry import shape, Polygon, Point\nfrom shapely.geometry.collection import GeometryCollection\nfrom shapely.geometry.base import BaseGeometry\nfro... | diff --git a/geopandas/geoseries.py b/geopandas/geoseries.py
index 6f95b08f43..30de157553 100644
--- a/geopandas/geoseries.py
+++ b/geopandas/geoseries.py
@@ -118,7 +118,7 @@ def _geo_unary_op(self, op):
def _series_unary_op(self, op):
"""Unary operation that returns a Series"""
- return GeoSerie... |
nautobot__nautobot-5051 | GraphiQL interface save query function giving 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:... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom drf_spectacular.utils import extend_schema_field\nfrom rest_framework import serializers\n\nfrom nautobot.core.api import (\n ... | [
{
"content": "import logging\n\nfrom django.conf import settings\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.core.exceptions import ObjectDoesNotExist\nfrom drf_spectacular.utils import extend_schema_field\nfrom rest_framework import serializers\n\nfrom nautobot.core.api import (\n ... | diff --git a/changes/4606.fixed b/changes/4606.fixed
new file mode 100644
index 00000000000..c60342ca12c
--- /dev/null
+++ b/changes/4606.fixed
@@ -0,0 +1,4 @@
+Fixed an error when attempting to "Save Changes" to an existing GraphQL saved query via the GraphiQL UI.
+Fixed incorrect positioning of the "Save Changes" but... |
zigpy__zha-device-handlers-1205 | Support for LIDL Livarno home staande led lamp zigbee
**Feature request.**
This LED Lamp is discovered in HA as a generic light (no Quirk).
- ON/OFF works Okay
- DIM/Level works Okay
- RGB color capability is reported, but not supported by this lamp. it only CCT.
- Color temperaturedoes not work correct.
When... | [
{
"content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr... | [
{
"content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr... | diff --git a/zhaquirks/lidl/cct.py b/zhaquirks/lidl/cct.py
index b45bbed83a..de1d9769b6 100644
--- a/zhaquirks/lidl/cct.py
+++ b/zhaquirks/lidl/cct.py
@@ -44,6 +44,7 @@ class CCTLight(CustomDevice):
("_TZ3000_rylaozuc", "TS0502A"),
("_TZ3000_el5kt5im", "TS0502A"),
("_TZ3000_oh7jdd... |
googleapis__google-cloud-python-2379 | '_AsyncQuery.cancel' fails to update from returned resource
E.g.:
``` python
Traceback (most recent call last):
File ...
job.cancel()
File ".../google/cloud/bigquery/job.py", line 378, in cancel
self._set_properties(api_response)
File ".../google/cloud/bigquery/job.py", line 262, in _set_properties
s... | [
{
"content": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | [
{
"content": "# Copyright 2015 Google Inc. All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless... | diff --git a/google/cloud/bigquery/job.py b/google/cloud/bigquery/job.py
index a4eb745b4942..5a88f8316fdb 100644
--- a/google/cloud/bigquery/job.py
+++ b/google/cloud/bigquery/job.py
@@ -375,7 +375,7 @@ def cancel(self, client=None):
api_response = client.connection.api_request(
method='POST', p... |
borgbackup__borg-5109 | `pathconf(..., _PC_NAME_MAX) == 0` in borg mount
When I use `pathconf(..., _PC_NAME_MAX)` to allocate space for `struct dirent` as described in [`man 3 readdir`](https://linux.die.net/man/3/readdir), I get back 0. [`man 3 pathconf`](https://linux.die.net/man/3/pathconf) says it should return -1 on error.
Original bi... | [
{
"content": "import errno\nimport io\nimport os\nimport stat\nimport struct\nimport sys\nimport tempfile\nimport time\nfrom collections import defaultdict\nfrom signal import SIGINT\nfrom distutils.version import LooseVersion\n\nimport llfuse\n\nfrom .logger import create_logger\nlogger = create_logger()\n\nfr... | [
{
"content": "import errno\nimport io\nimport os\nimport stat\nimport struct\nimport sys\nimport tempfile\nimport time\nfrom collections import defaultdict\nfrom signal import SIGINT\nfrom distutils.version import LooseVersion\n\nimport llfuse\n\nfrom .logger import create_logger\nlogger = create_logger()\n\nfr... | diff --git a/src/borg/fuse.py b/src/borg/fuse.py
index f0933ddbe6..429790e43d 100644
--- a/src/borg/fuse.py
+++ b/src/borg/fuse.py
@@ -518,6 +518,8 @@ def statfs(self, ctx=None):
stat_.f_files = 0
stat_.f_ffree = 0
stat_.f_favail = 0
+ if hasattr(stat_, 'f_namemax'): # since llfuse 1.... |
ietf-tools__datatracker-4145 | v1 api crashes on some content when serializing to xml
See the very old ticket at https://github.com/django-tastypie/django-tastypie/issues/1107.
submission.first_two_pages can contain formfeeds. These break tastypie's xml serialization. Json serialization succeeds.
The quick fix is to stop exposing first_two_pag... | [
{
"content": "# Copyright The IETF Trust 2014-2019, All Rights Reserved\n# -*- coding: utf-8 -*-\n# Autogenerated by the mkresources management command 2014-11-13 23:53\n\n\nfrom ietf.api import ModelResource\nfrom tastypie.fields import ToOneField, ToManyField\nfrom tastypie.constants import ALL, ALL_WITH_RELA... | [
{
"content": "# Copyright The IETF Trust 2014-2019, All Rights Reserved\n# -*- coding: utf-8 -*-\n# Autogenerated by the mkresources management command 2014-11-13 23:53\n\n\nfrom ietf.api import ModelResource\nfrom tastypie.fields import ToOneField, ToManyField\nfrom tastypie.constants import ALL, ALL_WITH_RELA... | diff --git a/ietf/submit/resources.py b/ietf/submit/resources.py
index bf4959f240..98de27aa62 100644
--- a/ietf/submit/resources.py
+++ b/ietf/submit/resources.py
@@ -68,6 +68,7 @@ class Meta:
"group": ALL_WITH_RELATIONS,
"draft": ALL_WITH_RELATIONS,
}
+ excludes = ('first_two_... |
biolab__orange3-text-239 | Preprocess Text: empty Tagger (Stanford) results in segfault
Corpus (bookexcerpts) - Preprocess Text - turn on POS Tagger - select Tagger (window opens) - don't select any tagger, just use cancel).
Procedure results in segfault.
Perhaps disable Tagger if Model empty or otherwise prevent segfaulting.
| [
{
"content": "import os\n\nfrom AnyQt.QtWidgets import (QComboBox, QWidget, QHBoxLayout,\n QSizePolicy, QLineEdit, QDoubleSpinBox,\n QSpinBox, QTextEdit, QDateEdit, QGroupBox,\n QPushButton, QStyle, QFileDialog, QLabel,\n ... | [
{
"content": "import os\n\nfrom AnyQt.QtWidgets import (QComboBox, QWidget, QHBoxLayout,\n QSizePolicy, QLineEdit, QDoubleSpinBox,\n QSpinBox, QTextEdit, QDateEdit, QGroupBox,\n QPushButton, QStyle, QFileDialog, QLabel,\n ... | diff --git a/orangecontrib/text/widgets/utils/widgets.py b/orangecontrib/text/widgets/utils/widgets.py
index 6c27435a2..4528c9421 100644
--- a/orangecontrib/text/widgets/utils/widgets.py
+++ b/orangecontrib/text/widgets/utils/widgets.py
@@ -293,7 +293,8 @@ def browse(self, start_dir=None):
self.recent_file... |
zigpy__zha-device-handlers-891 | [Device Support Request] Lidl _TZ3000_oh7jddmx TS0502A
**Is your feature request related to a problem? Please describe.**
Very similar to #808 I have a LIDL ceiling light panel, which only supports CCT but is incorrectly reported to HA.
**Describe the solution you'd like**
Only exposing the color temperature.
*... | [
{
"content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr... | [
{
"content": "\"\"\"Quirk for LIDL CCT bulb.\"\"\"\nfrom zigpy.profiles import zha\nfrom zigpy.quirks import CustomCluster, CustomDevice\nfrom zigpy.zcl.clusters.general import (\n Basic,\n GreenPowerProxy,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n Scenes,\n Time,\n)\nfr... | diff --git a/zhaquirks/lidl/cct.py b/zhaquirks/lidl/cct.py
index 633323a952..b45bbed83a 100644
--- a/zhaquirks/lidl/cct.py
+++ b/zhaquirks/lidl/cct.py
@@ -43,6 +43,7 @@ class CCTLight(CustomDevice):
("_TZ3000_9evm3otq", "TS0502A"),
("_TZ3000_rylaozuc", "TS0502A"),
("_TZ3000_el5kt5... |
Lightning-AI__torchmetrics-2430 | Can't access metrics in a MetricCollection via keys returned in MetricCollection.keys
## 🐛 Bug
print(list(self.val_metrics_macro.keys())) # prints "['val/MulticlassAccuracy/macro', 'val/MulticlassF1Score/macro', 'val/MulticlassPrecision/macro', 'val/MulticlassRecall/macro']"
print(
f'val/accuracy/macro: {self... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | [
{
"content": "# Copyright The Lightning team.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by appli... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 537d5cf61f7..dd66310e14a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -33,6 +33,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- Fix getitem for metric collection when prefix/postfix is set ([#2430](https://github.c... |
ckan__ckan-7125 | Is ckan.datasets_per_page not being used?
**CKAN version**
CKAN 2.9.5
**Describe the bug**
I set the _ckan.datasets_per_page_ configuration options to 10 and this is working fine on routes:
- /dataset/id
- /group
- /organization
But is not working in the routes*
- /group/id
- /organization/id
where it ... | [
{
"content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport logging\nimport re\nfrom collections import OrderedDict\nfrom typing import Any, Optional, Union, cast\nfrom typing_extensions import Literal\n\nfrom urllib.parse import urlencode\n\nimport ckan.lib.base as base\nimport ckan.lib.helpe... | [
{
"content": "# encoding: utf-8\nfrom __future__ import annotations\n\nimport logging\nimport re\nfrom collections import OrderedDict\nfrom typing import Any, Optional, Union, cast\nfrom typing_extensions import Literal\n\nfrom urllib.parse import urlencode\n\nimport ckan.lib.base as base\nimport ckan.lib.helpe... | diff --git a/ckan/views/group.py b/ckan/views/group.py
index 39154d95035..235e337f790 100644
--- a/ckan/views/group.py
+++ b/ckan/views/group.py
@@ -425,6 +425,8 @@ def read(group_type: str,
extra_vars["q"] = q
+ limit = config.get(u'ckan.datasets_per_page', limit)
+
try:
# Do not query for th... |
Cog-Creators__Red-DiscordBot-3294 | [V3/develop] "owner" config field is ignored
# Other bugs
#### What were you trying to do?
Start bot with owner permissions on me.
#### What were you expecting to happen?
I have owner permissions
#### What actually happened?
I don't have owner permissions, but owner is set in config.
#### How can w... | [
{
"content": "import asyncio\nimport inspect\nimport logging\nimport os\nimport platform\nimport shutil\nimport sys\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom enum import IntEnum\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import Optional, Uni... | [
{
"content": "import asyncio\nimport inspect\nimport logging\nimport os\nimport platform\nimport shutil\nimport sys\nfrom collections import namedtuple\nfrom datetime import datetime\nfrom enum import IntEnum\nfrom importlib.machinery import ModuleSpec\nfrom pathlib import Path\nfrom typing import Optional, Uni... | diff --git a/changelog.d/3293.misc.rst b/changelog.d/3293.misc.rst
new file mode 100644
index 00000000000..c51b07a7b54
--- /dev/null
+++ b/changelog.d/3293.misc.rst
@@ -0,0 +1 @@
+Properly set owner from config during bot's pre-flight.
diff --git a/redbot/core/bot.py b/redbot/core/bot.py
index 4ea8a90559a..4264bd940fc ... |
OCHA-DAP__hdx-ckan-1887 | Please allow markdown to the organization description field
Right now markdown is not allowed in that field. I believe that this is preventing me from adding paragraphs and other particular styles to the text in question.
:\n\n \"\"\"\n ... | [
{
"content": "\"\"\"\nThis module contains I/O operations for loading csv files.\n\n\"\"\"\n\nimport pathlib\n\nimport pandas as pd\n\nfrom .armfiles import check_arm_standards\n\n\ndef read_csv(filename, sep=',', engine='python', column_names=None, skipfooter=0, ignore_index=True, **kwargs):\n\n \"\"\"\n ... | diff --git a/act/io/csvfiles.py b/act/io/csvfiles.py
index f0d2fc36a4..32be0668b0 100644
--- a/act/io/csvfiles.py
+++ b/act/io/csvfiles.py
@@ -75,7 +75,7 @@ def read_csv(filename, sep=',', engine='python', column_names=None, skipfooter=0
# Set Coordinates if there's a variable date_time
if 'date_time' in df... |
rasterio__rasterio-883 | Single int indexes param in sample method
According to docs the `indexes` param in the `sample` method can be a "list of ints or a single int".
However passing a single int raises this exception: `IndexError: too many indices for array`.
| [
{
"content": "# Workaround for issue #378. A pure Python generator.\n\ndef sample_gen(dataset, xy, indexes=None):\n index = dataset.index\n read = dataset.read\n for x, y in xy:\n r, c = index(x, y)\n window = ((r, r+1), (c, c+1))\n data = read(indexes, window=window, masked=False,... | [
{
"content": "# Workaround for issue #378. A pure Python generator.\n\ndef sample_gen(dataset, xy, indexes=None):\n index = dataset.index\n read = dataset.read\n\n if isinstance(indexes, int):\n indexes = [indexes]\n\n for x, y in xy:\n r, c = index(x, y)\n window = ((r, r+1), (... | diff --git a/rasterio/sample.py b/rasterio/sample.py
index aad74ad10..bc718c765 100644
--- a/rasterio/sample.py
+++ b/rasterio/sample.py
@@ -3,6 +3,10 @@
def sample_gen(dataset, xy, indexes=None):
index = dataset.index
read = dataset.read
+
+ if isinstance(indexes, int):
+ indexes = [indexes]
+
... |
edgedb__edgedb-2849 | ISE: `unimplemented auth method: NoneType` when inserting new user on clean instance
<!-- Please search existing issues to avoid creating duplicates. -->
- EdgeDB Version: 1-beta3-451baf4
- OS Version: ubuntu 18.04
Steps to Reproduce:
1. initialize new project with new `EdgeDB` instance in docker with `edgedb p... | [
{
"content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2016-present MagicStack Inc. and the EdgeDB 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... | [
{
"content": "#\n# This source file is part of the EdgeDB open source project.\n#\n# Copyright 2016-present MagicStack Inc. and the EdgeDB 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... | diff --git a/edb/server/server.py b/edb/server/server.py
index ace23ca2d02..c848c757f97 100644
--- a/edb/server/server.py
+++ b/edb/server/server.py
@@ -1191,6 +1191,10 @@ async def get_auth_method(self, user):
if match:
return auth.method
+ raise errors.AuthenticationErro... |
goauthentik__authentik-5630 | SMS Authenticator Setup Stage with generic provider does not work without mapping
**Describe the bug**
Setting up the stage and flow works but trying to set up an mfa device results in an error after entering the phone number
**To Reproduce**
Create a SMS Authenticator Setup Stage with a generic provider and with... | [
{
"content": "\"\"\"SMS Authenticator models\"\"\"\nfrom hashlib import sha256\nfrom typing import Optional\n\nfrom django.contrib.auth import get_user_model\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views import View\nfrom django_otp.models import SideCh... | [
{
"content": "\"\"\"SMS Authenticator models\"\"\"\nfrom hashlib import sha256\nfrom typing import Optional\n\nfrom django.contrib.auth import get_user_model\nfrom django.db import models\nfrom django.utils.translation import gettext_lazy as _\nfrom django.views import View\nfrom django_otp.models import SideCh... | diff --git a/authentik/stages/authenticator_sms/models.py b/authentik/stages/authenticator_sms/models.py
index 9f2e117b4bf1..65e842d556f0 100644
--- a/authentik/stages/authenticator_sms/models.py
+++ b/authentik/stages/authenticator_sms/models.py
@@ -99,7 +99,7 @@ def send_generic(self, token: str, device: "SMSDevice")... |
pypa__pipenv-5909 | documentation is a mix of markdown and restructuredtext
### Issue description
documentation is a mix of markdown and restructuredtext, but the [documentation says the documentation is restructuredtext](https://pipenv.pypa.io/en/latest/dev/contributing/#documentation-contributions). I found out commit 761a03d seeming... | [
{
"content": "#\n# pipenv documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 30 13:28:36 2017.\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.\... | [
{
"content": "#\n# pipenv documentation build configuration file, created by\n# sphinx-quickstart on Mon Jan 30 13:28:36 2017.\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.\... | diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000000..e836f43dd6
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,1875 @@
+# 2023.9.1 (2023-09-01)
+
+# Pipenv 2023.9.1 (2023-09-01)
+
+## Features & Improvements
+
+- Top level Pipfile sys_platform markers should be transitive; adds top level platfor... |
urllib3__urllib3-708 | Error using https and ipv6: InvalidURL("nonnumeric port: '4f7b'",)
To reproduce:
``` Python
import urllib3
p = urllib3.connection_from_url('https://[2001:0:53aa:64c:104c:2c10:2bef:4f7b]')
p.request('GET', '/')
```
produces:
``` Python
Traceback (most recent call last):
File "/usr/lib/python3.4/http/client.py", lin... | [
{
"content": "import errno\nimport logging\nimport sys\nimport warnings\n\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport socket\n\ntry: # Python 3\n from queue import LifoQueue, Empty, Full\nexcept ImportError:\n from Queue import LifoQueue, Empty, Full\n import Queue as _ ... | [
{
"content": "import errno\nimport logging\nimport sys\nimport warnings\n\nfrom socket import error as SocketError, timeout as SocketTimeout\nimport socket\n\ntry: # Python 3\n from queue import LifoQueue, Empty, Full\nexcept ImportError:\n from Queue import LifoQueue, Empty, Full\n import Queue as _ ... | diff --git a/urllib3/connectionpool.py b/urllib3/connectionpool.py
index b38ac68d7b..1004511a8e 100644
--- a/urllib3/connectionpool.py
+++ b/urllib3/connectionpool.py
@@ -68,8 +68,7 @@ def __init__(self, host, port=None):
if not host:
raise LocationValueError("No host specified.")
- # htt... |
cowrie__cowrie-1551 | builtins.KeyError: 'log_time' Python error
**Describe the bug**
Cowrie won't log properly, due that output plugins are not working -> output_splunk
Following error occurs:
```
2021-04-28T07:00:17.796991Z [twisted.logger._observer#critical] Temporarily disabling observer LegacyLogObserverWrapper(<bound method Output... | [
{
"content": "# Copyright (c) 2015 Michel Oosterhof <michel@oosterhof.net>\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the ab... | [
{
"content": "# Copyright (c) 2015 Michel Oosterhof <michel@oosterhof.net>\n# All rights reserved.\n#\n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions\n# are met:\n#\n# 1. Redistributions of source code must retain the ab... | diff --git a/src/cowrie/core/output.py b/src/cowrie/core/output.py
index b55dea5f41..7c144aa890 100644
--- a/src/cowrie/core/output.py
+++ b/src/cowrie/core/output.py
@@ -158,7 +158,7 @@ def emit(self, event: dict) -> None:
if "message" not in event and "format" not in event:
return
- ev:... |
blakeblackshear__frigate-5031 | [Support]: recordings on disk are in -4 timezone (4 hours behind UTC) - 0.12.0-beta2-tensorrt
### Describe the problem you are having
All my recordings on 0.12.0-beta2-tensorrt are recording with what appears to be a -4 timezone. I have checked my host and docker config which both display +10 (Australian Eastern Stand... | [
{
"content": "import datetime\nimport itertools\nimport logging\nimport multiprocessing as mp\nimport os\nimport queue\nimport random\nimport string\nimport subprocess as sp\nimport threading\nfrom collections import defaultdict\nfrom pathlib import Path\n\nimport psutil\nfrom peewee import JOIN, DoesNotExist\n... | [
{
"content": "import datetime\nimport itertools\nimport logging\nimport multiprocessing as mp\nimport os\nimport queue\nimport random\nimport string\nimport subprocess as sp\nimport threading\nfrom collections import defaultdict\nfrom pathlib import Path\n\nimport psutil\nfrom peewee import JOIN, DoesNotExist\n... | diff --git a/frigate/record.py b/frigate/record.py
index 53a75a4855..7b112f7f40 100644
--- a/frigate/record.py
+++ b/frigate/record.py
@@ -278,9 +278,7 @@ def store_segment(
directory = os.path.join(
RECORD_DIR,
- start_time.replace(tzinfo=datetime.timezone.utc)
- .astimezo... |
web2py__web2py-1855 | Problem with web2py compilation
Hi there
Very simple to show this issue:
1. download latest version of web2py (I use Mac OS version for Normal users)
2. From Admin interface compile and pack the 'Welcome' application that comes as standard with web2py
3. Then from the Admin interface upload and install the comp... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n| Created by Vladyslav Kozlovskyy (Ukraine) <dbdevelop©gmail.com>\n| for... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\"\"\"\n| This file is part of the web2py Web Framework\n| Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>\n| License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)\n| Created by Vladyslav Kozlovskyy (Ukraine) <dbdevelop©gmail.com>\n| for... | diff --git a/gluon/utf8.py b/gluon/utf8.py
index 21fd12c4a..34bfa87fe 100644
--- a/gluon/utf8.py
+++ b/gluon/utf8.py
@@ -11,7 +11,7 @@
----------------------------------------------
"""
from __future__ import print_function
-from gluon._compat import builtin as __builtin__, unicodeT, iteritems, to_unicode, to_native... |
encode__django-rest-framework-9278 | _delegate_text was removed in Django 5.
## Checklist
- [ ] Raised initially as discussion #...
- [x] This cannot be dealt with as a third party library. (We prefer new functionality to be [in the form of third party libraries](https://www.django-rest-framework.org/community/third-party-packages/#about-third-party-p... | [
{
"content": "\"\"\"\nHelper functions for creating user-friendly representations\nof serializer classes and serializer fields.\n\"\"\"\nimport re\n\nfrom django.db import models\nfrom django.utils.encoding import force_str\nfrom django.utils.functional import Promise\n\n\ndef manager_repr(value):\n model = ... | [
{
"content": "\"\"\"\nHelper functions for creating user-friendly representations\nof serializer classes and serializer fields.\n\"\"\"\nimport re\n\nfrom django.db import models\nfrom django.utils.encoding import force_str\nfrom django.utils.functional import Promise\n\n\ndef manager_repr(value):\n model = ... | diff --git a/rest_framework/utils/representation.py b/rest_framework/utils/representation.py
index 6f2efee164..b24cc3c759 100644
--- a/rest_framework/utils/representation.py
+++ b/rest_framework/utils/representation.py
@@ -27,8 +27,8 @@ def smart_repr(value):
if isinstance(value, models.Manager):
return m... |
networkx__networkx-6478 | nx.DiGraph.to_undirected() not working as expected for bidirectional edges when using as_view = True
Problem: When using `to_undirected()` on a DiGraph the properties are inconsistent, i.e., differ depending on if as_view was set to True or False. More precisely, the reported degree is not as expected when using `as_vi... | [
{
"content": "\"\"\"Views of core data structures such as nested Mappings (e.g. dict-of-dicts).\nThese ``Views`` often restrict element access, with either the entire view or\nlayers of nested mappings being read-only.\n\"\"\"\nfrom collections.abc import Mapping\n\n__all__ = [\n \"AtlasView\",\n \"Adjace... | [
{
"content": "\"\"\"Views of core data structures such as nested Mappings (e.g. dict-of-dicts).\nThese ``Views`` often restrict element access, with either the entire view or\nlayers of nested mappings being read-only.\n\"\"\"\nfrom collections.abc import Mapping\n\n__all__ = [\n \"AtlasView\",\n \"Adjace... | diff --git a/networkx/classes/coreviews.py b/networkx/classes/coreviews.py
index c2b835592cf..5c4defe94aa 100644
--- a/networkx/classes/coreviews.py
+++ b/networkx/classes/coreviews.py
@@ -134,7 +134,7 @@ def __init__(self, succ, pred):
self._pred = pred
def __len__(self):
- return len(self._succ... |
vacanza__python-holidays-1420 | Add l10n tests
Cover at least duplicated entries check.
_Originally posted by @arkid15r in https://github.com/vacanza/python-holidays/pull/1416#discussion_r1286008102_
| [
{
"content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <dr.pro... | [
{
"content": "# python-holidays\n# ---------------\n# A fast, efficient Python library for generating country, province and state\n# specific sets of holidays on the fly. It aims to make determining whether a\n# specific date is a holiday as fast and flexible as possible.\n#\n# Authors: dr-prodigy <dr.pro... | diff --git a/README.rst b/README.rst
index d17c92acd..e0e41ddae 100644
--- a/README.rst
+++ b/README.rst
@@ -240,7 +240,7 @@ The list of supported countries, their subdivisions and supported languages
* - Canada
- CA
- Provinces and territories: AB, BC, MB, NB, NL, NS, NT, NU, **ON**, PE, QC, SK, YT
- ... |
pre-commit__pre-commit-2740 | /dev/null not found with pre-commit 3.0.2
### search you tried in the issue tracker
/dev/null
### describe your issue
After upgrading to pre-commit 3.0.2, one of my users (on up-to-date macos) is reporting that invoking ruby actions fails with `/dev/null` not found.
Relevant output:
```
rubocop.................. | [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport functools\nimport os.path\nimport shutil\nimport tarfile\nfrom typing import Generator\nfrom typing import Sequence\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import P... | [
{
"content": "from __future__ import annotations\n\nimport contextlib\nimport functools\nimport os.path\nimport shutil\nimport tarfile\nfrom typing import Generator\nfrom typing import Sequence\n\nimport pre_commit.constants as C\nfrom pre_commit.envcontext import envcontext\nfrom pre_commit.envcontext import P... | diff --git a/pre_commit/languages/ruby.py b/pre_commit/languages/ruby.py
index b4d4b45af..4416f7280 100644
--- a/pre_commit/languages/ruby.py
+++ b/pre_commit/languages/ruby.py
@@ -39,7 +39,6 @@ def get_env_patch(
('GEM_HOME', os.path.join(venv, 'gems')),
('GEM_PATH', UNSET),
('BUNDLE_IGNORE_... |
scrapy__scrapy-2337 | Add a sample middleware to startproject's template
It will be nice to have a middleware template inside the template project to serve as an example for people that want to use it.
| [
{
"content": "from __future__ import print_function\nimport re\nimport os\nimport string\nfrom importlib import import_module\nfrom os.path import join, exists, abspath\nfrom shutil import ignore_patterns, move, copy2, copystat\n\nimport scrapy\nfrom scrapy.commands import ScrapyCommand\nfrom scrapy.utils.templ... | [
{
"content": "from __future__ import print_function\nimport re\nimport os\nimport string\nfrom importlib import import_module\nfrom os.path import join, exists, abspath\nfrom shutil import ignore_patterns, move, copy2, copystat\n\nimport scrapy\nfrom scrapy.commands import ScrapyCommand\nfrom scrapy.utils.templ... | diff --git a/scrapy/commands/startproject.py b/scrapy/commands/startproject.py
index e3989baafd6..5941066326a 100644
--- a/scrapy/commands/startproject.py
+++ b/scrapy/commands/startproject.py
@@ -17,6 +17,7 @@
('${project_name}', 'settings.py.tmpl'),
('${project_name}', 'items.py.tmpl'),
('${project_nam... |
jazzband__django-oauth-toolkit-1088 | Write a test for cleartokens management command
**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
Code coverage of the cleartokens management command has been 0% since it was created in 2015.
**De... | [
{
"content": "from django.core.management.base import BaseCommand\n\nfrom ...models import clear_expired\n\n\nclass Command(BaseCommand):\n help = \"Can be run as a cronjob or directly to clean out expired tokens\"\n\n def handle(self, *args, **options):\n clear_expired()\n",
"path": "oauth2_pr... | [
{
"content": "from django.core.management.base import BaseCommand\n\nfrom ...models import clear_expired\n\n\nclass Command(BaseCommand): # pragma: no cover\n help = \"Can be run as a cronjob or directly to clean out expired tokens\"\n\n def handle(self, *args, **options):\n clear_expired()\n",
... | diff --git a/oauth2_provider/management/commands/cleartokens.py b/oauth2_provider/management/commands/cleartokens.py
index 3fb1827f6..9d58361bc 100644
--- a/oauth2_provider/management/commands/cleartokens.py
+++ b/oauth2_provider/management/commands/cleartokens.py
@@ -3,7 +3,7 @@
from ...models import clear_expired
... |
kivy__kivy-2755 | Please distribute pxd files, expose c apis.
I'm writing some kivy extension code, and i want to cimport kivy's extension types, which is more efficient than python api, but kivy don't distribute pxd files to installation directory.
I can set PYTHONPATH to kivy's source directory, and ship cython compiled c file with my... | [
{
"content": "#\n# Kivy - Crossplatform NUI toolkit\n# http://kivy.org/\n#\n\nimport sys\n\nfrom copy import deepcopy\nimport os\nfrom os.path import join, dirname, sep, exists, basename\nfrom os import walk, environ\nfrom distutils.core import setup\nfrom distutils.extension import Extension\nfrom collections ... | [
{
"content": "#\n# Kivy - Crossplatform NUI toolkit\n# http://kivy.org/\n#\n\nimport sys\n\nfrom copy import deepcopy\nimport os\nfrom os.path import join, dirname, sep, exists, basename\nfrom os import walk, environ\nfrom distutils.core import setup\nfrom distutils.extension import Extension\nfrom collections ... | diff --git a/setup.py b/setup.py
index 2b7378b4de..f01c59ad5e 100644
--- a/setup.py
+++ b/setup.py
@@ -727,6 +727,10 @@ def get_extensions_from_sources(sources):
'kivy.uix', ],
package_dir={'kivy': 'kivy'},
package_data={'kivy': [
+ '*.pxd',
+ 'core/text/*.pxd',
+ 'graphics/*.pxd... |
google__TensorNetwork-608 | Some doc links to github yield error
The "Edit on GitHub" links in the top right of some doc pages yield 404 errors when followed, for example [tn.Node](https://tensornetwork.readthedocs.io/en/latest/stubs/tensornetwork.Node.html) and [tn.contractors.optimal](https://tensornetwork.readthedocs.io/en/latest/stubs/tensorn... | [
{
"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# http://www.sphinx-doc.org/en/master/config\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# http://www.sphinx-doc.org/en/master/config\n\n# -- Path setup --------------------------------------------------------------... | diff --git a/.gitignore b/.gitignore
index 87f2d2db9..f9b513626 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,7 +22,6 @@ var/
.installed.cfg
*.egg
docs/clean
-docs/stubs
# Installer logs
pip-log.txt
diff --git a/docs/conf.py b/docs/conf.py
index 9fa35a0bf..b3b093c60 100644
--- a/docs/conf.py
+++ b/docs/conf.py... |
vaexio__vaex-1091 | [BUG-REPORT] Can't Replace Values in Vaex 4.0.0a4
**Description**
Upgrading from previous versions (I cloned the master branch a few weeks ago and installed), I am no longer able to replace values in a dataframe. See below for an example and the traceback.
**Software information**
- Vaex version (`import vaex; va... | [
{
"content": "import numpy as np\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport vaex\nfrom ..expression import _binary_ops, _unary_ops, reversable\n\n\ndef combine_missing(a, b):\n assert a.offset == 0\n if a.null_count > 0 or b.null_count > 0:\n # not optimal\n nulls = pc.inver... | [
{
"content": "import numpy as np\nimport pyarrow as pa\nimport pyarrow.compute as pc\nimport vaex\nfrom ..expression import _binary_ops, _unary_ops, reversable\n\n\ndef combine_missing(a, b):\n assert a.offset == 0\n if a.null_count > 0 or b.null_count > 0:\n # not optimal\n nulls = pc.inver... | diff --git a/packages/vaex-core/vaex/arrow/numpy_dispatch.py b/packages/vaex-core/vaex/arrow/numpy_dispatch.py
index 91775a9879..d425456236 100644
--- a/packages/vaex-core/vaex/arrow/numpy_dispatch.py
+++ b/packages/vaex-core/vaex/arrow/numpy_dispatch.py
@@ -17,7 +17,7 @@ def combine_missing(a, b):
else:
... |
pyinstaller__pyinstaller-5568 | Support matplotlib-3.4.0rc1
## Description of the issue
`matplotlib._get_data_path` no longer exists since 3.4.0rc1: https://github.com/matplotlib/matplotlib/commit/e1352c71f07aee7eab004b73dd9bda2a260ab31b.
This is on schedule for the removal of the deprecations that occurred around the time of #5006. The missing fun... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | [
{
"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2013-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full licens... | diff --git a/PyInstaller/hooks/hook-matplotlib.py b/PyInstaller/hooks/hook-matplotlib.py
index baf3a5146e..9e4f92ba9c 100644
--- a/PyInstaller/hooks/hook-matplotlib.py
+++ b/PyInstaller/hooks/hook-matplotlib.py
@@ -13,7 +13,7 @@
from PyInstaller.utils.hooks import exec_statement
mpl_data_dir = exec_statement(
- ... |
django-json-api__django-rest-framework-json-api-720 | Tox using pytest-runner setup scripts leads to invalid deps
Currently tox uses pytest-runner setup script wrapper. This way tests are run differently when run locally as stated in README.md.
This may lead to different dependencies and errors as for example #634
Best to split up requirements as in [DRF](https://gi... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Django REST Framework JSON API documentation build configuration file, created by\n# sphinx-quickstart on Fri Jul 24 23:31:15 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all ... | [
{
"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# Django REST Framework JSON API documentation build configuration file, created by\n# sphinx-quickstart on Fri Jul 24 23:31:15 2015.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all ... | diff --git a/.pyup.yml b/.pyup.yml
index 02f8ed99..c4b52e37 100644
--- a/.pyup.yml
+++ b/.pyup.yml
@@ -1,5 +1,17 @@
search: False
requirements:
- - requirements-development.txt:
+ - requirements/requirements-codestyle.txt:
+ update: all
+ pin: True
+ - requirements/requirements-documentation.txt:
+ ... |
ansible__ansible-42736 | openstack inventory plugin can create group with an 'empty name' when region is not specified in clouds.yml
<!---
Verify first that your issue/request is not already reported on GitHub.
THIS FORM WILL BE READ BY A MACHINE, COMPLETE ALL SECTIONS AS DESCRIBED.
Also test if the latest release, and devel branch are aff... | [
{
"content": "# Copyright (c) 2012, Marco Vito Moscaritolo <marco@agavee.com>\n# Copyright (c) 2013, Jesse Keating <jesse.keating@rackspace.com>\n# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.\n# Copyright (c) 2016, Rackspace Australia\n# Copyright (c) 2017 Ansible Project\n# GNU General Public... | [
{
"content": "# Copyright (c) 2012, Marco Vito Moscaritolo <marco@agavee.com>\n# Copyright (c) 2013, Jesse Keating <jesse.keating@rackspace.com>\n# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.\n# Copyright (c) 2016, Rackspace Australia\n# Copyright (c) 2017 Ansible Project\n# GNU General Public... | diff --git a/lib/ansible/plugins/inventory/openstack.py b/lib/ansible/plugins/inventory/openstack.py
index d352450ae4c784..2f5717fd3fbd53 100644
--- a/lib/ansible/plugins/inventory/openstack.py
+++ b/lib/ansible/plugins/inventory/openstack.py
@@ -253,7 +253,8 @@ def _get_groups_from_server(self, server_vars, namegroup=... |
rucio__rucio-2492 | Issue in client_extract download
Motivation
----------
Modification
------------
| [
{
"content": "\n'''\nThis file is automatically generated; Do not edit it. :)\n'''\nVERSION_INFO = {\n 'final': True,\n 'version': '1.19.5',\n 'branch_nick': 'patch-0-1_19_5_preparation',\n 'revision_id': '9e14d56c9d958e5348b19ddc7e5fa45d4a778807',\n 'revno': 7951\n}\n",
"path": "lib/rucio/vc... | [
{
"content": "\n'''\nThis file is automatically generated; Do not edit it. :)\n'''\nVERSION_INFO = {\n 'final': True,\n 'version': '1.19.6',\n 'branch_nick': 'patch-0-Release__Rucio_1_19_6_preparation',\n 'revision_id': 'a8c639a7a70a9e605ad90535d28d2eab04d89cce',\n 'revno': 7992\n}\n",
"path"... | diff --git a/doc/source/releasenotes/1.19.6.rst b/doc/source/releasenotes/1.19.6.rst
new file mode 100644
index 0000000000..136b84f446
--- /dev/null
+++ b/doc/source/releasenotes/1.19.6.rst
@@ -0,0 +1,47 @@
+======
+1.19.6
+======
+
+-------
+General
+-------
+
+************
+Enhancements
+************
+
+- Clients: Fi... |
canonical__microk8s-3793 | Leaving a worker node always leads to a broken state.
#### Summary
MicroK8S 1.26: doing a "microk8s leave" command on a worker node that has previously joined a cluster, always leave microk8s in a broken state. MicroK8S will regenerate certificates and will try to restart without success.
#### What Should Happen In... | [
{
"content": "#!/usr/bin/python3\nimport base64\nimport random\nimport string\nimport subprocess\nimport os\nimport ssl\nimport sys\nimport time\nimport hashlib\nimport http\n\nimport click\nimport requests\nimport socket\nimport shutil\nimport urllib3\nimport yaml\nimport json\n\nfrom common.cluster.utils impo... | [
{
"content": "#!/usr/bin/python3\nimport base64\nimport random\nimport string\nimport subprocess\nimport os\nimport ssl\nimport sys\nimport time\nimport hashlib\nimport http\n\nimport click\nimport requests\nimport socket\nimport shutil\nimport urllib3\nimport yaml\nimport json\n\nfrom common.cluster.utils impo... | diff --git a/scripts/wrappers/join.py b/scripts/wrappers/join.py
index 22f0c4d559..d4ee2f8486 100755
--- a/scripts/wrappers/join.py
+++ b/scripts/wrappers/join.py
@@ -826,7 +826,6 @@ def join_dqlite_worker_node(info, master_ip, master_port, token):
exit(1)
store_remote_ca(info["ca"])
- store_cert("se... |
getsentry__sentry-18644 | BufferError: Local: Queue full
I am receiving this error once every 2-4 days and I need to restart Sentry to fix it. This started after moving to the Docker version of Sentry.
I never noticed this being an issue on 9.1.2 also with Clickhouse and Snuba running, but without Kafka.
> https://observ.app/share/issue/4... | [
{
"content": "from __future__ import absolute_import\n\nimport redis\nimport logging\n\nfrom threading import Thread\nfrom six.moves.queue import Queue, Full\n\n\nclass QueuedPublisherService(object):\n \"\"\"\n A publisher that queues items locally and publishes them to a\n remote pubsub service on a ... | [
{
"content": "from __future__ import absolute_import\n\nimport redis\nimport logging\n\nfrom threading import Thread\nfrom six.moves.queue import Queue, Full\n\n\nclass QueuedPublisherService(object):\n \"\"\"\n A publisher that queues items locally and publishes them to a\n remote pubsub service on a ... | diff --git a/src/sentry/utils/pubsub.py b/src/sentry/utils/pubsub.py
index 74cf05ac61cd87..a67ee9e95d8bdb 100644
--- a/src/sentry/utils/pubsub.py
+++ b/src/sentry/utils/pubsub.py
@@ -73,5 +73,7 @@ def __init__(self, connection, asynchronous=True):
def publish(self, channel, value, key=None):
self.produc... |
pytorch__ignite-751 | correct the type hints of this function
https://github.com/pytorch/ignite/blob/ca738d8f3f106093aa04b6bce9506129a1059df8/ignite/engine/events.py#L81
this really should read
` def wrapper(engine, event: int) -> bool:`
| [
{
"content": "\nfrom typing import Callable, Optional, Union, Any\n\nfrom enum import Enum\nimport numbers\nimport weakref\n\nfrom ignite.engine.utils import _check_signature\n\n\n__all__ = [\n 'Events',\n 'State'\n]\n\n\nclass EventWithFilter:\n\n def __init__(self, event: Any, filter: Callable):\n ... | [
{
"content": "\nfrom typing import Callable, Optional, Union, Any\n\nfrom enum import Enum\nimport numbers\nimport weakref\n\nfrom ignite.engine.utils import _check_signature\n\n\n__all__ = [\n 'Events',\n 'State'\n]\n\n\nclass EventWithFilter:\n\n def __init__(self, event: Any, filter: Callable):\n ... | diff --git a/ignite/engine/events.py b/ignite/engine/events.py
index 74c8951ec8af..65ce2fabb27c 100644
--- a/ignite/engine/events.py
+++ b/ignite/engine/events.py
@@ -77,7 +77,7 @@ def __call__(self, event_filter: Optional[Callable] = None,
@staticmethod
def every_event_filter(every: int) -> Callable:
- ... |
LMFDB__lmfdb-4407 | Server errors in whitelist check
The URL https://www.lmfdb.org/L/1 generates the following server error in the white_listed function in app.py
```
Exception on /L/1 [GET]
Traceback (most recent call last):
File "/home/sage/sage-9.2/local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
respo... | [
{
"content": "\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nimport os\nfrom socket import gethostname\nimport time\nimport six\nfrom urllib.parse import urlparse, urlunparse\n\nfrom flask import (Flask, g, render_template, request, make_response,\n redirect, url_for, curre... | [
{
"content": "\n# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import\nimport os\nfrom socket import gethostname\nimport time\nimport six\nfrom urllib.parse import urlparse, urlunparse\n\nfrom flask import (Flask, g, render_template, request, make_response,\n redirect, url_for, curre... | diff --git a/lmfdb/app.py b/lmfdb/app.py
index 0cae7a623a..284a865921 100644
--- a/lmfdb/app.py
+++ b/lmfdb/app.py
@@ -761,7 +761,7 @@ def white_listed(url):
elif url[:2] == "L/":
# if the origin is allowed
# or if it is a L-function with a label
- return white_listed(url[1:]) or url[3].is... |
pytorch__vision-2518 | Resize sometimes fails
https://github.com/pytorch/vision/blob/300ef76d3b6e9c33c58cd124e5f5514a927cadf1/torchvision/transforms/functional_tensor.py#L589
The specific line above will sometimes cause the image to be returned unresized with no warning even when an explicit size (h,w) is given. This will also cause probl... | [
{
"content": "import warnings\nfrom typing import Optional\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn.functional import affine_grid, grid_sample\nfrom torch.jit.annotations import List, BroadcastingList2\n\n\ndef _is_tensor_a_torch_image(x: Tensor) -> bool:\n return x.ndim >= 2\n\n\ndef _get_im... | [
{
"content": "import warnings\nfrom typing import Optional\n\nimport torch\nfrom torch import Tensor\nfrom torch.nn.functional import affine_grid, grid_sample\nfrom torch.jit.annotations import List, BroadcastingList2\n\n\ndef _is_tensor_a_torch_image(x: Tensor) -> bool:\n return x.ndim >= 2\n\n\ndef _get_im... | diff --git a/test/test_functional_tensor.py b/test/test_functional_tensor.py
index 2e3477ad12b..d01a357d7b5 100644
--- a/test/test_functional_tensor.py
+++ b/test/test_functional_tensor.py
@@ -337,7 +337,7 @@ def test_resize(self):
if dt is not None:
# This is a trivial cast to float of ui... |
redis__redis-py-2674 | Canceling async Redis command leaves connection open, in unsafe state for future commands
**Version**: 4.5.3
**Platform**: Python 3.8 on Ubuntu / Generic
**Description**: Canceling async Redis command leaves connection open, in unsafe state for future commands
This is a reincarnation of #2624, which was clo... | [
{
"content": "#!/usr/bin/env python\nfrom setuptools import find_packages, setup\n\nsetup(\n name=\"redis\",\n description=\"Python client for Redis database and key-value store\",\n long_description=open(\"README.md\").read().strip(),\n long_description_content_type=\"text/markdown\",\n keywords... | [
{
"content": "#!/usr/bin/env python\nfrom setuptools import find_packages, setup\n\nsetup(\n name=\"redis\",\n description=\"Python client for Redis database and key-value store\",\n long_description=open(\"README.md\").read().strip(),\n long_description_content_type=\"text/markdown\",\n keywords... | diff --git a/setup.py b/setup.py
index 3b7347da03..c23038cba7 100644
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@
long_description_content_type="text/markdown",
keywords=["Redis", "key-value store", "database"],
license="MIT",
- version="4.5.3",
+ version="4.5.4",
packages=find_packages(
... |
buildbot__buildbot-6680 | p4port is not renderable
Hello,
I'm trying to override p4port per-client. I need this because we want some workers to connect to a local perforce proxy but still use the actual perforce server by default.
Basically something like this:
```
P4PORT = 'perforce.company.com:1666'
P4PORT_PROXY = 'proxy.lan:1666'
... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | [
{
"content": "# This file is part of Buildbot. Buildbot is free software: you can\n# redistribute it and/or modify it under the terms of the GNU General Public\n# License as published by the Free Software Foundation, version 2.\n#\n# This program is distributed in the hope that it will be useful, but WITHOUT\n... | diff --git a/master/buildbot/steps/source/p4.py b/master/buildbot/steps/source/p4.py
index 8aa679e7069d..0d37f1582969 100644
--- a/master/buildbot/steps/source/p4.py
+++ b/master/buildbot/steps/source/p4.py
@@ -45,7 +45,7 @@ class P4(Source):
name = 'p4'
- renderables = ['mode', 'p4base', 'p4client', 'p4vie... |
urllib3__urllib3-1017 | Multipart request headers do not work properly for values of empty string
Continuing the discussion from https://github.com/sigmavirus24/requests-toolbelt/issues/162, attempting to create a `RequestField` which is then made multipart via `make_multipart` does not work properly if the filename given is an empty string.
... | [
{
"content": "from __future__ import absolute_import\nimport email.utils\nimport mimetypes\n\nfrom .packages import six\n\n\ndef guess_content_type(filename, default='application/octet-stream'):\n \"\"\"\n Guess the \"Content-Type\" of a file.\n\n :param filename:\n The filename to guess the \"C... | [
{
"content": "from __future__ import absolute_import\nimport email.utils\nimport mimetypes\n\nfrom .packages import six\n\n\ndef guess_content_type(filename, default='application/octet-stream'):\n \"\"\"\n Guess the \"Content-Type\" of a file.\n\n :param filename:\n The filename to guess the \"C... | diff --git a/test/test_fields.py b/test/test_fields.py
index 21b44819da..27dad92e64 100644
--- a/test/test_fields.py
+++ b/test/test_fields.py
@@ -36,6 +36,15 @@ def test_make_multipart(self):
'Content-Location: /test\r\n'
'\r\n')
+ def test_make_multipart_empty_filename(self):
+ f... |
RocketMap__RocketMap-2240 | If path includes non-ASCII character, several things break (eg icon display)
if the installation path includes a non-ASCII character, the function to deliver the icons/sprites/images fails.
## Expected Behavior
path should work independently of non-ASCII characters
## Current Behavior
no images get displayed
... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport logging\nimport time\nimport re\nimport ssl\nimport json\n\nfrom distutils.version import StrictVersion\n\nfrom threading import Thread, Event\nfrom queue import Queue\nfrom flask_cors import CORS\nfrom flask_cache_bus... | [
{
"content": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nimport os\nimport sys\nimport logging\nimport time\nimport re\nimport ssl\nimport json\n\nfrom distutils.version import StrictVersion\n\nfrom threading import Thread, Event\nfrom queue import Queue\nfrom flask_cors import CORS\nfrom flask_cache_bus... | diff --git a/runserver.py b/runserver.py
index fffd4be055..9d90e747ee 100755
--- a/runserver.py
+++ b/runserver.py
@@ -258,7 +258,7 @@ def main():
app = None
if not args.no_server and not args.clear_db:
- app = Pogom(__name__)
+ app = Pogom(__name__, root_path=os.path.dirname(__file__))
... |
biopython__biopython-4399 | 682i.cif fails on parse of resolution to structure header
### Setup
I am reporting a problem with Biopython 1.77, Python 3.8.3 (anaconda July 2020) , and CentOS 7 as follows:
```(base) [mothcw@localhost biopython]$ python
Python 3.8.3 (default, Jul 2 2020, 16:21:59)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Typ... | [
{
"content": "# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n\n\"\"\"mmCIF parsers.\"\"\"\n\n\nimport numpy as np\nimport warn... | [
{
"content": "# Copyright (C) 2002, Thomas Hamelryck (thamelry@binf.ku.dk)\n# This code is part of the Biopython distribution and governed by its\n# license. Please see the LICENSE file that should have been included\n# as part of this package.\n\n\"\"\"mmCIF parsers.\"\"\"\n\n\nimport numpy as np\nimport warn... | diff --git a/Bio/PDB/MMCIFParser.py b/Bio/PDB/MMCIFParser.py
index c98388119fb..2cab625057a 100644
--- a/Bio/PDB/MMCIFParser.py
+++ b/Bio/PDB/MMCIFParser.py
@@ -93,7 +93,7 @@ def _update_header_entry(self, target_key, keys):
item = val[0]
except (TypeError, IndexError):
co... |
huggingface__transformers-13493 | Handling tag with no prefix for aggregation_strategy in TokenClassificationPipeline
# 🚀 Feature request
Previously the parameter grouped_entities would handle entity with no prefix (like "PER" instead of "B-PER") and would correctly group similar entities next to each others. With the new parameter aggregation_str... | [
{
"content": "import warnings\nfrom typing import TYPE_CHECKING, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom ..file_utils import ExplicitEnum, add_end_docstrings, is_tf_available, is_torch_available\nfrom ..modelcard import ModelCard\nfrom ..models.bert.tokenization_bert import BasicTokenizer\nfr... | [
{
"content": "import warnings\nfrom typing import TYPE_CHECKING, List, Optional, Tuple, Union\n\nimport numpy as np\n\nfrom ..file_utils import ExplicitEnum, add_end_docstrings, is_tf_available, is_torch_available\nfrom ..modelcard import ModelCard\nfrom ..models.bert.tokenization_bert import BasicTokenizer\nfr... | diff --git a/src/transformers/pipelines/token_classification.py b/src/transformers/pipelines/token_classification.py
index 6fc1de1dcb38..4a7bbeb77f7a 100644
--- a/src/transformers/pipelines/token_classification.py
+++ b/src/transformers/pipelines/token_classification.py
@@ -411,7 +411,8 @@ def get_tag(self, entity_name... |
pyca__cryptography-2436 | Add __repr__ for x509.Extensions
x509.Extensions should have a **repr**
| [
{
"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\nimport hashlib\nimport ipaddress\... | [
{
"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\nimport hashlib\nimport ipaddress\... | diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py
index cd75ecdc255e..46ba5a28dd56 100644
--- a/src/cryptography/x509/extensions.py
+++ b/src/cryptography/x509/extensions.py
@@ -104,6 +104,11 @@ def __iter__(self):
def __len__(self):
return len(self._extensions)
+ ... |
ckan__ckan-7808 | [Snyk] Security upgrade certifi from 2021.10.8 to 2023.7.22
<p>This PR was automatically created by Snyk using the credentials of a real user.</p><br /><h3>Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.</h3>
#### Changes included in this PR
- Changes to th... | [
{
"content": "#!/usr/bin/env python\n# encoding: utf-8\n\nu'''\nAsynchronous background jobs.\n\nNote that most job management functions are not available from this\nmodule but via the various ``job_*`` API functions.\n\nInternally, RQ queue names are prefixed with a string containing the\nCKAN site ID to avoid... | [
{
"content": "#!/usr/bin/env python\n# encoding: utf-8\n\nu'''\nAsynchronous background jobs.\n\nNote that most job management functions are not available from this\nmodule but via the various ``job_*`` API functions.\n\nInternally, RQ queue names are prefixed with a string containing the\nCKAN site ID to avoid... | diff --git a/changes/7808.misc b/changes/7808.misc
new file mode 100644
index 00000000000..07793606004
--- /dev/null
+++ b/changes/7808.misc
@@ -0,0 +1 @@
+Because of a new version of Sphinx, the command to rebuild the documentation is now ``sphinx-build doc build/sphinx``
diff --git a/ckan/lib/jobs.py b/ckan/lib/jobs.... |
python-poetry__poetry-1577 | poetry v1.0.0b4 breaks on zip packages
<!-- Checked checkbox should look like this: [x] -->
- [x] I am on the [latest](https://github.com/sdispater/poetry/releases/latest) Poetry version.
- [x] I have searched the [issues](https://github.com/sdispater/poetry/issues) of this repo and believe that this is not a duplica... | [
{
"content": "from importlib_metadata import distributions\nfrom poetry.packages import Package\nfrom poetry.utils._compat import Path\nfrom poetry.utils.env import Env\n\nfrom .repository import Repository\n\n\nclass InstalledRepository(Repository):\n @classmethod\n def load(cls, env): # type: (Env) -> ... | [
{
"content": "from importlib_metadata import distributions\nfrom poetry.packages import Package\nfrom poetry.utils._compat import Path\nfrom poetry.utils.env import Env\n\nfrom .repository import Repository\n\n\nclass InstalledRepository(Repository):\n @classmethod\n def load(cls, env): # type: (Env) -> ... | diff --git a/.gitignore b/.gitignore
index b0c49d1474d..c2d2a72090e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@
# Packages
*.egg
+!/tests/**/*.egg
/*.egg-info
/tests/fixtures/**/*.egg-info
/dist/*
diff --git a/poetry/repositories/installed_repository.py b/poetry/repositories/installed_repository.py
... |
streamlink__streamlink-5023 | plugins.vtvgo: '403 Client Error: Forbidden for url: ...'
### Checklist
- [X] This is a plugin issue and not a different kind of issue
- [X] [I have read the contribution guidelines](https://github.com/streamlink/streamlink/blob/master/CONTRIBUTING.md#contributing-to-streamlink)
- [X] [I have checked the list of open ... | [
{
"content": "\"\"\"\n$description Live TV channels from VTV, a Vietnamese public, state-owned broadcaster.\n$url vtvgo.vn\n$type live\n\"\"\"\n\nimport logging\nimport re\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream.hls import HLSStr... | [
{
"content": "\"\"\"\n$description Live TV channels from VTV, a Vietnamese public, state-owned broadcaster.\n$url vtvgo.vn\n$type live\n\"\"\"\n\nimport logging\nimport re\n\nfrom streamlink.plugin import Plugin, pluginmatcher\nfrom streamlink.plugin.api import validate\nfrom streamlink.stream.hls import HLSStr... | diff --git a/src/streamlink/plugins/vtvgo.py b/src/streamlink/plugins/vtvgo.py
index 160a82eadb4..143295d544c 100644
--- a/src/streamlink/plugins/vtvgo.py
+++ b/src/streamlink/plugins/vtvgo.py
@@ -27,6 +27,7 @@ def _get_streams(self):
self.session.http.headers.update({
"Origin": "https://vtvgo.vn"... |
opendatacube__datacube-core-969 | "datacube system init" fails when postgres user includes hyphen
### Expected behaviour
Running `datacube system init` should init the postgres database, even if the postgres username includes a hyphen.
### Actual behaviour
The init fails, causing issues with the sqlalchemy/psycopg2 driver. It looks like it's passi... | [
{
"content": "# coding=utf-8\n\"\"\"\nCore SQL schema settings.\n\"\"\"\n\nimport logging\n\nfrom sqlalchemy import MetaData\nfrom sqlalchemy.engine import Engine\nfrom sqlalchemy.schema import CreateSchema\n\nfrom datacube.drivers.postgres.sql import TYPES_INIT_SQL, pg_exists, pg_column_exists, escape_pg_ident... | [
{
"content": "# coding=utf-8\n\"\"\"\nCore SQL schema settings.\n\"\"\"\n\nimport logging\n\nfrom sqlalchemy import MetaData\nfrom sqlalchemy.engine import Engine\nfrom sqlalchemy.schema import CreateSchema\n\nfrom datacube.drivers.postgres.sql import TYPES_INIT_SQL, pg_exists, pg_column_exists, escape_pg_ident... | diff --git a/datacube/drivers/postgres/_core.py b/datacube/drivers/postgres/_core.py
index bef0164447..7594409149 100644
--- a/datacube/drivers/postgres/_core.py
+++ b/datacube/drivers/postgres/_core.py
@@ -85,7 +85,7 @@ def ensure_db(engine, with_permissions=True):
raise
finally:
if ... |
pypi__warehouse-3928 | Missing legacy redirection from pypi.python.org/pypi/
**Describe the bug**
Redirections from `https://pypi.python.org/pypi/` are not handled (only redirected to `https://pypi.org/pypi/` by varnish (fastly)).
As https://pypi.org/pypi/ does not exists, it creates some broken links.
**Expected behavior**
A 301 to ... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | [
{
"content": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, softw... | diff --git a/tests/unit/test_routes.py b/tests/unit/test_routes.py
index c7cac6878c54..14dfc2223236 100644
--- a/tests/unit/test_routes.py
+++ b/tests/unit/test_routes.py
@@ -292,6 +292,7 @@ def add_policy(name, filename):
"/project/{name}/{version}/",
domain=warehouse,
),
+ pr... |
StackStorm__st2-3408 | st2kv does not resolve in Jinja cast expression
In the rule:
` {{ "2" | int }} - 2` Dah
`{{ trigger.count | int }} -> 2` OK
`{{ st2kv.system.count | int }} -> 0` Wrong.
| [
{
"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li... | [
{
"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"Li... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 0a0c16f8bd..43cc9922dd 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -61,6 +61,7 @@ in development
* ``st2 role-assignment get <role assignment id>``
* Update ``/v1/rbac/roles`` API endpoint so it includes corresponding permission grant objects.
Previously i... |
PaddlePaddle__PaddleDetection-8421 | 训练出现长警告
### 问题确认 Search before asking
- [X] 我已经查询[历史issue](https://github.com/PaddlePaddle/PaddleDetection/issues),没有发现相似的bug。I have searched the [issues](https://github.com/PaddlePaddle/PaddleDetection/issues) and found no similar bug report.
### Bug组件 Bug Component
_No response_
### Bug描述 Describe the Bug
训练出现长... | [
{
"content": "# Copyright (c) 2019 PaddlePaddle 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.... | [
{
"content": "# Copyright (c) 2019 PaddlePaddle 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.... | diff --git a/ppdet/utils/stats.py b/ppdet/utils/stats.py
index 4cd36d91cf8..c070e6544ed 100644
--- a/ppdet/utils/stats.py
+++ b/ppdet/utils/stats.py
@@ -74,7 +74,7 @@ def update(self, stats):
for k in stats.keys()
}
for k, v in self.meters.items():
- v.update(stats[k].n... |
googleapis__python-bigquery-942 | chore: update system tests and samples to use and `@google.com` email address
Re: https://github.com/googleapis/python-bigquery/pull/935#issuecomment-911791623
It may be some time before we can reconfigure our test project(s) to allow permissions for non-google.com folks.
I propose we use `cloud-developer-relatio... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# https://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/samples/update_dataset_access.py b/samples/update_dataset_access.py
index 6e844cc90..a5c2670e7 100644
--- a/samples/update_dataset_access.py
+++ b/samples/update_dataset_access.py
@@ -28,8 +28,8 @@ def update_dataset_access(dataset_id):
entry = bigquery.AccessEntry(
role="READER",
- ... |
django-json-api__django-rest-framework-json-api-908 | Django 3.2 compatibility
Django 3.2 is now out, but we are currently blocked on upgrading to it due to djangorestframework-jsonapi specifically disallows that and newer versions as dependencies:
https://github.com/django-json-api/django-rest-framework-json-api/blob/0892e3a8a4dbad9630d70e2b78e18b242a8b057d/setup.py#L10... | [
{
"content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {\"bdist_wheel\"}.intersection(sys.argv)\nwheel = [\"wheel\"] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from path... | [
{
"content": "#!/usr/bin/env python\nfrom __future__ import print_function\n\nimport os\nimport re\nimport sys\n\nfrom setuptools import setup\n\nneeds_wheel = {\"bdist_wheel\"}.intersection(sys.argv)\nwheel = [\"wheel\"] if needs_wheel else []\n\n\ndef read(*paths):\n \"\"\"\n Build a file path from path... | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index e3e786ae..a48a7915 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9"]
- django: ["2.2", "3.0", ... |
rasterio__rasterio-598 | rio warp null transformer error with bad proj4
Currently, if you pass a bad projection, you get the following behavior:
```
$ rio warp --dst-crs "+proj=foobar" tests/data/warp_test.tif /tmp/foo.tif
ERROR:GDAL:CPLE_NotSupported in Failed to initialize PROJ.4 with `+proj=foobar +wktext'.
Traceback (most recent call last... | [
{
"content": "\"\"\"A module of errors.\"\"\"\n\nfrom click import FileError\n\n\nclass RasterioIOError(IOError):\n \"\"\"A failure to open a dataset using the presently registered drivers.\"\"\"\n\n\nclass RasterioDriverRegistrationError(ValueError):\n \"\"\"To be raised when, eg, _gdal.GDALGetDriverByNa... | [
{
"content": "\"\"\"A module of errors.\"\"\"\n\nfrom click import FileError\n\n\nclass RasterioIOError(IOError):\n \"\"\"A failure to open a dataset using the presently registered drivers.\"\"\"\n\n\nclass DriverRegistrationError(ValueError):\n \"\"\"To be raised when, eg, _gdal.GDALGetDriverByName(\"MEM... | diff --git a/rasterio/_io.pyx b/rasterio/_io.pyx
index d4ada0fbc..1b5b2e7d8 100644
--- a/rasterio/_io.pyx
+++ b/rasterio/_io.pyx
@@ -20,7 +20,7 @@ from rasterio._drivers import driver_count, GDALEnv
from rasterio._err import cpl_errs, GDALError
from rasterio import dtypes
from rasterio.coords import BoundingBox
-fro... |
mozilla__bugbug-3850 | Optimize the `bug_to_types()` functions to avoid redundant the execution of string lowering
The `bug["whiteboard"].lower()` statement is performed multiple times in the function. Instead, we could store the lowercase value in a variable (e.g., `bug_whiteboard`) and reuse it where needed.
Examples:
https://github.... | [
{
"content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport logging\nfrom typing import Iterable, Optional\n\nimport numpy... | [
{
"content": "# -*- coding: utf-8 -*-\n# This Source Code Form is subject to the terms of the Mozilla Public\n# License, v. 2.0. If a copy of the MPL was not distributed with this file,\n# You can obtain one at http://mozilla.org/MPL/2.0/.\n\nimport logging\nfrom typing import Iterable, Optional\n\nimport numpy... | diff --git a/bugbug/models/bugtype.py b/bugbug/models/bugtype.py
index 858ad7d785..71fc1a6afb 100644
--- a/bugbug/models/bugtype.py
+++ b/bugbug/models/bugtype.py
@@ -62,7 +62,7 @@ def bug_to_types(
types.add("performance")
if any(
- f"[{whiteboard_text}" in bug["whiteboard"].lower()
+ f"[... |
mirumee__ariadne-232 | Update GraphQL Core Next & Starlette
Issue for me to remember to update our core dependencies to latest versions before release.
| [
{
"content": "#! /usr/bin/env python\nimport os\nfrom setuptools import setup\n\nCLASSIFIERS = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\... | [
{
"content": "#! /usr/bin/env python\nimport os\nfrom setuptools import setup\n\nCLASSIFIERS = [\n \"Development Status :: 4 - Beta\",\n \"Intended Audience :: Developers\",\n \"License :: OSI Approved :: BSD License\",\n \"Operating System :: OS Independent\",\n \"Programming Language :: Python\... | diff --git a/requirements-dev.txt b/requirements-dev.txt
index eb710e433..0b76cfa33 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -7,40 +7,48 @@
appdirs==1.4.3 # via black
astroid==2.2.5 # via pylint
atomicwrites==1.3.0 # via pytest
-attrs==19.1.0 # via black... |
fonttools__fonttools-337 | I find the font's line height is bigger than original font.
I have tried pyftsubset with command line option --no-recalc-bounds ,
but the generated subfont's line height is still bigger than original font.
I used html font-face render font.
@font-face {
font-family: 'freetype';
src: url('font... | [
{
"content": "from __future__ import print_function, division, absolute_import\nfrom fontTools.misc.py23 import *\nfrom fontTools.misc import sstruct\nfrom fontTools.misc.textTools import safeEval\nfrom . import DefaultTable\n\nvheaFormat = \"\"\"\n\t\t>\t# big endian\n\t\ttableVersion:\t\t16.16F\n\t\tascent:\t... | [
{
"content": "from __future__ import print_function, division, absolute_import\nfrom fontTools.misc.py23 import *\nfrom fontTools.misc import sstruct\nfrom fontTools.misc.textTools import safeEval\nfrom . import DefaultTable\n\nvheaFormat = \"\"\"\n\t\t>\t# big endian\n\t\ttableVersion:\t\t16.16F\n\t\tascent:\t... | diff --git a/Lib/fontTools/ttLib/tables/_v_h_e_a.py b/Lib/fontTools/ttLib/tables/_v_h_e_a.py
index 79f4d7637e..d8dfc0a6af 100644
--- a/Lib/fontTools/ttLib/tables/_v_h_e_a.py
+++ b/Lib/fontTools/ttLib/tables/_v_h_e_a.py
@@ -35,7 +35,8 @@ def decompile(self, data, ttFont):
sstruct.unpack(vheaFormat, data, self)
de... |
coala__coala-bears-1082 | GofmtBear: Add advanced asciinema
The coala bear GofmtBear does not have a proper asciinema.
`gofmt` is a command line tool that automatically solves formatting / styling issues to the absolute coding style that Go has.
I'm planning to use a working code as the sample where it's filled with mixed indentation (spa... | [
{
"content": "from coalib.bearlib.abstractions.Linter import linter\nfrom coalib.bears.requirements.GoRequirement import GoRequirement\n\n\n@linter(executable='gofmt',\n use_stdin=True,\n output_format='corrected',\n result_message='Formatting can be improved.')\nclass GofmtBear:\n \"\"\... | [
{
"content": "from coalib.bearlib.abstractions.Linter import linter\nfrom coalib.bears.requirements.GoRequirement import GoRequirement\n\n\n@linter(executable='gofmt',\n use_stdin=True,\n output_format='corrected',\n result_message='Formatting can be improved.')\nclass GofmtBear:\n \"\"\... | diff --git a/bears/go/GofmtBear.py b/bears/go/GofmtBear.py
index bdf3b589dc..f385d562ac 100644
--- a/bears/go/GofmtBear.py
+++ b/bears/go/GofmtBear.py
@@ -20,6 +20,7 @@ class GofmtBear:
AUTHORS_EMAILS = {'coala-devel@googlegroups.com'}
LICENSE = 'AGPL-3.0'
CAN_FIX = {'Formatting'}
+ ASCIINEMA_URL = 'h... |
getsentry__sentry-1340 | do we really need 'redis>=2.7.0,<2.9.0' ?
Hi
Recently I was trying to use sentry with [django-redis](https://github.com/niwibe/django-redis) as a cache backend and this can't be (easily) done with current versions of both django-redis and sentry since django-redis has a restriction for [redis>=2.10.0](https://github.c... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nSentry\n======\n\nSentry is a realtime event logging and aggregation platform. It specializes\nin monitoring errors and extracting all the information needed to do a proper\npost-mortem without any of the hassle of the standard user feedback loop.\n\nSentry is a Serv... | [
{
"content": "#!/usr/bin/env python\n\"\"\"\nSentry\n======\n\nSentry is a realtime event logging and aggregation platform. It specializes\nin monitoring errors and extracting all the information needed to do a proper\npost-mortem without any of the hassle of the standard user feedback loop.\n\nSentry is a Serv... | diff --git a/setup.py b/setup.py
index cddf1334767824..90584c634a635e 100755
--- a/setup.py
+++ b/setup.py
@@ -92,7 +92,7 @@
'python-dateutil>=1.5.0,<2.0.0',
'python-memcached>=1.53,<2.0.0',
'raven>=5.0.0',
- 'redis>=2.7.0,<2.9.0',
+ 'redis>=2.7.0,<2.11.0',
'simplejson>=3.1.0,<3.4.0',
'si... |
getnikola__nikola-3762 | nikola auto: "AttributeError: 'FileOpenedEvent' object has no attribute '_src_path'. Did you mean: 'src_path'?"
<!--
Before creating an issue:
* make sure you are using an up-to-date version of Nikola
* search for existing issues that might be related
Make sure to:
* provide information about your environment (b... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2024 Chris Warrick, Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restrictio... | [
{
"content": "# -*- coding: utf-8 -*-\n\n# Copyright © 2012-2024 Chris Warrick, Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restrictio... | diff --git a/nikola/plugins/command/auto/__init__.py b/nikola/plugins/command/auto/__init__.py
index a3e0d1bb34..f05dbcf19e 100644
--- a/nikola/plugins/command/auto/__init__.py
+++ b/nikola/plugins/command/auto/__init__.py
@@ -620,5 +620,5 @@ def __init__(self, configuration_filename, function, loop):
def dispat... |
nilearn__nilearn-3201 | get_cluster_table returns inconsistent result depending on `cluster_threshold`
<!--Provide a brief description of the bug.-->
<!--Please fill in the following information, to the best of your ability.-->
Nilearn version: 0.9.0
### Expected behavior
The example below should return identical information for the... | [
{
"content": "\"\"\"\nPreprocessing functions for images.\n\nSee also nilearn.signal.\n\"\"\"\n# Authors: Philippe Gervais, Alexandre Abraham\n# License: simplified BSD\n\nimport collections.abc\nimport copy\nimport warnings\n\nimport nibabel\nimport numpy as np\nfrom joblib import Parallel, delayed\nfrom scipy... | [
{
"content": "\"\"\"\nPreprocessing functions for images.\n\nSee also nilearn.signal.\n\"\"\"\n# Authors: Philippe Gervais, Alexandre Abraham\n# License: simplified BSD\n\nimport collections.abc\nimport copy\nimport warnings\n\nimport nibabel\nimport numpy as np\nfrom joblib import Parallel, delayed\nfrom scipy... | diff --git a/doc/changes/latest.rst b/doc/changes/latest.rst
index 2be686b36c..8dbda80dcc 100644
--- a/doc/changes/latest.rst
+++ b/doc/changes/latest.rst
@@ -16,6 +16,7 @@ Fixes
- Fix function :func:`~mass_univariate.permuted_ols`, which was only returning the null distribution (``h0_fmax``) for the first regressor (... |
apluslms__a-plus-204 | Numbers should be safe characters in file names
If the attachment for the "Exercise with attachment" is named for example "2.zip", the name for that file will be just ".zip" in the database because numbers are not considered as safe characters:
https://github.com/Aalto-LeTech/a-plus/blob/a86bf/lib/helpers.py#L62
| [
{
"content": "from django.conf import settings\nfrom random import choice\nfrom PIL import Image\nimport string\nimport urllib\n\n\ndef extract_form_errors(form):\n \"\"\"\n Extracts Django form errors to a list of error messages.\n \"\"\"\n errors = []\n for field in form.errors:\n for er... | [
{
"content": "from django.conf import settings\nfrom random import choice\nfrom PIL import Image\nimport string\nimport urllib\n\n\ndef extract_form_errors(form):\n \"\"\"\n Extracts Django form errors to a list of error messages.\n \"\"\"\n errors = []\n for field in form.errors:\n for er... | diff --git a/lib/helpers.py b/lib/helpers.py
index 46744cf69..3384084ae 100644
--- a/lib/helpers.py
+++ b/lib/helpers.py
@@ -59,7 +59,7 @@ def has_same_domain(url1, url2):
return uri1.netloc == uri2.netloc
-FILENAME_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ._-"
+FILENAME_CHARS = "abcdefghij... |
conda__conda-2896 | conda throws error if allow_other_channels setting is used
The feature to lock down what channels your users are allowed to use stopped working
http://conda.pydata.org/docs/install/central.html#allow-other-channels-allow-other-channels
Reproduced this error in Windows 10 and OS X 10.11.5, if you use this setting in th... | [
{
"content": "# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import print_function, division, absolute_import\... | [
{
"content": "# (c) 2012-2015 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\nfrom __future__ import print_function, division, absolute_import\... | diff --git a/conda/config.py b/conda/config.py
index 038f2972e16..9e1405b036d 100644
--- a/conda/config.py
+++ b/conda/config.py
@@ -194,7 +194,7 @@ def get_default_urls(merged=False):
return defaults_
def get_rc_urls():
- if rc.get('channels') is None:
+ if rc is None or rc.get('channels') is None:
... |
zigpy__zha-device-handlers-184 | Philips Remote DIM_DOWN typo?
https://github.com/dmulcahey/zha-device-handlers/blob/833ee24710496d317a03b0f0b9f61df31291d75b/zhaquirks/philips/rwl021.py#L137
It seems that it should be:
`ARGS: [1, 30, 9],`
| [
{
"content": "\"\"\"Phillips RWL021 device.\"\"\"\nfrom zigpy.profiles import zha, zll\nfrom zigpy.quirks import CustomCluster, CustomDevice\nimport zigpy.types as t\nfrom zigpy.zcl.clusters.general import (\n Basic,\n BinaryInput,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n ... | [
{
"content": "\"\"\"Phillips RWL021 device.\"\"\"\nfrom zigpy.profiles import zha, zll\nfrom zigpy.quirks import CustomCluster, CustomDevice\nimport zigpy.types as t\nfrom zigpy.zcl.clusters.general import (\n Basic,\n BinaryInput,\n Groups,\n Identify,\n LevelControl,\n OnOff,\n Ota,\n ... | diff --git a/zhaquirks/philips/rwl021.py b/zhaquirks/philips/rwl021.py
index 32297f7133..2c18700483 100644
--- a/zhaquirks/philips/rwl021.py
+++ b/zhaquirks/philips/rwl021.py
@@ -134,7 +134,7 @@ class PhilipsRWL021(CustomDevice):
COMMAND: COMMAND_STEP,
CLUSTER_ID: 8,
ENDPOINT_ID: ... |
googleapis__python-bigquery-859 | Increase default timeout of retry objects to 10 minutes
Per internal issue 195337762, the general timeout for jobs.insert API is 4 minutes. We should increase our default deadline to 10 minutes to allow for at least 1 retry if the first request fails.
| [
{
"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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | [
{
"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# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicabl... | diff --git a/google/cloud/bigquery/retry.py b/google/cloud/bigquery/retry.py
index 2df4de08b..bab28aacb 100644
--- a/google/cloud/bigquery/retry.py
+++ b/google/cloud/bigquery/retry.py
@@ -47,7 +47,7 @@ def _should_retry(exc):
return reason in _RETRYABLE_REASONS
-DEFAULT_RETRY = retry.Retry(predicate=_should_r... |
mitmproxy__mitmproxy-4179 | TypeError: Subscripted generics cannot be used with class and instance checks under python 3.9.0b1
#### Problem Description
Running mitmproxy 5.1.1 under python 3.9.0b1 fails with `TypeError: Subscripted generics cannot be used with class and instance checks`. The test suite fails as well with hundreds of ERROR and FA... | [
{
"content": "import typing\n\nType = typing.Union[\n typing.Any # anything more elaborate really fails with mypy at the moment.\n]\n\n\ndef sequence_type(typeinfo: typing.Type[typing.List]) -> Type:\n \"\"\"Return the type of a sequence, e.g. typing.List\"\"\"\n return typeinfo.__args__[0] # type: i... | [
{
"content": "import typing\n\nType = typing.Union[\n typing.Any # anything more elaborate really fails with mypy at the moment.\n]\n\n\ndef sequence_type(typeinfo: typing.Type[typing.List]) -> Type:\n \"\"\"Return the type of a sequence, e.g. typing.List\"\"\"\n return typeinfo.__args__[0] # type: i... | diff --git a/mitmproxy/utils/typecheck.py b/mitmproxy/utils/typecheck.py
index b2793e4708..78537cc29b 100644
--- a/mitmproxy/utils/typecheck.py
+++ b/mitmproxy/utils/typecheck.py
@@ -39,7 +39,7 @@ def check_option_type(name: str, value: typing.Any, typeinfo: Type) -> None:
typename = str(typeinfo)
- if type... |
cython__cython-5505 | [BUG] `cython` command prints stdout-type information to stderr
### Describe the bug
As reported on the mailing list, the `cython` command prints things to stderr that should go to stdout.
### Code to reproduce the behaviour:
```python
>>> from subprocess import run
>>> res = run("cython --version", capture_output... | [
{
"content": "#\n# Cython Top Level\n#\n\nfrom __future__ import absolute_import, print_function\n\nimport os\nimport re\nimport sys\nimport io\n\nif sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 3):\n sys.stderr.write(\"Sorry, Cython requires Python 2.7 or 3.3+, found %d.%d\\n\" % ... | [
{
"content": "#\n# Cython Top Level\n#\n\nfrom __future__ import absolute_import, print_function\n\nimport os\nimport re\nimport sys\nimport io\n\nif sys.version_info[:2] < (2, 7) or (3, 0) <= sys.version_info[:2] < (3, 3):\n sys.stderr.write(\"Sorry, Cython requires Python 2.7 or 3.3+, found %d.%d\\n\" % ... | diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py
index a03f16c48e3..a5d1c7d5728 100644
--- a/Cython/Compiler/Main.py
+++ b/Cython/Compiler/Main.py
@@ -773,7 +773,7 @@ def main(command_line = 0):
if options.show_version:
from .. import __version__
- sys.stderr.write("Cython version %... |
hpcaitech__ColossalAI-5321 | [tensor] fix some unittests
[tensor] fix some unittests
[tensor] fix some unittests
| [
{
"content": "#!/usr/bin/env python\n\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, Union\n\nimport torch\nimport torch.distributed as dist\n\nfrom .base_accelerator import BaseAccelerator\n\ntry:\n import torch_npu # noqa\nexcept ImportError:\n pass\n\n\n__all__ = [\"NpuAccelerator\"]\... | [
{
"content": "#!/usr/bin/env python\n\nfrom typing import Any, Callable, Dict, List, Optional, Tuple, Union\n\nimport torch\nimport torch.distributed as dist\n\nfrom .base_accelerator import BaseAccelerator\n\ntry:\n import torch_npu # noqa\nexcept ImportError:\n pass\n\n\n__all__ = [\"NpuAccelerator\"]\... | diff --git a/colossalai/accelerator/npu_accelerator.py b/colossalai/accelerator/npu_accelerator.py
index 1a86f84cb2d4..b28492968eeb 100644
--- a/colossalai/accelerator/npu_accelerator.py
+++ b/colossalai/accelerator/npu_accelerator.py
@@ -31,7 +31,7 @@ def get_version(self) -> str:
"""
Return the vers... |
bookwyrm-social__bookwyrm-1410 | Unable to post review in Safari on iPadOS
**Describe the bug**
When trying to post a long-ish review in Safari on iPadOS (desktop mode, content blockers disabled), the post button shows the spinner introduced with #1388, but the posting never concludes.
**To Reproduce**
Steps to reproduce the behavior:
1. Get an iPad ... | [
{
"content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.0.1\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGUAGE = env(\"DEFA... | [
{
"content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.0.1\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGUAGE = env(\"DEFA... | diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py
index 420d840a6a..452b8d9403 100644
--- a/bookwyrm/settings.py
+++ b/bookwyrm/settings.py
@@ -13,7 +13,7 @@
PAGE_LENGTH = env("PAGE_LENGTH", 15)
DEFAULT_LANGUAGE = env("DEFAULT_LANGUAGE", "English")
-JS_CACHE = "19447742"
+JS_CACHE = "e5832a26"
# email
EM... |
scverse__scanpy-1002 | Plotting triggering copy of view
Example using scanpy 9dd2e94846aa and anndata `762fdb924e757cdd758231`
```python
import scanpy as sc
pbmc = sc.datasets.pbmc3k_processed()
sc.pl.umap(pbmc, color="louvain") # To make sure that "louvain_colors" has been made
bcells = pbmc[pbmc.obs["louvain"] == "B cells"]
# Th... | [
{
"content": "import warnings\nimport collections.abc as cabc\nfrom typing import Union, List, Sequence, Tuple, Collection, Optional\n\nimport numpy as np\nfrom matplotlib import pyplot as pl\nfrom matplotlib import rcParams, ticker\nfrom matplotlib.axes import Axes\nfrom matplotlib.colors import is_color_like\... | [
{
"content": "import warnings\nimport collections.abc as cabc\nfrom typing import Union, List, Sequence, Tuple, Collection, Optional\n\nimport numpy as np\nfrom matplotlib import pyplot as pl\nfrom matplotlib import rcParams, ticker\nfrom matplotlib.axes import Axes\nfrom matplotlib.colors import is_color_like\... | diff --git a/scanpy/plotting/_utils.py b/scanpy/plotting/_utils.py
index e33e05f0f7..3712c7ef92 100644
--- a/scanpy/plotting/_utils.py
+++ b/scanpy/plotting/_utils.py
@@ -320,7 +320,8 @@ def _validate_palette(adata, key):
_palette = None
break
_palette.append(color)
- if _p... |
encode__django-rest-framework-4273 | Serializing "complex" field returns None instead of the value since 3.4
(Not a great title — I hope the description will clarify.)
## Steps to reproduce
First: `pip install django-phonenumber-field`
With the following model and serializer:
``` python
from django.db.models import Model
from phonenumber_field.modelfie... | [
{
"content": "\"\"\"\nThe `compat` module provides support for backwards compatibility with older\nversions of Django/Python, and compatibility wrappers around optional packages.\n\"\"\"\n\n# flake8: noqa\nfrom __future__ import unicode_literals\n\nimport inspect\n\nimport django\nfrom django.apps import apps\n... | [
{
"content": "\"\"\"\nThe `compat` module provides support for backwards compatibility with older\nversions of Django/Python, and compatibility wrappers around optional packages.\n\"\"\"\n\n# flake8: noqa\nfrom __future__ import unicode_literals\n\nimport inspect\n\nimport django\nfrom django.apps import apps\n... | diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index 9c69eaa032..94f64265aa 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -125,7 +125,7 @@ def get_related_model(field):
def value_from_object(field, obj):
if django.VERSION < (1, 9):
return field._get_val_from_ob... |
redis__redis-py-3265 | Discrepancy in `INFO` response parsing
**Version**: `5.0.0`
**Description**: The code for parsing the `INFO` response is creating a discrepancy in the new RediSearch index field types field, e.g., `search_fields_text`.
If there is more than one section to this field its corresponding value (e.g., `TEXT=1, SORTABLE=... | [
{
"content": "import datetime\n\nfrom redis.utils import str_if_bytes\n\n\ndef timestamp_to_datetime(response):\n \"Converts a unix timestamp to a Python datetime object\"\n if not response:\n return None\n try:\n response = int(response)\n except ValueError:\n return None\n ... | [
{
"content": "import datetime\n\nfrom redis.utils import str_if_bytes\n\n\ndef timestamp_to_datetime(response):\n \"Converts a unix timestamp to a Python datetime object\"\n if not response:\n return None\n try:\n response = int(response)\n except ValueError:\n return None\n ... | diff --git a/redis/_parsers/helpers.py b/redis/_parsers/helpers.py
index aa115aa4a1..57b12ab89e 100644
--- a/redis/_parsers/helpers.py
+++ b/redis/_parsers/helpers.py
@@ -38,7 +38,7 @@ def parse_info(response):
response = str_if_bytes(response)
def get_value(value):
- if "," not in value or "=" not i... |
redis__redis-py-3264 | Discrepancy in `INFO` response parsing
**Version**: `5.0.0`
**Description**: The code for parsing the `INFO` response is creating a discrepancy in the new RediSearch index field types field, e.g., `search_fields_text`.
If there is more than one section to this field its corresponding value (e.g., `TEXT=1, SORTABLE=... | [
{
"content": "import datetime\n\nfrom redis.utils import str_if_bytes\n\n\ndef timestamp_to_datetime(response):\n \"Converts a unix timestamp to a Python datetime object\"\n if not response:\n return None\n try:\n response = int(response)\n except ValueError:\n return None\n ... | [
{
"content": "import datetime\n\nfrom redis.utils import str_if_bytes\n\n\ndef timestamp_to_datetime(response):\n \"Converts a unix timestamp to a Python datetime object\"\n if not response:\n return None\n try:\n response = int(response)\n except ValueError:\n return None\n ... | diff --git a/redis/_parsers/helpers.py b/redis/_parsers/helpers.py
index bdd749a5bc..7418cdca53 100644
--- a/redis/_parsers/helpers.py
+++ b/redis/_parsers/helpers.py
@@ -38,7 +38,7 @@ def parse_info(response):
response = str_if_bytes(response)
def get_value(value):
- if "," not in value or "=" not i... |
WeblateOrg__weblate-8229 | Maintainers not able to add Punjabi translations
### Describe the issue
The Punjabi language is used in both Pakistan and India, but with different writing systems. The locales available for this in Weblate are `pa_PK` and `pa` respectively. (This is the same as how the Android locales are set up for this.) I have bee... | [
{
"content": "#\n# Copyright © 2012–2022 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, e... | [
{
"content": "#\n# Copyright © 2012–2022 Michal Čihař <michal@cihar.com>\n#\n# This file is part of Weblate <https://weblate.org/>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, e... | diff --git a/weblate/lang/data.py b/weblate/lang/data.py
index 88e50e6e92fb..35d7ee7d8c73 100644
--- a/weblate/lang/data.py
+++ b/weblate/lang/data.py
@@ -24,7 +24,15 @@
NO_CODE_LANGUAGES = {lang[0] for lang in languages.LANGUAGES}
-UNDERSCORE_EXCEPTIONS = {"nb_NO", "zh_Hant", "zh_Hans", "be_Latn", "ro_MD", "pt_BR... |
bookwyrm-social__bookwyrm-2501 | AASIN and isfdb not editable
Somehow during the merge some code most be gone lost because...
<img width="640" alt="Bildschirmfoto 2022-12-11 um 21 29 47" src="https://user-images.githubusercontent.com/2017105/206927195-f9b27bcc-2f3a-46eb-ab1d-84340e5fa061.png">
| [
{
"content": "\"\"\" using django model forms \"\"\"\nfrom django import forms\n\nfrom bookwyrm import models\nfrom bookwyrm.models.fields import ClearableFileInputWithWarning\nfrom .custom_form import CustomForm\nfrom .widgets import ArrayWidget, SelectDateWidget, Select\n\n\n# pylint: disable=missing-class-do... | [
{
"content": "\"\"\" using django model forms \"\"\"\nfrom django import forms\n\nfrom bookwyrm import models\nfrom bookwyrm.models.fields import ClearableFileInputWithWarning\nfrom .custom_form import CustomForm\nfrom .widgets import ArrayWidget, SelectDateWidget, Select\n\n\n# pylint: disable=missing-class-do... | diff --git a/bookwyrm/forms/books.py b/bookwyrm/forms/books.py
index 67b044f05d..623beaa042 100644
--- a/bookwyrm/forms/books.py
+++ b/bookwyrm/forms/books.py
@@ -40,6 +40,8 @@ class Meta:
"goodreads_key",
"oclc_number",
"asin",
+ "aasin",
+ "isfdb",
... |
bookwyrm-social__bookwyrm-1809 | Unread notifications are no longer visually distinguished from read ones
I just forgot to consider this when I re-wrote the notifications page
| [
{
"content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nenv.read_env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.1.1\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGU... | [
{
"content": "\"\"\" bookwyrm settings and configuration \"\"\"\nimport os\nfrom environs import Env\n\nimport requests\nfrom django.utils.translation import gettext_lazy as _\n\n\nenv = Env()\nenv.read_env()\nDOMAIN = env(\"DOMAIN\")\nVERSION = \"0.1.1\"\n\nPAGE_LENGTH = env(\"PAGE_LENGTH\", 15)\nDEFAULT_LANGU... | diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py
index fe2f7467ab..92ff7ecdd5 100644
--- a/bookwyrm/settings.py
+++ b/bookwyrm/settings.py
@@ -14,7 +14,7 @@
PAGE_LENGTH = env("PAGE_LENGTH", 15)
DEFAULT_LANGUAGE = env("DEFAULT_LANGUAGE", "English")
-JS_CACHE = "2d3181e1"
+JS_CACHE = "9b4cc1f7"
# email
EM... |
locustio__locust-1573 | Misleading log message in distributed mode
<!--
If you have a general question about how to use Locust, please check Stack Overflow first https://stackoverflow.com/questions/tagged/locust
You can also ask new questions on SO, https://stackoverflow.com/questions/ask just remember to tag your question with "locust".... | [
{
"content": "import inspect\nimport logging\nimport os\nimport importlib\nimport signal\nimport socket\nimport sys\nimport time\n\nimport gevent\n\nimport locust\n\nfrom . import log\nfrom .argument_parser import parse_locustfile_option, parse_options\nfrom .env import Environment\nfrom .log import setup_loggi... | [
{
"content": "import inspect\nimport logging\nimport os\nimport importlib\nimport signal\nimport socket\nimport sys\nimport time\n\nimport gevent\n\nimport locust\n\nfrom . import log\nfrom .argument_parser import parse_locustfile_option, parse_options\nfrom .env import Environment\nfrom .log import setup_loggi... | diff --git a/locust/main.py b/locust/main.py
index ece30d3763..801ae69878 100644
--- a/locust/main.py
+++ b/locust/main.py
@@ -168,7 +168,8 @@ def main():
# list() call is needed to consume the dict_view object in Python 3
user_classes = list(user_classes.values())
- if os.name != "nt":
+ if o... |
python-pillow__Pillow-6481 | PSD incorrectly loaded
### What did you do?
I opened the TIFF in Pillow and converted it to JPG.
### What did you expect to happen?
The JPG image to look the same as the original TIFF.
### What actually happened?
The converted JPG looks malformed and has messed up colors.
### What are your OS, Python and Pillow v... | [
{
"content": "#\n# The Python Imaging Library\n# $Id$\n#\n# Adobe PSD 2.5/3.0 file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1997-01-03 fl Read most PSD images\n# 1997-01-18 fl Fixed P and CMYK support\n# 2001-10-21 fl Added seek/tell support (for layers)\n#\n# Copyright (c) 1997-2001 by Secre... | [
{
"content": "#\n# The Python Imaging Library\n# $Id$\n#\n# Adobe PSD 2.5/3.0 file handling\n#\n# History:\n# 1995-09-01 fl Created\n# 1997-01-03 fl Read most PSD images\n# 1997-01-18 fl Fixed P and CMYK support\n# 2001-10-21 fl Added seek/tell support (for layers)\n#\n# Copyright (c) 1997-2001 by Secre... | diff --git a/Tests/images/rgba.psd b/Tests/images/rgba.psd
new file mode 100644
index 00000000000..45fb7c3cca0
Binary files /dev/null and b/Tests/images/rgba.psd differ
diff --git a/Tests/test_file_psd.py b/Tests/test_file_psd.py
index b4b5b7a0c65..4f934375c7c 100644
--- a/Tests/test_file_psd.py
+++ b/Tests/test_file_p... |
kivy__python-for-android-2447 | tarfile failure with long user ID
Note this is a follow-on from the same effort which produced #1012, but I think the bugs are independent. I switched to Python 3 and the CrystaxNDK in an attempt to avoid NDK build errors, and got far enough to run into this.
While the dist's build.py is building its tar archive, I... | [
{
"content": "#!/usr/bin/env python3\n\nfrom gzip import GzipFile\nimport hashlib\nimport json\nfrom os.path import (\n dirname, join, isfile, realpath,\n relpath, split, exists, basename\n)\nfrom os import environ, listdir, makedirs, remove\nimport os\nimport shlex\nimport shutil\nimport subprocess\nimpo... | [
{
"content": "#!/usr/bin/env python3\n\nfrom gzip import GzipFile\nimport hashlib\nimport json\nfrom os.path import (\n dirname, join, isfile, realpath,\n relpath, split, exists, basename\n)\nfrom os import environ, listdir, makedirs, remove\nimport os\nimport shlex\nimport shutil\nimport subprocess\nimpo... | diff --git a/pythonforandroid/bootstraps/common/build/build.py b/pythonforandroid/bootstraps/common/build/build.py
index 895e599f6c..aa0574072a 100644
--- a/pythonforandroid/bootstraps/common/build/build.py
+++ b/pythonforandroid/bootstraps/common/build/build.py
@@ -201,6 +201,7 @@ def clean(tinfo):
di... |
svthalia__concrexit-1844 | Event (registration) status message in the API
### Is your feature request related to a problem? Please describe.
Currently, the event status messages (like 'you cannot cancel your registration without having to pay a fine') are hardcoded and whenever we update them, we must also update the app
### Describe the sol... | [
{
"content": "from rest_framework import serializers\n\nfrom activemembers.api.v2.serializers.member_group import MemberGroupSerializer\nfrom announcements.api.v2.serializers import SlideSerializer\nfrom documents.api.v2.serializers.document import DocumentSerializer\nfrom events import services\nfrom events.ap... | [
{
"content": "from rest_framework import serializers\n\nfrom activemembers.api.v2.serializers.member_group import MemberGroupSerializer\nfrom announcements.api.v2.serializers import SlideSerializer\nfrom documents.api.v2.serializers.document import DocumentSerializer\nfrom events import services\nfrom events.ap... | diff --git a/website/events/api/v2/serializers/event.py b/website/events/api/v2/serializers/event.py
index ccfa35ae3..d3c60ef9a 100644
--- a/website/events/api/v2/serializers/event.py
+++ b/website/events/api/v2/serializers/event.py
@@ -32,6 +32,7 @@ class Meta:
"num_participants",
"max_partic... |
google__clusterfuzz-2784 | Tolerate empty primary_contact in project setup
```
Traceback (most recent call last):
File "/srv/handlers/base_handler.py", line 277, in dispatch_request
return super(Handler, self).dispatch_request(*args, **kwargs)
File "/layers/google.python.pip/pip/lib/python3.7/site-packages/flask/views.py", line 163, ... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | [
{
"content": "# Copyright 2019 Google LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicab... | diff --git a/src/appengine/handlers/cron/project_setup.py b/src/appengine/handlers/cron/project_setup.py
index 69f3479b16..b075a98aa2 100644
--- a/src/appengine/handlers/cron/project_setup.py
+++ b/src/appengine/handlers/cron/project_setup.py
@@ -438,6 +438,8 @@ def _get_ccs(field_name, allow_list=True):
return ... |
cloudtools__troposphere-1740 | SageMaker Model ContainerDefinition object does not support attribute Mode
Setting a `Mode` attribute within the ContainerDefinition for both the `PrimaryContainer` and `Containers` attributes for creating a Model resources keeps throwing error - `AttributeError: ContainerDefinition object does not support attribute Mo... | [
{
"content": "# Copyright (c) 2012-2018, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Tags\nfrom .validators import integer\n\n\nclass GitConfig(AWSProperty):\n props = {\n 'Branch': (basestring, False),\n 'R... | [
{
"content": "# Copyright (c) 2012-2018, Mark Peek <mark@peek.org>\n# All rights reserved.\n#\n# See LICENSE file for full license.\n\nfrom . import AWSObject, AWSProperty, Tags\nfrom .validators import integer\n\n\nclass GitConfig(AWSProperty):\n props = {\n 'Branch': (basestring, False),\n 'R... | diff --git a/troposphere/sagemaker.py b/troposphere/sagemaker.py
index 6bd90952d..a172945cf 100644
--- a/troposphere/sagemaker.py
+++ b/troposphere/sagemaker.py
@@ -59,6 +59,7 @@ class ContainerDefinition(AWSProperty):
props = {
'ContainerHostname': (basestring, False),
'Environment': (dict, Fals... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.