Code Monkey home page Code Monkey logo

Comments (9)

agronholm avatar agronholm commented on June 12, 2024

What do you expect me to do about it?

from asyncio_extras.

zbuc avatar zbuc commented on June 12, 2024

from asyncio_extras.

agronholm avatar agronholm commented on June 12, 2024

Where does this generator come from that the error refers to?

from asyncio_extras.

zbuc avatar zbuc commented on June 12, 2024

It's referring to the session object created here:

async with scoped_session() as session:

I rewrote the code to not use asyncio-extras like this:

class ScopedSession():
    def __init__(self):
        self.session = None

    async def __aenter__(self):
        self.session = Session()
        return self.session
    
    async def __aexit__(self, exc_type, exc, tb):
        try:
            self.session.commit()
        except:
            self.session.rollback()
            raise
        finally:
            self.session.close()
            self.session = None

and it works fine, but I wanted to report this in case you wanted to try fixing the library.

from asyncio_extras.

agronholm avatar agronholm commented on June 12, 2024

What's there to fix? Isn't this a bug in pylint rather than asyncio_extras?

from asyncio_extras.

s0undt3ch avatar s0undt3ch commented on June 12, 2024

This is also 3.6 syntax, ie, yield in an async def...

from asyncio_extras.

agronholm avatar agronholm commented on June 12, 2024

Does pylint not handle 3.6 syntax?

from asyncio_extras.

s0undt3ch avatar s0undt3ch commented on June 12, 2024

Oh, sorry, it does, my comment was kind of unrelated to the issue(which i found on a google search for a 3.5 solution to the syntax issue). And afterwards I noticed that you can still use this with 3.5 with async_generator... However, not when the code is cython compiled(which is also not related to this issue).

from asyncio_extras.

agronholm avatar agronholm commented on June 12, 2024

If this is still a problem, you should probably file a bug against pylint since everything is working correctly on this end.

from asyncio_extras.

Related Issues (3)

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.