TST: win32 paths cannot be turned into URLs by prefixing them with "file://" by mindw · Pull Request #4580 · pandas-dev/pandas (original) (raw)

On your six comment:

There were a number of items that we needed to tweak from six. For example, iteritems and items return totally different things, so the compat.iteritems needed to try calling iteritems first and, if that's not available, call items. (Additionally, the way that six does it means that it produces an intermediary list in Python 2), similar rationale for itervalues and iterkeys. Plus, we added functions that produced lists instead of iterators (lrange, lmap, lfilter), because some pandas/numpy functions are sensitive to getting iterators instead of lists and needed to account for that. Finally, we needed to add moves for long and int and I preferred to flatten the namespace (i.e., StringIO is under six, whereas cStringIO is under six.moves) and have everything imported from the same place. Plus, it's a net positive to have fewer dependencies.

That said, as noted in the release notes, and the LICENSE directory (and I think in compat/__init__.py too), we did move over quite a bit of the concepts or code from the six module, which is why there is a SIX license included with pandas.

I really like the six module and I think the author used a very elegant model for turning a single file package into a module with multiple (and dynamic) namespaces, but I like the explicitness and clarity of having those imports localized into a single location within pandas.

I didn't even realize that the url imports weren't a part of six - at the time I had looked them up myself and added some of them to io/common.py.