-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add Windows CI #62
Add Windows CI #62
Conversation
Some tests are failing because I'm guessing they were not being executed on Windows yet. I will take a look later to make them pass or skip them if not possible. |
def popen_args(spec): | ||
args = shlex.split(spec.python) if spec.python else [sys.executable] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this was a bug on Windows:
>>> import shlex
>>> shlex.split(r'X:\execnet\.env36\Scripts\python.exe')
['X:execnet.env36Scriptspython.exe']
Which of course is not a valid Python file. My quick and dirty solution at least gives a valid file:
import shlex
>>> shlex.split(r'X:\execnet\.env36\Scripts\python.exe'.replace('\\', '/'))
['X:/execnet/.env36/Scripts/python.exe']
I can reproduce the failure with this simple script: import execnet
from execnet.gateway import rinfo_source
def rinfo_source(channel):
import sys
import os
d = dict(
executable=sys.executable,
version_info=sys.version_info[:5],
platform=sys.platform,
cwd=os.getcwd(),
pid=os.getpid(),
)
channel.send(d)
gw = execnet.makegateway()
channel = gw.remote_exec(rinfo_source)
print(channel.receive()) This fails with:
If I send a simple string ( I used PyCharm's remote debugging and managed to get to this line on the remote: # gateway_base.py
def _send(self, msgcode, channelid=0, data=bytes()):
message = Message(msgcode, channelid, data)
try:
message.to_io(self._io) # << terminates here
self._trace('sent', message)
except (IOError, ValueError):
e = sys.exc_info()[1]
self._trace('failed to send', message, e)
# ValueError might be because the IO is already closed
raise IOError("cannot send (already closed?)") In the line highlighted above, the process simply terminates without any discernible message. Any pointers? |
Played around a little bit more: import sys
import execnet
def rinfo_source(channel):
import sys
import os
d = dict(
executable=sys.executable,
version_info=sys.version_info[:5],
platform=sys.platform,
cwd=os.getcwd(),
pid=os.getpid(),
)
channel.send(d)
gw = execnet.makegateway()
channel = gw.remote_exec(rinfo_source)
print 'local executable:', repr(sys.executable)
print 'local version_info:', repr(sys.version_info)
print 'remote receive:', channel.receive()
Commenting out both import sys
import execnet
def rinfo_source(channel):
import sys
import os
d = dict(
#executable=sys.executable,
#version_info=sys.version_info[:5],
platform=sys.platform,
cwd=os.getcwd(),
pid=os.getpid(),
)
channel.send(d)
gw = execnet.makegateway()
channel = gw.remote_exec(rinfo_source)
print 'local executable:', repr(sys.executable)
print 'local version_info:', repr(sys.version_info)
print 'remote receive:', channel.receive()
Leaving either of them on the dict gives the same error. Strangely, renaming the import sys
import execnet
def rinfo_source(channel):
import sys
import os
d = dict(
_executable=sys.executable,
#version_info=sys.version_info[:5],
platform=sys.platform,
cwd=os.getcwd(),
pid=os.getpid(),
)
channel.send(d)
gw = execnet.makegateway()
channel = gw.remote_exec(rinfo_source)
print 'local executable:', repr(sys.executable)
print 'local version_info:', repr(sys.version_info)
print 'remote receive:', channel.receive() Works:
Perhaps there's some bug on the marshaler which fails on PyPy with the name I tried the same trick of changing the name for import sys
import execnet
def rinfo_source(channel):
import sys
import os
d = dict(
#executable=sys.executable,
_version_info=tuple(sys.version_info[:5]),
platform=sys.platform,
cwd=os.getcwd(),
pid=os.getpid(),
)
channel.send(d)
gw = execnet.makegateway()
channel = gw.remote_exec(rinfo_source)
print 'local executable:', repr(sys.executable)
print 'local version_info:', repr(sys.version_info)
print 'remote receive:', channel.receive() But in this case I still get the same error. |
for linting i wan to use a different service, imho its just bullshit to make it part of testing and run it on all platforms |
also execnet is in a shit place wrt linting, dont even try making it a ci req right now is just wasting time |
No problem, I tried to reproduce the environments I saw defined in btw, Travis and tox are inconsistent to each other. Should we getting them in sync? I would like to support the same versions we guarantee pytest-xdist to run, what do you think? |
What about pypy? I won't have too much time to look deep into it, so I suppose we can create an issue for it and mark the affected tests as |
@nicoddemus yes, we can do that bit and add pypy |
3.14j would generate `'(1.78+3.1400000000000001j)'` on py26
Yay finally 😅 |
Lol nice one art complex |
Fix #59
Also:
rst
so GH renders it properly;