Skip to content
This repository has been archived by the owner on Sep 5, 2019. It is now read-only.

Commit

Permalink
Revert "Ignore the psycopg2 warnings"
Browse files Browse the repository at this point in the history
This reverts commit 3d60482.
  • Loading branch information
Denis Krienbühl committed Feb 9, 2018
1 parent 3d60482 commit 9550b6a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions onegov/server/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
import time
import resource
import traceback
import warnings

from datetime import datetime
from onegov.server import Server
Expand All @@ -69,12 +68,6 @@
from xtermcolor import colorize


def ignore_warnings(*messages):
# we're going to be using the default psycopg2, not the new psycopg2-wheel
for message in messages:
warnings.filterwarnings("ignore", message=message)


@click.command()
@click.option(
'--config-file',
Expand Down Expand Up @@ -116,16 +109,6 @@ def run(config_file, port, pdb):
# because click does not play well with sphinx yet
# see https://github.com/mitsuhiko/click/issues/127

# not necessarily where you would expect this kind of filter, but since
# it is one of the earliast lines of code to be executed we kind of have
# no choice - the later we do this, the less effective our filters are,
# even though later would be more correct

ignore_warnings(
# we will keep using psycopg2 instead of psycogp2-binary
"The psycopg2 wheel package will be renamed from release 2.8"
)

def wsgi_factory():
return Server(Config.from_yaml_file(config_file), post_mortem=pdb)

Expand Down

0 comments on commit 9550b6a

Please sign in to comment.