Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEP: move pkg_resources back inline in function (delayed import) #42006

Merged

Conversation

jorisvandenbossche
Copy link
Member

xref #40169 (comment), fixup of #41503

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while i understand this 'fixes' things it is misleading. we should just say setuptools is an actual dependency, which it is .

@jreback jreback mentioned this pull request Jun 14, 2021
@jorisvandenbossche jorisvandenbossche added this to the 1.3 milestone Jun 14, 2021
@jorisvandenbossche
Copy link
Member Author

jorisvandenbossche commented Jun 14, 2021

we should just say setuptools is an actual dependency, which it is .

It is not. It has never been, until #41503 accidentally made it so

@jreback
Copy link
Contributor

jreback commented Jun 14, 2021

nope it was always a dep just u declared

-1 on this PE

@jorisvandenbossche
Copy link
Member Author

Of course it was always a "dependency", but there is a difference between "optional" and "required" dependencies. We have lots of optional dependencies that are not declared in install_requires

@jorisvandenbossche
Copy link
Member Author

Apart from the "required dependency or not" discussion (-> let's have that in #41815, since this PR doesn't actually address that), there is also an "import time" reason for merging this PR.

Importing pkg_resources is quite expensive, and doing it at import time of pandas (while it's only needed when plotting with a custom backend) would add something like 20-30% to pandas import time.


Tested with python -X importtime -c "import pandas, pkg_resources" in an environment with released pandas 1.2 (which doesn't import pkg_resources). The results of a single run pasted below: importing pandas takes 393 ms, importing pkg_resouces an additional 91ms, which would give an increase of 23%. Those numbers are quite variable though, but based on repeating it a few times, it was always between 20-30%.
$ python -X importtime -c "import pandas, pkg_resources"
import time: self [us] | cumulative | imported package
import time:       540 |        540 | _frozen_importlib_external
import time:       147 |        147 |   time
import time:       236 |        383 | zipimport
import time:        59 |         59 |     _codecs
import time:       485 |        544 |   codecs
import time:       572 |        572 |   encodings.aliases
import time:       617 |       1732 | encodings
import time:       315 |        315 | encodings.utf_8
import time:       147 |        147 | _signal
import time:       450 |        450 | encodings.latin_1
import time:        64 |         64 |     _abc
import time:       346 |        410 |   abc
import time:       395 |        805 | io
import time:        87 |         87 |       _stat
import time:       366 |        452 |     stat
import time:      1217 |       1217 |     _collections_abc
import time:       177 |        177 |       genericpath
import time:       280 |        456 |     posixpath
import time:       799 |       2924 |   os
import time:       232 |        232 |   _sitebuiltins
import time:        80 |         80 |     _locale
import time:       145 |        225 |   _bootlocale
import time:       329 |        329 |   types
import time:       264 |        264 |       warnings
import time:       195 |        458 |     importlib
import time:       137 |        137 |       importlib.machinery
import time:       502 |        638 |     importlib.abc
import time:        84 |         84 |           _operator
import time:       324 |        408 |         operator
import time:       142 |        142 |         keyword
import time:       633 |        633 |           _heapq
import time:       160 |        792 |         heapq
import time:        92 |         92 |         itertools
import time:       196 |        196 |         reprlib
import time:      1115 |       1115 |         _collections
import time:       902 |       3644 |       collections
import time:        60 |         60 |         _functools
import time:       629 |        689 |       functools
import time:       641 |       4972 |     contextlib
import time:       448 |       6515 |   importlib.util
import time:        65 |         65 |   sitecustomize
import time:        49 |         49 |   usercustomize
import time:      1566 |      11901 | site
import time:       300 |        300 |     numpy._globals
import time:       176 |        176 |     numpy.__config__
import time:       154 |        154 |     numpy.version
import time:       132 |        132 |     numpy._distributor_init
import time:       809 |        809 |               enum
import time:        71 |         71 |                 _sre
import time:       370 |        370 |                   sre_constants
import time:       349 |        718 |                 sre_parse
import time:       280 |       1068 |               sre_compile
import time:       181 |        181 |               copyreg
import time:       525 |       2581 |             re
import time:      1298 |       3878 |           textwrap
import time:       715 |        715 |               math
import time:       974 |        974 |               _datetime
import time:      1324 |       3012 |             datetime
import time:      7374 |      10385 |           numpy.core._multiarray_umath
import time:       249 |        249 |               numpy.compat._inspect
import time:       211 |        211 |                   fnmatch
import time:       105 |        105 |                     nt
import time:        88 |         88 |                     nt
import time:        84 |         84 |                     nt
import time:        87 |         87 |                     nt
import time:       320 |        681 |                   ntpath
import time:        91 |         91 |                   errno
import time:       176 |        176 |                     urllib
import time:      3933 |       4108 |                   urllib.parse
import time:      1141 |       6230 |                 pathlib
import time:       141 |        141 |                 pickle5
import time:       540 |        540 |                     _struct
import time:       180 |        720 |                   struct
import time:       479 |        479 |                   _compat_pickle
import time:       676 |        676 |                   _pickle
import time:       113 |        113 |                       org
import time:        30 |        143 |                     org.python
import time:        27 |        169 |                   org.python.core
import time:      1228 |       3270 |                 pickle
import time:       257 |       9897 |               numpy.compat.py3k
import time:       332 |      10476 |             numpy.compat
import time:        42 |      10517 |           numpy.compat._inspect
import time:      1307 |      26086 |         numpy.core.overrides
import time:      3264 |      29349 |       numpy.core.multiarray
import time:       358 |        358 |       numpy.core.umath
import time:      1364 |       1364 |         numbers
import time:       196 |        196 |         numpy.core._string_helpers
import time:       218 |        218 |           numpy.core._dtype
import time:       420 |        637 |         numpy.core._type_aliases
import time:       419 |       2616 |       numpy.core.numerictypes
import time:       627 |        627 |           numpy.core._asarray
import time:       391 |        391 |               numpy.core._exceptions
import time:       276 |        666 |             numpy.core._methods
import time:      3566 |       4232 |           numpy.core.fromnumeric
import time:      7629 |      12487 |         numpy.core.shape_base
import time:       175 |        175 |           collections.abc
import time:       312 |        486 |         numpy.core._ufunc_config
import time:       939 |        939 |         numpy.core.arrayprint
import time:      3558 |      17469 |       numpy.core.numeric
import time:      3399 |       3399 |       numpy.core.defchararray
import time:       492 |        492 |       numpy.core.records
import time:       199 |        199 |       numpy.core.memmap
import time:       469 |        469 |       numpy.core.function_base
import time:       177 |        177 |       numpy.core.machar
import time:       360 |        360 |       numpy.core.getlimits
import time:       408 |        408 |       numpy.core.einsumfunc
import time:       657 |        657 |         numpy.core._multiarray_tests
import time:      4383 |       5039 |       numpy.core._add_newdocs
import time:       495 |        495 |       numpy.core._add_newdocs_scalars
import time:       145 |        145 |       numpy.core._dtype_ctypes
import time:       166 |        166 |           _ast
import time:       442 |        608 |         ast
import time:      2584 |       2584 |         platform
import time:      6276 |       6276 |           _ctypes
import time:       315 |        315 |           ctypes._endian
import time:      1162 |       7753 |         ctypes
import time:       946 |      11889 |       numpy.core._internal
import time:       167 |        167 |       numpy._pytesttester
import time:      6655 |      79677 |     numpy.core
import time:       267 |        267 |       numpy.lib.mixins
import time:       544 |        544 |           numpy.lib.ufunclike
import time:      1076 |       1619 |         numpy.lib.type_check
import time:       739 |       2357 |       numpy.lib.scimath
import time:      1057 |       1057 |                 numpy.lib.twodim_base
import time:      7972 |       7972 |                 numpy.linalg.lapack_lite
import time:       736 |        736 |                 numpy.linalg._umath_linalg
import time:      2171 |      11933 |               numpy.linalg.linalg
import time:       151 |      12084 |             numpy.linalg
import time:       316 |      12399 |           numpy.matrixlib.defmatrix
import time:       144 |      12542 |         numpy.matrixlib
import time:       491 |        491 |           numpy.lib.histograms
import time:      2740 |       3230 |         numpy.lib.function_base
import time:       538 |        538 |         numpy.lib.stride_tricks
import time:       644 |      16953 |       numpy.lib.index_tricks
import time:      1474 |       1474 |       numpy.lib.nanfunctions
import time:      1179 |       1179 |       numpy.lib.shape_base
import time:     11458 |      11458 |       numpy.lib.polynomial
import time:       755 |        755 |       numpy.lib.utils
import time:       742 |        742 |       numpy.lib.arraysetops
import time:       214 |        214 |           _weakrefset
import time:       432 |        645 |         weakref
import time:       227 |        227 |         numpy.lib.format
import time:      1267 |       1267 |             zlib
import time:       240 |        240 |               _compression
import time:       615 |        615 |               threading
import time:       426 |        426 |               _bz2
import time:      1442 |       2721 |             bz2
import time:       898 |        898 |               _lzma
import time:       345 |       1242 |             lzma
import time:        59 |         59 |             pwd
import time:       401 |        401 |             grp
import time:      1245 |       6933 |           shutil
import time:       696 |       7628 |         numpy.lib._datasource
import time:       404 |        404 |         numpy.lib._iotools
import time:      6901 |      15803 |       numpy.lib.npyio
import time:       295 |        295 |       numpy.lib.arrayterator
import time:       459 |        459 |       numpy.lib.arraypad
import time:       234 |        234 |       numpy.lib._version
import time:      2403 |      54374 |     numpy.lib
import time:      1017 |       1017 |         numpy.fft._pocketfft_internal
import time:      1664 |       2680 |       numpy.fft._pocketfft
import time:       493 |        493 |       numpy.fft.helper
import time:       263 |       3435 |     numpy.fft
import time:       428 |        428 |         numpy.polynomial.polyutils
import time:       373 |        373 |         numpy.polynomial._polybase
import time:       442 |       1242 |       numpy.polynomial.polynomial
import time:       352 |        352 |       numpy.polynomial.chebyshev
import time:       370 |        370 |       numpy.polynomial.legendre
import time:       315 |        315 |       numpy.polynomial.hermite
import time:       320 |        320 |       numpy.polynomial.hermite_e
import time:       268 |        268 |       numpy.polynomial.laguerre
import time:       583 |       3448 |     numpy.polynomial
import time:        88 |         88 |               backports_abc
import time:      1014 |       1101 |             numpy.random._common
import time:       551 |        551 |                 binascii
import time:       236 |        787 |               base64
import time:      1962 |       1962 |                 _hashlib
import time:       294 |        294 |                   _blake2
import time:       301 |        301 |                   _sha3
import time:       214 |        808 |                 hashlib
import time:       230 |       3000 |               hmac
import time:       292 |        292 |                   _bisect
import time:       107 |        398 |                 bisect
import time:       281 |        281 |                 _sha512
import time:       365 |        365 |                 _random
import time:       315 |       1357 |               random
import time:       174 |       5316 |             secrets
import time:       857 |       7274 |           numpy.random.bit_generator
import time:       428 |        428 |           numpy.random._bounded_integers
import time:       308 |        308 |           numpy.random._mt19937
import time:      1385 |       9393 |         numpy.random.mtrand
import time:       274 |        274 |         numpy.random._philox
import time:       242 |        242 |         numpy.random._pcg64
import time:       292 |        292 |         numpy.random._sfc64
import time:       778 |        778 |         numpy.random._generator
import time:       223 |      11199 |       numpy.random._pickle
import time:       223 |      11422 |     numpy.random
import time:       355 |        355 |     numpy.ctypeslib
import time:       314 |        314 |               _opcode
import time:       522 |        836 |             opcode
import time:       374 |       1209 |           dis
import time:       134 |        134 |               token
import time:       768 |        902 |             tokenize
import time:       131 |       1033 |           linecache
import time:      2433 |       4674 |         inspect
import time:      2983 |       7657 |       numpy.ma.core
import time:      1528 |       1528 |       numpy.ma.extras
import time:       299 |       9483 |     numpy.ma
import time:      2535 |     165485 |   numpy
import time:       331 |        331 |     pytz.exceptions
import time:       374 |        374 |     pytz.lazy
import time:       700 |        700 |     pytz.tzinfo
import time:       304 |        304 |     pytz.tzfile
import time:      1020 |       2726 |   pytz
import time:       200 |        200 |     dateutil._version
import time:       275 |        474 |   dateutil
import time:       673 |        673 |         mmap
import time:      2400 |       2400 |         typing
import time:      2413 |       5485 |       pandas._typing
import time:       397 |       5882 |     pandas.compat
import time:       219 |        219 |       distutils
import time:       959 |       1177 |     distutils.version
import time:       545 |       7603 |   pandas.compat.numpy
import time:      1107 |       1107 |               pandas._libs.tslibs.dtypes
import time:       369 |        369 |                 pandas._libs.tslibs.base
import time:       459 |        459 |                   pandas._libs.tslibs.np_datetime
import time:       957 |       1416 |                 pandas._libs.tslibs.nattype
import time:       197 |        197 |                         __future__
import time:      1059 |       1255 |                       six
import time:        47 |         47 |                       six.moves
import time:       294 |        294 |                       dateutil.tz._common
import time:       296 |        296 |                       dateutil.tz._factories
import time:        48 |         48 |                         six.moves.winreg
import time:       323 |        370 |                       dateutil.tz.win
import time:      1192 |       3451 |                     dateutil.tz.tz
import time:       279 |       3730 |                   dateutil.tz
import time:       666 |       4395 |                 pandas._libs.tslibs.timezones
import time:       561 |        561 |                   pandas._libs.tslibs.ccalendar
import time:      1253 |       1814 |                 pandas._libs.tslibs.tzconversion
import time:      1459 |       1459 |                     pandas._libs.tslibs.timedeltas
import time:       154 |        154 |                       backports_abc
import time:      1287 |       1287 |                         locale
import time:      1546 |       1546 |                             pandas._config.config
import time:       518 |        518 |                             pandas._config.dates
import time:       282 |        282 |                             pandas._config.display
import time:       372 |       2717 |                           pandas._config
import time:      1425 |       1425 |                             signal
import time:       158 |        158 |                             msvcrt
import time:       650 |        650 |                             _posixsubprocess
import time:       854 |        854 |                             select
import time:      1409 |       1409 |                             selectors
import time:       909 |       5402 |                           subprocess
import time:       290 |       8408 |                         pandas._config.localization
import time:       126 |        126 |                           backports_abc
import time:       787 |        787 |                           calendar
import time:      2098 |       3010 |                         pandas._libs.tslibs.strptime
import time:      2016 |      14719 |                       pandas._libs.tslibs.fields
import time:      1795 |      16667 |                     pandas._libs.tslibs.timestamps
import time:       194 |        194 |                     backports_abc
import time:       294 |        294 |                     dateutil.easter
import time:       265 |        265 |                       dateutil._common
import time:       431 |        695 |                     dateutil.relativedelta
import time:       570 |        570 |                     pandas._libs.properties
import time:      2984 |      22860 |                   pandas._libs.tslibs.offsets
import time:       169 |        169 |                   backports_abc
import time:        76 |         76 |                         _string
import time:      1493 |       1568 |                       string
import time:      1512 |       1512 |                         _decimal
import time:       270 |       1782 |                       decimal
import time:      1213 |       4562 |                     dateutil.parser._parser
import time:       612 |        612 |                     dateutil.parser.isoparser
import time:       567 |       5741 |                   dateutil.parser
import time:      1332 |      30100 |                 pandas._libs.tslibs.parsing
import time:       994 |      39085 |               pandas._libs.tslibs.conversion
import time:      1272 |       1272 |               pandas._libs.tslibs.period
import time:       832 |        832 |               pandas._libs.tslibs.vectorized
import time:       417 |      42711 |             pandas._libs.tslibs
import time:        38 |      42748 |           pandas._libs.tslibs.nattype
import time:       499 |        499 |           pandas._libs.ops_dispatch
import time:       886 |      44132 |         pandas._libs.missing
import time:      1405 |      45537 |       pandas._libs.hashtable
import time:      1395 |       1395 |       pandas._libs.algos
import time:      1448 |      48379 |     pandas._libs.interval
import time:       232 |      48610 |   pandas._libs
import time:       830 |        830 |     pandas._libs.tslib
import time:      1860 |       2690 |   pandas._libs.lib
import time:       279 |        279 |     pandas.core
import time:      1154 |       1432 |   pandas.core.config_init
import time:       168 |        168 |       pandas.core.dtypes
import time:       406 |        406 |         pandas.errors
import time:       647 |        647 |         pandas.core.dtypes.generic
import time:       658 |       1710 |       pandas.core.dtypes.base
import time:       394 |        394 |       pandas.core.dtypes.inference
import time:      2137 |       4407 |     pandas.core.dtypes.dtypes
import time:       543 |        543 |       pandas.core.dtypes.common
import time:       492 |       1034 |     pandas.core.dtypes.missing
import time:       806 |        806 |           pandas.util._decorators
import time:       171 |        171 |             pandas.core.util
import time:       631 |        631 |             pandas._libs.hashing
import time:       337 |       1139 |           pandas.core.util.hashing
import time:       213 |       2156 |         pandas.util
import time:        30 |       2186 |       pandas.util._decorators
import time:       466 |        466 |         pandas.util._validators
import time:       872 |       1337 |       pandas.core.dtypes.cast
import time:       547 |        547 |         pandas.core.common
import time:       330 |        877 |       pandas.core.construction
import time:       243 |        243 |       pandas.core.indexers
import time:       963 |       5604 |     pandas.core.algorithms
import time:       706 |        706 |         pandas.compat.numpy.function
import time:       699 |        699 |             pandas._libs.ops
import time:       152 |        152 |               pandas.core.ops.roperator
import time:       184 |        335 |             pandas.core.ops.missing
import time:       134 |        134 |             pandas.core.ops.dispatch
import time:       134 |        134 |             pandas.core.ops.invalid
import time:       367 |       1669 |           pandas.core.ops.array_ops
import time:       181 |        181 |           pandas.core.ops.common
import time:       365 |        365 |           pandas.core.ops.docstrings
import time:       217 |        217 |           pandas.core.ops.mask_ops
import time:       182 |        182 |           pandas.core.ops.methods
import time:       414 |       3025 |         pandas.core.ops
import time:       178 |        178 |           pandas.compat._optional
import time:       309 |        487 |         pandas.core.missing
import time:       654 |        654 |         pandas.core.sorting
import time:      1808 |       6678 |       pandas.core.arrays.base
import time:      1340 |       1340 |           pandas.core.nanops
import time:       181 |        181 |           pandas.core.array_algos
import time:       230 |        230 |           pandas.core.array_algos.masked_reductions
import time:       382 |        382 |           pandas.core.arraylike
import time:       680 |       2810 |         pandas.core.arrays.masked
import time:       492 |       3302 |       pandas.core.arrays.boolean
import time:       665 |        665 |           _csv
import time:       423 |       1088 |         csv
import time:       464 |        464 |         pandas.core.accessor
import time:       148 |        148 |           pandas.core.array_algos.transforms
import time:       606 |        753 |         pandas.core.arrays._mixins
import time:      1032 |       1032 |         pandas.core.base
import time:      3105 |       3105 |             pandas.core.strings.accessor
import time:       377 |        377 |             pandas.core.strings.base
import time:       211 |       3692 |           pandas.core.strings
import time:       680 |        680 |           unicodedata
import time:       576 |       4948 |         pandas.core.strings.object_array
import time:       198 |        198 |           pandas.io
import time:       236 |        434 |         pandas.io.formats
import time:       234 |        234 |         pandas.io.formats.console
import time:      1314 |      10264 |       pandas.core.arrays.categorical
import time:       237 |        237 |           pandas.tseries
import time:       530 |        530 |           pandas.tseries.frequencies
import time:      1645 |       2411 |         pandas.core.arrays.datetimelike
import time:       285 |        285 |         pandas.core.arrays._ranges
import time:       200 |        200 |         pandas.tseries.offsets
import time:      1140 |       4035 |       pandas.core.arrays.datetimes
import time:       178 |        178 |           pandas.core.tools
import time:       262 |        440 |         pandas.core.tools.numeric
import time:       195 |        195 |         pandas.core.arrays.numeric
import time:       681 |       1315 |       pandas.core.arrays.floating
import time:       786 |        786 |       pandas.core.arrays.integer
import time:       174 |        174 |           pandas.core.indexes
import time:        99 |         99 |                 org
import time:        24 |        123 |               org.python
import time:        22 |        145 |             org.python.core
import time:       273 |        418 |           copy
import time:      1989 |       1989 |           pandas._libs.index
import time:      1173 |       1173 |           pandas._libs.join
import time:       788 |        788 |                   pandas._libs.sparse
import time:       435 |        435 |                   pandas.core.arrays.sparse.dtype
import time:       623 |        623 |                   pandas.io.formats.printing
import time:       867 |       2711 |                 pandas.core.arrays.sparse.array
import time:       383 |       3094 |               pandas.core.arrays.sparse.accessor
import time:       191 |       3284 |             pandas.core.arrays.sparse
import time:       326 |       3609 |           pandas.core.dtypes.concat
import time:       230 |        230 |           pandas.core.indexes.frozen
import time:      2270 |       9861 |         pandas.core.indexes.base
import time:      1601 |      11461 |       pandas.core.arrays.interval
import time:       683 |        683 |       pandas.core.arrays.numpy_
import time:       766 |        766 |       pandas.core.arrays.period
import time:       433 |        433 |       pandas.core.arrays.string_
import time:       630 |        630 |       pandas.core.arrays.timedeltas
import time:       443 |      40792 |     pandas.core.arrays
import time:       190 |        190 |     pandas.core.flags
import time:       931 |        931 |         pandas._libs.reduction
import time:       728 |        728 |               pandas.core.indexes.extension
import time:      1013 |       1741 |             pandas.core.indexes.category
import time:       724 |        724 |                 pandas.core.indexes.numeric
import time:       191 |        191 |                 pandas.core.tools.timedeltas
import time:      1160 |       2074 |               pandas.core.indexes.datetimelike
import time:       185 |        185 |               pandas.core.tools.times
import time:      1254 |       3512 |             pandas.core.indexes.datetimes
import time:       194 |        194 |               pandas.util._exceptions
import time:      2121 |       2121 |               pandas.core.indexes.multi
import time:       466 |        466 |               pandas.core.indexes.timedeltas
import time:      1749 |       4528 |             pandas.core.indexes.interval
import time:       972 |        972 |             pandas.core.indexes.period
import time:       911 |        911 |             pandas.core.indexes.range
import time:       339 |      11999 |           pandas.core.indexes.api
import time:       713 |      12712 |         pandas.core.aggregation
import time:        98 |         98 |             gc
import time:       499 |        499 |                   _json
import time:       517 |       1015 |                 json.scanner
import time:       531 |       1546 |               json.decoder
import time:       567 |        567 |               json.encoder
import time:       344 |       2456 |             json
import time:       414 |        414 |               pandas._libs.indexing
import time:      1816 |       2230 |             pandas.core.indexing
import time:       135 |        135 |                   backports_abc
import time:       915 |       1050 |                 pandas._libs.internals
import time:       560 |        560 |                 pandas._libs.writers
import time:       424 |        424 |                 pandas.core.array_algos.replace
import time:      2037 |       4069 |               pandas.core.internals.blocks
import time:       521 |        521 |                   pandas.core.internals.ops
import time:       863 |       1384 |                 pandas.core.internals.managers
import time:       606 |       1989 |               pandas.core.internals.concat
import time:       280 |       6338 |             pandas.core.internals
import time:       152 |        152 |             pandas.core.shared_docs
import time:       133 |        133 |                   pandas._libs.window
import time:      2515 |       2648 |                 pandas._libs.window.aggregations
import time:       374 |        374 |                 pandas.core.util.numba_
import time:       205 |        205 |                 pandas.core.window.common
import time:       501 |        501 |                   pandas._libs.window.indexers
import time:       688 |       1189 |                 pandas.core.window.indexers
import time:       217 |        217 |                 pandas.core.window.numba_
import time:       447 |        447 |                   pandas.core.groupby.base
import time:      3263 |       3710 |                 pandas.core.window.rolling
import time:       927 |       9266 |               pandas.core.window.ewm
import time:      1228 |       1228 |               pandas.core.window.expanding
import time:       180 |      10673 |             pandas.core.window
import time:       173 |        173 |                 pandas.core.reshape
import time:       607 |        780 |               pandas.core.reshape.concat
import time:       813 |        813 |                 dataclasses
import time:       407 |        407 |                 gzip
import time:       903 |        903 |                 zipfile
import time:      1525 |       3647 |               pandas.io.common
import time:      2155 |       6581 |             pandas.io.formats.format
import time:      6759 |      35281 |           pandas.core.generic
import time:       571 |        571 |           pandas.core.internals.construction
import time:       133 |        133 |             pandas.core.reshape.util
import time:       371 |        503 |           pandas.core.reshape.melt
import time:       703 |        703 |             pandas._libs.reshape
import time:       713 |        713 |             pandas.core.indexes.accessors
import time:       249 |        249 |               pandas.arrays
import time:       798 |       1046 |             pandas.core.tools.datetimes
import time:      1975 |       1975 |               pandas.plotting._core
import time:       325 |        325 |               pandas.plotting._misc
import time:       222 |       2521 |             pandas.plotting
import time:      4529 |       9512 |           pandas.core.series
import time:       931 |        931 |           pandas.io.formats.info
import time:      7873 |      54668 |         pandas.core.frame
import time:       882 |        882 |           pandas._libs.groupby
import time:       311 |        311 |           pandas.core.groupby.numba_
import time:       201 |        201 |               pandas.core.groupby.categorical
import time:       448 |        649 |             pandas.core.groupby.grouper
import time:       786 |       1434 |           pandas.core.groupby.ops
import time:      2917 |       5543 |         pandas.core.groupby.groupby
import time:      2310 |      76162 |       pandas.core.groupby.generic
import time:       188 |      76350 |     pandas.core.groupby
import time:       366 |     128741 |   pandas.core.api
import time:       202 |        202 |   pandas.tseries.api
import time:       139 |        139 |     pandas.core.computation
import time:       134 |        134 |           pandas.core.computation.common
import time:       218 |        351 |         pandas.core.computation.align
import time:       567 |        567 |             pprint
import time:       270 |        270 |             pandas.compat.chainmap
import time:       288 |       1124 |           pandas.core.computation.scope
import time:       571 |       1694 |         pandas.core.computation.ops
import time:       288 |       2333 |       pandas.core.computation.engines
import time:       250 |        250 |         pandas.core.computation.parsing
import time:      1486 |       1735 |       pandas.core.computation.expr
import time:       211 |       4278 |     pandas.core.computation.eval
import time:       171 |       4586 |   pandas.core.computation.api
import time:      1048 |       1048 |     pandas.core.reshape.merge
import time:       927 |        927 |     pandas.core.reshape.pivot
import time:       380 |        380 |     pandas.core.reshape.reshape
import time:       224 |        224 |     pandas.core.reshape.tile
import time:       236 |       2813 |   pandas.core.reshape.api
import time:       187 |        187 |     pandas.api.extensions
import time:       122 |        122 |     pandas.api.indexers
import time:       232 |        232 |       pandas.core.dtypes.api
import time:       136 |        367 |     pandas.api.types
import time:       199 |        874 |   pandas.api
import time:       235 |        235 |   pandas.util._print_versions
import time:       125 |        125 |     pandas.io.clipboards
import time:        97 |         97 |           backports_abc
import time:       976 |       1072 |         pandas._libs.parsers
import time:       166 |        166 |         pandas.io.excel._util
import time:       148 |        148 |           pandas.io.date_converters
import time:      1928 |       2075 |         pandas.io.parsers
import time:       279 |        279 |         pandas.io.excel._odfreader
import time:      1566 |       1566 |         pandas.io.excel._openpyxl
import time:       215 |        215 |         pandas.io.excel._pyxlsb
import time:       186 |        186 |         pandas.io.excel._xlrd
import time:      1065 |       6622 |       pandas.io.excel._base
import time:       437 |        437 |         pandas._libs.json
import time:       175 |        175 |           pandas.io.formats._color_data
import time:       297 |        297 |           pandas.io.formats.css
import time:      1524 |       1995 |         pandas.io.formats.excel
import time:       315 |       2747 |       pandas.io.excel._odswriter
import time:       308 |        308 |       pandas.io.excel._xlsxwriter
import time:       185 |        185 |       pandas.io.excel._xlwt
import time:       173 |      10033 |     pandas.io.excel
import time:       251 |        251 |     pandas.io.feather_format
import time:       207 |        207 |     pandas.io.gbq
import time:       873 |        873 |     pandas.io.html
import time:       741 |        741 |         pandas.io.json._normalize
import time:       230 |        230 |         pandas.io.json._table_schema
import time:      1251 |       2220 |       pandas.io.json._json
import time:       192 |       2412 |     pandas.io.json
import time:       145 |        145 |     pandas.io.orc
import time:       473 |        473 |     pandas.io.parquet
import time:       240 |        240 |       pandas.compat.pickle_compat
import time:       366 |        606 |     pandas.io.pickle
import time:       607 |        607 |       pandas.core.computation.pytables
import time:      2484 |       3091 |     pandas.io.pytables
import time:       291 |        291 |       pandas.io.sas.sasreader
import time:       188 |        478 |     pandas.io.sas
import time:       171 |        171 |     pandas.io.spss
import time:       768 |        768 |     pandas.io.sql
import time:      2073 |       2073 |     pandas.io.stata
import time:       282 |      21982 |   pandas.io.api
import time:       211 |        211 |   pandas.util._tester
import time:       457 |        457 |       tempfile
import time:       468 |        468 |         cmath
import time:       468 |        936 |       pandas._libs.testing
import time:      1491 |       2882 |     pandas._testing
import time:       145 |       3027 |   pandas.testing
import time:       248 |        248 |   pandas._version
import time:      1004 |     392933 | pandas
import time:       812 |        812 |   pkgutil
import time:       197 |        197 |         xml
import time:       217 |        414 |       xml.parsers
import time:       735 |        735 |       pyexpat
import time:       183 |       1331 |     xml.parsers.expat
import time:      1224 |       2555 |   plistlib
import time:       272 |        272 |     email
import time:       455 |        455 |       email.errors
import time:       266 |        266 |           email.quoprimime
import time:       133 |        133 |           email.base64mime
import time:       164 |        164 |               quopri
import time:       129 |        292 |             email.encoders
import time:      1235 |       1526 |           email.charset
import time:      1026 |       2951 |         email.header
import time:       762 |        762 |             _socket
import time:      1813 |       2575 |           socket
import time:       290 |        290 |           email._parseaddr
import time:     12908 |      15772 |         email.utils
import time:       377 |      19099 |       email._policybase
import time:       791 |      20343 |     email.feedparser
import time:       345 |      20959 |   email.parser
import time:       344 |        344 |   pkg_resources.extern
import time:       132 |        132 |       pkg_resources._vendor
import time:      1122 |       1254 |     pkg_resources._vendor.six
import time:       142 |       1395 |   pkg_resources.extern.six
import time:        43 |         43 |     pkg_resources._vendor.six.moves
import time:        95 |        138 |   pkg_resources.extern.six.moves
import time:       299 |        299 |     pkg_resources._vendor.appdirs
import time:        90 |        388 |   pkg_resources.extern.appdirs
import time:       180 |        180 |       pkg_resources._vendor.packaging.__about__
import time:       209 |        389 |     pkg_resources._vendor.packaging
import time:        80 |        469 |   pkg_resources.extern.packaging
import time:       170 |        170 |     pkg_resources.extern.packaging._structures
import time:       123 |        123 |     pkg_resources.extern.packaging._typing
import time:      2818 |       3111 |   pkg_resources.extern.packaging.version
import time:       152 |        152 |     pkg_resources.extern.packaging._compat
import time:       236 |        236 |     pkg_resources.extern.packaging.utils
import time:      5376 |       5763 |   pkg_resources.extern.packaging.specifiers
import time:       431 |        431 |         traceback
import time:     13278 |      13708 |       pkg_resources._vendor.pyparsing
import time:       102 |      13809 |     pkg_resources.extern.pyparsing
import time:        41 |         41 |       pkg_resources._vendor.six.moves.urllib
import time:        75 |        115 |     pkg_resources.extern.six.moves.urllib
import time:      1302 |       1302 |     pkg_resources.extern.packaging.markers
import time:      9067 |      24292 |   pkg_resources.extern.packaging.requirements
import time:       729 |        729 |   sysconfig
import time:     30516 |      91462 | pkg_resources

@jreback
Copy link
Contributor

jreback commented Jun 15, 2021

ok the delayed import is fine (as understand the total import issue), however we still need to declare this dependency.

@jreback jreback added the Dependencies Required and optional dependencies label Jun 15, 2021
@jreback
Copy link
Contributor

jreback commented Jun 15, 2021

fine. can we also pls add to our build deps.

@jreback jreback merged commit 0561974 into pandas-dev:master Jun 15, 2021
@jreback
Copy link
Contributor

jreback commented Jun 15, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jun 15, 2021

Something went wrong ... Please have a look at my logs.

simonjayhawkins pushed a commit that referenced this pull request Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Required and optional dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants