[issue32511] Thread primitives do not report the OS-level error on failure

2018-01-07 Thread Nitish

Change by Nitish :


--
nosy: +nitishch

___
Python tracker 

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



[issue31975] Add a default filter for DeprecationWarning in __main__

2018-01-07 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 9b99747386b690007027c3be2a5d7cfe3d3634f5 by Nick Coghlan in 
branch 'master':
bpo-31975 (PEP 565): Show DeprecationWarning in __main__ (GH-4458)
https://github.com/python/cpython/commit/9b99747386b690007027c3be2a5d7cfe3d3634f5


--

___
Python tracker 

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



[issue31975] Add a default filter for DeprecationWarning in __main__

2018-01-07 Thread Nick Coghlan

Change by Nick Coghlan :


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



[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

As David noted, we updated all the URL parsing functions to be polymorphic back 
in 3.2: 
https://docs.python.org/3/library/urllib.parse.html#parsing-ascii-encoded-bytes

We left the quoting functions alone, because they already had their own way of 
dealing with the bytes-vs-str distinction (quote_from_bytes, unquote_to_bytes, 
etc) that meant the polymorphic approach we adopted for the parsing functions 
didn't make sense.

That said, I think it would be reasonable to enhance unquote() to accept a 
bytes object, processing it as follows:

unquote_to_bytes(string).decode(encoding, errors)

--

___
Python tracker 

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



[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

Thanks. I've added the dependencies, and also granted you triage permissions on 
the tracker, so you should be able to edit dependencies yourself in the future.

--
dependencies: +Add an option to profile to run library module as a script, Add 
an option to trace to run module as a script

___
Python tracker 

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



[issue32514] 0x80070002 - The system cannot find the file specified

2018-01-07 Thread Tylor

Tylor  added the comment:

Here's the second log file.

Yeah, it's actually 2 spaces. It happened when I initially setup my computer 
and it would not let me setup my User Account with a Microsoft Account. 
Therefore, I settled for a local account which I miss-named with 2 extra spaces 
somehow. I later attached my Microsoft Account, so while my display name does 
not have spaces, the directory does. I'm not sure how to change this, and I 
assume it would cause big issues for many programs if I were to suddenly change 
it.

--
Added file: https://bugs.python.org/file47373/Python 3.6.4 
(32-bit)_20180107153053_000_core_JustForMe[3206].log

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-01-07 Thread Martin Panter

Martin Panter  added the comment:

FWIW there was documentation in the README about the Setup files, removed in 
Subversion r57681 (= Git revision 1c896e3). It looks like it still survives in 
the 2.7 version.

--
nosy: +martin.panter

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-07 Thread Ivan Levkivskyi

Change by Ivan Levkivskyi :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue32507] Change Windows install to applocal UCRT

2018-01-07 Thread Steve Dower

Steve Dower  added the comment:

All correct. I believe venv is fine, as it copies all DLLs, but virtualenv is 
more selective and will need to be updated.

--

___
Python tracker 

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



[issue32514] 0x80070002 - The system cannot find the file specified

2018-01-07 Thread Steve Dower

Steve Dower  added the comment:

In your TEMP directory there will be at least one other log file near the one 
you attached. Could you also include those?

I wonder if the space at the start of your user name is a problem...

--

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-01-07 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
resolution: rejected -> 
stage: needs patch -> patch review
status: closed -> open
type: performance -> enhancement

___
Python tracker 

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



[issue32508] Problem while reading back from a list of lists

2018-01-07 Thread J Viswanathan

J Viswanathan  added the comment:

Thanks for your sensible advice to produce
a short, self-contained and correct example.

Attached is the input file (35 lines, 770 bytes) and log (14 lines)

Description of the problem and bug:

The data consists of 6 triplets.

The code is to group the data according to the pair in each
triplet.

In the data, there are just two pairs [1,3] and [2,2]

With the pair [1,3] the associated third item in the first
three triplets are 1, 2, 4.

(This is printed correctly in the first line of the output).

 The bug is seen on the 4th (non-blank) line:

 klists[0] should be [1,2,4] and not as shown.

 I sincerely hope that I am not wasting your time with a
 non-existent bug.

 J. Viswanathan.

On Sun, Jan 7, 2018 at 8:22 AM, Steven D'Aprano 
wrote:

>
> Steven D'Aprano  added the comment:
>
> It isn't clear to me what bug you are reporting here:
>
> - What do you mean by "problem reading back from a list of lists"? What
> sort of problem?
>
> - What makes you think that there is a bug in the interpreter, rather than
> in your own code?
>
> We aren't going to debug your code for you: if you have found a bug,
> please report the simplest code that shows the bug. You may find it helpful
> to read this first:
>
> http://sscce.org/
>
> Although it is written for Java, the same applies to Python code too.
>
> I'm closing this ticket for now.
>
> If you simplify your code to something that demonstrates a bug in the
> Python interpreter, rather than a bug in your own code, please re-open this
> ticket with a better description of what the problem is, and the shortest,
> simplest demonstration of that problem that you can come up with.
>
> Thank you.
>
> --
> nosy: +steven.daprano
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--
Added file: https://bugs.python.org/file47371/hksu_copy.py
Added file: https://bugs.python.org/file47372/hksu.log

___
Python tracker 

___

vdata =  [1, 3, 1,
  1, 3, 2,
  1, 3, 4,
  2, 2, 2,
  2, 2, 4,
  2, 2, 7]

uids = []
klists = []
check_uid =[0,0]
klist = []

for x in range(6):
xslice = vdata[3*x:3*(x+1)]
lid = xslice[0:2]
k = xslice[2]

if (lid == check_uid): #an existing uid
klist.append(k)
else:
check_uid = lid   # a new uid
uids.append(check_uid) 
if len(klist):
klists.append(klist)
print ('\nx : ', x, 'klist:' , klist)
klist.clear()
klist.append(k)

klists.append(klist)   # The last of the klists

print ('\nlen(klists) :', len(klists))

print ('\ni  uids(i)  klists[i] \n')
for i in range(2):
print ( i, '', uids[i], '', klists[i])

-*- mode: compilation; default-directory: "c:/Users/J V/Documents/gamsdir/" -*-
Compilation started at Mon Jan  8 05:32:11

python hksu_copy.py

x :  3 klist: [1, 2, 4]

len(klists) : 2

i  uids(i)  klists[i] 

0  [1, 3]  [2, 4, 7]
1  [2, 2]  [2, 4, 7]

Compilation finished at Mon Jan  8 05:32:12
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32511] Thread primitives do not report the OS-level error on failure

2018-01-07 Thread Dryden Bouamalay

Change by Dryden Bouamalay :


--
nosy: +drydenb

___
Python tracker 

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



[issue32517] test_read_pty_output() of test_asyncio hangs on x86-64 Sierra 3.6

2018-01-07 Thread STINNER Victor

New submission from STINNER Victor :

On buildbot x86-64 Sierra 3.6, since build 163, test_read_pty_output() of 
test_asyncio started to hang:

http://buildbot.python.org/all/#/builders/20/builds/163/steps/4/logs/stdio

0:22:40 load avg: 1.73 [329/406/1] test_asyncio crashed (Exit code 1)
Timeout (0:15:00)!
Thread 0x7fffb5eee340 (most recent call first):
  File 
"/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/selectors.py", line 
577 in select
  File 
"/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/asyncio/base_events.py",
 line 1396 in _run_once
  File 
"/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/asyncio/base_events.py",
 line 422 in run_forever
  File 
"/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/asyncio/base_events.py",
 line 455 in run_until_complete
  File 
"/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/test/test_asyncio/test_events.py",
 line 1536 in test_read_pty_output
  File 
"/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/test/support/__init__.py",
 line 555 in wrapper
  File 
"/Users/buildbot/buildarea/3.6.billenstein-sierra/build/Lib/test/support/__init__.py",
 line 600 in wrapper
(...)

Difference between pythoninfo of build 162 and 163:

-os.login: buildbot
+os.login: _timed

-os.uname: posix.uname_result(sysname='Darwin', nodename='mattb-mbp2.local', 
release='17.2.0', version='Darwin Kernel Version 17.2.0: Fri Sep 29 18:27:05 
PDT 2017; root:xnu-4570.20.62~3/RELEASE_X86_64', machine='x86_64')
+os.uname: posix.uname_result(sysname='Darwin', nodename='mattb-mbp2.local', 
release='17.3.0', version='Darwin Kernel Version 17.3.0: Thu Nov  9 18:09:22 
PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64', machine='x86_64')

-platform.platform: Darwin-17.2.0-x86_64-i386-64bit
+platform.platform: Darwin-17.3.0-x86_64-i386-64bit

-sys.version: 3.6.4+ (heads/3.6:aea95c2fbd, Jan  2 2018, 00:22:06)  [GCC 4.2.1 
Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
+sys.version: 3.6.4+ (heads/3.6:a70d5ff992, Jan  4 2018, 01:35:13)  [GCC 4.2.1 
Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]

-sysconfig[HOST_GNU_TYPE]: x86_64-apple-darwin17.2.0
+sysconfig[HOST_GNU_TYPE]: x86_64-apple-darwin17.3.0

The os.login change is interesting and curious, and it also looks like a macOS 
upgrade from Darwin 17.2.0 to 17.3.0.

--
components: Tests, asyncio, macOS
messages: 309650
nosy: asvetlov, ned.deily, ronaldoussoren, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_read_pty_output() of test_asyncio hangs on x86-64 Sierra 3.6
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



[issue31931] test_concurrent_futures: ProcessPoolSpawnExecutorTest.test_shutdown_race_issue12456() leaked dangling process on x86 Tiger 3.x

2018-01-07 Thread STINNER Victor

STINNER Victor  added the comment:

Another recent failure on x86 Tiger 3.x:

http://buildbot.python.org/all/#/builders/30/builds/441

test_max_workers_negative 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest) ... 
2.63s ok
test_no_stale_references 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest) ... 
2.66s ok
test_ressources_gced_in_workers 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest) ... 
4.72s ok
test_shutdown_race_issue12456 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest) ... 
3.37s Warning -- reap_children() reaped child process 1808
ok
test_submit 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest) ... 
2.65s ok
test_submit_keyword 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest) ... 
2.67s ok
test_traceback 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolExecutorTest) ... 
8.59s ok
test_context_manager_shutdown 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolShutdownTest) ... 
0.13s ok
test_del_shutdown 
(test.test_concurrent_futures.ProcessPoolSpawnProcessPoolShutdownTest) ... 
0.11s ok
(...)
--
Ran 150 tests in 262.265s
OK
Warning -- multiprocessing.process._dangling was modified by 
test_concurrent_futures
  Before: <_weakrefset.WeakSet object at 0x1cd1a44>
  After:  <_weakrefset.WeakSet object at 0x1ebc84c>

--

___
Python tracker 

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



[issue23749] asyncio missing wrap_socket (starttls)

2018-01-07 Thread STINNER Victor

STINNER Victor  added the comment:

SelectorStartTLSTests failed once on x86 Tiger 3.x in build 453, but then 
passed, no idea why.

http://buildbot.python.org/all/#/builders/30/builds/453

==
ERROR: test_start_tls_client_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests)
--
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_asyncio/test_sslproto.py",
 line 225, in test_start_tls_client_1
asyncio.wait_for(client(srv.addr), loop=self.loop, timeout=10))
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 
440, in run_until_complete
return future.result()
  File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/tasks.py", line 
398, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
==
ERROR: test_start_tls_server_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests)
--
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_asyncio/test_sslproto.py",
 line 285, in test_start_tls_server_1
asyncio.wait_for(main(), loop=self.loop, timeout=10))
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/base_events.py", line 
440, in run_until_complete
return future.result()
  File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/asyncio/tasks.py", line 
398, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

--

___
Python tracker 

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



[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-07 Thread STINNER Victor

STINNER Victor  added the comment:

Failure on x86 Gentoo Installed with X 3.x:

http://buildbot.python.org/all/#/builders/103/builds/453

4 tests failed:
test_compileall test_import test_importlib test_inspect

test test_import crashed -- Traceback (most recent call last):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/test/libregrtest/runtest.py",
 line 163, in runtest_inner
the_module = importlib.import_module(abstest)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/importlib/__init__.py",
 line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 994, in _gcd_import
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 665, in _load_unlocked
  File "", line 723, in exec_module
  File "", line 219, in _call_with_frames_removed
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/test/test_import/__init__.py",
 line 28, in 
from test.test_importlib.util import uncache
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/test/test_importlib/util.py",
 line 19, in 
from . import data01
ImportError: cannot import name 'data01' from 'test.test_importlib' 
(/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.7/test/test_importlib/__init__.py)

--

___
Python tracker 

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



[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2018-01-07 Thread STINNER Victor

STINNER Victor  added the comment:

Tests fail on Windows since the commit deae6b451fefd5fd3143dd65051e1d341e5a5f84.

Example with AMD64 Windows8.1 Non-Debug 3.x:

http://buildbot.python.org/all/#/builders/12/builds/426

==
FAIL: test_open_binary (test.test_importlib.test_open.OpenDiskTests)
--
Traceback (most recent call last):
  File 
"D:\buildarea\3.x.ware-win81-release\build\lib\test\test_importlib\test_open.py",
 line 24, in test_open_binary
self.assertEqual(result, b'Hello, UTF-8 world!\n')
AssertionError: b'Hello, UTF-8 world!\r\n' != b'Hello, UTF-8 world!\n'

--
nosy: +vstinner

___
Python tracker 

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



[issue31963] AMD64 Debian PGO 3.x buildbot: compilation failed with an internal compiler error in create_edge

2018-01-07 Thread STINNER Victor

STINNER Victor  added the comment:

Different error:

http://buildbot.python.org/all/#/builders/47/builds/428

Objects/bytearrayobject.c: In function ‘bytearray_startswith’:
Objects/bytearrayobject.c:2429:1: error: the control flow of function 
‘bytearray_startswith’ does not match its profile data (counter 
‘time_profiler’) [-Werror=coverage-mismatch]
 }
 ^
cc1: some warnings being treated as errors

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-07 Thread xoviat

xoviat  added the comment:

Sorry, that should have read:

2. A folder two levels under site-packages that is named '.libs'

Please consult the auditwheel source to determine the specific pattern if there 
is doubt.

--

___
Python tracker 

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



[issue32516] Add a shared library mechanism for win32

2018-01-07 Thread xoviat

New submission from xoviat :

On linux and macOS, a mechanism exists to relocate shared libraries inside of a 
wheel. Auditwheel creates a .libs folder and places the shared libraries inside 
of it. The problem is that on Windows, the rpath mechanism doesn't exist. We've 
attempted to ameliorate the situation with NumPy by modifying the DLL search 
path ourselves. I think this should be done in Python itself.

Here is what I propose: for each folder in site packages that matches the 
foldername created by auditwheel, specifically:

1. A folder directly inside site-packages that ends with '.libs'
2. A folder two levels under site-packages that is named 'libs'

Python should add these folders to the DLL search path at some point before the 
matching extensions are imported, so that DLLs located in these paths can be 
imported by a call to LoadLibrary.

The reason that this should be done in Python is that packages shouldn't be 
modifying the DLL search path, but that's currently what's required.

The alternative, current, recommendation is to place shared libraries in the 
same folder as the extension, but this approach fails when the shared library 
needs to be shared between more than one extension in different subpackages, 
but in the same distribution package.

--
components: Extension Modules
messages: 309642
nosy: xoviat
priority: normal
severity: normal
status: open
title: Add a shared library mechanism for win32
type: enhancement
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



[issue23749] asyncio missing wrap_socket (starttls)

2018-01-07 Thread STINNER Victor

STINNER Victor  added the comment:

http://buildbot.python.org/all/#/builders/58/builds/435

Tests fail on x86 Windows7 3.x:

==
ERROR: test_start_tls_client_1 
(test.test_asyncio.test_sslproto.ProactorStartTLSTests)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_sslproto.py",
 line 225, in test_start_tls_client_1
asyncio.wait_for(client(srv.addr), loop=self.loop, timeout=10))
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\asyncio\base_events.py",
 line 440, in run_until_complete
return future.result()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\asyncio\tasks.py", 
line 398, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
==
ERROR: test_start_tls_client_1 
(test.test_asyncio.test_sslproto.SelectorStartTLSTests)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_asyncio\test_sslproto.py",
 line 225, in test_start_tls_client_1
asyncio.wait_for(client(srv.addr), loop=self.loop, timeout=10))
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\asyncio\base_events.py",
 line 440, in run_until_complete
return future.result()
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\asyncio\tasks.py", 
line 398, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

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

___
Python tracker 

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



[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-07 Thread R. David Murray

R. David Murray  added the comment:

I think Nick was the last one who touched the byte/string issues in urllib, so 
I've nosied him.  We'll see what he thinks (but this tracker accepts 
enhancement proposals as long as they are smallish ones).

--
nosy: +ncoghlan

___
Python tracker 

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



[issue32507] Change Windows install to applocal UCRT

2018-01-07 Thread Paul Moore

Paul Moore  added the comment:

Oh, so we're talking here about bundling the ucrt installers and then if the 
user doesn't already have ucrt installed system wide, we will install a local 
copy, but if they do, we don't do anything? If we install a local copy, then 
it'll be used until the user installs a system copy, at which point the local 
copy remains but gets ignored, correct? That seems OK, although I can see a 
local copy that's not used being confusing - but it's for very few users so no 
real issue.

I'm not sure what you're saying for venv/virtualenv though? Presumably they 
will need to copy the local copy if it's present, but that local copy will be 
ignored if there's a system copy?

--

___
Python tracker 

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



[issue32515] Add an option to trace to run module as a script

2018-01-07 Thread Mario Corchero

Change by Mario Corchero :


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

___
Python tracker 

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



[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Mario Corchero

Mario Corchero  added the comment:

Just finished a draft on the one for trace: issue32515

--

___
Python tracker 

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



[issue32515] Add an option to trace to run module as a script

2018-01-07 Thread Mario Corchero

New submission from Mario Corchero :

Add an option to trace to be able to do `python3 -m trace -t --module 
my.module.name` to be able to trace a runnable module the same way we can do 
with scripts.

As we want trace to not include the lines in runpy I am going to with the 
approach of pdb (issue32206) over the one on profiler(issue32512). As Nick 
raised before this hits a private API in runpy but it is within the stdlib. 
Alternatives are welcomed as well! :)

Additionally, '-m' is already in use, I have added --module.

Related issue for improved executable module support for standard library 
modules that run other scripts: https://bugs.python.org/issue9325

--
components: Library (Lib)
messages: 309638
nosy: mariocj89
priority: normal
severity: normal
status: open
title: Add an option to trace to run module as a script
type: enhancement
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



[issue32512] Add an option to profile to run library module as a script

2018-01-07 Thread Mario Corchero

Mario Corchero  added the comment:

Related issue for improved executable module support for standard library 
modules that run other scripts: https://bugs.python.org/issue9325

--

___
Python tracker 

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



[issue32514] 0x80070002 - The system cannot find the file specified

2018-01-07 Thread Tylor

New submission from Tylor :

When attempting to install Python 3.6.4, I get the error "0x80070002 - The 
system cannot find the file specified." I am able to install on a different 
Windows User, just not the current one I am using. The account has 
administrator privileges as well.

--
components: Windows
files: Python 3.6.4 (32-bit)_20180107153053[3191].log
messages: 309636
nosy: Beatty0111, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: 0x80070002 - The system cannot find the file specified
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file47370/Python 3.6.4 
(32-bit)_20180107153053[3191].log

___
Python tracker 

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



[issue32507] Change Windows install to applocal UCRT

2018-01-07 Thread Steve Dower

Steve Dower  added the comment:

Technically yes, though I think at this stage it will be very few machines that 
end up with our copy, and users can patch their own system using Windows Update 
even if we've installed a copy. Particularly for our user base, where I suspect 
most pre-Win10 Python users will have installed 3.5 or 3.6 previously and so 
have the proper update.

There should be very few first time Python users on older operating systems, 
and it will approach zero over time.

--

___
Python tracker 

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



[issue32506] dataclasses: no need for OrderedDict now that dict guarantees to keep insertion order

2018-01-07 Thread Eric V. Smith

Eric V. Smith  added the comment:


New changeset d13889214a4c81b78fa8683d35bdbd17ff22f4fe by Eric V. Smith in 
branch 'master':
bpo-32506: Change dataclasses from OrderedDict to plain dict. (gh-5131)
https://github.com/python/cpython/commit/d13889214a4c81b78fa8683d35bdbd17ff22f4fe


--

___
Python tracker 

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



[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-07 Thread stein-k

stein-k  added the comment:

The unquote function does take an encoding argument, but I am more worried 
about unquote_to_to_bytes which just assumes utf-8. (But this might be an 
implementation detail of its intended usage.)

I must agree that a polymorphic implementation would be better. Do you think 
this tracker is the correct place for such a change, or would an enhancement 
proposal be more suited?

--

___
Python tracker 

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



[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Mario Corchero

Mario Corchero  added the comment:

I've created an issue + PR for profile which basically ports the change in 
cProfile: issue32512

I am not able to add it as a dependency on this one (rights issue probably).

--

___
Python tracker 

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



[issue32512] Add an option to profile to run library module as a script

2018-01-07 Thread Eric N. Vander Weele

Change by Eric N. Vander Weele :


--
nosy: +ericvw

___
Python tracker 

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



[issue32509] doctest syntax ambiguity between continuation line and ellipsis

2018-01-07 Thread Tim Peters

Tim Peters  added the comment:

By the way, going back to your original problem, "the usual" solution to that 
different platforms can list directories in different orders is  simply to sort 
the listing yourself.  That's pretty easy in Python ;-)  Then your test can 
verify the hashes and names of _every_ file of interest - and would be clearer 
on the face of it than anything you could do to try to ignore every line save 
one.

--

___
Python tracker 

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



[issue32471] Add an UML class diagram to the collections.abc module documentation

2018-01-07 Thread Yahya Abou Imran

Change by Yahya Abou Imran :


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

___
Python tracker 

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



[issue32512] Add an option to profile to run library module as a script

2018-01-07 Thread Mario Corchero

Change by Mario Corchero :


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

___
Python tracker 

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



[issue32509] doctest syntax ambiguity between continuation line and ellipsis

2018-01-07 Thread Tim Peters

Tim Peters  added the comment:

Jason, an ellipsis will match an empty string.  But if your expected output is:

"""
x...
abcd
...
"""

you're asking for output that:

- starts with "x"
- followed by 0 or more of anything
- FOLLOWED BY A NEWLINE (I think you're overlooking this part)
- followed by "abcd" and a newline
- followed by 0 or more of anything
- followed by (and ending) with a newline

So, e.g., "xabcd\n" doesn't match - not because of the ellipsis, but because of 
the newline following the first ellipsis.  You can repair that by changing the 
expected output like so:

"""
x...abcd
...
"""

This still requires that "abcd" is _followed_ by a newline, but puts no 
constraints on what appears before it.

In your specific context, it seems you want to say that your expected line has 
to appear _as_ its own line in your output, so that it must appear either at 
the start of the output _or_ immediately following a newline.

Neither ellipses nor a simple string search is sufficient to capture that 
notion.  Fancier code can do it, or a regexp search, or, e.g.,

what_i_want_without_the_trailing_newline in output.splitlines()

--

___
Python tracker 

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



[issue10496] Python startup should not require passwd entry

2018-01-07 Thread Filippo Giunchedi

Change by Filippo Giunchedi :


--
nosy: +filippo

___
Python tracker 

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



[issue32471] Add an UML class diagram to the collections.abc module documentation

2018-01-07 Thread Yahya Abou Imran

Yahya Abou Imran  added the comment:

I have generated SVG files.

Here is the rest of the ABCs present in the module:

https://gitlab.com/yahya-abou-imran/collections-abc-uml/blob/master/plantuml/other_collections.svg

And here is the full version with all ABCs:

https://gitlab.com/yahya-abou-imran/collections-abc-uml/blob/master/plantuml/full.svg

What do you prefer?

I'm gonna submit a PR with the full version right now. I will correct it if you 
think it's too big.

But I don't know how to run the server of the documentation locally, so I can't 
test it to see...

--

___
Python tracker 

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



[issue32513] dataclasses: make it easier to use user-supplied special methods

2018-01-07 Thread Eric V. Smith

New submission from Eric V. Smith :

Modify dataclasses to make it easier to specify special methods.

For example: currently, if you want to override __repr__, you need to specify 
@dataclass(repr=False), and also provide your own __repr__. Also, it's current 
an error to not specify repr=False and to also provide your own __repr__.  
@dataclass should be able to determine that if you provide __repr__, you don't 
want it to provide it's own __repr__.

The methods that @dataclass will provide for you are:
__init__
__repr__
__eq__
__ne__
__lt__
__le__
__gt__
__ge__
_hash__
and if using frozen=True, also:
__setattr__
__delattr__

Per the discussion that started at 
https://mail.python.org/pipermail/python-dev/2017-December/151487.html, the 
change will be to override these methods only if:
1. the method would have been generated based on @dataclass params, and
2. the method is not present in the class's __dict__.

The first item is to allow the user to continue to suppress method generation, 
and the second item is so that base-class methods are not considered in the 
decision.

I'm still thinking through how __eq__ and __ne__ should be handled (as well as 
the ordering comparisons, too). I'll raise an issue on python-dev and point it 
here.

--
assignee: eric.smith
messages: 309628
nosy: eric.smith
priority: normal
severity: normal
status: open
title: dataclasses: make it easier to use user-supplied special methods
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



[issue32512] Add an option to profile to run library module as a script

2018-01-07 Thread Mario Corchero

New submission from Mario Corchero :

Add an option to profile to be able to do `python3 -m profile -m 
my.module.name` to be able to profile the module the same way cProfile allows 
since issue 21862

--
components: Library (Lib)
messages: 309627
nosy: mariocj89
priority: normal
severity: normal
status: open
title: Add an option to profile to run library module as a script
type: enhancement
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



[issue31802] 'import posixpath' fails if 'os.path' has not be imported already.

2018-01-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 94a3facc0e5ce02ef34d9fa595703cd96cb95984 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-31802: Fix importing native path module before importing os. (GH-4017) 
(#5129)
https://github.com/python/cpython/commit/94a3facc0e5ce02ef34d9fa595703cd96cb95984


--

___
Python tracker 

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



[issue32506] dataclasses: no need for OrderedDict now that dict guarantees to keep insertion order

2018-01-07 Thread Eric V. Smith

Change by Eric V. Smith :


--
pull_requests: +4992

___
Python tracker 

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



[issue32506] dataclasses: no need for OrderedDict now that dict guarantees to keep insertion order

2018-01-07 Thread Eric V. Smith

Change by Eric V. Smith :


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

___
Python tracker 

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



[issue32498] urllib.parse.unquote raises incorrect errormessage when string parameter is bytes

2018-01-07 Thread R. David Murray

R. David Murray  added the comment:

We generally don't do type checking (see discussions of "duck typing"). We 
generally do just let the implementation detail bubble up.  I don't think the 
encoding suggestion works, since we can't know what encoding the byte string is 
in, or even if it is a valid one.

I wonder if unquote should be polymorphic: accept both bytes and strings and 
produce the same type of output as its input.  I think there are other urllib 
methods that are, but I haven't checked.

--

___
Python tracker 

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



[issue31802] 'import posixpath' fails if 'os.path' has not be imported already.

2018-01-07 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4990

___
Python tracker 

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



[issue31802] 'import posixpath' fails if 'os.path' has not be imported already.

2018-01-07 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 3460198f6ba40a839f105c381f07179aba1e8c61 by Serhiy Storchaka in 
branch 'master':
bpo-31802: Fix importing native path module before importing os. (#4017)
https://github.com/python/cpython/commit/3460198f6ba40a839f105c381f07179aba1e8c61


--

___
Python tracker 

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



[issue32511] Thread primitives do not report the OS-level error on failure

2018-01-07 Thread Zack Weinberg

New submission from Zack Weinberg :

[_]thread.start_new_thread can fail if the underlying OS primitive fails 
(pthread_create / _beginthreadex), but the exception that is thrown when this 
happens is a generic RuntimeError (it's _called_ ThreadError in the source 
code, but it doesn't have its own subtype, so you can't even catch it 
specifically) and the OS-level error code is lost.  It should instead throw (an 
appropriate subclass of) OSError and capture the error code, like when other OS 
primitives fail.

Reading through the code, it looks like _all_ of the threading code has this 
problem - throughout [_]threadmodule.c, thread.c, and thread_pthread.h, I see 
error codes being dropped on the floor or at best reported with perror or 
dprintf, not properly captured in an OSError.

This affects all maintained versions of Python, but sadly I expect it's messy 
enough to fix that it's only practical to do so on trunk.

--
components: Library (Lib)
messages: 309623
nosy: zwol
priority: normal
severity: normal
status: open
title: Thread primitives do not report the OS-level error on failure
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue28414] SSL match_hostname fails for internationalized domain names

2018-01-07 Thread Christian Heimes

Change by Christian Heimes :


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

___
Python tracker 

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



[issue32509] doctest syntax ambiguity between continuation line and ellipsis

2018-01-07 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

Thank you Steven for creating a reproduction of the issue; I should have done 
that in the first place. I have the +ELLIPSIS enabled elsewhere in the test 
suite, which is why it didn't appear in my example.

I should clarify - what I thought was a suitable workaround turns out is not, 
in part because the ellipsis must match _something_ and cannot be a degenerate 
match, leading to [this 
failure](https://travis-ci.org/jaraco/jaraco.financial/jobs/325955523). So the 
workaround I thought I'd devised was only suitable in some environments (where 
some content did appear before the target content).

I conclude that trying to match only a single line from a 
non-deterministically-ordered list of lines isn't a function for which ellipsis 
is well suited. I'll be adapting the test to simply test for the presence of 
the expected substring. Therefore, the use-case I presented is invalid (at 
least while ellipsis must match at least one character).

Still, I suspect I haven't been the only person to encounter the reported 
ambiguity, and I appreciate the progress toward addressing it. I like Steven's 
approach, as it's simple and directly addresses the ambiguity. It does have the 
one downside that for the purposes of the documentation, it's a little less 
elegant, as a literal "" appears in the docstring.

Perhaps instead of "ELLIPSIS", the indicator should be "ANYTHING" or similar, 
acting more as a first-class feature rather than a stand-in for an ellipsis. 
That would save the human reader the distraction and trouble of translating 
"" to "..." before interpreting the value (even if that's what the 
doctest interpreter does under the hood).

Alternatively, consider "<...>" as the syntax. I'm liking that because it 
almost looks like it's intention, avoiding much of the distraction. As I think 
about it more, I'm pretty sure such and approach is not viable, as it's a new 
syntax (non-alpha in the directive) and highly likely to conflict with existing 
doctests in the wild.

Another way to think about this problem is that the literal "..." is only 
non-viable when it's the first content in the expected output. Perhaps all 
that's needed is a signal that the output is starting, with something like 
"" or "" or "" or "" or "", a token like 
"" except it's an empty match specifically designed to make the 
transition. Such a token would specifically address the issue at the border of 
the test and the output and would _also_ address the issue if the expected 
output begins with a _literal_ "...". Consider this case:

# --- cut %< ---
import doctest

def print_3_dot():
"""
>>> print_3_dot()
...
"""
print('...')

doctest.run_docstring_examples(print_3_dot, globals())
# --- cut %< ---

In that case, "" may also work, but only because a literal 
substitution is being made. One _might_ be surprised when "" does't 
match anything (when +ELLIPSIS is not enabled).

Overall, I'm now thinking the "" solution is suitable and clear 
enough.

--

___
Python tracker 

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



[issue32510] Broken comparisons (probably caused by wrong caching of values)

2018-01-07 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

Oh, by the way... are you aware that the Recursor class defines a class 
attribute `branches` which is shared by all instances? You create multiple 
recursor objects, but they all share the same `branches` attribute. That might 
be intentional, but if not, that might explain the unexpected behaviour you are 
seeing.

--

___
Python tracker 

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



[issue32510] Broken comparisons (probably caused by wrong caching of values)

2018-01-07 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

That is nearly two hundred lines of quite complex code. What results are you 
expecting and what results are you getting?

I've just tried running it under Python 3.3 and 3.5 on a RedHat-based Linux, 
and after generating a large amount of output (271315 lines, including 
"IMPOSSIBLE CONDITION OCCURED!" 552 times) it raised KeyError.

I then tried again on an Ubuntu-based Linux, and got the same result.

Can you demonstrate the same problem with a smaller, simpler example? What 
reasons do you have for believing that this is caused by "wrong caching of 
values"? What values do you think are being cached, and where?

You say:

"Comparisons fail, although they logically need to succeed."

Which comparisons? Can you isolate those failing comparisons without all the 
extraneous code?

"Integers magically increase without ever being written to in the code after 
initially assigned in the constructor."

Which integers? What evidence do you have that they are changing?

Bottom line is, while it is conceivable that you've found an interpreter bug 
that exists in at least three versions of Python, going back many years, that 
nobody has noticed before, I think it is far more likely that the bug is in 
your code. I'm going to close this ticket for now, but if you have answers for 
my questions and good evidence of an interpreter bug (preferably with a short 
and simple demonstration, see http://sscce.org/) please feel free to re-open it.

Thank you.

--
nosy: +steven.daprano
resolution:  -> rejected
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



[issue32510] Broken comparisons (probably caused by wrong caching of values)

2018-01-07 Thread Thermi

New submission from Thermi :

With Python 3.6.4 on Arch Linux, on three different hosts (one Skylake CPU, one 
i7-3820, one Xeon E5-2680, all running Arch Linux with the same Python 
version), the Python 3 interpreter behaves erratically in a script of mine.

The following symptoms occur:
1) Comparisons fail, although they logically need to succeed. The comparisons 
work a lot of the times, but sometimes, they don't.
2) Integers magically increase without ever being written to in the code after 
initially assigned in the constructor.

The behaviour changes if code is rearranged, variables and lines are added that 
do not pertain the broken comparisons, making accidental writes to memory or 
reads from unitialized memory likely.

The breakage occurs in the code between line 114 and the execution of the code 
in the recurse() method of the class Branch.

The script is here 
(https://gist.github.com/Thermi/05bc671436841670ac81b3b86217dd62). It basically 
only does some arithmetic with translation tables.

--
components: Interpreter Core
messages: 309619
nosy: Thermi
priority: normal
severity: normal
status: open
title: Broken comparisons (probably caused by wrong caching of values)
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



[issue31975] Add a default filter for DeprecationWarning in __main__

2018-01-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

I think https://github.com/python/cpython/pull/4458 is ready to go now, but I 
expect it would benefit from a review before I merge it. If anyone has the time 
to take a look, it would be much appreciated :)

However, I'd also like to get it in for 3.7.0a4 this week, so I'll merge it 
tomorrow regardless - if we decide we need to tweak it before the first beta, 
we can do that.

--

___
Python tracker 

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



[issue9325] Add an option to pdb/trace/profile to run library module as a script

2018-01-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

+1 for creating separate issues and linking them from this one - while the risk 
of breaking anything seems low, if we do cause a regression, multiple issues 
and PRs provide better traceability than one giant issue for everything.

(I'm also not aware of anyone else actively working on this since Sanyam's 
cProfile PR, so go ahead and create issues and PRs for any which you're 
interested in working on)

As far as `dis` specifically goes, while the function name in `dis` is 
"_test()" and it doesn't provide a meaningful help message, it's a genuinely 
useful CLI operation: it disassembles whatever file you provide, or `stdin` if 
you don't provide one:

$ echo "print('Hello')" | python3 -m dis 
  1   0 LOAD_NAME0 (print)
  2 LOAD_CONST   0 ('Hello')
  4 CALL_FUNCTION1
  6 POP_TOP
  8 LOAD_CONST   1 (None)
 10 RETURN_VALUE

So a `-m` option does make sense in `dis`, but it should probably be 
accompanied by some other changes as well (like a better name for the private 
function, and `--help` support).

--

___
Python tracker 

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



[issue30579] Allow traceback objects to be instantiated/mutated/annotated

2018-01-07 Thread Nick Coghlan

Nick Coghlan  added the comment:

Thanks for the patch!

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



[issue30579] Allow traceback objects to be instantiated/mutated/annotated

2018-01-07 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset e46a8af450210ee5c7f0459ad6beddbc626ae60f by Nick Coghlan 
(Nathaniel J. Smith) in branch 'master':
bpo-30579: Allow TracebackType creation and tb_next mutation from Python 
(GH-4793)
https://github.com/python/cpython/commit/e46a8af450210ee5c7f0459ad6beddbc626ae60f


--

___
Python tracker 

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



[issue32507] Change Windows install to applocal UCRT

2018-01-07 Thread Paul Moore

Paul Moore  added the comment:

Does this mean that we'll need to update the bundled ucrt whenever there are 
security patches to the baseline version? Are we happy with the security 
implications of that?

I thought one of the key advantages of using the system CRT (whether the old 
msvcrXX.dll or the new ucrt) was that we automatically received security 
patches.

--

___
Python tracker 

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



[issue32430] Simplify Modules/Setup{,.dist,.local}

2018-01-07 Thread Julien Palard

Julien Palard  added the comment:

I also think PR 5062 complicate the thing I'm trying to simplify, it's the 
wrong direction.

I also don't understand why having a single versioned `Setup` file is not 
enough, can someone give a clear explanation on this point?

--

___
Python tracker 

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



[issue32503] Avoid creating small frames in pickle protocol 4

2018-01-07 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I don't think the overall gain is meaningful.  I'd rather not add too many 
special cases in the framing code.

--

___
Python tracker 

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



[issue32509] doctest syntax ambiguity between continuation line and ellipsis

2018-01-07 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

Tim Peters said:
> Right, "..." immediately after a ">>>" line is taken to indicate a code 
> continuation line, and there's no way to stop that short of rewriting the 
> parser.


I haven't gone through the source in detail, but it seems to me that we could 
change OutputChecker.check_output to support this without touching the parser.

Ignoring issues of backwards compatibility for the moment, suppose we accept 
either '...' or '' as the wild card in the output section. Jason's 
example would then become:

>>> print(res)  # docstring: +ELLIPSIS

d41d8cd98f00b204e9800998ecf8427e __init__.py
...

check_output could replace the substring '' with three dots before 
doing anything else, and Bob's yer uncle.

Or in this case, Uncle Timmy's yer uncle :-)

There's probably a million details I haven't thought of, but it seems like a 
promising approach to me. I did a quick hack of doctest, adding

want = want.replace('', '...')

to the start of OutputChecker.check_output and it seems to work.

If this is acceptable, we'll probably need a directive to activate it, for the 
sake of backwards compatibility.

Thoughts?

--

___
Python tracker 

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