Giter Site home page Giter Site logo

Comments (5)

stebunovd avatar stebunovd commented on September 28, 2024

it is created/modified by PLY, the library that is used internally for language parsing. This file is updated automatically if you're using a different version of the library than the one with which the file was created originally. However, even if it fails to update it, it should still be working.

Also, this bug dabeaz/ply#31 may be relevant.

from djangoql.

vkrizan avatar vkrizan commented on September 28, 2024

I wonder if it would be possible to configure PLY to store it in different location, such as /var/lib.

from djangoql.

vkrizan avatar vkrizan commented on September 28, 2024

So, I find the option to store it somewhere else, but is not very ideal.

To change the directory in which the parsetab.py file (and other output files) are written, use:

parser = yacc.yacc(tabmodule="foo",outputdir="somedirectory")

Note: Be aware that unless the directory specified is also on Python's path (sys.path), subsequent imports of the table file will fail. As a general rule, it's better to specify a destination using the tabmodule argument instead of directly specifying a directory using the outputdir argument.

I guess we have to ignore the warning and/or wait for the bug that you've mentioned to be fixed.

I'd can check how other packages/projects deal with ply when their modules are written system-wide.

from djangoql.

stebunovd avatar stebunovd commented on September 28, 2024

yep, yacc() accepts tabmodule parameter, and DjangoQLParser() forwards **kwargs to yacc. However, on the end user level it is not configurable yet. Maybe we could add an optional configuration parameter for it in Django settings - do you think it would solve your use case?

from djangoql.

vkrizan avatar vkrizan commented on September 28, 2024

I've noticed the kwargs, but I am not sure if it would help to solve the issue. The ply idea is to have the file Python-importable. So, if the application, that would use djangoql, also be packaged (in /usr/lib), then it would have the same warning issued.

I guess this is more of a problem on PLY side. I am thinking of a way for PLY to import the file without it being on python.sys.path. For example by reading and evaluating the file. That way it can be in any directory without meddling with python.sys.path.

I'll try to think up with something. Feel free to close this issue.

Thank you very much for your support.

from djangoql.

Related Issues (20)

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.