Skip to content

Add requests to astropy/extern #1035

Description

@cdeil

requests would make web-related code in astropy easier to write / read / maintain. The question of whether to include it in astropy/extern came up in pull request #972 by @lpaioro and @mdboom was for including it:

I think it would simplify a number of things throughout astropy -- particularly in the forthcoming VO query stuff.

For astroquery we already decided to include it in extern here (which wouldn't be necessary any more if it were in astropy).

Here's some basic info:

  • pure-Python, simultaneous Python 2 / 3 codebase
  • it's quite a lot of files and 300 kB (because requests bundles urllib3 and charade.
  • grep import *.py */*.py */*/*.py | grep url shows that web-related code is used at the moment in the following modules: coordinates/name_resolve.py, utils/data.py, utils/misc.py, io/fits/file.py, io/votable/tree.py, utils/xml/check.py ... and soon vo/samp.

So should we include it?
Or would it be better / acceptable as an extra external dependency in addition to numpy (used only where needed like e.g. with scipy)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions