instance_id stringlengths 10 57 | file_changes listlengths 1 15 | repo stringlengths 7 53 | base_commit stringlengths 40 40 | problem_statement stringlengths 11 52.5k | patch stringlengths 251 7.06M |
|---|---|---|---|---|---|
django__asgiref-239 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"asgiref/sync.py:AsyncToSync.__init__",
"asgiref/sync.py:SyncToAsync.__init__"
],
"edited_modules": [
"asgiref/sync.py:AsyncToSync",
"asgiref/sync.py:SyncToAsync"
... | django/asgiref | 6469d0f3486dae0b6229e12d32ae6695600ed3ec | Prevent accidental mixup of sync_to_async / async_to_sync
Putting `sync_to_async` onto an `async def` silently breaks it. Instead, it would be good if that raised an error at decorator application time - and likewise for the opposite case. | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 3c617e8..e4ed96f 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,9 @@
+Pending
+-------
+
+* async_to_sync and sync_to_async now check their arguments are functions of
+ the correct type.
+
3.3.1 (2020-11-09)
------------------
diff --git a/asgiref/sync.py... |
django__asgiref-320 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"asgiref/sync.py:AsyncToSync.__call__",
"asgiref/sync.py:SyncToAsync.__call__"
],
"edited_modules": [
"asgiref/sync.py:AsyncToSync",
"asgiref/sync.py:SyncToAsync"
... | django/asgiref | cde961b13c69b90216c4c1c81d1ad1ca1bc22b48 | sync_to_async does not find root thread inside a task
When you use `create_task` (or any way of making a coroutine not through asgiref), and the root thread is synchronous, then `sync_to_async` in thread-sensitive mode will use the root thread outside of tasks and a single, specific new thread inside of tasks, ruining ... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 8a05077..0379a31 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,7 +6,7 @@ repos:
args: ["--py37-plus"]
- repo: https://github.com/psf/black
- rev: 20.8b1
+ rev: 22.3.0
hooks:
- id: black
... |
django__asgiref-325 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"asgiref/sync.py:AsyncToSync.__init__"
],
"edited_modules": [
"asgiref/sync.py:AsyncToSync"
]
},
"file": "asgiref/sync.py"
}
] | django/asgiref | 12f6355d50c271aab821a37dbf2cde5863cc2643 | `sync.async_to_sync` incorrectly warns "a non-async-marked callable" for async callable class instance
Repro
```python
from asgiref.sync import async_to_sync
class CallableClass:
async def __call__(self):
return None
async_to_sync(CallableClass())
```
Yields the `UserWarning`
``... | diff --git a/asgiref/sync.py b/asgiref/sync.py
index a70dac1..d02bd4a 100644
--- a/asgiref/sync.py
+++ b/asgiref/sync.py
@@ -107,7 +107,12 @@ class AsyncToSync:
loop_thread_executors: "Dict[asyncio.AbstractEventLoop, CurrentThreadExecutor]" = {}
def __init__(self, awaitable, force_new_loop=False):
- ... |
django__asgiref-407 | [
{
"changes": {
"added_entities": [
"asgiref/local.py:_CVar.__init__",
"asgiref/local.py:_CVar.__getattr__",
"asgiref/local.py:_CVar.__setattr__",
"asgiref/local.py:_CVar.__delattr__",
"asgiref/local.py:Local._lock_storage"
],
"added_modules": [
"... | django/asgiref | d1ee1faf3e8056766876c6b9baea87478a5f2472 | Proposal: introduce `http.response.pathsend` extension
Some ASGI servers might not be able to implement `http.response.zerocopysend` extension due to specific implementation constraints, for instance Rust implemented servers like [Granian](https://github.com/emmett-framework/granian) won't play well with file descripto... | diff --git a/asgiref/local.py b/asgiref/local.py
index 17314d4..a8b9459 100644
--- a/asgiref/local.py
+++ b/asgiref/local.py
@@ -1,120 +1,128 @@
-import random
-import string
-import sys
+import asyncio
+import contextlib
+import contextvars
import threading
-import weakref
+from typing import Any, Dict, Union
+
+
+cl... |
django__asgiref-471 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"asgiref/sync.py:AsyncToSync.__call__",
"asgiref/sync.py:AsyncToSync.main_wrap"
],
"edited_modules": [
"asgiref/sync.py:AsyncToSync"
]
},
"file": "asgiref/sync.p... | django/asgiref | b7aaa795fbbea7ca88458279cf8302533d249101 | `AsyncToSync` incorrectly passes arguments when called function arguments to internal wrapper
If the function being wrapped uses a kwarg that has the same name as the `AsyncToSync.main_wrap` function, it causes the execution to fail with `AsyncToSync.main_wrap() got multiple values for argument '<kwarg>'`.
How to re... | diff --git a/asgiref/sync.py b/asgiref/sync.py
index 4427fc2..87ee406 100644
--- a/asgiref/sync.py
+++ b/asgiref/sync.py
@@ -217,8 +217,12 @@ class AsyncToSync(Generic[_P, _R]):
sys.exc_info(),
task_context,
context,
- *args,
- **kwargs,
+... |
django__asgiref-478 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"asgiref/local.py:_CVar.__init__",
"asgiref/local.py:_CVar.__getattr__",
"asgiref/local.py:_CVar.__setattr__",
"asgiref/local.py:_CVar.__delattr__"
],
"edited_modules"... | django/asgiref | 8e39bccacbfa3f19f0fdadd4b6f86c1cfaf947c6 | asgiref.local.Local fails to isolate changes between asyncio tasks
`asgiref.local.Local` used to isolate changes performed in asyncio tasks in pre-3.7, and stopped doing so from 3.7+. This is likely an issue, since the point of `asgiref.local.Local` compared to `threading.local` ought to be to provide locals also for a... | diff --git a/asgiref/local.py b/asgiref/local.py
index a8b9459..7d228ae 100644
--- a/asgiref/local.py
+++ b/asgiref/local.py
@@ -2,37 +2,38 @@ import asyncio
import contextlib
import contextvars
import threading
-from typing import Any, Dict, Union
+from typing import Any, Union
class _CVar:
"""Storage uti... |
django__channels_redis-185 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"channels_redis/core.py:RedisChannelLayer.__init__",
"channels_redis/core.py:RedisChannelLayer.new_channel"
],
"edited_modules": [
"channels_redis/core.py:RedisChannelLayer"
... | django/channels_redis | 132efcf0d911ed46d6d51064879edfc530fbf568 | Channel names not unique
It seems channel names are generated using a global instance of random, which can cause problems if the seed is reset. For instance see:
https://groups.google.com/forum/#!msg/otree/0UEtVVA_98M/9nUo0nLPAgAJ
Presumably, there is also a small risk of non-uniqure names even if the seed is not r... | diff --git a/.gitignore b/.gitignore
index ccc6479..e1f94cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ build/
/.tox
.DS_Store
.pytest_cache
+.vscode
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index e322f5c..0020a29 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -3,6 +3,8 @@ Unreleased
* Updated m... |
django__daphne-396 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"daphne/cli.py:CommandLineInterface.__init__"
],
"edited_modules": [
"daphne/cli.py:CommandLineInterface"
]
},
"file": "daphne/cli.py"
},
{
"changes": {
"a... | django/daphne | 87bc5a7975e3e77ec64a183058b6e875cf744cf4 | `Daphne` sets `server='daphne'` header for `websocket` connections, but not for `http-requests`
# Hi there,
( Correct me if i am wrong here )
Daphne ( by default ) doesn't set a server header.
By default these servers sets a header to identify backend technologies:
- [Uvicorn](github.com/encode/uvicorn) : uv... | diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 630c0fa..31e4650 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -11,7 +11,14 @@ Unreleased
range of versions does not represent a good use of maintainer time. Going
forward the latest Twisted version will be required.
-* Added `log-fmt` CLI argument.
+* Set ``... |
django__daphne-406 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"daphne/http_protocol.py:WebRequest.__init__",
"daphne/http_protocol.py:WebRequest.process"
],
"edited_modules": [
"daphne/http_protocol.py:WebRequest"
]
},
"fil... | django/daphne | 6a5093982ca1eaffbc41f0114ac5bea7cb3902be | 'WebRequest' object has no attribute 'client_addr'
Hi, I've recently migrated my Django project from WSGI + gunicorn to ASGI + daphne. It's working great apart from an occasional error in my Sentry/logs `builtins.AttributeError: 'WebRequest' object has no attribute 'client_addr'`.
It just seems to be the problem in th... | diff --git a/daphne/http_protocol.py b/daphne/http_protocol.py
index 7df7bae..a289e93 100755
--- a/daphne/http_protocol.py
+++ b/daphne/http_protocol.py
@@ -50,6 +50,8 @@ class WebRequest(http.Request):
) # Shorten it a bit, bytes wise
def __init__(self, *args, **kwargs):
+ self.client_addr = None
+... |
djrobstep__sqlakeyset-16 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sqlakeyset/serial/serial.py:Serial.serialize_value",
"sqlakeyset/serial/serial.py:Serial.unserialize_value"
],
"edited_modules": [
"sqlakeyset/serial/serial.py:Serial"
... | djrobstep/sqlakeyset | 3fbd20fa3efe1b9a9a6583dc00f0a4bc89f3bc42 | bookmark_ serializer does not support uuid.UUID objects | diff --git a/sqlakeyset/serial/serial.py b/sqlakeyset/serial/serial.py
index 2b708f5..0b751e2 100644
--- a/sqlakeyset/serial/serial.py
+++ b/sqlakeyset/serial/serial.py
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
import decimal
import datetime
import base64
+import uuid
import dateutil.parser
from .c... |
dlr-eoc__ukis-pysat-43 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ukis_pysat/file.py:get_ts_from_sentinel_filename"
],
"edited_modules": [
"ukis_pysat/file.py:get_ts_from_sentinel_filename"
]
},
"file": "ukis_pysat/file.py"
}
] | dlr-eoc/ukis-pysat | 9da685ab9d4644ddb0b7a7fc0c864fd96f642d98 | `get_ts_from_sentinel_filename()` does not return a defined date format
**Describe the bug**
`get_ts_from_sentinel_filename()` does not return a defined date format, but just a substring of the filename. It would be more useful to return something which is readable for common parsers. I would even expect this to happe... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 0fb8f90..5dc2efe 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -13,10 +13,14 @@ Changed
~~~~~~~
something was changed
-[master] (2020-XX-XX)
+[master] (2020-06-16)
----------------------
-[master] (2020-05-06)
+Fixed
+*****
+- ``file.get_ts_from_s... |
dlr-eoc__ukis-pysat-81 | [
{
"changes": {
"added_entities": [
"ukis_pysat/file.py:get_sat_ts_from_datetime"
],
"added_modules": [
"ukis_pysat/file.py:get_sat_ts_from_datetime"
],
"edited_entities": null,
"edited_modules": null
},
"file": "ukis_pysat/file.py"
}
] | dlr-eoc/ukis-pysat | 93128de8a07f44ac169abb9ed7e5123bd5bc17ca | Datetime Object to ESA date
**Is your feature request related to a problem? Please describe.**
We now have the option to create a datetime object from _ESA dates_, it would be nice to also be able to go back. This can be helpful when naming output files.
**Describe the solution you'd like**
Just a simple function ... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 6e95526..a614feb 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -16,6 +16,11 @@ something was changed
[master] (2020-**-**)
----------------------
+Added
+*****
+- ``file``: added to_ESA_date() function #80
+
+
[0.6.0] (2020-08-28)
-------------------... |
dlr-eoc__ukis-pysat-91 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ukis_pysat/file.py:env_get"
],
"edited_modules": [
"ukis_pysat/file.py:env_get"
]
},
"file": "ukis_pysat/file.py"
}
] | dlr-eoc/ukis-pysat | b819ed271462f153c1a411123fc4d42f9628629e | env_get with boolean
**Is your feature request related to a problem? Please describe.**
`env_get` does not do very much at the moment, it would be quite useful if it could return booleans.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives yo... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index e14adb0..101a8b4 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -18,6 +18,7 @@ something was changed
Added
*****
+- ``file``: read and return booleans from env #90
- ``raster``: possibility to init with 2D array #88
[0.6.3] (2020-09-02)
diff --git a/uk... |
dls-controls__aioca-38 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "aioca/__init__.py"
},
{
"changes": {
"added_entities": [
"aioca/_catools.py:ValueEvent.is_set",
"aioca/_catools.py:Channel.count... | dls-controls/aioca | a5500d0ba11b3a91610fc449e5ed6b12530a4b4c | Provide mechanism to access Channels
It would be useful to be able to interrogate the currently active Channels in `aioca`, to enable things like counting the number of open/closed connections.
This will need some new public getter functions, and probably a small amount of re-naming of various files and objects to m... | diff --git a/.github/workflows/code.yml b/.github/workflows/code.yml
index b26b076..95e0c7c 100644
--- a/.github/workflows/code.yml
+++ b/.github/workflows/code.yml
@@ -42,7 +42,7 @@ jobs:
- name: Install Python Dependencies
run: |
- pip install pipenv build
+ pip install pipenv==202... |
dls-controls__pymalcolm-360 | [
{
"changes": {
"added_entities": [
"malcolm/modules/pmac/parts/pmacchildpart.py:PmacChildPart.check_profile_length_exceeds_profile_points",
"malcolm/modules/pmac/parts/pmacchildpart.py:PmacChildPart.is_last_point_in_current_batch",
"malcolm/modules/pmac/parts/pmacchildpart.py:PmacC... | dls-controls/pymalcolm | 8b81adf1984b828db0955be7ca4b9fd63e9b50be | Large number of points results in CA timeouts on child parts during configure
As the number of points in a scan increases, so does the configure time taken by a few of the parts. At some point a limit is reached where the pmacChildPart takes so long to configure that it blocks other threads for longer than the timeouts... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 856c2098..c8995405 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -6,6 +6,15 @@ This project adheres to `Semantic Versioning <http://semver.org/>`_ after 2-1.
Unreleased
----------
+Changed:
+
+- PmacChildPart's profile generation is now split into two methods bas... |
dls-controls__pymalcolm-361 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"malcolm/core/views.py:Block.when_value_matches"
],
"edited_modules": [
"malcolm/core/views.py:Block"
]
},
"file": "malcolm/core/views.py"
},
{
"changes": {
... | dls-controls/pymalcolm | 166dc80326f9c691046037196e08c7d77f175861 | HDFWriterPart does not track frames written to disk
Currently scans with AreaDetector HDF5 plugins that fail (e.g. due to permission errors or invalid configuration parameters) will succeed as long as all of the other parts run as expected. I believe instead the scan should fail with an appropriate error.
In my case... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c8995405..5fe906b5 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -14,6 +14,10 @@ Changed:
generation dominates. A Yield has also been added so the thread suspends
after each batch so it doesn't block other threads for the entire profile
calculation, which pr... |
dmvass__sqlalchemy-easy-profile-17 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"easy_profile/profiler.py:SessionProfiler._before_cursor_execute",
"easy_profile/profiler.py:SessionProfiler._after_cursor_execute"
],
"edited_modules": [
"easy_profile/profil... | dmvass/sqlalchemy-easy-profile | e98f169203de3478a4999376aac03323c5f54786 | Does not work on python 3.8
Exception raises when trying to use time.clock on profiler.py.
timer.clock was deprecated since Python 3.3 and removed in 3.8.
From Python DOCs:
Deprecated since version 3.3, will be removed in version 3.8: The behaviour of this function depends on the platform: use perf_counter() o... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 58e2c0a..d446327 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
+## [1.1.1] - 2020-07-26
+- Fixed deprecated time.clock [issue-16]
+
## [1.1.0] - 2020-06-29... |
dmvass__sqlalchemy-easy-profile-19 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"easy_profile/profiler.py:SessionProfiler._before_cursor_execute",
"easy_profile/profiler.py:SessionProfiler._after_cursor_execute"
],
"edited_modules": [
"easy_profile/profil... | dmvass/sqlalchemy-easy-profile | 889e2dbf43f78743e9d822cbe10c7b843ee234fe | No report shown in console in 1.1.1
**Describe the bug**
A clear and concise description of what the bug is.
I have updated to 1.1.1 today.
The SQL report no longer shows in console output.
I am using a mac but not sure if it has anything to do with it.
The setup to enable app - wide console logging of SQL sta... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index d446327..90450c4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [Unreleased]
+## [1.1.2] - 2020-10-21
+- Fixed queries for UNIX platforms [issue-18]
+
## [1.1.1] - 2020-... |
doccano__doccano-1557 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"backend/api/views/download/data.py:Record.__str__"
],
"edited_modules": [
"backend/api/views/download/data.py:Record"
]
},
"file": "backend/api/views/download/data.py"
... | doccano/doccano | 217cc85348972fcf38f3c58284dd2168db2bd3bb | Metadata column repeated when exported as csv
Hi I have recently come across a bug when you export data as csv
<environment.-->
* Operating System:MacOS 10.14
* Python Version Used: 3.9.5
* Doccano installed through pip3 install doccano
I have created a DocumentClassification project and have imported... | diff --git a/backend/api/views/download/data.py b/backend/api/views/download/data.py
index 68978184..79bfe7e8 100644
--- a/backend/api/views/download/data.py
+++ b/backend/api/views/download/data.py
@@ -1,3 +1,4 @@
+import json
from typing import Any, Dict, List
@@ -16,4 +17,10 @@ class Record:
self.metad... |
doccano__doccano-1558 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"backend/api/views/download/writer.py:CsvWriter.create_line",
"backend/api/views/download/writer.py:FastTextWriter.create_line"
],
"edited_modules": [
"backend/api/views/downl... | doccano/doccano | 0d7bf054e619c144ec84fcf18f9457af8822a204 | Mutli-label text classification export issues: same classes but in different orders
How to reproduce the behaviour
---------
<!-- Before submitting an issue, make sure to check the docs and closed issues and FAQ to see if any of the solutions work for you. https://github.com/doccano/doccano/wiki/Frequently-Asked-Ques... | diff --git a/backend/api/views/download/writer.py b/backend/api/views/download/writer.py
index 5de1264e..a4d5293a 100644
--- a/backend/api/views/download/writer.py
+++ b/backend/api/views/download/writer.py
@@ -84,7 +84,7 @@ class CsvWriter(BaseWriter):
return {
'id': record.id,
'data... |
docker__docker-py-1022 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/auth/auth.py:parse_auth",
"docker/auth/auth.py:load_config"
],
"edited_modules": [
"docker/auth/auth.py:parse_auth",
"docker/auth/auth.py:load_config"
]
... | docker/docker-py | e743254b42080e6d199fc10f4812a42ecb8d536f | Empty auth dictionary should be valid
docker/compose#3265 | diff --git a/docker/auth/auth.py b/docker/auth/auth.py
index eedb7944..d23e6f3c 100644
--- a/docker/auth/auth.py
+++ b/docker/auth/auth.py
@@ -117,7 +117,7 @@ def parse_auth(entries, raise_on_error=False):
conf = {}
for registry, entry in six.iteritems(entries):
- if not (isinstance(entry, dict) and ... |
docker__docker-py-1143 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/utils/utils.py:parse_host"
],
"edited_modules": [
"docker/utils/utils.py:parse_host"
]
},
"file": "docker/utils/utils.py"
}
] | docker/docker-py | 2d3bda84de39a75e560fc79512143d43e5d61226 | Support IPv6 addresses in DOCKER_HOST
Raised in https://github.com/docker/compose/issues/2879.
See https://github.com/docker/docker/pull/16950 for the Engine implementation. | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 4d218692..1cfc8acc 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -22,8 +22,8 @@ import tarfile
import tempfile
import warnings
from distutils.version import StrictVersion
-from fnmatch import fnmatch
from datetime import datetime
+... |
docker__docker-py-1150 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/utils/decorators.py:update_headers"
],
"edited_modules": [
"docker/utils/decorators.py:update_headers"
]
},
"file": "docker/utils/decorators.py"
}
] | docker/docker-py | 650cc70e934044fcb5dfd27fd27777f91c337b6c | Client.build crashes when trying to pull a new image if HttpHeaders are set in config file
```python
import docker
c = docker.Client()
c.build('https://github.com/docker/compose.git')
---------------------------------------------------------------------------
AttributeError Traceback... | diff --git a/docker/utils/decorators.py b/docker/utils/decorators.py
index 7c41a5f8..46c28a80 100644
--- a/docker/utils/decorators.py
+++ b/docker/utils/decorators.py
@@ -40,7 +40,7 @@ def minimum_version(version):
def update_headers(f):
def inner(self, *args, **kwargs):
if 'HttpHeaders' in self._auth_co... |
docker__docker-py-1167 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/client.py:Client.from_env",
"docker/client.py:Client._stream_helper"
],
"edited_modules": [
"docker/client.py:Client"
]
},
"file": "docker/client.py"
}... | docker/docker-py | 2ef02df2f06fafe7d71c96bac1e18d68217703ab | Feature Request: docker.from_env(version='auto')
Feature request to add auto api version support for ```docker.from_env()``` similar to ```docker.Client(version='auto')```?
I noticed that one of the suggestions from #402 for the ```version='auto'``` option was now available for ```docker.Client()``` but doesn't work... | diff --git a/docker/client.py b/docker/client.py
index d1c6ee5f..dc28ac46 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -114,7 +114,8 @@ class Client(
@classmethod
def from_env(cls, **kwargs):
- return cls(**kwargs_from_env(**kwargs))
+ version = kwargs.pop('version', None)
+ ... |
docker__docker-py-1168 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/client.py:Client._stream_helper"
],
"edited_modules": [
"docker/client.py:Client"
]
},
"file": "docker/client.py"
},
{
"changes": {
"added_entities... | docker/docker-py | fb41965272b5c0e7c911ee268270b92e2da06c1d | support PidsLimit in host config | diff --git a/docker/client.py b/docker/client.py
index d1c6ee5f..75867536 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -268,7 +268,7 @@ class Client(
else:
# Response isn't chunked, meaning we probably
# encountered an error immediately
- yield self._result(respo... |
docker__docker-py-1178 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/network.py:NetworkApiMixin.create_network",
"docker/api/network.py:NetworkApiMixin.disconnect_container_from_network"
],
"edited_modules": [
"docker/api/network.py... | docker/docker-py | 24bfb99e05d57a7a098a81fb86ea7b93cff62661 | Support create network EnableIPv6 and Labels options
Check the remote API:
https://docs.docker.com/engine/reference/api/docker_remote_api_v1.23/#create-a-network
There are two missing JSON parameters:
```
EnableIPv6 - Enable IPv6 on the network
Labels - Labels to set on the network, specified as a map: {"key":"... | diff --git a/docker/api/network.py b/docker/api/network.py
index 34cd8987..0ee0dab6 100644
--- a/docker/api/network.py
+++ b/docker/api/network.py
@@ -22,7 +22,8 @@ class NetworkApiMixin(object):
@minimum_version('1.21')
def create_network(self, name, driver=None, options=None, ipam=None,
- ... |
docker__docker-py-1255 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/utils/utils.py:parse_host"
],
"edited_modules": [
"docker/utils/utils.py:parse_host"
]
},
"file": "docker/utils/utils.py"
}
] | docker/docker-py | 008730c670afb2f88c7db308901586fb24f1a60c | Client should tolerate trailing slashes in base_url
docker/compose#3869 | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index b565732d..e1c7ad0c 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -453,8 +453,8 @@ def parse_host(addr, is_win32=False, tls=False):
"Bind address needs a port: {0}".format(addr))
if proto == "http+unix" or proto == '... |
docker__docker-py-1385 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/types/services.py:Mount.parse_mount_string"
],
"edited_modules": [
"docker/types/services.py:Mount"
]
},
"file": "docker/types/services.py"
}
] | docker/docker-py | 07b20ce660f4a4b1e64ef3ede346eef9ec08635a | swarm mode create service does not support volumn bind type?
hi all, i use docker py create service catch some error. my docker py version is
```
root@node-19:~# pip freeze | grep docker
docker==2.0.0
docker-compose==1.9.0
docker-pycreds==0.2.1
dockerpty==0.4.1
```
my docker version is
```
Client... | diff --git a/docker/types/services.py b/docker/types/services.py
index b52afd27..93503dc0 100644
--- a/docker/types/services.py
+++ b/docker/types/services.py
@@ -1,6 +1,7 @@
import six
from .. import errors
+from ..constants import IS_WINDOWS_PLATFORM
from ..utils import format_environment, split_command
@@ -... |
docker__docker-py-1393 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/models/images.py:Image.tags"
],
"edited_modules": [
"docker/models/images.py:Image"
]
},
"file": "docker/models/images.py"
}
] | docker/docker-py | aed1af6f6f8c97658ad8d11619ba0e7fce7af240 | Exception retrieving untagged images on api >= 1.24
Docker API >= 1.24 will return a null object if image tags DNE instead of not including it in the response. This makes the dict.get fail to catch the null case and the list comprehension to iterate over a non-iterable.
```
File "<stdin>", line 1, in <module>
... | diff --git a/docker/models/images.py b/docker/models/images.py
index 32068e69..6f8f4fe2 100644
--- a/docker/models/images.py
+++ b/docker/models/images.py
@@ -30,10 +30,10 @@ class Image(Model):
"""
The image's tags.
"""
- return [
- tag for tag in self.attrs.get('RepoTags',... |
docker__docker-py-2172 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/container.py:ContainerApiMixin.stats"
],
"edited_modules": [
"docker/api/container.py:ContainerApiMixin"
]
},
"file": "docker/api/container.py"
},
{
... | docker/docker-py | 5467658bbc22828a17312198dbe8ceb41f4cb77a | Some examples in the documentation don't work with Python 3
For example this one:
```
>>> from docker import Client
>>> cli = Client(base_url='tcp://127.0.0.1:2375')
>>> for line in cli.pull('busybox', stream=True):
... print(json.dumps(json.loads(line), indent=4))
```
will produce:
```
TypeError: the JSON objec... | diff --git a/docker/api/container.py b/docker/api/container.py
index c59a6d01..fce73af6 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -473,16 +473,12 @@ class ContainerApiMixin(object):
signals and reaps processes
init_path (str): Path to the docker-init binary
... |
docker__docker-py-2186 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/models/images.py:ImageCollection.pull"
],
"edited_modules": [
"docker/models/images.py:ImageCollection"
]
},
"file": "docker/models/images.py"
}
] | docker/docker-py | e1e4048753aafc96571752cf54d96df7b24156d3 | Can't pull image with stream=True
Hi,
The scenario is as follows:
Mac 10.13.6
docker version v18.06.0-ce
Python 3.6
(python package) docker==3.5.0
private docker registry (docker hub, private repo)
docker login works ✔️
docker pull $image works ✔️
however, pulling via the docker python api fails when using... | diff --git a/docker/api/image.py b/docker/api/image.py
index a9f801e9..d3fed5c0 100644
--- a/docker/api/image.py
+++ b/docker/api/image.py
@@ -334,7 +334,8 @@ class ImageApiMixin(object):
Args:
repository (str): The repository to pull
tag (str): The tag to pull
- stream (bo... |
docker__docker-py-2793 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/models/secrets.py:SecretCollection.create"
],
"edited_modules": [
"docker/models/secrets.py:SecretCollection"
]
},
"file": "docker/models/secrets.py"
}
] | docker/docker-py | 31775a1532a66cf8a4c183a99bb5c73623147295 | Couldn't create secret object
I couldn't create secret object, the problem seemed to boil down to the way that a secret was being created from the docker daemon response.
https://github.com/docker/docker-py/blob/467cacb00d8dce68aa8ff2bdacc85acecd2d1207/docker/models/secrets.py#L31-L33
Docker version 18.03.1-ce a... | diff --git a/docker/models/secrets.py b/docker/models/secrets.py
index ca11edeb..e2ee88af 100644
--- a/docker/models/secrets.py
+++ b/docker/models/secrets.py
@@ -30,6 +30,7 @@ class SecretCollection(Collection):
def create(self, **kwargs):
obj = self.client.api.create_secret(**kwargs)
+ obj.setd... |
docker__docker-py-2862 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/models/images.py:Image.short_id",
"docker/models/images.py:RegistryData.short_id"
],
"edited_modules": [
"docker/models/images.py:Image",
"docker/models/images... | docker/docker-py | ab43018b027e48c53f3cf6d71ce988358e3c204e | container id only 10
# code:
print client.containers.list(all=True)
print docker.version
# output:
[<Container: 4ba3e59b9f>, <Container: fc5d8c6f28>, <Container: 72b6c75141>, <Container: 42685100cd>, <Container: 1d383bbd99>]
2.1.0
This is container id only 10 ?
Here is my docker host container ID
# docker... | diff --git a/docker/models/images.py b/docker/models/images.py
index ef668c7d..e247d351 100644
--- a/docker/models/images.py
+++ b/docker/models/images.py
@@ -31,12 +31,12 @@ class Image(Model):
@property
def short_id(self):
"""
- The ID of the image truncated to 10 characters, plus the ``sha2... |
docker__docker-py-2917 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/plugin.py:PluginApiMixin.disable_plugin"
],
"edited_modules": [
"docker/api/plugin.py:PluginApiMixin"
]
},
"file": "docker/api/plugin.py"
},
{
"chang... | docker/docker-py | b2a18d7209f827d83cc33acb80aa31bf404ffd4b | Missed rollback_config in service's create/update methods.
Hi, in [documentation](https://docker-py.readthedocs.io/en/stable/services.html) for service written that it support `rollback_config` parameter, but in `models/services.py`'s `CREATE_SERVICE_KWARGS` list doesn't contain it.
So, I got this error:
`TypeError: ... | diff --git a/docker/api/plugin.py b/docker/api/plugin.py
index 57110f11..10210c1a 100644
--- a/docker/api/plugin.py
+++ b/docker/api/plugin.py
@@ -51,19 +51,20 @@ class PluginApiMixin:
return True
@utils.minimum_version('1.25')
- def disable_plugin(self, name):
+ def disable_plugin(self, name, for... |
docker__docker-py-2927 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/container.py:ContainerApiMixin.create_container",
"docker/api/container.py:ContainerApiMixin.create_container_from_config"
],
"edited_modules": [
"docker/api/conta... | docker/docker-py | 26064dd6b584ee14878157b4c8b001eefed70caf | Container creation does not support passing the platform
While this is not documented in the API docs (https://docs.docker.com/engine/api/v1.41/#operation/ContainerCreate), the Go client uses that: https://github.com/docker/cli/blob/master/vendor/github.com/docker/docker/client/container_create.go#L42
It would be gr... | diff --git a/docker/api/container.py b/docker/api/container.py
index 17c09726..f600be18 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -223,7 +223,7 @@ class ContainerApiMixin:
mac_address=None, labels=None, stop_signal=None,
networking_config=N... |
docker__docker-py-3006 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/utils/utils.py:parse_host",
"docker/utils/utils.py:kwargs_from_env"
],
"edited_modules": [
"docker/utils/utils.py:parse_host",
"docker/utils/utils.py:kwargs_fr... | docker/docker-py | 2933af2ca760cda128f1a48145170a56ba732abd | DeprecationWarning: urllib.parse.splitnport() is deprecated as of 3.8, use urllib.parse.urlparse() instead
https://github.com/docker/docker-py/blob/9a24df5cdd03c679dc929735e4766e19ff1c2bdb/docker/utils/utils.py#L23 | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index f7c3dd7d..7b229099 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -1,4 +1,5 @@
import base64
+import collections
import json
import os
import os.path
@@ -8,15 +9,20 @@ from datetime import datetime
from distutils.version import Str... |
docker__docker-py-3112 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/container.py:ContainerApiMixin.stats"
],
"edited_modules": [
"docker/api/container.py:ContainerApiMixin"
]
},
"file": "docker/api/container.py"
},
{
... | docker/docker-py | a02ba743338c27fd9348af2cf7767b140501734d | Timeouts don't work on windows
Currently the windows npipe implementation doesn't honour timeouts. Regardless of which api endpoint you use or pretty much anything else this leads to bugs where the docker api waits until the docker daemon finishes instead of timing out properly.
For example, if there is a dockerfile... | diff --git a/docker/api/container.py b/docker/api/container.py
index 9a25b214..40607e79 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -678,7 +678,8 @@ class ContainerApiMixin:
container (str): The container to diff
Returns:
- (str)
+ (list) A list of... |
docker__docker-py-3120 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/container.py:ContainerApiMixin.stats"
],
"edited_modules": [
"docker/api/container.py:ContainerApiMixin"
]
},
"file": "docker/api/container.py"
}
] | docker/docker-py | 576e47aaacf690a3fdd6cf98c345d48ecf834b7d | Containers stats is broken in Docker-py 6.1.0
Look like Docker-Py breaks the API to retrieve stats from containers.
With Docker 6.0.1 (on Ubuntu 22.04):
```
>>> import docker
>>> c = docker..from_env()
>>> for i in c.containers.list():
... i.stats(decode=True)
...
<generator object APIClient._stream_... | diff --git a/docker/api/container.py b/docker/api/container.py
index fef76030..40607e79 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -1164,8 +1164,9 @@ class ContainerApiMixin:
'one_shot is only available in conjunction with '
'stream=False'
... |
docker__docker-py-3191 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/build.py:BuildApiMixin.build"
],
"edited_modules": [
"docker/api/build.py:BuildApiMixin"
]
},
"file": "docker/api/build.py"
},
{
"changes": {
"... | docker/docker-py | cb8f2c6630584d6d1b2d9296a0c780af0f5e5549 | build images with tag with https prefix never ends
## Reproduces
```
docker_client = docker.from_env()
docker_client .images.build(path="{my-path}", tag="https://dummy:latest", dockerfile="{dockerfile-path})
```
Using the debugger, we can see it loop on the _post request here:
https://github.com/docker/dock... | diff --git a/docker/api/build.py b/docker/api/build.py
index 439f4dc3..9c8b4e6a 100644
--- a/docker/api/build.py
+++ b/docker/api/build.py
@@ -129,13 +129,16 @@ class BuildApiMixin:
raise errors.DockerException(
'Can not use custom encoding if gzip is enabled'
)
-
+ if ... |
docker__docker-py-3200 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/models/configs.py:ConfigCollection.create"
],
"edited_modules": [
"docker/models/configs.py:ConfigCollection"
]
},
"file": "docker/models/configs.py"
},
{
... | docker/docker-py | 6ceb08273c157cbab7b5c77bd71e7389f1a6acc5 | Can't create config object
Much like https://github.com/docker/docker-py/issues/2025 the config model is failing to create a new object due to 'name' KeyError
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "docker\models\configs.py", line 10, in __repr__
return f"<{self._... | diff --git a/docker/models/configs.py b/docker/models/configs.py
index 3588c8b5..5ef13778 100644
--- a/docker/models/configs.py
+++ b/docker/models/configs.py
@@ -30,6 +30,7 @@ class ConfigCollection(Collection):
def create(self, **kwargs):
obj = self.client.api.create_config(**kwargs)
+ obj.setd... |
docker__docker-py-3202 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/models/configs.py:ConfigCollection.create"
],
"edited_modules": [
"docker/models/configs.py:ConfigCollection"
]
},
"file": "docker/models/configs.py"
},
{
... | docker/docker-py | 6ceb08273c157cbab7b5c77bd71e7389f1a6acc5 | `Image.history()` returned wrong type.
At the document, image.history() return `str` type, but it return `list` type. | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 127d5b68..628c5350 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -14,7 +14,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- - run: pip instal... |
docker__docker-py-752 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/client.py:Client.attach",
"docker/client.py:Client.attach_socket",
"docker/client.py:Client.diff",
"docker/client.py:Client.exec_create",
"docker/client.py:Client.... | docker/docker-py | 33acb9d2e05d0f3abb7897abbe50dd54600da85b | Hardening for URL request construction
The `Client` class performs a lot URL construction like this:
res = self._get(self._url("/exec/{0}/json".format(exec_id)))
This can be used to manipulate the query string if `exec_id` contains characters like `'?'` and `'/'`, which can lead to vulnerabilities elsewhe... | diff --git a/docker/client.py b/docker/client.py
index b1f72e97..88bc50de 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -41,7 +41,7 @@ class Client(clientbase.ClientBase):
'stderr': stderr and 1 or 0,
'stream': stream and 1 or 0,
}
- u = self._url("/containers/{0}/att... |
docker__docker-py-770 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/utils/utils.py:create_host_config"
],
"edited_modules": [
"docker/utils/utils.py:create_host_config"
]
},
"file": "docker/utils/utils.py"
}
] | docker/docker-py | 02f330d8dc3da47215bed47b44fac73941ea6920 | Add support for --cpu-quota & --cpu-period run flags
Any chance we could add support for the above run flags?
https://docs.docker.com/reference/commandline/run/ | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 46b35160..36edf8de 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -457,7 +457,8 @@ def create_host_config(
restart_policy=None, cap_add=None, cap_drop=None, devices=None,
extra_hosts=None, read_only=None, pid_mode=None, ipc_mo... |
docker__docker-py-787 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/utils/utils.py:convert_volume_binds"
],
"edited_modules": [
"docker/utils/utils.py:convert_volume_binds"
]
},
"file": "docker/utils/utils.py"
}
] | docker/docker-py | 5e331a55a8e8e10354693172dce1aa63f58ebe97 | Create container bind volume with Unicode folder name
If bind volume folder name is Unicode, for example Japanese, It will raise exception:
Host volume and container volume both should handle Unicode.
```
File "/home/vagrant/.local/share/virtualenvs/qnap/local/lib/python2.7/site-packages/docker/utils/utils.py", ... | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 36edf8de..1fce1377 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -242,6 +242,9 @@ def convert_volume_binds(binds):
result = []
for k, v in binds.items():
+ if isinstance(k, six.binary_type):
+ k = k.decode... |
docker__docker-py-806 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/auth/auth.py:encode_header"
],
"edited_modules": [
"docker/auth/auth.py:encode_header"
]
},
"file": "docker/auth/auth.py"
}
] | docker/docker-py | f479720d517a7db7f886916190b3032d29d18f10 | Auth fails with long passwords
See https://github.com/docker/docker/issues/16840
docker-py is encoding `X-Registry-Auth` with regular base64 and not the url safe version of base64 that jwt tokens use. | diff --git a/docker/auth/auth.py b/docker/auth/auth.py
index 366bc67e..1ee9f812 100644
--- a/docker/auth/auth.py
+++ b/docker/auth/auth.py
@@ -102,7 +102,7 @@ def decode_auth(auth):
def encode_header(auth):
auth_json = json.dumps(auth).encode('ascii')
- return base64.b64encode(auth_json)
+ return base64.u... |
docker__docker-py-822 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/container.py:ContainerApiMixin.start"
],
"edited_modules": [
"docker/api/container.py:ContainerApiMixin"
]
},
"file": "docker/api/container.py"
}
] | docker/docker-py | 4c8c761bc15160be5eaa76d81edda17b067aa641 | Passing host_config parameters in start() overrides the host_config that was passed in create()?
I had a `host_config` with `extra_hosts` defined. I used this `host_config` to create a container. When starting container, I passed extra volumes_from parameter. However, this lead to `extra_hosts` seemingly not doing thei... | diff --git a/docker/api/container.py b/docker/api/container.py
index 72c5852d..953a5f52 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -997,19 +997,16 @@ class ContainerApiMixin(object):
self._raise_for_status(res)
@utils.check_resource
- def start(self, container, binds=None, ... |
docker__docker-py-832 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/auth/auth.py:decode_auth"
],
"edited_modules": [
"docker/auth/auth.py:decode_auth"
]
},
"file": "docker/auth/auth.py"
}
] | docker/docker-py | 47ab89ec2bd3bddf1221b856ffbaff333edeabb4 | decode_auth function does not handle utf-8 logins or password
HI
I have found that the function **decode_auth** (line 96, [file](https://github.com/docker/docker-py/blob/master/docker/auth/auth.py)) fails when decoding UTF-8 passwords from the .dockercfg file, and **load_config** returning an empty config.
I have... | diff --git a/docker/auth/auth.py b/docker/auth/auth.py
index 2ed894ee..416dd7c4 100644
--- a/docker/auth/auth.py
+++ b/docker/auth/auth.py
@@ -96,7 +96,7 @@ def decode_auth(auth):
auth = auth.encode('ascii')
s = base64.b64decode(auth)
login, pwd = s.split(b':', 1)
- return login.decode('ascii'), p... |
docker__docker-py-854 | [
{
"changes": {
"added_entities": [
"docker/utils/utils.py:host_config_type_error",
"docker/utils/utils.py:host_config_version_error",
"docker/utils/utils.py:host_config_value_error"
],
"added_modules": [
"docker/utils/utils.py:host_config_type_error",
"d... | docker/docker-py | 9ebecb5991303d55fe208114a1de422650c4dcb2 | [enhancement] Add utility method to utils.py for raising errors
PR incoming... | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 560ee8e2..9c4bb477 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -236,7 +236,7 @@ def convert_port_bindings(port_bindings):
for k, v in six.iteritems(port_bindings):
key = str(k)
if '/' not in key:
- k... |
docker__docker-py-861 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/image.py:ImageApiMixin.pull"
],
"edited_modules": [
"docker/api/image.py:ImageApiMixin"
]
},
"file": "docker/api/image.py"
},
{
"changes": {
"a... | docker/docker-py | 1ca2bc58f0cf2e2cdda2734395bd3e7ad9b178bf | Can't pull images with . In name.
Docker images that have a `.` in their name cannot be pulled with docker-py. This is a result of:
https://github.com/docker/docker-py/blob/master/docker/auth/auth.py#L46 | diff --git a/docker/api/image.py b/docker/api/image.py
index f891e210..8493b38d 100644
--- a/docker/api/image.py
+++ b/docker/api/image.py
@@ -158,8 +158,6 @@ class ImageApiMixin(object):
if not tag:
repository, tag = utils.parse_repository_tag(repository)
registry, repo_name = auth.resol... |
docker__docker-py-863 | [
{
"changes": {
"added_entities": [
"docker/utils/utils.py:should_include"
],
"added_modules": [
"docker/utils/utils.py:should_include"
],
"edited_entities": [
"docker/utils/utils.py:exclude_paths",
"docker/utils/utils.py:get_paths"
],
"ed... | docker/docker-py | 28864df27b2cf289478d5fa9d5ca27a9f0daa9a8 | dockerignore implementation is relatively slow compared to Docker's implementation
I ran into an issue in a project where my builds - run through `docker-compose` - seemed to be taking an awfully long time (around ~60 seconds) during the context build/upload stage. `strace` showed a ton of time was being spent `stat()`... | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 9c4bb477..762b39a4 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -107,38 +107,68 @@ def exclude_paths(root, patterns, dockerfile=None):
exclude_patterns = list(set(patterns) - set(exceptions))
- all_paths = get_paths(root)
... |
docker__docker-py-911 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/client.py:Client.__init__"
],
"edited_modules": [
"docker/client.py:Client"
]
},
"file": "docker/client.py"
},
{
"changes": {
"added_entities": nul... | docker/docker-py | 446e6d08dd569194a27bb354a184b7d94ecf5e48 | Problem when using the DOCKER_HOST variable in combination with docker-compose and https://
Hi,
I'm trying to use docker & docker-compose with the DOCKER_HOST env-variable to control a remote docker-host.
at first I configured the variables on the docker client machine as follows:
export DOCKER_CERT_PATH=/... | diff --git a/docker/client.py b/docker/client.py
index fb186cc7..7d1f7c46 100644
--- a/docker/client.py
+++ b/docker/client.py
@@ -45,17 +45,17 @@ class Client(
timeout=constants.DEFAULT_TIMEOUT_SECONDS, tls=False):
super(Client, self).__init__()
- if tls and (not base_url or not bas... |
docker__docker-py-928 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/utils/utils.py:exclude_paths"
],
"edited_modules": [
"docker/utils/utils.py:exclude_paths"
]
},
"file": "docker/utils/utils.py"
}
] | docker/docker-py | 575305fdba6c57f06d605920e01b5e1d6b952d3e | [1.7] regression in .dockerignore handling
If the `Dockerfile` is being ignored by a path in the `.dockerignore` file, it is incorrectly being removed from the context. There is a special case handling when the file is being excluded directly, but it should also apply when there is a path which includes the `Dockerfile... | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index 4404c217..61e5a8dc 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -128,7 +128,13 @@ def exclude_paths(root, patterns, dockerfile=None):
paths = get_paths(root, exclude_patterns, include_patterns,
has_exceptio... |
docker__docker-py-929 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/auth/auth.py:resolve_index_name",
"docker/auth/auth.py:parse_auth",
"docker/auth/auth.py:load_config"
],
"edited_modules": [
"docker/auth/auth.py:resolve_index... | docker/docker-py | 575305fdba6c57f06d605920e01b5e1d6b952d3e | Using a docker/config.json file causes "TypeError: string indices must be integers"
Using a ~/.docker/config.json file causes docker-compose to output a Python error. @dnephin in https://github.com/docker/compose/issues/2697#issuecomment-172936366 suggests that this is an issue to be raised with the docker-py project i... | diff --git a/docker/auth/auth.py b/docker/auth/auth.py
index 399dae2b..eedb7944 100644
--- a/docker/auth/auth.py
+++ b/docker/auth/auth.py
@@ -46,7 +46,7 @@ def resolve_repository_name(repo_name):
def resolve_index_name(index_name):
index_name = convert_to_hostname(index_name)
- if index_name == 'index.'+IND... |
docker__docker-py-942 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/api/container.py:ContainerApiMixin.logs"
],
"edited_modules": [
"docker/api/container.py:ContainerApiMixin"
]
},
"file": "docker/api/container.py"
}
] | docker/docker-py | c3a66cc5999a5435b81769ac758d411d34c995c4 | logs() separate param for stream and follow
From: https://github.com/docker/compose/pull/2720/files#r52222296
Current the `follow` param is set based on `stream`
I think `follow=True` does imply `stream=True`, but `stream=True` doesn't imply `follow=True`, you may still want to stream without following. | diff --git a/docker/api/container.py b/docker/api/container.py
index ceac173f..8aa9aa2c 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -193,12 +193,14 @@ class ContainerApiMixin(object):
@utils.check_resource
def logs(self, container, stdout=True, stderr=True, stream=False,
- ... |
docker__docker-py-988 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"docker/utils/utils.py:kwargs_from_env"
],
"edited_modules": [
"docker/utils/utils.py:kwargs_from_env"
]
},
"file": "docker/utils/utils.py"
}
] | docker/docker-py | fa7068cb7cf2ae1efcc2b3b99f24f4c7aa29e989 | Certificate error in docker ci for test-docker-py
https://jenkins.dockerproject.org/job/Docker-PRs/24848/console for detail.
in docker-py, when checkout to the commit of 387db11009f4b4f64a4f2c6fd64d3eeb01828585,the error appears,if I remove the commit ,we will not have the error.
```
==============================... | diff --git a/docker/utils/utils.py b/docker/utils/utils.py
index bc26ce82..d4393d58 100644
--- a/docker/utils/utils.py
+++ b/docker/utils/utils.py
@@ -460,16 +460,16 @@ def kwargs_from_env(ssl_version=None, assert_hostname=None):
tls_verify = os.environ.get('DOCKER_TLS_VERIFY')
if tls_verify == '':
t... |
dodo5522__tsmppt60_driver-10 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "setup.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"tsmppt60_driver/__init__.py... | dodo5522/tsmppt60_driver | eb8b3a55efd0157b9b66917dd46c017babca45ec | _read_modbus()の内部処理改善
こういうところ。
``` python
def _read_modbus(self, address, register, mbid=_ID_MODBUS):
...
if idx < idx_max:
ret_str += "#"
return ret_str
```
| diff --git a/.travis.yml b/.travis.yml
index 3760d0b..096f669 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,17 +1,13 @@
language: python
python:
- - "2.7"
- - "3.3"
- - "3.4"
- "3.5"
- # does not have headers provided, please ask https://launchpad.net/~pypy/+archive/ppa
- # maintainers to fix their pypy-de... |
dopefishh__pympi-39 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pympi/Elan.py:Eaf.get_full_time_interval",
"pympi/Elan.py:parse_eaf",
"pympi/Elan.py:to_eaf"
],
"edited_modules": [
"pympi/Elan.py:Eaf",
"pympi/Elan.py:parse_... | dopefishh/pympi | fd924ffca6ea8ca2ef81384f97ce4396334ef850 | Support pathlib.Path objects in addition to str file paths
I propose to additionally accept `pathlib.Path` objects wherever file paths as `str` are accepted now. This makes tests simpler (when using pytest's `tmp_path`) and is also becoming the standard behaviour of most python stdlib modules. | diff --git a/MANIFEST b/MANIFEST
index 5965331..0b43bb0 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,5 @@
# file GENERATED by distutils, do NOT edit
+setup.cfg
setup.py
pympi/Elan.py
pympi/Praat.py
diff --git a/pympi/Elan.py b/pympi/Elan.py
index 4b4553e..0a3975c 100644
--- a/pympi/Elan.py
+++ b/pympi/Elan.py
@@... |
dotmesh-io__dotscience-python-37 | [
{
"changes": {
"added_entities": [
"dotscience/__init__.py:Dotscience._reset"
],
"added_modules": null,
"edited_entities": [
"dotscience/__init__.py:Dotscience.__init__",
"dotscience/__init__.py:Dotscience.connect"
],
"edited_modules": [
"dotsc... | dotmesh-io/dotscience-python | 7e2ec1fceacd0bd8ec2517a2dd6cc9fd74a0f82a | ds.connect() only connects to single project and runs overwritten [fusemachines]
Fuse machines run ds.connect() from a local machine but it only connects to a single project.
Also runs are getting overwritten when running on the same machine.
This text is just a placeholder: it was decided on the Fuse machines ca... | diff --git a/dotscience/__init__.py b/dotscience/__init__.py
index e12da54..c2c3ac3 100644
--- a/dotscience/__init__.py
+++ b/dotscience/__init__.py
@@ -253,6 +253,9 @@ class Dotscience:
currentRun = None
def __init__(self):
+ self._reset()
+
+ def _reset(self):
self._mode = None
... |
dotmesh-io__dotscience-python-52 | [
{
"changes": {
"added_entities": [
"dotscience/__init__.py:Run.add_metric",
"dotscience/__init__.py:Run.add_metrics",
"dotscience/__init__.py:Run.metric",
"dotscience/__init__.py:Dotscience.add_metric",
"dotscience/__init__.py:Dotscience.add_metrics",
"dotsc... | dotmesh-io/dotscience-python | 2510ed4a159fcbe4e5f36974496e242d66d479dd | ds.summary -> ds.metric
Rename ds.summary to ds.metric (leave ds.summary as an alias for backward compatibility). | diff --git a/README.md b/README.md
index f4c442e..b70bff1 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,7 @@ Type "help", "copyright", "credits" or "license" for more information.
## Quick Start
-The most basic usage is to record what data files you read and write, and maybe to declare some summary statistic... |
dotpot__InAppPy-54 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"inapppy/errors.py:GoogleError.__init__"
],
"edited_modules": [
"inapppy/errors.py:GoogleError"
]
},
"file": "inapppy/errors.py"
},
{
"changes": {
"added_e... | dotpot/InAppPy | 662179362b679dbd3250cc759299bd454842b6dc | cancelled android purchases do not get caught correctly
in lines 109-110 of googleplay.py:
```
cancel_reason = int(result.get('cancelReason', 0))
if cancel_reason != 0:
raise GoogleError('Subscription is canceled', result)
```
If we look at [the docs](https://develope... | diff --git a/README.rst b/README.rst
index 9ea1223..771796a 100644
--- a/README.rst
+++ b/README.rst
@@ -17,10 +17,11 @@ Table of contents
2. Installation
3. Google Play (`receipt` + `signature`)
4. Google Play (verification)
-5. App Store (`receipt` + using optional `shared-secret`)
-6. App Store Response (`validat... |
dpkp__kafka-python-1025 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/coordinator/base.py:BaseCoordinator.ensure_active_group",
"kafka/coordinator/base.py:BaseCoordinator._send_join_group_request",
"kafka/coordinator/base.py:BaseCoordinator._send_gro... | dpkp/kafka-python | 218a9014b749e52a2b8d40da6e3443c8132b8fa1 | KeyError: 'error_code' at kafka/protocol/struct.py __repr__
kafka-python==1.3.1, kafka 0.10.1.0
I've set consumer's session_timeout_ms bigger than group.max.session.timeout.ms in the broker and used group coordination. Here is my consumer setup:
```python
SECOND = 1000
consumer = kafka.KafkaConsumer(
topic,
... | diff --git a/kafka/coordinator/base.py b/kafka/coordinator/base.py
index e811e88..ab259dd 100644
--- a/kafka/coordinator/base.py
+++ b/kafka/coordinator/base.py
@@ -245,13 +245,12 @@ class BaseCoordinator(object):
# ensure that there are no pending requests to the coordinator.
# This is import... |
dpkp__kafka-python-1029 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/consumer/group.py:KafkaConsumer.subscription"
],
"edited_modules": [
"kafka/consumer/group.py:KafkaConsumer"
]
},
"file": "kafka/consumer/group.py"
}
] | dpkp/kafka-python | 899f11730db5f209c03cfad20111ec131ee4c70b | KafkaConsumer.subscribe() should return copy
When calling ``consumer.subscription()`` a reference to the internal ``set()`` object ``self._subscription.subscription`` is returned.
If that is modified (eg to add a new topic) and then passed to ``consumer.subscribe(topics)`` then ``SubscriptionState.change_subscriptio... | diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py
index f2b1699..32f4556 100644
--- a/kafka/consumer/group.py
+++ b/kafka/consumer/group.py
@@ -819,7 +819,7 @@ class KafkaConsumer(six.Iterator):
Returns:
set: {topic, ...}
"""
- return self._subscription.subscription
+ ... |
dpkp__kafka-python-1239 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"kafka/consumer/fetcher.py:Fetcher"
]
},
"file": "kafka/consumer/fetcher.py"
}
] | dpkp/kafka-python | cec1bdc9965b3d6729d4415e31b4dac04d603873 | Seek method returning incorrect messages on compressed topic when using max_poll_records
While using seek method of `kafka.consumer.group.seek' for a given partition, offset, we are seeing the inconsistent behavior for the messages returned with the subsequent poll method.
The issue is easily reproducible for the give... | diff --git a/kafka/consumer/fetcher.py b/kafka/consumer/fetcher.py
index b86c8ec..f552038 100644
--- a/kafka/consumer/fetcher.py
+++ b/kafka/consumer/fetcher.py
@@ -923,12 +923,17 @@ class Fetcher(six.Iterator):
self._sensors.fetch_throttle_time_sensor.record(response.throttle_time_ms)
self._senso... |
dpkp__kafka-python-1312 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/client_async.py:DelayedTaskQueue.next_at"
],
"edited_modules": [
"kafka/client_async.py:DelayedTaskQueue"
]
},
"file": "kafka/client_async.py"
},
{
"chang... | dpkp/kafka-python | 141b6b29609f9594ad9d3d3302a0123d1b831261 | KafkaConsumer stuck in infinite loop on connection error
It seems to be stuck in this loop https://github.com/dpkp/kafka-python/blob/34dc9dd2fe6b47f4542c5a131e0e0cbc1b00ed80/kafka/conn.py#L294
The consumer filled up ~1TB logs over the course of 3 days, but did not throw an exception. Example logs:
```kafka.conn ... | diff --git a/kafka/client_async.py b/kafka/client_async.py
index e36d78e..1350503 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -947,7 +947,7 @@ class DelayedTaskQueue(object):
"""Number of seconds until next task is ready."""
self._drop_removed()
if not self._tasks:
- ... |
dpkp__kafka-python-1320 | [
{
"changes": {
"added_entities": [
"kafka/conn.py:BrokerConnection._next_afi_host_port",
"kafka/conn.py:is_inet_4_or_6",
"kafka/conn.py:dns_lookup"
],
"added_modules": [
"kafka/conn.py:is_inet_4_or_6",
"kafka/conn.py:dns_lookup"
],
"edited_en... | dpkp/kafka-python | 009290ddd5d4616d70bff93f841e773af8b22750 | Handling of struct errors doesn't print the specific error message
When a `struct.error` is thrown during `_pack()` or `_unpack()`, we catch and re-raise as a `ValueError`: https://github.com/dpkp/kafka-python/blob/master/kafka/protocol/types.py#L11-L12
However, we're shadowing the word `error` so we lose a handle o... | diff --git a/kafka/conn.py b/kafka/conn.py
index e20210a..2926e2f 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -251,67 +251,42 @@ class BrokerConnection(object):
self._sasl_auth_future = None
self.last_attempt = 0
self._gai = None
- self._gai_index = 0
self._sensors = Non... |
dpkp__kafka-python-1338 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/coordinator/base.py:BaseCoordinator.ensure_active_group"
],
"edited_modules": [
"kafka/coordinator/base.py:BaseCoordinator"
]
},
"file": "kafka/coordinator/base.p... | dpkp/kafka-python | a69320b8e3199fa9d7cfa3947a242e699a045c3b | AttributeError: 'NoneType' object has no attribute 'failed'
Via #1315 comments:
```
Traceback (most recent call last):
File "./client_staging.py", line 53, in <module>
results = consumer.poll(timeout_ms=10000, max_records=1)
File "/usr/local/lib/python2.7/dist-packages/kafka/consumer/group.py", line 601, i... | diff --git a/kafka/coordinator/base.py b/kafka/coordinator/base.py
index 30b9c40..24412c9 100644
--- a/kafka/coordinator/base.py
+++ b/kafka/coordinator/base.py
@@ -377,19 +377,23 @@ class BaseCoordinator(object):
# before the pending rebalance has completed.
if self.join_future is Non... |
dpkp__kafka-python-1364 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/cluster.py:ClusterMetadata.update_metadata"
],
"edited_modules": [
"kafka/cluster.py:ClusterMetadata"
]
},
"file": "kafka/cluster.py"
},
{
"changes": {
... | dpkp/kafka-python | 08a7fb7b754a754c6c64e96d4ba5c4f56cf38a5f | KAFKA-3949: Fix race condition between group rebalance and metadata update
Details in https://issues.apache.org/jira/browse/KAFKA-3949
Note that the fix refactored a fair bit of code for managing subscription state: https://github.com/apache/kafka/pull/1762
And then KIP-70 (tracked in #1242) further modified this... | diff --git a/kafka/cluster.py b/kafka/cluster.py
index d646fdf..1ab4218 100644
--- a/kafka/cluster.py
+++ b/kafka/cluster.py
@@ -291,6 +291,13 @@ class ClusterMetadata(object):
for listener in self._listeners:
listener(self)
+ if self.need_all_topic_metadata:
+ # the listener m... |
dpkp__kafka-python-1367 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"kafka/consumer/fetcher.py:Fetcher"
]
},
"file": "kafka/consumer/fetcher.py"
}
] | dpkp/kafka-python | 618c5051493693c1305aa9f08e8a0583d5fcf0e3 | Seek method returning incorrect messages on compressed topic when using max_poll_records
While using seek method of `kafka.consumer.group.seek' for a given partition, offset, we are seeing the inconsistent behavior for the messages returned with the subsequent poll method.
The issue is easily reproducible for the give... | diff --git a/kafka/consumer/fetcher.py b/kafka/consumer/fetcher.py
index f9fcb37..c9bbb97 100644
--- a/kafka/consumer/fetcher.py
+++ b/kafka/consumer/fetcher.py
@@ -835,12 +835,21 @@ class Fetcher(six.Iterator):
return parsed_records
- class PartitionRecords(six.Iterator):
+ class PartitionRecords(ob... |
dpkp__kafka-python-1688 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/consumer/group.py:KafkaConsumer.__init__"
],
"edited_modules": [
"kafka/consumer/group.py:KafkaConsumer"
]
},
"file": "kafka/consumer/group.py"
}
] | dpkp/kafka-python | 812de351f75beefe73bd9bef55847ab61ccc951d | Verify these timeouts are in descending order on KafkaConsumer instantiation
When we create a `KafkaConsumer`, we should validate that the following timeouts are in descending order:
1. `connections_max_idle_ms`
2. `request_timeout_ms`
3. `session_timeout_ms` (or equivalent, depending on pre/post 0.10.1 broker)
I... | diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py
index 531c107..f521891 100644
--- a/kafka/consumer/group.py
+++ b/kafka/consumer/group.py
@@ -313,11 +313,15 @@ class KafkaConsumer(six.Iterator):
new_config, self.config['auto_offset_reset'])
self.config['auto_offset_r... |
dpkp__kafka-python-1736 | [
{
"changes": {
"added_entities": [
"kafka/client_async.py:KafkaClient._can_bootstrap",
"kafka/client_async.py:KafkaClient._should_recycle_connection"
],
"added_modules": null,
"edited_entities": [
"kafka/client_async.py:KafkaClient.__init__",
"kafka/client... | dpkp/kafka-python | 921c553b6a62a34044e4ae444af65abea3717faa | Not catching exceptions/stuck on 'localhost:9092'
I am not getting any exception will creating the producer
- running pytest in a docker container on ubuntu
- the server is down to test bad connectivity
Here is a **successful** error handling when connecting to **127.0.0.1:9092**:
> [kafka.producer.kafka] Start... | diff --git a/kafka/client_async.py b/kafka/client_async.py
index d608e6a..fdf5454 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -5,7 +5,9 @@ import copy
import functools
import logging
import random
+import socket
import threading
+import time
import weakref
# selectors in stdlib as of py3.4... |
dpkp__kafka-python-1769 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/client_async.py:KafkaClient.send",
"kafka/client_async.py:KafkaClient._maybe_refresh_metadata"
],
"edited_modules": [
"kafka/client_async.py:KafkaClient"
]
},... | dpkp/kafka-python | de6e9d3cc31db2d513e8d8f9dde4d77d400325ce | [1.4.5] KafkaProducer raises KafkaTimeoutError when attempting wakeup()
I tried upgrading one of our projects to 1.4.5, hoping to use the fix for consuming compacted topics in https://github.com/dpkp/kafka-python/issues/1701. However, it constantly results in KafkaTimeoutErrors almost immediately.
This only seems to... | diff --git a/kafka/client_async.py b/kafka/client_async.py
index 0d9e562..b6adb77 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -517,7 +517,7 @@ class KafkaClient(object):
Future: resolves to Response struct or Error
"""
if not self._can_send_request(node_id):
- ... |
dpkp__kafka-python-1975 | [
{
"changes": {
"added_entities": [
"kafka/admin/acl_resource.py:ACLFilter.__eq__",
"kafka/admin/acl_resource.py:ACLFilter.__hash__",
"kafka/admin/acl_resource.py:ResourcePatternFilter.__eq__",
"kafka/admin/acl_resource.py:ResourcePatternFilter.__hash__"
],
"adde... | dpkp/kafka-python | e3362aca8c12a07ebe88575b073c91475585f21d | NodeNotReadyError with manual commits
Simple Kafka consumer where I manually commit records (`enable_auto_commit=False`):
```
for record in consumer:
...
consumer.commit()
```
I often encounter `Error sending OffsetCommitRequest_v2 to node coordinator-1 [NodeNotReadyError: coordinator-1]`. It seemingly do... | diff --git a/kafka/admin/acl_resource.py b/kafka/admin/acl_resource.py
index 7a012d2..fd997a1 100644
--- a/kafka/admin/acl_resource.py
+++ b/kafka/admin/acl_resource.py
@@ -112,6 +112,24 @@ class ACLFilter(object):
resource=self.resource_pattern
)
+ def __eq__(self, other):
+ return al... |
dpkp__kafka-python-1977 | [
{
"changes": {
"added_entities": [
"kafka/admin/acl_resource.py:ACLFilter.__eq__",
"kafka/admin/acl_resource.py:ACLFilter.__hash__",
"kafka/admin/acl_resource.py:ResourcePatternFilter.__eq__",
"kafka/admin/acl_resource.py:ResourcePatternFilter.__hash__"
],
"adde... | dpkp/kafka-python | e3362aca8c12a07ebe88575b073c91475585f21d | request_timeout_ms should be reset when check_version fail
I have 3 kafka brokers, when i restart my client,it will chose one broker A to Probing broker version by check_version,but first try it failed for some reason. and it will try another broker B,and this time it get version succ. But, it cannot send requests to b... | diff --git a/kafka/admin/acl_resource.py b/kafka/admin/acl_resource.py
index 7a012d2..fd997a1 100644
--- a/kafka/admin/acl_resource.py
+++ b/kafka/admin/acl_resource.py
@@ -112,6 +112,24 @@ class ACLFilter(object):
resource=self.resource_pattern
)
+ def __eq__(self, other):
+ return al... |
dpkp__kafka-python-1978 | [
{
"changes": {
"added_entities": [
"kafka/admin/acl_resource.py:ACLFilter.__eq__",
"kafka/admin/acl_resource.py:ACLFilter.__hash__",
"kafka/admin/acl_resource.py:ResourcePatternFilter.__eq__",
"kafka/admin/acl_resource.py:ResourcePatternFilter.__hash__"
],
"adde... | dpkp/kafka-python | e3362aca8c12a07ebe88575b073c91475585f21d | Should consumer.poll() first verify the consumer isn't `closed`?
Is it expected behavior that, depending on the choice of `selector`, you can successfully poll for messages after closing the consumer?
If you call `consumer.close()` followed by `consumer.poll()` that you'll generally (but not always) get an exception... | diff --git a/kafka/admin/acl_resource.py b/kafka/admin/acl_resource.py
index 7a012d2..fd997a1 100644
--- a/kafka/admin/acl_resource.py
+++ b/kafka/admin/acl_resource.py
@@ -112,6 +112,24 @@ class ACLFilter(object):
resource=self.resource_pattern
)
+ def __eq__(self, other):
+ return al... |
dpkp__kafka-python-2499 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/consumer/fetcher.py:Fetcher._unpack_message_set",
"kafka/consumer/fetcher.py:Fetcher._create_fetch_requests"
],
"edited_modules": [
"kafka/consumer/fetcher.py:Fetcher"
... | dpkp/kafka-python | a731b18cd67d4e1197dac1eea6c552533b926aac | Support for transactional messages
The client doesn't support transactional messages. On trying to consume messages created by a transactional producer (scala/java based) the python client fails to correctly give values for key/value. | diff --git a/kafka/consumer/fetcher.py b/kafka/consumer/fetcher.py
index b544e4b..9dd4b84 100644
--- a/kafka/consumer/fetcher.py
+++ b/kafka/consumer/fetcher.py
@@ -456,10 +456,20 @@ class Fetcher(six.Iterator):
batch = records.next_batch()
while batch is not None:
- # LegacyR... |
dpkp__kafka-python-2548 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/conn.py:BrokerConnection._try_api_versions_check"
],
"edited_modules": [
"kafka/conn.py:BrokerConnection"
]
},
"file": "kafka/conn.py"
},
{
"changes": {
... | dpkp/kafka-python | cebfed210c7bca4a6c699df6748b008dbb7ce087 | `TypeError: exceptions must derive from BaseException` when unable to determine broker version
Traceback of an error when we tried upgrading to 2.1.0
Scenario, we try to connect to a kafka broker that's just starting up (so failures and retries are expected)
```
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/... | diff --git a/kafka/conn.py b/kafka/conn.py
index b276d3d..c941548 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -531,6 +531,9 @@ class BrokerConnection(object):
if self._api_versions_future is None:
if self.config['api_version'] is not None:
self._api_version = self.config['ap... |
dpkp__kafka-python-2555 | [
{
"changes": {
"added_entities": [
"kafka/consumer/fetcher.py:Fetcher.close",
"kafka/consumer/fetcher.py:FetchMetrics.__init__"
],
"added_modules": [
"kafka/consumer/fetcher.py:FetchMetrics"
],
"edited_entities": [
"kafka/consumer/fetcher.py:Fetcher.... | dpkp/kafka-python | d4a6a05df9a21e390db656715a2d5cfda2d8f0e3 | After pausing and resuming partition, the offset is reset far ahead.
If I use code that pauses and then resumes reading from partitions, the offset for the partition is set not to the last message read, but to the message far ahead. Example code:
```
consumer = KafkaConsumer(bootstrap_servers=[SERVER], auto_offset_... | diff --git a/kafka/consumer/fetcher.py b/kafka/consumer/fetcher.py
index 641a0f2..90dfdbb 100644
--- a/kafka/consumer/fetcher.py
+++ b/kafka/consumer/fetcher.py
@@ -2,6 +2,7 @@ from __future__ import absolute_import, division
import collections
import copy
+import itertools
import logging
import random
import sy... |
dpkp__kafka-python-2573 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/client_async.py:KafkaClient._maybe_refresh_metadata"
],
"edited_modules": [
"kafka/client_async.py:KafkaClient"
]
},
"file": "kafka/client_async.py"
},
{
... | dpkp/kafka-python | 70ec261b0d41448eb9d6b4ff9456d0d2d65edf15 | Producer tries to Describe topics it has no access to
below is my code for producer. My producer is trying to access all the topics and then throwing error 'Denied Operation'. skyDriveProducer has access only to produce messages to qa.dcSacramento.skydrive. But it is trying to access other topics also and throwing erro... | diff --git a/Makefile b/Makefile
index c0128e7..a624b83 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
SHELL = bash
-export KAFKA_VERSION ?= 2.4.0
+export KAFKA_VERSION ?= 4.0.0
DIST_BASE_URL ?= https://archive.apache.org/dist/kafka/
# Required to support testing old kafka versions on newer java releases... |
dpkp__kafka-python-2576 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/consumer/fetcher.py:Fetcher.__init__",
"kafka/consumer/fetcher.py:Fetcher.send_fetches",
"kafka/consumer/fetcher.py:Fetcher._create_fetch_requests",
"kafka/consumer/fetcher... | dpkp/kafka-python | a520232f267e396cd1f275799606019f023e0fff | Consumer gets stuck when consuming messages with incremental fetch sessions enabled
## Environment
- Kafka version: 2.8.0
- kafka-python version: 2.1.3
## Steps to Reproduce
1. Create a consumer for a single-partition topic
2. Call `partitions_for_topic(topic)` before starting consumption
3. Seek to a specific offset
... | diff --git a/kafka/consumer/fetcher.py b/kafka/consumer/fetcher.py
index 4d73ef4..61480fb 100644
--- a/kafka/consumer/fetcher.py
+++ b/kafka/consumer/fetcher.py
@@ -114,6 +114,7 @@ class Fetcher(six.Iterator):
self._sensors = FetchManagerMetrics(metrics, self.config['metric_group_prefix'])
self._isola... |
dpkp__kafka-python-611 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/conn.py:BrokerConnection.send"
],
"edited_modules": [
"kafka/conn.py:BrokerConnection"
]
},
"file": "kafka/conn.py"
},
{
"changes": {
"added_entitie... | dpkp/kafka-python | d81963a919fa8161c94b5bef5e6de0697b91c4a6 | kafka.common.ConnectionError on big messages + gevent
i'm getting kafka.common.ConnectionError trying to send big message. Code below
```python
from gevent.monkey import patch_all; patch_all()
from kafka import KafkaProducer
producer = KafkaProducer(bootstrap_servers=xxxxxxxx,
buffer_m... | diff --git a/kafka/conn.py b/kafka/conn.py
index 2b82b6d..ffc839e 100644
--- a/kafka/conn.py
+++ b/kafka/conn.py
@@ -188,10 +188,12 @@ class BrokerConnection(object):
# and send bytes asynchronously. For now, just block
# sending each request payload
self._sock.setblocking(True)
-... |
dpkp__kafka-python-620 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/coordinator/consumer.py:ConsumerCoordinator.__init__",
"kafka/coordinator/consumer.py:ConsumerCoordinator._on_join_complete",
"kafka/coordinator/consumer.py:ConsumerCoordinator._ma... | dpkp/kafka-python | b96f4ccf070109a022deb98b569e61d23e4e75b9 | Consumer exception on close when group id is None
Following the conversation in #601, setting the `group_id` to `None` in a Consumer causes an exception to be raised when the consumer is closed.
```
>>> from kafka import KafkaConsumer
>>> k = KafkaConsumer('example', bootstrap_servers=['server'], group_id=None)
>... | diff --git a/kafka/coordinator/consumer.py b/kafka/coordinator/consumer.py
index a5e3067..b2ef1ea 100644
--- a/kafka/coordinator/consumer.py
+++ b/kafka/coordinator/consumer.py
@@ -91,8 +91,10 @@ class ConsumerCoordinator(BaseCoordinator):
log.warning('Broker version (%s) does not support offset'
... |
dpkp__kafka-python-756 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/coordinator/base.py:BaseCoordinator.ensure_coordinator_known"
],
"edited_modules": [
"kafka/coordinator/base.py:BaseCoordinator"
]
},
"file": "kafka/coordinator/b... | dpkp/kafka-python | 7a350e5fcf33f49094c820ba88b9cee4aeae6e12 | Support KafkaConsumer auto-commit with 0.8 brokers
kafka 0.8.2 kafka-python 1.1.1
when enable auto_commit, an AutoCommitTask instance will be created
but when Enable the AutoCommitTask instance?
in the code , only find the function _on_join_complete will enable the AutoCommitTask instance
```
def _on_join_... | diff --git a/kafka/coordinator/base.py b/kafka/coordinator/base.py
index 168115a..25dd000 100644
--- a/kafka/coordinator/base.py
+++ b/kafka/coordinator/base.py
@@ -50,6 +50,7 @@ class BaseCoordinator(object):
'session_timeout_ms': 30000,
'heartbeat_interval_ms': 3000,
'retry_backoff_ms': 100... |
dpkp__kafka-python-762 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/client.py:SimpleClient._get_coordinator_for_group",
"kafka/client.py:SimpleClient.load_metadata_for_topics"
],
"edited_modules": [
"kafka/client.py:SimpleClient"
... | dpkp/kafka-python | 3666b66a21776d620f68d2f7ff2fed1bc18b94e5 | KAFKA-3306: MetadataRequest v1
Related to KIP-4 | diff --git a/kafka/client.py b/kafka/client.py
index 891ae03..8a34cc4 100644
--- a/kafka/client.py
+++ b/kafka/client.py
@@ -137,7 +137,7 @@ class SimpleClient(object):
kafka.errors.check_error(resp)
# Otherwise return the BrokerMetadata
- return BrokerMetadata(resp.nodeId, resp.host, resp.po... |
dpkp__kafka-python-766 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"kafka/consumer/group.py:KafkaConsumer"
]
},
"file": "kafka/consumer/group.py"
},
{
"changes": {
"added_entities": null,
"added_modules": n... | dpkp/kafka-python | 506d023978e7273bd323c0750e3f77af259d257b | KAFKA-3117: handle metadata updates during consumer rebalance | diff --git a/kafka/consumer/group.py b/kafka/consumer/group.py
index 9ebfe02..db0022d 100644
--- a/kafka/consumer/group.py
+++ b/kafka/consumer/group.py
@@ -176,6 +176,10 @@ class KafkaConsumer(six.Iterator):
selector (selectors.BaseSelector): Provide a specific selector
implementation to use for ... |
dpkp__kafka-python-909 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/consumer/group.py:KafkaConsumer.__init__"
],
"edited_modules": [
"kafka/consumer/group.py:KafkaConsumer"
]
},
"file": "kafka/consumer/group.py"
},
{
"chan... | dpkp/kafka-python | 8fde79dbb5a3793b1a9ebd10e032d5f3dd535645 | BrokerConnection API_VERSION has wrong default value in docstring
I'm confused about the API_VERSION default value.
[`conn.py`](https://github.com/dpkp/kafka-python/blob/master/kafka/conn.py#L77) says:
> 'api_version': (0, 8, 2), # default to most restrictive
But the [docstring](https://github.com/dpkp/kafka-pyt... | diff --git a/kafka/client_async.py b/kafka/client_async.py
index 1513f39..85de90a 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -105,10 +105,10 @@ class KafkaClient(object):
providing a file, only the leaf certificate will be checked against
this CRL. The CRL can only be ch... |
dpkp__kafka-python-999 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"kafka/consumer/group.py:KafkaConsumer.__init__"
],
"edited_modules": [
"kafka/consumer/group.py:KafkaConsumer"
]
},
"file": "kafka/consumer/group.py"
},
{
"chan... | dpkp/kafka-python | bcb4009b935fb74e3ca71206466c68ad74bc7b3c | Once KafkaProducer reports "Failed to allocate memory within the configured" exceptions, it never recovers from the failures
We have a situation there is a message burst in our business codes using Kafka 1.3.2. The message rate might reach 100K/s, each message size is less than 16Kb. The producer is shared between thre... | diff --git a/kafka/client_async.py b/kafka/client_async.py
index 1513f39..85de90a 100644
--- a/kafka/client_async.py
+++ b/kafka/client_async.py
@@ -105,10 +105,10 @@ class KafkaClient(object):
providing a file, only the leaf certificate will be checked against
this CRL. The CRL can only be ch... |
dr-prodigy__python-holidays-1257 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holidays/countries/greece.py:Greece._populate"
],
"edited_modules": [
"holidays/countries/greece.py:Greece"
]
},
"file": "holidays/countries/greece.py"
}
] | dr-prodigy/python-holidays | 4c691d998d1f31285d1a564e5ababcd3b00e973a | Missing Orthodox Good Friday in Greece national holiday
Hello team,
I was looking at your package's data and noticed one missing day for Greece.
Source: https://www.officeholidays.com/countries/greece/2022
Missing day: 2023 Fri, Apr 14 National Holiday (Orthodox Good Friday)
Would it be possible to include it i... | diff --git a/holidays/countries/greece.py b/holidays/countries/greece.py
index 28b24919..fae02e99 100644
--- a/holidays/countries/greece.py
+++ b/holidays/countries/greece.py
@@ -9,13 +9,12 @@
# Website: https://github.com/dr-prodigy/python-holidays
# License: MIT (see LICENSE file)
-from datetime import date
fr... |
dr-prodigy__python-holidays-1306 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holidays/holiday_base.py:HolidayBase.get_named",
"holidays/holiday_base.py:HolidayBase.pop_named"
],
"edited_modules": [
"holidays/holiday_base.py:HolidayBase"
]
},... | dr-prodigy/python-holidays | 522a9951f4457c68977016ecc8d8d9e08011f8d2 | Cannot "Pop" Combined Texas Emancipation/Juneteenth Holiday
Creating a holiday using TX as the state, there is the combined holiday 'Emancipation Day In Texas; Juneteenth National Independence Day'
Previous versions of python-holidays seemed to treat this concatenation with a comma a such: 'Emancipation Day In Texas... | diff --git a/holidays/holiday_base.py b/holidays/holiday_base.py
index 0690d59c..ccffa40c 100644
--- a/holidays/holiday_base.py
+++ b/holidays/holiday_base.py
@@ -724,7 +724,12 @@ class HolidayBase(Dict[date, str]):
if name
]
- def get_named(self, holiday_name: str, lookup="icontains") -> Lis... |
dr-prodigy__python-holidays-1325 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "holidays/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holidays/holida... | dr-prodigy/python-holidays | 2b0463684d23adacb331c03fda7b794534c16c6d | HolidayBase::pop_named won't remove holiday by a partial name
```
File ".../home-assistant-core/venv/lib/python3.10/site-packages/holidays/holiday_base.py", line 825, in pop_named
holiday_names.remove(name)
ValueError: list.remove(x): x not in list
``` | diff --git a/CHANGES b/CHANGES
index 38bd8937..04d3b680 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,10 @@
+Version 0.27.1
+==============
+
+Released June 21, 2023
+
+- Fix HolidayBase::pop_named partial holiday names removal (#1325 by @arkid15r)
+
Version 0.27
============
diff --git a/holidays/__init__.py b/hol... |
dr-prodigy__python-holidays-363 | [
{
"changes": {
"added_entities": [
"holidays/countries/spain.py:Spain._is_observed"
],
"added_modules": null,
"edited_entities": [
"holidays/countries/spain.py:Spain._populate"
],
"edited_modules": [
"holidays/countries/spain.py:Spain"
]
},
... | dr-prodigy/python-holidays | 5ead4697d65317cf22d17571f2843ea323733a75 | Spain Holidays that fall on Sunday are passed to Monday always
This year there are two days that fall on Sunday:
- 2020-11-01 Todos los Santos
- 2020-12-06 Día de la constitución Española
These days are not holidays. Right dates are:
- 2020-11-02 Todos los Santos
- 2020-12-07 Día de la constitución Española
... | diff --git a/holidays/countries/spain.py b/holidays/countries/spain.py
index a28448ea..8ac7bb8c 100644
--- a/holidays/countries/spain.py
+++ b/holidays/countries/spain.py
@@ -17,6 +17,7 @@ from dateutil.easter import easter
from dateutil.relativedelta import relativedelta as rd, TH, FR, MO
from holidays.constants imp... |
dr-prodigy__python-holidays-371 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holidays/countries/croatia.py:Croatia._populate"
],
"edited_modules": [
"holidays/countries/croatia.py:Croatia"
]
},
"file": "holidays/countries/croatia.py"
},
{
... | dr-prodigy/python-holidays | 5ead4697d65317cf22d17571f2843ea323733a75 | Wrong workday info for country HR
Today (Oct. 8, 2020) my alarmclock automation did not go off, because my workday sensor gave the wrong info (no workday). This day used to be a holiday in Croatia, but is not anymore.
binary_sensor:
- platform: workday
country: HR

-from datetime import da... |
dr-prodigy__python-holidays-372 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "holidays/countries/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holid... | dr-prodigy/python-holidays | 5ead4697d65317cf22d17571f2843ea323733a75 | Revisit #211 to include FR for France
This is an appeal to reconsider the request in #211
Started using this library and I really like it, but this one exception to the [iso3166 standard](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) is most unexpected. I'll skip a lengthy opinion on the value of st... | diff --git a/README.rst b/README.rst
index 2816fdbf..1f64edd3 100644
--- a/README.rst
+++ b/README.rst
@@ -121,7 +121,7 @@ England None
Estonia EE/EST None
EuropeanCentralBank ECB/TAR Trans-European Automated Real-time Gross Settlement (TARGET2)
Finland FI/FIN No... |
dr-prodigy__python-holidays-376 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "holidays/countries/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holid... | dr-prodigy/python-holidays | 5ead4697d65317cf22d17571f2843ea323733a75 | pop_named() sometimes generates an exception
This simple code block generates an exception when I try to pop "Columbus Day" (last line):
```
from datetime import date
import holidays
us_holidays = holidays.CountryHoliday('US', prov=None, state='CA', years=2022)
print(us_holidays.get('2022-10-10').format(... | diff --git a/CHANGES b/CHANGES
index e1bd7d2f..ae8f75c8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,11 +5,15 @@ Released ????? ??, ????
- Support for Djibouti (Abdisamade)
- Support for United Arab Emirates (marcomasulli, mborsetti)
+- Support for Chile (mborsetti, dr-p)
- Korea 2020 fix (MYUNGJE, dr-p)
- Australia ... |
dr-prodigy__python-holidays-451 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holidays/countries/singapore.py:Singapore._populate"
],
"edited_modules": [
"holidays/countries/singapore.py:Singapore"
]
},
"file": "holidays/countries/singapore.py"
... | dr-prodigy/python-holidays | 7aee7b4fef2b8068433e308a2284993cd3fdf6d1 | Can't un-pickle a `HolidayBase`
Seems that after a holidays class, e.g. `holidays.UnitedStates()` is used once, it can't be un-pickled.
For example, this snippet:
```python
import holidays
import pickle
from datetime import datetime
# Works:
us_holidays = holidays.UnitedStates()
us_holidays_ = pickle.load... | diff --git a/CHANGES b/CHANGES
index f54702d9..4a4c5a9f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -15,6 +15,7 @@ Released -
- Japan fix #445 (osoken)
- Serbia fix #446 (kosugor)
- United Kingdom get_list fix #448 (bletham)
+- Singapore fix for multi-year #419 (mborsetti)
Version 0.10.5.2
diff --git a/holidays/count... |
dr-prodigy__python-holidays-469 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "holidays/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holidays/countr... | dr-prodigy/python-holidays | a33745d6c356770a0c48949fdad262f71da403f2 | 2 april 2021 in spain
hi,
dt.date(2021, 4, 2) in holidays.ES() don't work | diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
index d9f561c6..91493ede 100644
--- a/.github/workflows/ci-cd.yml
+++ b/.github/workflows/ci-cd.yml
@@ -11,7 +11,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
- name: Run pre-commit
- uses: pre-commit/a... |
dr-prodigy__python-holidays-555 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holidays/countries/spain.py:Spain._populate"
],
"edited_modules": [
"holidays/countries/spain.py:Spain"
]
},
"file": "holidays/countries/spain.py"
}
] | dr-prodigy/python-holidays | 5d89951a3390a8cf3ff73580e93aaace0bca0071 | October 25 is no longer holiday in Spain Prov=PV
I'm using the WORKDAY integration of Home Assistant to obtain a binary sensor for workdays.
AFAIK python-holidays is being used "under the hood" in this integration
Yesterday October 25th was wrongly marked as holiday.
It's not holiday since 2014.
More info (sorry,... | diff --git a/holidays/countries/spain.py b/holidays/countries/spain.py
index 6b2c8dd0..3fd94870 100644
--- a/holidays/countries/spain.py
+++ b/holidays/countries/spain.py
@@ -185,7 +185,10 @@ class Spain(HolidayBase):
elif self.prov == "NC":
self._is_observed(date(year, SEP, 27), "Día de N... |
dr-prodigy__python-holidays-586 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holidays/countries/angola.py:Angola._populate"
],
"edited_modules": [
"holidays/countries/angola.py:Angola"
]
},
"file": "holidays/countries/angola.py"
},
{
"ch... | dr-prodigy/python-holidays | f1ec50378e8fe537b6803cc0156bd064bb258a1d | US Holidays Error: dictionary changed during iteration when passing years to holidays.US constructor
Attempting to use code to get US holidays for specific years. This code works for some countries but not US (nor Canada)
```
import holidays
import numpy as np
print(holidays.__version__)
years = np.array([2011,... | diff --git a/holidays/countries/angola.py b/holidays/countries/angola.py
index c911b8ec..7bbf7b9e 100644
--- a/holidays/countries/angola.py
+++ b/holidays/countries/angola.py
@@ -17,8 +17,8 @@ from dateutil.easter import easter
from dateutil.relativedelta import relativedelta as rd
-from holidays.constants import ... |
dr-prodigy__python-holidays-713 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "holidays/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"holidays/countr... | dr-prodigy/python-holidays | 7e2e90d513c98a1f7413e55628a7bde3174e5f7d | Holiday names sorting
While I was working on Bolivia holidays one of my tests caught an error with holiday names when two holidays fall on the same day. In this particular case it was one regional holiday (La Tablada in Tarija) and Viernes Santo holiday. In 2022 they both fell on Apr 15, so I had to make a separate tes... | diff --git a/CHANGES b/CHANGES
index 537c4e2e..d0d606d8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,13 +1,28 @@
-Version 0.16
+Version 0.17
============
Released ?????? ??, ????
+
+
+Version 0.16
+============
+
+Released September 16, 2022
+
+This release is dedicated to Queen Elizabeth II (21 April 1926 – 8 Septem... |
dr-prodigy__python-holidays-758 | [
{
"changes": {
"added_entities": [
"holidays/countries/canada.py:Canada._get_nearest_monday"
],
"added_modules": null,
"edited_entities": [
"holidays/countries/canada.py:Canada._populate"
],
"edited_modules": [
"holidays/countries/canada.py:Canada"
... | dr-prodigy/python-holidays | 4b83875321cff0778b58a9eada462d94ce46b3cd | Some holidays of Uruguay are incorrect.
Hello.
Some holidays for Uruguay are incorrect.
- The Battle of stones was in May, 18.
- The Respect for Cultural Diversity Day or Columbus day is October, 12.
In Uruguay are 2 categories of holidays (laborables and not laborables). In the not laborable holidays nobody wo... | diff --git a/CHANGES b/CHANGES
index e1584bfb..14203272 100644
--- a/CHANGES
+++ b/CHANGES
@@ -18,7 +18,7 @@ Released ?????? ??, ????
- Malaysia fix #736 (shahonseven)
- Ukraine fixes #743, #746 (KJhellico)
- Bulgaria fixes #748 (KJhellico)
-- Various refactorings #756, #759, #760, #766, #767 (KJhellico)
+- Various ... |
dr-prodigy__python-holidays-794 | [
{
"changes": {
"added_entities": [
"holidays/countries/eswatini.py:Swaziland.__init__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"holidays/countries/eswatini.py:Swaziland"
]
},
"file": "holidays/countries/eswatini.py"
}
] | dr-prodigy/python-holidays | 6f3242d6e357c00dd5878e1f21d24cbe1aaa25ed | DeprecationWarning upon "import holidays" in version 0.17
The implementation of deprecating the Swaziland calendar contains a bug. Just importing the holidays package is enough to fire the `DeprecationWarning`.
**Steps to reproduce (in bash):**
```bash
# Setup
python -m venv demo
source demo/bin/activate
pip ... | diff --git a/holidays/countries/eswatini.py b/holidays/countries/eswatini.py
index 00ca75bf..798bd495 100644
--- a/holidays/countries/eswatini.py
+++ b/holidays/countries/eswatini.py
@@ -80,11 +80,13 @@ class Eswatini(HolidayBase):
class Swaziland(Eswatini):
- warnings.warn(
- "Swaziland is deprecated, u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.