python-trio / triopg

PostgreSQL client for Trio based on asyncpg
Other
45 stars 8 forks source link

make using context managers optional #4

Closed ioistired closed 4 years ago

ioistired commented 5 years ago

this is to match the interface of asyncpg, and because pools are often created in long running contexts, where using a context manager makes less sense.

codecov[bot] commented 5 years ago

Codecov Report

Merging #4 into master will decrease coverage by 0.64%. The diff coverage is 86.66%.

@@            Coverage Diff             @@
##           master       #4      +/-   ##
==========================================
- Coverage    92.8%   92.15%   -0.65%     
==========================================
  Files           6        6              
  Lines         139      153      +14     
  Branches        3        3              
==========================================
+ Hits          129      141      +12     
- Misses          7        9       +2     
  Partials        3        3
Impacted Files Coverage Δ
triopg/_tests/test_triopg.py 94.28% <85.71%> (-2.15%) :arrow_down:
triopg/_triopg.py 92.59% <87.5%> (-0.66%) :arrow_down:
ioistired commented 5 years ago

Oh, hmm, I didn't even notice #1…

touilleMan commented 4 years ago

@iomintz sorry for the lack of feedback on your work :disappointed:

As you said, the obligation for a contextmanager is more Trionic