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 |
|---|---|---|---|---|---|
hylang__hy-1309 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/importer.py:import_file_to_module"
],
"edited_modules": [
"hy/importer.py:import_file_to_module"
]
},
"file": "hy/importer.py"
}
] | hylang/hy | 672c8a1637c7ad5c5cc0ce8c77e044c99631a47e | Hy Ignores PYTHONDONTWRITEBYTECODE
When `PYTHONDONTWRITEBYTECODE` is set in the environment (for example using `export PYTHONDONTWRITEBYTECODE=1`) Hy should not generate `.pyc`. | diff --git a/NEWS b/NEWS
index 1a6c3d5e..b99e2285 100644
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ Changes from 0.13.0
[ Bug Fixes ]
* Numeric literals are no longer parsed as symbols when followed by a dot
and a symbol
+ * Hy now respects the environment variable PYTHONDONTWRITEBYTECODE
Changes from 0.1... |
hylang__hy-1314 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/cmdline.py:HyREPL.runsource"
],
"edited_modules": [
"hy/cmdline.py:HyREPL"
]
},
"file": "hy/cmdline.py"
},
{
"changes": {
"added_entities": [
"... | hylang/hy | 2e465dbf70624d2ab0923b878b68ed5a177da874 | eval doesn't use hy.models._wrappers
I came across this issue trying to narrow down a compiler error I was getting from a macro.
Why should the following piece of code throw an error?
```
=> (import numpy)
=> (= "." (get (name numpy) 0)))
False
=> (eval '(= "." (get (name numpy) 0)))
False
=> (eval `(= ".... | diff --git a/NEWS b/NEWS
index b99e2285..a21c5142 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,10 @@ Changes from 0.13.0
* Single-character "sharp macros" changed to "tag macros", which can have
longer names
* Periods are no longer allowed in keywords
+ * `eval` is now a function instead of a special form
+ ... |
hylang__hy-1325 | [
{
"changes": {
"added_entities": [
"hy/compiler.py:is_unpack",
"hy/compiler.py:HyASTCompiler.compile_unpack_iterable",
"hy/compiler.py:HyASTCompiler.compile_unpack_mapping"
],
"added_modules": [
"hy/compiler.py:is_unpack"
],
"edited_entities": [
... | hylang/hy | c3c7af2db3e6314fc9503ead68b677daf6a4f089 | apply doesn't use shadowed operators
Now this is possible:
``` clj
(let [[op +]] (apply op ["a" "b" "c"]))
```
and also this:
``` clj
(reduce + ["a" "b" "c"])
```
However this is not:
``` clj
(apply + ["a" "b" "c"])
```
which yields `HyTypeError: compiling the application of`+' didn't return a function call, but ... | diff --git a/NEWS b/NEWS
index fe7ffb98..3bae0cae 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,8 @@ Changes from 0.13.0
[ Language Changes ]
* `yield-from` is no longer supported under Python 2
+ * `apply` has been replaced with Python-style unpacking operators `#*` and
+ `#**` (e.g., `(f #* args #** kwargs)... |
hylang__hy-1369 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "hy/__init__.py"
}
] | hylang/hy | b6dceb0aa39f7b33dd70cec83fce3d08f68d947c | Official support for evaluating strings of Hy code from Python
Is it possible to embed some hy code inside a python file? As opposed to having the whole file be full on hy? | diff --git a/AUTHORS b/AUTHORS
index dcc9b0ce..7791140d 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -80,3 +80,4 @@
* Neil Lindquist <archer1mail@gmail.com
* Hikaru Ikuta <woodrush924@gmail.com>
* David Schaefer <david.schaefe@gmail.com>
+* Jordan Danford <jordandanford@gmail.com>
diff --git a/NEWS b/NEWS
index 6580965e..4... |
hylang__hy-1374 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/compiler.py:HyASTCompiler._compile_time_hack"
],
"edited_modules": [
"hy/compiler.py:HyASTCompiler"
]
},
"file": "hy/compiler.py"
}
] | hylang/hy | 26a426357910abf99371f097d6cb15dbedd08c15 | `try` form not working in `defmacro`
The simplest possible `try` form?
```Python
=> (try None (except [] None))
try:
_hy_anon_var_1 = None
except:
_hy_anon_var_1 = None
_hy_anon_var_1
```
Useless, but it works. Put it in a simple `defmacro`, and
```Hy
=> (defmacro foo [] (try None (except [] None)) `... | diff --git a/NEWS b/NEWS
index 4a2a9e59..81be8122 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,7 @@ Changes from 0.13.0
`(quit)` or `(exit)`
* `exec` now works under Python 2
* No TypeError from multi-arity defn returning values evaluating to None
+ * try form now possible in defmacro/deftag
[ Misc. ... |
hylang__hy-1403 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/cmdline.py:HyREPL.runsource"
],
"edited_modules": [
"hy/cmdline.py:HyREPL"
]
},
"file": "hy/cmdline.py"
}
] | hylang/hy | 3db13ec71f2c79a1b91f3e0a7169d85658a410a1 | Exception in __repr__ crashes repl
```Python
=> (defclass BadRepr[] (defn __repr__ [self] (/ 0)))
class BadRepr:
def __repr__(self):
return (1 / 0)
None
=> (BadRepr)
BadRepr()
Traceback (most recent call last):
File "C:\Users\ME\workspace\hy36-gilch\Scripts\hy-script.py", line 11, in <module>
... | diff --git a/NEWS b/NEWS
index 468d884a..3e23f668 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,7 @@ Changes from 0.13.0
* Fixed a crash when `macroexpand`ing a macro with a named import
* Fixed a crash when `with` suppresses an exception. `with` now returns
`None` in this case.
+ * Fixed a crash when --rep... |
hylang__hy-1431 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/errors.py:HyTypeError.__str__"
],
"edited_modules": [
"hy/errors.py:HyTypeError"
]
},
"file": "hy/errors.py"
}
] | hylang/hy | db210929d0d74d38232eef1a3cfaf81fc6508087 | repl shouldn't crash
```Hy
=> (defmacro bad [] `(macro-error 'x ""))
<function <lambda> at 0x000001D01D0ED7B8>
=> (bad)
Traceback (most recent call last):
File "c:\users\me\documents\github\hy\hy\cmdline.py", line 99, in runsource
ast_callback)
File "c:\users\me\documents\github\hy\hy\importer.py", line ... | diff --git a/NEWS b/NEWS
index cc19a6be..8fe2294b 100644
--- a/NEWS
+++ b/NEWS
@@ -39,6 +39,8 @@ Changes from 0.13.0
* Fixed a crash when `with` suppresses an exception. `with` now returns
`None` in this case.
* Fixed a crash when --repl-output-fn raises an exception
+ * Fixed a crash when HyTypeError w... |
hylang__hy-1456 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/models.py:check_inf_nan_cap"
],
"edited_modules": [
"hy/models.py:check_inf_nan_cap"
]
},
"file": "hy/models.py"
}
] | hylang/hy | 97987d739c4649d1722d489d3771f558b145a0fb | 1e1000 should not be a symbol
Hy counts `1e308` as a floating-point number, but `2e308` as a symbol.
```Python
=> (type 1e308)
type(1e+308)
<class 'float'>
=> (type 2e308)
type(2e308)
Traceback (most recent call last):
File "c:\users\me\documents\github\hy\hy\importer.py", line 201, in hy_eval
retur... | diff --git a/hy/models.py b/hy/models.py
index 3a769e86..fda7789f 100644
--- a/hy/models.py
+++ b/hy/models.py
@@ -179,7 +179,7 @@ if not PY3: # do not add long on python3
def check_inf_nan_cap(arg, value):
if isinstance(arg, string_types):
- if isinf(value) and "Inf" not in arg:
+ if isinf(value... |
hylang__hy-1638 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"hy/compiler.py:HyASTCompiler"
]
},
"file": "hy/compiler.py"
}
] | hylang/hy | 86deff6531ab12a359287d2dfed7beec8eb28791 | Edge case with symbol contains special characters (/ . *, etc.) and import
I found an edge case.
Let's say, if we have a symbol `/.*`, it worked in REPL
```clojure
=> (setv /.* 42)
=> /.*
42
```
If it is in a module, then importing will fail if we name it directly
```bash
$ cat test.hy
(setv /.* "Hidden Files... | diff --git a/NEWS.rst b/NEWS.rst
index 159fdfd1..bd46cb9f 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -67,6 +67,7 @@ Bug Fixes
* `NaN` can no longer create an infinite loop during macro-expansion
* Fixed a bug that caused `try` to drop expressions
* Fixed a bug where the compiler didn't properly compile `unquote-splice`... |
hylang__hy-1661 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/compiler.py:HyASTCompiler.compile_expression"
],
"edited_modules": [
"hy/compiler.py:HyASTCompiler"
]
},
"file": "hy/compiler.py"
},
{
"changes": {
"ad... | hylang/hy | 5bfd4592f6c5df063afbcd9c67ea40877f4ed52e | `(.foo #* bar)` raises a compile-time RecursionError
Maybe we'll decide not to implement this construct. Even then, we should avoid the infinite recursion. | diff --git a/NEWS.rst b/NEWS.rst
index d4255efa..2ec6b165 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -13,6 +13,11 @@ New Features
shorthand for `(get obj :key)`, and they accept a default value
as a second argument.
+Bug Fixes
+------------------------------
+* Fixed bugs in the handling of unpacking forms in meth... |
hylang__hy-1898 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/cmdline.py:run_command"
],
"edited_modules": [
"hy/cmdline.py:run_command"
]
},
"file": "hy/cmdline.py"
}
] | hylang/hy | 6fb668e886da53269ef9b9f6b1665563902e75ed | `lfor` can't see an imported name in `hy -c`
This one is deeply bizarre.
```
$ CODE='(import math) (print (lfor j [1] (math.sqrt 5)))'
$ hy -c "$CODE"
Traceback (most recent call last):
File "/usr/local/bin/hy", line 8, in <module>
sys.exit(hy_main())
File "<string>", line 1, in <module>
File "<str... | diff --git a/NEWS.rst b/NEWS.rst
index 220b9f76..8c97e0f1 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -19,6 +19,7 @@ Bug Fixes
* Quoted f-strings are no longer evaluated prematurely.
* Fixed a regression in the production of error messages for empty
expressions.
+* Fixed a scoping bug for code executed with `hy -c`.
... |
hylang__hy-1906 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/compiler.py:HyASTCompiler.compile_import_or_require"
],
"edited_modules": [
"hy/compiler.py:HyASTCompiler"
]
},
"file": "hy/compiler.py"
}
] | hylang/hy | d5c7a1553271c8d448ebcf1770b73305606aeaf1 | Hy repl doesn't open on clean install python 3.7
Did the following on a mac:
```
$ brew install python
$ python3
Python 3.7.0 ....
$ pip3 install hy
...
$ hy
-bash: /usr/local/bin/hy: /usr/local/opt/python3/bin/python3.5: bad interpreter: No such file or directory
```
When I ``cat `which hy``` I get:
`... | diff --git a/NEWS.rst b/NEWS.rst
index 8c97e0f1..b4bc08fe 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -20,6 +20,7 @@ Bug Fixes
* Fixed a regression in the production of error messages for empty
expressions.
* Fixed a scoping bug for code executed with `hy -c`.
+* Fixed a bug in the compilation of multiple `require`\s.... |
hylang__hy-1916 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/macros.py:_same_modules"
],
"edited_modules": [
"hy/macros.py:_same_modules"
]
},
"file": "hy/macros.py"
}
] | hylang/hy | b9d3dd7e03fc21b133286ccf3b8343c78fd5a91f | Can't `hy.eval` a `require` form in Python
I'm getting an error when doing a `require` using the `hy.eval` functionality.
The version of python works when hy is loaded:
```
hy 0.18.0 using CPython(default) 3.7.5 on Darwin ... | diff --git a/AUTHORS b/AUTHORS
index aa9ce4b7..eda7ad9c 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -99,4 +99,5 @@
* Raymund MARTINEZ <zhaqenl@protonmail.com>
* Zepeng Zhang <redraiment@gmail.com>
* Joseph Egan <joseph.s.egan@gmail.com>
-* Xi Jin <xij@usc.edu>
\ No newline at end of file
+* Xi Jin <xij@usc.edu>
+* Alexey ... |
hylang__hy-1926 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/compiler.py:HyASTCompiler._rewire_init"
],
"edited_modules": [
"hy/compiler.py:HyASTCompiler"
]
},
"file": "hy/compiler.py"
}
] | hylang/hy | 7eed9f545dd3761f6b5ef4b9ef97bc99fdcaaf8d | `setv` in `defclass` with odd number of arguments crashes the compiler
The following code crashes the compiler:
```lisp
(import csv)
(defclass my-dialect [csv.Dialect]
(setv lineterminator "\n")
(setv delimiter = ";")
(setv quotechar = "\"")
(setv quoting csv.QUOTE-MINIMAL))
```
And result:
```l... | diff --git a/NEWS.rst b/NEWS.rst
index 149f0a55..28acdfa7 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -7,6 +7,8 @@ Bug Fixes
------------------------------
* Fixed a bug that made `hy.eval` from Python fail on `require`.
* Fixed a bug that prevented pickling of keyword objects.
+* Fixed a compiler crash from `setv` with... |
hylang__hy-1951 | [
{
"changes": {
"added_entities": [
"hy/models.py:HyObject.start_line",
"hy/models.py:HyObject.start_column"
],
"added_modules": null,
"edited_entities": [
"hy/models.py:wrap_value"
],
"edited_modules": [
"hy/models.py:HyObject",
"hy/mod... | hylang/hy | 8828e2b59695244947d51c83a2679f4db6ffe83c | Compiler crash from invalid use of `#@`
```hy
$ > hy
hy 0.19.0+36.g14b17afd using CPython(default) 3.9.1 on Linux
=> (#@ a
... b)
Traceback (most recent call last):
File "/home/peter/Programming/hy/hy-source/venv/bin/hy", line 12, in <module>
sys.exit(hy_main())
File "/usr/lib/python3.9/code.py", line 2... | diff --git a/NEWS.rst b/NEWS.rst
index 3c2aaf20..1c9dce48 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -1,5 +1,13 @@
.. default-role:: code
+Unreleased
+==============================
+
+Bug Fixes
+------------------------------
+* Fixed a bug where AST nodes from macro expansion did not properly
+ receive source locati... |
hylang__hy-1955 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/completer.py:completion"
],
"edited_modules": [
"hy/completer.py:completion"
]
},
"file": "hy/completer.py"
}
] | hylang/hy | f185e981b2bcb57a0cae32243b6d2d3419e4bf3a | Make hy-history location configurable
How about an environment variable like `HY_HISTORY` that allows the user to change the location of `~/.hy-history`. | diff --git a/AUTHORS b/AUTHORS
index 95565fe3..10476df7 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -105,3 +105,4 @@
* Joshua Munn <public@elysee-munn.family>
* Peter Andreev <appa@gmx.co.uk>
* Sunjay Cauligi <scauligi@eng.ucsd.edu>
+* David Tscheppen <david.tscheppen@gmail.com>
diff --git a/NEWS.rst b/NEWS.rst
index 3631... |
hylang__hy-2040 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/_compat.py:reraise"
],
"edited_modules": [
"hy/_compat.py:reraise"
]
},
"file": "hy/_compat.py"
},
{
"changes": {
"added_entities": null,
"added_... | hylang/hy | dcc811251b8bac26ee2f9bb8af421ef9df296fe4 | Incorrect errors displayed in HyREPL
```hy
hy 0.20.0+89.g33ff26a3.dirty using CPython(default) 3.9.2 on Linux
=> (defn a [a a])
Traceback (most recent call last):
File "/usr/lib/python3.9/code.py", line 63, in runsource
code = self.compile(source, filename, symbol)
File "/usr/lib/python3.9/codeop.py", l... | diff --git a/NEWS.rst b/NEWS.rst
index d51f6697..5c209868 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -18,6 +18,10 @@ Removals
* From `functools`: `reduce`
* From `fractions`: `Fraction` (formerly `fraction`)
+Bug Fixes
+------------------------------
+* REPL now properly displays SyntaxErrors.
+
1.0a1 (released 2... |
hylang__hy-2064 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/compiler.py:HyASTCompiler.compile_expression"
],
"edited_modules": [
"hy/compiler.py:HyASTCompiler"
]
},
"file": "hy/compiler.py"
},
{
"changes": {
"ad... | hylang/hy | ae85a53daf60a3d624cc7d9093ea780a08487167 | Add `|` quotes and `\` escapes to Hy symbols and keywords.
Common Lisp lets you use arbitrary strings as symbols. If you include certain characters you have to escape them, either by quoting the whole string in `||`, or with a `\` per character.
``` Lisp
* (symbolp '|Am I a symbol?|)
T
* '|Am I a symbol?|
|... | diff --git a/NEWS.rst b/NEWS.rst
index 7d153ba6..be54477d 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -48,6 +48,8 @@ Bug Fixes
* `hy-repr` won't use the registerd method of a supertype anymore
* REPL `--spy` and `--repl-output-fn` can now overwrite `HYSTARTUP` values
when specified as a cmdline argument
+* The constru... |
hylang__hy-2250 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/cmdline.py:cmdline_handler"
],
"edited_modules": [
"hy/cmdline.py:cmdline_handler"
]
},
"file": "hy/cmdline.py"
}
] | hylang/hy | 816628b162d69156910ab3cc93676968dd5ce632 | Mangle module names passed to `hy -m`
$ echo '(print "hello")' > hi_ho.hy
$ hy -m hi_ho
hello
$ hy -m hi-ho
hy: module 'hi-ho' not found.
| diff --git a/NEWS.rst b/NEWS.rst
index 548f4e3d..37a1bb33 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -29,6 +29,7 @@ Bug Fixes
* Fixed a scoping bug in comprehensions in `let` bodies.
* Tab completion in the Hy REPL now properly unmangles symbol names.
* `!=` with model objects is now consistent with `=`.
+* Module name... |
hylang__hy-2262 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/lex/hy_reader.py:HyReader.prefixed_string",
"hy/lex/hy_reader.py:HyReader.bracketed_string",
"hy/lex/hy_reader.py:HyReader.read_chars_until"
],
"edited_modules": [
... | hylang/hy | caa70226ce5529a81cbd9cfa6269943e90266bc2 | Removing u""
After looking through #1226, I realized the `u` prefix is discarded. Why is this even allowed? Seems like it'd be potential cause for confusion for a Hy newbie. IMO, it would be better if it printed an error saying that all Hy strings are already Unicode.
Thoughts? | diff --git a/NEWS.rst b/NEWS.rst
index 2fa47ad7..6d562280 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -25,10 +25,15 @@ Breaking Changes
* `defmacro` once again requires the macro name as a symbol, not
a string literal.
* The parser has been completely rewritten. It is mostly
- backwards-compatible, with two exception... |
hylang__hy-2320 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/cmdline.py:set_path",
"hy/cmdline.py:run_icommand",
"hy/cmdline.py:cmdline_handler"
],
"edited_modules": [
"hy/cmdline.py:set_path",
"hy/cmdline.py:run_ico... | hylang/hy | f944da1f06b3f74d711b0271b07078054d4c304c | `__file__` is sometimes missing the directory
```sh
$ cd /tmp
$ echo 'print(__file__)' >a.py ; python3 a.py
/tmp/a.py
$ echo '(print __file__)' >b.hy ; hy b.hy
b.hy
```
The variable seems to be set correctly when the file is imported rather than run directly:
```sh
$ hy -c '(import a b) (print a.__file__ b... | diff --git a/NEWS.rst b/NEWS.rst
index 82f9e070..3db9298b 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -6,6 +6,7 @@ Unreleased
Bug Fixes
------------------------------
* Fixed `hy.repr` of `slice` objects with non-integer arguments.
+* `__file__` should now be set the same way as in Python.
0.24.0 (released 2022-06-23... |
hylang__hy-2326 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/cmdline.py:hyc_main"
],
"edited_modules": [
"hy/cmdline.py:hyc_main"
]
},
"file": "hy/cmdline.py"
}
] | hylang/hy | eae954508adeed1f3b0a8cff17e3bfb798cb468c | `hyc` doesn't require an argument
Compiling from stdin results in a weird error which seems like hyc is trying to read the file from the disk.
```
% cat > tmp.hy
(import os sys)
% hy tmp.hy
% hyc tmp.hy
Compiling tmp.hy
% hyc - < tmp.hy
[Errno 2] No such file or directory: '(import os sys)'
% hyc < t... | diff --git a/NEWS.rst b/NEWS.rst
index 39fb71f6..d4d8f62b 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -10,6 +10,12 @@ Bug Fixes
* Fixed a bug with `python -O` where assertions were still partly
evaluated.
+Misc. Improvements
+------------------------------
+* `hyc` now requires a command-line argument.
+* `hyc` print... |
hylang__hy-2353 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "hy/core/result_macros.py"
}
] | hylang/hy | b107100ca463aaf81e2d477347bbd2686e6ed0c8 | Make a new release
You fixed the setup.py to support 3.11, please release that. | diff --git a/NEWS.rst b/NEWS.rst
index 73db0939..5f83fd54 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -1,26 +1,27 @@
.. default-role:: code
-Unreleased
+0.25.0 (released 2022-11-08)
==============================
-Other Breaking Changes
+Breaking Changes
------------------------------
* `dfor` no longer requires br... |
hylang__hy-2354 | [
{
"changes": {
"added_entities": [
"hy/importer.py:_hy_compile_source"
],
"added_modules": [
"hy/importer.py:_hy_compile_source"
],
"edited_entities": [
"hy/importer.py:_could_be_hy_src"
],
"edited_modules": [
"hy/importer.py:_could_be_hy... | hylang/hy | 04866e52f72245889af74ae3cf7153a4af2f30c1 | Import from zip files
It would be handy to be able to import .hy files from .zip archives (for those of us who like to deploy stuff in single file bundles).
Right now I'm working around this by doing:
```
BUNDLE=sushy.zip
clean:
rm *.zip
bundle:
hyc sushy/*.hy
zip -r9 $(BUNDLE) . -i *.py *.pyc
test-bun... | diff --git a/NEWS.rst b/NEWS.rst
index 5f83fd54..d91d57ab 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -1,5 +1,15 @@
.. default-role:: code
+Unreleased
+=============================
+
+New Features
+------------------------------
+* On Pythons ≥ 3.7, Hy modules can now be imported from ZIP
+ archives in the same way as... |
hylang__hy-2412 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/reader/__init__.py:read_many"
],
"edited_modules": [
"hy/reader/__init__.py:read_many"
]
},
"file": "hy/reader/__init__.py"
},
{
"changes": {
"added_en... | hylang/hy | 1cc9c8b1f291fd4792aca888f893b78bc218c2ef | Tracebacks in a file with a shebang point to the wrong line
```hy
#!/usr/bin/env hy
;; wow
(raise Exception)
;; nothing
```
```
$ hy test.hy
Traceback (most recent call last):
File "/home/lyh/.local/bin/hy", line 8, in <module>
sys.exit(hy_main())
File "/usr/lib/python3.10/runpy.py", line 289, in r... | diff --git a/NEWS.rst b/NEWS.rst
index a7fcff32..53ff502d 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -11,6 +11,7 @@ Bug Fixes
------------------------------
* Fixed an installation failure in some situations when version lookup
fails.
+* Fixed traceback pointing in scripts with shebangs.
New Features
------------... |
hylang__hy-2423 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/reader/hy_reader.py:HyReader.fill_pos"
],
"edited_modules": [
"hy/reader/hy_reader.py:HyReader"
]
},
"file": "hy/reader/hy_reader.py"
}
] | hylang/hy | a03febe1c8f81583bcc22a977986aaa5acf4048a | Misplaced tracebacks from some models created in the reader
```
$ echo ';;;;;;\na.b' >ex.hy
$ hy ex.hy
Traceback (most recent call last):
…
File "/tmp/ex.hy", line 1, in <module>
;;;;;;
NameError: name 'a' is not defined
```
The error is wrongly attributed to line 1 because the reader fails to set p... | diff --git a/NEWS.rst b/NEWS.rst
index a0b30a20..6c8cb58f 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -7,7 +7,7 @@ Bug Fixes
------------------------------
* Fixed an installation failure in some situations when version lookup
fails.
-* Fixed traceback pointing in scripts with shebangs.
+* Fixed some bugs with traceba... |
hylang__hy-2449 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/cmdline.py:hy2py_worker",
"hy/cmdline.py:hy2py_main"
],
"edited_modules": [
"hy/cmdline.py:hy2py_worker",
"hy/cmdline.py:hy2py_main"
]
},
"file": "hy... | hylang/hy | 961e9439156660a8303cac34f46f09e7f30cadeb | `hy2py` and relative require
here is my module
```
.
├── __init__.py
├── args.hy
├── config.hy
├── log.hy
├── macros.hy
├── main.hy
├── type_helpers.hy
└── utils.hy
```
when i try to compile `hy2py args.hy` it raises:
```
hy.errors.HyMacroExpansionError:
File "args.hy", line 10
(require .macros ... | diff --git a/NEWS.rst b/NEWS.rst
index eb5c3b3f..1136f216 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -14,6 +14,9 @@ Breaking Changes
Forms like `#*word` will attempt to dispatch a macro named `*word`;
to unpack a symbol named `word`, write `#* word` (note the space).
* Reader macro names are no longer mangled.
+* `... |
hylang__hy-2454 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/reader/hy_reader.py:as_identifier"
],
"edited_modules": [
"hy/reader/hy_reader.py:as_identifier"
]
},
"file": "hy/reader/hy_reader.py"
}
] | hylang/hy | 6bb0ee93ac88a40d44d14dae267b7476ffd7a265 | `(hy.models.Symbol "#foo")` should be an error
for the same reason as `(hy.models.Symbol "5")`: `#foo` doesn't parse as a symbol. It parses as a reader-macro call. | diff --git a/NEWS.rst b/NEWS.rst
index cbd90377..d4765e98 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -29,6 +29,8 @@ Bug Fixes
* The parser no longer looks for shebangs in the REPL or `hy -c`.
* `require` with relative module names should now work correctly with
`hy -m`, as well as `hy2py`'s recursive mode.
+* `hy.mod... |
hylang__hy-2471 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/core/result_macros.py:maybe_annotated"
],
"edited_modules": [
"hy/core/result_macros.py:maybe_annotated"
]
},
"file": "hy/core/result_macros.py"
},
{
"change... | hylang/hy | 39be258387c3ced1ee0ca5b1376917d078970f6a | Improvement of error messages for pattern macros
Advancements to `funcpaserlib` such as https://github.com/vlasovskikh/funcparserlib/issues/52 should allow improving error messages produced while parsing calls to Hy's core pattern macros. In an error like the below example, `expected: some(...)` could probably be chang... | diff --git a/NEWS.rst b/NEWS.rst
index 345094bb..f9acfdcc 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -16,6 +16,11 @@ New Features
------------------------------
* `defn`, `defn/a`, and `defclass` now support type parameters.
+Misc. Improvements
+------------------------------
+* Some syntax errors raised by core macro... |
hylang__hy-2514 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/core/result_macros.py:compile_logical_or_and_and_operator"
],
"edited_modules": [
"hy/core/result_macros.py:compile_logical_or_and_and_operator"
]
},
"file": "hy/cor... | hylang/hy | 902233d854d765058927402d60f1ee8bef02daf8 | Optimize and/or
Depends on #824.
Related #842.
Even in the case that `and`/`or` contains a statement, it may have several expressions in a row that don't need to be converted to `if` branches. Hy could avoid redundant assignments by keeping those runs as expressions and only assigning the result to an anonymous variab... | diff --git a/NEWS.rst b/NEWS.rst
index 4b3e7082..969f8aad 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -34,6 +34,7 @@ Misc. Improvements
------------------------------
* Some syntax errors raised by core macros now have more informative
messages.
+* Logical operators now compile to simpler Python code in some cases.
... |
hylang__hy-2522 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/models.py:Complex.__new__"
],
"edited_modules": [
"hy/models.py:Complex"
]
},
"file": "hy/models.py"
}
] | hylang/hy | fa639893e5b56e3f3cc9f6ed46fd654dfaf35754 | Any capitalization of `NaN` and `Inf` are parsed as imaginary numbers with uppercase suffix `J`
This issue seems related to #1288 and #1294. Floating-point special values such as `NaN` and `Inf` are required to be capitalized exactly as such, but when used in imaginary number literals with _uppercase_ `J` suffix, any c... | diff --git a/NEWS.rst b/NEWS.rst
index 61d9a3fb..d167fe40 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -50,6 +50,8 @@ Bug Fixes
* Fixed incomplete recognition of macro calls with a unary dotted
head like `((. defn) f [])`.
* `~@ #*` now produces a syntax error instead of a nonsensical result.
+* Fixed parsing of infini... |
hylang__hy-2556 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"hy/compiler.py:HyASTCompiler.compile"
],
"edited_modules": [
"hy/compiler.py:HyASTCompiler"
]
},
"file": "hy/compiler.py"
},
{
"changes": {
"added_entitie... | hylang/hy | f6f00bfade9e1629de1bbfa601204c700b3ec3b7 | More misplaced tracebacks
There are cases not fixed by #2423 in which position information is still set incorrectly:
```
$ echo ';;;;;;\n(do-mac (quote (raise (ValueError))))' >ex.hy
$ hy ex.hy
Traceback (most recent call last):
…
File "/tmp/ex.hy", line 1, in <module>
;;;;;;
ValueError
```
```
... | diff --git a/NEWS.rst b/NEWS.rst
index ac9068e1..2b48f0ae 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -20,6 +20,10 @@ New Features
* You can now set `repl-ps1` and `repl-ps2` in your `HYSTARTUP` to customize
`sys.ps1` and `sys.ps2` for the Hy REPL.
+Bug Fixes
+------------------------------
+* Tracebacks now point to... |
hynek__argon2-cffi-174 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/argon2/_password_hasher.py:PasswordHasher.check_needs_rehash"
],
"edited_modules": [
"src/argon2/_password_hasher.py:PasswordHasher"
]
},
"file": "src/argon2/_passw... | hynek/argon2-cffi | abd0cf90d665f0b709ecccefe4b6187d14d60ffa | Make PasswordHasher.check_needs_rehash() accept bytes hash
`PasswordHasher.check_needs_rehash()` should also accept bytes hashes to be consistent with the rest of the API. | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e3fe7fb..46c0765 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,12 @@ What explicitly *may* change over time are the default hashing parameters and th
## [Unreleased](https://github.com/hynek/argon2-cffi/compare/23.1.0...HEAD)
+### Changed
+
+- `argon2.Pass... |
hynek__doc2dash-200 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/doc2dash/__main__.py:main"
],
"edited_modules": [
"src/doc2dash/__main__.py:main"
]
},
"file": "src/doc2dash/__main__.py"
},
{
"changes": {
"added_ent... | hynek/doc2dash | 4daa9acb4fdcb585025cdac1d0add2f34bf65881 | Add support for 2x icons
https://kapeli.com/docsets#addingicon | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b92576f..aa5dda5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,9 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased](https://github.com/hynek/doc2dash/compare/3.0.0...HEAD)
+### Added
+
+- Support for 2x icons... |
hynek__doc2dash-201 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/doc2dash/__main__.py:main"
],
"edited_modules": [
"src/doc2dash/__main__.py:main"
]
},
"file": "src/doc2dash/__main__.py"
},
{
"changes": {
"added_ent... | hynek/doc2dash | e8a4f374588dfb054cb1d984c9c5e72821588528 | Add support for Docset Playgrounds
https://kapeli.com/docsets#docsetPlaygrounds | diff --git a/CHANGELOG.md b/CHANGELOG.md
index aa5dda5..12fe351 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for 2x icons using the `--icon-2x` option.
[#200](https://github.com/hynek/doc2dash/pull/200)
+-... |
hynek__doc2dash-202 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/doc2dash/__main__.py:main"
],
"edited_modules": [
"src/doc2dash/__main__.py:main"
]
},
"file": "src/doc2dash/__main__.py"
},
{
"changes": {
"added_ent... | hynek/doc2dash | 2a583e3632a3d73cdf2627445efb672fd5d2d92e | Add support for DashDocSetDefaultFTSEnabled / DashDocSetFTSNotSupported
https://kapeli.com/docsets#fts | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12fe351..6391a1b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Support for linking to [docset playgrounds](https://kapeli.com/docsets#docsetPlaygrounds) using the `--playgr... |
hynek__pem-34 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/pem/_core.py"
}
] | hynek/pem | 9f3bc654d17503a18ace83329f4724a4c0271e10 | Add support for PCKS#8 encrypted `BEGIN ENCRYPTED PRIVATE KEY`
It looks like for now only `RSA PRIVATE KEY` is supported.
OpenSSL docs https://www.openssl.org/docs/man1.0.2/apps/openssl-pkcs8.html
A comparison
https://github.com/kjur/jsrsasign/wiki/Tutorial-for-PKCS5-and-PKCS8-PEM-private-key-formats-differenc... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 4735f42..779f442 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -26,7 +26,7 @@ Deprecations:
Changes:
^^^^^^^^
-*none*
+- You can now load encrypted PKCS#8 PEM key as ``pem.Key``.
----
diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst
index dcabac2..57802b5 10... |
hynek__pem-46 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/pem/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": [
"src/pem/_core.py:SSHPublicKey",
"src/pe... | hynek/pem | 129e3059d5339cd49e51c8a2464b931a6f2ed6a7 | Add support for RFC 4716 public and private keys
https://tools.ietf.org/html/rfc4716
Not sure if this is the right place to have this kind of support.... but since I saw support for OpenSSH.
Feel free to close this.
This is the SSH.com (Tectia) marker
```
—- BEGIN SSH2 PUBLIC KEY —-
Comment: "rsa-key-20... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index dc0e516..d6e191c 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -29,6 +29,14 @@ Changes:
- Added support for DSA private keys (``BEGIN DSA PRIVATE``).
This is also the OpenSSH legacy PEM format.
`#49 <https://github.com/hynek/pem/issues/49>`_
+- Added support f... |
hynek__pem-72 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "src/pem/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": [
"src/pem/_core.py:OpenPGPPublicKey",
"sr... | hynek/pem | 3bf2bcd051ac86e41f20b051d21b2f382b59bc9e | Add support for OpenPGP - RFC 4880
I think that it would be nice if PEM could also support the armored OpenPGP files from https://tools.ietf.org/html/rfc4880
As a start without the support for headers.
Below are the message types for reference,
```
BEGIN PGP MESSAGE
Used for signed, encrypted, or ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ffa157c..b1bb543 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,17 +12,17 @@ You can find out backwards-compatibility policy [here](https://github.com/hynek/
## [UNRELEASED](https://github.com/hynek/pem/compare/21.2.0...HEAD)
-### Backwards-incompatible changes:
... |
hynek__structlog-112 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/stdlib.py:add_logger_name",
"src/structlog/stdlib.py:ProcessorFormatter.format"
],
"edited_modules": [
"src/structlog/stdlib.py:add_logger_name",
"src/s... | hynek/structlog | 5636314046792f1cc2510af27a379746bfe9dbf2 | add_logger_name processor does not work in ProcessorFormatter's pre_chain
Hi,
### Steps to reproduce
1. Take [this](http://structlog.readthedocs.io/en/stable/standard-library.html?highlight=add_logger_name#rendering-using-structlog-based-formatters-within-logging) example from the doc.
2. Add `structlog.stdlib.add... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 51e3966..0a95646 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -24,7 +24,8 @@ Deprecations:
Changes:
^^^^^^^^
-*none*
+- ``structlog.stdlib.add_logger_name()`` now works in ``structlog.stdlib.ProcessorFormatter``'s ``foreign_pre_chain``.
+ `#112 <https://github.... |
hynek__structlog-117 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/stdlib.py:ProcessorFormatter.format"
],
"edited_modules": [
"src/structlog/stdlib.py:ProcessorFormatter"
]
},
"file": "src/structlog/stdlib.py"
}
] | hynek/structlog | ff7cf4ce1ea725a66e93d7d5d51ed5155fc20c52 | Suggested configurations leads to exceptions for third party libs.
Hi,
Python 2.7.5
CentOS Linux release 7.2.1511 (Core)
I tried the suggestion named:
> Rendering Using structlog-based Formatters Within logging
From:
[http://www.structlog.org/en/stable/standard-library.html#rendering-using-structlog-based... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 0a95646..b9dbfab 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -26,6 +26,10 @@ Changes:
- ``structlog.stdlib.add_logger_name()`` now works in ``structlog.stdlib.ProcessorFormatter``'s ``foreign_pre_chain``.
`#112 <https://github.com/hynek/structlog/issues/112>`... |
hynek__structlog-198 | [
{
"changes": {
"added_entities": [
"src/structlog/stdlib.py:BoundLogger.name",
"src/structlog/stdlib.py:BoundLogger.level",
"src/structlog/stdlib.py:BoundLogger.parent",
"src/structlog/stdlib.py:BoundLogger.propagate",
"src/structlog/stdlib.py:BoundLogger.handlers",... | hynek/structlog | 53ec2bbd011c9c2fad77bfb310ba102b4c3abcac | Inconsistency of BoundLogger with logging.Logger
There are no public attributes of `logging.Logger` available within `BoundLogger` (`propagate` for instance).
Also there are no attributes or methods of `logging.Filterer` (which is parent class of `logging.Logger`) available within `BoundLogger`. | diff --git a/src/structlog/stdlib.py b/src/structlog/stdlib.py
index fff4e28..95ef0fd 100644
--- a/src/structlog/stdlib.py
+++ b/src/structlog/stdlib.py
@@ -120,9 +120,52 @@ class BoundLogger(BoundLoggerBase):
)
#
- # Pass-through methods to mimick the stdlib's logger interface.
+ # Pass-through a... |
hynek__structlog-221 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/dev.py:ConsoleRenderer.__call__"
],
"edited_modules": [
"src/structlog/dev.py:ConsoleRenderer"
]
},
"file": "src/structlog/dev.py"
}
] | hynek/structlog | 8d3f31517caf2b877fb0dddaa61a81492d20c325 | ConsoleRender accepts only string as input
Hello :)
First of all I would like to thank you for this very handy package.
I have observed the following:
```python
import structlog
structlog.configure(
processors=[
structlog.stdlib.add_logger_name,
structlog.stdlib.add_log_level,
... | diff --git a/src/structlog/dev.py b/src/structlog/dev.py
index 0160650..372f7fc 100644
--- a/src/structlog/dev.py
+++ b/src/structlog/dev.py
@@ -8,7 +8,7 @@ Helpers that make development with ``structlog`` more pleasant.
from __future__ import absolute_import, division, print_function
-from six import StringIO
+fr... |
hynek__structlog-228 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/stdlib.py:ProcessorFormatter.__init__",
"src/structlog/stdlib.py:ProcessorFormatter.format"
],
"edited_modules": [
"src/structlog/stdlib.py:ProcessorFormatter"
... | hynek/structlog | 7da6d508413b9df1bd4bdcb70f2353174de70472 | Strip LogRecord.args Attribute After foreign_pre_chain Processors Run in ProcessorFormatter
First off, thank you to everyone involved in maintaining this project!
I love the chained approach it provides to building up a log message context. Great work!
I want to start using a structlog-based formatter to output l... | diff --git a/src/structlog/stdlib.py b/src/structlog/stdlib.py
index 86ada28..601a302 100644
--- a/src/structlog/stdlib.py
+++ b/src/structlog/stdlib.py
@@ -469,12 +469,14 @@ class ProcessorFormatter(logging.Formatter):
:param logger: Logger which we want to push through the ``structlog``
processor chain.... |
hynek__structlog-240 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/_base.py:BoundLoggerBase.try_unbind"
],
"edited_modules": [
"src/structlog/_base.py:BoundLoggerBase"
]
},
"file": "src/structlog/_base.py"
},
{
"c... | hynek/structlog | 0e6a3c6b9b18e57a86137c5b093289f003e2cc6d | Consistently name threadlocal and contextvars helper functions
The threadlocal and contextvars integrations use a different naming for their functions to bind, unbind, merge and clear the context. This came up as part of #236 and e3a6213afb2844572c8890693a83e142c41b1f0b.
I'd like to propose the following function na... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index fe05562..3ab315f 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -25,7 +25,7 @@ Deprecations:
Changes:
^^^^^^^^
-- Added a new module ``structlog.contextvars`` that allows to have a global but context-local ``structlog`` context the same way as with ``structlog.thr... |
hynek__structlog-350 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/_base.py:BoundLoggerBase._process_event"
],
"edited_modules": [
"src/structlog/_base.py:BoundLoggerBase"
]
},
"file": "src/structlog/_base.py"
},
{
... | hynek/structlog | 6bd5b32ea58a9f9a8edfd846284f918b78fe3468 | Support bytearray for final processor output
Use case: For performance in concatenating bytes, one might want their final processor to output a `bytearray` instead of `bytes`. This [blog post](https://www.guyrutenberg.com/2020/04/04/fast-bytes-concatenation-in-python/) illustrates that using a `bytearray` is the most p... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 2b4d49b..4332c70 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -39,6 +39,8 @@ Changes:
- All use of ``colorama`` on non-Windows systems has been excised.
Thus, colors are now enabled by default in ``structlog.dev.ConsoleRenderer`` on non-Windows systems.
You c... |
hynek__structlog-365 | [
{
"changes": {
"added_entities": [
"src/structlog/stdlib.py:ProcessorFormatter.remove_processors_meta"
],
"added_modules": null,
"edited_entities": [
"src/structlog/stdlib.py:ProcessorFormatter.__init__",
"src/structlog/stdlib.py:ProcessorFormatter.format"
]... | hynek/structlog | 2f956be9535bfd4aac9833c3f48396e03d6e47e3 | [Feature-Request] Allow copying attrs from stdlib LogRecord into structlog's msg
When `._proxy_to_logger` is called, Python's built-in logging calls `makeRecord` that computes [attributes](https://docs.python.org/3/library/logging.html#logrecord-attributes) that might be useful for some use cases (the most common examp... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 96cdb7f..11745d6 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -31,6 +31,13 @@ Changes:
`#364 <https://github.com/hynek/structlog/pull/364>`_
- ``structlog.stdlib.AsyncBoundLogger`` now determines the running loop when logging, not on instantiation.
That has a... |
hynek__structlog-376 | [
{
"changes": {
"added_entities": [
"src/structlog/processors.py:LogfmtRenderer.__init__",
"src/structlog/processors.py:LogfmtRenderer.__call__",
"src/structlog/processors.py:_items_sorter"
],
"added_modules": [
"src/structlog/processors.py:LogfmtRenderer",
... | hynek/structlog | d8d5e75ba779b31a96735486007cc2a281fe12b3 | Logfmt formatter is missing
Hello there!
Is there a way to remove the single quotes, e.g: `level='info'`to `level=info`? I'm using loki and their logfmt parser seems not to like it much (and I can't find how to remove them with structlog).
I could also try processing the logs before shipping them to loki, but if... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 2b0239d..95cfd52 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -33,7 +33,8 @@ Deprecations:
Changes:
^^^^^^^^
-*none*
+- Added the ``structlog.processors.LogfmtRenderer`` processor to render log lines using the `logfmt <https://brandur.org/logfmt>`_ format.
+ `#... |
hynek__structlog-385 | [
{
"changes": {
"added_entities": [
"src/structlog/_utils.py:get_processname"
],
"added_modules": [
"src/structlog/_utils.py:get_processname"
],
"edited_entities": null,
"edited_modules": null
},
"file": "src/structlog/_utils.py"
},
{
"changes":... | hynek/structlog | 0605473ccc13698e9c090cfd14e620f3de1ae6a3 | Add callsite info to event dictionary
I would like to have the following values in the event dictionary (taken from [`logging` module docs](https://docs.python.org/3/library/logging.html#logrecord-attributes)):
Attribute name | Description
-- | --
filename | Filename portion of pathname.
pathname | Full pathname... | diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 4b65f5e..5204729 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -42,6 +42,9 @@ Changes:
- Added the ``structlog.stdlib.ExtraAdder`` processor that adds extra attributes of ``logging.LogRecord`` objects to the event dictionary.
This processor can be used for adding... |
hynek__structlog-409 | [
{
"changes": {
"added_entities": [
"src/structlog/threadlocal.py:_deprecated"
],
"added_modules": [
"src/structlog/threadlocal.py:_deprecated"
],
"edited_entities": [
"src/structlog/threadlocal.py:_determine_threadlocal",
"src/structlog/threadlocal.p... | hynek/structlog | 72e99a80846afaacd2f356afff8a84ae49ff8b8a | structlog.threadlocal should be deprecated
I didn't realize it originally, but [as confirmed by Yury](https://twitter.com/1st1/status/1483807086341406720), contextvars are a higher-level abstraction that includes threadlocal and therefore we should stop maintaining both.
Greenlets appear to be [supported too](https:... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4241343..3b68702 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,13 @@ So please make sure to **always** properly configure your applications.
- Pickling is now only possible with protocol version 3 and newer.
+### Deprecated
+
+- The entire `structlog.threa... |
hynek__structlog-454 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/_log_levels.py:_make_filtering_bound_logger"
],
"edited_modules": [
"src/structlog/_log_levels.py:_make_filtering_bound_logger"
]
},
"file": "src/structlo... | hynek/structlog | 3e23c2a34243d48935c5e9d9c7c55cedb1a6e664 | Cannot use PositionalArgumentsFormatter with FilteringBoundLogger
I was switching to using `make_filtering_bound_logger` when I noticed that using a custom Gunicorn logger (that basically maps to structlog logging) wasn't working anymore. The issue is that the logger is doing something like `log.info("Starting gunicorn... | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 118b8aa..0e8705a 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -107,6 +107,7 @@ jobs:
fail-fast: false
matrix:
python-version:
+ # mypy on 3.7 fails but there's nothing we can do about it
... |
hynek__structlog-463 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/_log_levels.py:aexception",
"src/structlog/_log_levels.py:_make_filtering_bound_logger"
],
"edited_modules": [
"src/structlog/_log_levels.py:aexception",
... | hynek/structlog | 14cb331a62a38c71e4de19d66f75d3a8d3389c58 | FilteringBoundLogger Async methods - capture context outside of executor thread
Taking the new async methods on `FilteringBoundLogger` for a spin, I noticed context captured with `bind_contextvars()` is not logged.
Narrowed it down to this pattern:
```python
return await asyncio.get_running_loop().run_in... | diff --git a/src/structlog/_log_levels.py b/src/structlog/_log_levels.py
index 997d948..501c44a 100644
--- a/src/structlog/_log_levels.py
+++ b/src/structlog/_log_levels.py
@@ -88,11 +88,10 @@ def exception(self: FilteringBoundLogger, event: str, **kw: Any) -> Any:
async def aexception(self: FilteringBoundLogger, even... |
hynek__structlog-478 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/_log_levels.py:_nop",
"src/structlog/_log_levels.py:_anop"
],
"edited_modules": [
"src/structlog/_log_levels.py:_nop",
"src/structlog/_log_levels.py:_an... | hynek/structlog | 87cdcaf0205f9b62f793f331160d17cb12316e0d | Interpolation raises an error for filtered out logs
Interpolation appears to be broken when the log is filtered out. Observed with structulog 22.2.0.
```python
import logging
import structlog
structlog.configure(
processors=[
structlog.contextvars.merge_contextvars,
structlog.processors... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8ddee6f..48eeb0c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -22,6 +22,12 @@ This prevents crashes if something different than a string is passed for the *ev
[#475](https://github.com/hynek/structlog/pull/475)
+### Fixed
+
+- String interpolation doesn't cause c... |
hynek__structlog-533 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/_frames.py:_format_exception"
],
"edited_modules": [
"src/structlog/_frames.py:_format_exception"
]
},
"file": "src/structlog/_frames.py"
},
{
"ch... | hynek/structlog | 7c8366e71d5b18cd036c02644bee63a16faf6e2d | AttributeError raised when calling logger.exception without exception information
Hello everyone!
Before I describe the issue, let me provide some context.
### Main issue:
I encountered an error when attempting to call logger.exception outside an except block without including any information about an exception.... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 80dfe72..ae8d7ff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -32,7 +32,8 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
- `FilteringBoundLogger.exception()` and `FilteringBoundLogger.aexception()` now support positional argument... |
hynek__structlog-549 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": [
"src/structlog/dev.py:RichTracebackFormatter.__call__"
],
"added_modules... | hynek/structlog | 25c361c71763df0e7f39d0d36cca08ff4b46e924 | Allow passing arguments to Rich in structlog.dev.rich_traceback
I'm trying to figure out how to turn off locals when printing out stack traces with the rich logger (but also with the JSONRenderer). Can't seem to find a way to do that in the documentation, aside from just extracting it from the final `dict` log record.
... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3dd3029..858080b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -24,11 +24,16 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
- Official support for Python 3.12.
[#515](https://github.com/hynek/structlog/issues/515)
+
- `structlo... |
hynek__structlog-550 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/stdlib.py:ProcessorFormatter.__init__",
"src/structlog/stdlib.py:ProcessorFormatter.format"
],
"edited_modules": [
"src/structlog/stdlib.py:ProcessorFormatter"
... | hynek/structlog | 6323d5fc54a5e5ff09eca7d8b912ab6ef9256992 | ProcessorFormatter should be able to pass the message unformatted
https://github.com/hynek/structlog/blob/f7145a6a815083a748ec2e41a1d66dd63ce6c411/src/structlog/stdlib.py#L1016
The problematic pipeline is logging -> ProcessorFormatter -> structlog -> Sentry.
Currently ProcessorFormatter calls `getMessage` on the... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9a12c8f..7a0e35c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,9 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
- `structlog.threadlocal.tmp_bind()` now also works with `BoundLoggerLazyProxy` (in other words: before anyth... |
hynek__structlog-572 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/stdlib.py:BoundLogger.exception",
"src/structlog/stdlib.py:ProcessorFormatter.format"
],
"edited_modules": [
"src/structlog/stdlib.py:BoundLogger",
"src... | hynek/structlog | 8d3eeb1d9a7f7d5e20d515df45fa7779223bbbba | exc_info is not resolved properly when calling BoundLogger.exception
I have a slightly unusual setup that I should explain first. I'm using the maximalist approach of routing all of my structlog and stdlib logging through `ProcessorFormatter` as per [the docs](https://www.structlog.org/en/stable/standard-library.html#r... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index cbc966e..9a12c8f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,6 +28,10 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
- `structlog.threadlocal.tmp_bind()` now also works with `BoundLoggerLazyProxy` (in other words: before anyt... |
hynek__structlog-586 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/_log_levels.py:add_log_level"
],
"edited_modules": [
"src/structlog/_log_levels.py:add_log_level"
]
},
"file": "src/structlog/_log_levels.py"
}
] | hynek/structlog | ac37281c66efe82f4dfc8f812ab91f391548fd6b | "exception" is a possible log level from processors.add_log_level since 23.3.0
structlog.processors.add_log_level used to report the level of "exception" events as "error", but since 23.3.0 with certain configurations it's possible to get "exception" instead:
```sh
$ pip3 install structlog==23.2.0 && python3 main.p... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5dd033e..85fb3e2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,10 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
- The lazy logger proxy returned by `structlog.get_logger()` now returns its initial values when asked for con... |
hynek__structlog-594 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/processors.py:LogfmtRenderer.__call__"
],
"edited_modules": [
"src/structlog/processors.py:LogfmtRenderer"
]
},
"file": "src/structlog/processors.py"
}
... | hynek/structlog | db834f532618e28d3fb68349a6d76af8493de541 | LogfmtRenderer has a bug with escaped double quotes
In the code of LogFmtRenderer there is:
`value = f"{value}".replace('"', '\\"')`
However if you are trying to render an escaped double quote like
`"I want to render this \"string\" with logfmtrenderer"`
it ends up rendering it as
`\"I want to render this \... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index fd810de..9d3b8d5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,9 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
- `structlog.processors.LogfmtRenderer` now escapes newlines.
[#592](https://github.com/hynek/structlog/pull... |
hynek__structlog-603 | [
{
"changes": {
"added_entities": [
"src/structlog/processors.py:_get_callsite_pathname",
"src/structlog/processors.py:_get_callsite_filename",
"src/structlog/processors.py:_get_callsite_module",
"src/structlog/processors.py:_get_callsite_func_name",
"src/structlog/p... | hynek/structlog | f0c7e8c71eeb504829218b434bfb7774884bec5c | `CallsiteParameterAdder` not pickleable
I am developing an application where I bind a collection of data to a logger and ultimately pass that logger into subprocess. For my application, it's desired to have call stack information from the [`CallsiteParameterAdder`](https://github.com/hynek/structlog/blob/186d2eaf7a1d7... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c2f8df4..cf107bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,8 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
- It is now possible to disable log level-padding in `structlog.dev.LogLevelColumnFormatter` and `structlog.dev... |
hynek__structlog-618 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/stdlib.py:BoundLogger._dispatch_to_sync"
],
"edited_modules": [
"src/structlog/stdlib.py:BoundLogger"
]
},
"file": "src/structlog/stdlib.py"
}
] | hynek/structlog | 0a93f827f4bace552588b81c58c27f9c43ffe61e | Async logger calls report incorrect call site parameters
It appears that the async logger calls (`adebug`, `ainfo`, ...) are unable to access the correct stack frame / call site parameters because the calls are dispatched via `concurrent.futures.thread`.
I need compatibility with `stdlib logging` as well as `structl... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9edf242..645fffa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,9 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
- The `structlog.processors.CallsiteParameterAdder` can now be pickled.
[#603](https://github.com/hynek/stru... |
hynek__structlog-669 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/dev.py:ConsoleRenderer.__init__"
],
"edited_modules": [
"src/structlog/dev.py:ConsoleRenderer"
]
},
"file": "src/structlog/dev.py"
}
] | hynek/structlog | 8da1ba578479c1a40988eff897c08659d901b7cb | dev.ConsoleRenderer modifies my own style variable
Is it expected that `dev.ConsoleRenderer` [changes the value of my style variable passed with the `level_styles` argument](https://github.com/hynek/structlog/blob/main/src/structlog/dev.py#L634-L641), instead of copying it and modifying its own copy?
Demo:
```pyt... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index c9f8382..4e0886f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -28,13 +28,15 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
[#647](https://github.com/hynek/structlog/pull/647)
-
## Fixed
- `structlog.traceback.ExceptionDict... |
hynek__structlog-675 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/tracebacks.py:ExceptionDictTransformer.__init__"
],
"edited_modules": [
"src/structlog/tracebacks.py:ExceptionDictTransformer"
]
},
"file": "src/structlog... | hynek/structlog | e51f34705d0e6c6551ca0915eded697dc99f0e57 | TypeError when setting ExceptionDictTransformer's constructor arguments locals_max_string and locals_max_length to None
As of version 24.3.0 (see #627), `ExceptionDictTransformer` interprets the constructor arguments `locals_max_string` and `locals_max_length` as type `int | None` where `None` supposedly disables abbre... | diff --git a/src/structlog/tracebacks.py b/src/structlog/tracebacks.py
index 2392b34..8fada4d 100644
--- a/src/structlog/tracebacks.py
+++ b/src/structlog/tracebacks.py
@@ -382,10 +382,10 @@ class ExceptionDictTransformer:
max_frames: int = MAX_FRAMES,
use_rich: bool = True,
) -> None:
- i... |
hynek__structlog-680 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/structlog/_frames.py:is_missing_exc_info",
"src/structlog/_frames.py:_format_exception"
],
"edited_modules": [
"src/structlog/_frames.py:is_missing_exc_info",
"sr... | hynek/structlog | 234b6fe02da138379a58f0fd409d95358b4f0b68 | ExceptionRenderer w/ ExceptionDictTransformer unable to handle exception log outside exception handler
When using the `exception` log method outside an exception handler, the `ExceptionDictTransformer` raises an `AttributeError` as it calls `extract`, which does not handle the case where the given exception type is `No... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index cc53c62..f8cf714 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -30,9 +30,14 @@ You can find our backwards-compatibility policy [here](https://github.com/hynek/
## Fixed
-- `structlog.traceback.ExceptionDictTransformer` now correctly handles missing exceptions.
-
- ... |
hzdg__django-enumfields-125 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"enumfields/drf/fields.py:EnumField.to_representation"
],
"edited_modules": [
"enumfields/drf/fields.py:EnumField"
]
},
"file": "enumfields/drf/fields.py"
}
] | hzdg/django-enumfields | f5eaf451eccaeefa4906813cf07d0408630635fe | 2.1.0 Incompatibility with drf-yasg
After updated to `django-enumfields==2.1.0` I am getting the following error in a unit test that tests generation of OpenAPI schema using `drf-yasg2`.
The `enum` being used is:
```py
from django.contrib.postgres.fields import ArrayField
@unique
class Tag(Enum):
Upper ... | diff --git a/enumfields/drf/fields.py b/enumfields/drf/fields.py
index 6a7e864..bfac3c8 100644
--- a/enumfields/drf/fields.py
+++ b/enumfields/drf/fields.py
@@ -19,11 +19,17 @@ class EnumField(ChoiceField):
super().__init__(**kwargs)
def to_representation(self, instance):
- assert isinstance(inst... |
iamjackg__md2cf-97 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"md2cf/confluence_renderer.py:ConfluenceRenderer.link"
],
"edited_modules": [
"md2cf/confluence_renderer.py:ConfluenceRenderer"
]
},
"file": "md2cf/confluence_renderer.p... | iamjackg/md2cf | 1572ed3c4ecf849b8602d25b733852338f131baf | Link parsing fails for document references
Hi,
I just noticed that it's not possible to use `md2cf` anymore with document references like table of contents, since the relative path detector detects the paths that start with `#`
```md
[Frequently Asked Questions](#frequently-asked-questions-osep)
```
Having s... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3614043..a26d632 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Vers... |
iamlikeme__rainflow-7 | [
{
"changes": {
"added_entities": [
"rainflow.py:get_round_function",
"rainflow.py:_sort_lows_and_highs"
],
"added_modules": [
"rainflow.py:get_round_function",
"rainflow.py:_sort_lows_and_highs"
],
"edited_entities": [
"rainflow.py:extract_cy... | iamlikeme/rainflow | 8e961750baa61b12582b108677ff463b5c9cbf99 | Feature: Rainflow Matrix
I would love to see the method described [here](https://community.plm.automation.siemens.com/t5/Testing-Knowledge-Base/Rainflow-Counting/ta-p/383093) in this library.
Is there a chance this could happen? :) | diff --git a/README.md b/README.md
index b972db0..376ee71 100644
--- a/README.md
+++ b/README.md
@@ -24,9 +24,23 @@ number of cycles:
(0.48294318988133728, 0.5), (0.52799626197601901, 0.5), (0.78150280937784777, 0.5),
(1.102640610792428, 0.5)]
```
+
Not interested in all the decimals? Use *ndigits*:
```p... |
ianlini__flatten-dict-13 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "flatten_dict/flatten_dict.py"
},
{
"changes": {
"added_entities": [
"flatten_dict/reducer.py:underscore_reducer"
],
"added_m... | ianlini/flatten-dict | edec4e2d427b98d699760ce358b14c2304c82480 | Feature Proposition: Underscores as native separators
Hey there!
Can I make a pull request for native inclusion of the underscores as a separator?
Something like:
`
flatten(normal_dict, reducer="_")
`
which would output the expanded dict with underscores as separators directly.
What do you think?
... | diff --git a/README.rst b/README.rst
index 7590f88..68a1910 100644
--- a/README.rst
+++ b/README.rst
@@ -30,11 +30,12 @@ Flatten
----------
d : dict-like object
The dict that will be flattened.
- reducer : {'tuple', 'path', Callable}
+ reducer : {'tuple', 'path', 'underscore', Ca... |
iaroslavscript__elk-confd-parser-12 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "elkconfdparser/cli.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"elkconfdparser... | iaroslavscript/elk-confd-parser | 4eca1a05488ece59a61c788cc377a90a5a9dcfd1 | hot fix for root.append AttributeError: 'dict' object has no attribute 'append' | diff --git a/elkconfdparser/cli.py b/elkconfdparser/cli.py
index d8d92a7..9e296b3 100644
--- a/elkconfdparser/cli.py
+++ b/elkconfdparser/cli.py
@@ -37,4 +37,4 @@ def display(data):
if __name__ == "__main__": # noqa
- main(sys.argv[1:])
\ No newline at end of file
+ main(sys.argv[1:])
diff --git a/elkconfdp... |
ibis-project__ibis-10260 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/formats/polars.py:PolarsType.to_ibis"
],
"edited_modules": [
"ibis/formats/polars.py:PolarsType"
]
},
"file": "ibis/formats/polars.py"
}
] | ibis-project/ibis | 0a86e3c82ac9fcaf39da2c0c49d6c922208a09d5 | bug: ibis raises with Polars Array
### What happened?
```python
In [3]: import polars as pl
In [4]: import ibis
In [5]: ibis.memtable(pl.DataFrame({'a': [[1, 2], [3, 4]]}, schema={'a': pl.Array(pl.Int64, 2)}))
---------------------------------------------------------------------------
KeyError ... | diff --git a/ibis/formats/polars.py b/ibis/formats/polars.py
index 20cc8998d..b49ceb7e6 100644
--- a/ibis/formats/polars.py
+++ b/ibis/formats/polars.py
@@ -66,7 +66,7 @@ class PolarsType(TypeMapper):
except AttributeError: # pragma: no cover
time_unit = typ.tu # pragma: no cover
... |
ibis-project__ibis-2791 | [
{
"changes": {
"added_entities": [
"ibis/backends/base/sql/alchemy/registry.py:_startswith",
"ibis/backends/base/sql/alchemy/registry.py:_endswith"
],
"added_modules": [
"ibis/backends/base/sql/alchemy/registry.py:_startswith",
"ibis/backends/base/sql/alchemy/re... | ibis-project/ibis | dec3b967e8785bd150fbf8a9dea419eaedf70f69 | Add STARTS_WITH and ENDS_WITH
In ibis-project/ibis-bigquery#61 , I suggested to add the big query functions `STARTS_WITH` and `ENDS_WITH` to the BigQuery repo. @tswast, rightfully, pointed out that this could go into the main repo.
Should I go ahead and make a PR? Any thing I should look out for?
I understand th... | diff --git a/ci/deps/dask-min.yml b/ci/deps/dask-min.yml
index e29754213..9dc1b8f2e 100644
--- a/ci/deps/dask-min.yml
+++ b/ci/deps/dask-min.yml
@@ -1,2 +1,2 @@
-dask=2.22.0
+dask=2021.2.0
pyarrow
diff --git a/ci/deps/dask.yml b/ci/deps/dask.yml
index cadb4acf0..0a8d37072 100644
--- a/ci/deps/dask.yml
+++ b/ci/deps/da... |
ibis-project__ibis-4650 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "ibis/backends/dask/execution/strings.py"
},
{
"changes": {
"added_entities": [
"ibis/backends/duckdb/registry.py:_json_get_item"
]... | ibis-project/ibis | 725a6b1b989c3edae0b63d4681dfe9fc987582fe | feat: warn when limit reached in expr.execute()
When executing an expression a limit is silently applied to what is returned (unless you pass `limit=None`). A user could accidentally continue with local analysis on an arbitrary subset without realizing it's a subset. I'd like an optional parameter/setting that causes i... | diff --git a/ibis/backends/dask/execution/strings.py b/ibis/backends/dask/execution/strings.py
index 0b471eac0..dbd187391 100644
--- a/ibis/backends/dask/execution/strings.py
+++ b/ibis/backends/dask/execution/strings.py
@@ -54,7 +54,7 @@ DASK_DISPATCH_TYPES: TypeRegistrationDict = {
(
dd.... |
ibis-project__ibis-4670 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "ibis/backends/dask/execution/strings.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
... | ibis-project/ibis | 725a6b1b989c3edae0b63d4681dfe9fc987582fe | feat(pandas): support `substr` with `length=None`
The `substr` function provides a default value for the `length` parameter (`None`), and [the docs](https://ibis-project.org/docs/3.0.2/api/expressions/strings/#ibis.expr.types.strings.StringValue.substr) say `length` is optional
However the Pandas backend doesn't hav... | diff --git a/ibis/backends/dask/execution/strings.py b/ibis/backends/dask/execution/strings.py
index 0b471eac0..dbd187391 100644
--- a/ibis/backends/dask/execution/strings.py
+++ b/ibis/backends/dask/execution/strings.py
@@ -54,7 +54,7 @@ DASK_DISPATCH_TYPES: TypeRegistrationDict = {
(
dd.... |
ibis-project__ibis-4713 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/expr/builders.py:SimpleCaseBuilder.when"
],
"edited_modules": [
"ibis/expr/builders.py:SimpleCaseBuilder"
]
},
"file": "ibis/expr/builders.py"
},
{
"change... | ibis-project/ibis | fbd713456d6a9a609bcea410776c75741b8c4032 | feat: better tracebacks for type comparison errors
I have an expression something like this, but with more comparisons and more operations, generally (so harder to visually parse)
```python
expr = basics.join(ratings, basics.tconst == ratings.tconst).filter(
[_.titleType == "movie", _.numVotes > ... | diff --git a/ibis/expr/builders.py b/ibis/expr/builders.py
index 91fe8f996..c42eb95bc 100644
--- a/ibis/expr/builders.py
+++ b/ibis/expr/builders.py
@@ -66,7 +66,10 @@ class SimpleCaseBuilder(TypedCaseBuilder):
result_expr = rlz.any(result_expr)
if not rlz.comparable(self.base, case_expr):
- ... |
ibis-project__ibis-4728 | [
{
"changes": {
"added_entities": [
"ibis/expr/api.py:_sort_order"
],
"added_modules": [
"ibis/expr/api.py:_sort_order"
],
"edited_entities": [
"ibis/expr/api.py:desc",
"ibis/expr/api.py:asc"
],
"edited_modules": [
"ibis/expr/api.p... | ibis-project/ibis | 3a054fce3db40e59894f6910fae92e247da89dc6 | TypeError when calling `.order_by(ibis.desc(ibis._.x))`
Context: the `ibis._` deferred attribute resolver was introduced in #3804. However it does not always interact with other ibis constructs as one would have expected:
Reproducer:
The following works as expected (ascending `order_by` on deferred column name):
... | diff --git a/ibis/expr/api.py b/ibis/expr/api.py
index 3f28548ec..003029062 100644
--- a/ibis/expr/api.py
+++ b/ibis/expr/api.py
@@ -6,7 +6,7 @@ import datetime
import functools
import itertools
import operator
-from typing import Iterable, Mapping, Sequence
+from typing import Iterable, Literal, Mapping, Sequence
... |
ibis-project__ibis-4766 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/expr/datatypes/cast.py:can_cast_to_differently_signed_integer_type"
],
"edited_modules": [
"ibis/expr/datatypes/cast.py:can_cast_to_differently_signed_integer_type"
]
... | ibis-project/ibis | ac59dacb6963052ad9dfa2fa6631798be845b6d3 | feat: support more unsigned integer operations
I notice that many operations that I'd expect to work on unsigned integer types, do not.
```
In [2]: import ibis
In [6]: import ibis.expr.datatypes as dt
In [9]: t = ibis.table([("uint1", dt.uint64), ("uint2", dt.uint64)])
In [10]: t.uint1 - t.uint2
---------... | diff --git a/ibis/expr/datatypes/cast.py b/ibis/expr/datatypes/cast.py
index 99ea1629f..b7e21065f 100644
--- a/ibis/expr/datatypes/cast.py
+++ b/ibis/expr/datatypes/cast.py
@@ -80,10 +80,12 @@ def can_cast_null(source: dt.DataType, target: dt.DataType, **kwargs) -> bool:
def can_cast_to_differently_signed_integer_type... |
ibis-project__ibis-4772 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/expr/operations/relations.py:_clean_join_predicates"
],
"edited_modules": [
"ibis/expr/operations/relations.py:_clean_join_predicates"
]
},
"file": "ibis/expr/oper... | ibis-project/ibis | 438eb19f261b144c4c993eaf9c8ad3a475c22827 | bug: can't use deferred expression in join predicate
We don't support the use of deferred expressions in (at least) equality join predicates:
Reproducer:
```python
import ibis
from ibis import _ as C
t1 = ibis.table(
[("c", "str"), ("d", "int64")],
name="table0",
)
t2 = ibis.table(
[("a", "s... | diff --git a/ibis/expr/operations/relations.py b/ibis/expr/operations/relations.py
index eae216792..c96dd53a3 100644
--- a/ibis/expr/operations/relations.py
+++ b/ibis/expr/operations/relations.py
@@ -13,6 +13,7 @@ import ibis.expr.schema as sch
import ibis.expr.types as ir
import ibis.util as util
from ibis.common.... |
ibis-project__ibis-8262 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "ibis/formats/pyarrow.py"
}
] | ibis-project/ibis | 03acbd10ab55e6cdc9759682eafb79f13c4b4950 | bug: can't preview table containing UUIDs
### What happened?
```python
import ibis
ibis.options.interactive = True
t = ibis.memtable(
{
"x": [1, 2, 3],
}
)
con = ibis.duckdb.connect()
t = con.create_table("t", t, overwrite=True)
t = t.sql("SELECT *, uuid() as id FROM t")
t
```
After the ... | diff --git a/ibis/formats/pyarrow.py b/ibis/formats/pyarrow.py
index 993ce20fe..dc1192ecd 100644
--- a/ibis/formats/pyarrow.py
+++ b/ibis/formats/pyarrow.py
@@ -90,6 +90,7 @@ _to_pyarrow_types = {
dt.Unknown: pa.string(),
dt.MACADDR: pa.string(),
dt.INET: pa.string(),
+ dt.UUID: pa.string(),
}
|
ibis-project__ibis-8438 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"ibis/backends/bigquery/compiler.py:BigQueryCompiler"
]
},
"file": "ibis/backends/bigquery/compiler.py"
},
{
"changes": {
"added_entities": null,... | ibis-project/ibis | de174a220fd24ea6b5ab9ec5b0c6aa3352d9d3aa | feat: expose a function for generating a new uuid
Some backends have functions for returning a newly generated UUID (e.g. postgres's [`gen_random_uuid`](https://www.postgresql.org/docs/current/functions-uuid.html) or duckdb's [`uuid`](https://duckdb.org/docs/sql/functions/utility.html)). Since Ibis includes support for... | diff --git a/ibis/backends/bigquery/compiler.py b/ibis/backends/bigquery/compiler.py
index da2c0de87..da0be2d3d 100644
--- a/ibis/backends/bigquery/compiler.py
+++ b/ibis/backends/bigquery/compiler.py
@@ -122,6 +122,7 @@ class BigQueryCompiler(SQLGlotCompiler):
ops.Levenshtein: "edit_distance",
ops.Mo... |
ibis-project__ibis-8602 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/expr/types/arrays.py:ArrayValue.map",
"ibis/expr/types/arrays.py:ArrayValue.filter"
],
"edited_modules": [
"ibis/expr/types/arrays.py:ArrayValue"
]
},
"fil... | ibis-project/ibis | b4c43690da24c00b91d67a19e8cd664f51a66aa0 | bug: inner Deferred binds to wrong thing in `Table.select(_.x.map(_.b))`
### What happened?
See https://github.com/ibis-project/ibis/pull/8552
I think what is happening:
1. ibis encounters the _.x when evaluating the .select
2. it tries to bind it to the parent expression, the Table
3. then it recurses down into... | diff --git a/.github/workflows/check-generated-files.yml b/.github/workflows/check-generated-files.yml
index 9b3e5d3a9..f9da5cd1c 100644
--- a/.github/workflows/check-generated-files.yml
+++ b/.github/workflows/check-generated-files.yml
@@ -31,7 +31,7 @@ jobs:
uses: actions/checkout@v4
- name: install... |
ibis-project__ibis-8801 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/expr/api.py:table"
],
"edited_modules": [
"ibis/expr/api.py:table"
]
},
"file": "ibis/expr/api.py"
},
{
"changes": {
"added_entities": [
"ibi... | ibis-project/ibis | 06962b2597390b165ca418d4e03619f72defa437 | feat(table): add namespace kwarg to ibis.table
A user asked about how to specify a table namespace when creating an unbound table.
The `UnboundTable` op does accept a namespace argument, but we don't expose that option in `ibis/expr/api.py::table`.
We will run afoul of the dual-definition of `schema` here, but if... | diff --git a/docs/_freeze/tutorials/open-source-software/apache-flink/1_single_feature/execute-results/html.json b/docs/_freeze/tutorials/open-source-software/apache-flink/1_single_feature/execute-results/html.json
index 8fbe5d676..5b7c560b1 100644
--- a/docs/_freeze/tutorials/open-source-software/apache-flink/1_single... |
ibis-project__ibis-8860 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/backends/__init__.py:NoUrl._from_url"
],
"edited_modules": [
"ibis/backends/__init__.py:NoUrl"
]
},
"file": "ibis/backends/__init__.py"
},
{
"changes": {
... | ibis-project/ibis | 9cb4c8d17f9d7960c216b324a0153b9c785ea09f | feat: support empty URL for local backends in ibis.connect()
### Is your feature request related to a problem?
often when testing against multiple backends, myself or a user will do something like:
```python
backend = "polars"
if backend == "polars":
con = ibis.polars.connect()
...
```
Ibis supports... | diff --git a/ibis/backends/__init__.py b/ibis/backends/__init__.py
index e5c9798b2..6a443516c 100644
--- a/ibis/backends/__init__.py
+++ b/ibis/backends/__init__.py
@@ -1458,5 +1458,21 @@ class NoUrl:
name: str
- def _from_url(self, url: str, **_) -> ir.Table:
- raise NotImplementedError(self.name)
+... |
ibis-project__ibis-9034 | [
{
"changes": {
"added_entities": [
"ibis/backends/bigquery/compiler.py:BigQueryCompiler.visit_ExtractIsoYear"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"ibis/backends/bigquery/compiler.py:BigQueryCompiler"
]
},
"file": "ibi... | ibis-project/ibis | 878d0d5ffe3e544de24f86588066d6372cb3edf6 | Possibility to extract isoyear and isoweekday (or weekday) from a timestamp column.
### Is your feature request related to a problem?
_No response_
### What is the motivation behind your request?
I'm working on a POC to migrate from `pandas` to `ibis`. Since `pandas` (and also `duckdb`) support this, it would be gr... | diff --git a/ibis/backends/bigquery/compiler.py b/ibis/backends/bigquery/compiler.py
index b32a6476c..633d12708 100644
--- a/ibis/backends/bigquery/compiler.py
+++ b/ibis/backends/bigquery/compiler.py
@@ -391,6 +391,9 @@ class BigQueryCompiler(SQLGlotCompiler):
def visit_ExtractWeekOfYear(self, op, *, arg):
... |
ibis-project__ibis-9344 | [
{
"changes": {
"added_entities": [
"ibis/__init__.py:load_backend"
],
"added_modules": [
"ibis/__init__.py:load_backend"
],
"edited_entities": [
"ibis/__init__.py:__getattr__"
],
"edited_modules": [
"ibis/__init__.py:__getattr__"
]
... | ibis-project/ibis | df0e656d819f0666733725686d26cb874d32572f | refactor: remove ibis.NA
Opening an issue to discuss a separate the refactor of `ibis.NA` because doing it as part of https://github.com/ibis-project/ibis/pull/9300 will get messy.
To discuss:
Does removing `ibis.NA`imply:
1. Replace `ibis.NA` for `ibis.null()`
2. Get rid of untyped nulls all together, as in ... | diff --git a/.github/workflows/ibis-docs-main.yml b/.github/workflows/ibis-docs-main.yml
index 95317ba1c..49eb77ed8 100644
--- a/.github/workflows/ibis-docs-main.yml
+++ b/.github/workflows/ibis-docs-main.yml
@@ -74,5 +74,5 @@ jobs:
python .github/workflows/upload-algolia.py
env:
ALGOLIA_... |
ibis-project__ibis-9519 | [
{
"changes": {
"added_entities": [
"ibis/backends/sql/datatypes.py:SqlglotType._from_ibis_SpecificGeometry"
],
"added_modules": null,
"edited_entities": [
"ibis/backends/sql/datatypes.py:SqlglotType._from_sqlglot_GEOMETRY",
"ibis/backends/sql/datatypes.py:SqlglotT... | ibis-project/ibis | f041ea6436fe8aec73a8aed60e6b3ce3618b5a08 | bug: Loading geometry from postgres with SRID gives error
### What happened?
Very similar to #8807. When trying to load a table with a geometry that has an SRID set, I get the following error:
`TypeError: SqlglotType._from_sqlglot_GEOMETRY() takes from 1 to 2 positional arguments but 3 were given`
Here is a repr... | diff --git a/ibis/backends/sql/datatypes.py b/ibis/backends/sql/datatypes.py
index 432642fa1..b8bff67a1 100644
--- a/ibis/backends/sql/datatypes.py
+++ b/ibis/backends/sql/datatypes.py
@@ -27,8 +27,6 @@ _from_sqlglot_types = {
typecode.ENUM16: dt.String,
typecode.FLOAT: dt.Float32,
typecode.FIXEDSTRING: ... |
ibis-project__ibis-9595 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/expr/types/joins.py:prepare_predicates"
],
"edited_modules": [
"ibis/expr/types/joins.py:prepare_predicates"
]
},
"file": "ibis/expr/types/joins.py"
}
] | ibis-project/ibis | 1b02b184c227290545c11b7bc4af6f24fe2b6f6e | bug: SignatureValidationError from DerefMap during repeated joins
### What happened?
```python
t1 = ibis.memtable(
np.array([[1, 3, 4, 5, 0], [1, 4, 5, 7, 1], [0, 3, 1, 5, 2], [0, 4, 2, 7, 3]]),
columns=["i", "j", "lower", "upper", "label"],
)
t1v = t1.view()
t2 = t1.inner_join(t1v, ["i", "j"]).select(... | diff --git a/ibis/expr/types/joins.py b/ibis/expr/types/joins.py
index 43c1a3e36..c81fbc6cf 100644
--- a/ibis/expr/types/joins.py
+++ b/ibis/expr/types/joins.py
@@ -179,7 +179,11 @@ def prepare_predicates(
The comparison operation to construct if the input is a pair of
expression-like objects
"""... |
ibis-project__ibis-9630 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/backends/pyspark/__init__.py:Backend.do_connect",
"ibis/backends/pyspark/__init__.py:Backend.to_delta"
],
"edited_modules": [
"ibis/backends/pyspark/__init__.py:Backend"... | ibis-project/ibis | eaa1301483ac75cc3a01ddf30906edccdc157484 | bug: Postgres: UndefinedFunction extracting elements from JSONB
### What happened?
I'm attempting to extract an element from a JSONB column, but `JSON_EXTRACT_PATH` is used, throwing an error (should be `JSONB_EXTRACT_PATH`?)
### What version of ibis are you using?
9.1.0
### What backend(s) are you using, if any?
... | diff --git a/ci/schema/postgres.sql b/ci/schema/postgres.sql
index e94eec27a..540735125 100644
--- a/ci/schema/postgres.sql
+++ b/ci/schema/postgres.sql
@@ -268,6 +268,26 @@ INSERT INTO json_t VALUES
(13, '42'),
(14, '37.37');
+DROP TABLE IF EXISTS jsonb_t CASCADE;
+
+CREATE TABLE IF NOT EXISTS jsonb_t (row... |
ibis-project__ibis-9659 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"ibis/expr/api.py:_timestamp_range"
],
"edited_modules": [
"ibis/expr/api.py:_timestamp_range"
]
},
"file": "ibis/expr/api.py"
}
] | ibis-project/ibis | 69c5bf0de2061e329597309638efec49dd2b2a97 | bug(timestamps): `ibis.range` doesn't accept `ibis.timestamp` objects (ibis expressions)
### What happened?
```
In [1]: from ibis.interactive import *
In [2]: expr = ibis.range(ibis.now() - ibis.interval(days=1), ibis.now(), ibis.interval(seconds=1))
```
Fails with
```
TypeError: Unable to normalize <clas... | diff --git a/ibis/expr/api.py b/ibis/expr/api.py
index 6ec3e8e36..f8aca6d68 100644
--- a/ibis/expr/api.py
+++ b/ibis/expr/api.py
@@ -2237,7 +2237,9 @@ def _timestamp_range(
step: datetime.timedelta | ir.IntervalValue,
) -> ir.ArrayValue:
return ops.TimestampRange(
- start=normalize_datetime(start), st... |
icesat2py__icepyx-118 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "icepyx/__init__.py"
}
] | icesat2py/icepyx | d490ab5cd9de736949b80827becf659c8d642f93 | standardize import statements
set up icepyx to use ipx abbreviation and alias imports for things like query.Query | diff --git a/examples/ICESat-2_DAAC_DataAccess2_Subsetting.ipynb b/examples/ICESat-2_DAAC_DataAccess2_Subsetting.ipynb
index b95ab3b..6561f8d 100644
--- a/examples/ICESat-2_DAAC_DataAccess2_Subsetting.ipynb
+++ b/examples/ICESat-2_DAAC_DataAccess2_Subsetting.ipynb
@@ -37,11 +37,11 @@
},
{
"cell_type": "code",... |
icetemple__genrss-11 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"genrss/__init__.py:GenRSS.to_element"
],
"edited_modules": [
"genrss/__init__.py:GenRSS"
]
},
"file": "genrss/__init__.py"
}
] | icetemple/genrss | be86824ab086290cf85509625b204d59d839e4be | Genrss don't return image
<!-- Describe the bug -->
When i add image or image_url, genrss generate xml without image.
### To Reproduce
Steps to reproduce the behavior:
1. Init GenRSS object with arguments title, site_url, feed_url and image_url with any link.
2. try to get xml.
```python
image_url = 'https:/... | diff --git a/.gitignore b/.gitignore
index d9ecf51..361de9e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -152,4 +152,5 @@ tags
# IDE
.idea/
-.c9/
\ No newline at end of file
+.c9/
+.vscode/
\ No newline at end of file
diff --git a/genrss/__init__.py b/genrss/__init__.py
index 5dd3096..725cba3 100644
--- a/genrss/__i... |
icloud-photos-downloader__icloud_photos_downloader-1060 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/icloudpd/xmp_sidecar.py:build_metadata"
],
"edited_modules": [
"src/icloudpd/xmp_sidecar.py:build_metadata"
]
},
"file": "src/icloudpd/xmp_sidecar.py"
}
] | icloud-photos-downloader/icloud_photos_downloader | 337ea77aefb5c1189681a2971c037caeeec43f51 | Crash accessing `isFavorite` for --xmp-sidecar
## Overview
Note: the version I'm using is latest master at the time of writing, 337ea77aefb5c1189681a2971c037caeeec43f51
I have a couple `jpg` images in my library which I imported from a proper camera (a sony a6000).
With `--xmp-sidecar`, I get the following error:
`... | diff --git a/src/icloudpd/xmp_sidecar.py b/src/icloudpd/xmp_sidecar.py
index e2e7e78..60dd745 100644
--- a/src/icloudpd/xmp_sidecar.py
+++ b/src/icloudpd/xmp_sidecar.py
@@ -160,7 +160,7 @@ def build_metadata(asset_record: dict[str, Any]) -> XMPMetadata:
):
rating = -1 # -1 means rejected: https://www.ipt... |
idaholab__MontePy-360 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"montepy/input_parser/cell_parser.py:CellParser.geometry_expr",
"montepy/input_parser/cell_parser.py:CellParser.geometry_term",
"montepy/input_parser/cell_parser.py:CellParser.geometry_fa... | idaholab/MontePy | ab21045cdaa0ef38b3af6879f9e79f4133ff4f0c | Lack of data enforcement in syntax node is showing up again
**Describe the bug**
While working with a somewhat complicated model I wanted to see the exact MCNP input so I tried `cell._tree.format()` (I know rude, but I'll open another issue about this). This then lead to the error:
``` python
In [17]: cell._tree... | diff --git a/montepy/__init__.py b/montepy/__init__.py
index 3d966e18..93cf0e4f 100644
--- a/montepy/__init__.py
+++ b/montepy/__init__.py
@@ -36,6 +36,7 @@ except ImportError:
except ImportError:
__version__ = "Undefined"
+
# enable deprecated warnings for users
if not sys.warnoptions:
import os... |
idaholab__MontePy-398 | [
{
"changes": {
"added_entities": [
"montepy/data_inputs/material.py:Material.format_for_mcnp_input"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"montepy/data_inputs/material.py:Material"
]
},
"file": "montepy/data_inputs/mate... | idaholab/MontePy | 7a24ac044c25c52b6081887ab8bf560d7e795ab6 | Thermal Scattering laws get lost to the ether
**Describe the bug**
`ThermalScatteringLaw`s never get printed out to file with `problem.write_to_file`.
This is due to an older approach, where they are never loaded in `problem.data_inputs` and their parent `material` object is responsible for getting them to prin... | diff --git a/montepy/data_inputs/material.py b/montepy/data_inputs/material.py
index 022c20bc..44516538 100644
--- a/montepy/data_inputs/material.py
+++ b/montepy/data_inputs/material.py
@@ -116,6 +116,21 @@ class Material(data_input.DataInputAbstract, Numbered_MCNP_Object):
if cell.material == self:
... |
idaholab__MontePy-443 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"montepy/input_parser/input_file.py:MCNP_InputFile.__init__",
"montepy/input_parser/input_file.py:MCNP_InputFile.open"
],
"edited_modules": [
"montepy/input_parser/input_file.... | idaholab/MontePy | 50daa80e72cbe11c2db5bfcbcf2a6bce024585b0 | Guardrail for MCNP_Problem.write_to_file()
New function signature:
```python
def write_to_file(self, new_problem, overwrite=False):
"""
:param overwrite: Whether to overwrite the file at 'new_problem' if it exists
:type overwrite: bool
"""
. . .
```
**Describe the solution you'd like**... | diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index 206d3fab..afad9507 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -1,6 +1,13 @@
MontePy Changelog
=================
+#Next Version#
+---------------------
+
+**Features Added**
+
+* ``overwrite`` argument added to `MCNP_... |
idaholab__MontePy-451 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"montepy/input_parser/cell_parser.py:CellParser.geometry_term"
],
"edited_modules": [
"montepy/input_parser/cell_parser.py:CellParser"
]
},
"file": "montepy/input_parser... | idaholab/MontePy | 84165d2f578ab488d9fa3ded18467587c4649464 | MontePy Cell Parser gets confused by implicit Union operator of two parenthetical groups
**Describe the bug**
`Number conflict error: There was a numbering conflict when attempting to add CELL: -2000`
However, it is clear that -2000 is actually a surface in my cell definition albeit, it is the first surface after t... | diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index eaff2dbe..00fa661a 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -1,6 +1,14 @@
MontePy Changelog
=================
+#Next Version#
+----------------
+
+**Bug fixes**
+
+* Fixed parser bug with parsing cells with implici... |
idaholab__MontePy-467 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"montepy/numbered_object_collection.py:NumberedObjectCollection.append_renumber"
],
"edited_modules": [
"montepy/numbered_object_collection.py:NumberedObjectCollection"
]
},... | idaholab/MontePy | 66089ea372829ceda70569742d50d321141e4aff | append_renumber() validates against old problem
**Describe the bug**
When copying numbered objects from one `MCNP_Problem` to another, one can use `NumberedObjectCollection.append_renumber(Numbered_MCNP_Object)` to avoid number conflicts--unless the _new_ number in the new problem is already in use in the old proble... | diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index 8f317767..c943806b 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -1,6 +1,14 @@
MontePy Changelog
=================
+#Next Version#
+--------------
+
+**Bug fixes**
+
+* Fixed bug with appending and renumbeing numbered o... |
idaholab__MontePy-471 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"montepy/input_parser/syntax_node.py:PaddingNode.append"
],
"edited_modules": [
"montepy/input_parser/syntax_node.py:PaddingNode"
]
},
"file": "montepy/input_parser/synt... | idaholab/MontePy | 896ee12226a7dc43c63f5d9e51bb40effc0ca86d | multiline parentheses cell definition appears not to be supported by the parser
**Describe the bug**
Hello again, I am continuing my quest to try and make our inputs montepy readable. See below a minimal MCNP legal input that montepy apparently cannot parse.
**To Reproduce**
code snippet
``` python
import... | diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index c943806b..5af2893e 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -6,7 +6,8 @@ MontePy Changelog
**Bug fixes**
-* Fixed bug with appending and renumbeing numbered objects from other MCNP problems (:issue:`466`).
+* Fixe... |
idaholab__MontePy-472 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"montepy/data_inputs/isotope.py:Isotope.__init__",
"montepy/data_inputs/isotope.py:Isotope.mcnp_str"
],
"edited_modules": [
"montepy/data_inputs/isotope.py:Isotope"
]
... | idaholab/MontePy | 55d0c4ddd369501a77a5470ef9ddc1227979f448 | Material always writes original material components
**Describe the bug**
Since v0.2.0 and the deprecation of the `_mutated` attribute, MontePy no longer knows when a `Material` has been updated. Now, a `Material` instance always writes out its original lines, even when the `material_components` have changed.
The ... | diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index 5af2893e..d8e1bd36 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -6,6 +6,7 @@ MontePy Changelog
**Bug fixes**
+* Fixed bug with material compositions not being updated when written to file (:issue:`470`).
* Fixed bug ... |
idaholab__MontePy-474 | [
{
"changes": {
"added_entities": [
"montepy/data_inputs/isotope.py:Isotope.nuclide_str"
],
"added_modules": null,
"edited_entities": [
"montepy/data_inputs/isotope.py:Isotope.__str__",
"montepy/data_inputs/isotope.py:Isotope.__repr__"
],
"edited_module... | idaholab/MontePy | a6a884f5cfba35b3825ed716ce6c0a5ad85d7d70 | Simplify Isotope repr
Let's say we have an O-16 `Isotope` in the 01c xslib. Currently,
```python
>>> str(o16)
' O-16 (01c)'
>>> repr(o16)
'ZAID=8016, Z=8, A=16, element=oxygen, library=01c'
```
`__repr__` is mostly used for debugging and logging purposes and should remain simple.
**Describe the solutio... | diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index d8e1bd36..796e498f 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -10,6 +10,10 @@ MontePy Changelog
* Fixed bug with appending and renumbering numbered objects from other MCNP problems (:issue:`466`).
* Fixed bug with dyna... |
idaholab__MontePy-479 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"montepy/input_parser/cell_parser.py:CellParser"
]
},
"file": "montepy/input_parser/cell_parser.py"
},
{
"changes": {
"added_entities": null,
... | idaholab/MontePy | e63392e1ab8fd8d4e4f7ec7c0a9ed8a77d866544 | Parsing of transformations on FILL keywords appears to be failing
**Describe the bug**
Hello again, thanks for the the support you have been giving us lately. I'm back with another issue.
Montepy appears to fail parsing a cell that has a FILL card modified by a full transformation (see example).
**To Reproduce**
... | diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst
index d6467cb1..6d6a29d8 100644
--- a/doc/source/changelog.rst
+++ b/doc/source/changelog.rst
@@ -9,6 +9,7 @@ MontePy Changelog
* Fixed bug with material compositions not being updated when written to file (:issue:`470`).
* Fixed bug with appending and ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.