Skip to content

Commit 3600769

Browse files
brmcjreback
authored andcommitted
CLN: temporary work around for buffer error in python3 (GH14468)
1 parent 0318a0f commit 3600769

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

pandas/core/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pandas.compat import builtins
88
import numpy as np
99

10-
from pandas.types.hinting import ArrayLike, PythonScalar, Scalar
10+
from pandas.types.hinting import ArrayLike, PythonScalar, Scalar, Buffer
1111
from pandas.types.missing import isnull
1212
from pandas.types.generic import ABCDataFrame, ABCSeries, ABCIndexClass
1313
from pandas.types.common import is_object_dtype, is_list_like, is_scalar
@@ -741,7 +741,7 @@ def item(self):
741741

742742
@property
743743
def data(self):
744-
# type: () -> buffer
744+
# type: () -> Buffer
745745
""" return the data pointer of the underlying data """
746746
return self.values.data
747747

pandas/types/hinting.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
# -*- coding: utf-8 -*-
33
import numpy as np
44

5-
from typing import TypeVar, AnyStr
5+
from typing import TypeVar, AnyStr, Any
66

7-
ArrayLike = TypeVar('ArrayLike', buffer, list, dict, np.array)
7+
Buffer = TypeVar('Buffer', Any)
8+
ArrayLike = TypeVar('ArrayLike', Buffer, list, dict, np.array)
89
Scalar = TypeVar('Scalar', int, float)
910
PythonScalar = TypeVar('PythonScalar', int, float, AnyStr)

0 commit comments

Comments
 (0)