Skip to content

Commit

Permalink
rm 'from __future__ import with_statement'
Browse files Browse the repository at this point in the history
not needed since 2.5 is not supported anymore.
  • Loading branch information
denik committed Dec 23, 2013
1 parent 48d7002 commit fa1a2ed
Show file tree
Hide file tree
Showing 22 changed files with 2 additions and 24 deletions.
1 change: 0 additions & 1 deletion examples/dns_mass_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
GEVENT_RESOLVER=thread python dns_mass_resolve.py
"""
from __future__ import print_function
from __future__ import with_statement
import gevent
from gevent import socket
from gevent.pool import Pool
Expand Down
1 change: 0 additions & 1 deletion examples/psycopg2_pool.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import print_function
from __future__ import with_statement
import sys
import contextlib

Expand Down
2 changes: 1 addition & 1 deletion gevent/fileobject.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import absolute_import, with_statement
from __future__ import absolute_import
import sys
import os
from gevent.hub import get_hub
Expand Down
2 changes: 1 addition & 1 deletion gevent/threadpool.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright (c) 2012 Denis Bilenko. See LICENSE for details.
from __future__ import with_statement, absolute_import
from __future__ import absolute_import
import sys
import os
from gevent.hub import get_hub, getcurrent, sleep, integer_types
Expand Down
1 change: 0 additions & 1 deletion greentest/greentest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# THE SOFTWARE.

# package is named greentest, not test, so it won't be confused with test in stdlib
from __future__ import with_statement
import sys
import unittest
from unittest import TestCase as BaseTestCase
Expand Down
2 changes: 0 additions & 2 deletions greentest/lock_tests.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
"""
Various tests for synchronization primitives.
"""
from __future__ import with_statement

import sys
import time
from thread import start_new_thread, get_ident
Expand Down
1 change: 0 additions & 1 deletion greentest/test__api_timeout.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import with_statement
import sys
import greentest
import weakref
Expand Down
1 change: 0 additions & 1 deletion greentest/test__core_async.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import print_function
from __future__ import with_statement
import gevent
import gevent.core
import time
Expand Down
1 change: 0 additions & 1 deletion greentest/test__core_stat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import print_function
from __future__ import with_statement
import gevent
import gevent.core
import os
Expand Down
1 change: 0 additions & 1 deletion greentest/test__example_echoserver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import with_statement
from gevent.socket import create_connection, timeout
from unittest import main
import gevent
Expand Down
1 change: 0 additions & 1 deletion greentest/test__example_portforwarder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from __future__ import print_function
from __future__ import with_statement
from gevent import monkey; monkey.patch_all()
import sys
import socket
Expand Down
1 change: 0 additions & 1 deletion greentest/test__pool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import with_statement
from time import time
import gevent
from gevent import pool
Expand Down
1 change: 0 additions & 1 deletion greentest/test__queue.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import with_statement
from greentest import TestCase, main, GenericGetTestCase
import gevent
from gevent.hub import get_hub
Expand Down
1 change: 0 additions & 1 deletion greentest/test__sleep0.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import with_statement
import gevent
from util import alarm

Expand Down
1 change: 0 additions & 1 deletion greentest/test__socket_dns.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import with_statement
import re
import greentest
import socket
Expand Down
1 change: 0 additions & 1 deletion greentest/test__socket_dns6.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import with_statement
import greentest
import socket
from test__socket_dns import TestCase, add
Expand Down
2 changes: 0 additions & 2 deletions greentest/test__threading_vs_settrace.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from __future__ import print_function
from __future__ import with_statement

import sys
import subprocess
import unittest
Expand Down
1 change: 0 additions & 1 deletion greentest/test__threadpool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import with_statement
import sys
from time import time, sleep
import random
Expand Down
1 change: 0 additions & 1 deletion greentest/test_hub_join_timeout.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import with_statement
from contextlib import contextmanager
import gevent
from gevent.event import Event
Expand Down
1 change: 0 additions & 1 deletion greentest/test_queue.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Some simple queue module tests, plus some failure conditions
# to ensure the Queue locks remain stable.
#from __future__ import with_statement
from gevent import monkey; monkey.patch_all()
from gevent import queue as Queue
import threading
Expand Down
1 change: 0 additions & 1 deletion greentest/test_threading_2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# testing gevent's Event, Lock, RLock, Semaphore, BoundedSemaphore with standard test_threading
from __future__ import print_function
from __future__ import with_statement
from six import xrange

setup_ = '''from gevent import monkey; monkey.patch_all()
Expand Down
1 change: 0 additions & 1 deletion greentest/util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import with_statement
import sys
import os
import re
Expand Down

0 comments on commit fa1a2ed

Please sign in to comment.