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 |
|---|---|---|---|---|---|
joshuadavidthomas__django-bird-58 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/django_bird/components/params.py:Param.render"
],
"edited_modules": [
"src/django_bird/components/params.py:Param"
]
},
"file": "src/django_bird/components/params.p... | joshuadavidthomas/django-bird | 0c4a379105fe3c57ce07f5baebc251fae95dc99c | Adjust Documentation section of README with recent feature changes
A bit out of date as we now have props in addition to attrs, plus dynamic component names. Maybe some other changes too.. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 92d6d82..89e6b51 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,10 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
## [Unreleased]
+### Changed
+
+- Improved handling of boolean attributes to support all forms of Django t... |
joshuadavidthomas__django-bird-71 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/django_bird/components.py:Registry.get_component"
],
"edited_modules": [
"src/django_bird/components.py:Registry"
]
},
"file": "src/django_bird/components.py"
}
] | joshuadavidthomas/django-bird | ae7d0acaa92932938e67477aec6e8d39cc2b1c09 | Component caching too aggressive in dev
I'm having to restart the development server anytime I make a change to a component. It's annoying. Maybe if `DEBUG = True` we should not cache. Yeah, that'd be nice. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9203d0b..2f66718 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,10 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
## [Unreleased]
+### Changed
+
+- When `DEBUG=True`, the `django_bird.components.Registry` will no longer ... |
joshuadavidthomas__django-bird-79 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/django_bird/loader.py:BirdLoader.__init__",
"src/django_bird/loader.py:BirdLoader._scan_for_components"
],
"edited_modules": [
"src/django_bird/loader.py:BirdLoader"
... | joshuadavidthomas/django-bird | b4f897078f9f7449c5bff7a37fe2a8dbd441f51d | Asset tags and registry do not work with more complicated loader setup
In a project using `django-template-partials` for instance, the loaders are not a flat list of loaders, but a tuple with the template partial loader first and then the list of loaders:
```python
[
(
"template_partials.loader.Loader... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 18e5e76..b784fc9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,10 @@ and this project attempts to adhere to [Semantic Versioning](https://semver.org/
- Improved handling of quoted vs unquoted attribute values in `{% bird %}` components. Quoted values (e.g., ... |
joshvillbrandt__wireless-9 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"wireless/Wireless.py:cmd"
],
"edited_modules": [
"wireless/Wireless.py:cmd"
]
},
"file": "wireless/Wireless.py"
}
] | joshvillbrandt/wireless | 03fe4987e50aae45132ad3f4c2f6cb3ff2263adc | Python3 support
Traceback (most recent call last):
File "/home/xayon/.virtualenvs/smoothie/lib/python3.4/site-packages/rq/worker.py", line 568, in perform_job
rv = job.perform()
File "/home/xayon/.virtualenvs/smoothie/lib/python3.4/site-packages/rq/job.py", line 495, in perform
self._result = self.fun... | diff --git a/wireless/Wireless.py b/wireless/Wireless.py
index d9bb653..389dee9 100644
--- a/wireless/Wireless.py
+++ b/wireless/Wireless.py
@@ -8,7 +8,8 @@ from time import sleep
def cmd(cmd):
return subprocess.Popen(
cmd, shell=True,
- stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout.rea... |
joshy__striprtf-54 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"striprtf/striprtf.py:rtf_to_text"
],
"edited_modules": [
"striprtf/striprtf.py:rtf_to_text"
]
},
"file": "striprtf/striprtf.py"
}
] | joshy/striprtf | e68ead6986a4312648e6126a1263167bf371b5d6 | fonttbl support: Fonts might enforce different encoding per section
This is the rtf I have.
```
{\rtf1\fbidis\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Microsoft Sans Serif;}{\f1\fswiss\fcharset134 Microsoft YaHei;}{\f2\fnil Microsoft Sans Serif;}}
{\*\generator Riched20 10.0.19041}\v... | diff --git a/striprtf/striprtf.py b/striprtf/striprtf.py
index fe3bf4a..1ea79b8 100644
--- a/striprtf/striprtf.py
+++ b/striprtf/striprtf.py
@@ -1,11 +1,11 @@
import re
import codecs
+
"""
Taken from https://gist.github.com/gilsondev/7c1d2d753ddb522e7bc22511cfb08676
and modified for better output of tables.
"""
... |
josiah-wolf-oberholtzer__uqbar-94 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "uqbar/_version.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"uqbar/book/sphinx.... | josiah-wolf-oberholtzer/uqbar | 4328e723fd91ba10aa2634ff59b5127ca9ffa5af | Sphinx 8/9 warning and deprecation warning
```bash
tests/conftest.py:6
/build/uqbar-0.7.1/tests/conftest.py:6: RemovedInSphinx90Warning: 'sphinx.testing.path' is deprecated. Use 'os.path' or 'pathlib' instead.
from sphinx.testing.path import path
tests/test_book_sphinx.py: 11 warnings
/build/uqbar-0.7.1... | diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index d1960e1..84cbc1e 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -9,11 +9,11 @@ jobs:
name: Build docs
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/che... |
josuebrunel__pysxm-24 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pysxm/pysxm.py:BaseType.xml"
],
"edited_modules": [
"pysxm/pysxm.py:BaseType"
]
},
"file": "pysxm/pysxm.py"
}
] | josuebrunel/pysxm | ef564323e5b79bc0caa527e09b3f80462bdd6ec0 | List of objects in class definition does not serialize
Hi I am new to Python: I have the code
```
class TheSystem(ComplexType):
tagname='SYSTEM'
def __init__(self) -> None:
self.NAME = None
self.PROPERTIES: list[Property] = None
class Property(ComplexType):
tagname='PROPERTY'
... | diff --git a/pysxm/pysxm.py b/pysxm/pysxm.py
index 91368b6..36c07c3 100644
--- a/pysxm/pysxm.py
+++ b/pysxm/pysxm.py
@@ -90,6 +90,16 @@ class BaseType(object):
continue
if is_safe_type(attr):
element.append(self.make_element(subelt, attr, nsmap=self.klass.nsmap... |
joweich__chat-miner-104 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"chatminer/visualizations.py:sunburst",
"chatminer/visualizations.py:wordcloud",
"chatminer/visualizations.py:calendar_heatmap",
"chatminer/visualizations.py:radar",
"chat... | joweich/chat-miner | d3ef04fe7fc3714e6d2400a7c0e1509cada109de | Can't run the parser
Is there a specific Python version that should be used to run this parser? I can't run this, every time I solve an issue I have another one. I'm currently using Python 3.10.0. | diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml
index e0337f5..dd58d3f 100644
--- a/.github/workflows/pylint.yml
+++ b/.github/workflows/pylint.yml
@@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ["3.8", "3.9", "3.10"]
+ python-ver... |
joweich__chat-miner-93 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"chatminer/chatparsers.py:WhatsAppParser._parse_message"
],
"edited_modules": [
"chatminer/chatparsers.py:WhatsAppParser"
]
},
"file": "chatminer/chatparsers.py"
}
] | joweich/chat-miner | a812fc4f70cf40e6f3d0b65f9a044ae4f2a4aab3 | ValueError: not enough values to unpack (expected 2, got 1)
Seeing the following error while using the WhatsApp parser:
```
22.04.2023 12:04:32 INFO
Depending on the platform, the message format in chat logs might not be
standardized accross devices/versions/localization and might cha... | diff --git a/chatminer/chatparsers.py b/chatminer/chatparsers.py
index d402c2a..d1d2890 100644
--- a/chatminer/chatparsers.py
+++ b/chatminer/chatparsers.py
@@ -164,8 +164,11 @@ class WhatsAppParser(Parser):
datestr, dayfirst=self._datefmt.is_dayfirst, fuzzy=True
)
- if ":" in author_and_... |
jpadilla__pyjwt-1040 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api_jwt.py:PyJWT.encode",
"jwt/api_jwt.py:PyJWT._validate_iss"
],
"edited_modules": [
"jwt/api_jwt.py:PyJWT"
]
},
"file": "jwt/api_jwt.py"
}
] | jpadilla/pyjwt | ebc941de508f76acaa78defb15197092458f1874 | The `iss` value isn't validated when encoding payload
I was looking into what PyGitHub does and writing test for it, invoking its JWT methods. Then I attempted decoding that JWT with `jwt.decode(..., issuer=123)` since there was `'iss': 123` in the object. The validator treats anything non-`str` as iterables and crashe... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 32850f2..87fe41e 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -11,7 +11,7 @@ Fixed
~~~~~
- Validate key against allowed types for Algorithm family in `#964 <https://github.com/jpadilla/pyjwt/pull/964>`__
- Add iterator for JWKSet in `#1041 <https://github.com/jpa... |
jpadilla__pyjwt-1045 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/algorithms.py:get_d... | jpadilla/pyjwt | 9085670a1f69de3e86c7d122317c3b2707e0123b | Published types aren't complete enough for Pyright/Pylance
It seems a bit unfair to file this as a "bug," when really what's going on is that the Python community is trying to figure out what a "typed" Python library looks like. In this case, what looks like perfectly reasonable code is, in another light, not explicit ... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 87fe41e..179c440 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -12,11 +12,13 @@ Fixed
- Validate key against allowed types for Algorithm family in `#964 <https://github.com/jpadilla/pyjwt/pull/964>`__
- Add iterator for JWKSet in `#1041 <https://github.com/jpadilla... |
jpadilla__pyjwt-122 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api.py:PyJWT._verify_signature"
],
"edited_modules": [
"jwt/api.py:PyJWT"
]
},
"file": "jwt/api.py"
}
] | jpadilla/pyjwt | 8f28b4a6124830fcea400668840e645bb91e38a2 | non-numeric expiration claim does not raise an error
I would expect a non-numeric expiration claim to raise an error but it does not. To reproduce, here's a JWT with ``{exp: '<not a number>'}``':
````
>>> import jwt
>>> import calendar, time
>>> iat = calendar.timegm(time.gmtime())
>>> token = jwt.encode({'aud':... | diff --git a/jwt/api.py b/jwt/api.py
index 5f2ce6f..201bffd 100644
--- a/jwt/api.py
+++ b/jwt/api.py
@@ -181,16 +181,32 @@ class PyJWT(object):
except KeyError:
raise InvalidAlgorithmError('Algorithm not supported')
+ if 'iat' in payload:
+ try:
+ int(payload['ia... |
jpadilla__pyjwt-131 | [
{
"changes": {
"added_entities": [
"jwt/api.py:PyJWT._merge_options"
],
"added_modules": null,
"edited_entities": [
"jwt/api.py:PyJWT.__init__",
"jwt/api.py:PyJWT.decode",
"jwt/api.py:PyJWT._validate_claims"
],
"edited_modules": [
"jwt/... | jpadilla/pyjwt | a2601ad46433a99c8777a74abeaf4dfd70630d17 | Add more flexible and complete verification options
I was thinking that it might be useful for us to implement more flexible verification options.
I propose something like this:
```
def decode(token, secret, options=None)
```
where options is a dict that looks something like this:
```
options = {
'veri... | diff --git a/AUTHORS b/AUTHORS
index be65bf8..02fbc3b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -21,3 +21,5 @@ Patches and Suggestions
- Mark Adams <mark@markadams.me>
- Wouter Bolsterlee <uws@xs4all.nl>
+
+ - Michael Davis <mike.philip.davis@gmail.com> <mike.davis@workiva.com>
diff --git a/CHANGELOG.md b/CHANGELOG.m... |
jpadilla__pyjwt-608 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api_jwt.py:PyJWT.decode_complete"
],
"edited_modules": [
"jwt/api_jwt.py:PyJWT"
]
},
"file": "jwt/api_jwt.py"
}
] | jpadilla/pyjwt | 3993ce1d3503b58cf74699a89ba9e5c18ef9b556 | jwt.decode verify_signature=False and verify_exp=True doesn't work properly
When trying to decode an expired token to see if it needs a refresh, the expected exception doesn't raise.
## Expected Result
I expect the following code to raise an `ExpiredSignatureError`
## Actual Result
However it doesn't raise... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1fb0890..4a5b5ee 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,7 +6,7 @@ repos:
args: ["--target-version=py36"]
- repo: https://github.com/asottile/blacken-docs
- rev: v1.9.1
+ rev: v1.9.2
hooks:
... |
jpadilla__pyjwt-623 | [
{
"changes": {
"added_entities": [
"jwt/algorithms.py:Ed25519Algorithm.from_jwk"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"jwt/algorithms.py:Ed25519Algorithm"
]
},
"file": "jwt/algorithms.py"
}
] | jpadilla/pyjwt | f6d4bbfa9feb9ed56c54de6011678adf48af4ac7 | Support from_jwk for Ed25519Algorithm
I'd like to use `get_signing_key_from_jwk()` for JWT with alg=EdDSA.
But, at the moment, it seems that pyjwt does not support it because `Ed25519Algorithm` does not have `from_jwk()`.
Do you have a plan to support that?
If you don't have the plan, I can send a PR for that.
... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index c3850a5..5c46c97 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -23,6 +23,7 @@ Added
- Add caching by default to PyJWKClient `#611 <https://github.com/jpadilla/pyjwt/pull/611>`__
- Add missing exceptions.InvalidKeyError to jwt module __init__ imports `#620 <https://... |
jpadilla__pyjwt-624 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api_jwk.py:PyJWK.__init__"
],
"edited_modules": [
"jwt/api_jwk.py:PyJWK"
]
},
"file": "jwt/api_jwk.py"
}
] | jpadilla/pyjwt | 88972a9bd962fceee8251cfff0e41f3d77e56551 | PyJWKClient should use "kty" not "alg" parameter
`PyJWKClient` requires keys to have the `alg` parameter, which is an *OPTIONAL* member of a JWK (see [RFC 7517 sec. 4.4](https://tools.ietf.org/html/rfc7517#section-4.4)).
`PyJWKClient `should instead rely on the `kty` parameter to determine the type of public key. ... | diff --git a/docs/algorithms.rst b/docs/algorithms.rst
index a686b1d..10402f0 100644
--- a/docs/algorithms.rst
+++ b/docs/algorithms.rst
@@ -8,6 +8,7 @@ This library currently supports:
* HS384 - HMAC using SHA-384 hash algorithm
* HS512 - HMAC using SHA-512 hash algorithm
* ES256 - ECDSA signature algorithm using S... |
jpadilla__pyjwt-629 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/algorithms.py:get_default_algorithms",
"jwt/algorithms.py:ECAlgorithm.from_jwk"
],
"edited_modules": [
"jwt/algorithms.py:get_default_algorithms",
"jwt/algorithms... | jpadilla/pyjwt | 22b1d02bb3c7d359e63aaf227851c075b72cae7f | Add Support for Algorithm ES256K
In Bitcoin and Ethereum the elliptic curve signature algorithm with curve es256k1 (abbreviation: ES256K) is used. PyJWT currently does not support this algorithm.
| diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 4a5b5ee..00c43dc 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -6,7 +6,7 @@ repos:
args: ["--target-version=py36"]
- repo: https://github.com/asottile/blacken-docs
- rev: v1.9.2
+ rev: v1.10.0
hooks:
... |
jpadilla__pyjwt-643 | [
{
"changes": {
"added_entities": [
"jwt/algorithms.py:Ed25519Algorithm.to_jwk"
],
"added_modules": null,
"edited_entities": [
"jwt/algorithms.py:ECAlgorithm.verify"
],
"edited_modules": [
"jwt/algorithms.py:ECAlgorithm",
"jwt/algorithms.py:Ed25... | jpadilla/pyjwt | fc7a708149d7fc75a9053b76129067c98b49d09f | Support to_jwk for Ed25519Algorithm
after [Support of form_jwk()](https://github.com/jpadilla/pyjwt/issues/621) it would be nice to implement
to_jwk() for Ed25519Algorithm
| diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index e67381f..624b676 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -18,6 +18,7 @@ Fixed
- Remove padding from JWK test data. `#628 <https://github.com/jpadilla/pyjwt/pull/628>`__
- Make `kty` mandatory in JWK to be compliant with RFC7517. `#624 <https://github.com/jpad... |
jpadilla__pyjwt-644 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api_jws.py:PyJWS.encode"
],
"edited_modules": [
"jwt/api_jws.py:PyJWS"
]
},
"file": "jwt/api_jws.py"
}
] | jpadilla/pyjwt | 8de44287752f9d2c0112bb3062389462d56ead86 | Ability to remove dictionary value "typ": "JWT" from jwt header
Suggest an idea for this project.
Hi, I'm hitting a limitation where I cannot use this library as it is adding the "typ": "JWT" dict to the header automatically.
A similar issue has been reported below.
https://stackoverflow.com/questions/61511738/pyj... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index b049e9e..f122fe7 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -15,6 +15,7 @@ Fixed
- Prefer `headers["alg"]` to `algorithm` in `jwt.encode()`. `#673 <https://github.com/jpadilla/pyjwt/pull/673>`__
- Fix aud validation to support {'aud': null} case. `#670 <https:... |
jpadilla__pyjwt-657 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api_jws.py:PyJWS.decode_complete",
"jwt/api_jws.py:PyJWS.decode"
],
"edited_modules": [
"jwt/api_jws.py:PyJWS"
]
},
"file": "jwt/api_jws.py"
},
{
"c... | jpadilla/pyjwt | fdd795ad08f91fb110d1578619506bfb767fdb30 | jwt.decode returns Signature has expired
I expect the decoded result of JWT, but it returns an error `Signature has expired`
## Reproduction Steps
```python
import jwt
try:
payload: Dict = jwt.decode(token_obj[1], SECRET_KEY, algorithms=['HS256'], verify=True)
except Exception as err:
retur... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index f122fe7..1c1c451 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -10,6 +10,8 @@ This project adheres to `Semantic Versioning <https://semver.org/>`__.
Changed
~~~~~~~
+- Remove arbitrary kwalgs. `#657 <https://github.com/jpadilla/pyjwt/pull/657>`__
+
Fixed
~~~~~
... |
jpadilla__pyjwt-670 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api_jwt.py:PyJWT._validate_aud"
],
"edited_modules": [
"jwt/api_jwt.py:PyJWT"
]
},
"file": "jwt/api_jwt.py"
}
] | jpadilla/pyjwt | db18661724305f7bc0663e738759222158900bb8 | {"aud": null } should be ignored
It is a rare case but I found an example that {”aud”: null }is set.
According to RFC7519(JWT), it is usually a list of strings or a string, but there is no specification about the type of "aud".
## Expected Result
{"aud": null} should be treated the same as unspecified.
## Act... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 2c33e32..632d7f9 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/psf/black
- rev: 21.6b0
+ rev: 21.7b0
hooks:
- id: black
args: ["--target-version=py36... |
jpadilla__pyjwt-673 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api_jws.py:PyJWS.encode"
],
"edited_modules": [
"jwt/api_jws.py:PyJWS"
]
},
"file": "jwt/api_jws.py"
},
{
"changes": {
"added_entities": null,
"... | jpadilla/pyjwt | c8ab900b831c4e859620c964d25737bf95d5eeb8 | Malformed JWTs due to different signing algorithms in `headers` and `algorithm` parameters
Generating JWTs (`encode()`) with `alg` key set in `headers` parameter along with a different `algorithm` parameter value results in malformed JWTs.
Example `headers` and `algorithm` values that will result in malformed token... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 632d7f9..505e374 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -18,7 +18,7 @@ repos:
language_version: python3.8
- repo: https://github.com/PyCQA/isort
- rev: 5.9.2
+ rev: 5.9.3
hooks:
- id: isor... |
jpadilla__pyjwt-725 | [
{
"changes": {
"added_entities": [
"jwt/api_jwk.py:PyJWKSet.__getitem__"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"jwt/api_jwk.py:PyJWKSet"
]
},
"file": "jwt/api_jwk.py"
}
] | jpadilla/pyjwt | 77d791681fa3d0ba65a648de42dd3d671138cb95 | New API: Retrieving a key by KID from a `PyJWKSet`?
First of all, thanks for creating and maintaining this library!
The current `PyJWKSet` API is pretty thin: it wraps a list of `PyJWK` and provides basic deserialization, but nothing else.
I'd like to propose adding `PyJWKSet.__getitem__`, which would allow a use... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 498a544..06d281c 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -16,6 +16,8 @@ Fixed
Added
~~~~~
+- Add ``PyJWKSet.__getitem__`` for indexing keysets by key ID `#725 <https://github.com/jpadilla/pyjwt/pull/725>`__
+
`v2.3.0 <https://github.com/jpadilla/pyjwt/comp... |
jpadilla__pyjwt-775 | [
{
"changes": {
"added_entities": [
"jwt/algorithms.py:Algorithm.compute_hash_digest"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"jwt/algorithms.py:Algorithm"
]
},
"file": "jwt/algorithms.py"
}
] | jpadilla/pyjwt | 345549567dbb58fd7bf901392cf6b1a626f36e24 | Support exposure of hash algorithm digest to handle OIDC at_hash, potentially other spec extensions
#296 was closed with the suggestion that rather than special-case support for OIDC, PyJWT could support pluggable verifiers which handle additional, specialized claim validation behavior.
If there's a general market f... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 8ec7ede..4d56207 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -18,6 +18,10 @@ Fixed
Added
~~~~~
+- Add ``compute_hash_digest`` as a method of ``Algorithm`` objects, which uses
+ the underlying hash algorithm to compute a digest. If there is no appropriate
+ ha... |
jpadilla__pyjwt-846 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api_jwk.py:PyJWK.__init__",
"jwt/api_jwk.py:PyJWK.key_type",
"jwt/api_jwk.py:PyJWK.key_id",
"jwt/api_jwk.py:PyJWKSet.__init__"
],
"edited_modules": [
"jwt... | jpadilla/pyjwt | 4e15dbd9aaef56b78ac8f885220d94f785d2b30c | very unhelpfull / missleading error messages on get_signing_key_from_jwt
Hello,
I spend a few hours today for a bug that shouldn't have been there. I set up my python application where I recieve a jwt token from oauth-proxy, validate, decode and echo the contents.
Running locally, everything went perfect. Running i... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 3c69338..12117ec 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -16,6 +16,7 @@ Fixed
~~~~~
- Add classifier for Python 3.11 by @eseifert in `#818 <https://github.com/jpadilla/pyjwt/pull/818>`_
+- Fix ``_validate_iat`` validation by @Viicos in `#847 <https://github... |
jpadilla__pyjwt-847 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/api_jwt.py:PyJWT._validate_iat"
],
"edited_modules": [
"jwt/api_jwt.py:PyJWT"
]
},
"file": "jwt/api_jwt.py"
}
] | jpadilla/pyjwt | 4e15dbd9aaef56b78ac8f885220d94f785d2b30c | PyJWT 2.6.0 IAT Decode Error - TypeError: '>' not supported between instances of 'str' and 'int'
# Summary
Just upgraded to version `2.6.0` and now whenever I try to do a decode of a JWT I get the following error:
```python
def _validate_iat(self, payload, now, leeway):
iat = payload["iat"]
try:
... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 3c69338..12117ec 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -16,6 +16,7 @@ Fixed
~~~~~
- Add classifier for Python 3.11 by @eseifert in `#818 <https://github.com/jpadilla/pyjwt/pull/818>`_
+- Fix ``_validate_iat`` validation by @Viicos in `#847 <https://github... |
jpadilla__pyjwt-881 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "jwt/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/algorithms.py:Al... | jpadilla/pyjwt | d8b12421654840418fd25b86553795c0c09ed0a9 | Support returning `Algorithm.to_jwk(key)` as dict
Currently, the when generating a JWK, the only way to get a `dict` from PyJWT is to:
```python
jwk_str = algo.to_jwk(key)
jwk = json.loads(jwk_str)
```
This is very unfortunate when you want to add more fields into the JWK:
```python
modified_jwk = {
*... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1b55f4a..878b786 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -15,7 +15,7 @@ repos:
rev: 6.0.0
hooks:
- id: flake8
- language_version: python3.8
+ language_version: python3.9
- repo: https:/... |
jpadilla__pyjwt-886 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jwt/algorithms.py:Algor... | jpadilla/pyjwt | 12420204cfef8fea7644532b9ca82c0cc5ca3abe | Should `jwt.decode` accept `PyJWK` keys?
First of all, thanks for `pyjwt`!
I'm implementing the consumer side of an OIDC flow, with the verification keys being retrieved periodically from the OIDC provider's JSON Web Key (JWK) set. I then turn each JWK's contents into this library's `PyJWK` type.
## Expected Resu... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index b6a538a..aa29add 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -54,9 +54,11 @@ jobs:
- name: "Upload coverage to Codecov"
if: "contains(env.USING_COVERAGE, matrix.python-version) && matrix.platform... |
jparise__flake8-assertive-8 | [
{
"changes": {
"added_entities": [
"flake8_assertive.py:args"
],
"added_modules": [
"flake8_assertive.py:args"
],
"edited_entities": [
"flake8_assertive.py:Checker.check_assertequal",
"flake8_assertive.py:Checker.check_assertalmostequal",
"fl... | jparise/flake8-assertive | 36d4999f2b345c8f9e812cf7c8c297db94d874bd | can not handle keyword arguments
For the following test case
```python
class TestCase:
def test_one(
self,
):
self.assertTrue(
expr=some_value,
)
```
flake8 raises the following exception.
```python
Traceback (most recent call last):
File "/home/wavenator/... | diff --git a/flake8_assertive.py b/flake8_assertive.py
index e2dff4c..841356c 100644
--- a/flake8_assertive.py
+++ b/flake8_assertive.py
@@ -49,6 +49,13 @@ def is_assert_method_call(node):
node.func.attr.startswith('assert'))
+def args(node):
+ for arg in node.args:
+ yield arg
+ for arg i... |
jpetrucciani__hubspot3-78 | [
{
"changes": {
"added_entities": [
"hubspot3/base.py:BaseClient.access_token",
"hubspot3/base.py:BaseClient.refresh_token"
],
"added_modules": null,
"edited_entities": [
"hubspot3/base.py:BaseClient.__init__",
"hubspot3/base.py:BaseClient.credentials"
... | jpetrucciani/hubspot3 | 3833b4b1c44927e8478d578b727df82d7feffb57 | Proposal to improve support for oauth2 authentication with multiple clients
## Introduction
Hi @jpetrucciani, I've submitted a small handful of PRs in the past and I'm a regular user/advocate of the project. The company I work at would like to use the library in a distributed environment with oauth2 authentication, ... | diff --git a/hubspot3/base.py b/hubspot3/base.py
index 7f9f82f..95937e5 100644
--- a/hubspot3/base.py
+++ b/hubspot3/base.py
@@ -10,7 +10,8 @@ import urllib.request
import urllib.parse
import urllib.error
import zlib
-from typing import List, Union
+from typing import Callable, List, Optional, Union
+from typing_ext... |
jquast__blessed-130 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"bin/colorchart.py:draw_chart"
],
"edited_modules": [
"bin/colorchart.py:draw_chart"
]
},
"file": "bin/colorchart.py"
},
{
"changes": {
"added_entities": n... | jquast/blessed | 8e070545ee047b845a1d6967ec97c39f61248671 | API Change: Terminal.move (y, x) => (x, y).
This issue duplicates upstream issue, https://github.com/erikrose/blessings/issues/58
## Problem
Terminal.location is (x, y) but Terminal.move is (y, x).
This causes issues with composability of positional (y, x) parameters. Also causes programmer mistakes.
## Solutio... | diff --git a/bin/colorchart.py b/bin/colorchart.py
index be7aa2a..57d247b 100644
--- a/bin/colorchart.py
+++ b/bin/colorchart.py
@@ -32,7 +32,6 @@ SORTED_COLORS = sort_colors()
def draw_chart(term):
"""Draw a chart of each X11 color represented as in 24-bit and as down-converted to 256, 16, and
8 color with ... |
jquast__blessed-260 | [
{
"changes": {
"added_entities": [
"blessed/keyboard.py:_reinit_escdelay"
],
"added_modules": [
"blessed/keyboard.py:_reinit_escdelay"
],
"edited_entities": null,
"edited_modules": null
},
"file": "blessed/keyboard.py"
},
{
"changes": {
"... | jquast/blessed | a34c6b1869b4dd467c6d1ab6895872bb72db7e0f | Conditionally set default esc_delay of inkey() from environment
from https://github.com/jquast/blessed/issues/156#issuecomment-600790544
- We should honor this lesser known `ESCDELAY` environment value as the default value of `Terminal.inkey(esc_delay)` if set, https://stackoverflow.com/a/28020568 and https://invisi... | diff --git a/.readthedocs.yml b/.readthedocs.yml
index 51cc31b..eb3a5cc 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -1,10 +1,17 @@
# https://docs.readthedocs.io/en/stable/config-file/v2.html
version: 2
+
sphinx:
configuration: docs/conf.py
+
formats: all
+
+build:
+ os: ubuntu-22.04
+ tools:
+ p... |
jrester__tesla_powerwall-60 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"tesla_powerwall/responses.py:BatteryResponse.from_dict"
],
"edited_modules": [
"tesla_powerwall/responses.py:BatteryResponse"
]
},
"file": "tesla_powerwall/responses.py... | jrester/tesla_powerwall | abd7cbb110790850b7d550d2c7dc47c9c63af368 | FEATURE REQUEST - Separate data for multiple PW batteries connected to a single gateway
Is it possible to extract data from separate PW batteries attached to a single gateway? I have 2 PW batteries connected to separate phases of a 3 phase installation. Specifically, I would like to know Battery AC Power (charge/discha... | diff --git a/CHANGELOG b/CHANGELOG
index ec03f2a..dc6f4d0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,7 +2,8 @@
## [0.5.1]
-- Use orjson for parsing json
+- Use orjson for parsing json (https://github.com/jrester/tesla_powerwall/pull/59)
+- Expose low level information for each battery pack (https://github.com/jr... |
jrester__tesla_powerwall-66 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"tesla_powerwall/const.py:GridState"
]
},
"file": "tesla_powerwall/const.py"
},
{
"changes": {
"added_entities": null,
"added_modules": nul... | jrester/tesla_powerwall | 89a8ce242f9a9b8a96e8b29bfe5101ff7191413e | Disabled battery causes traceback
This is a followup from the [Home Assistant core issue 110516](https://github.com/home-assistant/core/issues/110516)
I have 4 Powerwall batteries in my install and one of the batteries is inoperative and disabled. This causes a traceback when attempting to call `power_wall.get_batt... | diff --git a/CHANGELOG b/CHANGELOG
index 817dfee..20414e7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -3,6 +3,7 @@
## [WIP]
- Use yarl for URL parsing by @bdraco (https://github.com/jrester/tesla_powerwall/pull/62)
+- Correctly handle disabled battery packs (https://github.com/jrester/tesla_powerwall/pull/66/)
## ... |
jriddy__zerial-36 | [
{
"changes": {
"added_entities": [
"src/zerial/numpy.py:buffer_to_ndarray"
],
"added_modules": [
"src/zerial/numpy.py:buffer_to_ndarray"
],
"edited_entities": [
"src/zerial/numpy.py:tostr"
],
"edited_modules": [
"src/zerial/numpy.py:tostr... | jriddy/zerial | 30867c7d8f6565c180bb34560a5f3b2393896c8a | Numpy arrays coming from serialization are not writable
Looks like `np.frombuffer` keeps the `owndata` flag as `False`, which prevents the array from becoming writable. | diff --git a/src/zerial/numpy.py b/src/zerial/numpy.py
index e5f936e..5431318 100644
--- a/src/zerial/numpy.py
+++ b/src/zerial/numpy.py
@@ -33,8 +33,6 @@ if sys.version_info >= (3, 0):
return x.decode()
else:
return str(x)
-
- buffer_to_ndarray = np.frombuffer
else:
numpy_re... |
jrobichaud__django-structlog-107 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"django_structlog/middlewares/request.py:RequestMiddleware.bind_user_id"
],
"edited_modules": [
"django_structlog/middlewares/request.py:RequestMiddleware"
]
},
"file": ... | jrobichaud/django-structlog | 91aafd34a372d29d574640ad219a2f00a1005d6e | AttributeError "object has no attribute 'pk'" if "request.user" is not a Django model
In my Django application, users are not (always) associated with a model. In this case, I get an `AttributeError` in [`django_structlog/middlewares/request.py#L108`](https://github.com/jrobichaud/django-structlog/blob/master/django_st... | diff --git a/django_structlog/middlewares/request.py b/django_structlog/middlewares/request.py
index 9ec0366..296ee72 100644
--- a/django_structlog/middlewares/request.py
+++ b/django_structlog/middlewares/request.py
@@ -105,7 +105,9 @@ class RequestMiddleware:
@staticmethod
def bind_user_id(request):
... |
jrobichaud__django-structlog-263 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "django_structlog/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"django_... | jrobichaud/django-structlog | 66a9dc16e2298503df93dd6a1f350affd5e499b9 | Does django-structlog has compatibility with Celery Beat?
I've configured django-structlog to work with Celery by following the documentation, but I noticed that my Celery Beat worker doesn't produce any logs whenever it sends a new task or if the schedule was changed in the admin panel.
Can django-structlog also lo... | diff --git a/django_structlog/__init__.py b/django_structlog/__init__.py
index e7fa852..84b7404 100644
--- a/django_structlog/__init__.py
+++ b/django_structlog/__init__.py
@@ -4,6 +4,6 @@
name = "django_structlog"
-VERSION = (5, 1, 0)
+VERSION = (5, 2, 0)
__version__ = ".".join(str(v) for v in VERSION)
diff --... |
jrobichaud__django-structlog-318 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "config/urls.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"django_structlog/cele... | jrobichaud/django-structlog | 42a0e8dfca8f85c2286ef4a2d31f1142287e346f | Add child_task_id and child_task_name to task_revoked log
To be able to know which task was revoked, it could be a good idea to bind child_task_id and child_task_name to task_revoked log | diff --git a/config/urls.py b/config/urls.py
index 0bffaba..4e37443 100644
--- a/config/urls.py
+++ b/config/urls.py
@@ -29,6 +29,7 @@ urlpatterns = [
re_path(
r"^about/", TemplateView.as_view(template_name="pages/about.html"), name="about"
),
+ re_path(r"^revoke_task", views.revoke_task, name="re... |
jrobichaud__django-structlog-323 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "config/settings/local.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_mo... | jrobichaud/django-structlog | ce7dd5799fd49768a46041d49b0951d808ae738e | Improve metadata of exceptional celery signals
When fixing #317 I noted these improvement that should be made.
[task_revoked](https://docs.celeryq.dev/en/stable/userguide/signals.html#id15)
- [x] signum is an object and should be logged as a primitive
[task_unknown](https://docs.celeryq.dev/en/stable/userguide/s... | diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index 47da128..285d274 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -4,10 +4,12 @@
<inspection_tool class="PyCompatibilityInspection" enabled="... |
jrobichaud__django-structlog-345 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"django_structlog/apps.py:DjangoStructLogConfig.ready"
],
"edited_modules": [
"django_structlog/apps.py:DjangoStructLogConfig"
]
},
"file": "django_structlog/apps.py"
... | jrobichaud/django-structlog | 4b82f272b4d3e346b130dd3474164594f95dccd8 | Add queue information to task_enqueued log
Is there a way to add queue information to this log?
```
logger.info(
"task_enqueued",
child_task_id=headers.get("id") if headers else body.get("id"),
child_task_name=headers.get("task") if headers else body.get("task"),
)
```
Something... | diff --git a/django_structlog/apps.py b/django_structlog/apps.py
index 50f2958..726205a 100644
--- a/django_structlog/apps.py
+++ b/django_structlog/apps.py
@@ -8,11 +8,13 @@ class DjangoStructLogConfig(AppConfig):
def ready(self):
if app_settings.CELERY_ENABLED:
- from .celery.receivers impo... |
jrsmith3__ibei-72 | [
{
"changes": {
"added_entities": [
"src/ibei/models.py:BEI.full",
"src/ibei/models.py:BEI.photon_flux",
"src/ibei/models.py:BEI.radiant_power_flux",
"src/ibei/models.py:BEI.kT",
"src/ibei/models.py:BEI.reduced_energy_bound",
"src/ibei/models.py:BEI.reduced_c... | jrsmith3/ibei | bc9fb5875b38346ebd0e6188ab4b1af810c4cb18 | Add functionality to compute full Bose-Einstein integral
# Overview
Functionality to complete the full Bose-Einstein integral would be a good compliment to the upper-incomplete functionality.
# Related issues
* Depends on #68. | diff --git a/CHANGELOG b/CHANGELOG
index e568d1c..158497f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,7 @@
* 50: Leverage `tox` to run tests.
* 49: Refactor tests to use `pytest`.
* 48: Replace `conda` with `hatch`.
+* 43: Add method to compute full Bose-Einstein integral.
* 39: Update for basic compatibility... |
jsbronder__asyncio-dgram-2 | [
{
"changes": {
"added_entities": [
"asyncio_dgram/aio.py:Protocol.pause_writing",
"asyncio_dgram/aio.py:Protocol.resume_writing"
],
"added_modules": null,
"edited_entities": [
"asyncio_dgram/aio.py:DatagramStream.__init__",
"asyncio_dgram/aio.py:DatagramSt... | jsbronder/asyncio-dgram | 40cabedc88195bf85a3912752c02fed09385dc94 | DatagramStream.send should respect flow control
currently send is a coroutine that `awaits` nothing. it should be a `send/drain` pair of methods instead | diff --git a/asyncio_dgram/aio.py b/asyncio_dgram/aio.py
index 8117282..7487a98 100644
--- a/asyncio_dgram/aio.py
+++ b/asyncio_dgram/aio.py
@@ -22,17 +22,20 @@ class DatagramStream:
raised.
"""
- def __init__(self, transport, recvq, excq):
+ def __init__(self, transport, recvq, excq, drained):
... |
jsfehler__flake8-multiline-containers-128 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"flake8_multiline_containers.py:MultilineContainers._number_of_matches_in_line"
],
"edited_modules": [
"flake8_multiline_containers.py:MultilineContainers"
]
},
"file": ... | jsfehler/flake8-multiline-containers | a90bd084811ce980a27033a597f633a7b7f141d2 | False positives inside multiline string
I evaluated `flake8-multiline-containers 0.0.19` and running it on the following code raises two warnings:
```
foo = """
(lorem
) lorem ipsum!
"""
```
```
test.py:2:6: JS101 Multi-line container not broken after opening character
test.py:3:2: JS102 Multi-line containe... | diff --git a/flake8_multiline_containers.py b/flake8_multiline_containers.py
index e96b0b9..7803c14 100644
--- a/flake8_multiline_containers.py
+++ b/flake8_multiline_containers.py
@@ -10,6 +10,10 @@ STRING_REGEX = re.compile(
r'"([^"\\]*(\\.[^"\\]*)*)"|\'([^\'\\]*(\\.[^\'\\]*)*)\'',
)
+MULTILINE_STRING_REGEX =... |
jsvine__pdfplumber-213 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pdfplumber/page.py:Page.parse_objects"
],
"edited_modules": [
"pdfplumber/page.py:Page"
]
},
"file": "pdfplumber/page.py"
}
] | jsvine/pdfplumber | 81104301cb3b76a552dd4f2fd403321297c73d0f | Is it possible to extract Font Color?
Hi, I was just wondering if it's possible to extract the font color of characters from the PDF as they are normally available in the font-specs properties of the files.
I am aware of the `fontname` attribute of `pdf.chars` but is there any setting to extract other font propertie... | diff --git a/pdfplumber/page.py b/pdfplumber/page.py
index c8e23f0..bbf052e 100644
--- a/pdfplumber/page.py
+++ b/pdfplumber/page.py
@@ -132,6 +132,11 @@ class Page(Container):
attr["object_type"] = kind
attr["page_number"] = pno
+ if hasattr(obj, "graphicstate"):
+ ... |
jtauber__termdoc-17 | [
{
"changes": {
"added_entities": [
"termdoc/htdm.py:HTDM.leaves",
"termdoc/htdm.py:HTDM.leaf_entries",
"termdoc/htdm.py:HTDM.graft"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"termdoc/htdm.py:HTDM"
]
},
"file... | jtauber/termdoc | 0340105d0312b23f5adb26dc86a6aa9deac9c9d4 | implement copying of one hierarchical counter as a subtree of another | diff --git a/README.md b/README.md
index 9d1d41d..ffed1b7 100644
--- a/README.md
+++ b/README.md
@@ -77,4 +77,10 @@ with a period-separated hierarchical document ID, term, and count all separated
Both the period and tab are just defaults and can be override by padding `address_sep` and/or `field_sep` to `load`.
-Y... |
jtauber__termdoc-20 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "termdoc/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": [
"termdoc/htdm.py:Duplicates"
],
"edi... | jtauber/termdoc | ec56e37c84f4070c9236adfc6dcab762b36c1909 | add a strict mode to load that prevents duplicate counts | diff --git a/README.md b/README.md
index a720141..9ad2bae 100644
--- a/README.md
+++ b/README.md
@@ -97,3 +97,45 @@ You can **prune** a HTDM to just `n` levels with the method `prune(n)`.
You can iterate over the document-term counts at the leaves of the HDTM with the method `leaf_entries()` (this returns a generator ... |
jtauber__termdoc-23 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"termdoc/htdm.py:HTDM.load"
],
"edited_modules": [
"termdoc/htdm.py:HTDM"
]
},
"file": "termdoc/htdm.py"
}
] | jtauber/termdoc | 5de2d3d8ee9965da1a05a9b069683a7e1073f005 | allow loading at arbitrary point in tree
`load` should take an option `prefix` which gets prepended to all addresses loaded | diff --git a/README.md b/README.md
index c3e2ffe..2e85876 100644
--- a/README.md
+++ b/README.md
@@ -16,7 +16,7 @@ pip install termdoc
## HTDM
-The core data structure is a term-document matrix supporting hierarchical documents. Documents are labelled with a tuple such as `(1, 7, 5)` or `("Plato", "Republic", "Boo... |
juaAI__stationbench-41 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"stationbench/utils/io.py:load_dataset"
],
"edited_modules": [
"stationbench/utils/io.py:load_dataset"
]
},
"file": "stationbench/utils/io.py"
}
] | juaAI/stationbench | 4252e2135947a8ab8bc0d9b728241e17b6d5b0d5 | Bug: Stationbench doesn't work with DataArray (1 variable)
The code currently expects a `xr.Dataset`. So it breaks if one only wants to benchmark a single variable (which would be stored in a `xr.DataArray` instead) | diff --git a/stationbench/utils/io.py b/stationbench/utils/io.py
index e61369a..1eab722 100644
--- a/stationbench/utils/io.py
+++ b/stationbench/utils/io.py
@@ -3,14 +3,14 @@ import xarray as xr
def load_dataset(
- dataset: Union[str, xr.Dataset],
+ dataset: Union[str, xr.Dataset, xr.DataArray],
variabl... |
juanifioren__django-oidc-provider-329 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"oidc_provider/lib/endpoints/introspection.py:TokenIntrospectionEndpoint.create_response_dic"
],
"edited_modules": [
"oidc_provider/lib/endpoints/introspection.py:TokenIntrospectionEn... | juanifioren/django-oidc-provider | a7b07e29dfb3c8e1c8f33920942ffad3cc34db4c | Handle optional scope on token and introspection endpoints for password and client_credentials grant_type
Parameter scope is defined as optional on authorization https://tools.ietf.org/html/rfc6749#section-4.1.1 and introspection https://tools.ietf.org/html/rfc7662 requests.
An enhancement is proposed to handle `sc... | diff --git a/docs/sections/contribute.rst b/docs/sections/contribute.rst
index e67769c..9a19042 100644
--- a/docs/sections/contribute.rst
+++ b/docs/sections/contribute.rst
@@ -32,7 +32,7 @@ We also use `travis <https://travis-ci.org/juanifioren/django-oidc-provider/>`_
Improve Documentation
=====================
-... |
jubatus__jubatus-python-client-69 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jubatus/common/client.py:ClientBase.__init__",
"jubatus/common/client.py:ClientBase.set_name"
],
"edited_modules": [
"jubatus/common/client.py:ClientBase"
]
},
... | jubatus/jubatus-python-client | 34f9f83ee2d230672518102e541286425c92c287 | no type validation for constructor arguments
Currently argument types are validated, but constructor arguments are not.
For example, the following code:
```
c = jubatus.Classifier("localhost", 9199, 0) # it should be ("localhost", 9199, "") to work
c.get_status()
```
raises "TypeMismatch (error 2)" on RPC ca... | diff --git a/jubatus/common/client.py b/jubatus/common/client.py
index d599319..9cd91a8 100644
--- a/jubatus/common/client.py
+++ b/jubatus/common/client.py
@@ -54,6 +54,10 @@ class ClientBase(object):
(`unpack_encoding=None`)
"""
def __init__(self, host, port, name, timeout=10):
+ check_types(h... |
jugmac00__hibpcli-34 | [
{
"changes": {
"added_entities": [
"hibpcli/cli.py:password"
],
"added_modules": [
"hibpcli/cli.py:password"
],
"edited_entities": null,
"edited_modules": null
},
"file": "hibpcli/cli.py"
}
] | jugmac00/hibpcli | be86cf6454c55eb637646041632a4b52798fbb39 | Enable single password testing
One should be able to check single password against the hibp API for being leaked or not.
Also see #17 for more information about the new interface.
| diff --git a/CHANGELOG.md b/CHANGELOG.md
index 30cb6e7..569bdf2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## unreleased
+- add new subcommand "password" for checking a single password
+
## 0.2.0 (02.11.2019)
### added
diff --git a/README.md b/README.md
index cf2b4e5..e414da2 100644
--- a/REA... |
jugmac00__hibpcli-59 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/hibpcli/cli.py:check_keepass",
"src/hibpcli/cli.py:check_password"
],
"edited_modules": [
"src/hibpcli/cli.py:check_keepass",
"src/hibpcli/cli.py:check_password"
... | jugmac00/hibpcli | acb7eec3538310dd85c099e8e52561b85c25d6e0 | Change the message if no leak found
The wording of messages _“Hooray, everything is safe!”_ and _“Your password is safe!”_ implies these passwords are safe. Actually they only have not been reported as unsafe _until now_.
How about: _“Your password is probably safe.”_ or _“This password has not been reported unsafe ... | diff --git a/CHANGES.rst b/CHANGES.rst
index 1d5dd93..b1f39f3 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -9,6 +9,7 @@ added
- add the `bandit` security checker
- add support for Python 3.9
- add type annotations
+- improve message when there are no known leaks for a password(@eumiro)
0.4.1 (30.09.2020)
------... |
jugmac00__hibpcli-61 | [
{
"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": [
"src/hibpcli/cli.py:check_ke... | jugmac00/hibpcli | 316c2618f38b7c227680da479d8d054fceab7369 | catch exception when keepass password is wrong
currently users get to see:
> pykeepass.exceptions.CredentialsIntegrityError: Credentials are wrong or integrity check failed | diff --git a/CHANGES.rst b/CHANGES.rst
index b1f39f3..2025e39 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -10,6 +10,7 @@ added
- add support for Python 3.9
- add type annotations
- improve message when there are no known leaks for a password(@eumiro)
+- provide user friendly error message when given password is wr... |
juju-solutions__charms.benchmark-3 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"charms/benchmark/__init__.py:Benchmark.start"
],
"edited_modules": [
"charms/benchmark/__init__.py:Benchmark"
]
},
"file": "charms/benchmark/__init__.py"
}
] | juju-solutions/charms.benchmark | df2acf8736cce39d905990fd5008d6afa57863c3 | Action UUID needs to be set explicitly to the collect-profile-data script | diff --git a/charms/benchmark/__init__.py b/charms/benchmark/__init__.py
index 9a5458e..f0c15c5 100644
--- a/charms/benchmark/__init__.py
+++ b/charms/benchmark/__init__.py
@@ -130,14 +130,14 @@ class Benchmark(object):
charm_dir = os.environ.get('CHARM_DIR')
action_uuid = os.environ.get('JUJU_ACTION_... |
juju-solutions__charms.reactive-106 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"charms/reactive/relations.py:RelationBase._find_impl"
],
"edited_modules": [
"charms/reactive/relations.py:RelationBase"
]
},
"file": "charms/reactive/relations.py"
}... | juju-solutions/charms.reactive | 59b07bd9447d8a4cb027ea2515089216b8d20549 | 0.4.6 breaks charms.openstack (AttributeError: 'NoneType' object has no attribute 'relation_name')
#### Built with charms.reactive 0.4.5: Apr 26 (ok):
https://openstack-ci-reports.ubuntu.com/artifacts/test_charm_pipeline_amulet_full/openstack/charm-tempest/458466/5/16/index.html
#### Built with charms.reactive 0.4.... | diff --git a/charms/reactive/relations.py b/charms/reactive/relations.py
index f81b23c..969e7af 100644
--- a/charms/reactive/relations.py
+++ b/charms/reactive/relations.py
@@ -14,7 +14,9 @@
# You should have received a copy of the GNU Lesser General Public License
# along with charm-helpers. If not, see <http://www... |
juju-solutions__charms.reactive-58 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"charms/reactive/__init__.py:main"
],
"edited_modules": [
"charms/reactive/__init__.py:main"
]
},
"file": "charms/reactive/__init__.py"
},
{
"changes": {
"... | juju-solutions/charms.reactive | 1ae5c5b86dff4cecfb261ebccbca7780e3546fa3 | charms.reactive.relations assumes the relation name is a key
The RelationBase and Conversation model assumes that a relation name name is a key, rather than using the relation id + unit name. This will cause a reactive charm to fail, depending how the related service chooses to use it. For example, here is a metadata.y... | diff --git a/charms/reactive/__init__.py b/charms/reactive/__init__.py
index 1cdcca0..15209ec 100644
--- a/charms/reactive/__init__.py
+++ b/charms/reactive/__init__.py
@@ -36,6 +36,7 @@ from .decorators import only_once # noqa
from .decorators import when_file_changed # noqa
from . import bus
+from . import rela... |
juju-solutions__charms.reactive-65 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"charms/reactive/bus.py:Handler._get_args"
],
"edited_modules": [
"charms/reactive/bus.py:Handler"
]
},
"file": "charms/reactive/bus.py"
}
] | juju-solutions/charms.reactive | 3540030b9b142787f3f7fd16a14ed33d18b4d7a1 | Handler args are dropped if called more than once per hook
Because the args are implemented as generators, any time the list is evaluated after the first it ends up being empty, leading to an "missing arg" error:
```
2016-04-12 15:15:51 INFO namenode-cluster-relation-joined Traceback (most recent call last):
2016-... | diff --git a/charms/reactive/bus.py b/charms/reactive/bus.py
index 9676244..885e498 100644
--- a/charms/reactive/bus.py
+++ b/charms/reactive/bus.py
@@ -267,7 +267,10 @@ class Handler(object):
"""
Lazily evaluate the args.
"""
- return list(chain.from_iterable(self._args))
+ if ... |
juju-solutions__charms.reactive-71 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"charms/reactive/relations.py:RelationBase.toggle_state",
"charms/reactive/relations.py:Conversation.toggle_state"
],
"edited_modules": [
"charms/reactive/relations.py:Relatio... | juju-solutions/charms.reactive | 04663e45f3683d4c497f43526d3ac26593ee10a2 | toggle_state default for active is error-prone
`toggle_state` takes an optional `active` param that lets you specify whether the state should be on or off, instead of it being switched from its previous value. Having a default value of `None` is problematic because `None` can easily be mistaken for a "truthy" `False` ... | diff --git a/charms/reactive/relations.py b/charms/reactive/relations.py
index 173ef28..a8c1499 100644
--- a/charms/reactive/relations.py
+++ b/charms/reactive/relations.py
@@ -30,7 +30,9 @@ from charms.reactive.bus import _load_module
from charms.reactive.bus import StateList
-ALL = '__ALL_SERVICES__'
+# arbitrar... |
juju-solutions__charms.reactive-73 | [
{
"changes": {
"added_entities": [
"charms/reactive/bus.py:Handler.add_post_callback"
],
"added_modules": null,
"edited_entities": [
"charms/reactive/bus.py:Handler.__init__",
"charms/reactive/bus.py:Handler.invoke"
],
"edited_modules": [
"char... | juju-solutions/charms.reactive | 04663e45f3683d4c497f43526d3ac26593ee10a2 | only_once help unclear
_From @jacekn on January 27, 2016 17:29_
I was trying to execute certain function only once in my code.
This does not work:
```
@only_once()
def basenode():
print("in basenode")
```
```
TypeError: only_once() missing 1 required positional argument: 'action'
```
I tried like thi... | diff --git a/charms/reactive/bus.py b/charms/reactive/bus.py
index 885e498..853571a 100644
--- a/charms/reactive/bus.py
+++ b/charms/reactive/bus.py
@@ -229,6 +229,7 @@ class Handler(object):
self._action = action
self._args = []
self._predicates = []
+ self._post_callbacks = []
... |
juju-solutions__charms.reactive-74 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"charms/reactive/bus.py:_action_id",
"charms/reactive/bus.py:_short_action_id"
],
"edited_modules": [
"charms/reactive/bus.py:_action_id",
"charms/reactive/bus.py:_sho... | juju-solutions/charms.reactive | 04663e45f3683d4c497f43526d3ac26593ee10a2 | Incorrect handler name logged using not_unless decorator
I'm getting the following in my logs:
2016-01-11 14:58:37 INFO juju-log replication:1: Invoking reactive handler: lib/pypi/charms/reactive/decorators.py:149:_wrapped
It looks like a name isn't being copied from the wrapped function in the not_unless decorat... | diff --git a/charms/reactive/bus.py b/charms/reactive/bus.py
index 885e498..1bd1364 100644
--- a/charms/reactive/bus.py
+++ b/charms/reactive/bus.py
@@ -170,12 +170,16 @@ def get_state(state, default=None):
def _action_id(action):
+ if hasattr(action, '_action_id'):
+ return action._action_id
return... |
juju__python-libjuju-1054 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "juju/constraints.py"
}
] | juju/python-libjuju | 18917b41a85bfadb190a4ee8396035dd2902c19e | Incorrect parsing of zones constraint
### Description
When deploying a bundle with the `zones` constraint in a machine, the deployment fails with the following error from the juju API:
```
juju.errors.JujuAPIError: json: cannot unmarshal string into Go struct field Value.params.constraints.zones of type []string
... | diff --git a/juju/constraints.py b/juju/constraints.py
index 2574b6b..3315fea 100644
--- a/juju/constraints.py
+++ b/juju/constraints.py
@@ -54,7 +54,7 @@ SUPPORTED_KEYS = [
"zones",
"allocate_public_ip"]
-LIST_KEYS = {'tags', 'spaces'}
+LIST_KEYS = {'tags', 'spaces', 'zones'}
SNAKE1 = re.compile(r'(.)([... |
juju__python-libjuju-228 | [
{
"changes": {
"added_entities": [
"juju/constraints.py:normalize_list_value"
],
"added_modules": [
"juju/constraints.py:normalize_list_value"
],
"edited_entities": [
"juju/constraints.py:parse",
"juju/constraints.py:normalize_value"
],
"... | juju/python-libjuju | 668945a53cdf696bb2d6d8da518a07094b22c7c7 | Single tag constraint causes JujuAPIError
When a constraint spec is given to deploy or in a bundle with a single tag constraint (e.g., `tags=node1234` rather than `tags=node1234,othertag`) it causes the following exception:
```
Traceback (most recent call last):
File "/snap/conjure-up/987/lib/python3.6/site-pack... | diff --git a/.travis.yml b/.travis.yml
index 0e907f0..9a1fcce 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,28 +3,29 @@ sudo: required
language: python
python:
- "3.6"
-before_script:
- - sudo addgroup lxd || true
- - sudo usermod -a -G lxd $USER || true
- - sudo ln -s /snap/bin/juju /usr/bin/juju
- - sudo ... |
juju__python-libjuju-369 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"juju/bundle.py:AddApplicationChange.__init__"
],
"edited_modules": [
"juju/bundle.py:AddApplicationChange"
]
},
"file": "juju/bundle.py"
},
{
"changes": {
... | juju/python-libjuju | 79212d5bbcb3e68ba1aae68aa75fcf5b0a2d4305 | Cannot deploy bundle with storage
Everytime I deploy an application with storage with libjuju, I'm getting this error:
```
Traceback (most recent call last):
File "examples/deploy_k8s.py", line 42, in <module>
loop.run(main())
File "/home/davigar15/.local/lib/python3.6/site-packages/juju/loop.py", line 3... | diff --git a/juju/bundle.py b/juju/bundle.py
index 8e96c95..2c28811 100644
--- a/juju/bundle.py
+++ b/juju/bundle.py
@@ -8,7 +8,7 @@ import yaml
from toposort import toposort_flatten
from .client import client
-from .constraints import parse as parse_constraints
+from .constraints import parse as parse_constraints,... |
juju__python-libjuju-375 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"juju/unit.py:Unit.is_leader_from_status"
],
"edited_modules": [
"juju/unit.py:Unit"
]
},
"file": "juju/unit.py"
}
] | juju/python-libjuju | 0c7ca041f918b012f4da2038afada4cc275ddf34 | `unit.is_leader_from_status` reports False for all units of a subordinate charm
**Context**
python-libjuju v2.6.3
juju --version => 2.6.10-bionic-amd64 (snap)
This affects the migration of the functional test of openstack charms to the zaza testing framework, as some of them are deployed as subordinates (neutron-o... | diff --git a/juju/unit.py b/juju/unit.py
index 6cbde8d..9d8e27f 100644
--- a/juju/unit.py
+++ b/juju/unit.py
@@ -256,12 +256,13 @@ class Unit(model.ModelEntity):
method.
"""
- app = self.name.split("/")[0]
+ unit_parts = self.name.split("/")
+ app = unit_parts[0]
+ unit_i... |
juju__python-libjuju-422 | [
{
"changes": {
"added_entities": [
"juju/client/facade.py:Type.get"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"juju/client/facade.py:Type"
]
},
"file": "juju/client/facade.py"
},
{
"changes": {
"added_entities... | juju/python-libjuju | 49c5554025b12ebdfda984443611f1f56ad6b63f | Exception: Expected bakery_version to be a int, received: <class 'list'>
This is coming up in several failing integration tests.
```
Traceback (most recent call last):
File "/home/johnsca/juju/libs/python-libjuju/tests/integration/test_crossmodel.py", line 135, in test_add_relation_with_offer
await model_2.... | diff --git a/.github/workflows/tox.yaml b/.github/workflows/tox.yaml
index 2a48ae8..5eacb6f 100644
--- a/.github/workflows/tox.yaml
+++ b/.github/workflows/tox.yaml
@@ -1,40 +1,17 @@
-name: Run tests with Tox
+name: Unit Tests
-on: [push]
+on: [push, pull_request]
jobs:
- build:
-
+ unit-tests:
runs-on: ubu... |
juju__python-libjuju-497 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"juju/bundle.py:AddCharmChange.run"
],
"edited_modules": [
"juju/bundle.py:AddCharmChange"
]
},
"file": "juju/bundle.py"
}
] | juju/python-libjuju | eebf2b31f2d49a4bcb36ce965aceac5774ba5c7c | Bundle deploy doesn't honor charm channels
The bundle handler's `AddCharmChange` implementation is [ignoring the channel](https://github.com/juju/python-libjuju/blob/d6fae9e/juju/bundle.py#L439) even though it [does have the channel available](https://github.com/juju/python-libjuju/blob/d6fae9e/juju/bundle.py#L447-L448... | diff --git a/juju/bundle.py b/juju/bundle.py
index ac9c0d1..611285a 100644
--- a/juju/bundle.py
+++ b/juju/bundle.py
@@ -434,9 +434,9 @@ class AddCharmChange(ChangeInfo):
if self.charm.startswith('local:'):
return self.charm
- entity_id = await context.charmstore.entityId(self.charm)
+ ... |
juju__python-libjuju-502 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"juju/bundle.py:ExposeChange.__init__"
],
"edited_modules": [
"juju/bundle.py:ExposeChange"
]
},
"file": "juju/bundle.py"
}
] | juju/python-libjuju | 3100fe6b34c69903f075be49709058e632bc1362 | AttributeError: 'ExposeChange' object has no attribute 'exposed_endpoints'
This error occurred while using `pytests-operator` + juju==2.9.0, which build the tested charm and tried to deploy it inside bundle.
Environment:
```bash
platform linux -- Python 3.9.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
plugins: async... | diff --git a/juju/bundle.py b/juju/bundle.py
index a54258f..04bc2fb 100644
--- a/juju/bundle.py
+++ b/juju/bundle.py
@@ -800,6 +800,7 @@ class ExposeChange(ChangeInfo):
def __init__(self, change_id, requires, params=None):
super(ExposeChange, self).__init__(change_id, requires)
+ self.exposed_end... |
juju__python-libjuju-552 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"examples/deploy_local_bundle_with_resources.py:main"
],
"edited_modules": [
"examples/deploy_local_bundle_with_resources.py:main"
]
},
"file": "examples/deploy_local_bu... | juju/python-libjuju | 3d54f75dd74691fe8ecfaf614df8650b21b332b9 | Local resources in sidecar charms do not work
Hello,
Deploying a bundle with local resources do not work.
Steps to reproduce:
The bundle:
```
bundle: kubernetes
applications:
onos2:
charm: "../charms/onos.charm"
scale: 1
options:
admin-password: admin
resources:
onos... | diff --git a/examples/deploy_local_bundle_with_resources.py b/examples/deploy_local_bundle_with_resources.py
index 5dafd97..ed1e9b9 100644
--- a/examples/deploy_local_bundle_with_resources.py
+++ b/examples/deploy_local_bundle_with_resources.py
@@ -19,7 +19,7 @@ async def main():
try:
print('Deploying bun... |
juju__python-libjuju-582 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"juju/constraints.py:normalize_value"
],
"edited_modules": [
"juju/constraints.py:normalize_value"
]
},
"file": "juju/constraints.py"
}
] | juju/python-libjuju | eee4fabe8b60119088097449f37f02b5a36cfe94 | Unable to set allocate-public-ip constraint
### Summary
When using `model.deploy()` to deploy an application, including the `allocate-public-ip=true` constraint fails with the following error:
```
Traceback (most recent call last):
File "test_integration.py", line 60, in test_deploy_cluster
app = await o... | diff --git a/juju/constraints.py b/juju/constraints.py
index 42d26c2..3191f28 100644
--- a/juju/constraints.py
+++ b/juju/constraints.py
@@ -82,6 +82,11 @@ def normalize_value(value):
if value.isdigit():
return int(value)
+ if value.lower() == 'true':
+ return True
+ if value.lower() == 'fa... |
juju__python-libjuju-666 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"juju/constraints.py:parse",
"juju/constraints.py:normalize_key"
],
"edited_modules": [
"juju/constraints.py:parse",
"juju/constraints.py:normalize_key"
]
},... | juju/python-libjuju | 7d2a423e3180230421ccfa16c309f3c2d0ac1cc2 | Inconsistent handling of contraints in juju cli and python-libjuju
When trying to limit a charm to only deploy to machines with a minimum amount of disk space, I noticed that juju command line and python-libjuju validate syntax of constraints differently. This happened in a (wrong) attempt of use a relational ">=".
... | diff --git a/juju/constraints.py b/juju/constraints.py
index 3191f28..5c141ed 100644
--- a/juju/constraints.py
+++ b/juju/constraints.py
@@ -32,6 +32,25 @@ FACTORS = {
"Y": 1024 ** 6
}
+# List of supported constraint keys, see
+# http://github.com/cderici/juju/blob/2.9/core/constraints/constraints.go#L20-L39
+S... |
juju__python-libjuju-867 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"juju/origin.py:Channel.normalize"
],
"edited_modules": [
"juju/origin.py:Channel"
]
},
"file": "juju/origin.py"
}
] | juju/python-libjuju | 1992aeaf13b67b2668c466b26a82fd61ebbb385e | [Bug]: model.deploy does not behave like juju command
### Description
## Environment
juju 2.9.42
juju==3.0.4
## Scenario
1. Channel latest/table and series focal (20.04) are available at [PostgreSQL-K8S Charmhub](https://charmhub.io/postgresql-k8s)
2. The command `juju deploy postgresql-k8s --channel=latest... | diff --git a/juju/origin.py b/juju/origin.py
index 083e162..0dca746 100644
--- a/juju/origin.py
+++ b/juju/origin.py
@@ -97,7 +97,9 @@ class Channel:
return Channel(track, risk)
def normalize(self):
- track = self.track if self.track != "latest" else ""
+ # TODO (cderici): this is essentia... |
jupyter-incubator__sparkmagic-121 | [
{
"changes": {
"added_entities": [
"remotespark/livyclientlib/livyclient.py:LivyClient.start"
],
"added_modules": null,
"edited_entities": [
"remotespark/livyclientlib/livyclient.py:LivyClient.__init__"
],
"edited_modules": [
"remotespark/livyclientlib... | jupyter-incubator/sparkmagic | cb87d63ab3268c1c5bd63c9fc1f1e971d5a1fe31 | Shutdown pyspark kernel doesn't gaurantee that session has been deleted
Repro Steps:
- Open Pyspark kernel
- Do any operation, 1+1 for example
- shutdown it before getting the answer (while creating the SQL context & Hive one)
- SSH the cluster, you'll find the session still existing
For now, to delete it, y... | diff --git a/remotespark/livyclientlib/livyclient.py b/remotespark/livyclientlib/livyclient.py
index 5559856..eab5eed 100644
--- a/remotespark/livyclientlib/livyclient.py
+++ b/remotespark/livyclientlib/livyclient.py
@@ -10,16 +10,15 @@ class LivyClient(object):
def __init__(self, session):
self.logger ... |
jupyter-incubator__sparkmagic-128 | [
{
"changes": {
"added_entities": [
"remotespark/wrapperkernel/codetransformers.py:PythonTransformer.get_code_to_execute"
],
"added_modules": [
"remotespark/wrapperkernel/codetransformers.py:PythonTransformer"
],
"edited_entities": null,
"edited_modules": null
... | jupyter-incubator/sparkmagic | c3fd225a599345175240d8e96673102aacf3f624 | Expose %python for wrapper kernels
So that user can execute custom python code, maybe in conjunction with -o for %sql results. | diff --git a/remotespark/wrapperkernel/codetransformers.py b/remotespark/wrapperkernel/codetransformers.py
index 41136ad..1cec56a 100644
--- a/remotespark/wrapperkernel/codetransformers.py
+++ b/remotespark/wrapperkernel/codetransformers.py
@@ -157,3 +157,14 @@ class LogsTransformer(UserCodeTransformerBase):
... |
jupyter-incubator__sparkmagic-89 | [
{
"changes": {
"added_entities": [
"remotespark/sparkkernelbase.py:SparkKernelBase._delete_session",
"remotespark/sparkkernelbase.py:SparkKernelBase._run_starting_session",
"remotespark/sparkkernelbase.py:SparkKernelBase._run_restarting_session",
"remotespark/sparkkernelbas... | jupyter-incubator/sparkmagic | 5d7c9a29da1f4a3a12fc9cd821807b474625afc1 | Expose session configs through wrapper kernel | diff --git a/remotespark/sparkkernelbase.py b/remotespark/sparkkernelbase.py
index 3abecfd..bd4c70f 100644
--- a/remotespark/sparkkernelbase.py
+++ b/remotespark/sparkkernelbase.py
@@ -9,6 +9,11 @@ from remotespark.utils.utils import get_connection_string
class SparkKernelBase(IPythonKernel):
+ run_command = "r... |
jupyter-server__jupyter_server-1180 | [
{
"changes": {
"added_entities": [
"jupyter_server/extension/manager.py:ExtensionPackage._load_version",
"jupyter_server/extension/manager.py:ExtensionPackage._load_metadata"
],
"added_modules": null,
"edited_entities": [
"jupyter_server/extension/manager.py:Exten... | jupyter-server/jupyter_server | 4e9d105d42b16df901cc35e06ab235a242cf25a1 | Jupyter Server imports extensions even when they are disabled, slowing down startup
## Description
jupyter server will do an import of the *python* package for *all* extensions, even if they are explicitly disabled. This can cause a big performance penalty, as well as cause code to execute that perhaps shouldn't be.... | diff --git a/jupyter_server/extension/manager.py b/jupyter_server/extension/manager.py
index 519921365..cf60f4ece 100644
--- a/jupyter_server/extension/manager.py
+++ b/jupyter_server/extension/manager.py
@@ -2,7 +2,7 @@
import importlib
from tornado.gen import multi
-from traitlets import Any, Bool, Dict, HasTrait... |
jupyter-server__jupyter_server-1367 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_server/services/contents/filecheckpoints.py:GenericFileCheckpoints.get_file_checkpoint",
"jupyter_server/services/contents/filecheckpoints.py:AsyncGenericFileCheckpoints.get_file_checkpo... | jupyter-server/jupyter_server | 8e5d7668aea4eb4d6ca1767566f4ffcbc4bc49bf | Latest release is breaking custom ContentManager
<!-- Thank you for contributing. These HTML comments will not render in the issue, but you can delete them once you've read them if you prefer! -->
<!-- Before creating a new issue, please search for relevant issues.
-->
## Description
<!--Describe the bug clea... | diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml
index 635c404e3..876363549 100644
--- a/.github/workflows/downstream.yml
+++ b/.github/workflows/downstream.yml
@@ -107,6 +107,23 @@ jobs:
test_command: pip install pytest-jupyter[server] && pytest -vv -raXxs -W default --durati... |
jupyter-server__jupyter_server-1392 | [
{
"changes": {
"added_entities": [
"jupyter_server/auth/decorator.py:allow_unauthenticated",
"jupyter_server/auth/decorator.py:ws_authenticated"
],
"added_modules": [
"jupyter_server/auth/decorator.py:allow_unauthenticated",
"jupyter_server/auth/decorator.py:ws_... | jupyter-server/jupyter_server | b3caa3c2f60412138f430daec1da7af235c8d26b | Have handlers be @web.authenticated by default ?
I've seen many extension forgetting to put @web.authenticated on handlers;
I'm tempted to think that AuthenticatedFileHandler should use init_subclass – or whatever, peak at SUPPORTED_METHODS, and autowrap any handler in `@web.authenticated` _unless_ the handler is mar... | diff --git a/jupyter_server/auth/decorator.py b/jupyter_server/auth/decorator.py
index a92866b4e..46090b255 100644
--- a/jupyter_server/auth/decorator.py
+++ b/jupyter_server/auth/decorator.py
@@ -85,3 +85,58 @@ def authorized(
return cast(FuncT, wrapper(method))
return cast(FuncT, wrapper)
+
+
+def all... |
jupyter-server__jupyter_server-1417 | [
{
"changes": {
"added_entities": [
"jupyter_server/extension/application.py:ExtensionApp._start_jupyter_server_extension"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"jupyter_server/extension/application.py:ExtensionApp"
]
},
... | jupyter-server/jupyter_server | 641e8fccad2e96ba305a74ce83e9420083b7fca6 | Add async post_start method to ExtensionApp
<!--
Welcome! Thanks for thinking of a way to improve Jupyter Server. If this solves a problem for you, then it probably solves that problem for lots of people! So the whole community will benefit from this request.
Before creating a new feature request please search the ... | diff --git a/docs/source/developers/extensions.rst b/docs/source/developers/extensions.rst
index be454b26e..e88acfb0f 100644
--- a/docs/source/developers/extensions.rst
+++ b/docs/source/developers/extensions.rst
@@ -65,6 +65,33 @@ Then add this handler to Jupyter Server's Web Application through the ``_load_ju
... |
jupyter-server__jupyter_server-556 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_server/utils.py:is_namespace_package"
],
"edited_modules": [
"jupyter_server/utils.py:is_namespace_package"
]
},
"file": "jupyter_server/utils.py"
}
] | jupyter-server/jupyter_server | b4b151710336aa3f18ee7dc54857c82b238cbf05 | v1.10.0 is breaking JupyterLab CI
The error arises from:
https://github.com/jupyter-server/jupyter_server/blob/b4b151710336aa3f18ee7dc54857c82b238cbf05/jupyter_server/utils.py#L391
From the documentation
> Find the spec for a module, optionally relative to the specified package name. If the module is in sys.mo... | diff --git a/jupyter_server/utils.py b/jupyter_server/utils.py
index 28d507fde..7af3c3a52 100644
--- a/jupyter_server/utils.py
+++ b/jupyter_server/utils.py
@@ -388,7 +388,11 @@ def is_namespace_package(namespace):
"""
# NOTE: using submodule_search_locations because the loader can be None
- spec = impor... |
jupyter-server__jupyter_server-574 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_server/services/contents/filemanager.py:FileContentsManager._file_model",
"jupyter_server/services/contents/filemanager.py:FileContentsManager.get",
"jupyter_server/services/cont... | jupyter-server/jupyter_server | 90f619cf11eec842a27eec25692f9d65adccf169 | Allow non-empty directory deletion for windows through settings
Hey would it be ok to allow non-empty directory deletion for windows through settings?
https://github.com/jupyter-server/jupyter_server/blob/f914126d173dde7d2b2f6a6d474648060c823419/jupyter_server/services/contents/filemanager.py#L492 | diff --git a/jupyter_server/services/contents/filemanager.py b/jupyter_server/services/contents/filemanager.py
index 376a8db62..54e2dca38 100644
--- a/jupyter_server/services/contents/filemanager.py
+++ b/jupyter_server/services/contents/filemanager.py
@@ -119,6 +119,16 @@ class FileContentsManager(FileManagerMixin, Co... |
jupyter-server__jupyter_server-696 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_server/services/contents/filemanager.py:FileContentsManager._validate_post_save_hook",
"jupyter_server/services/contents/filemanager.py:FileContentsManager.run_post_save_hook",
"... | jupyter-server/jupyter_server | 5d962d7a0a8435cf93e20796a31eadec21969a92 | pre/post save hook registration
### Problem
The way `pre_save_hook` and `post_save_hook` work is by direct attribute assignment in a `FileContentsManager` instance, e.g. `file_contents_manager.pre_save_hook = my_hook` (see [the documentation](https://jupyter-server.readthedocs.io/en/latest/developers/savehooks.html)... | diff --git a/.github/workflows/downstream.yml b/.github/workflows/downstream.yml
index a92d24f2b..c1e9276ae 100644
--- a/.github/workflows/downstream.yml
+++ b/.github/workflows/downstream.yml
@@ -7,7 +7,7 @@ on:
jobs:
tests:
runs-on: ubuntu-latest
- timeout-minutes: 15
+ timeout-minutes: 20
steps... |
jupyter-server__jupyter_server-754 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_server/services/contents/manager.py:ContentsManager._validate_pre_save_hook",
"jupyter_server/services/contents/manager.py:ContentsManager._validate_post_save_hook"
],
"edite... | jupyter-server/jupyter_server | cd1b1b886db08c6480329c3f0832d05f15d49a19 | Passing pre_save_hook as importstring
## Description
Passing a `pre_save_hook` as an importstring e.g.
```
--FileContentsManager.pre_save_hook='mymodule.foo_function`
```
fails with the following error when launching the Jupyter server:
<details><summary>Troubleshoot Output</summary>
<pre>
@validate("pr... | diff --git a/jupyter_server/services/contents/manager.py b/jupyter_server/services/contents/manager.py
index cd4ce80fb..2a2cf0c4b 100644
--- a/jupyter_server/services/contents/manager.py
+++ b/jupyter_server/services/contents/manager.py
@@ -127,7 +127,7 @@ class ContentsManager(LoggingConfigurable):
value ... |
jupyter__jupyter-packaging-35 | [
{
"changes": {
"added_entities": [
"jupyter_packaging/setupbase.py:_get_develop_handler",
"jupyter_packaging/setupbase.py:_develop.install_for_development"
],
"added_modules": [
"jupyter_packaging/setupbase.py:_get_develop_handler",
"jupyter_packaging/setupbase.... | jupyter/jupyter-packaging | 8fb006ad56070632f0284cd9c4ab64f59969a404 | Add support for data_files in develop mode
`data_files` do not get moved into the appropriate place during an editable install, and that is a [won't fix](https://github.com/pypa/pip/issues/6592). We can add support for that here. | diff --git a/.travis.yml b/.travis.yml
index 6d00f02..9245fd2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: python
python:
- - 2.7
- 3.5
+ - 3.8
sudo: false
env:
install:
diff --git a/jupyter_packaging/setupbase.py b/jupyter_packaging/setupbase.py
index 8338106..04edfe0 100644
---... |
jupyter__jupyter-sphinx-207 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_sphinx/__init__.py:setup"
],
"edited_modules": [
"jupyter_sphinx/__init__.py:setup"
]
},
"file": "jupyter_sphinx/__init__.py"
},
{
"changes": {
"a... | jupyter/jupyter-sphinx | d427c79394d4457a1e379d123eb000812e7bc9ff | Warning in sphinx 4.0.0
Sphinx released a new version that seems to cause this kind of warnings:
```bash
WARNING: unknown directive or role name: jupyter-download:notebook
WARNING: unknown directive or role name: jupyter-download:script
```
when using something like:
```
:jupyter-download:notebook:`Tutoria... | diff --git a/doc/source/index.rst b/doc/source/index.rst
index 786f008..179e813 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -372,16 +372,16 @@ Downloading the code as a script
--------------------------------
Jupyter Sphinx includes 2 roles that can be used to download the code embedded in a doc... |
jupyter__jupyter-sphinx-73 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_sphinx/execute.py:ExecuteJupyterCells.apply",
"jupyter_sphinx/execute.py:cell_output_to_nodes"
],
"edited_modules": [
"jupyter_sphinx/execute.py:ExecuteJupyterCells",... | jupyter/jupyter-sphinx | 9101ee32878641b28d199de3fac4ad265de635d0 | Allow disabling of stderr printing
Sometimes when importing certain packages there are various warnings that are raised. These warnings are often unavoidable and are not the fault of the end user.
Currently we raise an exception whenever anything is printed to `stderr`, however it seems that the correct way to handl... | diff --git a/jupyter_sphinx/execute.py b/jupyter_sphinx/execute.py
index 9207f9a..7fc5160 100644
--- a/jupyter_sphinx/execute.py
+++ b/jupyter_sphinx/execute.py
@@ -379,8 +379,8 @@ class ExecuteJupyterCells(SphinxTransform):
if output['output_type'] == 'stream'
a... |
jupyter__jupyter-sphinx-93 | [
{
"changes": {
"added_entities": [
"jupyter_sphinx/execute.py:strip_latex_delimiters"
],
"added_modules": [
"jupyter_sphinx/execute.py:strip_latex_delimiters"
],
"edited_entities": [
"jupyter_sphinx/execute.py:cell_output_to_nodes"
],
"edited_mod... | jupyter/jupyter-sphinx | 9641d94dee537912b04ab8a0fba10123aa4796c4 | Dollar signs when displaying sympy objects
Check the following examples:
https://qsymm.readthedocs.io/en/stable-1.2/tutorial/basics.html

The dollar signs do not appear when vi... | diff --git a/jupyter_sphinx/execute.py b/jupyter_sphinx/execute.py
index 336b1f6..4061aec 100644
--- a/jupyter_sphinx/execute.py
+++ b/jupyter_sphinx/execute.py
@@ -492,6 +492,25 @@ def split_on(pred, it):
return (list(x) for _, x in groupby(it, count))
+def strip_latex_delimiters(source):
+ """Remove LaTeX... |
jupyter__jupyter_core-286 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_core/command.py:main"
],
"edited_modules": [
"jupyter_core/command.py:main"
]
},
"file": "jupyter_core/command.py"
},
{
"changes": {
"added_entiti... | jupyter/jupyter_core | 71d36edeba3afd5b0e20d150e78e44dd0b2179f0 | Make JUPYTER_PREFER_ENV_PATH=1 default
I propose that `JUPYTER_PREFER_ENV_PATH=1` be made the default behavior.
I cannot imagine a case where someone would set up a virtual environment and not expect the python based software such as Jupyter lab to use what is installed in the virtual environment first. Thus, I bel... | diff --git a/jupyter_core/command.py b/jupyter_core/command.py
index 43698c0..33804c9 100644
--- a/jupyter_core/command.py
+++ b/jupyter_core/command.py
@@ -231,13 +231,13 @@ def main():
if args.debug:
env = os.environ
- if paths.envset("JUPYTER_PREFER_ENV_PATH... |
jupyter__jupyter_core-291 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_core/application.py:JupyterApp.config_file_paths"
],
"edited_modules": [
"jupyter_core/application.py:JupyterApp"
]
},
"file": "jupyter_core/application.py"
}... | jupyter/jupyter_core | 1cedf84c1dd1e4062a0f7faf998b146dffa3a034 | Jupyter --paths incorrect output
Hi,
`jupyter --paths` outputs:
```
$ jupyter --paths
config:
/path/to/user/.jupyter
/path/to/venv/etc/jupyter
/usr/local/etc/jupyter
/etc/jupyter
data:
/path/to/user/.local/share/jupyter
/path/to/venv/share/jupyter
/usr/local/share/jupyter
... | diff --git a/jupyter_core/application.py b/jupyter_core/application.py
index cb46d12..5b05706 100644
--- a/jupyter_core/application.py
+++ b/jupyter_core/application.py
@@ -88,8 +88,8 @@ class JupyterApp(Application):
def config_file_paths(self):
path = jupyter_config_path()
if self.config_dir no... |
jupyter__jupyter_core-292 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"jupyter_core/command.py:main"
],
"edited_modules": [
"jupyter_core/command.py:main"
]
},
"file": "jupyter_core/command.py"
},
{
"changes": {
"added_entiti... | jupyter/jupyter_core | ea89d5e654f231d9b8372eb6c266ff6357868f68 | Please consider using appdirs
[appdirs](https://pypi.org/project/appdirs/) takes care of OS dependent directories. Using it would be a small change to [this file](https://github.com/jupyter/jupyter_core/blob/2dc34f70806b6668f965bfaa39623143cb2cda59/jupyter_core/paths.py#L56). | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index a7a75c1..8723446 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -60,7 +60,7 @@ repos:
- id: mypy
args: ["--config-file", "pyproject.toml"]
stages: [manual]
- additional_dependencies: [pytest]
+ ... |
jupyter__jupyter_core-323 | [
{
"changes": {
"added_entities": [
"jupyter_core/paths.py:_do_i_own"
],
"added_modules": [
"jupyter_core/paths.py:_do_i_own"
],
"edited_entities": [
"jupyter_core/paths.py:prefer_environment_over_user"
],
"edited_modules": [
"jupyter_core... | jupyter/jupyter_core | 719c1c3d64200b089596c5aaba106c1d7c0cad57 | Feature request: do not prefer env path if it is not writeable
Jupyter_core 5.0.0 made the env path preferred (unless you set `JUPYTER_PREFER_ENV_PATH=no`). This is probably the right general case, but it didn't work for us, and here's why.
We are indeed running that lab from inside an environment (specifically rub... | diff --git a/jupyter_core/paths.py b/jupyter_core/paths.py
index 708cbac..b801f8c 100644
--- a/jupyter_core/paths.py
+++ b/jupyter_core/paths.py
@@ -68,6 +68,33 @@ def get_home_dir() -> str:
_dtemps: Dict[str, str] = {}
+def _do_i_own(path: str) -> bool:
+ """Return whether the current user owns the given path"... |
jupyter__nbclient-307 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nbclient/cli.py:NbClientApp.initialize",
"nbclient/cli.py:NbClientApp.run_notebook"
],
"edited_modules": [
"nbclient/cli.py:NbClientApp"
]
},
"file": "nbclient/... | jupyter/nbclient | c788781fabe8a7d6ac1ba5815e3bd6377c7565fb | Calling `jupyter-execute` runs the notebook but doesn't save it
I'm trying to execute notebooks from the command line using jupyter-execute with the minimum number of dependencies (I just want to run and save the notebook, and `nbconvert` is overkill for this). If I use an environment with only "nbclient" and "ipykern... | diff --git a/nbclient/cli.py b/nbclient/cli.py
index 2151095..4cb2edf 100644
--- a/nbclient/cli.py
+++ b/nbclient/cli.py
@@ -2,9 +2,9 @@
from __future__ import annotations
import logging
-import pathlib
import sys
import typing
+from pathlib import Path
from textwrap import dedent
import nbformat
@@ -22,6 +22... |
jupyter__nbconvert-2005 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nbconvert/exporters/latex.py:LatexExporter.from_notebook_node"
],
"edited_modules": [
"nbconvert/exporters/latex.py:LatexExporter"
]
},
"file": "nbconvert/exporters/lat... | jupyter/nbconvert | 38dfebb6c8f729ac9ea1ac562a4e58f9996489cf | [PDF] Unable to recognise local paths
TLDR: nbconvert appears to be unable to recognise local path. I tried to change a notebook to pdf and it says that an image does not exist. It says ../images/errorcorrectionmodel.png does not exist when it does. VSCode was showing a link to the file in the error message.
Here i... | diff --git a/nbconvert/exporters/latex.py b/nbconvert/exporters/latex.py
index d3ae76ef..a23013cc 100644
--- a/nbconvert/exporters/latex.py
+++ b/nbconvert/exporters/latex.py
@@ -3,12 +3,14 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
+import os
from tra... |
jupyter__nbconvert-2199 | [
{
"changes": {
"added_entities": [
"nbconvert/filters/markdown_mistune.py:Plugin.__call__"
],
"added_modules": [
"nbconvert/filters/markdown_mistune.py:Plugin"
],
"edited_entities": [
"nbconvert/filters/markdown_mistune.py:import_plugin",
"nbconvert/... | jupyter/nbconvert | 6e5fdb31b77314a85f6ac199a92d4d1dc0f67f1d | Issues with mistune V3.1.0
In the latest release of mistune (3.1.0), they have renamed all the "axt" typos [Link](https://github.com/lepture/mistune/pull/359)
This has broken nbconvert as in the dependencies, we have "mistune>=2.0.3,<4".
As a quick fix, we should probably cap the upper limit of the version in the d... | diff --git a/docs/source/nbconvert_library.ipynb b/docs/source/nbconvert_library.ipynb
index dc9ea0e1..7757235a 100644
--- a/docs/source/nbconvert_library.ipynb
+++ b/docs/source/nbconvert_library.ipynb
@@ -486,7 +486,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "@damianavila wrote the Nik... |
jupyter__nbformat-173 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nbformat/__init__.py:read",
"nbformat/__init__.py:write"
],
"edited_modules": [
"nbformat/__init__.py:read",
"nbformat/__init__.py:write"
]
},
"file": "... | jupyter/nbformat | 2f20fd6ba7f7c06be9112ec555daf7838b9a58e4 | Please support pathlib.Path objects
Could you please add support for `pathlib.Path` objects in `nbformat.read` and `nbformat.write`?
See [pathlib](https://docs.python.org/3/library/pathlib.html) and [PEP 519](https://www.python.org/dev/peps/pep-0519/).
```
>>> import nbformat
>>> from pathlib import Path
>>> p... | diff --git a/nbformat/__init__.py b/nbformat/__init__.py
index 7552e30..bb9c0fc 100644
--- a/nbformat/__init__.py
+++ b/nbformat/__init__.py
@@ -133,11 +133,12 @@ def read(fp, as_version, **kwargs):
nb : NotebookNode
The notebook that was read.
"""
- if isinstance(fp, (str, bytes)):
- with ... |
jupyter__nbformat-198 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nbformat/json_compat.py:FastJsonSchemaValidator.__init__",
"nbformat/json_compat.py:FastJsonSchemaValidator.iter_errors"
],
"edited_modules": [
"nbformat/json_compat.py:FastJ... | jupyter/nbformat | 22396b8340d3bee7e666064560f4d904fece1d27 | When using fastjsonschema, nbformat.v4.new_code_cell throws error
Reproducer -
`env NBFORMAT_VALIDATOR=fastjsonschema python3 -c 'import nbformat; nbformat.v4.new_code_cell()'`
Output-
```Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/maharshi/Library/Python/3.7/lib/p... | diff --git a/nbformat/json_compat.py b/nbformat/json_compat.py
index 936d3c8..2c4f81e 100644
--- a/nbformat/json_compat.py
+++ b/nbformat/json_compat.py
@@ -38,6 +38,7 @@ class FastJsonSchemaValidator(JsonSchemaValidator):
name = "fastjsonschema"
def __init__(self, schema):
+ super().__init__(schema)... |
jupyter__nbgrader-1019 | [
{
"changes": {
"added_entities": [
"nbgrader/apps/quickstartapp.py:QuickStartApp._course_folder_content_exists"
],
"added_modules": null,
"edited_entities": [
"nbgrader/apps/quickstartapp.py:QuickStartApp.start"
],
"edited_modules": [
"nbgrader/apps/qu... | jupyter/nbgrader | fa75fcb2fb7fa24451966b5ae2a44480f88d508b | Allow nbgrader quickstart to work on an existing directory
Rather than refusing to run if the directory exists, quickstart should check if it is going to overwrite any files and if it is only then throw an error.
cc @ncclementi | diff --git a/nbgrader/apps/quickstartapp.py b/nbgrader/apps/quickstartapp.py
index 462e1cd7..62d57441 100644
--- a/nbgrader/apps/quickstartapp.py
+++ b/nbgrader/apps/quickstartapp.py
@@ -79,6 +79,14 @@ class QuickStartApp(NbGrader):
classes.append(QuickStartApp)
return classes
+ def _course_folde... |
jupyter__nbgrader-1024 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nbgrader/utils.py:parse_utc"
],
"edited_modules": [
"nbgrader/utils.py:parse_utc"
]
},
"file": "nbgrader/utils.py"
}
] | jupyter/nbgrader | 25878a1dcdd0e7aa1bb43794924f2e5ee9f82768 | Fix warning with timezones
Somewhere in the tests the following warning is being raised:
```
/home/jhamrick/miniconda3/lib/python3.6/site-packages/dateutil/parser/_parser.py:1165: UnknownTimezoneWarning: tzname PST identified but not understood. Pass `tzinfos` argument in order to correctly return a timezone-awa... | diff --git a/nbgrader/docs/source/plugins/late-plugin.rst b/nbgrader/docs/source/plugins/late-plugin.rst
index d28c33ef..8bed2d17 100644
--- a/nbgrader/docs/source/plugins/late-plugin.rst
+++ b/nbgrader/docs/source/plugins/late-plugin.rst
@@ -7,7 +7,7 @@ nbgrader will still compute how late each submission is.
For t... |
jupyter__nbgrader-1071 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"nbgrader/apps/exportapp.py:ExportApp"
]
},
"file": "nbgrader/apps/exportapp.py"
},
{
"changes": {
"added_entities": null,
"added_modules":... | jupyter/nbgrader | 48721e9a605aa785aa0916e2049f60b50d26e70e | Allow the exporting of grades per assignment id
The main issue I have with the exporting of grades (csv export) is that it is extremely sluggish exporting the entire gradebook (5min+), especially in cases where there may only be one or two grade changes for a given assignment.
My suggestion is to allow the exporting... | diff --git a/nbgrader/apps/exportapp.py b/nbgrader/apps/exportapp.py
index 0c343861..a4417107 100644
--- a/nbgrader/apps/exportapp.py
+++ b/nbgrader/apps/exportapp.py
@@ -9,7 +9,10 @@ aliases = {
'log-level' : 'Application.log_level',
'db': 'CourseDirectory.db_url',
'to' : 'ExportPlugin.to',
- 'export... |
jupyter__nbgrader-1410 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nbgrader/utils.py:get_partial_grade"
],
"edited_modules": [
"nbgrader/utils.py:get_partial_grade"
]
},
"file": "nbgrader/utils.py"
}
] | jupyter/nbgrader | 3aa5af2af2f10120be050adbccc57f830b803036 | Partial credit -- assigning zero marks gives full credit
When returning zero from a cell as partial credit, this awards full marks, due to the use of `> 0.0` rather than `>= 0.0` in the code below:
https://github.com/jupyter/nbgrader/blob/ed98bc9ddffec5900f99e310434d6f3c8cedc9b7/nbgrader/utils.py#L87-L94
e.g. con... | diff --git a/nbgrader/utils.py b/nbgrader/utils.py
index 37abb0f1..7ac70fc3 100644
--- a/nbgrader/utils.py
+++ b/nbgrader/utils.py
@@ -62,34 +62,53 @@ def is_locked(cell: NotebookNode) -> bool:
return cell.metadata['nbgrader'].get('locked', False)
def get_partial_grade(output, max_points, log=None):
+ ""... |
jupyter__nbgrader-778 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nbgrader/apps/baseapp.py:NbGrader._load_config"
],
"edited_modules": [
"nbgrader/apps/baseapp.py:NbGrader"
]
},
"file": "nbgrader/apps/baseapp.py"
},
{
"changes... | jupyter/nbgrader | 7b9b431e873d1b787f269373140f0de31636b06c | Make it clearer how to set permissions for the exchange directory
If the exchange directory hasn't been created when `nbgrader release` is run for the first time, an error occurs:
```
$ nbgrader release --Exchange.root=/tmp/exchange ps1
[ReleaseApp | WARNING] No nbgrader_config.py file found (rerun with --debug to... | diff --git a/nbgrader/apps/baseapp.py b/nbgrader/apps/baseapp.py
index ab115149..825cc8ae 100644
--- a/nbgrader/apps/baseapp.py
+++ b/nbgrader/apps/baseapp.py
@@ -211,17 +211,6 @@ class NbGrader(JupyterApp):
cfg.Exchange.merge(cfg.TransferApp)
del cfg.TransferApp
- if 'BaseNbConvertAp... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.