[issue24538] os.setxattr PermissionError on panfs propagates up causing `copystat`, `copytree`, and `pip install .` to fail unhepfully

2019-05-13 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:


New changeset 0a5b88e7f23b671d63896619b13148b0e4e2b5dd by Giampaolo Rodola 
(Miss Islington (bot)) in branch '3.7':
bpo-24538: Fix bug in shutil involving the copying of xattrs to read-only 
files. (PR-13212) (#13234)
https://github.com/python/cpython/commit/0a5b88e7f23b671d63896619b13148b0e4e2b5dd


--

___
Python tracker 

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



[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2019-05-13 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

I submitted a pull request that fixes both the PythonLauncher build issue and 
the _scproxy module build issue. They are related because _scproxy is required 
to install PythonLauncher.

--

___
Python tracker 

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



[issue26317] Build Problem with GCC + Macintosh OS X 10.11 El Capitain

2019-05-13 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
keywords: +patch
pull_requests: +13216
stage: needs patch -> patch review

___
Python tracker 

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



[issue32587] Make REG_MULTI_SZ support zero-length strings

2019-05-13 Thread Zackery Spytz


Zackery Spytz  added the comment:

Thank you for the comments. I've updated the PR.

> winreg.SetValueEx can create the value. We just need to add a case to 
> test_case in Lib/test/test_winreg.py, such as the following:

test_case? I think you mean test_data?

--

___
Python tracker 

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



[issue24048] remove_module() needs to save/restore exception state

2019-05-13 Thread Zackery Spytz


Zackery Spytz  added the comment:

I think this change should be backported.

--

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-13 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Oh good, I thought this had come up before.  Your method idea that could be 
optimized on literals makes a lot of sense, and is notably more readable than 
yet another letter prefix.

--

___
Python tracker 

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



[issue24048] remove_module() needs to save/restore exception state

2019-05-13 Thread Brett Cannon


Brett Cannon  added the comment:

Can this be closed, Nick?

--

___
Python tracker 

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



[issue10991] trace fails when test imported a temporary file

2019-05-13 Thread Brett Cannon


Brett Cannon  added the comment:

Since I'm not bothered enough to check if this is still an issue I'm fine with 
closing this.

--
resolution:  -> out of date
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



[issue36751] Changes in the inspect module for PEP 570

2019-05-13 Thread Brett Cannon


Brett Cannon  added the comment:

RE: "if a function continues to work correctly throughout the span of a Python 
X version, why does it need to be removed?"

In this case the argument is whether inspect.getfullargspec() works correctly 
in the face of positional-only parameters. There's also the usual maintenance 
burden like any other open source project has.

I know for me the thing is that getfullargspec() keeps getting patched up to 
support any changes we make to function signatures that aren't the smoothest or 
more accurate way to represent new semantics and so it hasn't been 
maintenance-free. And in the face of inspect.Signature which feels like a 
cleaner solution that is easier to improve upon as function signatures change 
it makes folks not want to keep putting work into the older functions.

I personally think we should at least document the deprecation of the functions 
to strongly encourage people to not use it in new code. I don't find the "Note 
that signature() and Signature Object provide the recommended API for callable 
introspection" message "loud" enough to get the message across.

--

___
Python tracker 

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



[issue36594] Undefined behavior due to incorrect usage of %p in format strings

2019-05-13 Thread Brett Cannon


Change by Brett Cannon :


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



[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

> I thought I was missing something.

Some sleep, probably.

--

___
Python tracker 

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



[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Guido van Rossum


Guido van Rossum  added the comment:

Aha! I thought I was missing something. :-)

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



[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Matthias Bussonnier


Matthias Bussonnier  added the comment:

Aren't > and < the characters to right/left-align ?

>>> foo = 'abc'
>>> f"{foo:>10}"
'   abc'
>>> format(foo, '>10')
'   abc'

--
nosy: +mbussonn

___
Python tracker 

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



[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 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



[issue36912] Can't left-align strings using f-strings or format()

2019-05-13 Thread Guido van Rossum


New submission from Guido van Rossum :

I sometimes like to use format specs like "%-10s" % foo, which left-aligns the 
string foo in a field of 10 spaces:

>>> '%10s' % foo
'   abc'
>>> foo = 'abc'
>>> '%-10s' % foo
'abc   '

This is documented in "Format Specification Mini-Language":
https://docs.python.org/3/library/string.html#format-specification-mini-language

However it does not work with format() and f-strings:

>>> format(foo, '10s')
'abc   '
>>> format(foo, '-10s')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Sign not allowed in string format specifier
>>> f'{foo:10}'
'abc   '
>>> f'{foo:-10}'
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Sign not allowed in string format specifier

In each case, without a sign it works, and right-aligns.

What am I missing?

--
messages: 342421
nosy: gvanrossum
priority: normal
severity: normal
status: open
title: Can't left-align strings using f-strings or format()
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n")

2019-05-13 Thread Matthias Bussonnier

Matthias Bussonnier  added the comment:

I believe this one is even before the ast, in the tokenizer. Though the AST is 
also doing some normalisation in identifiers (“ε” U+03B5 Greek Small Letter 
Epsilon Unicode Character , and “ϵ” U+03F5 Greek Lunate Epsilon Symbol Unicode 
Character get normalized to the same for example, which is problematic as the 
look different, but end up being same identifier).

I'd be interested in an opt-in flag to not do this normalisation (I have a 
prototype with this for the identifier normalisation in ast, but I have not 
looked at the tokenizer), which might be useful for some linting tools.

--
nosy: +mbussonn

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-13 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

+1

There's a long thread on something similar here:

https://mail.python.org/pipermail/python-ideas/2018-March/049564.html

Carrying over into the following month:

https://mail.python.org/pipermail/python-ideas/2018-April/049582.html

Here's an even older thread:

https://mail.python.org/pipermail/python-ideas/2010-November/008589.html


In the more recent thread, I suggested that we give strings a dedent method. 
When called on a literal, the keyhole optimizer may do the dedent at compile 
time. Whether it does or not is a "quality of implementation" factor.

The idea is to avoid the combinational explosion of yet another string prefix:

urd'...'  # unicode raw string dedent

while still making string dedents easily discoverable, and with a sufficiently 
good interpreter, string literals will be dedented at compile time avoiding any 
runtime cost:

https://mail.python.org/pipermail/python-ideas/2018-March/049578.html

--
nosy: +steven.daprano

___
Python tracker 

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



[issue36909] LastUpdatedOrderedDict recipe uses super() unnecessarily

2019-05-13 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue23378] argparse.add_argument action parameter should allow value extend

2019-05-13 Thread Batuhan


Change by Batuhan :


--
keywords: +patch
pull_requests: +13215
stage: needs patch -> patch review

___
Python tracker 

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



[issue36887] Add integer square root, math.isqrt

2019-05-13 Thread Tim Peters


Tim Peters  added the comment:

+1 from me!  I'm tired of re-inventing this too :-)

Agree with every point Mark made.

Just in passing, noting a triviality:  for the ceiling, `1 + isqrt(n - 1)` 
fails when `n` is zero.

But I've never had a use for the ceiling here, or for "nearest" - just the 
floor.  Also for `iroot(n, k)` for k'th root floors with k > 2, but that too 
can wait.

--
nosy: +tim.peters

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-13 Thread Matthias Bussonnier


Change by Matthias Bussonnier :


--
nosy: +mbussonn

___
Python tracker 

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



[issue34424] Unicode names break email header

2019-05-13 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue36911] ast.parse outputs ast.Strs which do not differentiate between the ASCII codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n")

2019-05-13 Thread Amber Brown


New submission from Amber Brown :

reproducing case:

file.py:

```
"""
Hello \n blah.
"""
```

And then in a REPL (2.7 or 3+):

```
>>> import ast
>>> f = ast.parse(open("test.py", 'rb').read())
>>> f
<_ast.Module object at 0x7f609d0a4d68>
>>> f.body[0]
<_ast.Expr object at 0x7f609d0a4e10>
>>> f.body[0].value
<_ast.Str object at 0x7f609d02b780>
>>> f.body[0].value.s
'\nHello \n blah.\n'
>>> repr(f.body[0].value.s)
"'\\nHello \\n blah.\\n'"
```

Expected behaviour:
```
>>> repr(f.body[0].value.s)
"'\\nHello n blah.\\n'"
```

--
components: Library (Lib)
messages: 342417
nosy: hawkowl
priority: normal
severity: normal
status: open
title: ast.parse outputs ast.Strs which do not differentiate between the ASCII 
codepoint 12 (literal new line) and the ASCII codepoints 134 and 156 ("\n")
versions: Python 2.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



[issue34424] Unicode names break email header

2019-05-13 Thread miss-islington


miss-islington  added the comment:


New changeset c0abd0c8e9b62bc008fc74cfbfbbab36ef7d7617 by Miss Islington (bot) 
in branch '3.7':
bpo-34424: Handle different policy.linesep lengths correctly. (GH-8803)
https://github.com/python/cpython/commit/c0abd0c8e9b62bc008fc74cfbfbbab36ef7d7617


--
nosy: +miss-islington

___
Python tracker 

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



[issue34424] Unicode names break email header

2019-05-13 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

David,

Thank you for the review and merging into master!  I'd be glad to backport 
this.  I believe the only backport would be to 3.7 (master is currently 3.8), 
but please let me know if it would need to go into a security branch.

--

___
Python tracker 

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



[issue36910] Certain Malformed email causes email.parser to throw AttributeError

2019-05-13 Thread Mark Sapiro


New submission from Mark Sapiro :

The code in the attached parse_bug.py file when run with Python 3.5, 3.6 or 3.7 
throws AttributeError with this traceback:

```
Traceback (most recent call last):
  File "parse_bug.py", line 9, in 
""")
  File "/usr/local/lib/python3.7/email/parser.py", line 124, in parsebytes
return self.parser.parsestr(text, headersonly)
  File "/usr/local/lib/python3.7/email/parser.py", line 68, in parsestr
return self.parse(StringIO(text), headersonly=headersonly)
  File "/usr/local/lib/python3.7/email/parser.py", line 58, in parse
return feedparser.close()
  File "/usr/local/lib/python3.7/email/feedparser.py", line 187, in close
self._call_parse()
  File "/usr/local/lib/python3.7/email/feedparser.py", line 180, in _call_parse
self._parse()
  File "/usr/local/lib/python3.7/email/feedparser.py", line 323, in _parsegen
if (self._cur.get('content-transfer-encoding', '8bit').lower()
AttributeError: 'Header' object has no attribute 'lower'
```

The triggering condition appears to be the Content-Transfer-Encoding: header 
with a non-ascii character in the headers of a multipart part.

The parser should probably throw email.errors.HeaderParseError with a 
MalformedHeaderDefect in this case rather than AttributeError.

While arguably code should defend against unanticipated exceptions, the fact 
that such an exception can be thrown while parsing an arbitrary message could 
be considered a security issue.

--
components: email
files: parse_bug.py
messages: 342415
nosy: barry, msapiro, r.david.murray
priority: normal
severity: normal
status: open
title: Certain Malformed email causes email.parser to throw AttributeError
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: https://bugs.python.org/file48330/parse_bug.py

___
Python tracker 

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



[issue36719] regrtest --findleaks should fail if an uncollectable object is found

2019-05-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13214

___
Python tracker 

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



[issue36719] regrtest --findleaks should fail if an uncollectable object is found

2019-05-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c923c3449f825021b13521b2380e67ba35a36f55 by Victor Stinner in 
branch 'master':
bpo-36719: Fix regrtest MultiprocessThread (GH-13301)
https://github.com/python/cpython/commit/c923c3449f825021b13521b2380e67ba35a36f55


--

___
Python tracker 

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



[issue36829] CLI option to make PyErr_WriteUnraisable abort the current process

2019-05-13 Thread STINNER Victor


STINNER Victor  added the comment:

Another example of hook: hook_file.patch logs unraisable exception into 
~/unraisable.txt. Patch written for my latest PR 13187 (with the new 'msg' 
parameter).

Example of output when running the Python test suite (using multiple processes! 
./python -m test -j0 -r):
--

Exception ignored in: .C.__del__ at 
0x7f0d5c71eb00>
ZeroDivisionError: division by zero
Traceback (most recent call last):
  ...
  File "/home/vstinner/prog/python/master/Lib/test/test_raise.py", line 463, in 
test_3611
f()
  File "/home/vstinner/prog/python/master/Lib/test/test_raise.py", line 456, in 
f
del x

Exception ignored in: 
RuntimeError: generator ignored GeneratorExit
Traceback (most recent call last):
  ...
  File "/home/vstinner/prog/python/master/Lib/test/test_generators.py", line 
2207, in test_main
support.run_doctest(test_generators, verbose)
  ...
  File "", line 1, in 

del g

Exception ignored in: 
ValueError: I/O operation on closed file.
Traceback (most recent call last):
  ...
  File "/home/vstinner/prog/python/master/Lib/test/test_urllib.py", line 421, 
in test_invalid_redirect
urlopen("http://python.org/;)
  File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 237, in 
__exit__
traceback.clear_frames(tb)
  File "/home/vstinner/prog/python/master/Lib/traceback.py", line 220, in 
clear_frames
tb.tb_frame.clear()
--

IMHO such hook is more convenient than killing the process with SIGABRT ;-)

--
Added file: https://bugs.python.org/file48329/hook_file.patch

___
Python tracker 

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



[issue34424] Unicode names break email header

2019-05-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13213

___
Python tracker 

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



[issue33725] Python crashes on macOS after fork with no exec

2019-05-13 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On May 10, 2019, at 04:07, Josh Rosenberg  wrote:
> 
> I've seen far too many cases where Python code targeting Linux intentionally 
> uses the COW benefits of fork for multiprocessing to think it would be a good 
> idea to change the default start method there without *some* sort of 
> deprecation period.

We need to resolve this for 3.8, and given that I think we have clear consensus 
to change the default on macOS to spawn to avoid the crashes, let’s do that.  
We’ll need to update the documentation.

Then if we don’t have consensus to change the default on Linux, let’s issue a 
DeprecationWarning for the default ‘fork’ method in 3.8 and change it to 
‘spawn' in 3.9.

Do we want to issue a warning on set_start_method(‘fork’) on macOS, given that 
it’s unlikely to be safe?

--

___
Python tracker 

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



[issue36719] regrtest --findleaks should fail if an uncollectable object is found

2019-05-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13212

___
Python tracker 

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



[issue36897] shlex doesn't differentiate escaped characters in output

2019-05-13 Thread Matthew Gamble


Matthew Gamble  added the comment:

My apologies, I didn't realise you were talking about the invalid escape 
sequence. Thanks for letting me know about the fact that it's deprecated, I'll 
definitely be keeping that in mind going forward.

In a bash shell with the find command available, run the following command:

find . -type f -exec ls {} \;

You should see a list of files.

If you run this:

find . -type f -exec ls {} ;

You should see an error message from find:

"find: missing argument to `-exec'"

If I pass the first example in this message to shlex, I get no indication that 
the user attempted escaped the semi-colon in their input.

--

___
Python tracker 

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



[issue34424] Unicode names break email header

2019-05-13 Thread R. David Murray


R. David Murray  added the comment:

Approved and merged.  Cheryl, can you shepherd this through the backport 
process, please? I'm contributing infrequently enough that I'm not even sure 
which version we are on :)

--

___
Python tracker 

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



[issue34424] Unicode names break email header

2019-05-13 Thread R. David Murray


R. David Murray  added the comment:


New changeset 45b2f8893c1b7ab3b3981a966f82e42beea82106 by R. David Murray (Jens 
Troeger) in branch 'master':
bpo-34424: Handle different policy.linesep lengths correctly. (#8803)
https://github.com/python/cpython/commit/45b2f8893c1b7ab3b3981a966f82e42beea82106


--

___
Python tracker 

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



[issue9267] Update pickle opcode documentation in pickletools for 3.x

2019-05-13 Thread Windson Yang


Windson Yang  added the comment:

Where are the documents actually?

--
nosy: +Windson Yang

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I agree that this is a recurring need and would be nice to have.

--
nosy: +rhettinger

___
Python tracker 

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



[issue36897] shlex doesn't differentiate escaped characters in output

2019-05-13 Thread Eric V. Smith


Eric V. Smith  added the comment:

Run 3.7 with -Wd:

$ python3 -Wd
Python 3.7.3 (default, Mar 29 2019, 13:03:53)
[GCC 7.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 'a \; b'
:1: DeprecationWarning: invalid escape sequence \;
'a \\; b'
>>>

The deprecation is in relation to invalid escape sequences, not shlex.

My point is just that you should use r'a \; b' or 'a \\;b', and not rely on 
invalid escape sequences. For one reason, I can never remember how they're 
interpreted, and had to look it up. r-strings don't have anything to do with 
regular expressions per-se, they're a way of changing how python interprets 
stings, no matter what they're used for.

> The point is that it's not possible to use the output of shlex.shlex to try 
> to match the behaviour of a POSIX-compliant shell by reliably splitting up a 
> user's input into multiple commands. In the first case I presented (no escape 
> character), the user entered two commands. In the second case, the user 
> entered a single command with two arguments. However, there's no way to 
> differentiate the two situations based on the output of shlex.

My question is: can a posix-compliant shell tell the difference? I don't know, 
it's an honest question. Can you show some shell code where it can tell the 
difference?

--

___
Python tracker 

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



[issue30535] Explicitly note that meta_path is not empty

2019-05-13 Thread Windson Yang


Windson Yang  added the comment:

I created a PR for it. TBO, meta_path is not a good name since it doesn't 
contain any *path* at all.

--
nosy: +Windson Yang

___
Python tracker 

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



[issue30535] Explicitly note that meta_path is not empty

2019-05-13 Thread Windson Yang


Change by Windson Yang :


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

___
Python tracker 

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



[issue36908] "This module is always available" is confusing

2019-05-13 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

> More useful would be to annotate those modules that might not be importable, 
> with a reason why.

yes, that is more reasonable. :-D

--

___
Python tracker 

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



[issue36908] "This module is always available" is confusing

2019-05-13 Thread Emmanuel Arias


Emmanuel Arias  added the comment:

I agree. What about create a section (or subsection?) or  note with 
the text:


```
The next modules: sys, math ...  are always available. This
mean that ...
```

?

--
nosy: +eamanu

___
Python tracker 

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



[issue36908] "This module is always available" is confusing

2019-05-13 Thread Ned Batchelder


Ned Batchelder  added the comment:

There are hundreds of modules that are always importable.  The majority of the 
standard library is always importable.  More useful would be to annotate those 
modules that might not be importable, with a reason why.

--

___
Python tracker 

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



[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Guido van Rossum


Guido van Rossum  added the comment:

Thanks all!

--

___
Python tracker 

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



[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

> Do you mean from CircuitPython?

No, I was asking about regular Python on Windows.  I was not clear to me 
whether any of the software that Nina ran (other than possibly Adafruit USB 
drivers) was from Adafruit.  I am now guessing that is was all 3rd party stuff 
and that IDLE will now be an alternative for part of what she used.

I was in part wondering whether there were other simple (and allowable) changes 
to IDLE that might make it more useful for this type of application, but I will 
leave that sit for now.

I answered at least some of my questions about USB and the Adafruit hardware 
and the rest of what you wrote with my search bar.

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



[issue36897] shlex doesn't differentiate escaped characters in output

2019-05-13 Thread Matthew Gamble


Matthew Gamble  added the comment:

The point is that it's not possible to use the output of shlex.shlex to try to 
match the behaviour of a POSIX-compliant shell by reliably splitting up a 
user's input into multiple commands. In the first case I presented (no escape 
character), the user entered two commands. In the second case, the user entered 
a single command with two arguments. However, there's no way to differentiate 
the two situations based on the output of shlex.

It's also worth noting that the output is the same with this too:

list(shlex.shlex('a \\; b', posix=True, punctuation_chars=True))

I tested this code on python 3.6.7 and 3.7.2, and didn't see any deprecation 
warnings at all. I also checked the history of shlex.py:

https://github.com/python/cpython/commits/master/Lib/shlex.py

The last commit was from 2017, and I don't see any usages of DeprecationWarning 
inside that file. I'm also not sure how r-strings are relevant, as I don't see 
any regular expressions used inside of the shlex class.

--

___
Python tracker 

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



[issue36900] Use _PyCoreConfig rather than global configuration variables

2019-05-13 Thread STINNER Victor


STINNER Victor  added the comment:

With PR 13299, most global variable configurables are not directly accessed, 
outside code to initialize _PyPreConfig and _PyCoreConfig.

parser.c: Py_DebugFlag
fileutils.c: Py_UTF8Mode, Py_LegacyWindowsFSEncodingFlag
frozenmain.c: Py_VerboseFlag
Py_FdIsInteractive(): Py_InteractiveFlag
PySys_SetArgv(): Py_IsolatedFlag()
Py_GETENV(): Py_IsolatedFlag

The problem is that these files, functions and macros may be used before Python 
is initialized: before Python has an interpreter.

--

___
Python tracker 

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



[issue36900] Use _PyCoreConfig rather than global configuration variables

2019-05-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13210

___
Python tracker 

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



[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 353f8d2282b1a48376f8813fd1170445a0cda873 by Terry Jan Reedy in 
branch '2.7':
[2.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) 
(GH-13293)
https://github.com/python/cpython/commit/353f8d2282b1a48376f8813fd1170445a0cda873


--

___
Python tracker 

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



[issue36084] Threading: add builtin TID attribute to Thread objects

2019-05-13 Thread Jake Tesler


Jake Tesler  added the comment:

So where do we go from here?

--

___
Python tracker 

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



[issue36909] LastUpdatedOrderedDict recipe uses super() unnecessarily

2019-05-13 Thread wim glenn


New submission from wim glenn :

Section 
https://docs.python.org/3/library/collections.html#ordereddict-examples-and-recipes

class LastUpdatedOrderedDict(OrderedDict):
'Store items in the order the keys were last added'

def __setitem__(self, key, value):
super().__setitem__(key, value)
super().move_to_end(key)

Why does it use super().move_to_end(key), isn't self.move_to_end(key) more 
direct/Pythonic?

--
assignee: docs@python
components: Documentation
messages: 342395
nosy: docs@python, rhettinger, wim.glenn
priority: normal
pull_requests: 13209
severity: normal
status: open
title: LastUpdatedOrderedDict recipe uses super() unnecessarily

___
Python tracker 

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



[issue36908] "This module is always available" is confusing

2019-05-13 Thread Ned Batchelder


Ned Batchelder  added the comment:

Looks like these modules describe themselves as always available: _thread, sys, 
threading, time.

Notice that the built-ins are also described as "always available", which is 
the meaning we're trying to move math away from (you can use them without 
importing anything).

--

___
Python tracker 

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



[issue36474] RecursionError resets trace function set via sys.settrace

2019-05-13 Thread daniel hahler


daniel hahler  added the comment:

Duplicate of https://bugs.python.org/issue10933.

--
resolution:  -> duplicate
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



[issue36908] "This module is always available" is confusing

2019-05-13 Thread Ned Batchelder


Ned Batchelder  added the comment:

If we want to keep it, how about "it can always be imported."? Though I still 
wonder whether this is worth it.  Are we going to annotate all of the 
always-available modules with this notation?

--

___
Python tracker 

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



[issue36845] ipaddres.IPv4Network and ipaddress.IPv6Network tuple construction will accept out of valid range prefixlen

2019-05-13 Thread Nicolai Moore


Change by Nicolai Moore :


--
keywords: +patch
pull_requests: +13208
stage: needs patch -> patch review

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2019-05-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests:  -13206

___
Python tracker 

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



[issue36908] "This module is always available" is confusing

2019-05-13 Thread Mariatta Wijaya


Mariatta Wijaya  added the comment:

I agree the wording "is always available" is quite ambiguous. It's just that we 
use this phrase pretty much everywhere...

Example:
First paragraph of https://docs.python.org/3/library/sys.html
"It is always available."

https://docs.python.org/3/library/threading.html?highlight=threading#module-threading
 "This module used to be optional, it is now always available."

I wonder if it will be clearer if it says "is available across all platforms"?

--
nosy: +Mariatta

___
Python tracker 

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



[issue35138] timeit documentation should have example with function arguments

2019-05-13 Thread STINNER Victor

STINNER Victor  added the comment:

Thanks Anders Hovmöller! Example added to Python 3.7 and 3.8 documentation :-)

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



[issue36761] Extended slice assignment + iterable unpacking

2019-05-13 Thread wim glenn


wim glenn  added the comment:

Serhiy,

`a, *L[::2] = "abc"` as an alternative is interesting, thanks.  The other 
example `L[:], *rest = 'abcdef'` is less interesting because L[:] can be 
arbitrary size.

When noticing this, I had tried to consume a generator into every other 
position in a list by using:

L[::2], *extra = g

Though there are obvious workarounds (e.g. using `itertools.islice`), it 
surprised me that CPython did not "do what I mean" out of the box. 

However, since creating the issue, it was brought to my attention that trying 
to handle this assignment may result in potential ambiguity, for example:

L = [0, 1, 2]
L[::2], *rest = "ab", "c", "d"

There is no obvious choice for result here. So, perhaps this issue should just 
be closed.

--

___
Python tracker 

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



[issue34424] Unicode names break email header

2019-05-13 Thread Jens Troeger


Jens Troeger  added the comment:

Cheryl, if you can find somebody to approve and merge this fix, that would be 
greatly appreciated! Anything I can do,  please let me know.

--

___
Python tracker 

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



[issue36908] "This module is always available" is confusing

2019-05-13 Thread Ned Batchelder


Change by Ned Batchelder :


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

___
Python tracker 

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



[issue36880] Returning None from a callback with restype py_object decrements None's refcount too much

2019-05-13 Thread anthony shaw


anthony shaw  added the comment:

If you can write a test similar to the AnotherLeak.test_callback test case, and 
commit that first.

It will show in the CI/CD log as failed and verify the issue (incase it comes 
up in PR review)

Then add another commit with the patch itself and we should see the CI/CD pass.

Please follow the PR guide if this is your first PR to CPython 
https://devguide.python.org/pullrequest/

--

___
Python tracker 

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



[issue36908] "This module is always available" is confusing

2019-05-13 Thread Ned Batchelder


New submission from Ned Batchelder :

The math and cmath modules say this in their docs: "This module is always 
available."  This lead a beginner to believe they didn't need to be imported.

Nearly the entire standard library is always available in this sense (they can 
be imported).  This sentence isn't useful.

Can we change the first paragraph of the math module to be:

"This module provides access to the mathematical functions defined by the C 
standard."

(and similarly for the cmath module.)

--
assignee: docs@python
components: Documentation
messages: 342386
nosy: docs@python, nedbat
priority: normal
severity: normal
status: open
title: "This module is always available" is confusing

___
Python tracker 

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



[issue32587] Make REG_MULTI_SZ support zero-length strings

2019-05-13 Thread Eryk Sun


Eryk Sun  added the comment:

> For tests, you should be able to create your own REG_MULTI_SZ key with 
> zero-length strings and read it back. If the winreg module won't let 
> you do it, you may need ctypes (but that's okay in Windows-only 
> tests).

winreg.SetValueEx can create the value. We just need to add a case to test_case 
in Lib/test/test_winreg.py, such as the following:

("Multi-nul", ["", "", "", ""], REG_MULTI_SZ)

> I just spent way too long looking for a MoveFileEx call that doesn't 
> exist, because this isn't actually about doing things on reboot :)

Do you mean a variation of MOVEFILE_DELAY_UNTIL_REBOOT that doesn't require 
administrator access? That would be useful if it existed. I suppose a 
MOVEFILE_DELAY_UNTIL_LOGOFF flag could be added to have the logon process 
(winlogon.exe, instead of smss.exe) perform the delete/rename operation under 
impersonation at the end of the session, or (given a system crash or power 
failure) the next time the user logs on.

--

___
Python tracker 

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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-05-13 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

3.6 (and 3.5 if larry wants) are the only remaining trees to apply this to, 
assigning to the 3.6 RM.

--
assignee: gregory.p.smith -> ned.deily
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



[issue36897] shlex doesn't differentiate escaped characters in output

2019-05-13 Thread Eric V. Smith


Eric V. Smith  added the comment:

The goal is to match posix shell semantics. Can you provide a concrete example 
where shlex.shlex does something different from a posix-compliant shell? With 
all the escaping, it's going to be tough.

Note also that your code raises a DeprecationWarning in 3.7, at least, and will 
be an error in the future. You should probably use r-strings in your examples.

--
nosy: +eric.smith

___
Python tracker 

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



[issue35925] test_httplib test_nntplib test_ssl fail on ARMv7 Debian buster bot (OpenSSL 1.1.1a)

2019-05-13 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 7346a16ed584fd1e85359154820d286370b68648 by Gregory P. Smith in 
branch '2.7':
[2.7] bpo-35925: Skip SSL tests that fail due to weak external certs or old TLS 
(GH-13124) (GH-13253)
https://github.com/python/cpython/commit/7346a16ed584fd1e85359154820d286370b68648


--

___
Python tracker 

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



[issue36907] Crash due to borrowed references in _PyStack_UnpackDict()

2019-05-13 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

The idea of #36904 could be used here: define a special kind of tuple, which is 
like an ordinary tuple followed by a C array of PyObject* entries (all 
refcounted), terminated by a NULL to know where it ends. A special deallocation 
function would decref all entries.

--

___
Python tracker 

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



[issue36907] Crash due to borrowed references in _PyStack_UnpackDict()

2019-05-13 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Ideally, this would be fixed together with #36904.

--

___
Python tracker 

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



[issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x

2019-05-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13206

___
Python tracker 

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



[issue36904] Implement _PyStack_UnpackDict() with a single allocation

2019-05-13 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
components: +Interpreter Core -Library (Lib)

___
Python tracker 

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



[issue36904] Implement _PyStack_UnpackDict() with a single allocation

2019-05-13 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Ideally, this would be fixed together with #36907.

--

___
Python tracker 

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



[issue36907] Crash due to borrowed references in _PyStack_UnpackDict()

2019-05-13 Thread Jeroen Demeyer


Change by Jeroen Demeyer :


--
type:  -> crash

___
Python tracker 

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



[issue35138] timeit documentation should have example with function arguments

2019-05-13 Thread miss-islington


miss-islington  added the comment:


New changeset 7f485ea4fc17c5afb38cd0478ff15326fb5a47fc by Miss Islington (bot) 
in branch '3.7':
bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787)
https://github.com/python/cpython/commit/7f485ea4fc17c5afb38cd0478ff15326fb5a47fc


--
nosy: +miss-islington

___
Python tracker 

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



[issue36907] Crash due to borrowed references in _PyStack_UnpackDict()

2019-05-13 Thread Jeroen Demeyer


New submission from Jeroen Demeyer :

class IntWithDict:
def __init__(self, **kwargs):
self.kwargs = kwargs
def __index__(self):
self.kwargs.clear()
L = [2**i for i in range(1)]
return 0
x = IntWithDict(dont_inherit=float())
compile("", "", "", x, **x.kwargs)


The above crashes CPython due to the usage of borrowed references in 
_PyStack_UnpackDict(): the dict x.kwargs contains the only reference to the 
float() object stored in x.kwargs

When parsing the arguments, x.__int__() is called, which clears the dict, 
removing the only reference to that float()

--
components: Interpreter Core
messages: 342377
nosy: jdemeyer, vstinner
priority: normal
severity: normal
status: open
title: Crash due to borrowed references in _PyStack_UnpackDict()
versions: 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



[issue35138] timeit documentation should have example with function arguments

2019-05-13 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 8da5ebe11e0cb6599af682b22f7c2b2b7b9debd8 by Victor Stinner 
(Anders Hovmöller) in branch 'master':
bpo-35138: Added an example for timeit.timeit with callable arguments (GH-9787)
https://github.com/python/cpython/commit/8da5ebe11e0cb6599af682b22f7c2b2b7b9debd8


--
nosy: +vstinner

___
Python tracker 

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



[issue35138] timeit documentation should have example with function arguments

2019-05-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13205

___
Python tracker 

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



[issue36895] time.clock() marked for removal in 3.8 – still there.

2019-05-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b6a09ae287e253e4146a5a224b75d4dbfd38cb63 by Victor Stinner 
(Matthias Bussonnier) in branch 'master':
bpo-36895: Undocument removed time.clock (GH-13286)
https://github.com/python/cpython/commit/b6a09ae287e253e4146a5a224b75d4dbfd38cb63


--

___
Python tracker 

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



[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset b1dfcad6f0d3a52c9ac31fb9763fc7962a84b27c by Antoine Pitrou 
(Pierre Glaser) in branch 'master':
bpo-36867: Create the resource_tracker before launching SharedMemoryManagers 
(GH-13276)
https://github.com/python/cpython/commit/b1dfcad6f0d3a52c9ac31fb9763fc7962a84b27c


--

___
Python tracker 

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



[issue36906] Compile time textwrap.dedent() equivalent for str or bytes literals

2019-05-13 Thread Gregory P. Smith


New submission from Gregory P. Smith :

A Python pattern in code is to keep everything indented to look pretty while, 
yet when the triple quoted multiline string in question needs to not have 
leading whitespace, calling textwrap.dedent("""long multiline constant""") is a 
common pattern.

rather than doing this computation at runtime, this is something that'd make 
sense to do at compilation time.  A natural suggestion for this would be a new 
letter prefix for multiline string literals that triggers this.

Probably not worth "wasting" a letter on this, so I'll understand if we reject 
the idea, but it'd be nice to have rather than importing textwrap and calling 
it all over the place just for this purpose.

There are many workarounds but an actual syntax would enable writing code that 
looked like this:

```python
class Castle:
def __init__(self, name, lyrics=None):
if not lyrics:
lyrics = df"""\
We're knights of the round table
We dance whene'er we're able
We do routines and scenes
With footwork impeccable.
We dine well here in {name}
We eat ham and jam and spam a lot.
"""
self._name = name
self._lyrics = lyrics
```

Without generating a larger temporary always in memory string literal in the 
code object that gets converted at runtime to the desired dedented form via a 
textwrap.dedent() call.  I chose "d" as the the letter to mean dedent.  I don't 
have a strong preference if we ever do make this a feature.

--
components: Interpreter Core
messages: 342373
nosy: gregory.p.smith
priority: low
severity: normal
status: open
title: Compile time textwrap.dedent() equivalent for str or bytes literals
type: enhancement
versions: Python 3.9

___
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

2019-05-13 Thread Michael Blahay


Michael Blahay  added the comment:

At the end of msg309603 it was stated that this issue is being changed to an 
enhancement. Later on, Tim Peters changed it Type back to behavior, but didn't 
provide any detail about why. Should this issue still be considered an 
enhancement?

--
nosy: +mblahay

___
Python tracker 

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



[issue36894] test_multiprocessing_spawn regression on Windows

2019-05-13 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 95da83d9bac698d420cc308e8699ef6e4fae2aca by Antoine Pitrou in 
branch 'master':
bpo-36894: Fix regression in test_multiprocessing_spawn (no tests run on 
Windows) (GH-13290)
https://github.com/python/cpython/commit/95da83d9bac698d420cc308e8699ef6e4fae2aca


--

___
Python tracker 

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



[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-13 Thread Michael Blahay


Michael Blahay  added the comment:

Ryan, What say you? Will you be satisfied with the addition of a note in the 
documentation?

--

___
Python tracker 

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



[issue36719] regrtest --findleaks should fail if an uncollectable object is found

2019-05-13 Thread miss-islington


miss-islington  added the comment:


New changeset 19464bcd97436cd8d5d9e32b70faf3e1e5f2a712 by Miss Islington (bot) 
in branch '3.7':
bpo-36719: regrtest -jN no longer stops on crash (GH-13231)
https://github.com/python/cpython/commit/19464bcd97436cd8d5d9e32b70faf3e1e5f2a712


--
nosy: +miss-islington

___
Python tracker 

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



[issue36894] test_multiprocessing_spawn regression on Windows

2019-05-13 Thread Pierre Glaser


Pierre Glaser  added the comment:

Thanks for the fix Antoine.

--

___
Python tracker 

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



[issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator

2019-05-13 Thread A.M. Kuchling


A.M. Kuchling  added the comment:

Oh, I missed that there was already a patch. BTW, I found two dissections of 
zip files that also show disk numbers of 0: the one at 
https://rzymek.github.io/post/excel-zip64/ is exploring an Excel Zip issue, and 
the forensic tutorial at 
https://users.cs.jmu.edu/buchhofp/forensics/formats/pkzip.html is discussing 
the format.

--

___
Python tracker 

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



[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

PR 13102 is original patch for master; it was merged, not closed.
PR 13284 fixed blurb for master.
PR 13280 backport for 3.7 was closed trying to restart bogus failure; can't do 
that for backports.
PR 13288 is second backport; only optional Azure Pipilines failed.
PR 13293 is manual 2.7 backport.

--

___
Python tracker 

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



[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +13204

___
Python tracker 

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



[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Pierre Glaser


Change by Pierre Glaser :


--
pull_requests: +13203

___
Python tracker 

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



[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset 50466c66509de556a8579172f82d1abb1560d8e4 by Antoine Pitrou 
(Pierre Glaser) in branch 'master':
bpo-36867: DOC update multiprocessing.rst (GH-13289)
https://github.com/python/cpython/commit/50466c66509de556a8579172f82d1abb1560d8e4


--

___
Python tracker 

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



[issue36725] Reference leak regression with Python3.8a3

2019-05-13 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +13201

___
Python tracker 

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



[issue36719] regrtest --findleaks should fail if an uncollectable object is found

2019-05-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13202

___
Python tracker 

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



[issue36719] regrtest --findleaks should fail if an uncollectable object is found

2019-05-13 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b0917df329ba14b7bc6fa782c1b61e7a2163af0b by Victor Stinner in 
branch 'master':
bpo-36719: regrtest -jN no longer stops on crash (GH-13231)
https://github.com/python/cpython/commit/b0917df329ba14b7bc6fa782c1b61e7a2163af0b


--

___
Python tracker 

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



[issue35907] [security][CVE-2019-9948] Unnecessary URL scheme exists to allow local_file:// reading file in urllib

2019-05-13 Thread Sihoon Lee


Sihoon Lee  added the comment:

If developers allow only http:// or https:// as whitelist, it has no problem.
But, If someone blocks only one file://, attacker can bypass it.
This issue may provides attacker with bypassing method as new scheme.

--

___
Python tracker 

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



[issue36867] Make semaphore_tracker track other system resources

2019-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
pull_requests: +13200

___
Python tracker 

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



[issue36894] test_multiprocessing_spawn regression on Windows

2019-05-13 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +13199
stage: needs patch -> patch review

___
Python tracker 

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



[issue36751] Changes in the inspect module for PEP 570

2019-05-13 Thread mike bayer


mike bayer  added the comment:

if a function continues to work correctly throughout the span of a Python X 
version, why does it need to be removed?   I have a foggy memory but I don't 
seem to recall functions that were technically redundant being aggressively 
deprecated in the 2.x series.   This warning is causing a lot of downstream 
pain right now and this is after we already all had to deal with getargspec() 
going away.

--

___
Python tracker 

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



[issue22102] Zipfile generates Zipfile error in zip with 0 total number of disk in Zip64 end of central directory locator

2019-05-13 Thread A.M. Kuchling


A.M. Kuchling  added the comment:

I also ran across this issue today, where the 'disks' value in a Zip file is 0. 
I'm trying to find out what software was used to create them, but it's quite 
plausible that it's Windows as Ramsey Kant suggests. So I think this fix should 
get applied to 3.8 and 3.7. Would it help if I produced a patch?

The PKWare Zip specification that takluyver links above has been updated -- it 
now has an April 29th updated -- but none of the changes are relevant to this.

Interestingly, the 'ditto' command on MacOS X (which can also unpack zip files) 
doesn't complain about the disk number either. I was unable to figure out where 
the source code for ditto is; I couldn't find it on opensource.apple.com.

--
nosy: +akuchling

___
Python tracker 

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



[issue36751] Changes in the inspect module for PEP 570

2019-05-13 Thread mike bayer


Change by mike bayer :


--
nosy: +zzzeek

___
Python tracker 

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



[issue36807] IDLE doesn't call os.fsync()

2019-05-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 68a11b6e6a73cd2e9b49e5df9973877b2fed6277 by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.7':
[3.7] bpo-36807: When saving a file in IDLE, call flush and fsync (GH-13102) 
(#13288)
https://github.com/python/cpython/commit/68a11b6e6a73cd2e9b49e5df9973877b2fed6277


--

___
Python tracker 

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



  1   2   3   >