Func-adl

Latest version: v3.3.3

Safety actively analyzes 687918 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 10

3.2

The engine that finds lambda's for translation in source code has received a major upgrade/change. It now uses the builtin python `tokenize` module.

* This makes it much more robust when dealing with comments, new lines, and other oddities.
* More safely checks are built in to catch mistakes in matching `lambda` expressions to the intended code.

There is one regression - which is caused because this code is more rigorous in how it treats the source code: Using the python `\` continuation character means that the line is really treated as a single line. This was not the case with the previous version of the parser. This may cause some expressions that work now to fail upon upgrade. You can just change the argument name, use `(` and `)` around the whole expression to get rid of the continuation characters, etc. to get your code quickly working again. You'll get an exception if this happens suggesting one of these two approaches if your code is affected.

What's Changed
* Spelling update and flake8 control by gordonwatts in https://github.com/iris-hep/func_adl/pull/112
* Use builtin Python tokenizer to find lambdas by gordonwatts in https://github.com/iris-hep/func_adl/pull/114


**Full Changelog**: https://github.com/iris-hep/func_adl/compare/3.1.2...3.2

3.2b1

Moving to a new tokenizer (the builtin one!!) for finding where `lambda`' expressions are!

What's Changed
* Spelling update and flake8 control by gordonwatts in https://github.com/iris-hep/func_adl/pull/112


**Full Changelog**: https://github.com/iris-hep/func_adl/compare/3.1.2...3.2b1

3.1.2

Found a `black` inspired reformat that tickled a bug in the `func_adl` parser. Updated.

What's Changed
* Infinite loop if this lambda is parsed in Jupyter by gordonwatts in https://github.com/iris-hep/func_adl/pull/111


**Full Changelog**: https://github.com/iris-hep/func_adl/compare/3.1.1...3.1.2

3.1.1

Correctly parse a lambda formatting that `black` will often impose:

python
my_obj().do_it(
lambda e: e.Jets("AntiKt4EMTopoJets").do_it(
lambda j: j.Jets("AntiKt4EMTopoJets").do_it(
lambda j1: j1.pt() / 1000.0
)
)
)

3.1

This point release is focused on correctly parsing lambda's - increasing the range of styles of code we can correctly detect inside a `Select`, `SelectMany` and `Where` statement.

For example, the following two statements now work (and didn't properly work before):

python
my_obj().Select(lambda x: x
+ 1
+ 2
+ 20
)


and

python
my_obj().do_it(lambda event: event + 1
).do_it(lambda event: event)


Since this is using heuristics, likely there are cases we've missed. Please do not hesitate to submit a bug report (or PR).

What's Changed
* Support multi-line lambda functions which are valid before complete by gordonwatts in https://github.com/iris-hep/func_adl/pull/103
* Test to make sure multi-line lambda with funny breaks works by gordonwatts in https://github.com/iris-hep/func_adl/pull/105
* Add `as_awkward` and `as_pandas`, etc by gordonwatts in https://github.com/iris-hep/func_adl/pull/106
* Python 3.11 support by gordonwatts in https://github.com/iris-hep/func_adl/pull/107


**Full Changelog**: https://github.com/iris-hep/func_adl/compare/3.0...3.1

3.1b1

What's Changed
* Support multi-line lambda functions which are valid before complete by gordonwatts in https://github.com/iris-hep/func_adl/pull/103
* Test to make sure multi-line lambda with funny breaks works by gordonwatts in https://github.com/iris-hep/func_adl/pull/105
* Add `as_awkward` and `as_pandas`, etc by gordonwatts in https://github.com/iris-hep/func_adl/pull/106
* Python 3.11 support by gordonwatts in https://github.com/iris-hep/func_adl/pull/107


**Full Changelog**: https://github.com/iris-hep/func_adl/compare/3.0...3.1b1

Page 4 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.