[issue20779] Add pathlib.chown method

2014-02-27 Thread Vajrasky Kok

Vajrasky Kok added the comment:

Pragmatic reasons:

I use chown moderately often. Usually as root, I want to change the uid of the 
files after generating a bunch of files. But I almost never changed gid.

I am in two mind whether I should add lchown as well or not (just like lchmod) 
and make the signature of pathlib.chown same as os.chown (with third parameter, 
follow_symbolic_links).

If you close this as won't fix, I will not hold grudge against you, though. ;)

--

___
Python tracker 

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



[issue20802] AttributeError: 'NoneType' object has no attribute 'returncode'

2014-02-27 Thread Ned Deily

Ned Deily added the comment:

The traceback shows an issue when using envoy, which is not part of the Python 
standard library.  Assuming you are using the envoy listed in PyPI, I suggest 
you ask on the project's issue tracker:

https://github.com/kennethreitz/envoy/issues

--
nosy: +ned.deily
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue20802] AttributeError: 'NoneType' object has no attribute 'returncode'

2014-02-27 Thread Pramod Jadhav

New submission from Pramod Jadhav:

AttributeErrorTraceback (most recent call last)
 in ()
  7 #F='C:\Users\Prashant\Documents\IPython 
Notebooks\resources\ch06-mailboxes'
  8 F='resources/ch06-mailboxes/data/enron.mbox.json.bz2'
> 9 r = envoy.run("bunzip2 %s" % (F,))
 10 print r.std_out
 11 print r.std_err

C:\Anaconda\lib\site-packages\envoy\core.py in run(command, data, timeout)
166 
167 cmd = Command(c)
--> 168 out, err = cmd.run(data, timeout)
169 
170 r = Response(process=cmd)

C:\Anaconda\lib\site-packages\envoy\core.py in run(self, data, timeout)
 51 self.process=process;
 52 thread.join()
---> 53 self.returncode = self.process.returncode
 54 return self.out, self.err
 55 

AttributeError: 'NoneType' object has no attribute 'returncode'

--
messages: 212409
nosy: pramod.jadhav
priority: normal
severity: normal
status: open
title: AttributeError: 'NoneType' object has no attribute 'returncode'

___
Python tracker 

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



[issue20801] WindowsError: [Error 2] The system cannot find the file specified

2014-02-27 Thread Ned Deily

Ned Deily added the comment:

Sorry, you are going to have supply more information.  From the traceback 
supplied, it appears the call to subprocess is coming from envoy, which is not 
part of the Python standard library.  Please re-open if you can supply a test 
case demonstrating a problem in the interpreter or standard library modules.

--
nosy: +ned.deily
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue20801] WindowsError: [Error 2] The system cannot find the file specified

2014-02-27 Thread Pramod Jadhav

New submission from Pramod Jadhav:

Exception in thread Thread-18:
Traceback (most recent call last):
  File "C:\Anaconda\lib\threading.py", line 810, in __bootstrap_inner
self.run()
  File "C:\Anaconda\lib\threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
  File "C:\Anaconda\lib\site-packages\envoy\core.py", line 32, in target
  File "C:\Anaconda\lib\subprocess.py", line 709, in __init__
errread, errwrite)
  File "C:\Anaconda\lib\subprocess.py", line 957, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

--
messages: 212407
nosy: pramod.jadhav
priority: normal
severity: normal
status: open
title: WindowsError: [Error 2] The system cannot find the file specified
type: behavior
versions: Python 3.3

___
Python tracker 

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



[issue5639] Support TLS SNI extension in ssl module

2014-02-27 Thread Sam Gleske

Sam Gleske added the comment:

Are you kidding me?  I can't believe SNI isn't being backported to python 2.x.  
This is ridiculous in my opinion.  The bug fix needs to be back ported.

--
nosy: +sag47
versions: +Python 2.7, Python 3.1

___
Python tracker 

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



[issue20658] os.environ.clear() fails with empty keys (posix.unsetenv)

2014-02-27 Thread akira

akira added the comment:

Related: issue4926 "putenv() accepts names containing '=', return value of 
unsetenv() not checked" 

`os.environ.clear()` also fails if the environment contains names with `=`:

  >>> import os
  >>> os.environ['a=b'] = 'c'
  >>> os.environ.clear()
  Traceback (most recent call last):
File "", line 1, in 
File "/.../lib/python3.4/_collections_abc.py", line 558, in clear
  self.popitem()
File "/.../lib/python3.4/_collections_abc.py", line 551, in popitem
  del self[key]
File "/.../lib/python3.4/os.py", line 662, in __delitem__
  self.unsetenv(encodedkey)
  OSError: [Errno 22] Invalid argument

--
nosy: +akira

___
Python tracker 

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



[issue20800] Cannot run gui tests twice.

2014-02-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

With 3.3 and the patch still applied, all 13 test methods fail with tracebacks 
that end with the _tkinter.create call, as above. For Idle, there are 3 
tracebacks for the 3 modules with gui tests.

--

___
Python tracker 

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



[issue20035] Suppress 'os.environ was modified' warning on Tcl/Tk tests

2014-02-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The patch works to suppress the message for test_ttk_guionly.  However, 
unfix_environ does not undo everything that needs to be undone, as evidenced by 
#20800.

The patch does not fix test_idle. I suspect that this is because test_idle 
pulls in tests from numerous modules, none of which has the unfix call. 
However, rather than require a tearDowmnodule for every module that imports 
tkinter, lets fix the root problem. I thought of having the environment change 
warning function ignore changes to TCL/TK/TIX_LIBRARY, but even better would be 
to not change them. Rename _fix to _dirs and redefine its mission as setting 
and holding three module attributes: tcldir, tkdir, and tixdir. They would be 
set from either the environment or the alternate search code. Any other modules 
that need the info should get it from _dirs rather the environment.

I believe this part of _fix is buggy.
+if "TCL_LIBRARY" not in os.environ:
+for name in os.listdir(prefix):
+if name.startswith("tcl"):
+tcldir = os.path.join(prefix,name)
+if os.path.isdir(tcldir):
+os.environ["TCL_LIBRARY"] = tcldir
Both base/tcl and base/../tcktk/lib contain (for 3.4) directories named tcl8 
and tcl8.6. Since only tcl8.6 works, the code above depends on listdir 
presenting it second. The 'if name' clause could be augmented with 'and 
name[-2] == '.'.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue20800] Cannot run gui tests twice.

2014-02-27 Thread Ned Deily

Ned Deily added the comment:

What happens if you add -v (verbose) "... -m test -v -ugui ..." to find the 
failing tests?

--

___
Python tracker 

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



[issue20800] Cannot run gui tests twice.

2014-02-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The #20035 patch removes the warning but the rest is the same.

--

___
Python tracker 

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



[issue20800] Cannot run gui tests twice.

2014-02-27 Thread Ned Deily

Ned Deily added the comment:

The "Warning -- os.environ was modified by test_ttk_guionly" looks suspicious.  
Does the patch for Issue20035 help?

--
nosy: +ned.deily

___
Python tracker 

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



[issue20792] IDLE: Extend tests for PathBrowser

2014-02-27 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

Well,thank you for the feedback to both .

I will try to make a new patch , during this weekend,
removing the name changes
to add docstrings
 and add a human testable dialog for pathbrowser,as is present in other tests.

--

___
Python tracker 

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



[issue20567] test_idle causes test_ttk_guionly 'can't invoke "event" command: application has been destroyed' messages from Tk

2014-02-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There is also a different test problem that might be related to the altered 
environment. See #20800

--
stage: needs patch -> commit review

___
Python tracker 

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



[issue20800] Cannot run gui tests twice.

2014-02-27 Thread Terry J. Reedy

New submission from Terry J. Reedy:

After the fix for #20567, running test_idle and then test_ttk_guionly works, 
but running either after itself does not. Example command and output, which is 
same running with installed 3.4.0rc1 (Feb 11) or fresh debug build.

F:\Python\dev> 4\py34\pcbuild\python_d.exe -m test -ugui test_ttk_guionly 
test_ttk_guionly
[1/2] test_ttk_guionly
Warning -- os.environ was modified by test_ttk_guionly
[2/2] test_ttk_guionly
test test_ttk_guionly crashed -- Traceback (most recent call last):
  File "F:\Python\dev\4\py34\lib\test\test_ttk_guionly.py", line 35, in 
test_main
*runtktests.get_tests(text=False, packages=['test_ttk']))
  File "F:\Python\dev\4\py34\lib\test\support\__init__.py", line 1719, in 
run_unittest
_run_suite(suite)
  File "F:\Python\dev\4\py34\lib\test\support\__init__.py", line 1694, in 
_run_suite
raise TestFailed(err)
test.support.TestFailed: multiple errors occurred; run in verbose mode for 
details

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "F:\Python\dev\4\py34\lib\test\regrtest.py", line 1278, in runtest_inner
test_runner()
  File "F:\Python\dev\4\py34\lib\test\test_ttk_guionly.py", line 37, in 
test_main
get_tk_root().destroy()
  File "F:\Python\dev\4\py34\lib\tkinter\test\support.py", line 60, in 
get_tk_root
root = tkinter.Tk()
  File "F:\Python\dev\4\py34\lib\tkinter\__init__.py", line 1807, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, 
wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
F:/Python/dev/4/py34/lib/tcl8.6 F:/Python/dev/4/py34/lib/tcl8.6 
F:/Python/dev/4/lib/tcl8.6 F:/Python/dev/4/py34/library F:/Python/dev/4/library 
F:/Python/dev/4/tcl8.6.1/library F:/Python/dev/tcl8.6.1/library

init.tcl *is* in 4/tcl8.6.1.0/library and 4/tcltk/tcl8.6/lib. I believe it is 
usually found in the latter.

This might be Windows only.

--
components: Tests, Tkinter
messages: 212397
nosy: serhiy.storchaka, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Cannot run gui tests twice.
type: behavior
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue20567] test_idle causes test_ttk_guionly 'can't invoke "event" command: application has been destroyed' messages from Tk

2014-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 43c4073cb2e2 by Terry Jan Reedy in branch '2.7':
Issue #20567: Delete class attribute gui widgets in idle tests.
http://hg.python.org/cpython/rev/43c4073cb2e2

New changeset daf44eb9c54e by Terry Jan Reedy in branch '3.3':
Issue #20567: Delete class attribute gui widgets in idle tests.
http://hg.python.org/cpython/rev/daf44eb9c54e

--
nosy: +python-dev

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b3fb7828b6fc by Antoine Pitrou in branch '3.3':
Issue #20791: copy.copy() now doesn't make a copy when the input is a bytes 
object.  Initial patch by Peter Otten.
http://hg.python.org/cpython/rev/b3fb7828b6fc

--

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread R. David Murray

R. David Murray added the comment:

3.3 will get fixes until its final release, which will be some time after the 
release of 3.4.0.

--

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Is Python 3.3 still allowing bug fixes?
If yes, this is a good idea. Do you want to backport it?

--

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread STINNER Victor

STINNER Victor added the comment:

Why not fixing this bug in Python 3.3 too?

--

___
Python tracker 

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



[issue3831] Multiprocessing: Expose underlying pipe in queues

2014-02-27 Thread Julian Mehnle

Changes by Julian Mehnle :


--
nosy: +jmehnle

___
Python tracker 

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



[issue19085] Add tkinter basic options tests

2014-02-27 Thread Ned Deily

Ned Deily added the comment:

All of the failures I reported are now fixed so I think this issue can be 
closed.

--

___
Python tracker 

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



[issue20227] Argument Clinic: rename arguments in generated C?

2014-02-27 Thread Zachary Ware

Zachary Ware added the comment:

This was added by #20456 (a couple weeks ago).

--
components: +Demos and Tools
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed
superseder:  -> Argument Clinic rollup patch, 2014/01/31
type:  -> enhancement
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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Ok, thank you! This will be in 3.4.1 and 3.5.

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

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c2523bca50d7 by Antoine Pitrou in branch 'default':
Issue #20791: copy.copy() now doesn't make a copy when the input is a bytes 
object.  Initial patch by Peter Otten.
http://hg.python.org/cpython/rev/c2523bca50d7

--
nosy: +python-dev

___
Python tracker 

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



[issue19085] Add tkinter basic options tests

2014-02-27 Thread Zachary Ware

Zachary Ware added the comment:

What's the status here? Appears to be fixed?

--

___
Python tracker 

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



[issue20265] Bring Doc/using/windows up to date

2014-02-27 Thread Zachary Ware

Zachary Ware added the comment:

Windows 8 (or at least 8.1) doesn't seem to be too far off from the directions 
on that site.  If you're proficient enough to change an environment variable in 
Windows 7, chances are good you can figure it out on Windows 8(.1).  If you're 
not, chances are good you probably shouldn't :)

Either way, I think that these days giving instructions on how to set an 
environment variable is beyond the scope of the Python documentation.  We ought 
to just say "here's the environment variables that Python cares about, and 
here's what they do" and leave the instructions for setting them to other 
sites.  We might link to some site deemed to have good instructions, but 
keeping them inline means trying to keep them updated, which has apparently not 
gone well :)

--

___
Python tracker 

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



[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico

Changes by Chris Angelico :


Added file: http://bugs.python.org/file34252/broken.diff

___
Python tracker 

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



[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico

Changes by Chris Angelico :


Added file: http://bugs.python.org/file34251/churn2.diff

___
Python tracker 

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



[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico

Changes by Chris Angelico :


Added file: http://bugs.python.org/file34250/churn1.diff

___
Python tracker 

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



[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico

Chris Angelico added the comment:

I've applied all the changes my script can find, including ones that are 
actually quite inappropriate, like:

try:
some_function_call()
except some_exception:
some_other_function_call()

All tests pass except for one, which I don't fully understand. Attaching 
patches:

1) make_stuff_work.diff - what it says on the tin. I don't understand 
everything that's going on in there, but the build process made some changes to 
tracked files.

2) churn1.diff - mostly-plausible edits. They're unnecessary code churn, and 
shouldn't be done wholesale like this, but they make the obvious changes.

3) churn2.diff - less plausible edits, in the two-expression form shown above. 
These definitely shouldn't be done... but they don't break any of the tests, so 
they're a reasonable proof that the concept works.

4) broken.diff - for some reason that I don't understand, this causes a test 
failure. Something that's supposed to produce no output now produces a warning. 
I cannot figure out how there's a difference in there. Advice please?

The broken one is of the inappropriate type, but the fact that it doesn't work 
seems... indicative, somehow. Indicative of what, I don't know, and it's 8AM 
after I've been up all night, so I'm not going to try further to figure this 
out.

--
Added file: http://bugs.python.org/file34249/make_stuff_work.diff

___
Python tracker 

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



[issue20794] ImportError: Bad magic number in .pyc file

2014-02-27 Thread Ned Deily

Ned Deily added the comment:

As Peter notes, .pyc and .pyo files are in general not compatible across Python 
versions.  PEP 3147 was implemented in Python 3.2 to help avoid the problem you 
are seeing by storing .pyc/.pyo files with version-specific filenames.  For 
Python 2, you need to be careful to recompile (see "compileall") or delete 
.pyc/.pyo files when changing interpreter versions. 

http://docs.python.org/3/whatsnew/3.2.html#pep-3147-pyc-repository-directories
http://docs.python.org/2/library/compileall.html

--
nosy: +ned.deily
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread Peter Otten

Peter Otten added the comment:

I did sign today (and received the confirmation email).

--

___
Python tracker 

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



[issue20793] locale.setlocale()

2014-02-27 Thread Ned Deily

Ned Deily added the comment:

Thanks for the report.  There was a lengthy discussion of this behavior a few 
years ago in Issue3067.  At that time it was decided not to change this 
behavior for 2.7.  I'm not sure if the __future__ "unicode_literals" was 
considered then, however you can work around it by using the b"" literal syntax:

locale.setlocale(locale.LC_ALL, b'POSIX')

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> setlocale error message is confusing

___
Python tracker 

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



[issue19021] AttributeError in Popen.__del__

2014-02-27 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Feb 27, 2014, at 07:23 PM, Antoine Pitrou wrote:

>Hmm... if this *already* affects Ubuntu users, shouldn't this be fixed in 3.4
>proper? It's extremely likely that someone else will be affected too.

Agreed!

--

___
Python tracker 

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



[issue2771] Test issue

2014-02-27 Thread Ezio Melotti

Changes by Ezio Melotti :


--
nosy: +pitrou

___
Python tracker 

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



[issue20798] Reversed order in testtools messages

2014-02-27 Thread R. David Murray

Changes by R. David Murray :


--
status: open -> closed

___
Python tracker 

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



[issue20798] Reversed order in testtools messages

2014-02-27 Thread Pete Zaitcev

Pete Zaitcev added the comment:

Oh, indeed. The printout is in testtools only. The unittest prints this:

[zaitcev@guren xxx]$ python3 -c 'import nose; nose.main()'
F
==
FAIL: test_testEquals (testic.TestConfigTrueValue)
--
Traceback (most recent call last):
  File "/q/zaitcev/tmp/xxx/testic.py", line 11, in test_testEquals
self.assertEquals(function_under_test(), reference)
AssertionError: 'actual-0123456789012345678901234567890123456789' != 
'reference-0123456789012345678901234567890123456789'
- actual-0123456789012345678901234567890123456789
? ^ 
+ reference-0123456789012345678901234567890123456789
? ^^^ ^

Sorry, closing the issue as invalid.

--
resolution:  -> invalid

___
Python tracker 

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



[issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC

2014-02-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Akira, thanks. I have posted a review; if you haven't received the e-mail 
notification, you can still access it at 
http://bugs.python.org/review/19940/#ps11142

--
stage: needs patch -> patch review
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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks for the patch, Peter. Could you sign a contributor's agreement? You can 
do so online at http://www.python.org/psf/contrib/contrib-form/

--
nosy: +pitrou
stage:  -> patch review
versions:  -Python 3.3

___
Python tracker 

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



[issue20779] Add pathlib.chown method

2014-02-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I don't know about philosophical reasons ;-), but I don't think chown is very 
often used. Do you know of a context where it is?

--

___
Python tracker 

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



[issue19021] AttributeError in Popen.__del__

2014-02-27 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Hmm... if this *already* affects Ubuntu users, shouldn't this be fixed in 3.4 
proper? It's extremely likely that someone else will be affected too.

--

___
Python tracker 

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



[issue19021] AttributeError in Popen.__del__

2014-02-27 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

If this fixes the problem, shouldn't the issue be closed and a NEWS item added? 
 I'm going to test the patch locally.

--

___
Python tracker 

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



[issue20796] Test failures when running with PYTHONDONTWRITEBYTECODE

2014-02-27 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8afcfe6dfd6e by Benjamin Peterson in branch '3.3':
fix importlib test failure when bytecode writing is disabled (closes #20796)
http://hg.python.org/cpython/rev/8afcfe6dfd6e

New changeset 15a0bbfb27f1 by Benjamin Peterson in branch 'default':
merge 3.3 (#20796)
http://hg.python.org/cpython/rev/15a0bbfb27f1

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

___
Python tracker 

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



[issue20796] Test failures when running with PYTHONDONTWRITEBYTECODE

2014-02-27 Thread Chris Angelico

Chris Angelico added the comment:

Thanks for the fast turn-around, guys! Not that it matters hugely - I happened 
to have bytecode writing disabled to test something unrelated and noticed the 
test failure.

--

___
Python tracker 

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



[issue20796] Test failures when running with PYTHONDONTWRITEBYTECODE

2014-02-27 Thread Brett Cannon

Brett Cannon added the comment:

LGTM; I (or some other core dev) will commit when there's time.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue20620] Update the min()/max() docs for the new default argument

2014-02-27 Thread Berker Peksag

Berker Peksag added the comment:

Updated patch adressing Larry's comment. I also fixed a typo in the max() 
documentation. Thanks!

--
stage:  -> patch review
Added file: http://bugs.python.org/file34248/issue20620_v2.diff

___
Python tracker 

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



[issue20796] Test failures when running with PYTHONDONTWRITEBYTECODE

2014-02-27 Thread Berker Peksag

Berker Peksag added the comment:

Updated patch adressing Brett's comment. Thanks!

--
stage:  -> patch review
Added file: http://bugs.python.org/file34247/issue20796_v2.diff

___
Python tracker 

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



[issue19021] AttributeError in Popen.__del__

2014-02-27 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

On Feb 27, 2014, at 03:46 PM, STINNER Victor wrote:

>Serhiy fixed the issue #19255 with the changeset 6a1711c96fa6, but this
>changeset will wait Python 3.4.1.

Okay, thanks.  I was reviewing and rather liked the less invasive patch, but
if this one is going to make it into 3.4.1, I'll review it and test it
locally.  We can patch Ubuntu's 3.4 for now.

--

___
Python tracker 

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



[issue20798] Reversed order in testtools messages

2014-02-27 Thread R. David Murray

R. David Murray added the comment:

Testtools is not part of the stdlib.  Are you saying there is a bug in the 
stdlib assertEqual?  If so, can you demonstrate the bug using just stdlib-based 
code?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue20796] Test failures when running with PYTHONDONTWRITEBYTECODE

2014-02-27 Thread Brett Cannon

Changes by Brett Cannon :


--
assignee:  -> brett.cannon
nosy: +brett.cannon

___
Python tracker 

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



[issue20799] Turn on all tests in test.test_importlib.source.test_file_loader

2014-02-27 Thread Brett Cannon

New submission from Brett Cannon:

Some tests have a leading underscore which means they were probably turned off 
for testing purposes but forgot to be flipped back on. Should turn them back on 
and make sure that they actually still pass.

--
assignee: brett.cannon
components: Library (Lib)
keywords: easy
messages: 212367
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: Turn on all tests in test.test_importlib.source.test_file_loader
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



[issue20798] Reversed order in testtools messages

2014-02-27 Thread Pete Zaitcev

New submission from Pete Zaitcev:

When using an assert such as self.assertEquals(tester(), expected), an error 
message suggests wrong argument order (as in, not the order in examples in the 
documentation). Apparently this is confusing enough that OpenStack even opened 
a whole bunch of bugs and filed patches to swap the order in the tests:
 https://bugs.launchpad.net/ceilometer/+bug/1277104

If the code is:

import testtools

class TestConfigTrueValue(testtools.TestCase):
def test_testEquals(self):
reference = "reference-0123456789012345678901234567890123456789"
def function_under_test():
return "actual-0123456789012345678901234567890123456789"
self.assertEquals(function_under_test(), reference)

then running it yields

[zaitcev@guren xxx]$ python3 -c 'import nose; nose.main()'
F
==
FAIL: testic.TestConfigTrueValue.test_testEquals
--
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/q/zaitcev/tmp/xxx/testic.py", line 10, in test_testEquals
self.assertEquals(function_under_test(), reference)
  File "/usr/lib/python3.3/site-packages/testtools/testcase.py", line 322, in 
assertEqual
self.assertThat(observed, matcher, message)
  File "/usr/lib/python3.3/site-packages/testtools/testcase.py", line 417, in 
assertThat
raise MismatchError(matchee, matcher, mismatch, verbose)
testtools.matchers._impl.MismatchError: !=:
reference = 'actual-0123456789012345678901234567890123456789'
actual= 'reference-0123456789012345678901234567890123456789'

--
components: Library (Lib)
messages: 212366
nosy: zaitcev
priority: normal
severity: normal
status: open
title: Reversed order in testtools messages
type: behavior
versions: Python 2.7, Python 3.3

___
Python tracker 

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



[issue20796] Test failures when running with PYTHONDONTWRITEBYTECODE

2014-02-27 Thread Berker Peksag

Berker Peksag added the comment:

Here's a patch to skip the test if PYTHONDONTWRITEBYTECODE is not None.

--
keywords: +patch
nosy: +berker.peksag
Added file: http://bugs.python.org/file34246/issue20796.diff

___
Python tracker 

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



[issue20790] Make sure exec_module() implementations are documented

2014-02-27 Thread Brett Cannon

Brett Cannon added the comment:

Somehow managed to glance right over it. Guess I was more frazzled than I 
thought last night.

--
resolution:  -> invalid
status: open -> closed

___
Python tracker 

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



[issue20792] IDLE: Extend tests for PathBrowser

2014-02-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

We do not usually make pure style changes in a file unless the code is being 
reviewed and edited. Even then, I focus on changes that make the file easier to 
read and understand, as is necessary to write tests. One example is adding 
missing spaces after commas in function definitions and calls (not a problem in 
this file, as far as I see). Another is to add PEP8 style docstrings to 
document the behavior being tested. That is an issue for this file. The name 
clashes do not bother me: 'file' is no longer a builtin in 3.x; 'sorted' was 
used in the file before the builtin was added (though I might think of 
something different if I were writing today). So lets leave the names alone and 
focus on good docstrings.

--

___
Python tracker 

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



[issue16226] IDLE crashes on *File / Path browser*

2014-02-27 Thread Terry J. Reedy

Terry J. Reedy added the comment:

S.H. moved his patch for new tests to new issue #20792.

--

___
Python tracker 

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



[issue19021] AttributeError in Popen.__del__

2014-02-27 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy fixed the issue #19255 with the changeset 6a1711c96fa6, but this 
changeset will wait Python 3.4.1.

--
nosy: +haypo

___
Python tracker 

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



[issue19021] AttributeError in Popen.__del__

2014-02-27 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +larry

___
Python tracker 

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



[issue20739] PEP 463 (except expression) implementation

2014-02-27 Thread Chris Angelico

Chris Angelico added the comment:

One test failing, due to Tools/parser/unparse.py not knowing how to unparse an 
except expression. Otherwise, test suite passes (with most of the stdlib 
unchanged). I'm about to try writing an actual conversion script which will 
rewrite the stdlib, and then see how much of the test suite still passes. (For 
this, I'll be doing only the easiest/simplest translations - the ones that 
involve simple or augmented assignment, and return statements - and I'll ignore 
PEP 8.)

--
Added file: http://bugs.python.org/file34245/unparse_exceptexpr.diff

___
Python tracker 

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



[issue19021] AttributeError in Popen.__del__

2014-02-27 Thread Barry A. Warsaw

Barry A. Warsaw added the comment:

We're seeing this in Ubuntu now that 3.4 is the default.

https://bugs.launchpad.net/python/+bug/1284469

--
nosy: +barry

___
Python tracker 

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



[issue20797] zipfile.extractall should accept bytes path as parameter

2014-02-27 Thread Laurent Mazuel

New submission from Laurent Mazuel:

Many methods which use path in Python now accept string or bytes in parameter 
(e.g. all methods in "os.path", the "open" method, etc.).

Actually, sometimes it is not possible to handle a file without using bytes 
path. For example, path coded in another encoding system than the current 
locale system (e.g. a Windows filename encoded in "cp1252" against a Linux 
"utf-8" system).

Since "zipfile.extractall" uses path, it should accept bytes as path. Currently 
it leads to an error:
  File "/usr/local/lib/python3.3/zipfile.py", line 1262, in _extract_member
targetpath = os.path.join(targetpath, arcname)
  File "/usr/local/lib/python3.3/posixpath.py", line 92, in join
"components.") from None
TypeError: Can't mix strings and bytes in path components.

This bug is closely related to bug 20329 but is not the same (but maybe this 
enhancement will create a good debate around bytes support in zipfile module 
:-) )

--
components: Library (Lib)
messages: 212358
nosy: Laurent.Mazuel
priority: normal
severity: normal
status: open
title: zipfile.extractall should accept bytes path as parameter
type: enhancement
versions: Python 3.3

___
Python tracker 

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



[issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded

2014-02-27 Thread Zachary Ware

Zachary Ware added the comment:

Agreed with Vajrasky, the 2.7 commit wasn't as clean as it could be (sorry I 
didn't get an actual review done before you committed, I posted my last test 
results in a bit of a hurry).  The commented out line should either be removed, 
or used instead of the 'with' block above it.  I would actually vote for using 
writeTmp, and make a new issue for making writeTmp use a context manager.

Also, I think the new test_readline could be made a little clearer by putting

+fi = FileInput(files=TESTFN, openhook=hook_encoded('ascii'), bufsize=8)
+self.assertEqual(fi.readline(), u'A\n')
+self.assertEqual(fi.readline(), u'B\r\n')
+self.assertEqual(fi.readline(), u'C\r')

inside a `try ... except UnicodeDecodeError: self.fail('Read to end of file')` 
block.

--

___
Python tracker 

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



[issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules

2014-02-27 Thread Berker Peksag

Changes by Berker Peksag :


--
versions: +Python 3.4 -Python 3.2

___
Python tracker 

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



[issue20796] Test failures when running with PYTHONDONTWRITEBYTECODE

2014-02-27 Thread Chris Angelico

New submission from Chris Angelico:

$ find . -name \*.pyc -delete
$ PYTHONDONTWRITEBYTECODE=1 make test

Three test failures, which all seem to be duplicates of:

==
FAIL: test_timestamp_overflow 
(test.test_importlib.source.test_file_loader.Source_SimpleTest)
--
Traceback (most recent call last):
  File 
"/home/rosuav/cpython/Lib/test/test_importlib/source/test_file_loader.py", line 
215, in test_timestamp_overflow
self.assertTrue(os.path.exists(compiled))
AssertionError: False is not true

--


It goes looking for the .pyc cached file, does not find it, and fails. Test 
should probably be skipped if bytecode isn't being written.

--
messages: 212356
nosy: Rosuav
priority: normal
severity: normal
status: open
title: Test failures when running with PYTHONDONTWRITEBYTECODE

___
Python tracker 

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



[issue20796] Test failures when running with PYTHONDONTWRITEBYTECODE

2014-02-27 Thread Chris Angelico

Changes by Chris Angelico :


--
components: +Tests
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



[issue20777] PyArg_ParseTupleAndKeywords does not respect arguments format.

2014-02-27 Thread Berker Peksag

Changes by Berker Peksag :


--
resolution:  -> invalid
stage:  -> committed/rejected

___
Python tracker 

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



[issue14302] Rename Scripts directory to bin and move python.exe to bin

2014-02-27 Thread Martin Dengler

Changes by Martin Dengler :


--
nosy: +mdengler

___
Python tracker 

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



[issue20795] Spam

2014-02-27 Thread Berker Peksag

Changes by Berker Peksag :


--
Removed message: http://bugs.python.org/msg212355

___
Python tracker 

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



[issue20795] Spam

2014-02-27 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy:  -lcarrionr
resolution:  -> invalid
stage:  -> committed/rejected
status: open -> closed
title: Feel our love and care. Order medications from our drugstore. -> Spam

___
Python tracker 

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



[issue20795] Feel our love and care. Order medications from our drugstore.

2014-02-27 Thread LuisC

New submission from LuisC:

HelloKiss those diets good bye. Lose weight quick the easy way. Watch 
video!Just for you - visit now
Buy more, pay less! Be healthy with best meds for women.

--
messages: 212355
nosy: lcarrionr
priority: normal
severity: normal
status: open
title: Feel our love and care. Order medications from our drugstore.

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread R. David Murray

R. David Murray added the comment:

We probably just forgot to add it when the bytes type was added, and there was 
of course no test that would fail since it was a new type.

--
nosy: +r.david.murray
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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread Yury Selivanov

Changes by Yury Selivanov :


--
nosy: +yselivanov

___
Python tracker 

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



[issue20794] ImportError: Bad magic number in .pyc file

2014-02-27 Thread Peter Otten

Peter Otten added the comment:

This is expected. You cannot run/import 2.6 .pyc files in python 2.7 because 
the file format has changed.

$ echo 'print "hello"' > tmp.py 
$ python2.6 -c 'import tmp'
hello
$ rm tmp.py
$ python2.7 -c 'import tmp'
Traceback (most recent call last):
  File "", line 1, in 
ImportError: Bad magic number in tmp.pyc

Naval, if you do have the source .py make sure that you delete all 
occurrences of .pyc in directories preceding the directory containing 
.py in sys.path. Sometimes this error is the result of moving a .py file 
into another directory and forgetting to delete the leftover .pyc.

--
nosy: +peter.otten

___
Python tracker 

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



[issue20794] ImportError: Bad magic number in .pyc file

2014-02-27 Thread STINNER Victor

STINNER Victor added the comment:

Can you please attach your script and give the command you are typing to 
reproduce the issue?

--
nosy: +haypo

___
Python tracker 

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



[issue20794] ImportError: Bad magic number in .pyc file

2014-02-27 Thread Naval Gupta

New submission from Naval Gupta:

Getting below compilation error:

ImportError: Bad magic number in .pyc

Ran a python abc.py module which is trying to import .pyc during compilation

Python Interpreter used to run: Python 2.7
Python pre-compiled file .pyc is compiled using Python 2.6

--
components: Interpreter Core
messages: 212351
nosy: navalkgupta
priority: normal
severity: normal
status: open
title: ImportError: Bad magic number in .pyc file
type: compile error
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



[issue20793] locale.setlocale()

2014-02-27 Thread René Fleschenberg

New submission from René Fleschenberg:

locale.setlocale() does not work if you pass it a ``unicode`` object instead of 
a ``str`` (locale.py, line 576):

``if locale and type(locale) is not type(""):``

Maybe it would be better to do a check like this?

``if locale and not isinstance(locale, basestring):``

In particular, this can bite you if you use the ``unicode_literals`` future 
import, displaying a not-so-helpful error message ("ValueError: too many values 
to unpack" in _build_localename).

--
messages: 212350
nosy: rene
priority: normal
severity: normal
status: open
title: locale.setlocale()
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



[issue20329] zipfile.extractall fails in Posix shell with utf-8 filename

2014-02-27 Thread Laurent Mazuel

Laurent Mazuel added the comment:

Thank for your answer.

Unfortunately, I cannot test easily python 3.4 for now. But I have downloaded 
the source code and "diff" from 3.3 to 3.4 the "zipfile" module and see no 
difference relating to this problem. I can be wrong, maybe if some core 
improvement of Python may change something?

--

___
Python tracker 

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



[issue20792] IDLE: Extend tests for PathBrowser

2014-02-27 Thread Steven D'Aprano

Steven D'Aprano added the comment:

I think you may have misread PEP 8. It does not recommend a trailing underscore 
for names that shadow built-ins (e.g. file_ instead of file), it only 
recommends a trailing underscore when you need to use a keyword as a name (e.g. 
class_ instead of class). Shadowing built-ins should be done with care, but is 
permitted.

If there is little or no risk of confusion with the built-ins, there is no need 
to worry about shadowing them. It's just another name.

--
nosy: +stevenjd

___
Python tracker 

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



[issue20440] Use Py_REPLACE/Py_XREPLACE macros

2014-02-27 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Well, Larry, I certainly am in no mood to start wrangling on python-dev.  A 25 
year old C standard is likely to be very mature and reliable by now.  Why take 
risks? :)

#Py_LOCAL_INLINE exists and demonstrates that we can make use of them when 
possible.
We could create a #Py_INLINE macro that would work the same, only not 
necessarily yield inline on some of the older compilers.

It would really be healthy for the pyton code base, for quality, for semantics, 
and for the learning curve, if we could start to rely less on macros in the 
core.

Ah well, perhaps I'll throw this out there...

--

___
Python tracker 

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



[issue20440] Use Py_REPLACE/Py_XREPLACE macros

2014-02-27 Thread Kristján Valur Jónsson

Kristján Valur Jónsson added the comment:

Are you referring to the Py_LOCAL_INLINE macro?
I see that we have no Py_INLINE.  Py_LOCAL_INLINE includes the "static" 
qualifier, and in fact, if there is no "USE_INLINE" defined, then all that it 
does is to add "static".

Would having a "Py_INLINE(type)" macro, that is the same, but without the 
static (except when USE_INLINE is false) make a difference?  It would be a bit 
odd to have Py_LOCAL_INLINE() functions defined in the headers.

I'm not sure that there is any practical difference between "static inline" and 
"inline".  But there is a difference between "static" and "inline".

It would be great if we could start writing stuff like the Py_INCREF() and 
Py_DECREF() as functions rather than macros, but for this to happen we must be 
able to trust that they are really inlined.

--

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread STINNER Victor

STINNER Victor added the comment:

bytes is immutable, I don't why we would duplicate it.

--
nosy: +haypo

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread Peter Otten

Peter Otten added the comment:

Assuming that the current behaviour is by accident here's a patch that adds the 
bytes type to the _copy_dispatch registry.

--
keywords: +patch
nosy: +peter.otten
Added file: http://bugs.python.org/file34244/copy_bytes.patch

___
Python tracker 

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



[issue20792] IDLE: Extend tests for PathBrowser

2014-02-27 Thread Saimadhav Heblikar

New submission from Saimadhav Heblikar:

This patch does 
1.Remove pep8 violations in PathBrowser.py . Replaces "file","dir","sorted" by 
"file_","dir_","sorted_" respectively.
2.Extends test coverage for PathBrowser.py in idle_test/test_PathBrowser.py

New modules now under tests include
1.dirBrowserTreeItem - getText,ispackagedir
2.pathBrowserTreeItem - getText,getSublist

Only method missing a test after this patch will be listmodules.I am not too 
sure whether it requires a test for itself.it is indirectly being tested from 
lines 8 and 9(in the current tip).

--
components: IDLE, Tests
files: pathbrowser1.patch
keywords: patch
messages: 212343
nosy: sahutd, taleinat, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Extend tests for PathBrowser
versions: Python 3.4
Added file: http://bugs.python.org/file34243/pathbrowser1.patch

___
Python tracker 

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



[issue16226] IDLE crashes on *File / Path browser*

2014-02-27 Thread Saimadhav Heblikar

Changes by Saimadhav Heblikar :


Removed file: http://bugs.python.org/file34242/pathbrowser1.patch

___
Python tracker 

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



[issue20781] BZ2File doesn't decompress some .bz2 files correctly

2014-02-27 Thread Nadeem Vawda

Nadeem Vawda added the comment:

> How does one create a multi-stream bzip2 file in the first place?

If you didn't do so deliberately, I would guess that you used a parallel
compression tool like pbzip2 or lbzip2 to create your bz2 file. These tools work
by splitting the input into chunks, compressing each chunk as a separate stream,
and then concatenating these streams afterward.

Another possibility is that you just concatenated two existing bz2 files, e.g.:

$ cat first.bz2 second.bz2 >multi.bz2


> And how do I tell it's multi-stream.

I don't know of any pre-existing tools to do this, but you can write a script
for it yourself, by feeding the file's data through a BZ2Decompressor. When the
decompress() method raises EOFError, you're at the end of the first stream. If
the decompressor's unused_data attribute is non-empty, or there is data that has
not yet been read from the input file, then it is either (a) a multi-stream bz2
file or (b) a bz2 file with other metadata tacked on to the end.

To distinguish between cases (a) and (b), take unused_data + rest_of_input_file
and feed it into a new BZ2Decompressor. If don't get an IOError, then you've got
a multi-stream bz2 file.

(If you *do* get an IOError, then that's case (b) - someone's appended non-bz2
 data to the end of a bz2 file. For example, Gentoo and Sabayon Linux packages
 are bz2 files with package metadata appended, according to issue 19839.)

--

___
Python tracker 

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



[issue16226] IDLE crashes on *File / Path browser*

2014-02-27 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

This patch does 
1.Remove pep8 violations in PathBrowser.py . Replaces "file","dir","sorted" by 
"file_","dir_","sorted_" respectively.
2.Extends test coverage for PathBrowser.py in idle_test/test_PathBrowser.py

New modules now under tests include
1.dirBrowserTreeItem - getText,ispackagedir
2.pathBrowserTreeItem - getText,getSublist

Only method missing a test after this patch will be listmodules.I am not too 
sure whether it requires a test for itself.it is indirectly being tested from 
lines 8 and 9(in the current tip).

--
nosy: +sahutd
Added file: http://bugs.python.org/file34242/pathbrowser1.patch

___
Python tracker 

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



[issue20791] copy.copy(bytes) is slow

2014-02-27 Thread Frank Millman

New submission from Frank Millman:

Using copy.copy on a byte string returns a new copy instead of the original 
immutable object. Using copy.deepcopy returns the original, as expected. 
Testing with timeit, copy.copy is much slower than copy.deepcopy.

>>> import copy
>>>
>>> a = 'a'*1000  # string
>>> copy.copy(a) is a
True
>>> copy.deepcopy(a) is a
True
>>>
>>> b = b'b'*1000  # bytes
>>> copy.copy(b) is b
False
>>> copy.deepcopy(b) is b
True

--
components: Library (Lib)
messages: 212340
nosy: frankmillman
priority: normal
severity: normal
status: open
title: copy.copy(bytes) is slow
type: performance
versions: Python 3.3

___
Python tracker 

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



[issue20781] BZ2File doesn't decompress some .bz2 files correctly

2014-02-27 Thread James Dominy

James Dominy added the comment:

How does one create a multi-stream bzip2 file in the first place? And how do I 
tell it's multi-stream.

--

___
Python tracker 

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