[issue694339] IDLE: Dedenting with Shift+Tab

2017-09-28 Thread Tal Einat

Change by Tal Einat :


--
nosy:  -taleinat

___
Python tracker 

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



[issue21787] Idle: make 3.x Hyperparser.get_expression recognize ...

2017-09-28 Thread Tal Einat

Change by Tal Einat :


--
nosy:  -taleinat

___
Python tracker 

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



[issue1350] IDLE - CallTips enhancement - show full doc-string in new window

2017-09-28 Thread Tal Einat

Change by Tal Einat :


--
nosy:  -taleinat

___
Python tracker 

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



[issue21696] Idle: test configuration files

2017-09-28 Thread Tal Einat

Change by Tal Einat :


--
nosy:  -taleinat

___
Python tracker 

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



[issue6143] IDLE - an extension to clear the shell window

2017-09-28 Thread Tal Einat

Change by Tal Einat :


--
nosy:  -taleinat

___
Python tracker 

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



[issue22083] Refactor PyShell's breakpoint related methods

2017-09-28 Thread Tal Einat

Change by Tal Einat :


--
nosy:  -taleinat

___
Python tracker 

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



[issue31615] Python interpreter is failing due to BufferOverflow Exception

2017-09-28 Thread Megha HR

New submission from Megha HR :

Hi Team,


I'm facing BufferOverflow Exception when python interpreter is trying to start.

Below is an excerpt of error.
-
(2017-09-27 13:08:11,972) DEBUG [JMThread, Activity 
name:xakamahMSCmapping:activityId=60206,activityId=60206] 
(JythonInterpreter.java:227) - run() - JythonInterpreter.run()== Starting the 
Python Interpereter
(2017-09-27 13:08:11,996) DEBUG [JMThread, Activity 
name:xakamahMSCmapping:activityId=60206,activityId=60206] 
(JythonInterpreter.java:257) - Jython exception occured:Exception: 
java.nio.BufferOverflowException
Traceback (most recent call last):
  File "/opt/python/jpython/Lib/warnings.py", line 128, in warn_explicit
showwarning(message, category, filename, lineno)




Please help on probable causes for the same.


Thanks

--
components: Interpreter Core
messages: 303193
nosy: Megha
priority: normal
severity: normal
status: open
title: Python interpreter is failing due to BufferOverflow Exception
type: crash
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



[issue30977] reduce uuid.UUID() memory footprint

2017-09-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This change breaks pickle.

You should preserve forward and backward pickle compatibility.

1. Pickle data produced by old Python versions should be unpickleable with a 
new implementation. Implement __setstate__ for satisfying this.

2. Pickle data produced by a new implementation should be unpickleable in old 
Python versions. There are many ways to satisfy this, you should choose the 
most efficient.

--
components: +Library (Lib)
nosy: +serhiy.storchaka
type:  -> resource usage
versions: +Python 3.7

___
Python tracker 

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



[issue31615] Python interpreter is failing due to BufferOverflow Exception

2017-09-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The correct place for reporting Jython bugs is http://bugs.jython.org/.

--
nosy: +serhiy.storchaka
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



[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset d780b2d588e68bd7047ef5d1f04e36da38b7a350 by Serhiy Storchaka 
(Oren Milman) in branch 'master':
bpo-31478: Fix an assertion failure in random.seed() in case a seed has a bad 
__abs__() method. (#3596)
https://github.com/python/cpython/commit/d780b2d588e68bd7047ef5d1f04e36da38b7a350


--

___
Python tracker 

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



[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-28 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +3778

___
Python tracker 

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



[issue31424] test_socket hangs on x86 Gentoo Installed with X 3.x

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

New failure:

http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%203.x/builds/1093/steps/test/logs/stdio

...

running: test_socket (238364 sec)
running: test_socket (238394 sec)
running: test_socket (238424 sec)
running: test_socket (238454 sec)
running: test_socket (238484 sec)
running: test_socket (238514 sec)
2 days, 18:18:45 load avg: 0.37 [407/407] test_socket interrupted
sys:1: ResourceWarning: unclosed 


Test suite interrupted by signal SIGINT.
1 test omitted:
test_socket
396 tests OK.

10 tests skipped:
test_asdl_parser test_devpoll test_gdb test_kqueue test_msilib
test_startfile test_winconsoleio test_winreg test_winsound
test_zipfile64

Total duration: 3978 min 46 sec
Tests result: INTERRUPTED
program finished with exit code 130
elapsedTime=238725.770805


I guess that Zachary killed again the process.

Zach: Next time, try to send a SIGUSR1 since regrtest installs a signal handler 
for this signal, to dump the Python traceback. SIGUSR1 doesn't stop the 
process, it only dumps the traceback. You should send a following 
SIGINT/SIGTERM to stop the process. But I never tried this, I don't know if it 
works.

regrtest should do this automatically after TIMEOUT seconds: bpo-30884.

--

___
Python tracker 

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



[issue29400] Add instruction level tracing via sys.settrace

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

See also bpo-31344 and PR #3417:

New changeset 5a8516701f5140c8c989c40e261a4f4e20e8af86 by Nick Coghlan in 
branch 'master':
bpo-31344: Per-frame control of trace events (GH-3417)
https://github.com/python/cpython/commit/5a8516701f5140c8c989c40e261a4f4e20e8af86

--

___
Python tracker 

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

Failure on x86 Gentoo Refleaks 3.x too:

http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.x/builds/104/steps/test/logs/stdio

==
FAIL: test_basic (test.test_pty.PtyTest)
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/test_pty.py", 
line 105, in test_basic
self.assertEqual(b'For my pet fish, Eric.\n', normalize_output(s2))
AssertionError: b'For my pet fish, Eric.\n' != b'For m'

--

___
Python tracker 

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



[issue31616] Windows installer: Python binaries are user-writable

2017-09-28 Thread Pat K

New submission from Pat K :

This seems to affect different versions of Python Windows installer. The 
problem is when Python is installed for all users (requires elevation) its 
binaries and DLLs are shipped with writable permission for "Authenticated 
Users":

PS C:\Python36> icacls python.exe
python.exe BUILTIN\Administrators:(I)(F)
   NT AUTHORITY\SYSTEM:(I)(F)
   BUILTIN\Users:(I)(RX)
   NT AUTHORITY\Authenticated Users:(I)(M)

...

This could be easily exploited for profit by a malicious user to hijack the 
interpreter or libraries of other users, including Administrator, possibly 
leading to the privilege escalation.

--
components: Installation
messages: 303200
nosy: Pat K
priority: normal
severity: normal
status: open
title: Windows installer: Python binaries are user-writable
versions: Python 3.7

___
Python tracker 

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



[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset befc956acf8ddeb94f000ed081ddec51315429e5 by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-31478: Fix an assertion failure in random.seed() in case a seed has a 
bad __abs__() method. (GH-3596) (#3794)
https://github.com/python/cpython/commit/befc956acf8ddeb94f000ed081ddec51315429e5


--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread INADA Naoki

INADA Naoki  added the comment:

How often uuid1 is used?

I never use it and it looks uuid1 makes uuid.py complicated.
How about split it to _uuid1.py (or uuid/__init__.py and uuid/_uuid1.py)?

I hope PEP 562 is accepted.
It ease splitting out (heavy and slow and dirty) part into submodule without 
breaking backward compatibility.

Without PEP 562, easy way is making proxy function.

# uuid/__init__.py

def uuid1(node=None, clock_seq=None):
"""Generate a UUID from a host ID, sequence number, and the current time.
If 'node' is not given, getnode() is used to obtain the hardware
address.  If 'clock_seq' is given, it is used as the sequence number;
otherwise a random 14-bit sequence number is chosen."""
from . import _uuid1 
return _uuid1.uuid1()

--
nosy: +inada.naoki

___
Python tracker 

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



[issue31536] `make regen-all` triggers wholesale rebuild

2017-09-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Victor, are the buildbots fine now?

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
versions: +Python 3.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



[issue31536] `make regen-all` triggers wholesale rebuild

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

> Victor, are the buildbots fine now?

I didn't see anything wrong on buildbots, nor Travis CI/AppVeyor on PRs. So we 
can now backport the "optimization". Do you want to do it, Antoine?

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread INADA Naoki

INADA Naoki  added the comment:

Sorry, I reject my idea.  It clearly overdone. uuid.py is not so huge.

--
versions: +Python 3.5 -Python 3.7

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread Christian Heimes

Change by Christian Heimes :


--
versions: +Python 3.7, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue31607] Add listsize in pdb.py

2017-09-28 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Raymond,

+1 for the set/get commands for the parameters.

I could update my PR with your suggestions.

Stephane

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +3779

___
Python tracker 

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



[issue31478] assertion failure in random.seed() in case the seed argument has a bad __abs__() method

2017-09-28 Thread Oren Milman

Oren Milman  added the comment:

With regard to backporting to 2.7:

In 2.7 also, PyNumber_Absolute() is called, and its return value is stored in
the variable n.
However, there is no _PyLong_NumBits(n), so there is no assertion failure.
If n isn't an integer:
- if !PyObject_IsTrue(n), then the seed is zero (e.g. if n is None, [], () or 
{})
- otherwise, PyNumber_And() and PyNumber_Rshift() are used in a loop on n, so
  probably a TypeError would be raised.


So I think a backport is still desirable, but i am not sure about the test.

Maybe we should use @cpython_only, and make sure that no error is raised?
We can also make sure that random() returns a different value than when the
seed is zero.

What do you think?

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

> It ease splitting out (heavy and slow and dirty) part into submodule without 
> breaking backward compatibility.

Right. I created attached PR #3795 to implement this idea.

> I hope PEP 562 is accepted.

I don't think that this PEP is needed here. IMHO a new _uuid1 module is enoguh 
to avoid "side effects" on "import uuid".

> Sorry, I reject my idea.  It clearly overdone. uuid.py is not so huge.

Can you please elaborate? Do you think that my PR is wrong?

--
nosy: +haypo

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +3780

___
Python tracker 

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



[issue20519] Replace uuid ctypes usage with an extension module.

2017-09-28 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +3781

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

uuid code contains 4 bare "except:" blocks which should be replaced with 
appropriate exceptions, or at least "except Exception:" to not catch 
KeyboardInterrupt. But this should be modified in a second time.

--

___
Python tracker 

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



[issue31536] `make regen-all` triggers wholesale rebuild

2017-09-28 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3782
stage: resolved -> patch review

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I think https://github.com/python/cpython/pull/3796 is a better resolution.  It 
creates an optional _uuid C extension to avoid ctypes if possible *and* also 
loads system functions lazily.

--
versions:  -Python 3.8

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

> I think launching external tools like ifconfig and ipconfig can be avoided 
> pretty easily. There are many recipes around the net how to use native API's.

That's right, but I would prefer to enhance uuid to use native API's in a 
different issue and focus on avoiding "side effects" on "import uuid" in this 
issue.

Do you know a native APIs for Windows and Linux? I don't. Do you have links to 
these "recipes"? If yes, please open a new issue.

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Do you know a native APIs for Windows and Linux?

On Linux, we already use uuid_generate_time().  See _unixdll_get_node().

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

And on Windows, _windll_getnode() calls into _UuidCreate().

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

Antoine: "I think https://github.com/python/cpython/pull/3796 is a better 
resolution.  It creates an optional _uuid C extension to avoid ctypes if 
possible *and* also loads system functions lazily."

Implementing bpo-20519 is a very good idea. But I still like the idea of 
putting all these ugly functions to get the node and geneate a UUID1 object in 
a different module, since most of these code is not used on most platforms.

Antoine: Would you mind to modify your PR 3796 to only implement bpo-20519? I 
would prefer to reorganize uuid.py in a second step. It will be easy to review 
and easy to discuss what is the best option.

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

It's nice to see things moving in this 6 years old issue :-)

--

___
Python tracker 

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



[issue31617] os.path.join() return wrong value in windows

2017-09-28 Thread Quang Nguyen

New submission from Quang Nguyen :

In windows if we use os.path.join('C:\\Test\\UnitTest', '/Page') ==> It returns 
'C:/Page' ==> It should be 'C:\\Test\\UnitTest/Page'.

--
components: Windows
messages: 303216
nosy: paul.moore, steve.dower, tim.golden, triquang, zach.ware
priority: normal
severity: normal
status: open
title: os.path.join() return wrong value in windows
versions: Python 2.7

___
Python tracker 

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



[issue31616] Windows installer: Python binaries are user-writable

2017-09-28 Thread Eryk Sun

Eryk Sun  added the comment:

The "(I)" flag in an icacls entry means it's inherited from the parent 
directory. The installer doesn't override these inherited permissions. 
Currently, it's your responsibility to do this if you install to a custom 
directory such as C:\Python36. 

Starting with Python 3.5, a per-machine installation defaults to a subdirectory 
of Program Files. This system directory only grants standard users generic read 
and execute access for subdirectories and files. A per-user installation 
defaults to the user's Programs directory (i.e. %LocalAppData%\Programs). This 
directory grants full control to the user, administrators, and the system. 
Other users have no access.

--
components: +Windows
nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware
type:  -> enhancement

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread INADA Naoki

INADA Naoki  added the comment:

>> Sorry, I reject my idea.  It clearly overdone. uuid.py is not so huge.

> Can you please elaborate? Do you think that my PR is wrong?

I looked https://github.com/python/cpython/pull/3684 and
I wonder if I should recommend to split module before review.
So I meant "I stop requesting split module and I'll review the PR3684."

Now I see your PR and it looks more clean.

--

___
Python tracker 

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



[issue20519] Replace uuid ctypes usage with an extension module.

2017-09-28 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
versions: +Python 3.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



[issue20519] Replace uuid ctypes usage with an extension module.

2017-09-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

https://github.com/python/cpython/pull/3796 updates the patch for 3.7 and 
improves on it a bit by making initialization lazy.

--
nosy: +pitrou

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> I would prefer to reorganize uuid.py in a second step

I am not reorganizing uuid.py, just making initialization lazy.

--

___
Python tracker 

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



[issue31614] can't list groupby generator without breaking the sub groups generators

2017-09-28 Thread Eric V. Smith

Eric V. Smith  added the comment:

Loïc Le Loarer: Note that your use case isn't possible, anyway. There's no way 
to know the number of groups until the input is exhausted, at which point 
you've already iterated through all of the data.

--
nosy: +eric.smith

___
Python tracker 

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



[issue31536] `make regen-all` triggers wholesale rebuild

2017-09-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset ec3d34c5b2feb10cb4d7606a10d81c178c3afce3 by Antoine Pitrou (Miss 
Islington (bot)) in branch '3.6':
[3.6] bpo-31536: Avoid wholesale rebuild after `make regen-all` (GH-3678) 
(#3797)
https://github.com/python/cpython/commit/ec3d34c5b2feb10cb4d7606a10d81c178c3afce3


--

___
Python tracker 

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



[issue31536] `make regen-all` triggers wholesale rebuild

2017-09-28 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue31617] os.path.join() return wrong value in windows

2017-09-28 Thread Eryk Sun

Eryk Sun  added the comment:

This is explained in the docs:

Join one or more path components intelligently If a 
component is an absolute path, all previous components are 
thrown away and joining continues from the absolute path 
component. On Windows, the drive letter is not reset when 
an absolute path component (e.g., r'\foo') is encountered.

--
nosy: +eryksun
resolution:  -> not a bug
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



[issue31616] Windows installer: Python binaries are user-writable

2017-09-28 Thread Pat K

Pat K  added the comment:

Thank you for the explanation. I understand this is intentional. However
user without such knowledge of inheritable permissions might want to
default the installation directory to the old one (C:\PythonXX) and
could easily run into this issue without knowing. IMHO extra security
check or explicit warning wouldn't hurt here. Just my 5c.

On 9/28/2017 1:09 PM, Eryk Sun wrote:
> 
> Eryk Sun  added the comment:
> 
> The "(I)" flag in an icacls entry means it's inherited from the parent 
> directory. The installer doesn't override these inherited permissions. 
> Currently, it's your responsibility to do this if you install to a custom 
> directory such as C:\Python36. 
> 
> Starting with Python 3.5, a per-machine installation defaults to a 
> subdirectory of Program Files. This system directory only grants standard 
> users generic read and execute access for subdirectories and files. A 
> per-user installation defaults to the user's Programs directory (i.e. 
> %LocalAppData%\Programs). This directory grants full control to the user, 
> administrators, and the system. Other users have no access.
> 
> --
> components: +Windows
> nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware
> type:  -> enhancement
> 
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue31618] Change sys.settrace opcode tracing to occur after frame line number update

2017-09-28 Thread George King

New submission from George King :

This patch moves the new opcode tracing added in commit 5a85167 to happen after 
frame->f_lineno is updated. With this patch, when both f_trace_lines and 
f_trace_opcodes are enabled the trace function will see the same line number 
for both the 'line' and 'opcode' events.

A side effect of this patch is that the order of event emission has been 
switched; 'line' now happens before 'opcode'. Maintaining the current order 
would require more elaborate logic.

--
messages: 303225
nosy: gwk, ncoghlan, nedbat, njs, serhiy.storchaka
priority: normal
pull_requests: 3783
severity: normal
status: open
title: Change sys.settrace opcode tracing to occur after frame line number 
update
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue31618] Change sys.settrace opcode tracing to occur after frame line number update

2017-09-28 Thread George King

George King  added the comment:

The feature was was implemented in bpo-31344. See bpo-29400 for my parallel 
effort, which has been abandoned.

--

___
Python tracker 

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



[issue29400] Add instruction level tracing via sys.settrace

2017-09-28 Thread George King

George King  added the comment:

Nick's implementation of f_trace_lines/f_trace_opcodes serves the same purpose 
as my proposal, and is a simpler solution so I'm abandoning this patch and 
working with that feature instead.

--
stage: test needed -> 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



[issue1350] IDLE - CallTips enhancement - show full doc-string in new window

2017-09-28 Thread Mark Lawrence

Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

Oh. I was told that the PR 3684 of bpo-5885 in another fix for this issue.

--

___
Python tracker 

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



[issue5885] uuid.uuid1() is too slow

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

Hum, there are many open uuid issues which propose similar changes. I close 
this issue in favor of bpo-11063. Please continue the discussion there.

--
nosy: +haypo
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> uuid.py module import has heavy side effects

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

PR 3684 seems mostly a subset of what I'm proposing.

--

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

I marked bpo-5885 as a duplicate of this issue, even if it's not exactly the 
same. The main purpose of this issue was to use uuid_generate_time() using a C 
extension, as bpo-20519.

+static PyObject *
+uuid_uuid1(PyObject *self, PyObject *args)
+{
+uuid_t out;
+uuid_generate_time(out);
+return PyByteArray_FromStringAndSize((const char *) out,sizeof(out));
+}

+static PyObject *
+uuid_uuid4(PyObject *self, PyObject *args)
+{
+uuid_t out;
+uuid_generate_random(out);
+return PyByteArray_FromStringAndSize(out,sizeof(out));
+}

--

___
Python tracker 

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



[issue31616] Windows installer: Python binaries are user-writable

2017-09-28 Thread R. David Murray

R. David Murray  added the comment:

In fact, this is a backward compatibility issue.  Users expect that if you 
install it in the old location, it behaves like it did in the old location 
(lower security), and this is probably depended on by a number of users of 
python.  We *could* change it in some new feature release I suppose, but I'm 
pretty sure we consciously decided to go with this approach for this reason.

I do wonder what the standard practice is in the Windows world for alternate 
install locations, because that might have been a factor too :)

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



[issue20519] Replace uuid ctypes usage with an extension module.

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

There are too many uuid open issues proposing similar changes. I mark this 
issue as a duplicate of bpo-11063 to avoid splitted discussions. Please 
continue the discussion there!

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> uuid.py module import has heavy side effects

___
Python tracker 

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



[issue11063] uuid.py module import has heavy side effects

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

I marked bpo-20519 as a duplicate of this issue, even if it's not exactly the 
same. The main purpose of this issue was to use uuid_generate_time() using a C 
extension:

+static PyObject *
+_uuid_generate_random(void)
+{
+uuid_t out;
+uuid_generate_random(out);
+return PyBytes_FromStringAndSize((const char *) out, sizeof(out));
+}

+static PyObject *
+_uuid_generate_time(void)
+{
+uuid_t out;
+uuid_generate_time(out);
+return PyBytes_FromStringAndSize((const char *) out, sizeof(out));
+}

--

___
Python tracker 

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



[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
title: uuid.py module import has heavy side effects -> Rework uuid module: lazy 
initialization and add a new C extension

___
Python tracker 

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



[issue28129] assertion failures in ctypes

2017-09-28 Thread Oren Milman

Oren Milman  added the comment:

Shouldn't we close this issue?

--

___
Python tracker 

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



[issue30977] reduce uuid.UUID() memory footprint

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue26793] ctypes issue with threads after fork

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

The bpo-11063 is going to rewrite uuid using a C extension to avoid ctypes, but 
also defer "import ctypes" until we really need it (when the new C extension is 
not available). I don't think this issue is related to uuid directly, no?

I changed the issue title to: "ctypes issue with threads after fork". Don't 
hesitate to complete/rewrite the title if you understood the issue :-)

--
title: uuid causing thread issues when forking using os.fork py3.4+ -> ctypes 
issue with threads after fork

___
Python tracker 

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



[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +serhiy.storchaka
title: UUID bytes constructor has too-tight an assertion -> RFE: 
uuid.UUID(bytes=...): support bytes-like types, not only bytes
type: behavior -> enhancement

___
Python tracker 

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



[issue25098] test_uuid fails with pywin32 installed

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

Zachary: any update on this issue? Is it still a bug?

--
nosy: +haypo

___
Python tracker 

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



[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +3784

___
Python tracker 

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



[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

I abandonned my PR and started to review Antoine's PR 3796 which basically 
combines all previous patches proposed last 6 years :-)

--

___
Python tracker 

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



[issue28129] assertion failures in ctypes

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +3785
stage:  -> patch review

___
Python tracker 

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



[issue28129] assertion failures in ctypes

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +3786

___
Python tracker 

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



[issue28129] assertion failures in ctypes

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

> Shouldn't we close this issue?

Oh, I forgot this issue.

Python 2.7 and 3.6 are also impacted and still accept bug fixes. I proposed 
backports.

--
versions: +Python 2.7, Python 3.6

___
Python tracker 

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



[issue31619] Strange error when convert hexadecimal with underscores to int

2017-09-28 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

>>> int('1_2_3_4_5_6_7_89', 16)
4886718345
>>> int('1_2_3_4_5_6_7_8_9', 16)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: int string too large to convert

--
components: Interpreter Core
messages: 303240
nosy: georg.brandl, mark.dickinson, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Strange error when convert hexadecimal with underscores to int
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
keywords: +patch
pull_requests: +3787
stage:  -> patch review

___
Python tracker 

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, in fact, it's not that hard to reproduce the failure on Linux:

haypo@selma$ ./python -m test test_pty -m test_basic -F 
Run tests sequentially
0:00:00 load avg: 2.17 [  1] test_pty
0:00:00 load avg: 2.17 [  2] test_pty
0:00:00 load avg: 2.17 [  3] test_pty
(...)
0:00:00 load avg: 2.17 [ 15] test_pty
0:00:00 load avg: 2.17 [ 16] test_pty
test test_pty failed -- Traceback (most recent call last):
  File "/home/haypo/prog/python/master/Lib/test/test_pty.py", line 105, in 
test_basic
self.assertEqual(b'For my pet fish, Eric.\n', normalize_output(s2))
AssertionError: b'For my pet fish, Eric.\n' != b'For m'

test_pty failed
15 tests OK.

1 test failed:
test_pty

Total duration: 486 ms
Tests result: FAILURE

--

___
Python tracker 

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



[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I agree. In any case assert is a bad way of checking argument types. It was 
added in 65b6a80f19736d6313d5eb896d6b2fb6bbf65a03 as a part of migration to 
Python 3. I guess for debugging purposes. Now it isn't needed, 
int.from_bytes() checks whether the type is appropriate.

Do you want to create a pull request Nic?

--

___
Python tracker 

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
keywords: +patch
pull_requests: +3788
stage:  -> patch review

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman

Change by Oren Milman :


--
pull_requests: +3789

___
Python tracker 

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



[issue28129] assertion failures in ctypes

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 7d6ddb96b34b94c1cbdf95baa94492c48426404e by Victor Stinner in 
branch '3.6':
bpo-28129: fix ctypes crashes (#386) (#3799)
https://github.com/python/cpython/commit/7d6ddb96b34b94c1cbdf95baa94492c48426404e


--

___
Python tracker 

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



[issue28129] assertion failures in ctypes

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 8b83687bdf66d2d10afb78e46bcede399deaefde by Victor Stinner in 
branch '2.7':
bpo-28129: fix ctypes crashes (#386) (#3800)
https://github.com/python/cpython/commit/8b83687bdf66d2d10afb78e46bcede399deaefde


--

___
Python tracker 

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



[issue28129] assertion failures in ctypes

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

Ok, now the issue can be closed :-) I backported Oren Milman's fix to Python 
2.7 and 3.6 as well.

Oren Milman: thank you very much for your fix!

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



[issue31609] PCbuild\clean.bat fails if the path contains whitespaces

2017-09-28 Thread STINNER Victor

Change by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Ah, Victor already have created a PR!

--
components: +Library (Lib) -Extension Modules
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue31610] Use select.poll instead of select.select in SocketServer.BaseServer.serve_forever

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

> Better alternative will be to use poll or epoll even.

epoll requires mulitple system calls, whereas the selector seems to only be 
used only once in most cases, no?

Anyway, maybe selectors.DefaultSelector can be used here?

About poll(): be aware of macOS issues with poll() :-/

--
nosy: +haypo

___
Python tracker 

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



[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

Serhiy: is it safe to accept any memoryview? Or should we call explicitly 
.cast('B') on memory views to prevent bad surprises?

The asyncio module doesn't do anything special in sock_sendall(). "data" is 
passed directly to socket.send(), unchanged.

So maybe it's just fine to not do anything special.

--
nosy: +haypo

___
Python tracker 

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann

Cornelius Diekmann  added the comment:

Regarding PR 3802:
 * Does reading the string b'I wish to buy a fish license.\n' not cause a 
problem, too?
 * Is reading len(expected) bytes the correct behavior for systems where 
normalize_output is needed?


I also fixed these issues in one of my (unmerged) pull requests (bpo 
issue29070). Unfortunately, the patch I propose does way too many things at the 
same time and I don't have time currently to untangle it :( Feel free to cherry 
pick the _os_readline function:
https://github.com/python/cpython/pull/2932/files#diff-6c897ae50dce4ffa73bde779206a2059R60
Don't hesitate to put your name on it, if you take the time to review and 
cherry pick :)

Cheers!

--

___
Python tracker 

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



[issue29729] RFE: uuid.UUID(bytes=...): support bytes-like types, not only bytes

2017-09-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The code doesn't work nice with general objects supporting the buffer protocol. 
The length check suppose that the value has a length, and it is the size in 
bytes. The code for bytes_le suppose that the value supports slicing and 
concatenating results of the slicing. And all this code is made as fast as 
possible. Additional checks and conversions will slowdown it.

--

___
Python tracker 

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



[issue31610] Use select.poll instead of select.select in SocketServer.BaseServer.serve_forever

2017-09-28 Thread Giampaolo Rodola'

Giampaolo Rodola'  added the comment:

I recommend to use selectors.PollSelector and fallback on 
selectors.SelectSelector where not available (Windows) in order to use 1 
syscall only. That's what we did already in socket.py, subprocess.py and others.

--
nosy: +giampaolo.rodola

___
Python tracker 

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

> Does reading the string b'I wish to buy a fish license.\n' not cause a 
> problem, too?

This string TEST_STRING_1 is used for a single os.write() call, whereas 
TEST_STRING_2 is splitted and written in two parts with two os.write() calls.

I prefer minimal change, since I don't know well the pty module.

> Is reading len(expected) bytes the correct behavior for systems where 
> normalize_output is needed?

Yeah, I looked at this function. normalize_output() can return a string shorter 
than the input: len(normalize_output(s2)) <= len(s2).

So I think that len(s2) < len(expected) is correct.

--

___
Python tracker 

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



[issue31616] Windows installer: Python binaries are user-writable

2017-09-28 Thread Paul Moore

Paul Moore  added the comment:

Standard Windows behaviour, in my experience, is inherited permissions.

IMO, the current behaviour is correct - we default to an OS-managed secure 
location for system wide installs, and a user-modifiable location for user 
installs. If the person doing the install chooses an alternate location, we do 
not attempt to set policy on that location, but simply inherit the defined 
permissions.

--

___
Python tracker 

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



[issue31610] Use select.poll instead of select.select in SocketServer.BaseServer.serve_forever

2017-09-28 Thread STINNER Victor

STINNER Victor  added the comment:

> I recommend to use selectors.PollSelector and fallback on 
> selectors.SelectSelector where not available (Windows) in order to use 1 
> syscall only. That's what we did already in socket.py, subprocess.py and 
> others.

It would be nice to have an API in selectors to get a "lightweight" selector, 
for selector and poll.

This API would be appropriate to check on macOS if poll() works or not: 
bpo-28087.

--

___
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

2017-09-28 Thread sorin

sorin  added the comment:

This is a perfectly valid bug and I am surprised it was ignored for so long. 

I just raised a PR for addressing it, please review it.

--
keywords: +patch
nosy: +sorin
pull_requests: +3790
stage:  -> patch review
type: enhancement -> behavior
versions: +Python 3.4

___
Python tracker 

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



[issue25098] test_uuid fails with pywin32 installed

2017-09-28 Thread Zachary Ware

Zachary Ware  added the comment:

Still fails on Python 3.6.1 with pypiwin32-220; those are the versions I have 
handy to check on.  I've not managed to report it to pywin32 or look into it 
any deeper, though.  If someone can confirm that it's definitely their bug, 
this can be closed as third-party.

--

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman

Change by Oren Milman :


--
pull_requests: +3791

___
Python tracker 

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann

Cornelius Diekmann  added the comment:

>> Does reading the string b'I wish to buy a fish license.\n' not cause a 
>> problem, too?
>
>This string TEST_STRING_1 is used for a single os.write() call, whereas 
>TEST_STRING_2 is splitted and written in two parts with two os.write() calls.
>
>I prefer minimal change, since I don't know well the pty module.

I like the idea of minimal change, too :D

Yet, I think your patch does not solve the core problem of read/write being 
nondeterministic. In theory, a pty is similar to a pipe (with termios 
processing in the middle). So any os.write to a pty fd is nondeterministic and 
may put less bytes into the pty buffer than given to the write call (see the 
return value of os.write, which test_pty.py does not check). Multiple writes 
are buffered by the kernel, until the buffer is full. So the kernel already 
accumulates the chunked writing for us. Usually, this works fine.

Similarly, a os.read may also be nondeterministic, depending on how many bytes 
are ready in the pty buffer. This may have nothing to do with the chunked 
writing of the test_pty.py module because the kernel is doing the read/write 
syscalls and handling the pty buffer.

Here is a PoC: I checked out your code and stressed my system with it. I have 2 
physical and 2 virtual cores and started 8 instances of the test to stress my 
kernel with scheduling, locking of kernel buffers (the pty buffer), and making 
read/write more nondeterministic.

./python -b -m test -j 8 test_pty -m test_basic -F

Here is what I got:
0:00:13 load avg: 3.25 [119/1] test_pty failed
test test_pty failed -- Traceback (most recent call last):
  File "XXX/cpython/Lib/test/test_pty.py", line 99, in test_basic
normalize_output(s1))
AssertionError: b'I wish to buy a fish license.\n' != b'I wish to buy a fish 
license.'

>> Is reading len(expected) bytes the correct behavior for systems where 
>> normalize_output is needed?
>
>Yeah, I looked at this function. normalize_output() can return a string 
>shorter than the input: len(normalize_output(s2)) <= len(s2).
>
>So I think that len(s2) < len(expected) is correct.

Warning, obscure corner cases ahead.
In theory, given read is completely nondeterministic and we are on one of the 
strange systems which need normalize_output, the following could happen:
We have b'For my pet fish, Eric.\r\n' in the pty buffer. We read b'For my pet 
fish, Eric.\r' from the buffer into s2. Now len(s2) == len(expected) but a 
b'\n' is still unread in the buffer. This would make the test fail. I admit, 
this is a corner case, but also an argument that a clean test case may want to 
have a readline function.

--

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PyUnicode_Splitlines() cannot be used here in 2.7, because the source is likely 
a 8-bit string.

Actually I'm not sure this issue is worth to be fixed in 2.7. The fix would be 
different from 3.x and more complex.

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann

Cornelius Diekmann  added the comment:

Oh, one more thing, since it is unclear whether read or write is causing the 
error. I replaced
os.write(slave_fd, TEST_STRING_1)
by
pty._writen(slave_fd, TEST_STRING_1)
which makes sure all bytes are written.
After some time, when the load gets high and the machine gets noisy, I get the 
same error:

0:01:09 load avg: 6.17 [597/1] test_pty failed
test test_pty failed -- Traceback (most recent call last):
  File "XXX/cpython/Lib/test/test_pty.py", line 99, in test_basic
normalize_output(s1))
AssertionError: b'I wish to buy a fish license.\n' != b'I wish to buy a fish 
license.'

So the main problem is a nondeterministic read. But I'm only testing on Linux. 
Other systems with different kernel may behave differently. And the 
documentation allows a kernel to make both short reads and writes.

--

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Oren Milman

Oren Milman  added the comment:

In 2.7, PyUnicode_Splitlines() first does:
string = PyUnicode_FromObject(string);

So i thought that PyUnicode_Splitlines() would be fine with receiving a string.

But now i realize that even in case i was right there, PyUnicode_Splitlines()
returns a unicode, and not a string, so there should be problems later.
I wonder how the tests still passed..

--

___
Python tracker 

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann

Cornelius Diekmann  added the comment:

I also added a pull request which I cannot get to fail on my system. What do 
you think, haypo?

Sorry for the noise!

--

___
Python tracker 

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



[issue31465] Allow _PyType_Lookup() to raise exceptions

2017-09-28 Thread Stefan Behnel

Change by Stefan Behnel :


--
nosy: +haypo

___
Python tracker 

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-28 Thread Cornelius Diekmann

Change by Cornelius Diekmann :


--
pull_requests: +3792

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-28 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> In 2.7, PyUnicode_Splitlines() first does:
> string = PyUnicode_FromObject(string);

And it raises an exception if the string contains non-ASCII characters.

It is better to avoid str<->unicode convertion as long as possible. And when 
do it for the output a warning, use "replace" or "backslashreplace" error 
handlers or "latin1" decoder to avoid a failure.

--

___
Python tracker 

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



[issue31465] Allow _PyType_Lookup() to raise exceptions

2017-09-28 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
nosy:  -pitrou

___
Python tracker 

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



  1   2   >