Git Product home page Git Product logo

python-jmespath's People

Contributors

53ningen avatar areski avatar cclauss avatar cs-christopher-carsey avatar delirious-lettuce avatar dependabot[bot] avatar felixonmars avatar gmega avatar hannes-ucsc avatar hugovk avatar ilhanyumer avatar jamesls avatar jansel avatar jbryan avatar jdufresne avatar lostinthefrost avatar lsegal avatar mgorny avatar michael-k avatar moreati avatar mtdowling avatar nateprewitt avatar sanyer avatar shadiakiki1986 avatar sopel avatar springcomp avatar thilo-maurer avatar tirkarthi avatar trevorrowe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jamesls matanper

python-jmespath's Issues

Consider supporting functions with no arguments

A custom function with no arguments or an empty arguments list cannot be defined as it crashes.
Consider the following function:

@functions.signature()
def _func_now_ts(self):
    return "nowTs"

Here is the offending code:

jmes_options = jmespath.Options(dict_cls=collections.OrderedDict, custom_functions=CustomFunctions())
print([jmespath.search](http://jmespath.search/)('now_ts()', {}, jmes_options))

Lexical scoping issue

The code uses a Scope() object with pushScope() and popScope() methods.
However, popScope() is never called.

As a result, the following expression, for instance, is broken:

search( let({root: 'root'}, &root).root, {} )-> null

It currently returns "root" instead of null.

Please, consider changing the Scope() object behaviour to an immutable state.

Call for official maintainer

This project needs an official maintainer.

As this project is now under the JMESPath Community organization, it does not run the risk of becoming stale in the future.
If someone wants to carry this project forward, please let me know in the responses below.

I have not officially created a Maintainer’s Covenant with respect to projects within this organization but the gist of it is pretty simple: this project must be reasonably maintained.

  • Issues MUST be answered and pull requests considered in a timely manner. Every once in a month seems reasonable.
  • Best efforts MUST be made to follow changes to the specification.
  • Best efforts MUST be made to track changes to the compliance test suite and fix issues accordingy.
  • Participation in the discussions for proposals and new features is welcome.

If at any point a maintainer wants to step down, that‘s fine.
The burden can be transferred to someone else.

If you feel you cannot commit to maintain this implementation but would help contribute anyway, please be aware that we also look for maintainers to the JMESPath Community site itself.

Projected string slices are not evaluated

In most implementations, the rhs of a sub-expression is implemented differently when the lhs is a projection.
Due to the shape of the AST, the lhs is actually evaluated on the lhs projection.

However, when slicing a string, the rhs should be treated as a regular sub-expression.

As a result, in most implementations, the following expression does not evaluate correctly:

  • 'foo'[::-1].length(@) should evaluate to 3.

In some implementations, the result is ``"oof"ornull`.

Please, consider adding a compliance test.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.