Skip to content

Commit

Permalink
remove Python2 crumbs (#559)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-detiste committed Jul 31, 2024
1 parent ab8122e commit a67d90b
Show file tree
Hide file tree
Showing 85 changed files with 84 additions and 88 deletions.
2 changes: 1 addition & 1 deletion vertica_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .vertica.connection import Connection, connect, parse_dsn

Expand Down
4 changes: 0 additions & 4 deletions vertica_python/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@
* `real_types`
"""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import six as _six


Expand Down
2 changes: 1 addition & 1 deletion vertica_python/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# THE SOFTWARE.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from datetime import date, datetime, time, timezone
from typing import TYPE_CHECKING
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# THE SOFTWARE.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import re

Expand Down
2 changes: 1 addition & 1 deletion vertica_python/os_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import errno
import os
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/common/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import os
import sys
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import pytest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .base import VerticaPythonIntegrationTestCase

Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_cancel.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from multiprocessing import Process
import pytest
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_column.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .base import VerticaPythonIntegrationTestCase

Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import getpass
import socket
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from datetime import date, datetime, time
from dateutil.relativedelta import relativedelta
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from datetime import date, datetime, time
from dateutil.relativedelta import relativedelta
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from collections import namedtuple
from datetime import date
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .base import VerticaPythonIntegrationTestCase

Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_loadbalance.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .base import VerticaPythonIntegrationTestCase

Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_timezones.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from collections import namedtuple
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import os
import socket
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .base import VerticaPythonIntegrationTestCase

Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/integration_tests/test_unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .base import VerticaPythonIntegrationTestCase

Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/unit_tests/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import pytest
from ..common.base import VerticaPythonTestCase
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/unit_tests/test_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .base import VerticaPythonUnitTestCase
from ...errors import VerticaSyntaxError
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/unit_tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import logging
import os
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/unit_tests/test_notice.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import mock

Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/unit_tests/test_parsedsn.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .base import VerticaPythonUnitTestCase
from ...vertica.connection import parse_dsn
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/unit_tests/test_sql_literal.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from collections import namedtuple
from decimal import Decimal
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/tests/unit_tests/test_timestamps.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from collections import namedtuple
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/vertica/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# THE SOFTWARE.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from typing import TYPE_CHECKING, NamedTuple
if TYPE_CHECKING:
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/vertica/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# THE SOFTWARE.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import base64
import getpass
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/vertica/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# THE SOFTWARE.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import datetime
import glob
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/vertica/deserializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import json
import re
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/vertica/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# THE SOFTWARE.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import logging
from typing import TYPE_CHECKING
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/vertica/messages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# THE SOFTWARE.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from ..messages import backend_messages
from ..messages.backend_messages import *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from .authentication import Authentication
from .backend_key_data import BackendKeyData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from struct import unpack

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from struct import unpack

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from ..message import BackendMessage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from ..message import BackendMessage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
string is the name of the command that was run.
"""

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

import re
import warnings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
batches of parameters.
"""

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from struct import unpack

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.


from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from ..message import BackendMessage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from struct import unpack

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from struct import unpack_from

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

from __future__ import print_function, division, absolute_import, annotations
from __future__ import annotations

from ..message import BackendMessage

Expand Down
Loading

0 comments on commit a67d90b

Please sign in to comment.