Coder Social home page Coder Social logo

Comments (3)

anki-code avatar anki-code commented on June 16, 2024

@gforsyth @jnoortheen This is regress. I traced this and this issue was made in 0.13.0:

Let's investigate what is wrong because I think this could follow to solving bunch of other issues (around PTK, etc).

from xonsh.

anki-code avatar anki-code commented on June 16, 2024

I found that the issue appears if we switch off the amalgamation.

docker run --rm -it xonsh/xonsh:slim bash
apt update && apt install -y git
# v0.12.6
pip install --force-reinstall git+https://github.com/xonsh/xonsh@cbf23e60fba9c6479d23cff03884572a776e6f1d
xonsh
# working

XONSH_NO_AMALGAMATE=1 xonsh
# not working  # amalgamation was the glue :)

from xonsh.

anki-code avatar anki-code commented on June 16, 2024

Trying to catch the difference:

# Amalgamate
XONSH_NO_AMALGAMATE= xonsh --no-rc 

import sys
@aliases.register('tst')
def _test(args, i, o, e):
    print('func', i, o, e)
    print('sys', sys.stdout, sys.stderr)
    __import__('time').sleep(1)
tst
tst
tst
tst
# func None <_io.TextIOWrapper name=7 encoding='utf-8'> <_io.TextIOWrapper name=9 encoding='utf-8'>
# sys <xonsh.procs.__amalgam__.FileThreadDispatcher object at 0x101815d60> <xonsh.procs.__amalgam__.FileThreadDispatcher object at 0x101815dc0>
# No Amalgamate
XONSH_NO_AMALGAMATE=1 xonsh --no-rc 

import sys
@aliases.register('tst')
def _test(args, i, o, e):
    print('func', i, o, e)
    print('sys', sys.stdout, sys.stderr)
    __import__('time').sleep(1)

# first run
tst
# func None <_io.TextIOWrapper name=7 encoding='utf-8'> <_io.TextIOWrapper name=9 encoding='utf-8'>
# sys <xonsh.procs.proxies.FileThreadDispatcher object at 0x1051c4680> <xonsh.procs.proxies.FileThreadDispatcher object at 0x1051c46e0>

# second run
tst
# func None <_io.TextIOWrapper name=7 encoding='utf-8'> <_io.TextIOWrapper name=9 encoding='utf-8'>
# IO ERROR

Only one difference: xonsh.procs.proxies.FileThreadDispatcher vs xonsh.procs.__amalgam__.FileThreadDispatcher.

UPD: I traced it further and amalgamation of xonsh.procs.proxies is the key.

from xonsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.