| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
They still run as standalone scripts, but when used as part of the
regression test suite, they are effectively no-ops.
(This is done by renaming test_main to main.)
|
|
|
|
| |
DNS, and we can't assume that.
|
|
|
|
|
|
|
|
|
|
|
| |
that retries the connect() call in timeout mode so it can be shared
between connect() and connect_ex(), and needs only a single #ifdef.
The test for this was doing funky stuff I don't approve of,
so I removed it in favor of a simpler test. This allowed me
to implement a simpler, "purer" form of the timeout retry code.
Hopefully that's enough (if you want to be fancy, use non-blocking
mode and decode the errors yourself, like before).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- setblocking(0) and settimeout(0) are now equivalent, and ditto for
setblocking(1) and settimeout(None).
- Don't raise an exception from internal_select(); let the final call
report the error (this means you will get an EAGAIN error instead of
an ETIMEDOUT error -- I don't care).
- Move the select to inside the Py_{BEGIN,END}_ALLOW_THREADS brackets,
so other theads can run (this was a bug in the original code).
- Redid the retry logic in connect() and connect_ex() to avoid masking
errors. This probably doesn't work for Windows yet; I'll fix that
next. It may also fail on other platforms, depending on what
retrying a connect does; I need help with this.
- Get rid of the retry logic in accept(). I don't think it was needed
at all. But I may be wrong.
|
|
|
|
| |
Add a sleep (yuck!) to _testRecvFrom() so the server can set up first.
|
|
|
|
| |
using "".join(). Fold a long line.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
nonzero value is OK. Also fixed the error message for this and for
testGetSockOpt().
|
|
|
|
| |
information on what went wrong.
|
|
|
|
| |
Changed test_timeout.py to conform to the guidelines in Lib/test/README.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've made considerable changes to Michael's code, specifically to use
the select() system call directly and to store the timeout as a C
double instead of a Python object; internally, -1.0 (or anything
negative) represents the None from the API.
I'm not 100% sure that all corner cases are covered correctly, so
please keep an eye on this. Next I'm going to try it Windows before
Tim complains.
No way is this a bugfix candidate. :-)
|
|
|
|
| |
This closes patch "[ #490414 ] Jython and test_socket".
|
|
|
|
|
| |
socket.gaierror. :( This allows test_socket to pass on a RH6.1-ish
Linux system.
|
| |
|
| |
|
|
|
|
|
|
| |
attribute. Jython does not have this function.
Closes SF patch #403667.
|
| |
|
|
|
|
| |
'verify' iff it's used by a test module...
|
|
|
|
|
|
|
| |
and replaces them with a new API verify(). As a result the regression
suite will also perform its tests in optimization mode.
Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
|
|
|
|
|
| |
Use != instead of <> since <> is documented as "obsolescent".
Use "is" and "is not" when comparing with None or type objects.
|
| |
|
|
|
|
|
|
| |
argument: a (host, port) tuple.
Like multi-arg append(), multi-arg connect() and bind() may be ruled out!
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
any more? This was because the *parent* process in test_socket.py did
an os._exit(0)! Getting rid of that now...
|
|
|
|
| |
continue the tests.
|
|
|
|
|
|
|
| |
Don't assume gethostbyaddr()'s primary hostname is the same as
gethostname(), or even that gethostname() can be found in the list of
hosts returned by gethostbyaddr(). We do test for at least one FQDN
in gethostbyaddr().
|
|
|
|
| |
after test_socket.py is run!
|
|
not currently tested (or even touched):
# socket.fromfd()
# sktobj.getsockopt()
# sktobj.recvfrom()
# sktobj.sendto()
# sktobj.setblocking()
# sktobj.setsockopt()
# sktobj.shutdown()
|