[issue11783] email parseaddr and formataddr should be IDNA aware

2014-06-10 Thread Milan Oberkirch

Milan Oberkirch added the comment:

Ping :)

--
nosy: +zvyn

___
Python tracker 

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



[issue21703] IDLE: Test UndoDelegator

2014-06-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

cls.percolator.close() cut leaks in half.

test_idle leaked [237, 237, 237, 237] references, sum=948
test_idle leaked [95, 97, 97, 97] memory blocks, sum=386

test_idle leaked [130, 130, 130, 130] references, sum=520
test_idle leaked [60, 62, 62, 62] memory blocks, sum=246

I prefixed name with 'x' and all leaks disappeared. When I run the test, a tk 
box is left. My guess is that something is being created with 
tkinter._default_root as master. I do not think it is in UndoDelegator, so I 
would look at Percolator, WidgetDirector, Delegator, and the new test file. 

---
See review comment for increasing coverage to about 80%, which is very good.

---
When unittest call precedes htest.run call, need exit=False or htest is skipped 
by unittest exiting process. Part of testing is running tests from module. Even 
with the addition, htest is not running right (buttons in main windows are not 
right). The might be an effect of the unittest not being properly terminated. 
It is still true after I added the missing re import. Htest runs fine by 
itself. See #21624 for changes.  Revised code:

def _undo_delegator(parent):  # htest #
import re
import tkinter as tk
from idlelib.Percolator import Percolator
root = tk.Tk()
root.title("Test UndoDelegator")
width, height, x, y = list(map(int, re.split('[x+]', parent.geometry(
root.geometry("+%d+%d"%(x, y + 150))

text = tk.Text(root)
text.config(height=10)
text.pack()
text.focus_set()
p = Percolator(text)
d = UndoDelegator()
p.insertfilter(d)

undo = tk.Button(root, text="Undo", command=lambda:d.undo_event(None))
undo.pack(side='left')
redo = tk.Button(root, text="Redo", command=lambda:d.redo_event(None))
redo.pack(side='left')
dump = tk.Button(root, text="Dump", command=lambda:d.dump_event(None))
dump.pack(side='left')

root.mainloop()

if __name__ == "__main__":
import unittest
unittest.main('idlelib.idle_test.test_undodelegator', verbosity=2,
  exit=False)
from idlelib.idle_test.htest import run
run(_undo_delegator)

--

___
Python tracker 

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



[issue19561] request to reopen Issue837046 - pyport.h redeclares gethostname() if SOLARIS is defined

2014-06-10 Thread Thomas Klausner

Changes by Thomas Klausner :


--
nosy: +wiz

___
Python tracker 

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



[issue21624] Idle: polish htests

2014-06-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Refinement 1: in doing coverage for UndoDelegator, I noticed that the htest 
function is counted as missing (uncovered). Both of the following in 
.coveragerc work to ignore the block: name prefix; comment suffix.
def htest_.*:
.*# htest #
The second is more practical for alphabetical order in htest. It is also less 
work to change. The particular form marks it as not a normal comment.

Refinement 2: put all imports that are specific to the htest function at the 
top of the function. Since the function is only called once per process, there 
is no efficiency consideration. I decided that after the tkinter import at the 
top got me (wasting time) looking through UndoDelegator for a widget call that 
might be the source of the leak. The changes can wait until we edit the file 
anyway, or at least write a test.

However, the docstring at the top of htest.py should be changed.

--

___
Python tracker 

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



[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Dmitry Korchemny

Dmitry Korchemny added the comment:

I think that the situation when you want start numbering from 0 is rather 
common, especially when you need to define bit fields as enumeration or when 
you need to implement an interface with other languages (e.g., C).

--

___
Python tracker 

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



[issue21715] Chaining exceptions at C level

2014-06-10 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

The proposed patch introduces new private function which chains previously 
fetched and current exceptions. This will help in correct implementing at C 
level an equivalent of following Python idioms:

try:
...
finally:
...

and

try:
...
except:
...
raise

--
components: Interpreter Core
messages: 220236
nosy: benjamin.peterson, pitrou, serhiy.storchaka, stutzbach
priority: normal
severity: normal
stage: patch review
status: open
title: Chaining exceptions at C level
type: enhancement
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue21714] Path.with_name can construct invalid paths

2014-06-10 Thread Antony Lee

New submission from Antony Lee:

Path.with_name can be used to construct paths containing slashes as name 
contents (rather than as separators), as demonstrated below.

$ python -c 'from pathlib import Path; 
print(Path("foo").with_name("bar/baz").name)'
bar/baz

This should be changed to either raise a ValueError, or behave like path.parent 
/ new_name.  Given the amount of checking in the related with_suffix method 
(and the fact that the second option can be readily implemented by hand), the 
first option seems preferable.

--
components: Library (Lib)
messages: 220235
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Path.with_name can construct invalid paths
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue21677] Exception context set to string by BufferedWriter.close()

2014-06-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Antoine. Perhaps this non-trivial code for chaining exceptions 
(repeated at least three times) should be extracted to separate function.

--
status: open -> closed

___
Python tracker 

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



[issue21712] fractions.gcd failure

2014-06-10 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue21677] Exception context set to string by BufferedWriter.close()

2014-06-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a98fd4eeed40 by Serhiy Storchaka in branch '3.4':
PyErr_NormalizeException doesn't like being called with an exception set
http://hg.python.org/cpython/rev/a98fd4eeed40

New changeset 55c50c570098 by Serhiy Storchaka in branch 'default':
PyErr_NormalizeException doesn't like being called with an exception set
http://hg.python.org/cpython/rev/55c50c570098

--

___
Python tracker 

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



[issue21310] ResourceWarning when open() fails with io.UnsupportedOperation: File or stream is not seekable

2014-06-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a98fd4eeed40 by Serhiy Storchaka in branch '3.4':
PyErr_NormalizeException doesn't like being called with an exception set
http://hg.python.org/cpython/rev/a98fd4eeed40

New changeset 55c50c570098 by Serhiy Storchaka in branch 'default':
PyErr_NormalizeException doesn't like being called with an exception set
http://hg.python.org/cpython/rev/55c50c570098

--

___
Python tracker 

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



[issue21712] fractions.gcd failure

2014-06-10 Thread Tim Peters

Tim Peters added the comment:

The gcd function is documented as taking two integer arguments:

"Return the greatest common divisor of the integers a and b."

I'm -0 on generalizing it, and also -0 on burning cycles to enforce the 
restriction to integer arguments.  It's just silly ;-)

--
nosy: +tim.peters

___
Python tracker 

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



[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-06-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Backwards from default was the old, svn way. We hg we merge forward within 3.x. 
"ready to commit to 3.4 and merge to 3.5.". If you started with 3.5, then you 
would have to do a null merge of the 3.4 patch into 3.5. It is occasionally 
done when people decide to backport to maintenacne sometime later, but much 
nastier.

Feel free to ask any other questions.

Review: pep8, yes!.

--

___
Python tracker 

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



[issue21713] a mistype comment in PC/pyconfig.h

2014-06-10 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +steve.dower, zach.ware

___
Python tracker 

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



[issue21712] fractions.gcd failure

2014-06-10 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +mark.dickinson, rhettinger

___
Python tracker 

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



[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-06-10 Thread Tal Einat

Tal Einat added the comment:

Thanks for reviewing this Terry! See two small comments in the review of your 
patch.

Indeed, I would very much like for this to be my first commit. Thanks for the 
pointer WRT backporting to 2.7. Just to make sure, I should commit to 3.5 
(default) and then backport to 3.4 and 2.7, correct?

--

___
Python tracker 

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



[issue21712] fractions.gcd failure

2014-06-10 Thread Pablo Acosta

Pablo Acosta added the comment:

I will correct myself one more time (hopefully the last):



while b:
a, b = b, round(a % b, 10)
return a



a   b   fractions.gcd   proposed_algorithm
--
48  18  6   6
3   4   1   1
2.7 107.3   8.881784197001252e-16   0.1
200.1   333 2.842170943040401e-14   0.3
0.050.023.469446951953614e-18   0.01

--

___
Python tracker 

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



[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' :


--
keywords: +3.2regression -needs review, patch
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue20035] Clean up Tcl library discovery in Tkinter on Windows

2014-06-10 Thread Zachary Ware

Zachary Ware added the comment:

Ok, here's another attempt which should address both points you raised, Serhiy. 
 I don't have an East-Asian Windows install to test on (and wouldn't be able to 
read anything to do the test, anyway!), but I did test with a prefix containing 
East-Asian characters on US-English Windows.  Command Prompt had issues and 
MSVC choked completely, so I could not run with the debugger for that test, but 
Python and Tkinter seemed to work fine.

--
Added file: http://bugs.python.org/file35563/issue20035.v5.diff

___
Python tracker 

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



[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 001895c39fea by Giampaolo Rodola' in branch 'default':
fix issue #17552: add socket.sendfile() method allowing to send a file over a 
socket by using high-performance os.sendfile() on UNIX. Patch by Giampaolo 
Rodola'·
http://hg.python.org/cpython/rev/001895c39fea

--
nosy: +python-dev

___
Python tracker 

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



[issue21696] Idle: test syntax of configuration files

2014-06-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The format paragraph entry in main.def is being moved to extensions.def, so 
don't test for it in main.def.

--
nosy: +jesstess

___
Python tracker 

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



[issue20577] IDLE: Remove FormatParagraph's width setting from config dialog

2014-06-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I updated the patch to match a change, since you posted this, from 70 to 72 in 
.def and 'maxformatwidth' to ' limit' in formatparagraph. I also added a 
'guard' value of 72 in case GetOption returns None (as it did before I changed 
the option name). I checked that there is no instance of 'para' other than in 
'param' in configDialog and ran the tests. I view the attached as ready to 
commit to 3.4 and merge to 3.5. In 2.7, the patch applies cleanly to the files 
other that configDialog. The problem there is  frameEncoding stuff in the 
context that is not present in 3.4 or the patch.  I would just hand edit the 
2.7 file to delete the lines again.

Would you like to push this as your first commit?

--
nosy: +terry.reedy
stage:  -> commit review
type:  -> enhancement
versions: +Python 2.7 -Python 3.3
Added file: http://bugs.python.org/file35562/formatpara - 20577-34.diff

___
Python tracker 

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



[issue21713] a mistype comment in PC/pyconfig.h

2014-06-10 Thread Joseph Shen

New submission from Joseph Shen:

in the source file PC/pyconfig.h at line 393 there is a mistype

this is the origin file
==
/* VC 7.1 has them and VC 6.0 does not.  VC 6.0 has a version number of 1200.
   Microsoft eMbedded Visual C++ 4.0 has a version number of 1201 and doesn't
   define these.
   If some compiler does not provide them, modify the #if appropriately. */
#if defined(_MSC_VER)
#if _MSC_VER > 1300
#define HAVE_UINTPTR_T 1
#define HAVE_INTPTR_T 1
#else
/* VC6, VS 2002 and eVC4 don't support the C99 LL suffix for 64-bit integer 
literals */
#define Py_LL(x) x##I64
#endif  /* _MSC_VER > 1200  */
#endif  /* _MSC_VER */

#endif

==
>>> #endif /* _MSC_VER > 1200 */
should be
<<< #endif /* _MSC_VER > 1300 */
or left empty

--
components: Windows
messages: 220223
nosy: Joseph.Shen
priority: normal
severity: normal
status: open
title: a mistype comment in PC/pyconfig.h
type: compile error
versions: Python 3.5

___
Python tracker 

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



[issue21712] fractions.gcd failure

2014-06-10 Thread Pablo Acosta

Pablo Acosta added the comment:

Actually probably int(round(a%b)) would be better.

--

___
Python tracker 

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



[issue21712] fractions.gcd failure

2014-06-10 Thread Pablo Acosta

New submission from Pablo Acosta:

The Greatest Common Divisor (gcd) algorithm sometimes breaks because the modulo 
operation does not always return a strict integer number, but one very, very 
close to one. This is enough to drive the algorithm astray from that point on.

Example:

>> import fractions
>> fractions.gcd(48, 18)
>> 6

Which is corret, but:

>> fractions.gcd(2.7, 107.3)
>> 8.881784197001252e-16

when the answer should be 1. The fix seems simple, just cast the mod() 
operation in the algorithm:

while b:
   a, b = b, int(a%b)
return a

--
components: Library (Lib)
messages: 220221
nosy: pacosta
priority: normal
severity: normal
status: open
title: fractions.gcd failure
type: behavior
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

OK then, I'll trust your judgement. I'll use 8K as the default and will commit 
the patch soon.

--
assignee:  -> giampaolo.rodola

___
Python tracker 

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



[issue3905] subprocess failing in GUI applications on Windows

2014-06-10 Thread Mark Lawrence

Mark Lawrence added the comment:

*facepalm* looks like I've run it with the wrong exe, sorry about the noise :-(

--

___
Python tracker 

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-10 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue3905] subprocess failing in GUI applications on Windows

2014-06-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Mark, you did not specify which of the variations you tried ;-) I reproduce as 
I said in my last message.

C:\Programs\Python34>pythonw -m idlelib

Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [
>>> import subprocess
>>> p = subprocess.Popen(["python", "-c", "print(32)"], stdin=None,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Traceback (most recent call last):
...
_winapi.DUPLICATE_SAME_ACCESS)
OSError: [WinError 6] The handle is invalid

Change startup command from pythonw to python, no error, and it runs.
>>> p.communicate()
(b'32\r\n', b'')

--
stage: test needed -> needs patch
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3

___
Python tracker 

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



[issue21711] Remove site-python support

2014-06-10 Thread Ned Deily

Ned Deily added the comment:

The patch has one problem with OS X framework builds.  This fixes it:

--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -240,7 +240,7 @@
   sysconfig.get_config_var("PYTHONFRAMEWORK"),
   sys.version[:3],
   'site-packages')
-self.assertEqual(dirs[2], wanted)
+self.assertEqual(dirs[1], wanted)
 elif os.sep == '/':
 # OS X non-framwework builds, Linux, FreeBSD, etc
 self.assertEqual(len(dirs), 1)

Otherwise, LGTM

--
nosy: +ned.deily

___
Python tracker 

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



[issue21677] Exception context set to string by BufferedWriter.close()

2014-06-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

gdb backtrace:

#0  0x7711ff79 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x77123388 in __GI_abort () at abort.c:89
#2  0x77118e36 in __assert_fail_base (fmt=0x7726a718 "%s%s%s:%u: 
%s%sAssertion `%s' failed.\n%n", 
assertion=assertion@entry=0x670d48 "(result != ((void *)0) && 
!PyErr_Occurred()) || (result == ((void *)0) && PyErr_Occurred())", 
file=file@entry=0x670332 "Objects/abstract.c", line=line@entry=2077, 
function=function@entry=0x670ff6 <__PRETTY_FUNCTION__.10598> 
"PyObject_Call") at assert.c:92
#3  0x77118ee2 in __GI___assert_fail (
assertion=0x670d48 "(result != ((void *)0) && !PyErr_Occurred()) || (result 
== ((void *)0) && PyErr_Occurred())", 
file=0x670332 "Objects/abstract.c", line=2077, function=0x670ff6 
<__PRETTY_FUNCTION__.10598> "PyObject_Call") at assert.c:101
#4  0x00461e89 in PyObject_Call (func=0x727013d8, 
arg=0x76638ef8, kw=0x0) at Objects/abstract.c:2076
#5  0x00462f62 in PyObject_CallFunctionObjArgs 
(callable=0x727013d8) at Objects/abstract.c:2362
#6  0x00463c46 in PyObject_IsSubclass (derived=0x911140 
<_PyExc_OSError>, cls=0x911140 <_PyExc_OSError>)
at Objects/abstract.c:2617
#7  0x005cc591 in PyErr_NormalizeException (exc=0x7ffdc578, 
val=0x7ffdc580, tb=0x7ffdc588)
at Python/errors.c:254
#8  0x00639bc6 in buffered_close (self=0x77e6ad78, args=0x0) at 
./Modules/_io/bufferedio.c:552


It seems PyErr_NormalizeException doesn't like being called with an exception 
set.

--

___
Python tracker 

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



[issue12989] Consistently handle path separator in Py_GetPath on Windows

2014-06-10 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions: +Python 3.4, Python 3.5 -Python 2.6, Python 3.1

___
Python tracker 

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



[issue1253] IDLE - Percolator overhaul

2014-06-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Tal could have. Anyway, I made a note to look at this or #1252 if I want to 
understand Percolator or Delegator or think about changing them.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue21711] Remove site-python support

2014-06-10 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Support for "site-python" directories in site.py was deprecated in 3.4 and 
slated for removal in 3.5. Attached patch does the remove.

--
components: Library (Lib)
files: sitepython.patch
keywords: patch
messages: 220214
nosy: pitrou
priority: normal
severity: normal
stage: patch review
status: open
title: Remove site-python support
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35561/sitepython.patch

___
Python tracker 

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



[issue21677] Exception context set to string by BufferedWriter.close()

2014-06-10 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This changeset crashes test_io here:

test_close_error_on_close (test.test_io.CBufferedReaderTest) ... python: 
Objects/abstract.c:2091: PyObject_Call: Assertion `(result != ((void *)0) && 
!PyErr_Occurred()) || (result == ((void *)0) && PyErr_Occurred())' failed.
Fatal Python error: Aborted

Current thread 0x7ff1b3264740 (most recent call first):
  File "/home/antoine/cpython/default/Lib/test/test_io.py", line 793 in 
test_close_error_on_close
  File "/home/antoine/cpython/default/Lib/unittest/case.py", line 577 in run
  File "/home/antoine/cpython/default/Lib/unittest/case.py", line 625 in 
__call__
  File "/home/antoine/cpython/default/Lib/unittest/suite.py", line 125 in run
  File "/home/antoine/cpython/default/Lib/unittest/suite.py", line 87 in 
__call__
  File "/home/antoine/cpython/default/Lib/unittest/suite.py", line 125 in run
  File "/home/antoine/cpython/default/Lib/unittest/suite.py", line 87 in 
__call__
  File "/home/antoine/cpython/default/Lib/unittest/suite.py", line 125 in run
  File "/home/antoine/cpython/default/Lib/unittest/suite.py", line 87 in 
__call__
  File "/home/antoine/cpython/default/Lib/unittest/runner.py", line 168 in run
  File "/home/antoine/cpython/default/Lib/test/support/__init__.py", line 1724 
in _run_suite
  File "/home/antoine/cpython/default/Lib/test/support/__init__.py", line 1758 
in run_unittest
  File "/home/antoine/cpython/default/Lib/test/regrtest.py", line 1277 in 

  File "/home/antoine/cpython/default/Lib/test/regrtest.py", line 1278 in 
runtest_inner
  File "/home/antoine/cpython/default/Lib/test/regrtest.py", line 978 in runtest
  File "/home/antoine/cpython/default/Lib/test/regrtest.py", line 763 in main
  File "/home/antoine/cpython/default/Lib/test/regrtest.py", line 1562 in 
main_in_temp_cwd
  File "/home/antoine/cpython/default/Lib/test/__main__.py", line 3 in 
  File "/home/antoine/cpython/default/Lib/runpy.py", line 85 in _run_code
  File "/home/antoine/cpython/default/Lib/runpy.py", line 170 in 
_run_module_as_main
Abandon

--
nosy: +ned.deily
status: closed -> open

___
Python tracker 

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



[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Ethan Furman

Ethan Furman added the comment:

Playing devil's advocate:

The issue is not so much the keystrokes saved as the improvement in reading and 
understanding what was intended.  If you are happy with starting at 1 the idiom 
is easy to both write, read, and understand; but if you want some other 
starting number you have to uglify your code with parenthesis, .methods, and 
add an extra iterator which you have to manually re-sync if you later add 
another name...

I think that is the real issue -- not keystrokes.

--

___
Python tracker 

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



[issue21667] Clarify status of O(1) indexing semantics of str objects

2014-06-10 Thread Jim Jewett

Jim Jewett added the comment:

And even my rewrite showed path dependency; a slight further improvement is to 
re-order encoding ahead of bytes.  I also added a paragraph that I hope answers 
the speed issue.

Proposal:

A string is a sequence of Unicode code points.  Strings can include any 
sequence of code points, including some which are semantically meaningless, or 
explicitly undefined.

Python doesn't have a :c:type:`char` type; a single code point is represented 
as a string of length ``1``.  The built-in function :func:`chr` translates an 
integer in the range ``U+ - U+10`` to the corresponding length ``1`` 
string object, and :func:`ord` does the reverse.

:meth:`str.encode` provides a concrete representation (in the given text 
encoding) as a :class:`bytes` object suitable for transport and communication 
with non-Python utilities.  :meth:`bytes.decode` decodes such byte sequences 
into text strings.

.. impl-detail::  There are no methods exposing the internal representation of 
code points within a string.  While the C-API provides some additional 
constraints on CPython, other implementations are free to use any 
representation that treats code points (as opposed to either code units or some 
normalized form of characters) as the unit of measure.

--

___
Python tracker 

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



[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Eli Bendersky

Eli Bendersky added the comment:

Is it really worthwhile to complicate the API for the sake of providing a less 
flexible solution for rare cases that saves a few keystrokes?

--

___
Python tracker 

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



[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Ethan Furman

Ethan Furman added the comment:

That is certainly nicer than the current idiom:

  Animal = Enum('Animal', zip('ant bee cat dog'.split(), range(4)))

--
assignee:  -> ethan.furman

___
Python tracker 

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



[issue13101] Module Doc viewer closes when browser window closes on Windows 8

2014-06-10 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy:  -brian.curtin

___
Python tracker 

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



[issue21667] Clarify status of O(1) indexing semantics of str objects

2014-06-10 Thread Jim Jewett

Jim Jewett added the comment:

I think the new wording is an improvement, but keeping the changes minimal left 
it in an awkward in-between state.

Proposal:

A string is a sequence of Unicode code points.  Strings can include any 
sequence of code points, including some which are semantically meaningless, or 
explicitly undefined.

Python doesn't have a :c:type:`char` type; a single code point is represented 
as a string of length ``1``.  The built-in function :func:`chr` translates an 
integer in the range ``U+ - U+10`` to the corresponding length ``1`` 
string object, and :func:`ord` does the reverse.

:meth:`str.encode` provides a concrete representation (as :class:`bytes` in the 
given text encoding) suitable for transport and communication with non-Python 
utilities.  :meth:`bytes.decode` decodes such byte sequences into text strings.

--
nosy: +Jim.Jewett

___
Python tracker 

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



[issue13101] Module Doc viewer closes when browser window closes on Windows 8

2014-06-10 Thread Mark Lawrence

Mark Lawrence added the comment:

This works fine for me with Windows 7, Python 3.4.1 and Firefox 29.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue3905] subprocess failing in GUI applications on Windows

2014-06-10 Thread Mark Lawrence

Mark Lawrence added the comment:

I cannot reproduce this problem with 3.4.1 or 3.5.a0 on Windows 7.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue12989] Consistently handle path separator in Py_GetPath on Windows

2014-06-10 Thread Mark Lawrence

Mark Lawrence added the comment:

If this is a security issue shouldn't it have been actioned?  If not does the 
type move to behaviour or what?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue13111] Error 2203 when installing Python/Perl?

2014-06-10 Thread Martin v . Löwis

Martin v. Löwis added the comment:

Indeed, closing.

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

___
Python tracker 

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



[issue13111] Error 2203 when installing Python/Perl?

2014-06-10 Thread Mark Lawrence

Mark Lawrence added the comment:

Can it be assumed that there is no interest in this issue as it targets Windows 
8 Developer Preview?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Charles-François Natali

Charles-François Natali added the comment:

>> I agree, but both points are addressed by sendfile()
>
> I'm talking about send(), not sendfile().
> Please remember that send() will be used as the default on Windows or when 
> non-regular files are passed to the function. My argument is about 
> introducing an argument to use specifically with send(), not sendfile().

Which makes even less sense if it's not needed for sendfile() :-)
I really don't see why we're worrying so much about allocating 8K or
16K buffers, it's really ridiculous. For example, buffered file I/O
uses a default block size of 8K. We're not targeting embedded systems.

--

___
Python tracker 

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-10 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

The issue is similar to Issue20884.

--

___
Python tracker 

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



[issue8503] smtpd SMTPServer does not allow domain filtering

2014-06-10 Thread Milan Oberkirch

Milan Oberkirch added the comment:

I see no reason to restrict the filtering possibilities to the domain, so I 
added a method "validate_recipient_address" wich gets an address of the form 
"local-part@domain" and returns `True`.
SMTPChannel.smtp_RCPT checks any address with this method before appending it 
to the recipient list and returns "554 ..." as proposed by Mike if the 
validation failed.

--
components: +email
keywords: +patch
nosy: +barry, jesstess, r.david.murray, zvyn
Added file: http://bugs.python.org/file35560/issue8503.patch

___
Python tracker 

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



[issue1253] IDLE - Percolator overhaul

2014-06-10 Thread Mark Lawrence

Mark Lawrence added the comment:

Can somebody please close as requested in msg210212, thanks.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue21710] --install-base option ignored?

2014-06-10 Thread Antoine Pitrou

New submission from Antoine Pitrou:

Looking at the source code in distutils.command.installer, it seems the 
"--install-base" option is ignored, since it is always overwritten, either in 
finalize_unix() or finalize_other().

(I haven't tried to check this on the command line, though)

--
components: Distutils
messages: 220198
nosy: dstufft, eric.araujo, pitrou
priority: normal
severity: normal
status: open
title: --install-base option ignored?
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

___
Python tracker 

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



[issue694339] IDLE: Dedenting with Shift+Tab

2014-06-10 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The fact that Tab indents regions as well as lines seems not be documented. 
This should be added to Automatic Indentation (which should just be 
Indentation) with BackTab doc addition if not sooner.

On Windows, 3.4.1, shift-tab is the same as tab. The same is true in Notepad 
(not a model to follow), but Notepad++ dedents. Doing the same in Idle, within 
the editor, seems like a reasonable request.

The unplanned and strange OSX behavior should be fixed.

>From the patch, I would gather that the problem is that tk hard-codes 
>shift-Tab to <>). 
>(This works but is currently useless in the dialogs.) If that is so, why do 
>they currently act the same (for me) in the editor? Does tk automatically 
>rebind Tab to indent-region in a text widget?

Tal: option 2 seems like something to try. If Shift-Tab is user configurable 
(and I think baked-in like Tab would be ok), then it should be *added* in both 
places. You might be right about break, except this is a moot point if the code 
is wrong.

--
assignee: kbk -> 
versions: +Python 2.7, Python 3.4, Python 3.5 -Python 3.2

___
Python tracker 

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



[issue21709] logging.__init__ assumes that __file__ is always set

2014-06-10 Thread Marc-Andre Lemburg

New submission from Marc-Andre Lemburg:

It is not when freezing the logging package, so any use of the logging package 
fails:

>>> import logging
Traceback (most recent call last):
  File "", line 1, in 
  File "/importlib/_bootstrap.py", line 2237, in _find_and_load
  File "/importlib/_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "/importlib/_bootstrap.py", line 1200, in _load_unlocked
  File "/importlib/_bootstrap.py", line 1129, in _exec
  File "/importlib/_bootstrap.py", line 1359, in exec_module
  File "/logging/__init__.py", line 61, in 
NameError: name '__file__' is not defined

This is the code in question:

#
# _srcfile is used when walking the stack to check when we've got the first
# caller stack frame.
#
if hasattr(sys, 'frozen'): #support for py2exe
_srcfile = "logging%s__init__%s" % (os.sep, __file__[-4:])
else:
_srcfile = __file__
_srcfile = os.path.normcase(_srcfile)

Note the special case for py2exe. But this doesn't really help, since frozen 
modules don't have the __file__ attribute set - at least not when generated 
with Tools/freeze.

PS: This is with Python 3.4.1.

--
components: Interpreter Core, Library (Lib)
messages: 220196
nosy: lemburg
priority: normal
severity: normal
status: open
title: logging.__init__ assumes that __file__ is always set
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

> I agree, but both points are addressed by sendfile()

I'm talking about send(), not sendfile(). 
Please remember that send() will be used as the default on Windows or when 
non-regular files are passed to the function. My argument is about introducing 
an argument to use specifically with send(), not sendfile().
In summary:

sendfile(self, file, offset=0, count=None, send_blocksize=16384):
""" 
[...]
If os.sendfile() is not available (e.g. Windows) or file is not 
a regular file socket.send() will be used instead.
[...]
*send_blocksize* is the maximum number of bytes to transmit at 
one time in case socket.send() is used.
"""

> Honestly, we should deprecate the whole ftplib module :-)
> More seriously, it's really low-level, I don't understand the point of
> this whole callback-based API:
> FTP.storbinary(command, file[, blocksize, callback, rest])
> Why not simply a:
> FTP.store(source, target, binary=True)

ftplib module API may be a bit rusty but there's a reason why it was designed 
like that.
'callback' and 'blocksize' arguments can be used to implement progress bars, 
in-place transformations of the source file's data and bandwidth throttling (by 
having your callback 'sleep' if more than N bytes were sent in the last 
second). 'rest' argument is necessary for resuming uploads.
I'm not saying ftplib API cannot be improved: maybe we can provide two higher 
level "put" and "get" methods but please let's discuss that into another thread.

--

___
Python tracker 

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



[issue3068] IDLE - Add an extension configuration dialog

2014-06-10 Thread Ned Deily

Ned Deily added the comment:

I did a very quick test on OS X.  Comments:

1. In keeping with Apple Human Interface Guidelines, the "Options" menu is 
different on OS X: the "Configure IDLE" menu item appears as a "Preferences" 
menu item in the "IDLE" application menu row.  So, as it stands, adding the 
"Configure Extensions" menu item doesn't work on OS X due to the menu 
tailoring.  This addition makes it work:

diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py
--- a/Lib/idlelib/macosxSupport.py
+++ b/Lib/idlelib/macosxSupport.py
@@ -141,9 +141,9 @@
 # menu
 del Bindings.menudefs[-1][1][0:2]

-# Remove the 'Configure' entry from the options menu, it is in the
+# Remove the 'Configure IDLE' entry from the options menu, it is in the
 # application menu as 'Preferences'
-del Bindings.menudefs[-2][1][0:2]
+del Bindings.menudefs[-2][1][0]

 menubar = Menu(root)
 root.configure(menu=menubar)

2. The buttons on the Extensions Configuration aren't wide enough for the 
default Cocoa Tk 8.5 text on them (Ok, Apply, Cancel) so they overflow to two 
lines.  In contrast, the similar buttons on the IDLE Preferences window display 
correctly.

3. On the ParenMatch configuration tab, there is a text box for "style" (with 
the default value of "expression").  There is no clue to what this means or 
what values are valid.  Could this be some other widget if there is a known set 
of value?

4. If the enabled setting for CallTips are changed while edit windows are open, 
the existing windows are not affected.  New edit windows do observe the new 
setting.  (I didn't try this with other extensions.)

5. The appearance of the boolean options on the extensions panels vary among 
the various Tk's supported on OS X and none of the result are totally 
satisfactory; see the images in the zipfile upload.  I think the main problem 
is that the widgets are centered in the frame.  For Cocoa Tk, this results in a 
check box towards the left and the label centered in the remaining space.  For 
the other two (Carbon 8.4 and X11, it results in a very wide toggle button.


It would probably be a good idea for someone who uses IDLE to do a more 
thorough review of all of the options on all of the Tk variants we support 
(e.g. Windows, Linux X11, OS X Cocoa, OS X Carbon, OS X X11).  As this quick 
look shows, there are almost always differences (subtle and not so subtle) 
among them.

--
nosy: +ned.deily
Added file: http://bugs.python.org/file35559/issue3068_osx.zip

___
Python tracker 

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



[issue694339] IDLE: Dedenting with Shift+Tab

2014-06-10 Thread Tal Einat

Tal Einat added the comment:

Regarding Roger Serwy's comment, we could either:

1) normalize the event descriptions using MultiCall's _parse_sequence() and 
_triplet_to_sequence() functions
2) remove any Shift-Tab bindings from <>

I suggest #2.


Regarding the patch itself:

1) Was the existing default binding of Ctrl-[ removed on purpose in 
Lib/idlelib/configHandler.py? According to the same patch, in the config files 
it is still there along-side the new Shift-Tab binding. At the least, these 
should be consistent.

2) In the code re-binding the <> event in EditorWindow.py, 
shouldn't there be a "break" at the end of the "if" clause inside the "for" 
loop?

--
nosy: +taleinat

___
Python tracker 

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



[issue18039] dbm.open(..., flag="n") does not work and does not give a warning

2014-06-10 Thread R. David Murray

R. David Murray added the comment:

Yeah, hopefully you are right.  (I didn't mean to reopen the issue, by the way).

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Charles-François Natali

Charles-François Natali added the comment:

> I agree it is not necessary for sendfile() (you were right).

Good we agree :-)

> Do not introducing it for send(), though, poses some questions.
> For instance, should we deprecate or ignore 'blocksize' argument in ftplib as 
> well?

Honestly, we should deprecate the whole ftplib module :-)
More seriously, it's really low-level, I don't understand the point of
this whole callback-based API:
FTP.storbinary(command, file[, blocksize, callback, rest])Why not simply a:
FTP.store(source, target, binary=True)

If you have time and it interest you, trying to improve this module
would be great :-)

> Generally speaking, when using send() there are circumstances where you might 
> want to adjust the number of bytes to read from the file, for instance:
>
> - 1: set a small blocksize (say 512 bytes) on systems where you have a 
> limited amount of memory
>
> - 2: set a big blocksize (say 256000) in order to speed up the transfer / use 
> less CPU cycles; on very fast networks (e.g. LANs) this may result in a 
> considerable speedup (I know 'cause I conducted these kind of tests in 
> pyftpdlib: https://code.google.com/p/pyftpdlib/issues/detail?id=94).

I agree, but both points are addressed by sendfile(): internally, the
kernel will use whatever block size it likes, depending on the source
file type, page size, target NIC ring buffer size.

So to reply to your above question, I wouldn't feel too bad about
simply ignoring the blocksize argument in e.g. shutil.copyfile(). For
ftplib, it's a little harder since we're supposed to support an
optional callback, but calling a callback for every block will drive
performance down...

So I'd really like it if you could push the version without the
blocksize, and then we'll see (and hopefully fix the non-sensical
libraries that depend on it).

--

___
Python tracker 

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



[issue19840] shutil.move(): Add ability to use custom copy function to allow to ignore metadata

2014-06-10 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
title: The is no way to tell shutil.move to ignore metadata -> shutil.move(): 
Add ability to use custom copy function to allow to ignore metadata

___
Python tracker 

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



[issue18039] dbm.open(..., flag="n") does not work and does not give a warning

2014-06-10 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
resolution: fixed -> 
stage: resolved -> patch review

___
Python tracker 

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



[issue18039] dbm.open(..., flag="n") does not work and does not give a warning

2014-06-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think the chance of this is pretty small. I can imagine that some people use 
default, 'r' or 'w' mode unintentionally, and all works for them even when 
database is missed (for example our tests do this). But it is very unlikely 
that someone use the 'n' mode and expect that database will be not cleaned.

--
resolution:  -> fixed
stage: patch review -> resolved

___
Python tracker 

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



[issue18564] Integer overflow in socketmodule

2014-06-10 Thread Michele Orrù

Michele Orrù added the comment:

ping.

--

___
Python tracker 

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



[issue18039] dbm.open(..., flag="n") does not work and does not give a warning

2014-06-10 Thread R. David Murray

R. David Murray added the comment:

Isn't this change going to cause unexpected data loss for (possibly mythical) 
people depending on the existing behavior?  At an absolute minimum it needs an 
entry in the What's New porting section, but I'm wondering if a deprecation 
period is more appropriate.

--
nosy: +r.david.murray
resolution: fixed -> 
stage: resolved -> patch review
status: closed -> open

___
Python tracker 

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



[issue18039] dbm.open(..., flag="n") does not work and does not give a warning

2014-06-10 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Committed original Claudiu's patch (issue18039.patch) with minor changes. For 
warnings I opened separate issue (issue21708) because patch becomes too large.

Thank you Claudiu for your patch.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Steve Dower

Steve Dower added the comment:

> So have platform.win32_ver() return the true version is acceptable ?
>
> Note that the platform module is meant for identifying the platform,
> not the runtime compatibility environment, so it has a slightly
> different target audience

Yes, and that's exactly the reason it's acceptable.

--

___
Python tracker 

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



[issue21708] Deprecate nonstandard behavior of a dumbdbm database

2014-06-10 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Unlike to other dbm implementations, a dumpdbm database is always opened for 
update, and will be created if it does not exist.  We can fix this discrepancy 
and implement common behavior for 'r' and 'w' modes, but this will change 
current behavior and some deprecation period is needed.

Here is a patch (based on patch by Claudiu Popa, submitted in issue18039), 
which adds deprecation warnings for cases when current behavior differs from 
desired: invalid values for the flag parameter (will raise ValueError in 
future), opening non-existing database in 'r' or 'w' mode (will raise 
dbm.dumb.error), modifying a database opened for reading only (will raise 
dbm.dumb.error).

This patch needs approving by other core developer.

--
assignee: serhiy.storchaka
files: dbm_dumb_deprecations.patch
keywords: patch
messages: 220185
nosy: Claudiu.Popa, r.david.murray, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Deprecate nonstandard behavior of a dumbdbm database
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file35558/dbm_dumb_deprecations.patch

___
Python tracker 

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



[issue18039] dbm.open(..., flag="n") does not work and does not give a warning

2014-06-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f944f44ee41 by Serhiy Storchaka in branch 'default':
Issue #18039: dbm.dump.open() now always creates a new database when the
http://hg.python.org/cpython/rev/3f944f44ee41

--
nosy: +python-dev

___
Python tracker 

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



[issue15993] Windows: 3.3.0-rc2.msi: test_buffer fails

2014-06-10 Thread Steve Dower

Steve Dower added the comment:

test_memoryview_assign seems to be okay, but the two test_lzma tests still fail 
with the same message. Both pass without PGO.

I'll get in touch with the PGO team and try and get it fixed. I haven't 
checked, but it looks consistent with Stefan's analysis of the disassembly. My 
guess it that it's a broken space optimisation rather than a speed one - our 
release builds normally optimise everything for speed but PGO will often decide 
that space is better.

--

___
Python tracker 

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



[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

On 10.06.2014 18:28, Steve Dower wrote:
> 
> The one concession that the Windows dev is willing to make is for logging, in 
> which case the version number should be read as a string from a standard DLL 
> like kernel32.dll. This would be appropriate for platform.win32_ver(), but as 
> discussed above, not for sys.getwindowsversion().

So have platform.win32_ver() return the true version is acceptable ?

Note that the platform module is meant for identifying the platform,
not the runtime compatibility environment, so it has a slightly
different target audience.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker 

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



[issue21655] Write Unit Test for Vec2 class in the Turtle Module

2014-06-10 Thread Lita Cho

Lita Cho added the comment:

Here are the tests for Vec2D. I have also included the tests for TNavigator 
here as well as they are all going into the same test module.

--
Added file: http://bugs.python.org/file35557/test_turtle_textonly.py

___
Python tracker 

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



[issue15993] Windows: 3.3.0-rc2.msi: test_buffer fails

2014-06-10 Thread Stefan Krah

Stefan Krah added the comment:

"I ran a quick test with profile-guided optimization (PGO, pronounced "pogo"), 
which has supposedly been improved since VC9, and
+saw a very unscientific 20% speed improvement on pybench.py and 10% size 
reduction in python35.dll. I'm not sure what we used
+to get from VC9, but it certainly seems worth enabling provided it doesn't 
break anything. (Interestingly, PGO decided that
+only 1% of functions needed to be compiled for speed. Not sure if I can find 
out which ones those are but if anyone's
+interested I can give it a shot?)"


Steve, could you try if this is still a problem?  The (presumed) Visual Studio 
bug only surfaced when training the instrumented build with "profiletests.txt" 
and then doing the PGupdate build.


I'm opening this issue again and leave it at release blocker for 3.5.

--
nosy: +steve.dower
status: closed -> open
type:  -> compile error
versions: +Python 3.5 -Python 3.3

___
Python tracker 

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



[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2014-06-10 Thread Ned Deily

Ned Deily added the comment:

Thanks for the report, the test case, and the patch.  It would be helpful if 
the informal test could be turned into a patch as a formal test in 
Lib/test_cgi.py and if, Matthias, you would be willing to sign the PSF 
contributor agreement if you haven't already 
(https://www.python.org/psf/contrib/contrib-form/).

--
nosy: +ned.deily

___
Python tracker 

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



[issue21688] Improved error msg for make.bat htmlhelp

2014-06-10 Thread Zachary Ware

Zachary Ware added the comment:

Fixed!  I tweaked the message a bit and added errorlevel setting before 
committing.

Thanks for the report and patch!

--
assignee:  -> zach.ware
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.4

___
Python tracker 

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



[issue21688] Improved error msg for make.bat htmlhelp

2014-06-10 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b841b80e6421 by Zachary Ware in branch '3.4':
Issue #21688: Give informative error message when hhc.exe cannot be found.
http://hg.python.org/cpython/rev/b841b80e6421

New changeset e5594e751a2e by Zachary Ware in branch 'default':
Issue #21688: Merge with 3.4
http://hg.python.org/cpython/rev/e5594e751a2e

--
nosy: +python-dev

___
Python tracker 

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



[issue21707] modulefinder uses wrong CodeType signature in .replace_paths_in_code()

2014-06-10 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

The fix is easy. Simply change the call to:

return types.CodeType(co.co_argcount, co.co_kwonlyargcount,
  co.co_nlocals, co.co_stacksize,
  co.co_flags, co.co_code, tuple(consts),
  co.co_names, co.co_varnames,
  new_filename, co.co_name,
  co.co_firstlineno, co.co_lnotab,
  co.co_freevars, co.co_cellvars)

(ie. add the missing argument)

--

___
Python tracker 

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



[issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry

2014-06-10 Thread Jean-Paul Calderone

Jean-Paul Calderone added the comment:

Please see http://bugs.python.org/issue21652 for a regression introduced by 
this change.

--
nosy: +exarkun

___
Python tracker 

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



[issue21707] modulefinder uses wrong CodeType signature in .replace_paths_in_code()

2014-06-10 Thread Marc-Andre Lemburg

New submission from Marc-Andre Lemburg:

Here's the code:

def replace_paths_in_code(self, co):
...
return types.CodeType(co.co_argcount, co.co_nlocals, co.co_stacksize,
 co.co_flags, co.co_code, tuple(consts), co.co_names,
 co.co_varnames, new_filename, co.co_name,
 co.co_firstlineno, co.co_lnotab,
 co.co_freevars, co.co_cellvars)

Compare this to the code_new() C API doc string (and code):

code(argcount, kwonlyargcount, nlocals, stacksize, flags, codestring,\n\
  constants, names, varnames, filename, name, firstlineno,\n\
  lnotab[, freevars[, cellvars]])

The kwonlyargcount is missing in the call used in .replace_paths_in_code().


The bug surfaces when trying to use the "-r" option of the freeze.py tool:

Traceback (most recent call last):
  File "freeze.py", line 504, in 
main()
  File "freeze.py", line 357, in main
mf.import_hook(mod)
  File 
"/home/lemburg/egenix/projects/PyRun/tmp-3.4-ucs2/lib/python3.4/modulefinder.py",
 line 123, in import_hook
q, tail = self.find_head_package(parent, name)
  File 
"/home/lemburg/egenix/projects/PyRun/tmp-3.4-ucs2/lib/python3.4/modulefinder.py",
 line 179, in find_head_package
q = self.import_module(head, qname, parent)
  File 
"/home/lemburg/egenix/projects/PyRun/tmp-3.4-ucs2/lib/python3.4/modulefinder.py",
 line 272, in import_module
m = self.load_module(fqname, fp, pathname, stuff)
  File 
"/home/lemburg/egenix/projects/PyRun/tmp-3.4-ucs2/lib/python3.4/modulefinder.py",
 line 303, in load_module
co = self.replace_paths_in_code(co)
  File 
"/home/lemburg/egenix/projects/PyRun/tmp-3.4-ucs2/lib/python3.4/modulefinder.py",
 line 569, in replace_paths_in_code
consts[i] = self.replace_paths_in_code(consts[i])
  File 
"/home/lemburg/egenix/projects/PyRun/tmp-3.4-ucs2/lib/python3.4/modulefinder.py",
 line 575, in replace_paths_in_code
co.co_freevars, co.co_cellvars)
TypeError: an integer is required (got type bytes)

--
components: Library (Lib)
keywords: 3.4regression
messages: 220174
nosy: lemburg
priority: normal
severity: normal
status: open
title: modulefinder uses wrong CodeType signature in .replace_paths_in_code()
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue17552] Add a new socket.sendfile() method

2014-06-10 Thread Giampaolo Rodola'

Giampaolo Rodola' added the comment:

Charles, Antoine, any final thought about this given the reasons I stated 
above? If you're still -1 about adding 'send_blocksize' argument I guess I can 
get rid of it and perhaps reintroduce it later if we see there's demand for it.

--

___
Python tracker 

___
___
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-06-10 Thread Milan Oberkirch

Changes by Milan Oberkirch :


--
nosy: +jesstess, zvyn

___
Python tracker 

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



[issue14758] SMTPServer of smptd does not support binding to an IPv6 address

2014-06-10 Thread Milan Oberkirch

Milan Oberkirch added the comment:

Fixed it.

--
Added file: http://bugs.python.org/file35556/smtpd_061014.patch

___
Python tracker 

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



[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Steve Dower

Steve Dower added the comment:

The two 'correct' options are adding the manifest or doing nothing (based on a 
number of very passionate internal discussions I was able to dig up).

Without the manifest, various APIs may behave differently - it's the new way 
that Windows decides whether to apply compatibility settings. If 
sys.getwindowsversion() reports the actual version number and people are 
getting old APIs through ctypes, more problems are caused than solved. The 
theory is that if you apply the manifest, you are stating that you have tested 
the application against that version (helped by having an unpredictable scheme 
without supersets).

Without the manifest, Python is always going to be run in compatibility mode 
for Windows 8, even as breaking changes are made in the future.

It would be quite a reasonable position (compatibility-wise) for Python to only 
manifest for the earliest version it supported. That way, all Python scripts 
are going to behave the same on later versions of Windows, even as the API 
behaviours change. (Note that I'm not advocating this - I'm just trying to 
explain the rationale better than our docs have done it.)

But basically, the result of sys.getwindowsversion() should return the 
behaviour that the program is going to get. If python.exe itself is manifested 
to support Windows 8.1, or if it isn't, both the behaviour and the version will 
match. IMO, and the Windows dev's opinion, this is correct.


The one concession that the Windows dev is willing to make is for logging, in 
which case the version number should be read as a string from a standard DLL 
like kernel32.dll. This would be appropriate for platform.win32_ver(), but as 
discussed above, not for sys.getwindowsversion().

Reading the registry is not recommended - the argument is roughly "GetVersionEx 
was being misused so we 'fixed' it, and when the registry starts being misused 
we'll 'fix' that too".

--

___
Python tracker 

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



[issue18039] dbm.open(..., flag="n") does not work and does not give a warning

2014-06-10 Thread Claudiu.Popa

Changes by Claudiu.Popa :


Added file: http://bugs.python.org/file3/issue18039_3.patch

___
Python tracker 

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



[issue19840] The is no way to tell shutil.move to ignore metadata

2014-06-10 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Thanks, David. The new version of the patch is attached.

--
Added file: http://bugs.python.org/file35554/issue19840_1.patch

___
Python tracker 

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



[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Zachary Ware

Changes by Zachary Ware :


--
nosy: +barry, eli.bendersky, ethan.furman

___
Python tracker 

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



[issue21706] Add base for enumerations (Functional API)

2014-06-10 Thread Dmitry Korchemny

New submission from Dmitry Korchemny:

In enum module the functional API for enum creation has the following signature:
Enum(value='NewEnumName', names=<...>, *, module='...', qualname='...', 
type=)

so that the numeration always starts with 1. In some cases it is convenient to 
start numbering from other base, e.g., 0. It would be of great help to add an 
additional parameter, say start, to make the following call possible:

Animal = Enum('Animal', 'ant bee cat dog', start = 0)

--
components: Library (Lib)
messages: 220169
nosy: dkorchem
priority: normal
severity: normal
status: open
title: Add base for enumerations (Functional API)
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue21703] IDLE: Test UndoDelegator

2014-06-10 Thread STINNER Victor

STINNER Victor added the comment:

You should call "cls.percolator.close()" in your tearDownClass() method, before 
cls.text.destroy().

By the way, I prefer to assign an attribute to None instead of using "del 
obj.attr".

--
nosy: +haypo

___
Python tracker 

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



[issue21705] cgi.py: Multipart with more than one file is misparsed

2014-06-10 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +r.david.murray
stage:  -> test needed

___
Python tracker 

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



[issue19838] test.test_pathlib.PosixPathTest.test_touch_common fails on FreeBSD with ZFS

2014-06-10 Thread Claudiu.Popa

Claudiu.Popa added the comment:

Here's a patch that marks those tests as expected failures if the source 
checkout is inside a zfs container. It uses `df -t zfs`, it was the easiest way 
I could find to detect that we are running from a zfs container.

--
keywords: +patch
Added file: http://bugs.python.org/file35553/issue19838.patch

___
Python tracker 

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



[issue19840] The is no way to tell shutil.move to ignore metadata

2014-06-10 Thread R. David Murray

R. David Murray added the comment:

Review comments added.  Patch looks good after the doc fixes.  We also need a 
whatsnew entry.

--

___
Python tracker 

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



[issue21309] Confusing "see also" for generic C-level __init__ methods in help output

2014-06-10 Thread R. David Murray

R. David Murray added the comment:

I'm hoping that with Argument Clinic we can do better, but I haven't played 
with it so I'm not sure.

--

___
Python tracker 

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



[issue21705] cgi.py: Multipart with more than one file is misparsed

2014-06-10 Thread Matthias Urlichs

New submission from Matthias Urlichs:

This code in cgi.py makes no sense whatsoever:

842 if line.endswith(b"--") and last_line_lfend:
843 strippedline = line.strip()
844 if strippedline == next_boundary:
845 break
846 if strippedline == last_boundary:
847 self.done = 1
848 break

(Pdb) p next_boundary
b'--testdata'
(Pdb) p last_boundary
b'--testdata--'
(Pdb) 

The net effect of this is that parsing a multipart with more than one file in 
it is impossible, as the first file's reader will gobble up the remainder of 
the input.

Patch attached.

I guess it's a safe bet that no sane person even uses cgi.py any more, 
otherwise this would have been discovered a bit sooner.

--
components: Library (Lib)
files: cgi.patch2
messages: 220164
nosy: smurfix
priority: normal
severity: normal
status: open
title: cgi.py: Multipart with more than one file is misparsed
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35552/cgi.patch2

___
Python tracker 

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



[issue19143] Finding the Windows version getting messier (detect windows 8.1?)

2014-06-10 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

I don't have a Windows 8.1 handy, but if "ver" reports the correct version, why 
not have platform.win32_ver() use _syscmd_ver() in case the other APIs report 
"6.2.9200" and then have win32_ver() the higher version ?!

FWIW: I don't think we should add anything to the python.exe manifest to have 
it report the correct version. This could potentially break other APIs. AFAIK, 
MS just used this "trick" to prevent having existing 8.0 applications fail on 
8.1 due to the minor version bump. I suppose they'll undo this with the next 
official Windows release.

--

___
Python tracker 

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



[issue21704] _multiprocessing module builds incorrectly when POSIX semaphores are disabled

2014-06-10 Thread Arfrever Frehtes Taifersar Arahesis

Changes by Arfrever Frehtes Taifersar Arahesis :


--
keywords: +patch

___
Python tracker 

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



[issue21704] _multiprocessing module builds incorrectly when POSIX semaphores are disabled

2014-06-10 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

When POSIX semaphores are disabled (e.g. by unmounting /dev/shm on a Linux 
system), then _multiprocessing module builds with undefined symbol 
_PyMp_sem_unlink:

$ ./configure ...
...
checking whether POSIX semaphores are enabled... no
...
$ make
...
building '_multiprocessing' extension
creating build/temp.linux-x86_64-3.5/tmp/cpython/Modules/_multiprocessing
x86_64-pc-linux-gnu-gcc -pthread -fPIC -Wno-unused-result 
-Werror=declaration-after-statement -DNDEBUG -march=core2 -O2 -fno-ident -pipe 
-ggdb3 -Wall -Wpointer-sign -IModules/_multiprocessing -I./Include -I. 
-IInclude -I/usr/local/include -I/tmp/cpython/Include -I/tmp/cpython -c 
/tmp/cpython/Modules/_multiprocessing/multiprocessing.c -o 
build/temp.linux-x86_64-3.5/tmp/cpython/Modules/_multiprocessing/multiprocessing.o
x86_64-pc-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,--as-needed 
-Wl,--gc-sections -Wl,--hash-style=gnu -Wl,--sort-common 
build/temp.linux-x86_64-3.5/tmp/cpython/Modules/_multiprocessing/multiprocessing.o
 -L. -L/usr/local/lib -lpython3.5m -o 
build/lib.linux-x86_64-3.5/_multiprocessing.cpython-35m.so
*** WARNING: renaming "_multiprocessing" since importing it failed: 
build/lib.linux-x86_64-3.5/_multiprocessing.cpython-35m.so: undefined symbol: 
_PyMp_sem_unlink
...
Following modules built successfully but were removed because they could not be 
imported:
_multiprocessing


This problem was introduced in Python 3.4. This problem is absent in older 
versions of Python.
Potential fix:

--- Modules/_multiprocessing/multiprocessing.c
+++ Modules/_multiprocessing/multiprocessing.c
@@ -129,5 +129,7 @@
 {"send", multiprocessing_send, METH_VARARGS, ""},
 #endif
+#ifndef POSIX_SEMAPHORES_NOT_ENABLED
 {"sem_unlink", _PyMp_sem_unlink, METH_VARARGS, ""},
+#endif
 {NULL}
 };

--
assignee: sbt
components: Extension Modules
keywords: easy
messages: 220162
nosy: Arfrever, jnoller, sbt
priority: normal
severity: normal
stage: patch review
status: open
title: _multiprocessing module builds incorrectly when POSIX semaphores are 
disabled
type: compile error
versions: Python 3.4, Python 3.5

___
Python tracker 

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



[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2014-06-10 Thread Matthias Urlichs

Matthias Urlichs added the comment:

This also applies to 3.4 and 3.5.

--
versions: +Python 3.4, Python 3.5

___
Python tracker 

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



[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2014-06-10 Thread Matthias Urlichs

Matthias Urlichs added the comment:

Patch attached.

--
keywords: +patch
Added file: http://bugs.python.org/file35551/cgi.patch

___
Python tracker 

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



[issue20504] cgi.FieldStorage, multipart, missing Content-Length

2014-06-10 Thread Matthias Urlichs

Matthias Urlichs added the comment:

Actually, the problem is cgi.py around line 550:

clen = -1
if 'content-length' in self.headers:
try:
clen = int(self.headers['content-length'])
except ValueError:
pass
if maxlen and clen > maxlen:
raise ValueError('Maximum content length exceeded')
self.length = clen
if self.limit is None and clen:
self.limit = clen

… so self.limit ends up being -1 instead of None. :-/

Somebody please change this test to

if self.limit is None and clen >= 0:

--
nosy: +smurfix

___
Python tracker 

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



[issue21703] IDLE: Test UndoDelegator

2014-06-10 Thread Saimadhav Heblikar

New submission from Saimadhav Heblikar:

Adds test for UndoDelegator class in idlelib.UndoDelegator.


With the help of Victor Stinner on IRC, I managed to reduce the refleak, but 
the current status is:
saimadhav@debian:~/dev/34-cpython$ ./python -m test -R 3:3 -uall test_idle
[1/1] test_idle
beginning 6 repetitions
123456
..
test_idle leaked [237, 237, 237] references, sum=711
test_idle leaked [95, 98, 97] memory blocks, sum=290
1 test failed:
test_idle

Any hint on where the problem is?
---
I also plan to cover other helper classes in the same UndoDelegator file.

--
components: IDLE
files: test-undodelegator.diff
keywords: patch
messages: 220158
nosy: jesstess, sahutd, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Test UndoDelegator
versions: Python 2.7, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file35550/test-undodelegator.diff

___
Python tracker 

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



[issue13247] under Windows, os.path.abspath returns non-ASCII bytes paths as question marks

2014-06-10 Thread STINNER Victor

STINNER Victor added the comment:

> I've read this entire issue and can't see that much can be done

My patch can be applied in Python 3.5 to notice immediatly users that filenames 
cannot be encoded to the ANSI code page. Anyway, bytes filenames are deprecated 
(emit a DeprecationWarning warning) in the os module on Windows since Python 
3.3.

--

___
Python tracker 

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



[issue21515] Use Linux O_TMPFILE flag in tempfile.TemporaryFile?

2014-06-10 Thread STINNER Victor

Changes by STINNER Victor :


--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



  1   2   >