Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(pep0249): Use the wrapped value in CTX instead of unwrapped #446

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

Ferenc-
Copy link
Collaborator

@Ferenc- Ferenc- commented Aug 24, 2023

No description provided.

Signed-off-by: Ferenc Géczi <ferenc.geczi@ibm.com>
@Ferenc- Ferenc- requested review from pvital and GSVarsha August 24, 2023 11:54
Copy link
Member

@pvital pvital left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I tested it in two different ways, with a Flask app connecting to a PostgreSQL server. The first test was using the built-in Flask web server [1], and the second one was with uWSGI [2]. Both tests used the following code, and they worked, as you can see in [1] and [2].

    with get_db_connection() as conn:
        with conn.cursor() as cur:
            cur.execute(
                'SELECT * from Users;'
            )
            users = cur.fetchall()

[1] https://instana.rocks/s/-h9kZcw7RqunpU_WibydYQ
[2] https://instana.rocks/s/hfmukSbUSDqJ3t1kfUNCRg

@Ferenc- Ferenc- merged commit af596a9 into master Aug 28, 2023
@Ferenc- Ferenc- deleted the pep0249-context-manager-fix branch August 28, 2023 15:21
GSVarsha

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants