Coder Social home page Coder Social logo

Comments (7)

mitsuhiko avatar mitsuhiko commented on May 6, 2024

Who the hell moves constants around without updating the docs? Can someone confirm this change?

from werkzeug.

romme avatar romme commented on May 6, 2024

Apparently it is in the documentation: http://seb-m.github.com/pyinotify/

But this change looks quire unreasonable anyway.

from werkzeug.

mitsuhiko avatar mitsuhiko commented on May 6, 2024

They are still on the event codes object anyways, so they are not moved but copied according to the docs.

from werkzeug.

luizvital avatar luizvital commented on May 6, 2024

Well, apparently the pyinotify API docs weren't updated clearly, but since 0.8 version the flags aren't present as attributes of the EventsCodes class anymore, they are in the pyinotify module directly or in EventsCodes.ALL_FLAGS dictionary as per the source code https://github.com/seb-m/pyinotify/blob/master/python2/pyinotify.py#L510.

The pyinotify 0.7 source are still in sourceforge, just in case you'd like to compare http://sourceforge.net/projects/pyinotify/files/pyinotify/0.7.1/pyinotify-0.7.1.tar.bz2/download

I've bumped into this problem when evaluating MapProxy (https://bitbucket.org/olt/mapproxy/src/ba32ad0a0ffc/mapproxy/util/ext/serving.py), I've opened an issue there with a patch https://bitbucket.org/olt/mapproxy/issue/24/pyinotify-api-error-in-servingpy-werkzeug

from werkzeug.

olt avatar olt commented on May 6, 2024

But the flags are set to EventsCode in line 513.
https://github.com/seb-m/pyinotify/blob/master/python2/pyinotify.py#L513

Guess it wasn't there in one of the 0.8 versions. What exact version are you using?

from werkzeug.

luizvital avatar luizvital commented on May 6, 2024

I'm using 0.8.9.

But the line you pointed set as attributes the keys of EventsCodes.FLAG_COLLECTIONS dictionary, they are OP_FLAGS, EVENT_FLAGS, SPECIAL_FLAGS. So for ex, EventsCodes.IN_DELETE_SELF doesn't exist anymore, instead you have to access as EventsCodes.OP_FLAGS['IN_DELETE_SELF'] or EventsCodes.ALL_FLAGS['IN_DELETE_SELF']

from werkzeug.

olt avatar olt commented on May 6, 2024

Ah, you're right. I didn't noticed that FLAG_COLLECTIONS was nested.

from werkzeug.

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.