Anders Lorentsen added the comment:
As a person without much experience, it sounded like a simple enough task, but
having dug a bit, I found it quite complicated. It seems to me that the
interpreter loop (in the standard REPL, that you get when you start ./python,
blocks for input somewhere
Anders Lorentsen added the comment:
I have actually managed to lost my local branch of this fix, though I assume I
can just start another one, manually copy over the changes, somehow mark this
current PR as cancelled, aborted, or in my option the best:
"replaced/superseeded by: [n
Anders Lorentsen added the comment:
As far as I can recall, the patch is generally speaking good to go. A number of
discussions arose on various details, however. In any event, I'll take a look
at it during the next few days.
--
___
P
Anders Lorentsen added the comment:
What do you mean "is a bug", and "the PR would encourage this"? Can't it be
fixed?
Are you saying that just because it is a bug now, we should be discouraged from
making it work in the way you'd expect it to work?
If `exe`
Anders Lorentsen added the comment:
> # runs this weird file
> subprocess.run([bin])
> # Currently an error; if this is implemented, would run
> # /bin/ls, and pass it the -l argument. Refers to something
> # completely different than our .exists() call above.
I do not underst
Anders Lorentsen added the comment:
Wait a minute. The failing test is test_nonexisting_with_pipes, and it fails
because args[0] is a tuple - how can that be? Nobody is supposed to pass
cmd=sequence-where-first-element-is-a-tuple!
Is everything all right with the test itself
Anders Lorentsen added the comment:
Also, isn't there continuous integration testing? Everything passed on the PR,
so where does this come from?
--
___
Python tracker
<https://bugs.python.org/is
Anders Lorentsen added the comment:
This is strange, because _execute_child calls os.fsdecode with `args` as the
argument, which may be a list. os.fsdecode calls fspath. Now, the python
docstring of _fspath, as defined in Lib/os.py on line 1031, clearly states that
it will raise a TypeError
Anders Lorentsen added the comment:
Writing my tests, I originally looked at Lib/test/seq_tests.py. One test case
uses indexes that are (+-)4*sys.maxsize. This does not fit in Py_ssize_t, and
so these tests cause my array implementation to raise an overflow exception.
A solution is of course
Anders Lorentsen added the comment:
I decided to work on this, and I would like some review, as this would be my
second contribution to cpython. Also, a general question:
As I defined the start and end arguments Py_ssize_t, bigger indexes (more
negative or more positive) than what can fit in
Anders Lorentsen added the comment:
While researching this, I discovered that on MS Windows
>>> subprocess.run([pathlike_object, additional_arguments])
did not run like it did on Posix. My PR includes this problem and it's fix.
--
Anders Lorentsen added the comment:
I was able to make a test that reproduces your code, and expectedly fails. Also
implemented a fix for it. See a temporary diff here:
https://pastebin.com/C9JWkg0i
However, there is also a specific MS Windows version of _execute_child() (a
phrase only
Anders Lorentsen added the comment:
Had my first go at a python patch. Added a test case for it, and all tests
passing when I test with
`./python -bb -E -Wd -m test -v test.test_sqlite -r -w -uall -R 3:2`
--
nosy: +Phaqui
___
Python tracker
<ht
Anders Lorentsen added the comment:
I updated my patch to account for that second corner case. But ideally,
shouldn't it rather be accounted for in the function that does the actual
conversion, that is, in _PyLong_AsByteArray?
--
Added file:
http://bugs.python.org/file
Anders Lorentsen added the comment:
So, am I to understand that the only corner case we should fix is that
>>> (-1).to_bytes(0, 'big', signed=True)
should raise an overflow error (currently it returns b'') ?
--
Added file:
htt
Anders Lorentsen added the comment:
Isn't it possible to just add a small line of code that checks if length is
less than or equal to 0, and if it is, call the necessary c functions to have
python raise a valueerror...? Sorry if this is giving a solution without
actually submitting the
Changes by Anders Lorentsen :
--
nosy: +Phaqui
___
Python tracker
<http://bugs.python.org/issue27623>
___
___
Python-bugs-list mailing list
Unsubscribe:
17 matches
Mail list logo