Skip to content

Conversation

@eteq
Copy link
Member

@eteq eteq commented Feb 7, 2013

this contains a py3.x fix to the utils.misc.find_api_page function, and an option for passing in a timeout. These were partly uncovered by #734, although they won't necessarily be tested here, given that the --remote-data option is not yet in the tests. (It does pass locally for me, though)

Copy link
Member

Choose a reason for hiding this comment

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

Technically, urllib2 doesn't exist in Python 3, so wondering whether you should say 'will be used in Python 2, and the default for ... in Python 3'.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. I'll adjust this to just say something like "the python global default will be used" - the urllib documentation is equally inspecific about this anyway (on any version).

@astrofrog
Copy link
Member

Apart from my comment above, this looks fine to me. Is a 1 second timeout not a little short? Maybe 5 or 10 seconds would make more sense?

@eteq
Copy link
Member Author

eteq commented Feb 7, 2013

5-10 seems pretty long to wait for something that's intended as a quick convinience. But I suppose you're right that 1 might be problematic if you're not on a fast network or broadband or something. How about we split the difference and say 3?

@eteq
Copy link
Member Author

eteq commented Feb 7, 2013

Oh, wait, I'm realizing now you're talking about the tests. I'd still say 3, because the main impetus was that it kept hanging on me when I ran the tests and I had to wait a long time. So by empirical tests of my own personal annoyance threshold, ~5 sec is the limit :)

@astrofrog
Copy link
Member

Ok, 3 is good ;-) Yes, I meant for the tests - it's be a shame to have the tests fail just because the network is slow for Travis. But let's see if it works.

@eteq
Copy link
Member Author

eteq commented Feb 7, 2013

Alright, I'll go ahead and merge this now then. The tests aren't testing this anyway, seeing as how --remote-data is off.

eteq added a commit that referenced this pull request Feb 7, 2013
Fixes to find_api_page function
@eteq eteq merged commit e0fbbad into astropy:master Feb 7, 2013
@embray
Copy link
Member

embray commented Feb 7, 2013

Why do people keep tagging fixes related to this function for 0.2? It's not even in 0.2.

@eteq
Copy link
Member Author

eteq commented Feb 7, 2013

Because we keep forgetting it's not in 0.2 :)

@eteq eteq deleted the find_api_page_fixes branch May 3, 2015 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants