Skip to content

[sql lab] Use context manager for sqllab sessions - #4927

Merged
mistercrunch merged 11 commits into
apache:masterfrom
grafke:master
May 10, 2018
Merged

mistercrunch merged 11 commits into
apache:masterfrom
grafke:master

Conversation

@mistercrunch

Copy link
Copy Markdown
Member

The approach LGTM except for the fact that it breaks the build. Look into the travis logs for more details.

@grafke

grafke commented May 4, 2018

Copy link
Copy Markdown
Contributor Author

Ready for review

@codecov-io

codecov-io commented May 4, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #4927 into master will decrease coverage by 0.06%.
The diff coverage is 46.15%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4927      +/-   ##
==========================================
- Coverage   77.12%   77.06%   -0.07%     
==========================================
  Files          44       44              
  Lines        8539     8555      +16     
==========================================
+ Hits         6586     6593       +7     
- Misses       1953     1962       +9
Impacted Files Coverage Δ
superset/sql_lab.py 74.45% <46.15%> (-1.1%) ⬇️
superset/db_engine_specs.py 52.47% <0%> (-0.23%) ⬇️
superset/views/core.py 74.71% <0%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e213ccd...1cebcb0. Read the comment docs.

@grafke grafke changed the title Use context manager for sqllab sessions [sql lab] Use context manager for sqllab sessions May 4, 2018
@mistercrunch

Copy link
Copy Markdown
Member

Nice.

@mistercrunch
mistercrunch merged commit 8591319 into apache:master May 10, 2018
mistercrunch pushed a commit that referenced this pull request May 14, 2018
* use session context manager

* contextlib2 added to requirements.txt

* Fixing error: Import statements are in the wrong order. from contextlib2 import contextmanager should be before import sqlalchemy

* Fixing return inside generator

* fixed C812 missing trailing comma

* E501 line too long

* fixed E127 continuation line over-indented for visual indent

* E722 do not use bare except

* reorganized imports

* added context manager contextlib2.contextmanager

* fixed import ordering

(cherry picked from commit 8591319)
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* use session context manager

* contextlib2 added to requirements.txt

* Fixing error: Import statements are in the wrong order. from contextlib2 import contextmanager should be before import sqlalchemy

* Fixing return inside generator

* fixed C812 missing trailing comma

* E501 line too long

* fixed E127 continuation line over-indented for visual indent

* E722 do not use bare except

* reorganized imports

* added context manager contextlib2.contextmanager

* fixed import ordering
timifasubaa pushed a commit to timifasubaa/incubator-superset that referenced this pull request May 31, 2018
* use session context manager

* contextlib2 added to requirements.txt

* Fixing error: Import statements are in the wrong order. from contextlib2 import contextmanager should be before import sqlalchemy

* Fixing return inside generator

* fixed C812 missing trailing comma

* E501 line too long

* fixed E127 continuation line over-indented for visual indent

* E722 do not use bare except

* reorganized imports

* added context manager contextlib2.contextmanager

* fixed import ordering
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* use session context manager

* contextlib2 added to requirements.txt

* Fixing error: Import statements are in the wrong order. from contextlib2 import contextmanager should be before import sqlalchemy

* Fixing return inside generator

* fixed C812 missing trailing comma

* E501 line too long

* fixed E127 continuation line over-indented for visual indent

* E722 do not use bare except

* reorganized imports

* added context manager contextlib2.contextmanager

* fixed import ordering
@mistercrunch mistercrunch added 🍒 0.25.1 Cherry-picked to 0.25.1 🍒 0.25.2 Cherry-picked to 0.25.2 🍒 0.25.3 Cherry-picked to 0.25.3 🍒 0.25.4 Cherry-picked to 0.25.4 🍒 0.25.5 Cherry-picked to 0.25.5 🍒 0.25.6 Cherry-picked to 0.25.6 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Feb 27, 2024
@mistercrunch mistercrunch added the 🚢 0.26.0 First shipped in 0.26.0 label Feb 27, 2024
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* use session context manager

* contextlib2 added to requirements.txt

* Fixing error: Import statements are in the wrong order. from contextlib2 import contextmanager should be before import sqlalchemy

* Fixing return inside generator

* fixed C812 missing trailing comma

* E501 line too long

* fixed E127 continuation line over-indented for visual indent

* E722 do not use bare except

* reorganized imports

* added context manager contextlib2.contextmanager

* fixed import ordering

(cherry picked from commit a00d216)
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
* use session context manager

* contextlib2 added to requirements.txt

* Fixing error: Import statements are in the wrong order. from contextlib2 import contextmanager should be before import sqlalchemy

* Fixing return inside generator

* fixed C812 missing trailing comma

* E501 line too long

* fixed E127 continuation line over-indented for visual indent

* E722 do not use bare except

* reorganized imports

* added context manager contextlib2.contextmanager

* fixed import ordering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🍒 0.25.1 Cherry-picked to 0.25.1 🍒 0.25.2 Cherry-picked to 0.25.2 🍒 0.25.3 Cherry-picked to 0.25.3 🍒 0.25.4 Cherry-picked to 0.25.4 🍒 0.25.5 Cherry-picked to 0.25.5 🍒 0.25.6 Cherry-picked to 0.25.6 🚢 0.26.0 First shipped in 0.26.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants