Jack O'Connor added the comment:
Agreed that changing read() would probably break tons of people. I don't think
a naming inconsistency meets the "serious flaws are uncovered" bar for breaking
a provisional package. If we actually prefer the asyncio way of doing things,
a
New submission from Jack O'Connor:
The following little script prints (but ignores) a FileNotFoundError.
import tempfile
def generator():
with tempfile.TemporaryDirectory():
yield
g = generator()
next(g)
Exception ignored in:
Traceback (most recent call last):
File &q
New submission from Jack O'Connor:
The following test script prints a KeyboardInterrupt traceback (expected), but
also an AttributeError traceback (unexpected):
import asyncio
@asyncio.coroutine
def main():
raise KeyboardInterrupt
asyncio.get_event_loop().run_until_complete
Jack O'Connor added the comment:
My example script is definitely a corner case, but where this actually came up
for me was in asyncio. Using a TemporaryDirectory inside a coroutine creates a
similar situation.
--
___
Python tracker
New submission from Jack Diederich :
The core types use doubles, not floats. The file and function names
should reflect that (the docs already do).
--
components: None
messages: 90169
nosy: jackdied
severity: normal
status: open
title: Rename float*.[ch] to double.[ch]
versions: Python
Jack Diederich added the comment:
fixed in r74217
My thanks to everyone who contributed to this bug. "irek" if you let me
know your name I'll add it to Misc/ACKS as well.
PS, The additional testcase is not ideal; it tests the bad behavior by
hooking into the debug output ins
New submission from Jack Diederich :
test/test_telnetlib.py has zero tests for the telnetlib.Telnet.write method.
--
assignee: jackdied
messages: 90963
nosy: jackdied
severity: normal
status: open
title: test_telnetlib doesn't test Telnet.write
versions: Python 2.7, Pytho
Jack Diederich added the comment:
between r71434 and r74217 this should be fixed for 3.2.
Marking as closed.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Jack Diederich added the comment:
this was fixed in r47215 (circa 2006). Marking closed.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/iss
Jack Diederich added the comment:
Marking closed/won't fix. ASCII strings are the byte-ish type in 2.x so
we should expect the caller to convert down from unicode when sending
bytes over the wire.
--
resolution: -> wont fix
status: open -
Jack Diederich added the comment:
Marking as easy. What needs to be done is to add a small fake socket
class that redefines socket.sendall(self, bytes) to capture the args to
sock.sendall so it can be assertEqual'd to the expected bytes.
class SocketSendall(socket.socket):
_raw_sen
Jack Diederich added the comment:
The code that raises the error is in ceval.c which is a critical path.
The raise is done as soon the iterator has one more item than is needed
(see Daniel Diniz's comments on infinite iterators). While the check
could return more useful information for
Jack Diederich added the comment:
The stat module wasn't deprecated in 3.1, so is this now a non-issue?
If not, is it related to issue#1820?
--
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/i
Jack Diederich added the comment:
I was looking at 3.x, JP's patch is relative to 2.x and takes a little
more unpacking (a couple function calls more) but looks to me to be the
same. In 2.x unpack_iterable() sets/returns an error once one item more
than is required is received. It do
Jack Diederich added the comment:
Thanks for the update Irek (and the help!). You are now listed in Misc/ACKS.
--
___
Python tracker
<http://bugs.python.org/issue6
Jack Diederich added the comment:
Thanks Rodrigo, I'll integrate this and check it in.
--
___
Python tracker
<http://bugs.python.org/issue6582>
___
___
Jack Diederich added the comment:
applied in r74638
and I've added you to Misc/ACKS
Thanks again for the patch!
--
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python
Jack Diederich added the comment:
I think this is fixed by r74638 but it never triggered on my box (Ubuntu
9.x) so I can't be sure. What distro are you using?
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs
Jack Diederich added the comment:
Looks good and works for me, please check it in.
--
___
Python tracker
<http://bugs.python.org/issue7207>
___
___
Python-bug
Jack Jansen added the comment:
> Jack, could you please comment on why the LDFLAGS are added to
LDSHARED
> by configure, rather than using LDFLAGS as extra argument to LDSHARED
?
Because this worked, no deep reason. The initial framework builds were a
big hack, because they were n
Jack Diederich added the comment:
Antoine Pitrou: Besides, the test flow in test_telnetlib really is a
mess (setUp and tearDown getting called multiple times, for example),
could you clean it up?
Yes, I'm working on refactoring the test server and separating out
testing that versus testin
Jack Diederich added the comment:
I tried passing a size to readline to see if increasing the chunk helps
(test file was 120meg with 700k lines). For values 1k-10k all took
around 30 seconds, with a value of 100 it took 80 seconds, with a value
of 100k it ran for several minutes before I
Jack Diederich added the comment:
This seems to have been introduced in r72930 when the stackUnderflow()
was moved from the top of the function to the bottom. It used to test
for len > 0.
Question, should cPickle and pickle be raising the same error here?
UnpicklingError is defined
New submission from Jack Howarth :
The libpython3.0.a created for Python 3.0.1 isn't a normal static
library.
file
/System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c
onfig/libpython3.0.a
/System/Library/Frameworks/Python.framework/Versions/3.0/lib/python3.0/c
Jack Diederich added the comment:
+1
Patch and tests work for me. Uploaded a patch that is identical except
the file paths are fixed.
Was the old behavior stable across compilers anyway? It memcmpared two
different structs and IIRC only the first item of each struct is
guaranteed to be at
Jack Diederich added the comment:
Here is a more verbose patch. It checks to see if the first two
arguments stand-alone as well. It also updates NEWS and ACKs and adds
some assertRaises for various bounds checks.
--
nosy: +jackdied
Added file: http://bugs.python.org/file13423
Jack Diederich added the comment:
I assigned this to me. I'll be sprinting on telnetlib.
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.or
Jack Diederich added the comment:
Unfortunately universal newlines are more complicated than replace() can
handle. See io.py, you may be able to use one of those classes to the
the universal new line handling on the cheap (or at least easy).
--
nosy: +jackdied
Jack Diederich added the comment:
sets and frozensets have already been updated to format like lists.
This patch formats defaultdicts like dicts.
--
keywords: +patch
nosy: +jackdied
Added file: http://bugs.python.org/file13425/issue_5131.patch
Jack Diederich added the comment:
+1 for a docbug. The last item is always the physical line and not the
logical line. Some other examples:
if True and \
False: pass
if (True and
False): pass
--
nosy: +jackdied
___
Python tracker
<h
Jack Diederich added the comment:
closing, Garbriel's explanation is sufficient.
--
nosy: +jackdied
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python
Jack Diederich added the comment:
survey of other modules that use O_RDRW
The following include sys/type.h and fcntl.h unconditionally:
bsdmodule.c, dbmmoudle.c, _fileio.c
posixmodule.c includes them after doing an #ifdef check
mmapmodule.c currently (2.7 trunk) includes sys/types.h with an
Jack Diederich added the comment:
py3k is different enough (esp the NEWS) that I'll have to apply it by
hand. This patch was against the 2.x trunk.
--
___
Python tracker
<http://bugs.python.org/i
Jack Jansen added the comment:
Close it. I'll revive my version of bgen whenever I find the time.
--
___
Python tracker
<http://bugs.python.org/iss
Jack Diederich added the comment:
running a fresh 2.7 trunk
>>> a
>>> a.move(-1, -1, -1
... )
Segmentation fault
j...@sprat:~/src/python-rw$ ./python
Python 2.7a0 (trunk:70847M, Mar 31 2009, 14:14:31)
[GCC 4.3.2] on linux2
Type "help", "copyright", "
Jack Diederich added the comment:
Looks good. Attached is a more thorough test_mmap.py patch that would
have found the bugs in both our patches ;)
--
resolution: -> fixed
status: open -> closed
Added file: http://bugs.python.org/file13522/test_mmap_harder
Jack Diederich added the comment:
Fixed rev 70931. Happy pickling!
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Jack Diederich added the comment:
class MyTelnet(Telnet):
def read_until(self, *args)
txt = Telnet.read_until(self, *args)
sys.stdout.write(txt)
return txt
Hope that helps, closing the bug.
--
nosy: +jackdied
resolution: -> wont fix
status: open ->
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1772
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
Jack Diederich added the comment:
assigning all open telnetlib items to myself
--
assignee: -> jackdied
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1
New submission from Jack Diederich :
The first part of my telnetlib work is testing what already is.
Attached is a patch to test_telnetlib that tests mosts of the guarantees
of the telnetlib.Telnet.read_* methods (as guaranteed by the docs, at
least).
Theoretically every test I added has a
Jack Diederich added the comment:
added some tests for testing IAC commands and SB data handling.
--
Added file: http://bugs.python.org/file13624/test_telnetlib.patch
___
Python tracker
<http://bugs.python.org/issue5
Changes by Jack Diederich :
Removed file: http://bugs.python.org/file13617/test_telnetlib.patch
___
Python tracker
<http://bugs.python.org/issue5696>
___
___
Python-bug
Changes by Jack Diederich :
--
components: +Tests
stage: -> patch review
type: -> behavior
versions: +Python 2.7, Python 3.1
___
Python tracker
<http://bugs.python.org/
Jack Diederich added the comment:
This was fixed in r47215
--
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python.org/iss
Jack Diederich added the comment:
committed in r71302
--
resolution: -> accepted
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Jack Diederich added the comment:
RFC 854 says that DM, like all other commands, is only valid when
preceded by an IAC. telnetlib does filter these out appropriately (I
just added tests for it in r71302 and it behaves appropriately).
--
resolution: -> invalid
status: open ->
Jack Diederich added the comment:
Could you try increasing self.blocking_timeout (in the _setUp function)
to something greater than 0.0 (like 0.1) and see if that works? I
picked a constant that was as small as Worked For Me to keep the total
test time as short as possible.
Unfortunately
Jack Diederich added the comment:
committed some changes in r71377. This uses Queue.join() to [hopefully]
eliminate the race condidtions.
--
___
Python tracker
<http://bugs.python.org/issue5
Jack Diederich added the comment:
except when it doesn't! Still failing on some buildbots. The couple
places where it expects 1% wibble in timing is far too strict. I'm
fixing it.
--
___
Python tracker
<http://bugs.python.
New submission from Jack Miller :
I have some code that gets a Pycurses window object, grabs the standard
ncurses WINDOW* out of it and proceeds to use that as usual. Works great
on Linux. Segfaults on FreeBSD/amd64.
static PyObject * mvw(PyObject *self, PyObject *args)
{
PyObject *window
Jack Diederich added the comment:
Try using telnetlib.py from python3.1. It fixes issues in telnet out of
band negotiations.
http://svn.python.org/projects/python/branches/py3k/Lib/telnetlib.py
Here is what I think is happening:
HOST: b'User' + IAC + ECHO + DONT + b'na
Changes by Jack Diederich :
--
type: crash -> behavior
___
Python tracker
<http://bugs.python.org/issue6106>
___
___
Python-bugs-list mailing list
Unsubscri
Changes by Jack Diederich :
--
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue8847>
___
___
Python-bugs-list mailing list
Unsubscribe:
Jack Diederich added the comment:
I can't reproduce on 3k trunk with Ubuntu 10.04, gcc 4.4.3
namedtuples are just a subclass of tuple with only two dunder methods defined
(a plain __new__ with empty __slots__). Can you provoke the same behavior with
plain tuples, or a subclass of tuple
Jack Diederich added the comment:
Two more probes:
1) does it also have the same strange/crashy behavior when you subclass list
and concat that to a tuple?
2) does dropping the optimization level down to -O help? This has "compiler
quirk" written all over it. The C-code for list
Jack Diederich added the comment:
if the id() of the left operand is identical to the id() of the first element
in the result it would strongly support compiler skulldugerry.
class Crasher(tuple): pass
foo = Crasher()
x = [1]
a = x + foo
b=a[0]
if id(b) == id(x):
raise Exception("It&
New submission from Jack Diederich :
ython 2.7b2+ (trunk:81337, May 19 2010, 12:16:22)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class X(object):
... @property
... def foo(self): pass
Jack Diederich added the comment:
I like it, but I think it would help to give it the same interface as
contextlib.contextmanager (the single function, single yield). Like your mock
library 'patch' both function decorators and context managers have an interface
that reads lik
Jack Diederich added the comment:
Hey Frood, I'll take another look at it tomorrow when I am less addled. But
as to context managers that are actual classes - I've not written a single one;
they are always generator functions with a simple try/yield/except/finally in
the body.
Jack Diederich added the comment:
Raymond,
Short version: This isn't theoretical because I use context managers and
function decorators interchangeably and constantly.
Long Version: Function decorators and context managers have very similar use
cases. They both go something like:
1
Jack Diederich added the comment:
Can you check this on 3.1.2 or 3.2? There were a few bugfixes of the bytes
handling in that timeframe.
--
assignee: -> jackdied
nosy: +jackdied
priority: high -> normal
___
Python tracker
<http://bugs.p
Jack Diederich added the comment:
r76133 (which came after this bug) fixed most test_telnetlib bugs by using
mocks instead of trying to setup full-blown client/server TCP cases.
--
___
Python tracker
<http://bugs.python.org/issue6
Jack Diederich added the comment:
Mike, it is better to think of database rows as immutable tuples. During the
course of a query the contents of the database are considered static - hence
all that locking and kvetching about this or that database not having "true"
foreign key su
Jack Diederich added the comment:
This is a change in the codepath for instances that don't have __class__
defined.
subclass = getattr(instance, '__class__', None)
-if subclass in cls._abc_cache:
+if subclass is not None and subclass in cls._abc_cach
Changes by Jack Diederich :
--
nosy: +jackdied
___
Python tracker
<http://bugs.python.org/issue1673007>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Jack Bennett:
virtualenv has
https://virtualenv.pypa.io/en/latest/reference/#envvar-VIRTUAL_ENV_DISABLE_PROMPT
to block activate from trying to overwrite the prompt function.
Users of venv can't do that, 3.6 added prompt but even None defaults to the
current folder
Jack Bennett added the comment:
That works fine here.
Thank you
On 24 January 2017 at 13:15, Vinay Sajip wrote:
>
> Vinay Sajip added the comment:
>
> Other scripts (activate, activate.csh, activate.csh) support this
> environment variable already. This patch updates Activate
Jack McCracken added the comment:
Hey all - I would love to write a patch :) Working on it!
--
nosy: +Jack.McCracken
___
Python tracker
<http://bugs.python.org/issue26
Jack McCracken added the comment:
Here's the patch I made.
--
keywords: +patch
Added file: http://bugs.python.org/file43250/add-many-slash-path-note.patch
___
Python tracker
<http://bugs.python.org/is
Jack McCracken added the comment:
Don't know how useful this will be, but here's a crash report from Mac OS X
10.11 with Klamann's example (Python 3.5).
--
nosy: +Jack.McCracken
Added file: http://bugs.python.org/file43251/coredump_maco
Jack Aidley added the comment:
This is still an issue in the latest version of the documentation.
It states "The returned insertion point i partitions the array a into two
halves so that all(val < x for val in a[lo:i]) for the left side and all(val >=
x for val in a[i:hi]) for the
New submission from Jack O'Connor:
The Windows implementation of Popen calls _make_inheritable(), which creates
inheritable copies of Popen's file descriptors. If two Popen calls happen at
the same time on different threads, these descriptors can leak to both child
processes
Jack O'Connor added the comment:
Definitely a duplicate, thanks for pointing me to the original. Should I mark
it resolved, or let someone from the project do that?
--
___
Python tracker
<http://bugs.python.org/is
New submission from Jack O'Connor:
The following hangs at 100% CPU on Python 3.5, though not on Python 3.4:
1) Start an asyncio coroutine with run_until_complete().
2) Inside the coroutine, enter an ExitStack using a with-statement.
3) Inside the with-statement, call ExitStack.enter_co
Jack O'Connor added the comment:
Thanks for chasing this down. Yury, can you suggest a workaround?
--
___
Python tracker
<http://bugs.python.org/is
Changes by Jack O'Connor :
--
nosy: +oconnor663
___
Python tracker
<http://bugs.python.org/issue25781>
___
___
Python-bugs-list mailing list
Unsubscr
Jack O'Connor added the comment:
Yury, do we need to handle more complicated infinite loops, where "self"
doesn't actually show up in the loop? Here's an example:
try:
raise Exception
except Exception as ex:
loop1 = Exception()
loop2 =
Changes by Jack O'Connor :
--
nosy: +oconnor663
___
Python tracker
<http://bugs.python.org/issue25786>
___
___
Python-bugs-list mailing list
Unsubscr
Jack O'Connor added the comment:
Yury, can you help me understand why `hasattr("foo", "bar")` triggers the
infinite loop there, but not `print("foo")`?
--
___
Python tracker
New submission from Jack Hargreaves:
When creating an abstract class, subclassing tuple causes check for
instantiation of an abstract class to be bypassed. See the associated
stackoverflow question --
http://stackoverflow.com/questions/35267954/mix-in-of-abstract-class-and-namedtuple
Changes by Jack O'Connor :
--
nosy: +oconnor663
___
Python tracker
<http://bugs.python.org/issue24909>
___
___
Python-bugs-list mailing list
Unsubscr
New submission from Jack Zhou:
According to PEP 475, standard library modules should handle EINTR, but this
appears to not be the case for the fcntl module.
Test script:
import fcntl
import signal
import os
def handle_alarm(signum, frame):
print("Received alarm in process {}!&qu
New submission from Jack O'Connor:
Setting stdin=PIPE and then calling communicate(b"") should close the child's
stdin immediately, similar to stdin=DEVNULL. Instead, communicate() treats b""
like None and leaves the child's stdin open, which makes the chil
Jack O'Connor added the comment:
Thanks for the heads up, Berker, I've re-submitted the PR as
https://github.com/python/asyncio/pull/335.
--
___
Python tracker
<http://bugs.python.o
Jack O'Connor added the comment:
Related: The asyncio communicate() method differs from standard subprocess in
how it treats input bytes when stdin is (probably mistakenly) not set to PIPE.
Like this:
proc = await create_subprocess_shell("sleep 5")
await proc.co
New submission from Jack O'Connor:
This toy program:
import asyncio
@asyncio.coroutine
def main():
p = yield from asyncio.create_subprocess_shell('echo hi')
yield from p.wait()
asyncio.get_event_loop().run_until_complete(main())
Produces this output on Arch Linux und
Jack O'Connor added the comment:
`close()` fixes it; thanks for the workaround! When I throw a print statement
inside `remove_signal_handler`, it says that sig is 17 and handler is 0. 17
looks to be SIGCHLD, presumably from the little echo subprocess exiting in this
ex
Jack O'Connor added the comment:
@gvanrossum, the last two lines you suggested don't give any error, as
expected. Not sure why we're getting that error message in the toy example.
@haypo, closing the event loop explicitly works fine for me. But since you
mentioned it, I don
Jack O'Connor added the comment:
Got it, thanks for the heads up.
--
___
Python tracker
<http://bugs.python.org/issue23548>
___
___
Python-bugs-list m
New submission from Jack Liu:
0
down vote
favorite
I have a app loading python35.dll. Use python API PyImport_AddModule to run a
py file. And use PyDict_DelItemString to delete the module. There is a global
vailable in the py file. The global variable is not destroyed when calling
Changes by Jack Liu :
--
components: +Extension Modules -Library (Lib)
title: Python 3.5.1 C API, the global available available is not destroyed when
delete the module -> Python 3.5.1 C API, the global variable is not destroyed
when delete the mod
Jack Liu added the comment:
I have a app loading python35.dll. Use python API PyImport_AddModule to run a
py file. And use PyDict_DelItemString to delete the module. There is a global
vailable in the py file. The global variable is not destroyed when calling
PyDict_DelItemString to delete the
Jack Liu added the comment:
@eric.snow, Thank you for the replay. You understood right.
I run this module as __main__ module, so there is no other modules to reference
this module. And as I debugged, the ref count of this module became 0 after
calling PyDict_DelItemString, but global variable
301 - 400 of 410 matches
Mail list logo