[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures

2014-10-12 Thread Georg Brandl

Georg Brandl added the comment:

While I can feel your pain regarding the use case you describe, I don't think 
this has enough general value to add to CPython.  It is not really related to 
PYTHONHASHSEED, since we never made guarantees about hash values being stable 
across platforms and Python versions.  PYTHONHASHSEED was introduced to address 
backwards compatibility for the rare cases where stable hash values are 
required within a platform/version combination.

Without knowing anything about your libraries, would it not be possible to 
create a stable representation within the test case for comparison purposes, 
without having to write the unstable result to a file and then parsing it?  
That should be acceptable, given that creating and manipulating those graphs 
will probably also take significant time in the first place.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll

2014-10-12 Thread Anselm Kruis

Anselm Kruis added the comment:

It's indeed a very low priority issue.

You mention VS2008 and VS2010 PGO compiler bugs. I'm aware of the VS 2010 bugs, 
but I didn't observe any VS 2008 PGO bug with Python 2.7. Are you aware of any 
publicly available bug reports?

About the black/white list. I started with a black list, but then I switched to 
a white list for the following reason: the goal of running the test suite is to 
generate a reasonable profile. It is not a goal to test anything. Therefore 
both white list and black listing is possible.
I consider it more likely that a newly added test breaks the PGO build than 
that an existing test will be modified in a breaking way. Therefore I consider 
the while list superior for this particular application.

But as you already stated, it is low prio.

--

___
Python tracker 

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



[issue22620] pythonw does not open on windows 8.1 x64

2014-10-12 Thread Cristian Baboi

Cristian Baboi added the comment:

I don't know if it is a documentation error for I've not read it yet.
Maybe the best way is to put a shortcut to idle in the main directory where the 
python is.

On 12 octombrie 2014 22:43:48 EEST, "R. David Murray"  
wrote:
>
>R. David Murray added the comment:
>
>I'm going to close this, then.  If you think there's a documentation
>issue we can reopen it.
>
>--
>nosy: +r.david.murray
>resolution:  -> not a bug
>stage:  -> resolved
>status: open -> closed
>type: crash -> behavior
>
>___
>Python tracker 
>
>___

--

___
Python tracker 

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



[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures

2014-10-12 Thread josch

New submission from josch:

I recently realized that the output of the following is different between 32 
bit and 64 bit architectures:

PYTHONHASHSEED=0 python3 -c 'print(hash("a"))'

In my case, I'm running some test cases which involve calling a Python module 
which creates several hundred megabyte big graphs and other things. The fastest 
way to make sure that the output I get is the same that I expect is to just 
call the md5sum or sha256sum shell tools on the output and compare them with 
the expected values. Unfortunately, some libraries I use rely on the order of 
items in Python dictionaries for their output. Yes, they should not do that but 
they also don't care and thus don't fix the problem.

My initial solution to this was to use PYTHONHASHSEED=0 which helped but I now 
found out that this is limited to producing the same hash within the set of 32 
bit and 64 bit architectures, respectively. See above line which behaves 
different depending on the integer size of architectures.

So what I'd like CPython to have is yet another workaround like PYTHONHASHSEED 
which allows me to temporarily influence the inner workings of the hash() 
function such that it behaves the same on 32 bit and 64 bit architectures. 
Maybe something like PYTHONHASH32BIT or similar?

If I understand the CPython hash function correctly, then this environment 
variable would just bitmask the result of the function with 0x or cast 
it to int32_t to achieve the same output across architectures.

Would this be possible?

My only alternative seems to be to either maintain patched versions of all 
modules I use which wrongly rely on dictionary ordering or to go to great 
lengths of parsing the (more or less) random output they produce into a sorted 
intermediary format - which seems like a bad idea because the files are several 
hundred megabytes big and this would just take very long and require additional 
complexity in handling them compared to being able to just md5sum or sha256sum 
them for the sake of checking whether my test cases succeed or not.

--
messages: 229219
nosy: josch
priority: normal
severity: normal
status: open
title: Please make it possible to make the output of hash() equal between 32 
and 64 bit architectures
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



[issue21907] Update Windows build batch scripts

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1d5485471457 by Zachary Ware in branch 'default':
Issue #21907: Partially revert changes to Windows buildbot scripts.
https://hg.python.org/cpython/rev/1d5485471457

--

___
Python tracker 

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



[issue12067] Doc: remove errors about mixed-type comparisons.

2014-10-12 Thread Martin Panter

Martin Panter added the comment:

Maybe it would be wise to split this task up and commit the bits that don’t 
need any more work. I think the existing patch might already solve Issue 22001.

--

___
Python tracker 

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



[issue22001] containers "same" does not always mean "__eq__".

2014-10-12 Thread Martin Panter

Martin Panter added the comment:

Issue 12067 has a large patch in progress that would conflict with the changes 
suggested here. However most of the concerns here may already be addressed 
there, if the patch ever goes ahead.

--
nosy: +vadmium

___
Python tracker 

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



[issue22614] Idle: problem in PyShellEditorWindow.color_breakpoint_text

2014-10-12 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue22614] Idle: problem in PyShellEditorWindow.color_breakpoint_text

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a4c1c9b534a2 by Terry Jan Reedy in branch '2.7':
Issue #22614: Don't try to update deleted text.  Patch by Serhiy Storchaka.
https://hg.python.org/cpython/rev/a4c1c9b534a2

New changeset d686de84dc10 by Terry Jan Reedy in branch '3.4':
Issue #22614: Don't try to update deleted text.  Patch by Serhiy Storchaka.
https://hg.python.org/cpython/rev/d686de84dc10

New changeset 4163079a717a by Terry Jan Reedy in branch 'default':
Merge with 3.4 #22614
https://hg.python.org/cpython/rev/4163079a717a

--
nosy: +python-dev

___
Python tracker 

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



[issue21986] Idle: disable pickleability of user code objects

2014-10-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree that a test for dumps would be a good idea.  Ditto for hundreds of 
other untested functions.  I don't see this one as a priority.

PyShell imports non-idlelib modules, including re, before idlelib modules, such 
as rpc.  So the re addition is there, though I strongly doubt that compiled 
regexs are every sent to the user process.  Since about 10 different messages 
of different types are sent as part of startup, the fact that Idle does start 
is strong evidence that dumps and much of the rest of rpc is ok.  I would start 
a test of rpc by documenting the protocol and listing the messages types so at 
least one of each could be tested.

--

___
Python tracker 

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



[issue11664] Add patch method to unittest.TestCase

2014-10-12 Thread Martin Panter

Martin Panter added the comment:

[padding to avoid UTF-8 error with bug tracker]

See also Issue 22374, where an equivalent of “patch.object” is suggested as an 
example context manager for the “contextlib” documentation.

If we added a plain function or context manager rather than a new TestCase 
method, it might avoid the worries about bloating the API. Then it could be a 
generic thing for any kind of testing, and not coupled with the “unittest” 
framework.

About cleanup functions more generally, I think they already tie in well with 
the TestCase.addCleanup() API. Perhaps it could handle general context managers 
as well though, by inheriting an ExitStack.enter_context() method or providing 
an ExitStack attribute.

--

___
Python tracker 

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



[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2014-10-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I rechecked and test_gzip passes on 2.7 Win7, I checked revision history and 
this is the only gzip or test_gzip patch for several months.

--

___
Python tracker 

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



[issue22559] [backport] ssl.MemoryBIO

2014-10-12 Thread Alex Gaynor

Alex Gaynor added the comment:

Would you be ok with it going into 2.7.10? The biggest argument in favor of 
this is that it significantly reduces the diff between 2.x and 3.x's SSL 
module, specifically it removes the one major difference between the two of 
them.

--

___
Python tracker 

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



[issue11664] Add patch method to unittest.TestCase

2014-10-12 Thread Ezio Melotti

Ezio Melotti added the comment:

I'm -0.5 on this as well, and agree that we should try to keep the TestCase API 
small.

On one hand, a patch method available without extra imports would be handy, and 
having this as a generic function/method in unittest seems more natural to me 
than having it in unittest.mock.  On the other hand, adding it to unittest has 
downsides as well: it increases API complexity, adds duplication and possibly 
confusion (people might wonder if they should use TestCase.patch or 
unittest.mock.patch, and if there are any differences).  Adding both .patch and 
.patch_object makes things even worse.

--

___
Python tracker 

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



[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2014-10-12 Thread koobs

koobs added the comment:

koobs@10-STABLE-amd64:~ % locale
LANG=
LC_CTYPE="C"
LC_COLLATE="C"
LC_TIME="C"
LC_NUMERIC="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_ALL=

--

___
Python tracker 

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



[issue11664] Add patch method to unittest.TestCase

2014-10-12 Thread Robert Collins

Robert Collins added the comment:

FWIW I'd really like to be reducing the TestCase API not extending it - 
particularly since there are lots of good convenient ways of doing this already 
(not least mock.patch/mock.patch.object).

So I'm -0.5 on adding this, as I don't see it adding value. That said, I'll 
happily review for correctness if there is consensus that we want it.

Relatedly I'd like to find some way to let regular functions tie into cleanups 
automatically, so that we don't need helpers like this *at all*. That probably 
needs a PEP though.

--

___
Python tracker 

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



[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2014-10-12 Thread Ezio Melotti

Changes by Ezio Melotti :


--
status: closed -> open

___
Python tracker 

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



[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2014-10-12 Thread koobs

koobs added the comment:

This broke a FreeBSD buildbot (koobs-freebsd10), complete log attached.

--
nosy: +koobs
Added file: http://bugs.python.org/file36893/koobs-freebsd10-build-742.log

___
Python tracker 

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



[issue22599] traceback: errors in the linecache module at exit

2014-10-12 Thread STINNER Victor

STINNER Victor added the comment:

> Alternative solution of this issue would be to use "from builtins import open 
> as _open" instead of "import builtins".

Right. I prefer your solution because it's much simpler, it doesn't make 
traceback less usable at exit, and it doesn't need to make assumption on the 
Python status.

Here is a patch implementing this idea with an unit test.

--
Added file: http://bugs.python.org/file36892/traceback_at_exit.patch

___
Python tracker 

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



[issue11664] Add patch method to unittest.TestCase

2014-10-12 Thread Michael Foord

Michael Foord added the comment:

The patch (including lazy import) looks good, and the test looks ok too. I 
still think that patch should be the default instead of patch.object - although 
I wouldn't object to a second method (name?) if there was significant demand.

--

___
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-10-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

You left this issue number off your tkinter test updates, such as f6f098bdb843. 
 By using .update_idletasks instead of .update, are you assuming that their are 
no user events, or that they should be ignormed?

I was wondering whether it would be Ok, if not a good idea, to run tests, and 
maybe Idle itself, with NoDefaultRoot.  I see that is already done for tkinter 
tests. I cannot use exactly the same design as AbstractTkTest since I sometimes 
do other things in setUp/tearDownClass, but I could define create_test_root() 
and delete_test_root() functions in a support file.

--

___
Python tracker 

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



[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2014-10-12 Thread STINNER Victor

STINNER Victor added the comment:

> This allow other tests which leaks the same file to be reported too.

I don't understand your answer. The "fn.startswith(support.TESTFN)" test is not 
used in get_files().

If I understood correctly, your patch changes two things:

- it now reports files created for tests but not deleted (purpose of this issue)
- it removes more files than before

I don't understand why you want to remove more files than before. You may open 
a different issue, or at least explain the rationale.

I never see any forgotten test file after running tests, so I don't see why you 
are worried because of them. And with your first patch, we will now noticed 
forgotten files, so we can just fix tests.

--

___
Python tracker 

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



[issue21603] IDLE: Document SaveAs extension display on Mac

2014-10-12 Thread Ned Deily

Ned Deily added the comment:

If Raymond concurs that either unchecking the Hide Extensions option or 
checking the Show All Filenmame Extensions preference solves the problem for 
him, we should just close this issue.  In this particular case, the file is 
actually saved with a .py extension; it's just that the extension part is not 
displayed in the standard OS file dialogs.  It is visible via, say, "ls" in a 
UNIX shell.  This is standard OS X application behavior and caters to two 
different styles of file interaction.  All OS X applications that use the 
standard file save dialogs work this way.  See, for example, 
http://support.apple.com/kb/PH13920?viewlocale=en_US&locale=en_US.

--

___
Python tracker 

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



[issue22620] pythonw does not open on windows 8.1 x64

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

I'm going to close this, then.  If you think there's a documentation issue we 
can reopen it.

--
nosy: +r.david.murray
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue22620] pythonw does not open on windows 8.1 x64

2014-10-12 Thread Cristian Baboi

Cristian Baboi added the comment:

Sorry! I launched pythonw without ascript. I found idle and it works.

--

___
Python tracker 

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



[issue22390] test.regrtest should complain if a test doesn't remove temporary files

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

How about regrtest_warn_lost_files.patch?

--

___
Python tracker 

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



[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Terry for the review.

--
resolution:  -> fixed
stage: commit 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



[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 272c78c9c47e by Serhiy Storchaka in branch '2.7':
Issue #13664: GzipFile now supports non-ascii Unicode filenames.
https://hg.python.org/cpython/rev/272c78c9c47e

--
nosy: +python-dev

___
Python tracker 

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



[issue20815] ipaddress unit tests PEP8

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

Since ipaddress is relatively new, the package maintainers approved the patch, 
and it is mostly blank lines (and therefore not a problem with
annotate) I committed this.  Thank Michel.

--
nosy: +r.david.murray
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
versions: +Python 3.4

___
Python tracker 

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



[issue20815] ipaddress unit tests PEP8

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 27a02eb9273f by R David Murray in branch '3.4':
#20815: small readability improvements in ipaddress tests.
https://hg.python.org/cpython/rev/27a02eb9273f

New changeset 4c9d27eef892 by R David Murray in branch 'default':
#20815: small readability improvements in ipaddress tests.
https://hg.python.org/cpython/rev/4c9d27eef892

--
nosy: +python-dev

___
Python tracker 

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



[issue22620] pythonw does not open on windows 8.1 x64

2014-10-12 Thread Vandana Rao

Vandana Rao added the comment:

I had the same problem. I assume that you are using IDLE. Hopefully it works.

--
nosy: +Vandana.Rao

___
Python tracker 

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



[issue22620] pythonw does not open on windows 8.1 x64

2014-10-12 Thread Mark Lawrence

Mark Lawrence added the comment:

The purpose of pythonw is to run GUI scripts without having a console.  How are 
you trying to run it, what do you expect to happen and what actually happens?  
I'm assuming that you mean 3.4 as 3.5 hasn't been released yet.

--
nosy: +BreamoreBoy

___
Python tracker 

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



[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-10-12 Thread Ethan Furman

Ethan Furman added the comment:

I will take a look.

--

___
Python tracker 

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



[issue22620] pythonw does not open on windows 8.1 x64

2014-10-12 Thread Cristian Baboi

Cristian Baboi added the comment:

I tried both 2.7 and 3.5 versions and none of them works

--

___
Python tracker 

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



[issue13096] ctypes: segfault with large POINTER type names

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

Committed.

--
nosy: +r.david.murray
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
versions: +Python 3.4

___
Python tracker 

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



[issue13096] ctypes: segfault with large POINTER type names

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e940bb13d010 by R David Murray in branch '3.4':
#13096: Fix segfault in CTypes POINTER handling of large values.
https://hg.python.org/cpython/rev/e940bb13d010

New changeset 02c9c3204a04 by R David Murray in branch 'default':
Merge: #13096: Fix segfault in CTypes POINTER handling of large values.
https://hg.python.org/cpython/rev/02c9c3204a04

New changeset ff59b0f9e142 by R David Murray in branch '2.7':
#13096: Fix segfault in CTypes POINTER handling of large values.
https://hg.python.org/cpython/rev/ff59b0f9e142

--
nosy: +python-dev

___
Python tracker 

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



[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2014-10-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

fine with me

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



[issue22620] pythonw does not open on windows 8.1 x64

2014-10-12 Thread Cristian Baboi

New submission from Cristian Baboi:

I've just installed the latest python on windows 8.1 x64 version and it does 
not start. The console version works

--

___
Python tracker 

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



[issue22620] pythonw does not open on windows 8.1 x64

2014-10-12 Thread Cristian Baboi

Changes by Cristian Baboi :


--
components: Windows
nosy: Cristian.Baboi
priority: normal
severity: normal
status: open
title: pythonw does not open on windows 8.1 x64
type: crash
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



[issue22619] Possible implementation of negative limit for traceback functions

2014-10-12 Thread Dmitry Kazakov

Dmitry Kazakov added the comment:

Thanks. I replied to your comments at Retvield. I'll update the patch tomorrow.

--

___
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-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

These messages are produced because there are non-handled events of destroyed 
root widget. They are handled when update() is called for other root widget. To 
get rid of them you should call update_idletasks() before destroying root 
widget.

--

___
Python tracker 

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



[issue17325] improve organization of the PyPI distutils docs

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

Committed.  I changed the urls as suggested by Antoine.  I also added a link to 
the test pypi page, though I'm not sure what I did is exactly what Antoine had 
in mind.

--
nosy: +r.david.murray
resolution:  -> fixed
stage: commit 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



[issue22619] Possible implementation of negative limit for traceback functions

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I have added comments on Retvield (a system for patch reviewing). You should 
receive an email about this.

In general the patch is not optimal. There is no need to load source lines for 
dropped entries.

--

___
Python tracker 

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



[issue17325] improve organization of the PyPI distutils docs

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 12536a991007 by R David Murray in branch '3.4':
#17325: Improve distutils PyPI documentation.
https://hg.python.org/cpython/rev/12536a991007

New changeset 8e4afcaa196c by R David Murray in branch 'default':
Merge: #17325: Improve distutils PyPI documentation.
https://hg.python.org/cpython/rev/8e4afcaa196c

New changeset 77098919f819 by R David Murray in branch '2.7':
#17325: Improve distutils PyPI documentation.
https://hg.python.org/cpython/rev/77098919f819

--
nosy: +python-dev

___
Python tracker 

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



[issue21603] IDLE: Document SaveAs extension display on Mac

2014-10-12 Thread Saimadhav Heblikar

Saimadhav Heblikar added the comment:

>>Saimadhav, can you quickly try Save As with x.py on Linux?

with files of type python: filename stored on disk -> x.py
with all files type : filename stored on disk -> x.py

--

___
Python tracker 

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



[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

Committed the test finally.  Thanks, David.

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



[issue11973] kevent does not accept KQ_NOTE_EXIT (and other (f)flags)

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 35542a32cd54 by R David Murray in branch '3.4':
#11973: add test for previously fixed kevent signed/unsigned bug.
https://hg.python.org/cpython/rev/35542a32cd54

New changeset a028299c9bc2 by R David Murray in branch 'default':
Merge: #11973: add test for previously fixed kevent signed/unsigned bug.
https://hg.python.org/cpython/rev/a028299c9bc2

New changeset 38fe09772b4f by R David Murray in branch '2.7':
#11973: add test for previously fixed kevent signed/unsigned bug.
https://hg.python.org/cpython/rev/38fe09772b4f

--

___
Python tracker 

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



[issue22619] Possible implementation of negative limit for traceback functions

2014-10-12 Thread Dmitry Kazakov

Changes by Dmitry Kazakov :


--
keywords: +patch
Added file: http://bugs.python.org/file36891/9f618a0c2880.diff

___
Python tracker 

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



[issue22619] Possible implementation of negative limit for traceback functions

2014-10-12 Thread Dmitry Kazakov

Dmitry Kazakov added the comment:

Sorry, first time posting here; accidently pressed Enter.

--
hgrepos: +275

___
Python tracker 

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



[issue20335] bytes constructor accepts more than one argument even if the first one is not a string

2014-10-12 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
priority: normal -> low

___
Python tracker 

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



[issue20596] Support for alternate wcstok syntax for Windows compilers

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

Moving this back to 'patch review' stage since there's a new patch that hasn't 
been reviewed.  Perhaps this 'ping' will result in someone doing the review 
(so, no, the issue isn't dead, just sleeping :)

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



[issue22619] Possible implementation of negative limit for traceback functions

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You forgot a patch.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue17293] uuid.getnode() MAC address on AIX

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> The code you *add in this patch* uses os.popen, why not use subprocess 
> instead?

Added code is just modified copy of existing code.

> Furthermore, the code catches OSError when calling popen(), but
popen() doesn't raise an exception.

It can raise an exception in rare cases. The manual of pipe mentions this. The 
code of posix_popen() contains error handling.

> FYI os.popen() now calls subprocess...

Not in 2.7.

> It's safer to use the subprocess module instead of using a shell (see the 
> recent Shellshock story) to change the environment variables and to redirect 
> stderr.

May be, but this is different issue, which is not related to this issue. If 
os.popen should be replaced with subprocess, it should be done even without 
applying the patch of this issue. Please open new issue.

However the recent Shellshock story affects only users of platforms which use 
bash or zsh as system shell (are there any?).

> subprocess now has a convinient subprocess.DEVNULL.

Not in 2.7.

--

___
Python tracker 

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



[issue6478] time.tzset does not reset _strptime's locale time cache

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

Berker: the patch doesn't apply cleanly any more.  Also, about the 
test_bad_timezone modification...what about the previous check that the tzname 
wasn't in UTC/GMT?  Isn't that still needed?  Or perhaps better yet, an 
additional @run_with_tz decorator?  (Note that I don't really *understand* this 
code, so I may be totally off base here... :)

--
nosy: +r.david.murray
stage: commit review -> needs patch

___
Python tracker 

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



[issue10769] ast: provide more useful range information

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

Thanks.

--
stage: needs patch -> resolved

___
Python tracker 

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



[issue22618] urllib.parse.parse_qsl different results after urllib.parse.unquote

2014-10-12 Thread Alex Vaystikh

Alex Vaystikh added the comment:

It is much clearer after your insight:
- I wasn't aware that 'parse_qs' unquotes values. That's most helpful!
- I had no idea what 'keep_blank_values' were before your example, but now it 
couldn't be more obvious. I know that adding that example to docs would've 
helped me a lot! Maybe others?

Thank you for the help!

--

___
Python tracker 

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



[issue22619] Possible implementation of negative limit for traceback functions

2014-10-12 Thread Dmitry Kazakov

New submission from Dmitry Kazakov:

This is the possible patch for this proposal: 
https://mail.python.org/pipermail/python-ideas/2014-October/029826.html.

--
components: Library (Lib)
messages: 229167
nosy: vlth
priority: normal
severity: normal
status: open
title: Possible implementation of negative limit for traceback functions
type: enhancement
versions: Python 3.5

___
Python tracker 

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



[issue22619] Possible implementation of negative limit for traceback functions

2014-10-12 Thread Dmitry Kazakov

Dmitry Kazakov added the comment:

def _extract_tb_or_stack_iter(curr, limit, extractor):
# Distinguish frames from tracebacks (need to import types)
if limit is None:
limit = getattr(sys, 'tracebacklimit', None)
elif limit < 0 and isinstance(curr, types.TracebackType):
seq = list(_extract_tb_or_stack_iter(curr, None, extractor))
yield from seq[limit:]
else:
pass

--

___
Python tracker 

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



[issue22526] file iteration SystemError for huge lines (2GiB+)

2014-10-12 Thread Benjamin Peterson

Changes by Benjamin Peterson :


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

___
Python tracker 

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



[issue7665] test_urllib2 and test_ntpath fail if path contains "\"

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is an attempt to reproduce my patch.

--
Added file: http://bugs.python.org/file36890/issue7665.patch

___
Python tracker 

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



[issue10769] ast: provide more useful range information

2014-10-12 Thread Sven Brauch

Sven Brauch added the comment:

Yes, this issue can be closed.

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

___
Python tracker 

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



[issue22616] Allow connecting AST nodes with corresponding source ranges

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

OK, reading the followon links just added to issue issue 10769, it seems clear 
you don't need to advocate for the idea of supporting external tools, there 
seems to be consensus agreement for that.  So now it is down to specific 
proposals and patches.  And reviews of patches, those are equally important :)

--

___
Python tracker 

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



[issue17293] uuid.getnode() MAC address on AIX

2014-10-12 Thread STINNER Victor

STINNER Victor added the comment:

+cmd = 'LC_ALL=C %s %s 2>/dev/null' % (executable, '-ia')

It's safer to use the subprocess module instead of using a shell (see the 
recent Shellshock story) to change the environment variables and to redirect 
stderr. subprocess now has a convinient subprocess.DEVNULL. So it's something 
like:

env = os.environ.copy()
env['LC_ALL'] = 'C'
process = subprocess.Popen([executable, '-ia'], stderr=subprocess.DEVNULL)
...

--

___
Python tracker 

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



[issue17293] uuid.getnode() MAC address on AIX

2014-10-12 Thread STINNER Victor

STINNER Victor added the comment:

FYI os.popen() now calls subprocess... So it's safe to call directly subprocess.

--
nosy: +haypo

___
Python tracker 

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



[issue7665] test_urllib2 and test_ntpath fail if path contains "\"

2014-10-12 Thread STINNER Victor

STINNER Victor added the comment:

> Oh-oh, I didn't attached my patch and cleared my working space.

Too bad. I did the same mistake yesterday :-/

--

___
Python tracker 

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



[issue17293] uuid.getnode() MAC address on AIX

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

Charles-François Natali added the comment:

Why is that a different issue?
The code you *add in this patch* uses os.popen, why not use subprocess instead?

Furthermore, the code catches OSError when calling popen(), but
popen() doesn't raise an exception.

--

___
Python tracker 

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



[issue7665] test_urllib2 and test_ntpath fail if path contains "\"

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Oh-oh, I didn't attached my patch and cleared my working space.

--

___
Python tracker 

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



[issue10769] ast: provide more useful range information

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

OK, so that patch was committed.  Does that mean this one can be close?  (I'm 
not familiar with the code in question.)

--

___
Python tracker 

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



[issue22618] urllib.parse.parse_qsl different results after urllib.parse.unquote

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

Eh, that "Isn't it obvious" comment was uncalled for.  Of course it isn't 
obvious, especially when the docs are unclear.

--

___
Python tracker 

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



[issue22618] urllib.parse.parse_qsl different results after urllib.parse.unquote

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

Isn't it obvious that you have to parse before you unquote?  That's the purpose 
of quoting, after all.  I suppose that is one of those "beginner mind" things 
that is obvious only because I'm an experienced programmer...and that there are 
web servers that do it wrong. 

The docs could definitely use some improvement, since they don't mention that 
parse_qs automatically unquotes the values...it is implicit in the fact that 
urlencode with doseq=true is the inverse, and it encodes them, but it should be 
made explicit.

You also might want to take note of the 'keep_blank_values' attribute, which 
could also use a doc improvement (it isn't obvious from the text what 'blank 
values' are):

>>> parse_qs('a=1&b=2&b=1&a%3Donly_appears_after_unquote', 
>>> keep_blank_values=True)
{'a': ['1'], 'b': ['2', '1'], 'a=only_appears_after_unquote': ['']}

--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python, r.david.murray
versions: +Python 2.7, Python 3.5

___
Python tracker 

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



[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I there are no objections I'll commit the patch soon.

--

___
Python tracker 

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



[issue17293] uuid.getnode() MAC address on AIX

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is different issue and can be applied only to 3.5.

--

___
Python tracker 

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



[issue17293] uuid.getnode() MAC address on AIX

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

Charles-François Natali added the comment:

My only comment would be to use subprocess instead of os.popen().

--

___
Python tracker 

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



[issue22616] Allow connecting AST nodes with corresponding source ranges

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

The "python develop team" is a group of volunteers.  What you need to do to 
move this forward is to work on patches (or polishing patches, in the case of 
issue 16806) for open issues for which there has been no objection, and build a 
consensus for fixing the issues for which there has been objection.

Based on the issue 10769 discussion, it sounds like it would be worthwhile to 
go to python-ideas and advocate for the position that the ast parser should be 
enhanced for the kind of use cases you are talking about.  It is possible a PEP 
would be required, but it is also fairly likely that one will not be.

Personally I'm in favor of supporting such use cases, but I'm not involved in 
maintaining any of the relevant code nor do I have an interest in getting 
involved at this time.

--

___
Python tracker 

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



[issue13664] UnicodeEncodeError in gzip when filename contains non-ascii

2014-10-12 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue17293] uuid.getnode() MAC address on AIX

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If there are no objections, I'll commit the patch soon.

--

___
Python tracker 

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



[issue21842] Fix IDLE in unicodeless build

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Most tests which detects no-unicode build, assume that the unicode doesn't 
exist. It can be confused to introduce faked public (non-underscored) name.

--

___
Python tracker 

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



[issue10769] ast: provide more useful range information

2014-10-12 Thread Sven Brauch

Sven Brauch added the comment:

Hi,

Mailing list thread: 
https://mail.python.org/pipermail/python-dev/2012-December/123320.html
Discussion on the patch: http://bugs.python.org/issue16795

Greetings,
Sven

--

___
Python tracker 

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



[issue10769] ast: provide more useful range information

2014-10-12 Thread R. David Murray

R. David Murray added the comment:

If there was a python-ideas or python-dev thread that resulted in consensus 
approval of this change, can someone post a link to it?

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



[issue18873] "Encoding" detected in non-comment lines

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I haven't fixed all bugs in handling encoding cookie yet (there are separate 
issues). Well, this issue can be closed, I'll open new issue about the PEP when 
will be needed. The PEP should be corrected because it affects how other Python 
implementations and other tools handle this.

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



[issue22526] file iteration SystemError for huge lines (2GiB+)

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset be600ea4ad13 by Serhiy Storchaka in branch '2.7':
Fixed and optimized a test of issue #22526.
https://hg.python.org/cpython/rev/be600ea4ad13

--

___
Python tracker 

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



[issue22586] urljoin allow_fragments doesn't work

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9eed2e7fa764 by Georg Brandl in branch '3.4':
Closes #22586: clarify meaning of allow_fragments in urlparse.
https://hg.python.org/cpython/rev/9eed2e7fa764

New changeset c2eda29a8ccb by Georg Brandl in branch '2.7':
Closes #22586: clarify meaning of allow_fragments in urlparse.
https://hg.python.org/cpython/rev/c2eda29a8ccb

--
nosy: +python-dev
resolution:  -> fixed
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



[issue22618] urllib.parse.parse_qsl different results after urllib.parse.unquote

2014-10-12 Thread Alex Vaystikh

Changes by Alex Vaystikh :


--
type:  -> behavior

___
Python tracker 

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



[issue22618] urllib.parse.parse_qsl different results after urllib.parse.unquote

2014-10-12 Thread Alex Vaystikh

New submission from Alex Vaystikh:

parsing query-string before and after cleaning with urllib.parse.unquote can 
have very different results: 
http://nbviewer.ipython.org/gist/bornio/e112e6d8d04dfed898c8

Perhaps it should be better documented, or make the method more idempotent?

--
components: Library (Lib)
messages: 229144
nosy: Alex.Vaystikh, orsenthil
priority: normal
severity: normal
status: open
title: urllib.parse.parse_qsl different results after urllib.parse.unquote
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



[issue5700] io.FileIO calls flush() after file closed

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yet one related bug is that flush() isn't called at all if the file was opened 
with closefd=False.

>>> import io, os
>>> class MyIO(io.FileIO):
... def flush(self):
... print('closed:', self.closed)
... 
>>> fd = os.open('test.out', os.O_WRONLY|os.O_CREAT)
>>> f = MyIO(fd, 'wb', closefd=False)
>>> f.close()

The proposed simple patch fixes both bugs.

--
assignee:  -> serhiy.storchaka
components: +IO
stage:  -> patch review
type:  -> behavior
versions: +Python 3.4, Python 3.5 -Python 3.2, Python 3.3
Added file: http://bugs.python.org/file36889/fileio_flush_closed.patch

___
Python tracker 

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



[issue22617] spam

2014-10-12 Thread Georg Brandl

Changes by Georg Brandl :


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

___
Python tracker 

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



[issue22617] spam

2014-10-12 Thread Georg Brandl

Changes by Georg Brandl :


--
title: Jobs Opportunities in France/Canada -> spam

___
Python tracker 

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



[issue22617] Jobs Opportunities in France/Canada

2014-10-12 Thread Georg Brandl

Changes by Georg Brandl :


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



[issue19232] Speed up _decimal import

2014-10-12 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 75b5617b8dfc by Stefan Krah in branch 'default':
Issue #19232: Fix sys.modules lookup (--without-threads)
https://hg.python.org/cpython/rev/75b5617b8dfc

--

___
Python tracker 

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



[issue11664] Add patch method to unittest.TestCase

2014-10-12 Thread Julian Berman

Julian Berman added the comment:

My opinion is already here re: patch vs patch.object, so I won't repeat it, but 
@Michael, if you really want .patch, are you open to adding .patch_object as 
well?

(Regardless, thanks for working on this Julien.)

--

___
Python tracker 

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



[issue21986] Idle: disable pickleability of user code objects

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It would be good to add a test of rpc.dumps().

Current code copies copyreg.dispatch_table at the moment of rpc import. But it 
can be changed later and these change will not affect private copy. For example 
the re module adds pickleability of compiled regex patterns. I think the use 
of ChainMap is more safe solution.

--

___
Python tracker 

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



[issue22616] Allow connecting AST nodes with corresponding source ranges

2014-10-12 Thread Edward K. Ream

Edward K. Ream added the comment:

I urge the Python development team to fix this and the related bugs given in 
the Post Script. The lack of an easy way of associating ast nodes with text 
ranges in the original sources is arguably the biggest hole in the Python api.

These bugs have immediate, severe, practical consequences for any tool that 
attempts to regularize (pep 8) or beautify Python code.

Consider the code for PythonTidy:
http://lacusveris.com/PythonTidy/PythonTidy-1.23.python

Every version has had bugs in this area arising from difficult workarounds to 
the hole in the API.  The entire Comments class is a horror directly related to 
these issues.

Consider Aivar's workaround to these bugs:
https://bitbucket.org/plas/thonny/src/8cdaa41aca7a5cc0b31618b6f1631d360c488196/src/ast_utils.py?at=default
See the docstring for def fix_ast_problems.  This is an absurdly difficult 
solution to what should be a trivial problem.

It's impossible to build reliable software using such heroic hacks.  The 
additional bugs listed below further complicate a nightmarish task.

In short, these bugs are *not* minor little nits.  They are preventing the 
development of reliable source-code tools.

Edward K. Ream

P.S. Here are the related bugs:

http://bugs.python.org/issue10769
Allow connecting AST nodes with corresponding source ranges

http://bugs.python.org/issue21295
Python 3.4 gives wrong col_offset for Call nodes returned from ast.parse

http://bugs.python.org/issue18374
ast.parse gives wrong position (col_offset) for some BinOp-s

http://bugs.python.org/issue16806
col_offset is -1 and lineno is wrong for multiline string expressions

EKR

--
nosy: +Edward.K..Ream

___
Python tracker 

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



[issue22614] Idle: problem in PyShellEditorWindow.color_breakpoint_text

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch which should fix this issue. The same solution already is used 
in restore_file_breaks().

--
keywords: +patch
Added file: http://bugs.python.org/file36888/issue22614.patch

___
Python tracker 

___diff -r 55d50b544a3d Lib/idlelib/PyShell.py
--- a/Lib/idlelib/PyShell.pySun Oct 12 09:53:12 2014 +0200
+++ b/Lib/idlelib/PyShell.pySun Oct 12 13:32:30 2014 +0300
@@ -151,6 +151,9 @@ class PyShellEditorWindow(EditorWindow):
 
 def color_breakpoint_text(self, color=True):
 "Turn colorizing of breakpoint text on or off"
+if self.io is None:
+# can happen if IDLE closes due to the .update() call
+return
 if color:
 theme = idleConf.GetOption('main','Theme','name')
 cfg = idleConf.GetHighlight(theme, "break")
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21603] IDLE: Document SaveAs extension display on Mac

2014-10-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

(I moved the commit message)

I am assuming that Ned is correct.  I think we should start documenting system 
peculiarities like this.  I changed the title and will leave this open for this 
purpose.

--
title: IDLE SaveAs drops the extension in the prompted filename -> IDLE: 
Document SaveAs extension display on Mac

___
Python tracker 

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



[issue15363] Idle/tkinter ~x.py 'save as' fails. closes idle

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I meant "save as ~x.py", without the "./" prefix.

--

___
Python tracker 

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



[issue15363] Idle/tkinter ~x.py 'save as' fails. closes idle

2014-10-12 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Interesting, that "save as" ./~x.py works when the "~x.py" file exists and 
doesn't work (press the "Save" button has no any effect at all, even doesn't 
close a dialog) when it does not exist on Linux.

--

___
Python tracker 

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



[issue4832] IDLE does not supply a default ext of .py on Windows or OS X for new file saves

2014-10-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Misdirected push message copied here.
New changeset 69cdf71bda12 by Terry Jan Reedy in branch '2.7':
Issue #3832: backport 677a9326b4d4 to 2.7 (and delete some obsolete code).
https://hg.python.org/cpython/rev/69cdf71bda12

--

___
Python tracker 

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



[issue3832] add force_shared Library option to create shared lib even with use_stub=False

2014-10-12 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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

___
Python tracker 

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



[issue22614] Idle: problem in PyShellEditorWindow.color_breakpoint_text

2014-10-12 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Makes sense now. Large file relative to machine speed + quick close click = 
close (at least to point of destruction of self.text) before initialization is 
complete.  Hence continued initialization fails. Yes, when closing crashed in 
Multicall, would not see initialization after close error.

Switch to .update_idletasks ignores close event, hence initialization gets to 
complete without error.  Do we want to do that?  I think not.  If one tries to 
edit gigabyte file, idle/tk will probably hang and one very well might want 
close event handled.  We could instead wrap test.tag_config with try: except 
AttributeError.  Original authors assumed this would never happen, but its 
occurrence seems like a rare but legitimate possibility that should be allowed 
for.

After sleeping, I will try to reproduce on my fast machine using Windows copy 
command.  3k EditorWindow.py is colorized too fast.

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



[issue21603] IDLE SaveAs drops the extension in the prompted filename

2014-10-12 Thread Ned Deily

Ned Deily added the comment:

Thanks, Raymond.  Upon further investigation, I think you are running into a 
user-wide behavior of OS X rather than specifically a Tk or IDLE issue.  By 
tradition and by default, OS X tries to hide file extensions in file Open or 
Save dialogs; this dates back to the days of Classic Mac OS when there was no 
concept of file extensions.  There is a (non-obvious) user preference in the OS 
X Finder's preferences (Finder -> Preferences -> Advanced -> Show all filename 
extensions) that appears to control whether extensions are displayed by default 
in standard Open and Save dialogs in all applications, not just the Finder.  
(This is with OS X 10.9.x; I believe recent earlier systems behave similarly 
although the details might be slightly different).  When the preference is 
unchecked (the default), then in "Save As" dialogs (in IDLE and other apps) a 
"Hide Extension" option box appears in the lower-left corner of the "Save As" 
popup window and, if enabled, the extension is not displayed as pa
 rt of the file name.  Unchecking the "Hide Extension" box causes the extension 
to appear.  If the Finder "Show all filename extensions" advanced preference is 
checked, then the "Hide Extension" box does not appear on the "Save As" popup 
and the extension is always displayed.  I always have the "Show all filename 
extensions" preference checked so I forgot it was there and its effect on all 
file dialogs.  My guess is that you will want to have it enabled as well and 
then you should always see extensions.

Note that for the initial "Save" of a file in IDLE (as opposed to a "Save As"), 
Python 3.4 supplies a default extension of ".py" which is displayed regardless 
of the Finder preference setting; but Python 2.7 up through the current 2.7.8 
does not supply the default.  That changes in 2.7.9 as Terry has recently 
backported the 3.x change to 2.7 (Issue4832, although the commit message for 
the backport appears in Issue3832 due to a typo).

--

___
Python tracker 

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



  1   2   >