[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

When the verbose variable is imported, it is impossible to control verbosity at 
runtime. It will be better to import only the test.support module itself and 
then access its attribute.

--

___
Python tracker 

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



[issue22157] FAIL: test_with_pip (test.test_venv.EnsurePipTest)

2014-08-07 Thread Ned Deily

Ned Deily added the comment:

Thanks. So apparently the _ctypes module failed to build.  You should rerun 
"make" in your build directory and find out why _ctypes.so fails to build.  If 
necessary, show the results here.

--

___
Python tracker 

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



[issue22157] FAIL: test_with_pip (test.test_venv.EnsurePipTest)

2014-08-07 Thread snehal

snehal added the comment:

1oot@beta1:/home/ubuntu/python/Python-3.4.1#  cd 
/home/ubuntu/python/Python-3.4. 
esot@beta1:/home/ubuntu/python/Python-3.4.1# ./python -E -S -m test -v 
test_ctyp 
== CPython 3.4.1 (default, Aug 7 2014, 02:08:49) [GCC 4.8.2]
==   Linux-3.13.0-32-generic-ppc64le-with-debian-jessie-sid little-endian
==   hash algorithm: siphash24 64bit
==   /home/ubuntu/python/Python-3.4.1/build/test_python_1245
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=1, ignore_environment=1, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_ctypes
test_ctypes skipped -- No module named '_ctypes'
1 test skipped:
test_ctypes

-

== CPython 3.4.1 (default, Aug 7 2014, 02:08:49) [GCC 4.8.2]-m test -v 
test_venv 
==   Linux-3.13.0-32-generic-ppc64le-with-debian-jessie-sid little-endian
==   hash algorithm: siphash24 64bit
==   /home/ubuntu/python/Python-3.4.1/build/test_python_1248
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, 
dont_write_bytecode=0, no_user_site=0, no_site=1, ignore_environment=1, 
verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_venv
test_defaults (test.test_venv.BasicTest) ... ok
test_executable (test.test_venv.BasicTest) ... ok
test_executable_symlinks (test.test_venv.BasicTest) ... ok
test_isolation (test.test_venv.BasicTest) ... ok
test_overwrite_existing (test.test_venv.BasicTest) ... ok
test_prefixes (test.test_venv.BasicTest) ... ok
test_symlinking (test.test_venv.BasicTest) ... ok
test_unoverwritable_fails (test.test_venv.BasicTest) ... ok
test_upgrade (test.test_venv.BasicTest) ... ok
test_devnull_exists_and_is_empty (test.test_venv.EnsurePipTest) ... ok
test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok
test_no_pip_by_default (test.test_venv.EnsurePipTest) ... 
ok
test_with_pip (test.test_venv.EnsurePipTest) ... FAIL

==
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
--
Traceback (most recent call last):
  File "/home/ubuntu/python/Python-3.4.1/Lib/test/test_venv.py", line 352, in 
test_with_pip
with_pip=True)
subprocess.CalledProcessError: Command '['/tmp/tmp1_atkzms/bin/python', '-Im', 
'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ubuntu/python/Python-3.4.1/Lib/test/test_venv.py", line 358, in 
test_with_pip
self.fail(msg.format(exc, details))
AssertionError: Command '['/tmp/tmp1_atkzms/bin/python', '-Im', 'ensurepip', 
'--upgrade', '--default-pip']' returned non-zero exit status 1

**Subprocess Output**
Traceback (most recent call last):
  File "/home/ubuntu/python/Python-3.4.1/Lib/runpy.py", line 170, in 
_run_module_as_main
"__main__", mod_spec)
  File "/home/ubuntu/python/Python-3.4.1/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
  File "/home/ubuntu/python/Python-3.4.1/Lib/ensurepip/__main__.py", line 4, in 

ensurepip._main()
  File "/home/ubuntu/python/Python-3.4.1/Lib/ensurepip/__init__.py", line 209, 
in _main
default_pip=args.default_pip,
  File "/home/ubuntu/python/Python-3.4.1/Lib/ensurepip/__init__.py", line 116, 
in bootstrap
_run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/home/ubuntu/python/Python-3.4.1/Lib/ensurepip/__init__.py", line 40, 
in _run_pip
import pip
  File "/tmp/tmplglzwy2e/pip-1.5.6-py2.py3-none-any.whl/pip/__init__.py", line 
9, in 
  File "/tmp/tmplglzwy2e/pip-1.5.6-py2.py3-none-any.whl/pip/log.py", line 9, in 

  File 
"/tmp/tmplglzwy2e/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/__init__.py",
 line 2, in 
  File 
"/tmp/tmplglzwy2e/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/initialise.py",
 line 5, in 
  File 
"/tmp/tmplglzwy2e/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/ansitowin32.py",
 line 6, in 
  File 
"/tmp/tmplglzwy2e/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/winterm.py",
 line 2, in 
  File 
"/tmp/tmplglzwy2e/pip-1.5.6-py2.py3-none-any.whl/pip/_vendor/colorama/win32.py",
 line 7, in 
  File "/home/ubuntu/python/Python-3.4.1/Lib/ctypes/__init__.py", line 7, in 

from _ctypes import Union, Structure, Array
ImportError: No module named '_ctypes'


--
Ran 13 tests in 0.574s

FAILED (failures=1)
test test_venv failed
1 test failed:
test_venv

--

___
Python tracker 

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



[issue22171] stack smash when using ctypes/libffi to access union

2014-08-07 Thread Wesley Kerfoot

New submission from Wesley Kerfoot:

Description:
python 2.7.8 fails with a 'stack smashing detected' error and aborts when 
trying to access a C union using ctypes/libffi

Steps to reproduce:
See the contents of test.c and test.py in the attached file
gcc -c -fpic -Wall -Wextra -pedantic -Wpointer-arith -Werror -std=c99 -O0 
./test.c -o test.o
gcc -shared -o test.so test.o
python2 test.py

Also fails with clang instead of gcc.

OS: Linux frege 3.15.8-1-ARCH #1 SMP PREEMPT Fri Aug 1 08:51:42 CEST 2014 
x86_64 GNU/Linux
python2 version: 2.7.8
libffi version (OS wide version): 3.1-2
gcc version: 4.9.1
clang version: 3.4.2

I have tried rebuilding python with the included version of libffi (Arch 
normally uses a systemwide version).

Here is the PKGBUILD file Arch uses 
https://projects.archlinux.org/svntogit/packages.git/tree/python2/trunk/PKGBUILD?id=c319b32ada1506cf2bd48acc50649ae77a696c53

I have also reported this bug on their tracker since I am not sure if this is a 
bug in ctypes or libffi or both: https://bugs.archlinux.org/task/41502

--
components: ctypes
files: crash.log
messages: 225059
nosy: amaury.forgeotdarc, belopolsky, meador.inge, wjak56
priority: normal
severity: normal
status: open
title: stack smash when using ctypes/libffi to access union
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file36308/crash.log

___
Python tracker 

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



[issue22169] sys.tracebacklimit = 0 does not work as documented in 3.x

2014-08-07 Thread Ned Deily

Ned Deily added the comment:

This appears to be a duplicate of open Issue12276.

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> 3.x ignores sys.tracebacklimit=0

___
Python tracker 

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



[issue22170] Typo in iterator doc

2014-08-07 Thread Susan Tan

Susan Tan added the comment:

https://docs.python.org/2/tutorial/classes.html#iterators

--

___
Python tracker 

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



[issue22170] Typo in iterator doc

2014-08-07 Thread Susan Tan

New submission from Susan Tan:

Typo in last line: 

for line in open("myfile.txt"):
print line,

Instead there should be no extra "," character in "print line,"

--
assignee: docs@python
components: Documentation
messages: 225056
nosy: Susan, docs@python
priority: normal
severity: normal
status: open
title: Typo in iterator doc
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue22169] sys.tracebacklimit = 0 does not work as documented in 3.x

2014-08-07 Thread Orson Peters

New submission from Orson Peters:

According to the documentation of sys.tracebacklimit, setting it to 0 or less 
would assure "all traceback information is suppressed and only the exception 
type and value are printed".

This is not the case:

$ python -c "import sys; sys.tracebacklimit = 0; raise Exception()"
Exception

$ python3 -c "import sys; sys.tracebacklimit = 0; raise Exception()"
Traceback (most recent call last):
  File "", line 1, in 
Exception

--
components: Interpreter Core
messages: 225055
nosy: orlp
priority: normal
severity: normal
status: open
title: sys.tracebacklimit = 0 does not work as documented in 3.x
versions: 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



[issue22168] Turtle Graphics RawTurtle problem

2014-08-07 Thread Ned Deily

Ned Deily added the comment:

As a temporary workaround, you could edit turtle.py to revert that change, in 
other words, just search for and delete the whole "if sys.platform == 'darwin'" 
test:

diff -r d85fcf23549e Lib/turtle.py
--- a/Lib/turtle.py Tue Aug 05 14:02:11 2014 -0500
+++ b/Lib/turtle.py Thu Aug 07 19:58:25 2014 -0700
@@ -993,12 +993,6 @@
 self._colormode = _CFG["colormode"]
 self._keys = []
 self.clear()
-if sys.platform == 'darwin':
-# Force Turtle window to the front on OS X. This is needed because
-# the Turtle window will show behind the Terminal window when you
-# start the demo from the command line.
-cv._rootwindow.call('wm', 'attributes', '.', '-topmost', '1')
-cv._rootwindow.call('wm', 'attributes', '.', '-topmost', '0')

 def clear(self):
 """Delete all drawings and all turtles from the TurtleScreen.

The file is at 
/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py.

--

___
Python tracker 

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



[issue22168] Turtle Graphics RawTurtle problem

2014-08-07 Thread Ned Deily

Ned Deily added the comment:

It looks like the changes associated with Issue11571, released in 3.4.1, cause 
this problem when the program supplies its own Canvas object rather than 
relying on the turtle module to create a default one.

--
assignee:  -> ned.deily
nosy: +ned.deily
stage:  -> needs patch
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



[issue18979] Use argparse in the uu module

2014-08-07 Thread paul j3

paul j3 added the comment:

Reading through, but not testing, it looks like a faithful replacement.  The 
usage like will be a bit different.

Given optparse:

usage='usage: %prog [-d] [-t] [input [output]]

automatic argparse:

usage='usage: %prog [-d] [-t] [input] [output]

There is, however, a bugs issue about converting the '[..] [..]' into [..[..]].

Other than simplifying the handling of these positional arguments, this 
replacement doesn't add much.  

I haven't paid much attention to issues that replace other uses of optparse.  
Since that is no longer deprecated, I don't think there's a rush to replace 
them.

--

___
Python tracker 

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



[issue22167] iglob() has misleading documentation (does indeed store names internally)

2014-08-07 Thread Roy Smith

Roy Smith added the comment:

The thread that led to this started out with the use case of a directory that 
had 200k files in it.  If I ran iglob() on that and discovered that it had 
internally generated a list of all 200k names in memory at the same time, I 
would be pretty darn surprised, based on what the docs say now.

We're shooting for principle of least astonishment here.

--

___
Python tracker 

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



[issue22167] iglob() has misleading documentation (does indeed store names internally)

2014-08-07 Thread Steven D'Aprano

Steven D'Aprano added the comment:

I agree that the documentation could be improved, but it's not really *wrong*. 
Consider a glob like "spam/[abc]/*.txt". What iglob does is conceptually closer 
to:

(1) generate the list of files matching "spam/a/*.txt" and yield them;
(2) generate the list of files matching "spam/b/*.txt" and yield them;
(3) generate the list of files matching "spam/c/*.txt" and yield them

rather than:

(1) generate the list of files matching "spam/a/*.txt";
(2) append the files matching "spam/b/*.txt";
(3) append the files matching "spam/c/*.txt";
(4) finally yield them

(see the source code here: http://hg.python.org/cpython/file/3.4/Lib/glob.py ). 
I think the documentation is trying to say that iglob doesn't *always* store 
all the matching files, without implying that it *never* stores all the 
matching files. I can't think of a clean way to explain that, so a doc patch is 
welcome.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue22168] Turtle Graphics RawTurtle problem

2014-08-07 Thread Kent D. Lee

New submission from Kent D. Lee:

This is either a turtle graphics or tkinter problem. 

In Python 3.4 it appears that something in Turtle Graphics broke or at least 
changed. I get the following error when trying to run a program that works in 
Python 3.1 and 3.2.

Kent's Mac> python3.4 c4.py
Traceback (most recent call last):
  File "c4.py", line 283, in 
main()
  File "c4.py", line 277, in main
animApp = Connect4Application(root)
  File "c4.py", line 110, in __init__
self.buildWindow()
  File "c4.py", line 129, in buildWindow
theTurtle = turtle.RawTurtle(canvas)
  File 
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py", 
line 2534, in __init__
self.screen = TurtleScreen(canvas)
  File 
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py", 
line 1000, in __init__
cv._rootwindow.call('wm', 'attributes', '.', '-topmost', '1')
AttributeError: 'Canvas' object has no attribute '_rootwindow'
Kent's Mac> 

The code is attached. The error occurs on line 129 when trying to create a 
RawTurtle and provide it with a Canvas.

--
components: Tkinter
files: c4.py
messages: 225049
nosy: Kent.D..Lee
priority: normal
severity: normal
status: open
title: Turtle Graphics RawTurtle problem
versions: Python 3.4
Added file: http://bugs.python.org/file36307/c4.py

___
Python tracker 

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



[issue22167] iglob() has misleading documentation (does indeed store names internally)

2014-08-07 Thread Tim Chase

Changes by Tim Chase :


--
nosy: +Gumnos

___
Python tracker 

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



[issue22167] iglob() has misleading documentation (does indeed store names internally)

2014-08-07 Thread Roy Smith

New submission from Roy Smith:

For background, see:

https://mail.python.org/pipermail/python-list/2014-August/676291.html

In a nutshell, the iglob() docs say, "Return an iterator which yields the same 
values as glob() without actually storing them all simultaneously."  The 
problem is, internally, it calls os.listdir(), which apparently *does* store 
the entire list internally, defeating the whole purpose of iglob()

I recognize that iglob() is not going to get fixed in 2.7, but at least the 
documentation should be updated to point out that it doesn't really do what it 
says it does.  Or rather, it doesn't really not do what it says it doesn't :-)

--
assignee: docs@python
components: Documentation
messages: 225048
nosy: docs@python, roysmith
priority: normal
severity: normal
status: open
title: iglob() has misleading documentation (does indeed store names internally)
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue15907] move doctest test-data files into a subdirectory of Lib/test

2014-08-07 Thread Berker Peksag

Changes by Berker Peksag :


--
stage:  -> patch review

___
Python tracker 

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



[issue18979] Use argparse in the uu module

2014-08-07 Thread Mark Lawrence

Mark Lawrence added the comment:

@Paul what is your opinion of this patch?

--
nosy: +BreamoreBoy, paul.j3
versions: +Python 3.5 -Python 3.4

___
Python tracker 

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



[issue15428] add "Name Collision" section to argparse docs

2014-08-07 Thread paul j3

paul j3 added the comment:

On Stackoverflow a couple of posters have asked about nesting namespaces as a 
way of separating the parser and subparser arguments.

http://stackoverflow.com/questions/15782948
http://stackoverflow.com/questions/18668227

One solution that I rather like http://stackoverflow.com/a/18709860/901925

uses a custom Namespace class that recognizes a 'dest' like

p.add_argument('--deep', dest='test.doo.deep')

and produces

Nestedspace(foo='test', test=Nestedspace(bar='baz', 
doo=Nestedspace(deep='doodod')))

I wonder if a simplified version of this could be added to the Namespace 
section in the documentation.

There are 2 sides to the name conflict issue:

- what control does the programmer have over names (esp. when using [parents] 
and subparsers)?

- how does the programmer want to access the arguments in the resulting 
namespace?

--

___
Python tracker 

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



[issue11271] concurrent.futures.ProcessPoolExecutor.map() doesn't batch function arguments by chunks

2014-08-07 Thread Dan O'Reilly

Dan O'Reilly added the comment:

Here's an updated patch that adds documentation and Antoine's requested code 
changes.

--
Added file: http://bugs.python.org/file36306/map_chunksize_with_docs.patch

___
Python tracker 

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



[issue14365] argparse: subparsers, argument abbreviations and ambiguous option

2014-08-07 Thread paul j3

paul j3 added the comment:

Another issue dealing with abbreviations is close to being committed.

http://bugs.python.org/issue14910
argparse: disable abbreviation

--

___
Python tracker 

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



[issue20598] argparse docs: '7'.split() is confusing magic

2014-08-07 Thread paul j3

paul j3 added the comment:

For documentation, ['this','is','a','test'] might be a bit clearer than 'this 
is a test'.split().  But generating a list of strings by split is, I think, a 
pretty basic idiom.

But for testing purposes the split() version is a bit more robust because it is 
closer to what might appear in sys.argv.

In [196]: ['this','is','a','test'][-1] is 'test'
Out[196]: True

In [198]: 'this is a test'.split()[-1] is 'test'
Out[198]: False

That is, the 'id' of a string generated by a split is not the same as that of 
an explicit string.  sys.argv is created by a split in the shell and/or the 
interpreter, so it too will fail this 'is' test.

--
nosy: +paul.j3

___
Python tracker 

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



[issue18976] distutils/command/build_ext passes wrong linker flags

2014-08-07 Thread Roumen Petrov

Roumen Petrov added the comment:

more simple correction is attached to issue17219

--
nosy: +rpetrov

___
Python tracker 

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



[issue22060] Clean up ctypes.test, use unittest test discovery

2014-08-07 Thread Zachary Ware

Zachary Ware added the comment:

Here's a new patch; have I missed anything else that ought to be in setUpModule?

--
Added file: http://bugs.python.org/file36305/issue22060.diff

___
Python tracker 

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



[issue22166] test_codecs "leaking" references

2014-08-07 Thread Zachary Ware

New submission from Zachary Ware:

After 9bca86812857 (#22104), test_codecs now reports "leaked" references from 
ExceptionChainingTest.  Previously the tests were only ever loaded one time, so 
each run of the tests was actually using the same set of TestCase instances; 
now the tests are freshly loaded before every test run and thus each run uses a 
new set of TestCase instances.  My suspicion is that this is coming into play 
in ExceptionChainingTest.setUp, where the test's codec_name attribute is 
derived from the repr and id of the TestCase instance.  However, I'm not 
familiar enough with the codecs code to know where it's going wrong from there.

One possible "fix" is to abuse load_tests to ensure the tests are only loaded 
once:

_suite = None

def load_tests(loader, suite, pattern):
global _suite
if _suite is None:
_suite = suite
return _suite

...which restores the old behavior, but strikes me as a fairly horrible hack.  
Somewhat less bad would be to just skip those tests when they've already been 
run before.  I can't help but feel that there has to be a better solution that 
I can't see, though.

Nick, as the original author of the test class in question, do you have any 
insight into a better way to fix the "leaks"?

--
components: Tests
messages: 225040
nosy: brett.cannon, ncoghlan, zach.ware
priority: normal
severity: normal
status: open
title: test_codecs "leaking" references
type: behavior
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



[issue18977] The -t option has no effect in for uu command-line

2014-08-07 Thread Mark Lawrence

Mark Lawrence added the comment:

Could it be argued that this is a regression so the type should be behavior and 
not enhancement?

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue18976] distutils/command/build_ext passes wrong linker flags

2014-08-07 Thread Mark Lawrence

Mark Lawrence added the comment:

@Eric what do you make of the attached patch?

--
nosy: +BreamoreBoy
versions:  -Python 2.6, Python 3.1, 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



[issue18620] multiprocessing page leaves out important part of Pool example

2014-08-07 Thread Mark Lawrence

Mark Lawrence added the comment:

Looks as if the v2 and v3 docs need changing.

--
nosy: +BreamoreBoy
type: enhancement -> 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



[issue22165] Empty response from http.server when directory listing contains invalid unicode

2014-08-07 Thread Demian Brecht

Changes by Demian Brecht :


--
nosy: +demian.brecht

___
Python tracker 

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



[issue22165] Empty response from http.server when directory listing contains invalid unicode

2014-08-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which fixes handling of undecodable paths in 
SimpleHTTPRequestHandler.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: needs patch -> patch review
Added file: http://bugs.python.org/file36304/issue22165.patch

___
Python tracker 

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



[issue22165] Empty response from http.server when directory listing contains invalid unicode

2014-08-07 Thread R. David Murray

R. David Murray added the comment:

Because http traffic is supposed to be either latin-1 or whatever charset is 
specified (at least, to my understanding that is the case), so sending 
incorrectly encoded data seems wrong.

On the other hand, we support unix files systems not having well defined 
charsets, so extending this to directory listings in http isn't crazy.  That 
does raise the question, though, of passing the bytes through python3's string 
model without breaking anything, so some careful thought may be required.  I 
haven't looked at the details, though, so it might well be pretty simple.

--

___
Python tracker 

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



[issue21308] PEP 466: backport ssl changes

2014-08-07 Thread Nick Coghlan

Nick Coghlan added the comment:

On 7 Aug 2014 23:11, "Antoine Pitrou"  wrote:
> I doubt adding a ton of new APIs and code can be uneventful, but good
> luck :)

They don't call it "Rawhide" for nothing! :)

--

___
Python tracker 

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



[issue15907] move doctest test-data files into a subdirectory of Lib/test

2014-08-07 Thread Jason Robinson

Jason Robinson added the comment:

Here is the `hg diff --git` patch.

Hope this one applies :)

--
Added file: http://bugs.python.org/file36303/issue15907_3.patch

___
Python tracker 

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



[issue15907] move doctest test-data files into a subdirectory of Lib/test

2014-08-07 Thread Jason Robinson

Jason Robinson added the comment:

Ezio, here are new versions of the patch. This time I used `hg mv` command to 
move the files to the new location and then copied over the correct versions. 
It does look though to me that there is no difference except timestamps.

I will upload also a --git version in the next comment.

--
Added file: http://bugs.python.org/file36302/issue15907_2.patch

___
Python tracker 

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



[issue22165] Empty response from http.server when directory listing contains invalid unicode

2014-08-07 Thread Augie Fackler

Augie Fackler added the comment:

Why not treat the filename as opaque bytes, and let the client fetch it anyway?

--

___
Python tracker 

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



[issue22165] Empty response from http.server when directory listing contains invalid unicode

2014-08-07 Thread R. David Murray

R. David Murray added the comment:

It should return a server error, I think.

--
nosy: +r.david.murray
stage:  -> needs patch
type:  -> behavior
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



[issue21308] PEP 466: backport ssl changes

2014-08-07 Thread Alex Gaynor

Alex Gaynor added the comment:

New patch should be in the "mercurial" diff format.

--
Added file: http://bugs.python.org/file36301/ssl-backport.diff

___
Python tracker 

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



[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)

2014-08-07 Thread Mark Lawrence

Mark Lawrence added the comment:

Nobody is listed as a maintainer for mimetypes here 
https://docs.python.org/devguide/experts.html but I've seen Tim has done some 
work on it so adding him to nosy list.

--
nosy: +BreamoreBoy, tim.golden

___
Python tracker 

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



[issue20056] Got deprecation warning when running test_shutil.py on Windows NT 6

2014-08-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Vajrasky.

--
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



[issue22160] Windows installers need to be updated following OpenSSL security release

2014-08-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Oops.  Merged now.

Thank you.

--

___
Python tracker 

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



[issue20056] Got deprecation warning when running test_shutil.py on Windows NT 6

2014-08-07 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e306cf07046a by Serhiy Storchaka in branch '3.4':
Issue #20056: Fixed deprecation warning about bytes path in test_shutil on
http://hg.python.org/cpython/rev/e306cf07046a

New changeset 8480179d2a7f by Serhiy Storchaka in branch 'default':
Issue #20056: Fixed deprecation warning about bytes path in test_shutil on
http://hg.python.org/cpython/rev/8480179d2a7f

--
nosy: +python-dev

___
Python tracker 

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



[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)

2014-08-07 Thread Steve Dower

Steve Dower added the comment:

Agreed on both points, but we need to find someone willing to fix the 3.4 
installer (I'm completely focused on the 3.5 installer, which won't suffer from 
the first point).

There's a separate issue tracker for pip which would be the place to get their 
developers to handle the exception in their code. We should be fixing mimetypes.

I've attached a proposed patch for mimetypes for 3.4 and default. Any 
concerns/do we know who owns it?

--
keywords: +patch
Added file: http://bugs.python.org/file36300/22028.diff

___
Python tracker 

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



[issue22160] Windows installers need to be updated following OpenSSL security release

2014-08-07 Thread Zachary Ware

Zachary Ware added the comment:

Oops.  Merged now.

--

___
Python tracker 

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



[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)

2014-08-07 Thread venza

venza added the comment:

Ok, I had three such keys. I run RegDelNull.exe and managed to remove two of 
them. The third one is still there.
I'm reasonably sure that this machine is clean, anyway:

1. the Python installer should not fail silently when an exception is thrown 
during pip installation. There is also a stackoverflow question about "where is 
pip in python 3.4, I can't find it!" from someone likely having the same 
problem.

2. ensurepip should not crash on unrelated registry entries it doesn't like, it 
should just ignore them.

Thanks for the pointer to null keys and the script to find them.

--

___
Python tracker 

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



[issue22160] Windows installers need to be updated following OpenSSL security release

2014-08-07 Thread Steve Dower

Steve Dower added the comment:

The 2.7 installer will be fine whenever the release manager asks for it

--

___
Python tracker 

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



[issue22156] Fix compiler warnings

2014-08-07 Thread STINNER Victor

STINNER Victor added the comment:

> Victor, your patch fixes most of the pesky warnings. However you left one 
> warning ...

Yes, my patch is uncomplete. Don't hesitate to post a new patch or
complete mine. I'm in holliday, I'm not going to update it before a
few weeks.

--

___
Python tracker 

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



[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)

2014-08-07 Thread Steve Dower

Steve Dower added the comment:

FWIW, on my machine I don't have embedded nulls in any of the values that 
enum_keys is looking for:

>>> import winreg
>>> hkcr=winreg.OpenKey(winreg.HKEY_CLASSES_ROOT, '')
>>> n = []
>>> i = 0
>>> while True:
...   try:
... n.append(winreg.EnumKey(hkcr, i))
...   except EnvironmentError:
... break
...   i += 1
...
>>> [x for x in n if '\0' in x]
[]
>>>

--

___
Python tracker 

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



[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)

2014-08-07 Thread Steve Dower

Steve Dower added the comment:

Presumably the value for subkeyname being passed to OpenKey contains an 
embedded null, which I believe is legal for the registry in general, but 
doesn't make much sense in this context and is quite possibly a corruption 
issue on your machine.

We can certainly strengthen mimetypes against this error (I don't know who's 
maintaining this module, but handling the TypeError on OpenKey seems safe 
enough) and you may also want to ensure your virus/malware scanners are up to 
date - embedded nulls in registry keys are often used to trigger bugs or hide 
malicious data.

--

___
Python tracker 

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



[issue22160] Windows installers need to be updated following OpenSSL security release

2014-08-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You left 3.4 branch unmerged into default branch.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue22165] Empty response from http.server when directory listing contains invalid unicode

2014-08-07 Thread Josh Lee

New submission from Josh Lee:

While SimpleHTTPServer from Python2 would happily spit out whatever bytes were 
in the directory listing, Python3's http.server logs an error and closes the 
connection without responding to the HTTP request.

$ mkdir $'\xff'
$ ls
\377/
$ python3 -m http.server 
Serving HTTP on 0.0.0.0 port 8000 ...

Exception happened during processing of request from ('74.125.59.145', 19648)
Traceback (most recent call last):
  File "/home/josh/local/lib/python3.5/socketserver.py", line 321, in 
_handle_request_noblock
self.process_request(request, client_address)
  File "/home/josh/local/lib/python3.5/socketserver.py", line 347, in 
process_request
self.finish_request(request, client_address)
  File "/home/josh/local/lib/python3.5/socketserver.py", line 360, in 
finish_request
self.RequestHandlerClass(request, client_address, self)
  File "/home/josh/local/lib/python3.5/socketserver.py", line 681, in __init__
self.handle()
  File "/home/josh/local/lib/python3.5/http/server.py", line 398, in handle
self.handle_one_request()
  File "/home/josh/local/lib/python3.5/http/server.py", line 386, in 
handle_one_request
method()
  File "/home/josh/local/lib/python3.5/http/server.py", line 677, in do_GET
f = self.send_head()
  File "/home/josh/local/lib/python3.5/http/server.py", line 716, in send_head
return self.list_directory(path)
  File "/home/josh/local/lib/python3.5/http/server.py", line 772, in 
list_directory
% (urllib.parse.quote(linkname), html.escape(displayname)))
  File "/home/josh/local/lib/python3.5/urllib/parse.py", line 688, in quote
string = string.encode(encoding, errors)
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' in position 
0: surrogates not allowed


--
components: Library (Lib)
messages: 225016
nosy: durin42, jleedev
priority: normal
severity: normal
status: open
title: Empty response from http.server when directory listing contains invalid 
unicode
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



[issue22028] Python 3.4.1 Installer ended prematurely (Windows msi)

2014-08-07 Thread venza

venza added the comment:

This is the exception that comes out after running the py -m ensurepip manually:



C:\Python34\lib\ensurepip\__main__.py run on 08/07/14 15:44:36
Ignoring indexes: https://pypi.python.org/simple/
Downloading/unpacking setuptools
Cleaning up...
  Removing temporary dir C:\Users\venza\AppData\Local\Temp\pip_build_venza...
Exception:
Traceback (most recent call last):
  File 
"C:\Users\venza\AppData\Local\Temp\tmpz0stj2e6\pip-1.5.6-py2.py3-none-any.whl\pip\basecommand.py",
 line 122, in main
status = self.run(options, args)
  File 
"C:\Users\venza\AppData\Local\Temp\tmpz0stj2e6\pip-1.5.6-py2.py3-none-any.whl\pip\commands\install.py",
 line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, 
bundle=self.bundle)
  File 
"C:\Users\venza\AppData\Local\Temp\tmpz0stj2e6\pip-1.5.6-py2.py3-none-any.whl\pip\req.py",
 line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
  File 
"C:\Users\venza\AppData\Local\Temp\tmpz0stj2e6\pip-1.5.6-py2.py3-none-any.whl\pip\index.py",
 line 209, in find_requirement
file_locations, url_locations = self._sort_locations(locations)
  File 
"C:\Users\venza\AppData\Local\Temp\tmpz0stj2e6\pip-1.5.6-py2.py3-none-any.whl\pip\index.py",
 line 128, in _sort_locations
sort_path(os.path.join(path, item))
  File 
"C:\Users\venza\AppData\Local\Temp\tmpz0stj2e6\pip-1.5.6-py2.py3-none-any.whl\pip\index.py",
 line 109, in sort_path
if mimetypes.guess_type(url, strict=False)[0] == 'text/html':
  File "C:\Python34\lib\mimetypes.py", line 287, in guess_type
init()
  File "C:\Python34\lib\mimetypes.py", line 348, in init
db.read_windows_registry()
  File "C:\Python34\lib\mimetypes.py", line 255, in read_windows_registry
with _winreg.OpenKey(hkcr, subkeyname) as subkey:
TypeError: OpenKey() argument 2 must be str without null characters or None, 
not str

--
nosy: +venza

___
Python tracker 

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



[issue20056] Got deprecation warning when running test_shutil.py on Windows NT 6

2014-08-07 Thread Vajrasky Kok

Vajrasky Kok added the comment:

In test_shutil.py, yes, this is the only place. But in other tests, we got 
different type of warnings, such as:

test_mailbox.py:46: RuntimeWarning: tests may fail, delete still pending for 
@test_4456_tmp

test_decimal:5608: UserWarning: C tests skipped: no module named _decimal.

--

___
Python tracker 

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



[issue22156] Fix compiler warnings

2014-08-07 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Victor, your patch fixes most of the pesky warnings. However you left one 
warning left (at least in Mac OS X 10.9.4).

Objects/unicodeobject.c:4831:43: warning: comparison of integers of different 
signs: 'unsigned long' and 'long' [-Wsign-compare]
if (PY_SSIZE_T_MAX /  sizeof(wchar_t) < (size + 1))
~ ^  

Maybe we can fix it by doing this:
if (PY_SSIZE_T_MAX / (Py_ssize_t)sizeof(wchar_t) < (size + 1))
return NULL;

--
nosy: +vajrasky

___
Python tracker 

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



[issue22164] cell object cleared too early?

2014-08-07 Thread Antoine Pitrou

New submission from Antoine Pitrou:

This is a tricky issue I'm sometimes seeing when running Numba's test suite, 
and I can't seem to write a reproducer. Somtimes I'm seeing the following 
messages:

Exception ignored in: .finalizer at 0x7f1466487c80>
Traceback (most recent call last):
  File "/home/antoine/numba/numba/dispatcher.py", line 59, in finalizer
if shutting_down():
NameError: free variable 'shutting_down' referenced before assignment in 
enclosing scope

So what does it correspond to? The code is here:
https://github.com/numba/numba/blob/master/numba/dispatcher.py#L47

Basically, there's no way 'shutting_down' can be referenced before 
assignment... except if it has been cleared. And the only thing which can clear 
it here is the GC (namely, cell objects' tp_clear() method).

I'm not sure what the exact trigger for reproduction is. It does have to 
feature a reference cycle involving the closure; perhaps the trashcan mechanism 
comes into play as well. Also, the closure must be invoked on collection of 
something in the cycle, so a weakref callback could be nice.

--
messages: 225012
nosy: pitrou, tim.peters
priority: normal
severity: normal
status: open
title: cell object cleared too early?
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



[issue19884] Importing readline produces erroneous output

2014-08-07 Thread Remi Pointel

Changes by Remi Pointel :


--
nosy: +rpointel

___
Python tracker 

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



[issue21308] PEP 466: backport ssl changes

2014-08-07 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Le 07/08/2014 04:34, Nick Coghlan a écrit :
>
> In other news... the outcome of the Fedora thread is that Slavek is
just going to go ahead and apply the patch to Python 2.7 RPMs in Fedora
Rawhide next week. That will hopefully be entirely uneventful, but if it
isn't, at least we'll know *before* merging it upstream :)

I doubt adding a ton of new APIs and code can be uneventful, but good 
luck :)

--

___
Python tracker 

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



[issue22132] Cannot copy the same directory structure to the same destination more than once

2014-08-07 Thread Éric Araujo

Éric Araujo added the comment:

Thanks.  There is a function intended for general use: shutil.copytree; it may 
have the same behavior (not a bug if it's documented).

--
resolution:  -> wont fix
stage:  -> 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



[issue14910] argparse: disable abbreviation

2014-08-07 Thread Eli Bendersky

Eli Bendersky added the comment:

Ezio, could you see if your comments were addressed?

Steven, do you want to take another look, or is this OK to commit?

--

___
Python tracker 

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



[issue19884] Importing readline produces erroneous output

2014-08-07 Thread Edd Barrett

Edd Barrett added the comment:

This problem shows up on OpenBSD too. It breaks 'hg view' also.

--
nosy: +Edd.Barrett

___
Python tracker 

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



[issue22163] max_wbits set incorrectly to -zlib.MAX_WBITS in tarfile, shouldn't be negative

2014-08-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +nadeem.vawda

___
Python tracker 

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



[issue14534] Add method to mark unittest.TestCases as "do not run".

2014-08-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy:  -serhiy.storchaka

___
Python tracker 

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



[issue22162] Activating a venv - Dash doesn't understand source

2014-08-07 Thread Vinay Sajip

Vinay Sajip added the comment:

Was there a reason you couldn't close it yourself?

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue22163] max_wbits set incorrectly to -zlib.MAX_WBITS in tarfile, shouldn't be negative

2014-08-07 Thread Eduardo Robles Elvira

New submission from Eduardo Robles Elvira:

I think I have found a small typo-bug in tarfile.py, that seems to
be present in cpython upstream, which makes tarfile compression slower.
The issue can be seen here, in line 415 [1] of tarfile.py:

self.cmp = self.zlib.compressobj(9, self.zlib.DEFLATED,
-self.zlib.MAX_WBITS,
self.zlib.DEF_MEM_LEVEL,
0)

The minus sign doesn't make sense to me, because zlib.MAX_WBITS is 15,
and according to the documentation [2] wbits is by default 15 and
"This should be an integer from 8 to 15. Higher values give better
compression, but use more memory". -15 is not even in range. So I guess the 
expected value should be the zlib default, 15. Or maybe another value, but it 
should at least be in range. 

I marked it as "performance" type bug as this only really affects performance.

I might have gotten it all wrong and it's fine the way it is, but I thought 
it'd be best to report it, as it looked fishy to me.

--
[1] http://hg.python.org/cpython/file/94d0e842b9ea/Lib/tarfile.py#l415
[2] https://docs.python.org/3.4/library/zlib.html#zlib.compressobj

--
components: Library (Lib)
files: max_wbits.patch
keywords: patch
messages: 225006
nosy: edulix
priority: normal
severity: normal
status: open
title: max_wbits set incorrectly to -zlib.MAX_WBITS in tarfile, shouldn't be 
negative
type: performance
versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36299/max_wbits.patch

___
Python tracker 

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



[issue22162] Activating a venv - Dash doesn't understand source

2014-08-07 Thread Daniel Lintott

Daniel Lintott added the comment:

Hmm... just double checked this and this time has worked with the source 
command (previously was telling me it couldn't be found).

Have double checked and indeed the default login shell is bash

So feel free to close this issue

--

___
Python tracker 

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



[issue14534] Add method to mark unittest.TestCases as "do not run".

2014-08-07 Thread Ezio Melotti

Ezio Melotti added the comment:

SGTM.
The patch still needs docs and there are some comments on rietveld.
The name of the decorator should be updated too, and possibly 
__unittest_base_class__ should be renamed to __unittest_abstract_class__ to 
match the name of the decorator.

--

___
Python tracker 

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



[issue22162] Activating a venv - Dash doesn't understand source

2014-08-07 Thread Éric Araujo

Éric Araujo added the comment:

dash is the default system shell used to execute scripts (i.e. /bin/sh), not 
the default shell used for users login shell and terminal emulators.

The venv/scripts/poxis/activate file seems to require bash anyway: running 
checkbashisms on it warns about “hash -r”.

--
assignee: docs@python -> vinay.sajip
nosy: +vinay.sajip

___
Python tracker 

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



[issue22150] deprecated-removed directive is broken in Sphinx 1.2.2

2014-08-07 Thread Berker Peksag

Changes by Berker Peksag :


--
assignee:  -> berker.peksag

___
Python tracker 

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



[issue22123] Provide a direct function for types.SimpleNamespace()

2014-08-07 Thread Mark Summerfield

Mark Summerfield added the comment:

I'd be happy to draft a PEP if it is needed, if no one else has the 
time/inclination.

--

___
Python tracker 

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



[issue22162] Activating a venv - Dash doesn't understand source

2014-08-07 Thread Georg Brandl

Changes by Georg Brandl :


--
nosy:  -georg.brandl

___
Python tracker 

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



[issue22162] Activating a venv - Dash doesn't understand source

2014-08-07 Thread Daniel Lintott

Changes by Daniel Lintott :


--
title: Actiavting a venv - Dash doesn't understand source -> Activating a venv 
- Dash doesn't understand source

___
Python tracker 

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



[issue22162] Actiavting a venv - Dash doesn't understand source

2014-08-07 Thread Daniel Lintott

Changes by Daniel Lintott :


--
nosy: +eric.araujo, ezio.melotti, georg.brandl

___
Python tracker 

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



[issue22162] Actiavting a venv - Dash doesn't understand source

2014-08-07 Thread Daniel Lintott

New submission from Daniel Lintott:

In the documentation for venv (https://docs.python.org/3.5/library/venv.html) 
it gives examples for activating the venv under bash/zsh.

For a long time under both Debian and Ubuntu the default shell has been Dash 
(https://wiki.ubuntu.com/DashAsBinSh)

Dash doesn't undertsand the command 'source' so instead the venv must be 
activated using the . command (as is done for Fish, but using the bash activate 
file instead)

--
assignee: docs@python
components: Documentation
messages: 225001
nosy: dlintott, docs@python
priority: normal
severity: normal
status: open
title: Actiavting a venv - Dash doesn't understand source
type: enhancement

___
Python tracker 

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



[issue22161] Remove unsupported code from ctypes

2014-08-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Added file: http://bugs.python.org/file36298/ctype_bytes_checks-3.4.patch

___
Python tracker 

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



[issue22161] Remove unsupported code from ctypes

2014-08-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


Removed file: http://bugs.python.org/file36297/ctype_bytes_checks-3.4.patch

___
Python tracker 

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



[issue14534] Add method to mark unittest.TestCases as "do not run".

2014-08-07 Thread Michael Foord

Michael Foord added the comment:

testBaseClass, abstractTestClass and abstractBaseClass are all fine with me. I 
wouldn't waste too much time bike-shedding it. If we need a decision let's go 
with abstractTestClass.

--

___
Python tracker 

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



[issue10803] ctypes: better support of bytearray objects

2014-08-07 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Remove unsupported code from ctypes

___
Python tracker 

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



[issue22161] Remove unsupported code from ctypes

2014-08-07 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Some ctypes functions by mistake accept wrong types which then rejected by 
internal functions. This is mainly remnants of 2.x where both str and unicode 
was accepted and then automatically converted to right type.

--
assignee: serhiy.storchaka
components: ctypes
files: ctype_bytes_checks-3.4.patch
keywords: patch
messages: 224999
nosy: amaury.forgeotdarc, belopolsky, meador.inge, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Remove unsupported code from ctypes
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file36297/ctype_bytes_checks-3.4.patch

___
Python tracker 

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



[issue21308] PEP 466: backport ssl changes

2014-08-07 Thread Nick Coghlan

Nick Coghlan added the comment:

The problem is that the Rietveld integration isn't able to figure out the base 
revision, so it isn't generating the review automatically. Times like this it 
would be nice to be able to specify a "base branch" explicitly...

In other news... the outcome of the Fedora thread is that Slavek is just going 
to go ahead and apply the patch to Python 2.7 RPMs in Fedora Rawhide next week. 
That will hopefully be entirely uneventful, but if it isn't, at least we'll 
know *before* merging it upstream :)

--

___
Python tracker 

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



[issue10803] ctypes: better support of bytearray objects

2014-08-07 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here are things which support bytes instances only:

1. Constructor and setter of the "value" attribute of NUL terminated char 
buffer.

>>> p = create_string_buffer(b"Hello")
>>> p.value
b'Hello'
>>> p.raw
b'Hello\x00'
>>> p.value = b'Bye'
>>> p.value
b'Bye'
>>> p.raw
b'Bye\x00o\x00'
>>> create_string_buffer(bytearray(b"Hello"))
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/serhiy/py/cpython-3.4/Lib/ctypes/__init__.py", line 63, in 
create_string_buffer
raise TypeError(init)
TypeError: bytearray(b'Hello')
>>> p.value = bytearray(b'Hi')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: bytes expected instead of bytearray instance

But setter of the "raw" attribute accepts arbitrary bytes-like objects.

>>> p.raw = bytearray(b'Hi')
>>> p.raw
b'Hie\x00o\x00'

The patch adds support of bytearray here. It would be not so easy to add 
support for arbitrary bytes-like objects, and due to NUL-terminating it can be 
confused. I even not sure that support of bytearray is needed here.

2. Constructor of NUL terminated wchar buffer (create_unicode_buffer). Actually 
this doesn't work. Bytes argument is accepted, but then rejected in internal 
setting function. This is a bug, bytes should be removed here.

3. c_wchar_p.from_param() accepts bytes argument, but then reject it in 
internal function. This is a bug, bytes should be removed here.

4. c_void_p.from_param() accepts bytes and bytearray arguments, but then 
reject bytearray in internal function. This is a bug, either bytearray should 
be rejected here, or support of bytearray should be added in internal function 
(very easy, the patch does this). Adding support of arbitrary bytes-like 
objects is more complicated.

5. c_char_p.from_param() accepts bytes argument. Adding support for bytearray 
or arbitrary bytes-like objects has same complexity as in 
c_void_p.from_param().

6. Bytes arguments of call_function(), call_cdeclfunction() and 
CopyComPointer() are implicitly converted to pointers. It is easy to add 
support of bytearray, and more complicated for arbitrary bytes-like objects.

--

___
Python tracker 

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



[issue22157] FAIL: test_with_pip (test.test_venv.EnsurePipTest)

2014-08-07 Thread Ned Deily

Ned Deily added the comment:

OK. Does test_ctypes run successfully?

  cd /home/ubuntu/python/Python-3.4.1
  ./python -E -S -m test -v test_ctypes

and then does test_venv run successfully in isolation?

  cd /home/ubuntu/python/Python-3.4.1
  ./python -E -S -m test -v test_venv

Also, what ./configure command arguments did you use to build it?

It's hard to tell what might be failing otherwise other than the _ctypes 
extension build failing.

--

___
Python tracker 

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