[issue20517] Support errors with two filenames for errno exceptions

2014-02-06 Thread Larry Hastings

Larry Hastings added the comment:

Serhiy: I'm not sure if it's the language barrier, but that came across kind of 
mean.  It's not that I can do whatever I want as release manager, but that I 
have the say in whether something is a bug fix or a new feature, which is 
how we decide whether or not something is allowed into Python after feature 
freeze.

This issue has been on my radar for a while (originally #16074).  But I wasn't 
paying strong attention to it.  Nobody in that issue came up with a solution I 
liked.  Finally when you posted your patch I said ugh, can't we do better and 
had to think about it before I realized we should just display both filenames.  
If somebody had posted a patch with that two months ago I would have happily 
accepted it and we wouldn't be having this conversation now.

Vajrasky: My goal is that Python is nicer to use than PHP or Perl.  And it's 
more than a month before 3.4 final is scheduled to be released.  This patch is 
a pretty mechanical change--create new function, accept extra parameter, make 
the tuple one entry longer.  I don't expect it to be destabilizing.

However, I *was* hoping that one of the original authors of the code in 
question would come forth and say a) whether or not they think it's a good idea 
in general, and b) if they think the specific approach is fine.

The patch is a bit stalled because of higher-priority Argument Clinic changes.  
I could post a partial patch if someone wanted to pick it up and finish it.

--

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



[issue20517] Support errors with two filenames for errno exceptions

2014-02-06 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue20525] Got compiler warning when compiling readline module

2014-02-06 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
versions: +Python 2.7, Python 3.3

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



[issue20525] Got compiler warning when compiling readline module

2014-02-06 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
nosy: +Arfrever

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



[issue20517] Support errors with two filenames for errno exceptions

2014-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 This issue has been on my radar for a while (originally #16074).  But I
 wasn't paying strong attention to it.  Nobody in that issue came up with a
 solution I liked.  Finally when you posted your patch I said ugh, can't we
 do better and had to think about it before I realized we should just
 display both filenames.  If somebody had posted a patch with that two
 months ago I would have happily accepted it and we wouldn't be having this
 conversation now.

Actually that was Vajrasky's patch, and that was extended version of your 
patch. I asked you not because you are release manager, but because you are 
the author of the code and original patch.

I agree that support errors with two filenames is better solution than remove 
ambiguous filename attribute, but there is no much time left and we still don't 
have a patch. Vajrasky's patch is alternate variant for 3.4 in case when 
better patch will not be ready and is only solution for 3.3 (if we decide to 
fix this in 3.3).

--

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



[issue20525] Got compiler warning when compiling readline module

2014-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What will happen if change the signature of completion_matches to const char*?

--
nosy: +benjamin.peterson, ned.deily, serhiy.storchaka

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



[issue20526] python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)-gc.gc_refs (1)) != 0' failed.

2014-02-06 Thread STINNER Victor

New submission from STINNER Victor:

While trying to reproduce a race condition in asyncio, I got an assertion error 
from the Python garbage collector at exit. It's not easy to reproduce the 
issue: run attached script on Python 3.4 compiled in debug mode (to get 
assertions) and press CTRL+c twice. It looks like the bug occurs more often 
after at least 400 runs.

The Future class of the asyncio may store an exception in its private 
Future._exception attribute. An exception stores a traceback. I don't know if 
it's related.

Output:
---
...
run #347
^CTraceback (most recent call last):
  File x.py, line 73, in module
main()
  File x.py, line 70, in main
el.join()
  File /home/haypo/prog/python/default/Lib/threading.py, line 1061, in join
self._wait_for_tstate_lock()
  File /home/haypo/prog/python/default/Lib/threading.py, line 1077, in 
_wait_for_tstate_lock
elif lock.acquire(block, timeout):
run #348
KeyboardInterrupt
...
run #364
run #365
run #366
run #367
-cancelled-
run #368
^CException ignored in: module 'threading' from 
'/home/haypo/prog/python/default/Lib/threading.py'
Traceback (most recent call last):
  File /home/haypo/prog/python/default/Lib/threading.py, line 1295, in 
_shutdown
t.join()
  File /home/haypo/prog/python/default/Lib/threading.py, line 1061, in join
self._wait_for_tstate_lock()
  File /home/haypo/prog/python/default/Lib/threading.py, line 1077, in 
_wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt
-cancelled-
python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)-gc.gc_refs  
(1)) != 0' failed.
Abandon (core dumped)

$ ls *core
python-6564.core

$ gdb ./python -c python-6564.core

Core was generated by `./python x.py'.
Program terminated with signal SIGABRT, Aborted.
(gdb) where
#0  0x003f3a835c59 in raise () from /lib64/libc.so.6
#1  0x003f3a837368 in abort () from /lib64/libc.so.6
#2  0x003f3a82ebb6 in __assert_fail_base () from /lib64/libc.so.6
#3  0x003f3a82ec62 in __assert_fail () from /lib64/libc.so.6
#4  0x0043ac66 in visit_decref (
op=Frame 0x7f013c001398, for file x.py, line 43, in task 
(self=WorkerThread(_kwargs={}, loop=_UnixSelectorEventLoop(_scheduled=[], 
_default_executor=None, _running=True, _ready=collections.deque at remote 
0x7f014bbed6e0, 
_selector=EpollSelector(_map=_SelectorMapping(_selector=...) at remote 
0x7f014c3bff60, _epoll=select.epoll at remote 0x7f014d5bce08, _fd_to_key={5: 
SelectorKey at remote 0x7f014bbecaf8}) at remote 0x7f014c3bfae8, 
_granularity=float at remote 0x7f014e8c76b8, _ssock=socket at remote 
0x7f014c3c5a78, _internal_fds=1, _csock=socket at remote 0x7f014bbeb5f8, 
_signal_handlers={}) at remote 0x7f014c437400, _is_stopped=False, 
_target=None, _daemonic=False, executor=ThreadPoolExecutor(_max_workers=5, 
_shutdown=False, _work_queue=Queue(not_empty=Condition(release=built-in 
method release of _thread.lock object at remote 0x7f014c3bb1a0, 
acquire=built-in method acquire of _thread.lock object at remote 
0x7f014c3bb1a0, _lock=_thread.lock at remote 0x
 7f014c3bb1a0, _waiters=collecti...(truncated), data=0x0) at 
Modules/gcmodule.c:379
#5  0x004336bd in tb_traverse (tb=0x7f01493a66e8, visit=0x43abb4 
visit_decref, arg=0x0) at Python/traceback.c:64
#6  0x0043acdc in subtract_refs (containers=0x8f1a20 generations+64) 
at Modules/gcmodule.c:398
#7  0x0043bdee in collect (generation=2, n_collected=0x7fff499317c0, 
n_uncollectable=0x7fff499317b8, nofail=0)
at Modules/gcmodule.c:957
#8  0x0043c455 in collect_with_callback (generation=2) at 
Modules/gcmodule.c:1128
#9  0x0043d1d5 in PyGC_Collect () at Modules/gcmodule.c:1604
#10 0x0041e959 in Py_Finalize () at Python/pythonrun.c:605
#11 0x0043a890 in Py_Main (argc=2, argv=0x22bb020) at Modules/main.c:771
#12 0x0041aba9 in main (argc=2, argv=0x7fff49931ab8) at 
./Modules/python.c:69

(gdb) frame 4
#4  0x0043ac66 in visit_decref (

(gdb) print op
$3 = Frame 0x7f013c001398, for file x.py, line 43, in task 
(self=WorkerThread(_kwargs={}, loop=_UnixSelectorEventLoop(_scheduled=[], 
_default_executor=None, _running=True, _ready=collections.deque at remote 
0x7f014bbed6e0, 
_selector=EpollSelector(_map=_SelectorMapping(_selector=...) at remote 
0x7f014c3bff60, _epoll=select.epoll at remote 0x7f014d5bce08, _fd_to_key={5: 
SelectorKey at remote 0x7f014bbecaf8}) at remote 0x7f014c3bfae8, 
_granularity=float at remote 0x7f014e8c76b8, _ssock=socket at remote 
0x7f014c3c5a78, _internal_fds=1, _csock=socket at remote 0x7f014bbeb5f8, 
_signal_handlers={}) at remote 0x7f014c437400, _is_stopped=False, 
_target=None, _daemonic=False, executor=ThreadPoolExecutor(_max_workers=5, 
_shutdown=False, _work_queue=Queue(not_empty=Condition(release=built-in 
method release of _thread.lock object at remote 0x7f014c3bb1a0, 
acquire=built-in method acquire of _thread.lock object at remote 
0x7f014c3bb1a0, _lock=_thread.lock at remote 0x7f
 014c3bb1a0, 

[issue20526] python: Modules/gcmodule.c:379: visit_decref: Assertion `((gc)-gc.gc_refs (1)) != 0' failed.

2014-02-06 Thread STINNER Victor

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


Added file: http://bugs.python.org/file33939/asyncio_gc.py

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



[issue20527] multiprocessing.Queue deadlocks after “reader” process death

2014-02-06 Thread OscaTutenchamon

New submission from OscaTutenchamon:

I've experienced that queue can be deadlocked for reading when:
1. The reader process is using `get` with timeout  0:
  self.queue.get(timeout=3)
2. reader dies while `get` is blocking due to timeout.

After that queue's `_rlock` is never being released so reading becomes 
impossible.

Application demonstrating the problem.
I create two child processes Worker (putting into queue) and Receiver 
(getting from queue). Also parent process periodically checks if his children 
are alive and starts new child if needed.

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import multiprocessing
import procname
import time

class Receiver(multiprocessing.Process):
''' Reads from queue with 3 secs timeout '''

def __init__(self, queue):
multiprocessing.Process.__init__(self)
self.queue = queue

def run(self):
procname.setprocname('Receiver')
while True:
try:
msg = self.queue.get(timeout=3)
print ' `{}`, queue rlock: {}'.format(
msg, self.queue._rlock)
except multiprocessing.queues.Empty:
print ' EMPTY, Queue rlock: {}'.format(
self.queue._rlock)
pass


class Worker(multiprocessing.Process):
''' Puts into queue with 1 sec sleep '''

def __init__(self, queue):
multiprocessing.Process.__init__(self)
self.queue = queue

def run(self):
procname.setprocname('Worker')
while True:
time.sleep(1)
print 'Worker: putting msg, Queue size: ~{}'.format(
self.queue.qsize())
self.queue.put('msg from Worker')


if __name__ == '__main__':
queue = multiprocessing.Queue()

worker = Worker(queue)
worker.start()

receiver = Receiver(queue)
receiver.start()

while True:
time.sleep(1)
if not worker.is_alive():
print 'Restarting worker'
worker = Worker(queue)
worker.start()
if not receiver.is_alive():
print 'Restarting receiver'
receiver = Receiver(queue)
receiver.start()

Colored version here: http://pastebin.com/YifY63vE

Console output.
$ python queuetest.py
Worker: putting msg, Queue size: ~0
 `msg from Worker`, queue rlock: Lock(owner=None)
Worker: putting msg, Queue size: ~0
 `msg from Worker`, queue rlock: Lock(owner=None)
Restarting receiver-- killed Receiver with SIGTERM
Worker: putting msg, Queue size: ~0
Worker: putting msg, Queue size: ~1
Worker: putting msg, Queue size: ~2
 EMPTY, Queue rlock: Lock(owner=SomeOtherProcess)
Worker: putting msg, Queue size: ~3
Worker: putting msg, Queue size: ~4
Worker: putting msg, Queue size: ~5
 EMPTY, Queue rlock: Lock(owner=SomeOtherProcess)
Worker: putting msg, Queue size: ~6
Worker: putting msg, Queue size: ~7 

System information.
$ uname -sr
Linux 3.11.8-200.fc19.x86_64
$ python -V
Python 2.7.5
In [3]: multiprocessing.__version__
Out[3]: '0.70a1'

--
components: Library (Lib)
messages: 210369
nosy: OscaTutenchamon
priority: normal
severity: normal
status: open
title: multiprocessing.Queue deadlocks after “reader” process death
type: behavior
versions: Python 2.7

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



[issue20525] Got compiler warning when compiling readline module

2014-02-06 Thread Vajrasky Kok

Vajrasky Kok added the comment:

It works. I chose Christian Heimes' strategy because of: 

char ** completion_matches (char *text, CPFunction *entry_func)
in
http://web.mit.edu/gnu/doc/html/rlman_2.html

--

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



[issue20528] fileinput module will read whole file into memory when using fileinput.hook_encoded due to codecs.StreamReader.readlines

2014-02-06 Thread Gunnar Aastrand Grimnes

New submission from Gunnar Aastrand Grimnes:

When reading large files with fileinput, it will work as expected and only 
process a line at a time when used normally, but if you add an hook_encoded 
openhook it will read the whole file into memory before returning the first 
line. 

Verify by running this program on a large text file: 

import fileinput

for l in fileinput.input(openhook=fileinput.hook_encoded('iso-8859-1')):
raw_input()

and check how much memory it uses. Remove the openhook and memory usage goes 
down to nothing.

The problem is that fileinput calls readlines with a size-hint and in 
codecs.StreamReader, readlines explicitly ignores this hint and reads all lines 
into memory. 

http://bugs.python.org/issue20501 is open for fixing up the documentation for 
fileinput, but a fix would also be nice.

I see two options: 

1. As suggested by r.david.murray: Give us a way of signaling to fileinput that 
it should not use readlines, for instance by setting buffer=None

2. Fix the codecs module to allow StreamReader to respect the hint if given. 
Although the comment there says it's no efficient way to do this, at least an 
inefficient way would be better than reading a possibly infinite stream in. A 
simple solution would be to repeatedly call readline. A more complicated 
solution would be to read chunks from the stream, and then encode them, just 
like the readline method does. 

BTW - this issue is py2.7 only, I tested a file object from io.open with 
encoding in 3.3 and it supports readlines just fine.

--
components: IO
messages: 210371
nosy: gromgull
priority: normal
severity: normal
status: open
title: fileinput module will read whole file into memory when using 
fileinput.hook_encoded due to codecs.StreamReader.readlines
versions: Python 2.7

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



[issue14455] plistlib unable to read json and binary plist files

2014-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0121c2b7dcce by Ronald Oussoren in branch 'default':
Issue #14455: fix handling of unsigned long long values for binary plist files
http://hg.python.org/cpython/rev/0121c2b7dcce

--

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



[issue14455] plistlib unable to read json and binary plist files

2014-02-06 Thread Ronald Oussoren

Ronald Oussoren added the comment:

Serhiy: the issue should now be fixed.

I finally understand why I was so sure that Apple's code serialised large 
positive numbers as negative numbers: due to a bug in PyObjC large positive 
numbers end up as NSNumber values that are interpreted as negative values.

The patch tweaks the test generator to do the right thing by explicitly 
creating the NSNumber value instead of relying on PyObjC's automatic 
conversion. 

Now I just have to hunt down this bug in PyObjC :-)

--
status: open - closed

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



[issue1654367] [PATCH] Debuggers need a way to change the locals of a frame

2014-02-06 Thread Armin Rigo

Armin Rigo added the comment:

Sorry to hijack CPython's bug tracker for that, but can you check if this makes 
sense to you?  I added a function 'locals_to_fast()' to the __pypy__ built-in 
module which just calls the PyPy equivalent to PyFrame_LocalsToFast().  Your 
tests are passing, so I guess there should be no problem.  The diff is here: 
http://bpaste.net/show/176119/ (are you ok with having your name put into the 
test file?).

--

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



[issue20184] Derby #16: Convert 50 sites to Argument Clinic across 9 files

2014-02-06 Thread Nick Coghlan

Nick Coghlan added the comment:

Interpreting the lack of response as this can wait until 3.5.

--
assignee: larry - 
priority: release blocker - normal
versions: +Python 3.5 -Python 3.4

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



[issue20053] venv and ensurepip are affected by default pip config file

2014-02-06 Thread Nick Coghlan

Nick Coghlan added the comment:

EnvironmentVarGuard doesn't work through monkeypatching - you make your changes 
*through* the guard, and it undoes them in __exit__, as well as restoring the 
original binding (in case *other* code monkeypatched it).

This allows it to still be used when testing code that is *supposed* to make 
real environment changes (e.g. so they're visible in a subprocess).

Buildbot is currently down, so I can't check the logs again :(

--

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



[issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not

2014-02-06 Thread Bernt Røskar Brenna

New submission from Bernt Røskar Brenna:

Given the following file test_reswarn.py:


import unittest


class TestResourceWarning(unittest.TestCase):
def test_it(self):
self.assertIn(TestResourceWarning, open(__file__).read())


Running the test:


$ python -m unittest test_reswarn.py
./test_reswarn.py:6: ResourceWarning: unclosed file _io.TextIOWrapper 
name='./test_reswarn.py' mode='r' encoding='UTF-8'
  self.assertIn(TestResourceWarning, open(__file__).read())
.
--
Ran 1 test in 0.000s

OK


When running the unit test using unittest, ResourceWarning warnings are 
displayed. In my experience using open(filename) without explicitly closing 
the file is pretty common and would usually not be an error, since the file 
will be closed when the reference goes out of scope (or am I wrong?).

Therefore I believe that unittest should not emit ResourceWarning warnings.

--
components: Library (Lib)
messages: 210377
nosy: Bernt.Røskar.Brenna
priority: normal
severity: normal
status: open
title: Unittest displays ResourceWarning warnings when running tests, it 
probably should not
type: behavior
versions: Python 3.3

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



[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-06 Thread Leon Weber

Leon Weber added the comment:

I noticed an inconsistency between IPv4 and IPv6 in my temporary variable names 
when looking at the patch again after a few days. Here’s an updated patch. Not 
that it’s important, but I sleep better that way :)

As consensus seems to have settled on leaving out the trailing dot, I only 
updated the version without the dot.

--
Added file: http://bugs.python.org/file33940/ipaddress_reverse_names_v4.patch

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



[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-06 Thread Eric V. Smith

Eric V. Smith added the comment:

Looks good to me. Once 3.5 is open for new features, I'll commit this. (But 
feel free to ping me if you think it's lingering!)

Thanks!

--
assignee:  - eric.smith

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



[issue20527] multiprocessing.Queue deadlocks after “reader” process death

2014-02-06 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
nosy: +jnoller, sbt

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



[issue20530] Change the text signature format (again) to be more robust

2014-02-06 Thread Larry Hastings

New submission from Larry Hastings:

Following a new discussion of the format of the text signature, I decided to go 
with this:
name-of-function(...)\n--\n\n

See here for the discussion:
   https://mail.python.org/pipermail/python-dev/2014-February/132271.html

Patch attached implementing this approach.  Can I get a review?  I want this in 
before tagging for rc1 on Saturday.

Other changes:

* clinic.py now generates the / marker in sigantures to denote
  positional-only parameters.

* clinic.py --make is a lot faster; it prescans the file for any
  clinic block signatures, and if it doesn't see any it skips the file.

* When generating the docstring for a function with optional groups,
  the signature generated is not intended to be machine-readable.
  So it omits the $, the /, and the -- markers.  (See
  Modules/_cursesmodule.c for the one and only example.)

--
assignee: larry
files: larry.even.newerer.signature.syntax.1.diff
keywords: patch
messages: 210380
nosy: georg.brandl, larry, ncoghlan, serhiy.storchaka, yselivanov, zach.ware
priority: release blocker
severity: normal
stage: patch review
status: open
title: Change the text signature format (again) to be more robust
type: enhancement
versions: Python 3.4
Added file: 
http://bugs.python.org/file33941/larry.even.newerer.signature.syntax.1.diff

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



[issue20528] fileinput module will read whole file into memory when using fileinput.hook_encoded due to codecs.StreamReader.readlines

2014-02-06 Thread R. David Murray

R. David Murray added the comment:

Unfortunately, since 2.7 is in feature freeze, we can't add any new API there 
to allow a circumvention.  On the other hand, it sounds like Serhiy has come up 
with an actual fix in the other issue, based on the reason that it is not in 
fact a problem in 3.x (the io module is smarter than the codecs module in this 
context).

So, I'm going to close this issue...sorry you went to the extra effort of 
creating it to no purpose.

--
nosy: +r.david.murray
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - fileinput module will read whole file into memory when using 
fileinput.hook_encoded
type:  - enhancement

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



[issue20530] Change the text signature format (again) to be more robust

2014-02-06 Thread Larry Hastings

Larry Hastings added the comment:

Whoops, forgot to fix all the breakage in clinic_test.py.  It's good now.

--
Added file: 
http://bugs.python.org/file33942/larry.even.newerer.signature.syntax.1.diff

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



[issue20530] Change the text signature format (again) to be more robust

2014-02-06 Thread Larry Hastings

Changes by Larry Hastings la...@hastings.org:


Removed file: 
http://bugs.python.org/file33941/larry.even.newerer.signature.syntax.1.diff

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



[issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not

2014-02-06 Thread R. David Murray

R. David Murray added the comment:

This is intentional behavior.  In the general case, resource warnings *are* 
bugs, since not all Python implementations do automatic cleanup.  This behavior 
should be controllable (I'm not even sure they *can* be turned on if python is 
not compiled in debug mode).

I don't see resource warnings mentioned in the TextTestRunner docs that mention 
the other warning controls.  It also seems like perhaps there should be a way 
to control warnings from the unittest command line.  So I'd say there are some 
improvements that can be made here, but the basic behavior is working as 
intended.

--
nosy: +r.david.murray

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



[issue6386] importing yields unexpected results when initial script is a symbolic link

2014-02-06 Thread Brett Cannon

Brett Cannon added the comment:

Thanks for the path, Senko! Tweaked the wording a bit as the current 
directory part was accurate for when you're in the REPL.

--
resolution:  - fixed
status: open - closed

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



[issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not

2014-02-06 Thread R. David Murray

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


--
nosy: +ezio.melotti

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



[issue6386] importing yields unexpected results when initial script is a symbolic link

2014-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 47c31e7d3779 by Brett Cannon in branch 'default':
Issue #6386: When executing a script that's a symlink, the directory
http://hg.python.org/cpython/rev/47c31e7d3779

--
nosy: +python-dev

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



[issue20529] Unittest displays ResourceWarning warnings when running tests, it probably should not

2014-02-06 Thread Bernt Røskar Brenna

Bernt Røskar Brenna added the comment:

OK I see.

I'll just use:

python -W ignore:ResourceWarning -m unittest

--

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



[issue20530] Change the text signature format (again) to be more robust

2014-02-06 Thread Yury Selivanov

Yury Selivanov added the comment:

 Whoops, forgot to fix all the breakage in clinic_test.py.  It's good now.
Ah, you re-uploaded the patch and reset my code review comments. I'll repeat 
them here, just in case.

Reviewed the patch.

- In one of the C files I saw this signature: (/) -- probably should be just 
()

- signature for 'type' builtin was '(object_or_name, bases, dict)', which is a 
correct signature (minus the groups/optional parameters). In this patch it's a 
ValueError. Can we restore the prior behaviour? If not, then 
test_signature_on_class_without_init is incorrect now, as it should throw a 
ValueError for metaclasses.

- and some other minor stuff

--

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok

Changes by Vajrasky Kok sky@speaklikeaking.com:


Removed file: http://bugs.python.org/file33931/issue20185_conglomerate_v3.diff

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Here is the updated patch for gc module.

Some functions that can not be converted:
- set_threshold(threshold0, [threshold1, threshold2])
Don't know what default value to give to threshold1, threshold2.

static struct gc_generation generations[NUM_GENERATIONS] = {
/* PyGC_Head,   threshold,  count */
{{{GEN_HEAD(0), GEN_HEAD(0), 0}},   700,0},
{{{GEN_HEAD(1), GEN_HEAD(1), 0}},   10, 0},
{{{GEN_HEAD(2), GEN_HEAD(2), 0}},   10, 0},
};

- collect([generation])
Don't know what default value to give to generation.

int genarg = NUM_GENERATIONS - 1;

I don't think we can use expression in signature.

- get_referrers and get_referents
Don't know what signature to use for functions that can accept any number of 
arguments.

--
Added file: http://bugs.python.org/file33944/clinic_gc_v2.patch

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok

Changes by Vajrasky Kok sky@speaklikeaking.com:


Removed file: http://bugs.python.org/file33477/clinic_gc.patch

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



[issue20531] TypeError in e-mail.parser when non-ASCII is present

2014-02-06 Thread Jason R. Coombs

New submission from Jason R. Coombs:

As reported in https://bitbucket.org/dholth/wheel/issue/104, the email.parser 
no longer accepts Unicode content as it did in 3.3. I searched the What's New 
and module documentation, but found no indication that this behavior is no 
longer supported, so it appears to be a regression. If it's an intentional 
change, the behavior should be documented in one of the aforementioned 
documents.

Consider this simple test case:

# -*- coding: utf-8 -*-
import email.parser
meta = 
Header: ☃

email.parser.Parser().parsestr(meta)

Run that on Python 3.3.3 or Python 2 and it executes silently. Run it on Python 
3.4.0b3 and it produces this traceback:

Traceback (most recent call last):
  File C:\Users\jaraco\projects\public\wheel\test.py, line 6, in module
email.parser.Parser().parsestr(meta)
  File C:\Program Files\Python34\lib\email\parser.py, line 70, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
  File C:\Program Files\Python34\lib\email\parser.py, line 60, in parse
return feedparser.close()
  File C:\Program Files\Python34\lib\email\feedparser.py, line 170, in close
self._call_parse()
  File C:\Program Files\Python34\lib\email\feedparser.py, line 163, in 
_call_parse
self._parse()
  File C:\Program Files\Python34\lib\email\feedparser.py, line 449, in 
_parsegen
self._cur.set_payload(EMPTYSTRING.join(lines))
  File C:\Program Files\Python34\lib\email\message.py, line 311, in 
set_payload
 payload) from None
TypeError: charset argument must be specified when non-ASCII characters are 
used in the payload

--
components: email
keywords: 3.4regression
messages: 210390
nosy: barry, jason.coombs, r.david.murray
priority: normal
severity: normal
status: open
title: TypeError in e-mail.parser when non-ASCII is present
versions: Python 3.4

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



[issue20488] importlib title and introduction are out of date

2014-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cc08bf665dea by Brett Cannon in branch '3.3':
Issue #20488: Update docs to say importlib is *the* implementaiton of
http://hg.python.org/cpython/rev/cc08bf665dea

New changeset 5641c0b50072 by Brett Cannon in branch 'default':
Merge for issue #20488
http://hg.python.org/cpython/rev/5641c0b50072

--
nosy: +python-dev

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok

Vajrasky Kok added the comment:

About rlimit, I think we can use negative number for any member of the struct. 
But the thing is I am not really sure whether it's okay or not. So it's better 
on the safe side.

I'll finish longobject in one or two days.

--

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



[issue20029] asyncio.SubprocessProtocol is missing

2014-02-06 Thread STINNER Victor

STINNER Victor added the comment:

 There's one issue left: the docs need to document BaseProtocol.

The BaseProtocol is documented here:
http://docs.python.org/dev/library/asyncio-protocol.html#protocols

Can we close the issue?

--

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



[issue20154] Deadlock in asyncio.StreamReader.readexactly()

2014-02-06 Thread STINNER Victor

STINNER Victor added the comment:

 I'd appreciate help writing a test.  (Debugging this already set me back 
 enough hours.)

Guido: do you still plan to write such unit test or can we close the issue?

--
nosy: +haypo

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



[issue19652] test_asyncio: test_subprocess_send_signal() hangs on buildbot AMD64 Snow Leop 3.x

2014-02-06 Thread STINNER Victor

STINNER Victor added the comment:

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

--
resolution:  - fixed
status: open - closed

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



[issue20488] importlib title and introduction are out of date

2014-02-06 Thread Brett Cannon

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


--
resolution:  - fixed
status: open - closed

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



[issue20531] TypeError in e-mail.parser when non-ASCII is present

2014-02-06 Thread R. David Murray

R. David Murray added the comment:

This was an intentional change, but I'm having second thoughts about it.  I 
think I need to make it a deprecation warning in 3.4.

Note that it doesn't actually do anything useful in 3.3:

Python 3.3.2 (default, Dec  9 2013, 11:44:21) 
[GCC 4.7.2] on linux
Type help, copyright, credits or license for more information.
 import email.parser
 meta = 
... Header: ☃
... 
 m = email.parser.Parser().parsestr(meta)
 str(m)
'\nHeader: ☃\n'
 import email.generator
 import io
 s = io.BytesIO()
 g = email.generator.BytesGenerator(s)
 g.flatten(m)
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/lib/python3.3/email/generator.py, line 112, in flatten
self._write(msg)
  File /usr/lib/python3.3/email/generator.py, line 177, in _write
self._dispatch(msg)
  File /usr/lib/python3.3/email/generator.py, line 203, in _dispatch
meth(msg)
  File /usr/lib/python3.3/email/generator.py, line 421, in _handle_text
super(BytesGenerator,self)._handle_text(msg)
  File /usr/lib/python3.3/email/generator.py, line 233, in _handle_text
self._write_lines(payload)
  File /usr/lib/python3.3/email/generator.py, line 158, in _write_lines
self.write(laststripped)
  File /usr/lib/python3.3/email/generator.py, line 395, in write
self._fp.write(s.encode('ascii', 'surrogateescape'))
UnicodeEncodeError: 'ascii' codec can't encode character '\u2603' in position 
8: ordinal not in range(128)

That is, if you pretend the message is a string, it will happily output
it as a string, including perhaps your writing the output to a file as
utf-8...but it will *NOT* be a valid email message, since it will have
non-ascii data in it with no specified CTE.

--

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



[issue20531] TypeError in e-mail.parser when non-ASCII is present

2014-02-06 Thread R. David Murray

R. David Murray added the comment:

Ideally what should really happen here, I think, is for email to treat this as 
analogous to an SMTPUTF8 message.  But I certainly don't have time to do that 
for the alpha :(

So, yeah, I need to revert that check for 3.4.

--
nosy: +larry
priority: normal - release blocker

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



[issue20531] TypeError in e-mail.parser when non-ASCII is present

2014-02-06 Thread Daniel Holth

Daniel Holth added the comment:

In bdist_wheel I've gone to some lengths to re-use the email module to parse 
and generate RFC822 inspired documents. The output is not a valid e-mail but 
it is useful.

It is awkward to use the email module this way.

We will sidestep the issue hopefully this year by switching to json.

--
nosy: +dholth

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



[issue20531] TypeError in e-mail.parser when non-ASCII is present

2014-02-06 Thread R. David Murray

R. David Murray added the comment:

The long term goal is to make it not-awkward to do the kind of thing you are 
doing, Daniel.  The change I made was premature in hindsight, I need to 
comprehensively address parsing unicode instead...it sort-of-works now, but 
only by accident.

That said, it is the policy stuff that will really give you the flexibility to 
manipulate rfc822-inspired data, and that doesn't really help you since you 
need to remain backward compatible with older pythons.

--

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



[issue1654367] [PATCH] Debuggers need a way to change the locals of a frame

2014-02-06 Thread Fabio Zadrozny

Fabio Zadrozny added the comment:

Hi Armin,

That does make sense to me, but maybe it could be nice providing a standard API 
across Python implementations to make that call (even if the CPython version 
uses ctypes underneath and the PyPy version uses RPython), but I'll leave that 
up to CPython and PyPy devs to discuss -- so, for me, if that call is in the 
__pypy__ namespace, I'll do the proper check and use it in the PyDev debugger :)

p.s.: no problem on putting my name on the test case (and distributing in 
whatever license PyPy or CPython is under).

--

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



[issue20531] TypeError in e-mail.parser when non-ASCII is present

2014-02-06 Thread Daniel Holth

Daniel Holth added the comment:

We do this. 
https://bitbucket.org/dholth/wheel/src/tip/wheel/pkginfo.py?at=default

I appreciate the long-term goal. The policy system is really neat.

We are going to json largely because the next version of the metadata is more 
nested. The decision had nothing to do with the email module itself.

--

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



[issue1654367] [PATCH] Debuggers need a way to change the locals of a frame

2014-02-06 Thread Fabio Zadrozny

Fabio Zadrozny added the comment:

Sure, no problems on my side :)

--

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



[issue1654367] [PATCH] Debuggers need a way to change the locals of a frame

2014-02-06 Thread Armin Rigo

Armin Rigo added the comment:

CPython 2.7 is in feature-freeze, so we need to add it to __pypy__.  If people 
here decide to add it more officially to CPython 3.x, then we'll also add it 
into pypy3, obviously.  I'm sure a debugger can cope with a few extra ifs to 
check on which platform it is really running :-)

--

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



[issue12691] tokenize.untokenize is broken

2014-02-06 Thread Gareth Rees

Gareth Rees added the comment:

I did some research on the cause of this issue. The assertion was
added in this change by Jeremy Hylton in August 2006:
https://mail.python.org/pipermail/python-checkins/2006-August/055812.html
(The corresponding Mercurial commit is here:
http://hg.python.org/cpython/rev/cc992d75d5b3#l217.25).

At that point I believe the assertion was reasonable. I think it would
have been triggered by backslash-continued lines, but otherwise it
worked.

But in this change http://hg.python.org/cpython/rev/51e24512e305 in
March 2008 Trent Nelson applied this patch by Michael Foord
http://bugs.python.org/file9741/tokenize_patch.diff to implement PEP
263 and fix issue719888. The patch added ENCODING tokens to the output
of tokenize.tokenize(). The ENCODING token is always generated with
row number 0, while the first actual token is generated with row
number 1. So now every token stream from tokenize.tokenize() sets off
the assertion.

The lack of a test case for tokenize.untokenize() in full mode meant
that it was (and is) all too easy for someone to accidentally break it
like this.

--

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



[issue20412] Enum and IntEnum classes are not defined in the documentation

2014-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset eeb582c0c014 by Ethan Furman in branch 'default':
Close issue20412: Updated Enum docs to have referencable Enum and IntEnum 
classes
http://hg.python.org/cpython/rev/eeb582c0c014

--
nosy: +python-dev
resolution:  - fixed
stage:  - committed/rejected
status: open - closed

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



[issue20029] asyncio.SubprocessProtocol is missing

2014-02-06 Thread Guido van Rossum

Guido van Rossum added the comment:

Go ahead and close it.

--

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



[issue20386] socket.SocketType enum overwrites import of _socket.SocketType

2014-02-06 Thread Ethan Furman

Ethan Furman added the comment:

Thanks for the hints, Georg!

--
Added file: http://bugs.python.org/file33945/issue20386.stoneleaf.04.patch

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



[issue20154] Deadlock in asyncio.StreamReader.readexactly()

2014-02-06 Thread Guido van Rossum

Guido van Rossum added the comment:

I'd still like there to be a test.
On Feb 6, 2014 6:52 AM, STINNER Victor rep...@bugs.python.org wrote:


 STINNER Victor added the comment:

  I'd appreciate help writing a test.  (Debugging this already set me back
 enough hours.)

 Guido: do you still plan to write such unit test or can we close the issue?

 --
 nosy: +haypo

 ___
 Python tracker rep...@bugs.python.org
 http://bugs.python.org/issue20154
 ___


--

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



[issue20532] Mark all tests which use _testcapi as CPython only

2014-02-06 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch marks all tests which use _testcapi as CPython only. Usually 
such tests don't make sense in alternative implementations. In particular tests 
which test integer overflow rely on implementation details.

This should help to use common tests for different implementations.

--
components: Tests
files: testcapi_cpython_only.patch
keywords: patch
messages: 210409
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Mark all tests which use _testcapi as CPython only
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33946/testcapi_cpython_only.patch

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



[issue20532] Mark all tests which use _testcapi as CPython only

2014-02-06 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +ezio.melotti

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



[issue19721] Move all test_importlib utility code into test_importlib.util

2014-02-06 Thread Brett Cannon

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


--
versions: +Python 3.5

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



[issue17621] Create a lazy import loader mixin

2014-02-06 Thread Brett Cannon

Brett Cannon added the comment:

Here is a patch which implements a lazy loader for loaders that define 
exec_module().

--
keywords: +patch
Added file: http://bugs.python.org/file33947/lazy_loader.diff

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



[issue17621] Create a lazy import loader mixin

2014-02-06 Thread Brett Cannon

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


--
dependencies:  -Make isinstance() work with super type instances

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



[issue17621] Create a lazy import loader mixin

2014-02-06 Thread Brett Cannon

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


--
stage: test needed - patch review

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



[issue20505] Remove resolution from selectors and granularity from asyncio

2014-02-06 Thread Guido van Rossum

Guido van Rossum added the comment:


 Let me state this last point once again: no busy loop can occur now that
 timeouts are rounded up.


How sure are you? Suppose I use poll() with a 0.5 msec timeout. This
presumably gets rounded up to 1 msec. But if the system clock has e.g. a 10
msec resolution, won't this still wait 0 msec? Or will it wait until the
next tick occurs, which could be anywhere between 0 and 10 msec in the
future? But if so, why wouldn't a poll() with a 0 msec timeout also wait
between 0 and 10 msec?

--

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



[issue20533] bug?

2014-02-06 Thread Rihards

New submission from Rihards:

Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 bit 
(AMD64)] on win32
Type copyright, credits or license() for more information.
 11.29-6.29
4.999
 11.30-6.30
5.001


--
messages: 210412
nosy: Rihards
priority: normal
severity: normal
status: open
title: bug?

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



[issue20533] bug in float arithmetic?

2014-02-06 Thread Zachary Ware

Zachary Ware added the comment:

Hi Rihards,

This is not a bug, this is an example of the limitations of binary floating 
point arithmetic.  See http://docs.python.org/3/tutorial/floatingpoint.html for 
more information.  For explanation by demonstration, have a look at this:

Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:03:43) [MSC v.1600 32 bit 
(Intel)] on win32
Type help, copyright, credits or license for more information.
 from decimal import Decimal as D
 D(11.29)
Decimal('11.28914734871708787977695465087890625')
 D(6.29)
Decimal('6.29003552713678800500929355621337890625')
 D(11.30)
Decimal('11.300710542735760100185871124267578125')
 D(6.30)
Decimal('6.29982236431605997495353221893310546875')
 D(11.291)
Decimal('11.29136948595252096652984619140625')
 D(6.291)
Decimal('6.29136948595252096652984619140625')
 11.29 - 6.29
4.999
 11.30 - 6.30
5.001
 11.291 - 6.291
5.0
 D(11.29) - D(6.29)
Decimal('4.999111821580300')
 D(11.30) - D(6.30)
Decimal('5.000888178419700')
 D(11.291) - D(6.291)
Decimal('5.000')


For future reference, bug? isn't very useful as an issue title :).  The title 
should be as brief a summary of the possible bug as you can come up with, or at 
least mention which part(s) of Python are affected.

--
nosy: +zach.ware
resolution:  - invalid
stage:  - committed/rejected
status: open - closed
title: bug? - bug in float arithmetic?
type:  - behavior
versions: +Python 3.3

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



[issue20527] multiprocessing.Queue deadlocks after “reader” process death

2014-02-06 Thread Richard Oudkerk

Richard Oudkerk added the comment:

This is expected.  Killing processes which use shared locks is never going to 
end well.  Even without the lock deadlock, the data in the pipe would be liable 
to be corrupted if a processes is killed while putting or getting from a queue.

If you want to be able to reliably recover when a related process dies then you 
would be better off using one-to-one pipes for comunication -- although that 
would probably mean substantial redesign.

--
resolution:  - wont fix
stage:  - committed/rejected
status: open - closed

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



[issue20363] BytesWarnings triggerred by test suite

2014-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
assignee: lukasz.langa - serhiy.storchaka
stage: patch review - commit review

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



[issue20363] BytesWarnings triggerred by test suite

2014-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 791674a74e47 by Serhiy Storchaka in branch '3.3':
Issue #20363. Fixed BytesWarning triggerred by test suite.
http://hg.python.org/cpython/rev/791674a74e47

New changeset a4431dce107a by Serhiy Storchaka in branch 'default':
Issue #20363. Fixed BytesWarning triggerred by test suite.
http://hg.python.org/cpython/rev/a4431dce107a

--
nosy: +python-dev

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



[issue19995] %c, %o, %x, %X accept non-integer values instead of raising an exception

2014-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 775fb736b4b8 by Serhiy Storchaka in branch 'default':
Catch deprecation warnings emitted when non-integers are formatted with %c, %o
http://hg.python.org/cpython/rev/775fb736b4b8

--

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



[issue20363] BytesWarnings triggerred by test suite

2014-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Arfrever for your report. Thank you Berker for your patch.

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

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



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-02-06 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:


--
versions: +Python 3.5 -Python 3.4

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Ethan Furman

New submission from Ethan Furman:

enum34, the Enum backport, specifically uses `protocol=HIGHEST_PROTOCOL`, while 
the current enum tests just use the default.

Running the enum34 test expose an issue with pickle protocol 4:

==
ERROR: test_subclasses_with_getnewargs (__main__.TestEnum)
--
Traceback (most recent call last):
  File test_enum.py, line 1022, in test_subclasses_with_getnewargs
self.assertEqual(loads(dumps(NI5, protocol=HIGHEST_PROTOCOL)), 5)
_pickle.PicklingError: Can't pickle class 
'__main__.TestEnum.test_subclasses_with_getnewargs.locals.NamedInt': 
attribute lookup TestEnum.test_subclasses_with_getnewargs.locals.NamedInt on 
__main__ failed

==
ERROR: test_tuple_subclass (__main__.TestEnum)
--
Traceback (most recent call last):
  File test_enum.py, line 1100, in test_tuple_subclass
self.assertTrue(loads(dumps(SomeTuple.first, protocol=HIGHEST_PROTOCOL)) is 
SomeTuple.first)
_pickle.PicklingError: Can't pickle enum 'SomeTuple': attribute lookup 
TestEnum.test_tuple_subclass.locals.SomeTuple on __main__ failed

--
messages: 210419
nosy: alexandre.vassalotti, ethan.furman, pitrou
priority: high
severity: normal
stage: test needed
status: open
title: Enum tests fail with pickle protocol 4
type: behavior
versions: Python 3.4

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage: test needed - needs patch

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



[issue20499] Rounding errors with statistics.variance

2014-02-06 Thread Oscar Benjamin

Changes by Oscar Benjamin oscar.j.benja...@gmail.com:


--
nosy: +wolma

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Pickle tests should test all protocols in range(pickle.HIGHEST_PROTOCOL + 1).

--
nosy: +serhiy.storchaka

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Ethan Furman

Ethan Furman added the comment:

Working on fixing tests now.  Not sure I can fix pickle (at least not in time 
for RC1).

--

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



[issue3158] Doctest fails to find doctests in extension modules

2014-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c964b6b83720 by Zachary Ware in branch 'default':
Issue #3158: Provide a couple of fallbacks for in case a method_descriptor
http://hg.python.org/cpython/rev/c964b6b83720

--

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



[issue20535] run_tests.py: Work around issues 20355 and 20361

2014-02-06 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

Tools/scripts/run_tests.py contains:

def main(regrtest_args):
args = [sys.executable,
'-W', 'default',  # Warnings set to 'default'
'-bb',# Warnings about bytes/bytearray
'-E', # Ignore environment variables
]


As described in issues #20355 and #20361, -bb fails to enable BytesWarning 
errors.

I suggest to include a small workaround, which will be deleted in Python 3.5. I 
attach patch.

--
components: Tests
files: run_tests.py.patch
keywords: patch
messages: 210423
nosy: Arfrever, serhiy.storchaka
priority: normal
severity: normal
status: open
title: run_tests.py: Work around issues 20355 and 20361
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file33948/run_tests.py.patch

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



[issue20029] asyncio.SubprocessProtocol is missing

2014-02-06 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/issue20029
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3158] Doctest fails to find doctests in extension modules

2014-02-06 Thread Zachary Ware

Zachary Ware added the comment:

Done.

--
resolution:  - fixed
stage: commit review - committed/rejected
status: open - closed

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



[issue20451] os.exec* mangles argv on windows (splits on spaces, etc)

2014-02-06 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
nosy: +zach.ware

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



[issue20429] 3.3.4rc1 install deleted Windows taskbar icons

2014-02-06 Thread Zachary Ware

Changes by Zachary Ware zachary.w...@gmail.com:


--
nosy: +zach.ware

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Those tracebacks don't correspond to line numbers in the stdlib enum.py.

Regardless, the two tests fail understandably: they define a class in the local 
namespace and then monkeypatch globals() with it, but don't adjust the 
__qualname__.

--

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Ethan Furman

Ethan Furman added the comment:

Thanks, Antoine, that was what I needed.

--
assignee:  - ethan.furman
keywords: +patch
stage: needs patch - patch review
Added file: http://bugs.python.org/file33949/issue20534.stoneleaf.01.patch

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



[issue20536] statistics._decimal_to_ratio() produces non-integer ratio

2014-02-06 Thread Stefan Krah

New submission from Stefan Krah:

As I understand, _decimal_to_ratio() should always produce an
integer ratio.  But it does not for positive exponents:

 import statistics
 statistics.mean([Decimal(100), Decimal(200)])
Decimal('150')
 statistics.mean([Decimal(1e2), Decimal(2e2)])
Traceback (most recent call last):
  File stdin, line 1, in module
  File /usr/local/lib/python3.4/statistics.py, line 308, in mean
return _sum(data)/n
  File /usr/local/lib/python3.4/statistics.py, line 166, in _sum
total += Fraction(n, d)
  File /usr/local/lib/python3.4/fractions.py, line 163, in __new__
raise TypeError(both arguments should be 
TypeError: both arguments should be Rational instances
 
 statistics._decimal_to_ratio(Decimal(1e2)) 
(1, 0.01)
 1e2.as_integer_ratio()
(100, 1)

--
components: Library (Lib)
messages: 210427
nosy: skrah, stevenjd
priority: high
severity: normal
stage: needs patch
status: open
title: statistics._decimal_to_ratio() produces non-integer ratio
type: behavior
versions: Python 3.4

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



[issue20537] logging exc_info parameter should accept exception instances

2014-02-06 Thread Yury Selivanov

New submission from Yury Selivanov:

A bunch of logging methods accept optional parameter exc_info, that is supposed 
to be either 'True' or a tuple of three elements (type, exc, tb).

If, however, someone passes an actual exception instance, Logger._log function 
will interpret it as True and get the current exception from sys.exc_info, 
ignoring the passed exception completely.

Attached is a patch that fixes this: if exc_info is an instance of 
BaseException, Logger._log creates the tuple out of it automatically.

--
files: logging_01.patch
keywords: patch
messages: 210428
nosy: vinay.sajip, yselivanov
priority: normal
severity: normal
status: open
title: logging exc_info parameter should accept exception instances
type: enhancement
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file33950/logging_01.patch

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



[issue19352] unittest loader barfs on symlinks

2014-02-06 Thread Kevin M. Turner

Changes by Kevin M. Turner acapno...@users.sourceforge.net:


--
nosy: +acapnotic

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Ethan Furman

Ethan Furman added the comment:

Serhiy, the minimum supported pickle protocol is 2.  Now testing all protocols 
from 2 to HIGHEST_PROTOCOL, inclusive.

--

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 35f57ab9389b by Ethan Furman in branch 'default':
Close issue20534: test_enum now tests all supported pickle protocols (2 - 
HIGHEST_PROTOCOL, inclusive).
http://hg.python.org/cpython/rev/35f57ab9389b

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - committed/rejected
status: open - closed

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



[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2014-02-06 Thread Vajrasky Kok

Changes by Vajrasky Kok sky@speaklikeaking.com:


Removed file: http://bugs.python.org/file33944/clinic_gc_v2.patch

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



[issue19662] smtpd.py should not decode utf-8

2014-02-06 Thread Duke Dougal

Duke Dougal added the comment:

Is there a workaround for this as I'd like to just be receiving binary data 
from SMTPD. I'm new to this system - is this scheduled for fixing in Python 3.4?

--
nosy: +Duke.Dougal

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



[issue19662] smtpd.py should not decode utf-8

2014-02-06 Thread R. David Murray

R. David Murray added the comment:

Unfortunately I did not get to this before the 3.4 beta release, so no, it 
won't be fixed in 3.4.

You can work around it by overriding collect_incoming_data in your subclass and 
doing data.decode('ascii', 'surrogateescape') instead of str(data, 'utf-8'), 
and then doing mydata.encode('ascii', 'surrogateescape') at the point where you 
want to turn the data back into binary.

--

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



[issue20520] Readline test in test_codecs is broken

2014-02-06 Thread Ned Deily

Ned Deily added the comment:

The change has broken the builds, for example, 
http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/1197.

[ 29/389] test_codecs
Assertion failed: (maxchar = 0x100), function _PyUnicode_CheckConsistency, 
file Objects/unicodeobject.c, line 410.
Fatal Python error: Aborted

Current thread 0x7fff71296cc0 (most recent call first):
  File /Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/codecs.py, 
line 494 in read
  File /Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/codecs.py, 
line 548 in readline
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_codecs.py,
 line 169 in test_readline
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/case.py, 
line 574 in run
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/case.py, 
line 622 in __call__
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py, 
line 125 in run
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py, 
line 87 in __call__
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py, 
line 125 in run
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py, 
line 87 in __call__
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py, 
line 125 in run
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/suite.py, 
line 87 in __call__
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/unittest/runner.py,
 line 168 in run
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/support/__init__.py,
 line 1685 in _run_suite
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/support/__init__.py,
 line 1719 in run_unittest
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py, 
line 1277 in lambda
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py, 
line 1278 in runtest_inner
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py, 
line 967 in runtest
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py, 
line 532 in main
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py, 
line 1565 in main_in_temp_cwd
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py, 
line 1590 in module
  File /Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py, 
line 86 in _run_code
  File /Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py, 
line 171 in _run_module_as_main
Traceback (most recent call last):
  File /Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py, 
line 171, in _run_module_as_main
__main__, mod_spec)
  File /Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/runpy.py, 
line 86, in _run_code
exec(code, run_globals)
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/__main__.py, 
line 3, in module
regrtest.main_in_temp_cwd()
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py, 
line 1565, in main_in_temp_cwd
main()
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/regrtest.py, 
line 738, in main
raise Exception(Child error on {}: {}.format(test, result[1]))
Exception: Child error on test_codecs: Exit code -6
make: *** [buildbottest] Error 1

--
assignee:  - serhiy.storchaka
nosy: +benjamin.peterson, georg.brandl, larry, ned.deily
priority: normal - release blocker
resolution: fixed - 
stage: committed/rejected - needs patch
status: closed - open

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



[issue20534] Enum tests fail with pickle protocol 4

2014-02-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

But why the minimum supported pickle protocol is 2? Here is a patch which makes 
enums pickleable with all protocols.

--
Added file: http://bugs.python.org/file33952/enum_pickle.patch

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



[issue20537] logging exc_info parameter should accept exception instances

2014-02-06 Thread Vinay Sajip

Vinay Sajip added the comment:

I believe it's too late for feature changes in 3.4, so removing it from 
versions.

--
assignee:  - vinay.sajip
versions:  -Python 3.4

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



[issue20537] logging exc_info parameter should accept exception instances

2014-02-06 Thread Vinay Sajip

Vinay Sajip added the comment:

It would be good if the patch addressed documentation changes, too :-)

--

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



[issue20530] Change the text signature format (again) to be more robust

2014-02-06 Thread Larry Hastings

Larry Hastings added the comment:

Thanks for noticing the (/), that's fixed.

Yes, the signature for type() was wrong.  type() can accept either one 
parameter or three parameters--in other words, it uses optional groups.  And we 
can't represent optional groups in an inspect.Signature signature in 3.4.  And 
I assert that it's better to not have a signature than to have a wrong 
signature.  So I've removed it.

I'm interested in your other minor stuff.  I'll try and leave the patch alone 
this time :)

If you apply diff #2, you'll have a failure in test_inspect.  This is because 
there's a bug in inspect.Signature that it would take too long to fix, and I 
have to leave right now-ish.  I changed the tests so they expect the correct 
results, but they get the wrong results at the moment.
Hopefully we can fix this really quickly.

--

Yuri: This change uncovered a lurking bug in inspect.Signature that I'm hoping 
you can fix.  I could probably figure it out given enough time but I won't have 
time to look at it for about 24 hours.

Now that type() doesn't have a signature, I have discovered that some of the 
logic in Signature is wrong.  

   class C(type): pass
   print(str(inspect.signature(C)))

The signature of that *should* be the same as type().  But inspect.signature() 
reports the signature as '()'.

The reason this happens: inspect.Signature gets to the for base in mro case 
for handling classes.  The first base it tries is type(), but type() doesn't 
have a public signature so it keeps going.  The next class in the MRO is 
object(), which has a signature of (), so it uses that.

It shouldn't keep going!  I'm 99% certain that the first entry in the MRO will 
always be callable.  (Is it possible to have a type in Python that isn't 
callable?)

I *think* what it should do is: simply try the first entry in the MRO.  If that 
has a signature, return it.  If it doesn't have a signature, inspect.Signature 
should raise ValueError.

I also *think* that all the code after this comment:
# No '__text_signature__' was found for the 'obj' class.
should be removed.  If C doesn't define its own __new__ or __init__, and its 
base class doesn't have __call__, then the signature of C *is* the signature of 
its base class.  If inspect.Signature can't read that signature, then it can't 
return a signature for C.

--
Added file: 
http://bugs.python.org/file33953/larry.even.newerer.signature.syntax.2.diff

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