[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Laura Creighton

New submission from Laura Creighton:

webmaster is hearing from children who have downloaded 3.5 but who
are still getting 2.7 when they click on desktop Python icons, and
type python at a console prompt.

a checkbox on the installer saying 'make this my default python' that
would then go off any do all that is necessary in this regard would
make their lives easier.

--
components: Installation, Windows
messages: 252595
nosy: lac, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Add 'make this my default python' to windows installs for Python3.5 and 
later
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b2f3cbdc0f2d by Victor Stinner in branch 'default':
Issue #25349: Optimize bytes % args using the new private _PyBytesWriter API
https://hg.python.org/cpython/rev/b2f3cbdc0f2d

--
nosy: +python-dev

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

bench_bytes_format.py: micro-benchmark testing a few formats. Some tests are 
focused on the implementation of _PyBytesWriter to ensure that the optimization 
is efficient.

Except of a single test (which is not really revelant, it takes less than 500 
nanoseconds), all tests are faster.

The b"xx %s" % b"y" test confirms that the optimization disabling 
overallocation for the last write is effective.

Results:

Common platform:
Timer info: namespace(adjustable=False, 
implementation='clock_gettime(CLOCK_MONOTONIC)', monotonic=True, 
resolution=1e-09)
Python unicode implementation: PEP 393
CPU model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
Platform: Linux-4.1.6-200.fc22.x86_64-x86_64-with-fedora-22-Twenty_Two
CFLAGS: -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g 
-fwrapv -O3 -Wall -Wstrict-prototypes
Timer: time.perf_counter
Bits: int=32, long=64, long long=64, size_t=64, void*=64

Platform of campaign orig:
SCM: hg revision=1aae9b6a6929 tag=tip branch=default date="2015-10-09 01:34 
-0400"
Timer precision: 64 ns
Python version: 3.6.0a0 (default:1aae9b6a6929, Oct 9 2015, 11:33:56) [GCC 5.1.1 
20150618 (Red Hat 5.1.1-4)]
Date: 2015-10-09 11:34:11

Platform of campaign writer:
SCM: hg revision=fc2c11a19ae1+ tag=tip branch=default date="2015-10-09 11:48 
+0200"
Timer precision: 61 ns
Python version: 3.6.0a0 (default:fc2c11a19ae1+, Oct 9 2015, 12:16:16) [GCC 
5.1.1 20150618 (Red Hat 5.1.1-4)]
Date: 2015-10-09 12:16:31

---++--
use smaller buffer |   orig |writer
---++--
b"hello %s" % b"world" |  13 ns (*) |   12 ns (-5%)
b"hello %-100s" % b"world" | 158 ns (*) |  98 ns (-38%)
b"x=%d" % 123  |  13 ns (*) | 12 ns
b"x=%f" % 1.2  |  13 ns (*) | 13 ns
b"x=%100d" % 123   | 156 ns (*) |  166 ns (+7%)
---++--
Total  | 353 ns (*) | 301 ns (-15%)
---++--

-+-+---
"hello %s" % long_string |orig | writer
-+-+---
fmt = b"hello %s"; arg = b"x" * 10; fmt % arg|   98 ns (*) |   86 ns (-12%)
fmt = b"hello %s"; arg = b"x" * 100; fmt % arg   |   85 ns (*) |  87 ns
fmt = b"hello %s"; arg = b"x" * 10**3; fmt % arg |  298 ns (*) |  208 ns (-30%)
fmt = b"hello %s"; arg = b"x" * 10**5; fmt % arg |  4.8 us (*) |  4.39 us (-9%)
-+-+---
Total| 5.28 us (*) | 4.77 us (-10%)
-+-+---

---+-+---
b"xx %s" % b"y"|orig | writer
---+-+---
fmt = b"x" * 10 + b"%s"; fmt % b"y"|   99 ns (*) |   81 ns (-18%)
fmt = b"x" * 100 + b"%s"; fmt % b"y"   |  189 ns (*) |   87 ns (-54%)
fmt = b"x" * 10**3 + b"%s"; fmt % b"y" | 1.12 us (*) |  209 ns (-81%)
fmt = b"x" * 10**5 + b"%s"; fmt % b"y" | 88.4 us (*) | 8.49 us (-90%)
---+-+---
Total  | 89.8 us (*) | 8.87 us (-90%)
---+-+---

--+-+---
%f|orig |   
  writer
--+-+---
n = 200; fmt = b"%f" * n; arg = tuple([1.2]*n); fmt % arg | 37.2 us (*) | 29.6 
us (-21%)
--+-+---

+-+---
%i  |orig | 
writer
+-+---
n = 200; fmt = b"%f" * n; arg = tuple([12345]*n); fmt % arg | 49.4 us (*) | 
42.8 us (-13%)
+-+---

-+-+---
Summary  |orig | writer
-+-+---
use smaller buffer   |  353 ns (*) |  301 ns (-15%)
"hello %s" % long_string | 5.28 us (*) | 4.77 us (-10%)
b"xx %s" % b"y"  | 89.8 us (*) | 8.87 us (-90%)
%f   | 37.2 us (*) | 29.6 us (-21%)
%i   | 49.4 us (*) | 42.8 us (-13%)

[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Gian Carlo Martinelli

Gian Carlo Martinelli added the comment:

Terry, first of all thanks for trying to solve this.

I usually start IDLE using Ubuntu's dash.

The problem is with more than just the three characters. Others that I have 
tested and that don't work include "ç", "`", umlauts... There work in others 
places in my system such as the console for example.

When I try ALT+M or CTRL+O, inside IDLE, these characters work.

This is a copy of my output. Seems OK
!  "  #  $  %  &  '  (  )  *  +  ,  -  .  /  
0  1  2  3  4  5  6  7  8  9  :  ;  <  =  >  ?  
@  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  
P  Q  R  S  T  U  V  W  X  Y  Z  [  \  ]  ^  _  
`  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  
p  q  r  s  t  u  v  w  x  y  z  {  |  }  ~  

--

___
Python tracker 

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3ad8a2d34d01 by Vinay Sajip in branch '2.7':
Closes #25344: Added cookbook recipe to show buffering of logging events.
https://hg.python.org/cpython/rev/3ad8a2d34d01

New changeset 7cc3a8141022 by Vinay Sajip in branch '3.4':
Closes #25344: Added cookbook recipe to show buffering of logging events.
https://hg.python.org/cpython/rev/7cc3a8141022

New changeset be13ea160b1a by Vinay Sajip in branch '3.5':
Closes #25344: Merged fix from 3.4.
https://hg.python.org/cpython/rev/be13ea160b1a

New changeset 6c183537b2fb by Vinay Sajip in branch 'default':
Closes #25344: Merged fix from 3.5.
https://hg.python.org/cpython/rev/6c183537b2fb

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 425d81d10b13 by Martin Panter in branch '3.4':
Issue #24402: Fix input() when stdout.fileno() fails; diagnosed by Eryksun
https://hg.python.org/cpython/rev/425d81d10b13

New changeset e97d940a6543 by Martin Panter in branch '3.5':
Issue #24402: Merge input() fix from 3.4 into 3.5
https://hg.python.org/cpython/rev/e97d940a6543

New changeset bcc0f8eb6797 by Martin Panter in branch 'default':
Issue #24402: Merge input() fix from 3.5
https://hg.python.org/cpython/rev/bcc0f8eb6797

--
nosy: +python-dev

___
Python tracker 

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



[issue24978] Contributing to Python 2x and 3x Documentation. Translation to Russian.

2015-10-09 Thread Sebastian A. Brachi

Sebastian A. Brachi added the comment:

> I wrote a proposal to the board a while ago
I couldn't find that proposal, could you post a link to it? Thanks!

--
nosy: +Sebastian A. Brachi

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Martin Panter

Changes by Martin Panter :


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



[issue22413] Bizarre StringIO(newline="\r\n") translation

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

Thanks for the feedback. Yeah, 2.7 is an independent branch, but I will try 
porting the changes there.

--
assignee: docs@python -> martin.panter
nosy: +berker.peksag
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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

Okay I plan to commit a modified version where I moved the input() test methods 
that use pseudo terminals to a new PtyTests class. The test_input() method 
stays in the original class, because it shares a helper method with other tests.

I am resisting dropping that decode() step, because it makes any error message 
from the forked child hard to read:

AssertionError: 256 != 0 : b'quux\r\nTraceback (most recent call last):\r\n  
File "/media/disk/home/proj/python/cpython/Lib/test/test_builtin.py", line 
1593, in test_input_no_stdout_fileno\r\ninput("prompt")\r\nTypeError: bad 
argument type for built-in operation\r\n'

--
nosy: +berker.peksag

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I am not surprised that non-ascii chars fail also. But, all? or just a few (all 
symbol? or only diacriticals)?

My first thought was that you have a european keyboard that is does not match 
your Ubuntu configuration.  Or that you had an older tcl/tk that did not work 
with such.

^O opens a dialog that IDLE is not involved with.  Alt-M open a different tk 
widget that IDLE in not involved with.

Do shell and editor have exactly the same problems?

Let's try two other things.  Alt-F3 opens Find in Files (grep).  Can you enter 
any of `'^~ on the first line?

Put anything on the first line and add a *fake* directory on the second (so you 
have something like zyx/*.py).  Search.  Try typing in the Output Window.  It 
is slightly different from shell and editor (no colors, for instance).

Ankit: I am trying to narrow possibilities using my knowledge of IDLE 
internals.  I wish I knew what *I* need to learn for this.

--

___
Python tracker 

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



[issue25347] assert_has_calls output is formatted inconsistently

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
versions:  -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

Maybe @shanmbic has a clock skew and _datetime.so does not get recompiled?

I would try to do make clean or even make distclean and rebuild everything.

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

I think you are correct, and I wouldn't be surprised if there is some in the 
stdlib as well.

--

___
Python tracker 

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



[issue21264] test_compileall fails to build in the installed location

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

I consider this fixed by way of issue #25099. If that's wrong then feel free to 
open the issue again.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> test_compileall fails when run by unprivileged user on 
installed Python
versions: +Python 3.5, Python 3.6

___
Python tracker 

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



[issue25287] test_crypt fails on OpenBSD

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Hum, the test now fails differently :-(

==
FAIL: test_methods (test.test_crypt.CryptTestCase)
--
Traceback (most recent call last):
  File 
"/home/python-builds/3.x.borja-openbsd-x86/build/Lib/test/test_crypt.py", line 
29, in test_methods
self.assertTrue(len(crypt.methods) >= 1)
AssertionError: False is not true

--

___
Python tracker 

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



[issue25306] test_huntrleaks_fd_leak() of test_regrtest hangs on Windows

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Ok, it looks like the issue was fixed.

--
keywords: +buildbot
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



[issue25277] test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

The bug was reproduced with faulthandler:

FAIL: test_all (test.test_eintr.EINTRTests)
Timeout (0:10:00)!
Thread 0x000802006400 (most recent call first):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 402 in test_sigwaitinfo
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py", 
line 600 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py", 
line 648 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 122 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", 
line 84 in __call__
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/runner.py", 
line 176 in run
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1775 in _run_suite
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py",
 line 1809 in run_unittest
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 470 in test_main
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/eintrdata/eintr_tester.py",
 line 474 in 

The same error occurred multiple times on buildbots FreeBSD 10.0 and 9.x.

--
title: test_eintr hangs on randomly on "AMD64 FreeBSD 9.x 3.x" -> 
test_sigwaitinfo() of test_eintr hangs on randomly on FreeBSD buildbots

___
Python tracker 

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



[issue25351] pyvenv activate script failure with specific bash option

2015-10-09 Thread s-wakaba

New submission from s-wakaba:

When writing bash shellscripts, I always set options "set -ueC" for strict 
error checking. However, loading pyvenv's activate and deactivate scripts from 
bash with "-u" option, they are failure because they may refer undefined shell 
variables.

I hope activate script and deactivate function are enclosed like following block

_OLD_BASH_OPTIONS="$-"
set +u

### script body ##

set -$_OLD_BASH_OPTIONS
unset _OLD_BASH_OPTIONS


Another option, all shell-variables in the script change like

$SPAM -> ${SPAM:-}

--
components: Library (Lib)
messages: 252593
nosy: s-wakaba
priority: normal
severity: normal
status: open
title: pyvenv activate script failure with specific bash option
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



[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-09 Thread Xiang Zhang

Xiang Zhang added the comment:

I think this is a typo. The raise is left out.

In test_smtpd.py, it only tests the raise condition in SMTPServer but
not STMPChannel.

I add the raise and a corresponding test in SMTPDChannelTest.

--
keywords: +patch
nosy: +xiang.zhang
Added file: http://bugs.python.org/file40725/SMTPChannel_raise_ValueError.patch

___
Python tracker 

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



[issue25350] Stronger type enforcement (feature request)

2015-10-09 Thread John Michael Lafayette

New submission from John Michael Lafayette:

With a lot of languages, I can tell
that the type I am getting is an instance of the declared type I'm assigning it 
to.

Example:
Cat c = Factory.make("cat"
Animal d = Factory.make("dog")

Python:
val c = Factory.make("cat")

Problem with this is that it is not necessarily obvious to the reader what the 
type of c is. I suggest that you provide an option to strengthen python's type 
checking by allowing users to replace val with the expected type of the object 
and then allow the interpreter to check that the real type being assigned is an 
instance of the expected type. An option like -strong for strong typing.

--
messages: 252588
nosy: John Michael Lafayette
priority: normal
severity: normal
status: open
title: Stronger type enforcement (feature request)
type: enhancement

___
Python tracker 

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



[issue25344] Enhancement to Logging - Logging Stack

2015-10-09 Thread Vinay Sajip

Vinay Sajip added the comment:

This is already supported. There is a logging.handlers.MemoryHandler which 
allows you to buffer logging events and then pass the buffered events to 
another handler when some condition is met, such as e.g. buffer full or some 
severity threshold is exceeded. Flushing the buffer to the other handler can be 
customised by subclassing and overriding shouldFlush() and perhaps flush() 
methods.

https://docs.python.org/2/library/logging.handlers.html#memoryhandler

I can perhaps add a cookbook recipe to illustrate, so I'll leave this issue 
open for now, as a reminder.

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This question has been asked multiple times before.  I think it should be 
documented that as far as the language goes, there is no answer.  Raymond's 
answer is a start.  Dima, where would you expect to find such a disclaimer 
(other than in the FAQ)?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue17908] Unittest runner needs an option to call gc.collect() after each test

2015-10-09 Thread Ankit Baruah

Changes by Ankit Baruah :


--
nosy: +@nkit

___
Python tracker 

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



[issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

INADA Naoki: "I want to Python 3.4 and Python 3.5 solve this issue since it's 
critical problem for some people."

On microbenchmarks, the optimization that I just implemented in Python 3.6 are 
impressive. The problem is that the implementation is quite complex. If I 
understood correctly, you are asking to optimize decoders and encoders for 
ASCII and UTF-8 (modify 4 functions) for the surrogateescape error handler. Is 
that right? Would UTF-8 be enough or not?

I don't like backporting optimizations which are not well tested right now. To 
optimize encoders, I wrote a full new _PyBytesWriter API. We cannot backport 
this new API, even if it's private. So the backport may be more complex than 
the code in the default branch.

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Yes, I was asking where to put the disclaimer.  The thread docs would be 
approriate if there is nothing already.

Guido has been very reluctant to put any performance guarantees in the language 
reference.  I believe he said that O(f(n)) info even for CPython should be in 
the wiki -- and taken as a guideline, not a iron guarantee.

Further discussion might be better directed to python-ideas, after a search of 
the pydev and python-ideas archives (most easily done with the gmane mirrors, I 
believe).

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

There used to be such a checkbox, but apparently it had problems.  But there is 
still something with that effect, at least in part.  When I installed 3.5.0, 
'python' was switched from 3.4 to 3.5.  That did not happen with the 
preliminary releases, because I did somethng different.  Sorry, I don't 
remember what.

I don't like using the start menu over and over either.  So I pin frequently 
used programs to the taskbar -- always visible.  The 2.7 IDLE icon just says 
Python GUI.  In 3.4, it is Python 3.4 GUI.  Ditto for 3.5 and the future.

Steve: when Firefox and some other programs upgrade, the pinned icon remains.  
When Python upgrades, the pinned IDLE icon disappears.  When, as is normal, the 
upgrade is in the same directory, is there any way to leave the icon, since it 
still points to the right directory and filename?  Or is this icon binary 
specific?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread shanmbic

shanmbic added the comment:

make distclean worked. I guess too many reverts in hg caused some issue. :)

--

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

Thanks to Serhiy for all of the reviews!

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

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 34bbd537b3e6 by Brett Cannon in branch '3.5':
Issue #25099: Skip relevant tests in test_compileall when an entry on
https://hg.python.org/cpython/rev/34bbd537b3e6

New changeset 21f3a92e0c6d by Brett Cannon in branch 'default':
Merge for issue #25099
https://hg.python.org/cpython/rev/21f3a92e0c6d

--
nosy: +python-dev

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Yes, I find that if there's something that might be a compilation problem, 
doing a make distclean and a build from scratch is a good idea to confirm it.

--

___
Python tracker 

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



[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode

2015-10-09 Thread Pavel Roskin

Pavel Roskin added the comment:

That's what I have now:

check:
$(PYTHON) -m py_compile $(SOURCES)
rm -f $(addsuffix c, $(SOURCES))

make check
python -m py_compile redacted-build redacted-git-diff redacted-git-gc 
redacted-git-status redacted-init redacted-server
redactedbuilder.py
rm -f redacted-buildc redacted-git-diffc redacted-git-gcc redacted-git-statusc 
redacted-initc redacted-serverc redactedb
uilder.pyc

That's what David is suggesting:

check:
for file in $(SOURCES); do \
python -c "compile(open('$$file').read(), '', 'exec')" || exit 1; \
done

make check
for file in redacted-build redacted-git-diff redacted-git-gc 
redacted-git-status redacted-init redacted-server redactedb
uilder.py; do \
python -c "compile(open('$file').read(), '', 'exec')" || exit 1; \
done

That's what I could have if I live long enough to see Python 3.6 on my 
development machine.

check:
$(PYTHON) -m py_compile --no-output $(SOURCES)

make check
python -m py_compile --no-output redacted-build redacted-git-diff 
redacted-git-gc redacted-git-status redacted-init redacted-server
redactedbuilder.py

If that does not seem like an important improvement, then I can live with what 
I have.

--

___
Python tracker 

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



[issue24870] Optimize ascii and latin1 decoder with surrogateescape and surrogatepass error handlers

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Short summary.

Ok, I optimized ASCII, Latin1 and UTF-8 codecs (encoders and decoders) for the 
most common error handlers.

* ASCII and Latin1 encoders: surrogateescape, replace, ignore, 
backslashreplace, xmlcharrefreplace
* ASCII decoder: surrogateescape, replace, ignore
* (Latin1 decoder cannot fail)
* UTF-8 encoder: surrogateescape, surrogatepass, replace, ignore, 
backslashreplace, xmlcharrefreplace
* UTF-8 decoder: surrogateescape, replace, ignore

The code to handle other error handlers in encoders has also be optimized.

Surrogateescape has now an efficent implementation for ASCII, Latin1 and UTF-8 
encoders and decoders.

--

___
Python tracker 

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



[issue25311] Add f-string support to tokenize.py

2015-10-09 Thread Ankit Baruah

Changes by Ankit Baruah :


--
nosy: +@nkit

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Gian Carlo Martinelli

Gian Carlo Martinelli added the comment:

1) Do the keys work in the Ubuntu console?
Yes.

2) Do the keys work in interactive python (not IDLE), started with 'python' at 
the console prompt.
Yes.

3) In IDLE, go to Help->About IDLE.  What is the Tk version.
  Best if 8.6.x, if before 8.5.18, upgrade.
8.6.1

4) Try typing in the text box, including the problem chars.  What happens?
Ran the program, all characters work perfectly.

--

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Yes same answers as Gian characters worked perfectly

--

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread Tim Peters

Changes by Tim Peters :


--
components: +Library (Lib) -Extension Modules, ctypes
resolution:  -> not a bug
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



[issue25303] Add option to py_compile to compile for syntax checking without writing bytecode

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

On the side issue: While the example given, which uses the py_compile.compile 
defaults via the command line interface, is useless, I disagree that writing a 
.pyc file for a file without .py is a bug.

Python will run python code with any filename as main module (and not write 
.pyc).  It will only import the *same code* (and normally write .pyc) if the 
filename ends with .py (or .pyw on windows).  However, 'import script' will 
import script.pyc (on the search path) without a script.py file existing.  
Using py_compile.compile('script', 'script.pyc') makes that possible.  (I just 
tried it.)

.

--

___
Python tracker 

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



[issue25359] io.open() fails to open ascii file if LANG env not set

2015-10-09 Thread L

Changes by L :


--
components: IO
files: io.openBugEx.py
nosy: sentinel
priority: normal
severity: normal
status: open
title: io.open() fails to open ascii file if LANG env not set
type: crash
versions: Python 2.7
Added file: http://bugs.python.org/file40737/io.openBugEx.py

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Ankit: the issue is where do they fail, why, and how to fix.  Are you running 
Ubuntu also?

G.C. How do you start IDLE? Is the problem with exactly those three chars? Do 
they fail in the Shell? an editor? search box? other entry box such as you get 
with Alt-M? Open file dialog (control-O)?

Does this have expected output?

for m in range(32, 128, 16):
for n in range(16):
print(chr(m + n), ' ', end='')
print()
# should print
   !  "  #  $  %  &  '  (  )  *  +  ,  -  .  /  
0  1  2  3  4  5  6  7  8  9  :  ;  <  =  >  ?  
@  A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  
P  Q  R  S  T  U  V  W  X  Y  Z  [  \  ]  ^  _  
`  a  b  c  d  e  f  g  h  i  j  k  l  m  n  o  
p  q  r  s  t  u  v  w  x  y  z  {  |  }  ~    
>>>

--

___
Python tracker 

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



[issue25343] Document atomic operations on builtin types

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

I think what Terry was asking was, where would you expect to see the disclaimer 
that *no* operations are guaranteed to be atomic?  That's what we're inclining 
toward (though we'll probably need a signoff from Guido).

--

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Ok, I implemented all optimizations which were already implemented in str % 
args. I close the issue.

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Hello, i am totally new.I went through Pythons Developers guide and would like 
to learn so please tell me what i should learn to resolve this issue.

--
nosy: +@nkit

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Added new comments.

--

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

Seems my test hangs the Free BSD 9 buildbot, although Free BSD 10 apparently 
passed.

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.4/builds/1128/steps/test/logs/stdio

[390/390] test_builtin
Timeout (1:00:00)!
Thread 0x000801407400 (most recent call first):
  File 
"/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/test/test_builtin.py", 
line 1585 in test_input_no_stdout_fileno
  File 
"/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/unittest/case.py", line 
580 in run
  File 
"/usr/home/buildbot/python/3.4.koobs-freebsd9/build/Lib/unittest/case.py", line 
628 in __call__

--
status: closed -> open

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

I wrote this on Arch Linux, so I doubt your Ubuntu failure is valid. The error 
you see is what I would expect if the bug were not actually fixed. I suspect 
you need to recompile /Python/bltinmodule.c, which contains the bug fix.

However, the test also hangs OS X buildbots. I can only guess at why it is 
hanging, either at the waitpid() line or the os.read() line. I am looking at 
refactoring my test to use the existing check_input_tty() infrastructure. It 
seems over the top by adding a separate pipe back to the parent process, but 
presumably will workaround whatever is causing the hang.

--

___
Python tracker 

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



[issue25360] pyw should search for pythonw to implement #!/usr/bin/env python

2015-10-09 Thread eryksun

New submission from eryksun:

The Windows launcher searches PATH to implement the shebang "#!/usr/bin/env". 
Given "#!/usr/bin/env python", it always searches for L"python" (see issue 
17903), even in pyw.exe. maybe_handle_shebang in PC/launcher.c should instead 
use a macro that's conditionally defined as L"pythonw" when building pyw.exe 
and L"python" when building py.exe. This parallels the existing 
PYTHON_EXECUTABLE macro.

--
components: Windows
messages: 252681
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: pyw should search for pythonw to implement #!/usr/bin/env  python
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread Martin Panter

Martin Panter added the comment:

The “newline” name seems as good as any. The patch looks good in general. I 
left a few comments.

I agree with not bothering for the UU encoder. That encoding has an embedded 
line length byte at the start of each line, so it makes less sense to omit 
newlines. Base-64 is used in places such as URLs where multiline output is not 
relevant, but I don’t know of a similar case for the UU encoding.

If I was doing it, I wouldn’t bother with a test case for keyword-only-ness, 
but suit yourself.

--
nosy: +martin.panter

___
Python tracker 

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



[issue25360] pyw should search for pythonw to implement #!/usr/bin/env python

2015-10-09 Thread eryksun

Changes by eryksun :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Yes,i am using ubuntu.


Thank you Terry for guiding me really appreciate your help. 
Sorry for not replying fell asleep.

--

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Xiang Zhang

Xiang Zhang added the comment:

It's my fault. I forget to recompile. Now it works.

--

___
Python tracker 

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



[issue25194] Opt-in motivations & affiliations page for core contributors

2015-10-09 Thread Nick Coghlan

Nick Coghlan added the comment:

The attached "Final draft" patch is the version I plan to commit tomorrow. 
Major differences from the previous draft:

* accepted MAL's suggestion of using alphabetical order
* as RDM suggested, explained the rationale for the cases where we encourage 
people to participate
* after fighting with ReST trying to get it to let me have an indented 
paragraph following a bulleted list, I eventually hit on the idea of using the 
"topic" directive to separate entries from each other without introducing an 
ever expanding list of TOC entries on the main page
* there are now more extensive guidelines inline in the doc as a ReST comment
* three cases of "acceptable links to include" are covered: personal sites, 
commercial contact details, and crowdfunding
* questions and suggestions (including for new categories of acceptable links) 
are explicitly directed to the python-committers list

Given the useful feedback from MAL & RDM, I'll hold off on pinging 
python-committers again until this initial version of the page is live.

Does anyone else want to provide an entry for me to include in the initial 
commit? It would be good to have a couple more initial entries to help folks 
generalise from the available examples.

--
stage: patch review -> commit review
Added file: http://bugs.python.org/file40738/issue25194-motives.diff

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Xiang Zhang

Xiang Zhang added the comment:

This test also fails on Ubuntu.

[1/1] test_builtin
test test_builtin failed -- Traceback (most recent call last):
  File "/home/angwer/my-cpython/Lib/test/test_builtin.py", line 1588, in 
test_input_no_stdout_fileno
self.assertEqual(status, 0, output)
AssertionError: 256 != 0 : quux
Traceback (most recent call last):
  File "/home/angwer/my-cpython/Lib/test/test_builtin.py", line 1593, in 
test_input_no_stdout_fileno
input("prompt")
TypeError: bad argument type for built-in operation


1 test failed:
test_builtin

--
nosy: +xiang.zhang

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Ankit Baruah

Ankit Baruah added the comment:

Find in Files (grep)
Yes can type `'^~.

Output Window 
Yes seems to work can type `'^~ and other characters.

--

___
Python tracker 

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



[issue24402] input() uses sys.__stdout__ instead of sys.stdout for prompt

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d8dd9015b086 by Martin Panter in branch '3.4':
Issue #24402: Factor out PtyTests.run_child() in input() tests
https://hg.python.org/cpython/rev/d8dd9015b086

New changeset 6a8f96b46dce by Martin Panter in branch '3.5':
Issue #24402: Merge potential test fix from 3.4 into 3.5
https://hg.python.org/cpython/rev/6a8f96b46dce

New changeset cb574ee7231e by Martin Panter in branch 'default':
Issue #24402: Merge potential test fix from 3.5
https://hg.python.org/cpython/rev/cb574ee7231e

--

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

IDLE uses tkinter which wraps the tcl/tk GUI framework.  Tk handles key 
presses.  So this is almost certainly not an IDLE bug, or even a tkinter bug. 
Unless you can demonstrate otherwise, I will closing this as a CPython issue.

Since this is the first report I know of reporting a problem with ascii chars, 
there is almost certainly something peculiar about your system.  You should 
probably ask for help on python-list (or use the gmane.comp.python.general 
mirror as news.gmane.org).  Here are some preliminary questions.

Do the keys work in the Ubuntu console?
Do the keys work in interactive python (not IDLE), started with 'python' at the 
console prompt.
In IDLE, go to Help->About IDLE.  What is the Tk version.
  Best if 8.6.x, if before 8.5.18, upgrade.

Run the following program (IDLE editor is fine).

from tkinter import *
root = Tk()
text = Text(root)
text.pack()
text.focus_set()  # required to work
root.mainloop()

Try typing in the text box, including the problem chars.  What happens?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25099] test_compileall fails when run by unprivileged user on installed Python

2015-10-09 Thread Brett Cannon

Brett Cannon added the comment:

I have addressed Serhiy's comments again.

--
Added file: http://bugs.python.org/file40736/issue25099.diff

___
Python tracker 

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



[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-09 Thread CM

CM added the comment:

I understood what Ned meant, and I did seek advice from the third party 
software creator, it was the first thing I did because like you stated I 
thought it was an issue with the third party software and not python. Coming to 
this bug website was my last resort but I can see that it doesn't make sense

--

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor

New submission from STINNER Victor:

The base64.b64encode() function calls binascii.b2a_base64() and then strips the 
newline. It would be more efficient to directly not add a newline.

Attached patch adds an optional newline parameter to binascii.b2a_base64(). It 
also modifies base64.b64encode() to call binascii.b2a_base64() with 
newline=False.

--
files: binascii_b2a_base64_newline.patch
keywords: patch
messages: 252625
nosy: haypo
priority: normal
severity: normal
status: open
title: Add an optional newline parameter to binascii.b2a_base64() to not add a 
newline
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file40731/binascii_b2a_base64_newline.patch

___
Python tracker 

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



[issue25336] Segmentation fault on Mavericks consistent crashing of software: Please HELP!!!!!

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

I think Ned meant "it is *not* likely to be in the python interpreter or 
standard library", and that you should seek help from the third party people 
trying to track down the problem.  *If* it turns out to be python or the 
stdlib, which means you've managed to find a reproducer that does *not* involve 
the third party packages, *then* come back and reopen the issue.

Like Ned said, good luck, but we really can't provide you any more help here 
until the third party packages are eliminated from the equation.

--
nosy: +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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Laura Creighton

Laura Creighton added the comment:

checking, these kids are using computers where, at some point, somebody moved 
the idle shortcut from their 2.7 folder to the desktop.  Which was probably a 
very bad idea.

But what should I tell them to do to get 3.5 there instead?

(adding IDLE to 'Type')

--
components: +IDLE

___
Python tracker 

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



[issue25303] py_compile disregards PYTHONDONTWRITEBYTECODE and -B

2015-10-09 Thread Éric Araujo

Éric Araujo added the comment:

I had the same reasoning as RDM when I worked on byte-compilation in 
distutils2: https://hg.python.org/distutils2/rev/7c0a88497b5c

Using py_compile or compileall means that you want to create pyc or pyo files.
Defining PYTHONDONTWRITEBYTECODE or -B means that you don’t want the Python 
interpreter to byte-compile module as a side-effect of importing them.
These two things seem orthogonal to me.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

+1. Not sure about the parameter name, but if no one suggests better, it LGTM. 
Added comments on Rietveld.

What about adding the same parameter to binascii.b2a_uu()?

--
nosy: +ncoghlan, pitrou, serhiy.storchaka

___
Python tracker 

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



[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

A few more encoders should be updated to use _PyBytesWriter API:

* Code Page (Windows only)
* Charmap
* UTF-7
* UTF-16
* UTF-32

--

___
Python tracker 

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



[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

The _PyBytesWriter API was added in the issue #25318. See also the issue #25349 
which optimized bytes % args.

--

___
Python tracker 

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



[issue25318] Add _PyBytesWriter API to optimize Unicode encoders

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Buildbots still like this new API :-) (no test failure recently)

I reworked the API a little bit to make its usage simpler in Unicode encoders. 
I started to open new issues to using this new API in more functions producing 
byte strings.

I consider that this issue can now be closed. I'm happy, the API looks good to 
me and the modified code is faster.

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



[issue25353] Use _PyBytesWriter for unicode escape and raw unicode escape encoders

2015-10-09 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch modifies unicode escape and raw unicode escape encoders to use 
the new _PyBytesWriter API.

The patch is optimized to encode Latin1 characters: encoding Latin1 characters 
when no character is escaped should not have to call _PyByte_Resize() at all.

When characters are escaped or a BMP or non-BMP string is encoded, 
overallocation is used to reduce the number of _PyByte_Resize(). It uses 
_PyBytesWriter overallocation strategy instead of always overallocate for the 
worst case.

_PyBytesWriter also embeds a small buffer allocated on the stack which also 
avoids calls to _PyBytes_Resize() when the output fits into 512 bytes.

--
files: unicode_escape.patch
keywords: patch
messages: 252599
nosy: haypo, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use _PyBytesWriter for unicode escape and raw unicode escape encoders
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file40727/unicode_escape.patch

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Emanuel Barry

Emanuel Barry added the comment:

What about the `py' launcher? It will always launch the latest installed 
version.

--
nosy: +ebarry

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Florin Papa

Florin Papa added the comment:

I have modified the small object allocator to set proper bounds  for the 
pointers it returns. Please see the updated patches.

--
Added file: http://bugs.python.org/file40728/mpx_enable_3_6_v4.patch

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Florin Papa

Changes by Florin Papa :


Added file: http://bugs.python.org/file40729/mpx_enable_2_7_v4.patch

___
Python tracker 

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



[issue25311] Add f-string support to tokenize.py

2015-10-09 Thread Eric V. Smith

Eric V. Smith added the comment:

Oops, make that 80 combinations (I forgot the various 'fb' ones):

['B', 'BF', 'BFR', 'BFr', 'BR', 'BRF', 'BRf', 'Bf', 'BfR', 'Bfr', 'Br', 'BrF', 
'Brf', 'F', 'FB', 'FBR', 'FBr', 'FR', 'FRB', 'FRb', 'Fb', 'FbR', 'Fbr', 'Fr', 
'FrB', 'Frb', 'R', 'RB', 'RBF', 'RBf', 'RF', 'RFB', 'RFb', 'Rb', 'RbF', 'Rbf', 
'Rf', 'RfB', 'Rfb', 'U', 'b', 'bF', 'bFR', 'bFr', 'bR', 'bRF', 'bRf', 'bf', 
'bfR', 'bfr', 'br', 'brF', 'brf', 'f', 'fB', 'fBR', 'fBr', 'fR', 'fRB', 'fRb', 
'fb', 'fbR', 'fbr', 'fr', 'frB', 'frb', 'r', 'rB', 'rBF', 'rBf', 'rF', 'rFB', 
'rFb', 'rb', 'rbF', 'rbf', 'rf', 'rfB', 'rfb', 'u']


import itertools as _itertools

def _all_string_prefixes():
# The valid string prefixes. Only contain the lower case versions,
#  and don't contain any permuations (include 'fr', but not
#  'rf'). The various permutations will be generated.
_valid_string_prefixes = ['b', 'r', 'u', 'f', 'br', 'fr', 'fb', 'fbr']
result = set()
for prefix in _valid_string_prefixes:
for t in _itertools.permutations(prefix):
# create a list with upper and lower versions of each
#  character
for u in _itertools.product(*[(c, c.upper()) for c in t]):
result.add(''.join(u))
return result

--

___
Python tracker 

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



[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-09 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d471cf4a73b2 by R David Murray in branch '3.5':
#25328: add missing raise keyword in decode_data+SMTPUTF8 check.
https://hg.python.org/cpython/rev/d471cf4a73b2

New changeset 576128c0d068 by R David Murray in branch 'default':
Merge #25328: add missing raise keyword in decode_data+SMTPUTF8 check.
https://hg.python.org/cpython/rev/576128c0d068

--
nosy: +python-dev

___
Python tracker 

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



[issue25228] Regression in cookie parsing with brackets and quotes

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Yes, we should get signoff from someone who was involved in the original 
security fix, since it was a security fix.

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



[issue25350] Stronger type enforcement (feature request)

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Check out the types module and PEP 484.

--
nosy: +r.david.murray
resolution:  -> out of date
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



[issue6953] readline documenation needs work

2015-10-09 Thread Gabi Davar

Changes by Gabi Davar :


--
nosy: +Gabi.Davar

___
Python tracker 

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



[issue25328] ValueError in smtpd.py __init__() is not raised

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

Thanks, Xiang.  Your analysis was correct and your patch is good.

For anyone who is curious, Barry discovered this while writing tests for a new 
aiosmtpd, which is based on the existing smtpd code.

--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread R. David Murray

R. David Murray added the comment:

No, that delta being one hour is the whole point of that test.

I've nosied Alexander.  He'll probably need more information about the 
environment in which you are seeing this.

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



[issue25354] test_datetime failing

2015-10-09 Thread Alexander Belopolsky

Alexander Belopolsky added the comment:

@shanmbic - did you recompile C modules before running the tests?

--

___
Python tracker 

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



[issue25349] Use _PyBytesWriter for bytes%args

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

bytes_formatlong.patch: Fast-path for b'%d' % int and other integer formatters. 
It avoids the creation of a temporary bytes object, it writes directly into the 
writer, as '%d' % int (Unicode).

--
Added file: http://bugs.python.org/file40732/bytes_formatlong.patch

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Steve Dower

Steve Dower added the comment:

They can find the 3.5 shortcut in their Start Menu (either by browsing or 
searching for "IDLE") and then move that to their desktop.

Depending on operating system version, moving it could be:

* drag from the Start Menu to the desktop and drop it
* right-click and choose "Send To -> Desktop (create shortcut)", OR
* right-click, choose "Open File Location" and then right-click again in the 
new window and choose "Send To -> Desktop (create shortcut)"

--

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Oh, I forgot to add an unit test.

> What about adding the same parameter to binascii.b2a_uu()?

This function is used in Lib/encodings/uu_codec.py and Lib/uu.py, but the 
newline is not stripped. So I don't think that it's worth to add an optional 
parameter.

--

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Updated patch to take Serhiy's comments in account and now with an unit test!

--
Added file: http://bugs.python.org/file40733/binascii_b2a_base64_newline-2.patch

___
Python tracker 

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



[issue25357] Add an optional newline parameter to binascii.b2a_base64() to not add a newline

2015-10-09 Thread STINNER Victor

STINNER Victor added the comment:

Oh by the way, the new parameter is a keyword only parameter. It's not possible 
to write b2a_base64(data, False). Maybe I should also add an unit test for this.

--

___
Python tracker 

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



[issue12939] Add new io.FileIO using the native Windows API

2015-10-09 Thread Steve Dower

Changes by Steve Dower :


--
nosy: +steve.dower

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Thanks. For the record, the whole test suite still passes? This is good to know 
:)

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Florin Papa

Florin Papa added the comment:

I ran the full Grand Unified Python Benchmarks suite on Python 3.6 and 2.7 
before submitting the patches and everything went well. Sorry I did not mention 
it :)

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Emanuel Barry

Emanuel Barry added the comment:

Oh, I didn't know the py launcher preferred 2.7 - I always work with 3.x; my 
bad.

--

___
Python tracker 

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



[issue25352] Add 'make this my default python' to windows installs for Python3.5 and later

2015-10-09 Thread Steve Dower

Steve Dower added the comment:

The py launcher will prefer 2.7 because that's what was decided when it was 
added. We're probably getting to a stage where we can revert that.

Unfortunately, there's no way we can reliably fix system configuration without 
corrupting the users machine. Using the py launcher with -3 is currently the 
best way to do it.

I don't know where the desktop shortcuts are coming from - they're not ours, so 
we can't fix them.

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Antoine Pitrou

Antoine Pitrou added the comment:

I meant the test suite ("python -m test.regrtest"). I presume you did, just 
checking :-)

--

___
Python tracker 

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



[issue25300] Enable Intel MPX (Memory protection Extensions) feature

2015-10-09 Thread Florin Papa

Florin Papa added the comment:

I ran regrtest now and there are a few tests that fail. I will look into the 
cause of this and provide a solution.

--

___
Python tracker 

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



[issue25311] Add f-string support to tokenize.py

2015-10-09 Thread Eric V. Smith

Eric V. Smith added the comment:

I think the best way to approach this is to generate (in code) all of the 
places where string prefixes appear. There's StringPrefix, endpats, 
triple_quotes, and single_quoted.

With the currently valid combinations of f, b, r, and u, I count 24 
combinations:
['B', 'BR', 'Br', 'F', 'FR', 'Fr', 'R', 'RB', 'RF', 'Rb', 'Rf', 'U', 'b', 'bR', 
'br', 'f', 'fR', 'fr', 'r', 'rB', 'rF', 'rb', 'rf', 'u']

If I add "fb" strings (plus raw), I count 72 combinations:
['B', 'BFR', 'BFr', 'BR', 'BRF', 'BRf', 'BfR', 'Bfr', 'Br', 'BrF', 'Brf', 'F', 
'FBR', 'FBr', 'FR', 'FRB', 'FRb', 'FbR', 'Fbr', 'Fr', 'FrB', 'Frb', 'R', 'RB', 
'RBF', 'RBf', 'RF', 'RFB', 'RFb', 'Rb', 'RbF', 'Rbf', 'Rf', 'RfB', 'Rfb', 'U', 
'b', 'bFR', 'bFr', 'bR', 'bRF', 'bRf', 'bfR', 'bfr', 'br', 'brF', 'brf', 'f', 
'fBR', 'fBr', 'fR', 'fRB', 'fRb', 'fbR', 'fbr', 'fr', 'frB', 'frb', 'r', 'rB', 
'rBF', 'rBf', 'rF', 'rFB', 'rFb', 'rb', 'rbF', 'rbf', 'rf', 'rfB', 'rfb', 'u']

Coding these combinations by hand seems insane.

--

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +belopolsky

___
Python tracker 

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



[issue25354] test_datetime failing

2015-10-09 Thread shanmbic

New submission from shanmbic:

The test for datetime module keeps failing. 

test test_datetime failed -- Traceback (most recent call last):
  File "/home/shantanu/cpython/Lib/test/datetimetester.py", line 215, in 
test_issue23600
self.assertEqual(t - t.utcoffset(), u)
AssertionError: datet[22 chars]26, 11, 1, 
tzinfo=) != datet[22 chars]26, 12, 1, 
tzinfo=)

In datetimetester.py , in function test_issue23600 , line 196:
the variable DSTDIFF has been assigned timedelta of 1 hour, I guess it should 
be , 

DSTDIFF = timedelta(hours=0)

It passes the test then. 

The comment in the function code says -  
"""Simple time zone which pretends to always be in summer time, since that's 
what shows the failure.""" Was the test written to fail on purpose ?  

Thanks

--
components: Extension Modules, ctypes
messages: 252609
nosy: shanmbic
priority: normal
severity: normal
status: open
title: test_datetime failing
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue25320] unittest loader.py TypeError when code directory contains a socket

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +ezio.melotti, michael.foord, rbcollins
versions: +Python 3.6

___
Python tracker 

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



[issue25303] py_compile disregards PYTHONDONTWRITEBYTECODE and -B

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I agree that the proposal as written should be rejected.  I am inclined to 
think this issue should be closed.

I do not understand the claim about 'python -m py_compile'.  For me, this does 
nothing, as I would expect from reading the code.  If args = sys.arg[1:] is 
empty, the else clause for loop immediately quits.

Syntax checking is easily done with compile; that is how IDLE does it.  
  python -c "compile(open().read(), '', 'exec').
should do what Pavel tried to do, except for getting a SyntaxError instead of 
py_compile.PyCompileError.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue25312] Cryptic error message if incorrect spec is set on a callable mock

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +michael.foord

___
Python tracker 

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



[issue25307] Enhancing the argparse help output

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +bethard
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue19500] Error when connecting to FTPS servers not supporting SSL session resuming

2015-10-09 Thread Alex Warhawk

Alex Warhawk added the comment:

Even after enabling client cache one still has to call SSL_set_session. See 
documentation of SSL_CTX_set_session_cache_mode point SSL_SESS_CACHE_CLIENT.

I started thinking about not exposing a SSL_SESSION object to the user but 
rather extending wrap_socket to take an already established socket as argument 
and use that socket's session object. This way I can ensure that both sockets 
share the same SSL context

I am not really convinced by this idea myself, what do you think about this? 
Any better ideas?

--

___
Python tracker 

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



[issue25331] Using Windows doc should list service packs needed to install

2015-10-09 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
stage:  -> needs patch
title: https://docs.python.org/3.5/using/windows.html should list whcih windows 
service packs are -> Using Windows doc should list service packs needed to 
install
type:  -> enhancement
versions: +Python 3.5, Python 3.6

___
Python tracker 

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



[issue25334] telnetlib: process_rawq() and binary data

2015-10-09 Thread Terry J. Reedy

Terry J. Reedy added the comment:

A new method is an API change is an enhancement only allowed in a future 
version. If this is the only change needed to support another RFC also, the 
idea seems plausible, but I am not an Inet protocol expert.  
https://tools.ietf.org/html/rfc854.html
https://tools.ietf.org/html/rfc856.html
https://tools.ietf.org/html/rfc5198 proposed 854 update for unicode

--
nosy: +r.david.murray, terry.reedy
stage:  -> patch review
type: behavior -> enhancement
versions:  -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



  1   2   >