[issue19748] test_time failures on AIX

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I'm no more interested to work on this issue, I prefer to close it.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19748
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23697] Module level map submit for concurrent.futures

2015-03-18 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +bquinlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23697
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2211] Cookie.Morsel interface needs update

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

 New changeset 88e1151e8e02 by Serhiy Storchaka in branch 'default':
 Issue #2211: Updated the implementation of the http.cookies.Morsel class.
 https://hg.python.org/cpython/rev/88e1151e8e02

I don't understand why, but test_pickle started to fail with this change.

See 3.x buildbots for errors. Example:
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5858/steps/test/logs/stdio

--
nosy: +haypo
resolution: fixed - 
status: closed - open

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2211
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23694] PEP 475: handle EINTR in fileutils.c

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ed25e945cdc2 by Victor Stinner in branch 'default':
Issue #23694: Handle EINTR in _Py_open() and _Py_fopen_obj()
https://hg.python.org/cpython/rev/ed25e945cdc2

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23694
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17628] str==str: compare the first character before calling memcmp()

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

The benefit of any change is unclear. I'm not more interested to work on such 
optimization, so I just close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17628
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14073] allow per-thread atexit()

2015-03-18 Thread Vadim Markovtsev

Vadim Markovtsev added the comment:

I agree that there must be some way to join the threads before exiting, with a 
callback or anything else. Currently, my thread pool implementation has to 
monkey patch sys.exit and register SIGINT handler to shutdown itself and avoid 
the hangup (100+ LoC to cover all possible exceptions). I am working on a big 
framework and demanding from users to call thread pool shutdown function 
before exit would be yet another thing they must remember and just impossible 
in some cases. It would ruin the whole abstraction. Python is not C, you know.

--
nosy: +Vadim Markovtsev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14073
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23207] logging.basicConfig does not validate keyword arguments

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d3b420807a86 by Vinay Sajip in branch '3.4':
Issue #23207: Improved kwarg validation.
https://hg.python.org/cpython/rev/d3b420807a86

New changeset 7ff0d7b50b36 by Vinay Sajip in branch 'default':
Issue #23207: merged fix from 3.4.
https://hg.python.org/cpython/rev/7ff0d7b50b36

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23207
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2211] Cookie.Morsel interface needs update

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 88e1151e8e02 by Serhiy Storchaka in branch 'default':
Issue #2211: Updated the implementation of the http.cookies.Morsel class.
https://hg.python.org/cpython/rev/88e1151e8e02

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2211
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23689] Memory leak in Modules/sre_lib.h

2015-03-18 Thread Evgeny Kapun

Evgeny Kapun added the comment:

This patch doesn't fix the issue. The problem is that the list starting with 
state-repeat doesn't necessarily contains all repeat contexts that are 
allocated. Indeed, here [1] and here [2] repeat contexts are temporarily 
removed from the list. If the match procedure terminates abruptly, they are not 
added back.

[1] https://hg.python.org/cpython/file/c89f7c34e356/Modules/sre_lib.h#l963
[2] https://hg.python.org/cpython/file/c89f7c34e356/Modules/sre_lib.h#l1002

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23689
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23333] asyncio: add a new Protocol.connection_failed() method

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

The consensus looks to be to reject this feature, so I close the issue. I 
already commits a compromise: log an error in debug mode.

--
resolution:  - rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23500] Argument Clinic: multiple macro definition

2015-03-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This looks as generalization of my patch. It produces the same output. I left 
comments on Rietveld, but in any case the patch LGTM.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23500
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23500] Argument Clinic: multiple macro definition

2015-03-18 Thread Larry Hastings

Larry Hastings added the comment:

What do you think of this approach?  Now a Destination object behaves like an 
array of text accumulators.  If you ask for one that doesn't exist it's created 
for you.  When the Destination is dumped, the output from each accumulator is 
joined together, like buffer[0] + buffer[1] + buffer[2].  (You can even specify 
negative indices, if you want text that goes *before* the default text 
accumulator.)

With this approach, all the #ifndef stanzas are at the end of the emitted text.

--
Added file: 
http://bugs.python.org/file38538/larry.ac_multiple_macro_definitions.diff.3.txt

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23500
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23648] PEP 475 meta issue

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I found a way to get a list of functions which can fail with EINTR: search for 
TEMP_FAILURE_RETRY in the source code of the glibc. TEMP_FAILURE_RETRY:
https://www.gnu.org/software/libc/manual/html_node/Interrupted-Primitives.html#Interrupted-Primitives

Following functions are called with TEMP_FAILURE_RETRY (in glibc code, doc and 
examples):

- accept, send, sendfile, sendmsg, accept4, connect, sendto, recvmsg
- write, writev, read, readv, pwrite
- fdatasync, fsync
- waitpid
- select, poll
- mq_send, mq_timedsend, mq_receive, mq_timedreceive
- clock_nanosleep, timer_settime, nanosleep
- posix_fallocate
- sem_wait, sem_timedwait, sem_trywait
- aio_suspend
- fcntl(F_SETLK)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23648
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23648] PEP 475 meta issue

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

stat manual page of SCO documentation says that stat() can fail with EINTR, but 
I don't see this error in latest Linux manual page. I tested manually, and I 
failed to see stat() failing with InterruptedError.
http://uw714doc.sco.com/en/man/html.2/stat.2.html

So only a few system calls on the filesystem (open, read, write, close, fsync, 
...) can fail with EINTR?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23648
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23353] generator bug with exception: tstate-exc_value is not cleared after an except block

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

@Antoine: exctests.patch looks good to me, can you commit it?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23353
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17515] Add sys.setasthook() to allow to use a custom AST optimizer

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I'm not more interested to work on my astoptimizer project, and nobody looks to 
need sys.setasthook(), so I prefer to close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17515
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2211] Cookie.Morsel interface needs update

2015-03-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Renamed __copy__ to copy, because copy.copy() doesn't need these changes and 
original report was about the copy() method.

Thank you for your contribution and for your responsiveness Demian.

--
resolution:  - fixed
stage: commit review - resolved
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2211
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23441] rlcompleter: tab on empty prefix = insert spaces

2015-03-18 Thread Martin Sekera

Martin Sekera added the comment:

But tab characters are rendered by the terminal into spaces. During stdout 
processing, when the term encounters a \t (0x09), it inserts (into the term 
buffer that is displayed to the user) as many spaces (0x20) as needed to move 
the cursor to the nearest tab-stop (setterm --tabs will display them for you). 
Why do we need to duplicate this inside Python?

There are no copypaste issues either, try it yourself: when you copy and paste 
tab-indented text from the terminal, your text will contain spaces instead of 
tabs (at whatever width you have your terminal tab stops configured for).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23441
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2211] Cookie.Morsel interface needs update

2015-03-18 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Victor.

This patch should fix pickling/unpickling.

Interesting, we should check all other cases when instance attribute was 
converted to a property. They are potentially break pickle compatibility.

--
Added file: http://bugs.python.org/file38540/http_cookies_morsel_pickle.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2211
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22861] [2.7] ssl._dnsname_match() and unicode

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I'm not convinced myself that it's a real issue, and I worked around it in 
Trollius, so I close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22861
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23694] PEP 475: handle EINTR in fileutils.c

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

Charles-François Natali added the comment:
 Note that dup() cannot fail with EINTR, it is non-blocking: dup2() can
 fail, because f the target FD is open, it has to close it, but not
 dup().

Oh right, I misread the manual page. I will leave _Py_dup() unchanged.
Thanks for the review.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23694
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23694] PEP 475: handle EINTR in fileutils.c

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

All functions which can fail with EINTR now retries the function on EINTR. I 
close the issue.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23694
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23605] Use the new os.scandir() function in os.walk()

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I commited fast_bottom-up.patch to fix the regression of os.walk().

 Could you please add a test based on my example (i.e. converting symlinks to 
 a directory during walking) and may be other (creating new directory and 
 adding it to the dirs list)?

Sorry, I'm not interested to write new tests.

 Is it worth to mention in the os.walk() doc that topdown=False can be faster?

I didn't touch the doc yet.

I keep the issue open a few weeks to see if someone is interested to optimize 
os.walk() further, write new tests, enhance the doc, etc.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23605
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23456] asyncio: add missing @coroutine decorators

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6f7ed6e95ea8 by Victor Stinner in branch '3.4':
Issue #23456: Add missing @coroutine decorators in asyncio
https://hg.python.org/cpython/rev/6f7ed6e95ea8

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23456
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23456] asyncio: add missing @coroutine decorators

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23456
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23303] test_license_exists_at_url() of test_site fails on x86 XP-4 3.4 buildbot

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

Builder x86 XP-4 3.4 is green again. I close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23303
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21735] test_threading.test_main_thread_after_fork_from_nonmain_thread() hangs on the FreeBSD 10 buildbot

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this error recently, so I just close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21735
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2636] Adding a new regex module (compatible with re)

2015-03-18 Thread Evgeny Kapun

Changes by Evgeny Kapun abacabadabac...@gmail.com:


--
nosy: +abacabadabacaba

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2636
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

builtin_modules.patch looks complex. It can be simplified by using the 
Py_BUILD_CORE define.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23685
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18507] import_init() should not use Py_FatalError() but return an error

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

This issue was more a reminder for myself (TODO list). I'm no more interested 
to work on the issue, so I just close it.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18507
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19233] test_io.test_interrupted_write_retry_text() hangs on Solaris 10 and FreeBSD 7.2

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19233
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue14555] clock_gettime/settime/getres: Add more clock identifiers

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I'm no more really interested to add these identifiers. So I just close the 
issue.

--
nosy: +haypo
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14555
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15599] test_threaded_import fails sporadically on Windows and FreeBSD

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

No real activity on this issue. Since the issue is sporadic and I'm not 
interested to work on it, I just close the issue as out of date.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15599
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23648] PEP 475 meta issue

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

test_eintr.py: program to check if a Python function can fail with 
InterruptedError. Modify func() to test a function. (The program checks 
select.select(), currently it fails with InterruptedError.)

--
Added file: http://bugs.python.org/file38539/test_eintr.py

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23648
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23698] Fix documentation for multiprocessing.Manager

2015-03-18 Thread Ned Deily

Changes by Ned Deily n...@acm.org:


--
nosy: +davin, sbt
versions:  -Python 3.2, Python 3.3, Python 3.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23698
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23441] rlcompleter: tab on empty prefix = insert spaces

2015-03-18 Thread Martin Panter

Martin Panter added the comment:

I think it would really depend on the particular terminal. Sakura (a Unix 
terminal using the VTE library, like Gnome Terminal) copied the tab literally:

$ printf 'tab\ttab|sp   sp\n'
tab tab|sp   sp  == COPIED
$ hexdump -C
tab tab|sp   sp  == PASTED
  74 61 62 09 74 61 62 7c  73 70 20 20 20 73 70 0a  |tab.tab|sp   sp.|
0010

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23441
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20600] test_create_server_ssl_verify_failed() failure on PPC64 AIX 3.x buildbot

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

Since nobody looks to care of AIX, I just close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20600
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12500] Skip test_ssl.test_connect_ex() on connection error

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

 @Victor would you like to follow up with your patch?

No. So I just close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12500
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12304] expose signalfd(2) in the signal module

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

signalfd is very useful for event-driven frameworks like Twisted or asyncio. 
asyncio doesn't use it, and I didn't see any request to support it yet. asyncio 
uses signal.set_wakeup_fd() which looks to be enough, and it is now available 
on all platforms (including Windows).

I'm not interested to write the structure to unpack the 128 bytes structure of 
signalfd, nor to update my patch. I just close the issue.

Reopen the issue or open a new one if you are interested by signalfd.

Anyway, there is already a third-party Python module providing signalfd() for 
Python 2 and Python 3:
https://pypi.python.org/pypi/python-signalfd

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12304
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write?

2015-03-18 Thread Wolfgang Maier

Wolfgang Maier added the comment:

Thanks everyone for the lively discussion ! 

I like Serhiy's idea of making write work with arbitrary objects supporting the 
buffer protocol. In fact, I noticed before that GzipFile.write misbehaves with 
array.array input. It pretends to accept that, but it'll use len(data) for 
calculating the zip file metadata so reading from the file will later fail. I 
was assuming then that fixing that would be too complicated for a rather exotic 
usecase, but now that I see how simple it really is I think it should be done.

As for the concrete implementation, I guess an isinstance(data, bytes) check to 
speed up treatment of the most common input is a good idea, but I am not 
convinced that bytearray deserves the same attention.

Regarding memoryview.cast('B') vs memoryview.nbytes, I see Serhiy's point of 
keeping the patch size smaller. Personally though, I find use of nbytes much 
more self-explanatory than cast('B') the purpose of which was not immediately 
obvious to me. So I would opt for better readability of the final code rather 
than optimizing patch size, but I would be ok with either solution since it is 
not about the essence of the patch anyway.

Finally, the bug I report in issue21560 would be fixed as a side-effect of this 
patch here (because trying to get a memoryview from str would throw an early 
TypeError). Still, I think it would be a good idea to try to write to the 
wrapped fileobj *before* updating self.size and self.crc to be protected from 
unforeseen errors. So maybe we could include that change in the patch here ?

With all that the final code section could look like this:

if isinstance(data, bytes):
length = len(data)
else:
data = memoryview(data)
length = data.nbytes

if length  0:
self.fileobj.write( self.compress.compress(data) )
self.size = self.size + length
self.crc = zlib.crc32(data, self.crc)  0x
self.offset += length

return length

One remaining detail then would be whether one would want to catch the 
TypeError possibly raised by the memoryview constructor to turn it into 
something less confusing (after all many users will not know what a memoryview 
has to do with all this). The above code would throw (with str input for 
example):

Traceback (most recent call last):
  File stdin, line 2, in module
  File /home/wolma/gzip-bug/Lib/gzip.py, line 340, in write
data = memoryview(data)
TypeError: memoryview: a bytes-like object is required, not 'str'

Maybe, this could be turned into:

TypeError: must be bytes / bytes-like object, not 'str'  ?

to be consistent with the corresponding error in 'wt' mode ?

Let me know which of the above options you favour and I'll provide a new patch.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23688
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23605] Use the new os.scandir() function in os.walk()

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 4fb829f8c04d by Victor Stinner in branch 'default':
Issue #23605: Fix os.walk(topdown=True), don't cache entry.is_symlink() because
https://hg.python.org/cpython/rev/4fb829f8c04d

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23605
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22984] test_json.test_endless_recursion(): Fatal Python error: Cannot recover from stack overflow. on x86 XP-4 3.x buildbot

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

The buildbot is broken, it cannot compile anymore. So I just close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22984
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22971] test_pickle: Fatal Python error: Cannot recover from stack overflow. on FreeBSD buildbot

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this failure recently, so I just close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22971
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15612] Rewrite StringIO to use the _PyUnicodeWriter API

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I'm no more interested to work on this issue, and it's not clear that 
_PyUnicodeWriter is always faster. Switch from a list to _PyUnicodeWriter on a 
specific event would make the code much more complex. I prefer to just close 
the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15612
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19654] test_tkinter sporadic skipped on x86 Tiger 3.x buildbot

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19654
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21734] compilation of the _ctypes module fails on OpenIndiana: ffi_prep_closure_loc symbol is missing

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

This issue has been fixed.

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21734
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1fc32bf069ff by Victor Stinner in branch 'default':
Issue #22181: On Linux, os.urandom() now uses the new getrandom() syscall if
https://hg.python.org/cpython/rev/1fc32bf069ff

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22181
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23624] str.center inconsistent with format ^

2015-03-18 Thread Eric V. Smith

Eric V. Smith added the comment:

I agree with David: It's unfortunate, but too late to change.

FWIW, since the goal is to replace just str.center, I'd write this as:

def my_center(s, width):
return format(s, '^' + str(width))

As soon as you're mixing in other formatting, then str.center couldn't have 
been used, anyway, so no sense bringing all of str.format to bear on the 
problem.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23624
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

See also the issue #19569: Use __attribute__((deprecated)) to warn usage of 
deprecated functions and macros.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11410
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19816] test.regrtest: use tracemalloc to detect memory leaks?

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I'm no more interested to work on this issue. regrtest.patch is unstable, and I 
don't know how to make it more reliable. Antoine's allocation counter is enough 
right now.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19816
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23698] Fix documentation for multiprocessing.Manager

2015-03-18 Thread Davin Potts

Davin Potts added the comment:

This is closely related to issue23510.  The two issues are reacting to the same 
underlying inconsistency though in this issue the problem is more generally 
(and clearly) stated whereas issue23510 is more concerned with the consequences 
to using these as Context Managers.

The solution that gets implemented here should address both issues.

As mentioned in issue23510, I have a working fix though am looking for ways to 
further minimize the impact to existing code that uses Manager/SyncManager -- 
simply documenting the current inconsistent state is inadequate.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23698
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23624] str.center inconsistent with format ^

2015-03-18 Thread R. David Murray

R. David Murray added the comment:

I would write it:

   {:^{width}}.format(title, width=width)

By the way, in case it isn't clear, we acknowledge that in a perfect world 
center would work right, but our judgment is that the pain of fixing it 
outweighs the benefit.  Our collective consensus on that could be shifted, but 
someone would have to be willing to argue it convincingly to the community (ie: 
not on the bug tracker).

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23624
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21788] Rework Python finalization

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

This issue was more a reminder for myself (TODO). I'm no more interesting to 
work on it, so I close it.

The Python finalization is very fragile. I prefer to not touch it again :-p

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21788
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23687] Stacktrace identifies wrong line in multiline list comprehension

2015-03-18 Thread R. David Murray

R. David Murray added the comment:

This is a specific case of the more general problem discussed in issue 12458.

--
nosy: +r.david.murray
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - Tracebacks should contain the first line of continuation lines

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23687
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12458] Tracebacks should contain the first line of continuation lines

2015-03-18 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
nosy: +ers81239

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12458
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23699] Add a macro to ease writing rich comparisons

2015-03-18 Thread Petr Viktorin

Petr Viktorin added the comment:

Here is a patch that uses the macro in all the places it can help.

--
Added file: 
http://bugs.python.org/file38542/0002-Use-Py_RICHCOMPARE-in-rich-comparisons.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23699
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19564] test_context() of test_multiprocessing_spawn hangs on x86 Gentoo Non-Debug 3.x buildbot

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this sporadic failure recently. The buildbot is now offline. I 
close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19564
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12155] queue example doesn't stop worker threads

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b44ec269abda by Victor Stinner in branch 'default':
Issue #12155: Fix queue doc example to join threads
https://hg.python.org/cpython/rev/b44ec269abda

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12155
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12155] queue example doesn't stop worker threads

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed
versions: +Python 3.5 -Python 2.7, Python 3.1, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12155
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11726] clarify that linecache only works on files that can be decoded successfully

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 01cb2107cbc3 by Victor Stinner in branch '3.4':
Issue #11726: Fix linecache example in the doc
https://hg.python.org/cpython/rev/01cb2107cbc3

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11726
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22521] ctypes compilation fails on FreeBSD: Undefined symbol ffi_call_win32

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

FreeBSD 6.4 buildbot is broken (hg update fails), FreeBSD 7.2 is offline. I 
close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22521
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20614] test.script_helper should copy SYSTEMROOT environment variable for __cleanenv=True

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

 There is a single test which uses __cleanenv=True: test_hash.

The test pass on Windows and this issue is old. I prefer to simplify close it.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20614
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23696] zipimport: chain ImportError to OSError

2015-03-18 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
nosy: +twouters

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23696
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23689] Memory leak in Modules/sre_lib.h

2015-03-18 Thread Alexei Romanov

Changes by Alexei Romanov drednout...@gmail.com:


--
nosy: +alexei.romanov

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23689
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12568] Add functions to get the width in columns of a character

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

Since no consensus was found on the definition of the function, and this issue 
has no activity since 2 years, I close the issue as out of date.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12568
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11726] clarify that linecache only works on files that can be decoded successfully

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

4 years to fix this minor documentation issue, I feel ashamed...

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11726
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20719] testPythonOrg() of test_robotparser fails with the new www.python.org website

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

This issue has been worked around.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20719
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21644] Optimize bytearray(int) constructor to use calloc()

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I'm not interested to work on this optimization, so I just close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21644
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11726] clarify that linecache only works on files that can be decoded successfully

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 51341af466e3 by Victor Stinner in branch '3.4':
Issue #11726: clarify linecache doc: linecache is written to cache Python
https://hg.python.org/cpython/rev/51341af466e3

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11726
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20574] Implement incremental decoder for cp65001

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20574
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23699] Add a macro to ease writing rich comparisons

2015-03-18 Thread Petr Viktorin

New submission from Petr Viktorin:

Rich comparison functions of many builtin types include a block of boilerplate 
which can be consolidated in a macro. The macro can be useful for third-party 
extensions as well as CPython itself.

See this e-mail for a longer write-up: 
https://mail.python.org/pipermail/python-ideas/2015-March/032564.html

--
files: 0001-Define-Py_RICHCOMPARE-to-ease-writing-rich-compariso.patch
keywords: patch
messages: 238441
nosy: encukou
priority: normal
severity: normal
status: open
title: Add a macro to ease writing rich comparisons
type: enhancement
Added file: 
http://bugs.python.org/file38541/0001-Define-Py_RICHCOMPARE-to-ease-writing-rich-compariso.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23699
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22181] os.urandom() should use Linux 3.17 getrandom() syscall

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22181
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22333] test_threaded_import.test_parallel_meta_path() failed on x86 Windows7 3.x

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

I didn't see this failure recently, I close the issue.

--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22333
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20114] Sporadic failure of test_semaphore_tracker() of test_multiprocessing_forkserver on FreeBSD 9 buildbot

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20114
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19428] marshal: error cases are not documented

2015-03-18 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1e4605542ac4 by Victor Stinner in branch 'default':
Issue #19428: Handle PyMarshal_Read*() errors in run_pyc_file()
https://hg.python.org/cpython/rev/1e4605542ac4

New changeset acb4d43955f6 by Victor Stinner in branch '3.4':
Issue #19428: Document that PyMarshal_ReadLongFromFile() and
https://hg.python.org/cpython/rev/acb4d43955f6

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19428
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19428] marshal: error cases are not documented

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19428
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20717] test_4_daemon_threads() fails randomly on x86 Windows Server 2003 [SB] 3.x

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - out of date
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20717
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21955] ceval.c: implement fast path for integers with a single digit

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

What's the status of this issue?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21955
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue19569] Use __attribute__((deprecated)) to warn usage of deprecated functions and macros

2015-03-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19569
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22931] cookies with square brackets in value

2015-03-18 Thread Tim Graham

Changes by Tim Graham timogra...@gmail.com:


--
nosy: +Tim.Graham

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22931
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22906] PEP 479: Change StopIteration handling inside generators

2015-03-18 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
priority: normal - release blocker

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22906
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

Python 3.4 and 3.5 are also affected: I marked issue #22521 as a duplicate of 
this issue.

--
nosy: +haypo
title: Python 2.7.9 ctypes module doesn't build on FreeBSD x86 - ctypes module 
doesn't build on FreeBSD x86
versions: +Python 3.4, Python 3.5

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22521] ctypes compilation fails on FreeBSD: Undefined symbol ffi_call_win32

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution: out of date - duplicate
superseder:  - Python 2.7.9 ctypes module doesn't build on FreeBSD x86

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22521
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23654] infinite loop in faulthandler._stack_overflow

2015-03-18 Thread STINNER Victor

STINNER Victor added the comment:

 It occurs to me that the right way to deal with this is with
 __attribute__ ((optimize (no-optimize-sibling-calls)))
 on the function where it matters (stack_overflow()).

Can you please write a patch for that with the right #ifdef to only add it to 
ICC?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23654
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22906] PEP 479: Change StopIteration handling inside generators

2015-03-18 Thread Nick Coghlan

Nick Coghlan added the comment:

Bumped to release blocker so we make sure to look at this at the PyCon sprints, 
if not before. (I'm assuming Larry's not taking release blocker literally for 
the 3.5 alphas)

As Neil notes, this patch needs some explicit tests for the new behaviour when 
the future flag is set.

From a docs point of view, the changes to the language reference itself 
currently seem surprisingly small, but I haven't looked through in detail to 
see where other updates might be needed, or how the already modified section 
could be better updated to account for the impact of the __future__ directive 
(the current update there doesn't mention that the behaviour is in the process 
of changing)

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22906
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15787] PEP 3121, 384 Refactoring

2015-03-18 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
nosy: +ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12855] linebreak sequences should be better documented

2015-03-18 Thread R. David Murray

R. David Murray added the comment:

SMRUTI: \f is the python escape code for the ASCII formfeed character.  It is 
the handling of that ASCII character (among others) that this issue is 
discussing.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12855
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-18 Thread Bohuslav Slavek Kabrda

New submission from Bohuslav Slavek Kabrda:

This bug is very similar to #18879, the only difference is that 
_TemporaryFileWrapper.__iter__ is the problem (in #18879, __getattr__ was 
fixed, but __iter__ was not). The real world use case that helped me find this 
bug is at the bottom of this report, this is a simple reproducer:


 import tempfile
 for l in tempfile.NamedTemporaryFile(mode='a+b'):
... print(l)
... 
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: readline of closed file


I'm attaching a patch that fixes this (+ testcase).

Note: I actually discovered this while using


 from urllib.request import urlopen
 for l in urlopen('ftp://some_ftp'):
... print(l)
... 
Traceback (most recent call last):
  File stdin, line 1, in module
ValueError: readline of closed file


Opening FTP uses urllib.response, which in turn uses 
tempfile._TemporaryFileWrapper, which makes this example fail.

--
components: Library (Lib)
files: python-3.4-tempfile-iter.patch
keywords: patch
messages: 238451
nosy: bkabrda
priority: normal
severity: normal
status: open
title: tempfile.NamedTemporaryFile can close too early if used as iterator
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file38543/python-3.4-tempfile-iter.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23700
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-18 Thread Matěj Stuchlík

Changes by Matěj Stuchlík matej.stuch...@gmail.com:


--
nosy: +sYnfo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23700
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22521] ctypes compilation fails on FreeBSD: Undefined symbol ffi_call_win32

2015-03-18 Thread koobs

koobs added the comment:

FWIW, see #23042

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22521
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2211] Cookie.Morsel interface needs update

2015-03-18 Thread Demian Brecht

Demian Brecht added the comment:

Thanks for the follow up Serhiy, LGTM.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2211
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-18 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman, georg.brandl, ncoghlan

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23700
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-18 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
nosy:  -haypo

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23655] Memory corruption using pickle over pipe to subprocess

2015-03-18 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23655
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23701] Drop extraneous comment from winreg.QueryValue's docstring

2015-03-18 Thread Claudiu Popa

New submission from Claudiu Popa:

winreg.QueryValue's docstring has an interesting comment at the end:

But the underlying API call doesn't return the type, Lame Lame Lame, DONT USE 
THIS!!!

The documentation 
(https://docs.python.org/3.4/library/winreg.html#winreg.QueryValue) already 
mentions the shortcomings of QueryValue. This comment should be removed or at 
least rewritten in a more serious note.

--
components: Library (Lib)
files: drop_winreg_string.patch
keywords: patch
messages: 238459
nosy: Claudiu.Popa, loewis, steve.dower
priority: low
severity: normal
status: open
title: Drop extraneous comment from winreg.QueryValue's docstring
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file38545/drop_winreg_string.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23701
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23700] tempfile.NamedTemporaryFile can close too early if used as iterator

2015-03-18 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +serhiy.storchaka
stage:  - patch review
versions:  -Python 3.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23700
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23699] Add a macro to ease writing rich comparisons

2015-03-18 Thread Stefan Krah

Changes by Stefan Krah ste...@bytereef.org:


--
nosy: +skrah

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23699
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23042] ctypes module doesn't build on FreeBSD x86

2015-03-18 Thread Davin Potts

Davin Potts added the comment:

To provide supporting information, using the i386 release of FreeBSD 10.1:

* ctypes fails to build with the latest from Python 2.7 branch with the message:


build/temp.freebsd-10.1-RELEASE-i386-2.7-pydebug/usr/home/davin/pycoredev/cpython/Modules/_ctypes/libffi/src/x86/ffi.o:
 In function `ffi_prep_closure_loc':
/usr/home/davin/pycoredev/cpython/Modules/_ctypes/libffi/src/x86/ffi.c:677: 
undefined reference to `ffi_closure_FASTCALL'
/usr/home/davin/pycoredev/cpython/Modules/_ctypes/libffi/src/x86/ffi.c:683: 
undefined reference to `ffi_closure_THISCALL'
/usr/home/davin/pycoredev/cpython/Modules/_ctypes/libffi/src/x86/ffi.c:689: 
undefined reference to `ffi_closure_STDCALL'
/usr/bin/ld: build/lib.freebsd-10.1-RELEASE-i386-2.7-pydebug/_ctypes.so: 
hidden symbol `ffi_closure_FASTCALL' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
cc: error: linker command failed with exit code 1 (use -v to see invocation)

...

Failed to build these modules:
_ctypes   


* Note that the above failure message was described in issue22521 by 
@Danya.Alexeyevsky

* ctypes also fails to build with the latest from default/3.5 branch with the 
very same message


Apparently the compilation failure messages differ between FreeBSD 8.3 and 10.1 
(both i386).

--
nosy: +davin

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23042
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23695] idiom for clustering a data series into n-length groups

2015-03-18 Thread R. David Murray

R. David Murray added the comment:

I think it would be both helpful and sufficient to add a gloss, perhaps 
something like: this passes zip ``n`` references to the *same* iterator, which 
means zip calls that single iterator ``n`` times for each tuple it creates; zip 
thus outputs tuples consisting of ``n`` length chunks from the iterator ``s``.

--
nosy: +r.david.murray

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23695
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue23699] Add a macro to ease writing rich comparisons

2015-03-18 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23699
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >