[issue37555] _CallList.__contains__ doesn't always respect ANY.

2019-07-14 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks Elizabeth for the test. The regression test seems to be same as the case 
noted by Serhiy that Foo.__eq__ is not returning NotImplemented so that 
ANY.__eq__ can be executed. Below would be the correct implementation that 
passes. 

The actual comparison is done at [0]. If Foo.__eq__ returned NotImplemented due 
to type difference it would have called other.arguments. So there is no chance 
for ANY.__eq__ to be executed. I feel it's more about the third party class 
that needs to be fixed rather than the stdlib code here and changing the order 
of arguments for ANY's __eq__ precedence might introduce other subtle bugs.

self.arguments = OrderedDict([('args', (<__main__.Foo object at 
0x10a54b500>,))])
other.arguments = OrderedDict([('args', (,))])

def __eq__(self, other):
if self is other:
return True
if not isinstance(other, BoundArguments):
return NotImplemented
return (self.signature == other.signature and
self.arguments == other.arguments)

# Better implementation

from unittest.mock import Mock, call, ANY

class Foo(object):
 def __eq__(self, other):
  if not isinstance(other, self.__class__):
   return NotImplemented
  return True
 def __ne__(self, other): pass

mock = Mock(spec_set=Foo)
expected = [call(ANY)]
mock(Foo())

mock.assert_has_calls(expected)

[0] 
https://github.com/python/cpython/blob/cd6e83b4810549c308ab2d7315dbab526e35ccf6/Lib/inspect.py#L2708


3.5 and 3.6 are in security fixes only mode. If this is considered to be a bug 
it can go in master, 3.8 and 3.7. The tests section is for CPython test suite 
and not for the unittest related bugs. So triaging it back.

--
components: +Library (Lib) -Tests
nosy: +serhiy.storchaka, xtreak
versions:  -Python 3.5, Python 3.6

___
Python tracker 

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



[issue29753] Ctypes Packing Bitfields Incorrectly - Linux

2019-07-14 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue37496] Support annotations in signature strings.

2019-07-14 Thread Giovanni Cappellotto


Change by Giovanni Cappellotto :


--
nosy: +potomak

___
Python tracker 

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



[issue37461] email.parser.Parser hang

2019-07-14 Thread Nam Nguyen


Change by Nam Nguyen :


--
nosy: +Nam.Nguyen

___
Python tracker 

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



[issue37595] Python 3.7.4 does not build on Raspbian Buster

2019-07-14 Thread Kal Sze


New submission from Kal Sze :

Like the title says.

Tried building with these `configure` options:

--enable-optimizations \
--with-lto \
--enable-shared \
--enable-loadable-sqlite-extensions \
--enable-ipv6 \
--with-system-expat \
--with-system-ffi \
--with-system-libmpdec \
--with-doc-strings \
--with-pymalloc \
--with-c-locale-coercion \
--with-ensurepip=upgrade

And `CFLAGS="-O3 -march=native"`

But got this error message:

```
/usr/bin/ld: ./libpython3.7m.so: undefined reference to 
`__gcov_pow2_profiler_atomic'
/usr/bin/ld: ./libpython3.7m.so: undefined reference to 
`__gcov_average_profiler_atomic'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:733: Programs/_testembed] Error 1
make[3]: Leaving directory '/tmp/python-build.20190712163526.2762/Python-3.7.4'
make[2]: *** [Makefile:521: build_all_generate_profile] Error 2
make[2]: Leaving directory '/tmp/python-build.20190712163526.2762/Python-3.7.4'
make[1]: *** [Makefile:497: profile-gen-stamp] Error 2
make[1]: Leaving directory '/tmp/python-build.20190712163526.2762/Python-3.7.4'
make: *** [Makefile:509: profile-run-stamp] Error 2
```

--
components: Build
files: python-build.20190711104717.24526.log
messages: 347948
nosy: kal.sze
priority: normal
severity: normal
status: open
title: Python 3.7.4 does not build on Raspbian Buster
type: compile error
versions: Python 3.7
Added file: 
https://bugs.python.org/file48482/python-build.20190711104717.24526.log

___
Python tracker 

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



[issue34749] improve performance of binascii.a2b_base64()

2019-07-14 Thread Petr Viktorin


Change by Petr Viktorin :


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



[issue37593] ast.arguments has confusing args/posonlyargs ordering

2019-07-14 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks for the report, Benjamin!

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



[issue37593] ast.arguments has confusing args/posonlyargs ordering

2019-07-14 Thread miss-islington


miss-islington  added the comment:


New changeset cf9a63c6c7e19f3d27cf3b5731d02cc216ef3dd1 by Miss Islington (bot) 
in branch '3.8':
bpo-37593: Swap the positions of posonlyargs and args in the constructor of 
ast.parameters nodes (GH-14778)
https://github.com/python/cpython/commit/cf9a63c6c7e19f3d27cf3b5731d02cc216ef3dd1


--

___
Python tracker 

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



[issue37593] ast.arguments has confusing args/posonlyargs ordering

2019-07-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14575
pull_request: https://github.com/python/cpython/pull/14779

___
Python tracker 

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



[issue37593] ast.arguments has confusing args/posonlyargs ordering

2019-07-14 Thread miss-islington


miss-islington  added the comment:


New changeset cd6e83b4810549c308ab2d7315dbab526e35ccf6 by Miss Islington (bot) 
(Pablo Galindo) in branch 'master':
bpo-37593: Swap the positions of posonlyargs and args in the constructor of 
ast.parameters nodes (GH-14778)
https://github.com/python/cpython/commit/cd6e83b4810549c308ab2d7315dbab526e35ccf6


--
nosy: +miss-islington

___
Python tracker 

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



[issue37593] ast.arguments has confusing args/posonlyargs ordering

2019-07-14 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +14574
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14778

___
Python tracker 

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



[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2019-07-14 Thread Zackery Spytz


Change by Zackery Spytz :


--
nosy: +ZackerySpytz
versions: +Python 2.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



[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

Sorry. '\.' will be invalid in the future. I got ahead of myself.

$ python3 -Werror -q
>>> '\.'
  File "", line 1
SyntaxError: invalid escape sequence \.


Not that it would have affected your issue, so I apologize for the red herring. 
But "switch to raw strings when you have backslashes in a regex" is always my 
first reaction.

--

___
Python tracker 

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



[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2019-07-14 Thread Zackery Spytz


Change by Zackery Spytz :


--
keywords: +patch
pull_requests: +14573
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14777

___
Python tracker 

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



[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread brent s.


brent s.  added the comment:

Oh for pete's sake. I wish I could edit comments.

Eric-

To make it clear:

*

VERSION: 2.7.16 (default, Mar 11 2019, 18:59:25) 
[GCC 8.2.1 20181127]
PATTERN: \.*$

BEFORE: a.b
WITHOUT: a.b
DUMMY: a.bX
AFTER: a.b.
RSTRIP: a.b
==
BEFORE: a.b.
WITHOUT: a.b
DUMMY: a.bX
AFTER: a.b.
RSTRIP: a.b
==
BEFORE: a.b..
WITHOUT: a.b
DUMMY: a.bX
AFTER: a.b.
RSTRIP: a.b
==
BEFORE: a.b...
WITHOUT: a.b
DUMMY: a.bX
AFTER: a.b.
RSTRIP: a.b
==

*

VERSION: 3.7.3 (default, Jun 24 2019, 04:54:02) 
[GCC 9.1.0]
PATTERN: \.*$

BEFORE: a.b
WITHOUT: a.b
DUMMY: a.bX
AFTER: a.b.
RSTRIP: a.b
==
BEFORE: a.b.
WITHOUT: a.b
DUMMY: a.bXX
AFTER: a.b..
RSTRIP: a.b
==
BEFORE: a.b..
WITHOUT: a.b
DUMMY: a.bXX
AFTER: a.b..
RSTRIP: a.b
==
BEFORE: a.b...
WITHOUT: a.b
DUMMY: a.bXX
AFTER: a.b..
RSTRIP: a.b
==


Note the differences between versions for cases a.b., a.b.., and a.b... 
("BEFORE: ..." lines). Compare their "AFTER" and "DUMMY" lines between python2 
and python3.



Serhiy-

Apologies; I meant RFC1035; I typo'd that. But as shown above, the difference 
is pretty distinct (and inconsistent with GNU sed behaviour).

--

___
Python tracker 

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



[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread brent s.


brent s.  added the comment:

"'\.' is an invalid escape sequence. Could you try it with a raw string?"

Well, a valid regex escape, but right. Point taken. I am under the impression, 
however, that given the value in ptrn (in example.py) is already a string, it 
should be interpreted as a raw string in the re.compile(), no? Because 
otherwise it'd be a dickens of a time getting a regex pattern that's 
dynamic/programmatically assigned to a name, since there's no raw(), str.raw(), 
or str.encode('raw').

They both evaluate to the same, for what it's worth:

>>> repr('\.+$')
"'.+$'"
>>> repr(r'\.+$')
"'.+$'"
>>> ptrn = '\.+$'
>>> repr(ptrn)
"'.+$'"

So.

"Also, it's not really clear to me what you're seeing, vs. what you expect to 
see. For one example that you think is incorrect, could you show what you get 
vs. what you expect to get? And, if that's different on different python 
versions, could you show what each version does?"

The comment from Serhiy clarifies that this was indeed something that was 
changed. You can see the difference pretty easily by just calling the 
example.py between python2 and python3.

--

"This change was intentional and documented. It fixed old bug in the Python 
implementation of RE and removed the discrepancy with other RE engines."

Okay, so I'm not going insane. That's good. Do you have the bug ID it fixes and 
where it's documented? Do you know which other RE engines were doing this? 
Because GNU sed, for instance, does not behave like this - it behaves as the 
"pre-bugfix" behaviour did:

$ echo 'a.b.' | sed -e 's/\.*$/./g'
a.b.
$ echo 'a.b...' | sed -e 's/\.*$/./g'
a.b.
$ echo 'a.b' | sed -e 's/\.*$/./g'
a.b.

"The pattern r'\.*$' matches not only a sequence of dots at the of the line, 
but also an empty string at the end of line. If this is not what you want, use 
r'\.+$'."

Right; it's to guarantee there is one and only one period at the end of a line, 
whether there is no period, one period, or many periods in the original string 
(think e.g. enforcing RFC1025-compatible FQDNs, for instance).

--

___
Python tracker 

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



[issue37555] _CallList.__contains__ doesn't always respect ANY.

2019-07-14 Thread Elizabeth Uselton


Elizabeth Uselton  added the comment:

Hi there, I completely missed that this had caused so much interesting 
discussion. I've added a regression test that shows the bug I was encountering, 
which seems to be related to 
 spec_set bypassing _Call's overwritten __eq__ and so not respecting ANY 
https://github.com/python/cpython/pull/14700

I agree, this is definitely also a third party bug with Django, but I think 
it's a problem here too, and am working on a fix.

--
components: +Tests -Library (Lib)
nosy:  -serhiy.storchaka, xtreak
versions: +Python 3.5, Python 3.6

___
Python tracker 

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



[issue28009] core logic of uuid.getnode() needs refresh

2019-07-14 Thread Tal Einat


Tal Einat  added the comment:

>> The current code and proposed changes use 'netstat -ia' to find the node 
>> however if netstat needs to perform a reverse DNS query to resolve some 
>> interfaces this makes using uuid1 *really* slow especially when reverse DNS 
>> queries aren't set up correctly or timeout.
>>mac = _find_mac_netstat('netstat', '-ia', b'Address', lambda i: i)
>>
>> Would it be possible to change the netstat call to add 'n' to the nestat 
>> options, i.e. _find_mac_netstat('netstat', '-ian', ...) to prevent netstat 
>> from attempting to resolve addresses?

> Sounds like an excellent idea. Gives me a reason to get started again. Thx!

I don't see this in PR GH-28009; should this change be made?

--
nosy: +taleinat

___
Python tracker 

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



[issue37593] ast.arguments has confusing args/posonlyargs ordering

2019-07-14 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +levkivskyi, pablogsal, serhiy.storchaka

___
Python tracker 

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



[issue37461] email.parser.Parser hang

2019-07-14 Thread Alex Gaynor


Change by Alex Gaynor :


--
nosy: +alex

___
Python tracker 

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



[issue30550] Document order-preserving dictionary output in json

2019-07-14 Thread Eric O. LEBIGOT


Eric O. LEBIGOT  added the comment:

Kyle, what you're saying is correct but is unfortunately unrelated to any of 
the points in the original issue. In fact, the JSON encoder does preserve 
whatever order the dictionary elements are in, and it would be useful to 
document this. Thus, if a user gives an OrderedDict (or a dict with a known 
order, in Python 3.7+), it is useful that he know that the order of its 
elements will not be changed upon transformation into JSON.

--

___
Python tracker 

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



[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This change was intentional and documented. It fixed old bug in the Python 
implementation of RE and removed the discrepancy with other RE engines.

The pattern r'\.*$' matches not only a sequence of dots at the of the line, but 
also an empty string at the end of line. If this is not what you want, use 
r'\.+$'.

--
nosy: +serhiy.storchaka
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread Eric V. Smith


Eric V. Smith  added the comment:

'\.' is an invalid escape sequence. Could you try it with a raw string?

Also, it's not really clear to me what you're seeing, vs. what you expect to 
see. For one example that you think is incorrect, could you show what you get 
vs. what you expect to get? And, if that's different on different python 
versions, could you show what each version does?

--
nosy: +eric.smith

___
Python tracker 

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



[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread brent s.


brent s.  added the comment:

WORKAROUND:

Obviously, str.rstrip('.') still works, but this is of course quite inflexible 
compared to a regex pattern.

--

___
Python tracker 

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



[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread brent s.


brent s.  added the comment:

Sorry- by "chokes", I mean "substitutes in multiple replacements".

--

___
Python tracker 

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



[issue37594] re does not honor matching trailing multiple periods

2019-07-14 Thread brent s.


New submission from brent s. :

(Sorry for the title; not quite sure how to summarize this)

SO! Have I got an interesting one for you.

ISSUE:
In release 3.7.3 (and possibly later), the re module, if one has a string e.g. 
'a.b.', a pattern such as '\.*$' will successfully *match* any number of 
multiple trailing periods. HOWEVER, when attempting to substitute those with 
actual character(s), it chokes. See attached poc.py

NOTES:
- This *is a regression* from 2.6.6, 2.7.16, and 3.6.7 (other releases were not 
tested). This behaviour does not occur on those versions.

--
components: Library (Lib)
files: example.py
messages: 347933
nosy: bsaner
priority: normal
severity: normal
status: open
title: re does not honor matching trailing multiple periods
versions: Python 3.7
Added file: https://bugs.python.org/file48481/example.py

___
Python tracker 

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



[issue37593] ast.arguments has confusing args/posonlyargs ordering

2019-07-14 Thread Benjamin S Wolf


New submission from Benjamin S Wolf :

Positional-only arguments come before position-or-keyword arguments.

def f(pos1, pos2, /, pos_or_kwd, *, kwd1, kwd2):

However, the posonlyargs are defined to come after args in the AST:

arguments = (arg* args, arg* posonlyargs, arg? vararg, arg* kwonlyargs,
 expr* kw_defaults, arg? kwarg, expr* defaults)

which results in confusing ast.dump output because they share defaults:

>>> r = ast.parse('lambda a=1,/,b=2:a+b', mode='eval')
>>> ast.dump(r.body.args)
"arguments(
args=[arg(arg='b', annotation=None, type_comment=None)],
posonlyargs=[arg(arg='a', annotation=None, type_comment=None)],
vararg=None, kwonlyargs=[], kw_defaults=[], kwarg=None,
defaults=[Constant(value=1, kind=None), Constant(value=2, kind=None)])"
[manually prettified]

Note how the ordering is 'args b', then 'posonlyargs a', but the defaults are 
still 1 then 2. This can be confusing to someone building an ast.arguments 
using keywords because the elements in 'defaults' have to be supplied in a 
specific order, but the keyword args 'args' and 'posonlyargs' do not, or to 
someone building an ast.arguments using positional arguments (because, maybe 
ironically, they're not keyword-only arguments) because 'posonlyargs' and 
'args' must be supplied in a different order than the ordering of elements in 
'defaults' would imply.

Potential solutions:
 1. Swap posonlyargs and args.
 2. Add a separate pos_defaults list.

--
messages: 347932
nosy: Benjamin.S.Wolf
priority: normal
severity: normal
status: open
title: ast.arguments has confusing args/posonlyargs ordering
type: behavior
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



[issue37559] IDLE: Scrolling issues with code context shown

2019-07-14 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Whereas I found the fixed size to be much less usable.  The default of 3 lines 
was too few and often useless when context is needed whereas a realistic size 
of, say, 8, wasted too much space too much of the time.  I might prefer 
deleting the feature to reverting. 

It is probably a good thing to have 2 developers with different visual 
processing systems ;-).

With integral lines at the top of the text, scrolling one line down with a 
header line at the top means that the header line stays put while the 
background changes and the separator lines moves. A dedent line moves up as the 
context shrinks.  I *like* the CC size changes because the size indicates the 
indent depth.

Changing the general tab line from
  Max context lines:  [ ]
to
  Code context lines:min [ ]  max [ ]
strike me as an improvement even without adding min, and the somewhat obvious 
addition of min (it is currently fixed at 1) should not confuse users.  

The scrollbar slider bobble does not bother me much when scrolling with key or 
mouse wheel because I hardly see it.  My eyes are focused on the text.

Another possible solution is suppressing CC update at least while the mouse 
button is held down over the scrollbar.  Button down/up on the scrollbar 
instance sets text.pause_CC to True/False and CC update checks 
self.text.pauseCC.

--

___
Python tracker 

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



[issue19820] docs are missing info about module attributes

2019-07-14 Thread M. Anil Tuncel


M. Anil Tuncel  added the comment:

Are they still missing? inspect.ismodule() seems to be there at least.
https://docs.python.org/3/library/inspect.html

--
nosy: +anilbey

___
Python tracker 

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



[issue37473] importlib: Remove libregrtest hack: "We import importlib *ASAP* in order to test #15386"

2019-07-14 Thread STINNER Victor


STINNER Victor  added the comment:

I merged your PR. If someone considers than test_there_can_be_only_one() is not 
enough, please add a new test.

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



[issue37473] importlib: Remove libregrtest hack: "We import importlib *ASAP* in order to test #15386"

2019-07-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8b7db5a1114e2113a756bdf8877fbe366055c69a by Victor Stinner in 
branch 'master':
bpo-37473: Don't import importlib ASAP in tests (GH-14661)
https://github.com/python/cpython/commit/8b7db5a1114e2113a756bdf8877fbe366055c69a


--

___
Python tracker 

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



[issue15386] Still getting two copies of importlib._bootstrap

2019-07-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8b7db5a1114e2113a756bdf8877fbe366055c69a by Victor Stinner in 
branch 'master':
bpo-37473: Don't import importlib ASAP in tests (GH-14661)
https://github.com/python/cpython/commit/8b7db5a1114e2113a756bdf8877fbe366055c69a


--
nosy: +vstinner

___
Python tracker 

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



[issue21992] New AST node Else() should be introduced

2019-07-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

In general case the AST does not preserve detailed information about all 
syntactic elements. For example in the AST for `a + b` does not include lineno 
and col_offset for "+".

>>> ast.dump(ast.parse('a + b'), include_attributes=True)
"Module(body=[Expr(value=BinOp(left=Name(id='a', ctx=Load(), lineno=1, 
col_offset=0, end_lineno=1, end_col_offset=1), op=Add(), right=Name(id='b', 
ctx=Load(), lineno=1, col_offset=4, end_lineno=1, end_col_offset=5), lineno=1, 
col_offset=0, end_lineno=1, end_col_offset=5), lineno=1, col_offset=0, 
end_lineno=1, end_col_offset=5)], type_ignores=[])"

But in most cases you can determine it from the position of the surrounded 
nodes. "+" lies between the end of BinOp.left and the beginning of BinOp.right, 
i.e. between columns 1 and 4 at line 1. What is left is to count the number of 
whitespace character before and after "+" to determine its exact position. The 
same method you can use to find the position of the "else" keyword.

It is easier in 3.8 since the AST contains now also the position of the end of 
the node (end_lineno and end_col_offset).

--

___
Python tracker 

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



[issue37482] Email address display name fails with both encoded words and special chars

2019-07-14 Thread B Siemerink


B Siemerink  added the comment:

Yes, you are right! The fix is to encode the special characters.

--

___
Python tracker 

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



[issue37344] plistlib doesn't skip whitespace in XML format detection

2019-07-14 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

You can always strip the file yourself :-)

Ignoring leading whitespace for XML would be fairly invasive due to the way the 
code is set up. I'm not set against it, but I'm not in favour of complicating 
the implementation for an edge case like this.

--

___
Python tracker 

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



[issue37344] plistlib doesn't skip whitespace in XML format detection

2019-07-14 Thread Shane G


Shane G  added the comment:

This issue was created because I ran across a plist like this when parsing 
entitlements in an IPA.  I assume that this happened by some unusual step in 
the toolchain when building the application.

To some other points:
* agreed lstrip()ing just the key would not work (unfortunately I suggested 
this before actually coding up a workaround for my case).
* agreed that binary plists should not have any stripping.
* I have not tried testing apple tools (e.g. plutil) against XML plists with 
BOMs before any leading whitespace.

--

___
Python tracker 

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



[issue37291] AST - code cleanup

2019-07-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue30588] Missing documentation for codecs.escape_decode

2019-07-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Reading the stackoverflow questions, I am not sure that this function would be 
useful for the author of the question. He just needs to remove b'\\000', this 
is only what we know. There are many ways to do it, and after using 
codecs.escape_decode() you will need to remove b'\000'.

If you want to add a feature similar to the "string-escape" codec in Python 3, 
it is better to provide it officially as a new codec "bytes-escape" (functions 
like codecs.utf_16_le_decode() are internal). But we should discuss its 
behavior taking to account the difference between string literals in Python 2 
and bytes literals in Python 3. For example how to treat non-escaped non-ascii 
bytes (they where acceptable in Python 2, but not in Python 3).

--

___
Python tracker 

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



[issue37344] plistlib doesn't skip whitespace in XML format detection

2019-07-14 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

@shaneg, could you elaborate on why you created this issue?

I don't know of tooling that would generate such files, and it is highly 
unlikely that Apple's system tooling/libraries would do so.

--

___
Python tracker 

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



[issue37344] plistlib doesn't skip whitespace in XML format detection

2019-07-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

lstrip() would not work with UTF-16 encoded plist files neither with BOM.

Who produces plist files with leading whitespaces?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30588] Missing documentation for codecs.escape_decode

2019-07-14 Thread Carl Bordum Hansen


Carl Bordum Hansen  added the comment:

You have a point, the function is not in codecs.__all__. Reading the 
stackoverflow questions, it seems like this is a function that is useful.

--
nosy: +carlbordum

___
Python tracker 

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



[issue7940] re.finditer and re.findall should support negative end positions

2019-07-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Are there any real world examples which show the benefit of supporting negative 
indices?

--

___
Python tracker 

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



[issue37592] sysconfig should not rely on sys.version

2019-07-14 Thread Carl Bordum Hansen


Change by Carl Bordum Hansen :


--
keywords: +patch
pull_requests: +14570
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14776

___
Python tracker 

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



[issue36044] PROFILE_TASK for PGO build is not a good workload

2019-07-14 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

As far as where to put the lists of tests, you're probably right.  putting it 
within test.regrtest itself under the --pgo banner makes sense.  (though we 
should keep logic to accept a list of explicit tests to add or exclude if the 
user has also provided those)

--

___
Python tracker 

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



[issue37592] sysconfig should not rely on sys.version

2019-07-14 Thread Carl Bordum Hansen


New submission from Carl Bordum Hansen :

I found this FIXME and replaced it with code that follows the git tags naming 
scheme.

--
components: Library (Lib)
messages: 347916
nosy: carlbordum, tarek
priority: normal
severity: normal
status: open
title: sysconfig should not rely on sys.version
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



[issue33450] unexpected EPROTOTYPE returned by sendto on MAC OSX

2019-07-14 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
assignee:  -> ronaldoussoren

___
Python tracker 

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



[issue7940] re.finditer and re.findall should support negative end positions

2019-07-14 Thread Ezio Melotti


Ezio Melotti  added the comment:

Sorry, I was wrong.  re.findall accepts negative indices for both start and end 
but they silently get converted to 0, which is arguably an unexpected behavior.

This is an example of the current behavior:
>>> s, e = 1, 4; re.compile('.').findall('abcde', s, e), 'abcde'[s:e]
(['b', 'c', 'd'], 'bcd')
>>> s, e = -4, 4; re.compile('.').findall('abcde', s, e), 'abcde'[s:e]
(['a', 'b', 'c', 'd'], 'bcd')
>>> s, e = 1, -1; re.compile('.').findall('abcde', s, e), 'abcde'[s:e]
([], 'bcd')
>>> s, e = -4, -1; re.compile('.').findall('abcde', s, e), 'abcde'[s:e]
([], 'bcd')

With the patch, all these return ['b', 'c', 'd'].  This change might indeed 
cause issues because it's a change in behavior, but I'm also not sure there are 
many cases where one would want a negative index to be treated as 0.  Maybe we 
could raise a FutureWarning in the next release and change the behavior 
afterwards?

--

___
Python tracker 

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



[issue15898] OSX TTY bug

2019-07-14 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is IMHO not a bug in Python, the problem can been seen when you rewrite 
the code in msg170261 in C, see the code below.

An observation with the C code below: Both moving ``close(slave)`` to above the 
sleep or removing that close entirely fixes the problem for me. Likewise with 
adding ``usleep(70);`` to the child before exiting.

It is unclear to me who's at fault here, this could be a bug in the macOS 
kernel but could also be a bug in this code.  It looks like the output is lost 
when ``close(slave)`` happens after the child proces has exited.

BTW. All testing was done on macOS 10.14.5, with python 3.8.

Anyway: I propose closing this issue because this is not a bug in CPython.


/* The C code used to test system behaviour */
#include 
#include 
#include 
#include 
#include 



int main(void)
{
int master, slave;
int r;
pid_t pid;

r = openpty(, , NULL, NULL, NULL);
if (r == -1) {
perror("openpty");
exit(1);
}

pid = fork();

if (pid == 0) {
/* child */
setsid();
close(master);

dup2(slave, 0);
dup2(slave, 1);
dup2(slave, 2);
close(slave);

write(1, "testing", 7);
_exit(255);
} else {
/* parent */
char buf[1024];

usleep(50); /* 0.5 */
close(slave);

r = read(master, buf, 1024);
if (r == -1) {
perror("read");
exit(1);
}

printf("%d\n", r);
write(1, buf, r);

kill(pid, SIGKILL);
}
}

--
resolution:  -> not a bug
status: open -> pending
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 2.6, Python 3.1, Python 
3.2

___
Python tracker 

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



[issue7940] re.finditer and re.findall should support negative end positions

2019-07-14 Thread Ezio Melotti


Ezio Melotti  added the comment:

The current behavior is inconsistent because the start position accepts both 
positive and negative indices, whereas the end position only accepts positive 
indices.
I think the proposal and the PR written by Anil are reasonable and should be 
merged.

--

___
Python tracker 

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



[issue37344] plistlib doesn't skip whitespace in XML format detection

2019-07-14 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I don't agree with calling lstrip() before checking which format is used 
because leading whitespace is invalid for binary plist files (and plutil agrees 
with me on that).

--

___
Python tracker 

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



[issue37291] AST - code cleanup

2019-07-14 Thread Zackery Spytz


Zackery Spytz  added the comment:

The linked PR was merged, so I think this issue can be closed.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-14 Thread Zackery Spytz


Zackery Spytz  added the comment:

> I would like some way of locally suppressing Py_DEPRECATED.

There was some discussion (and a pull request) on bpo-19569.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue34105] test_socket.test_host_resolution_bad_address fails on Mac OS X 10.13.6

2019-07-14 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
stage:  -> resolved
status: pending -> closed

___
Python tracker 

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



[issue15730] Silence unused value warnings under Mac OS X 10.8/clang

2019-07-14 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm closing this as out of date.

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



[issue37591] test_concurrent_future failed

2019-07-14 Thread Martin Bammer


New submission from Martin Bammer :

When building Python 3.7.4 from source on Ubuntu 18.10 I'm getting the 
following error:

0:04:38 load avg: 2.40 [ 78/416] test_complex
0:04:39 load avg: 2.40 [ 79/416] test_concurrent_futures

Traceback:
 Thread 0x7f936b7fe700 (most recent call first):
  File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 296 in wait
  File "/media/Daten/src/Python-3.7.4/Lib/multiprocessing/queues.py", line 224 
in _feed
  File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 870 in run
  File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 926 in 
_bootstrap_inner
  File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 890 in _bootstrap

Thread 0x7f93487fc700 (most recent call first):
  File "/media/Daten/src/Python-3.7.4/Lib/selectors.py", line 415 in select
  File "/media/Daten/src/Python-3.7.4/Lib/multiprocessing/connection.py", line 
920 in wait
  File "/media/Daten/src/Python-3.7.4/Lib/concurrent/futures/process.py", line 
361 in _queue_management_worker
  File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 870 in run
  File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 926 in 
_bootstrap_inner
  File "/media/Daten/src/Python-3.7.4/Lib/threading.py", line 890 in _bootstrap

Current thread 0x7f9396eb5140 (most recent call first):
  File "/media/Daten/src/Python-3.7.4/Lib/test/test_concurrent_futures.py", 
line 917 in _fail_on_deadlock
  File "/media/Daten/src/Python-3.7.4/Lib/test/test_concurrent_futures.py", 
line 978 in test_crash
  File "/media/Daten/src/Python-3.7.4/Lib/unittest/case.py", line 628 in run
  File "/media/Daten/src/Python-3.7.4/Lib/unittest/case.py", line 676 in 
__call__
  File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 122 in run
  File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 84 in 
__call__
  File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 122 in run
  File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 84 in 
__call__
  File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 122 in run
  File "/media/Daten/src/Python-3.7.4/Lib/unittest/suite.py", line 84 in 
__call__
  File "/media/Daten/src/Python-3.7.4/Lib/test/support/testresult.py", line 162 
in run
  File "/media/Daten/src/Python-3.7.4/Lib/test/support/__init__.py", line 1915 
in _run_suite
  File "/media/Daten/src/Python-3.7.4/Lib/test/support/__init__.py", line 2011 
in run_unittest
  File "/media/Daten/src/Python-3.7.4/Lib/test/test_concurrent_futures.py", 
line 1245 in test_main
  File "/media/Daten/src/Python-3.7.4/Lib/test/support/__init__.py", line 2143 
in decorator
  File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 
228 in _runtest_inner2
  File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 
264 in _runtest_inner
  File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 
149 in _runtest
  File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/runtest.py", line 
187 in runtest
  File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 390 
in run_tests_sequential
  File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 488 
in run_tests
  File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 642 
in _main
  File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 588 
in main
  File "/media/Daten/src/Python-3.7.4/Lib/test/libregrtest/main.py", line 663 
in main
  File "/media/Daten/src/Python-3.7.4/Lib/test/regrtest.py", line 46 in _main
  File "/media/Daten/src/Python-3.7.4/Lib/test/regrtest.py", line 50 in 
  File "/media/Daten/src/Python-3.7.4/Lib/runpy.py", line 85 in _run_code
  File "/media/Daten/src/Python-3.7.4/Lib/runpy.py", line 193 in 
_run_module_as_main

test test_concurrent_futures failed
0:07:27 load avg: 2.55 [ 80/416] test_configparser -- test_concurrent_futures 
failed in 2 min 47 sec
0:07:29 load avg: 2.75 [ 81/416] test_contains


Commands executed for the build:

./configure --enable-optimizations --prefix=/opt/python-3.7.4
make -j8

--
components: Build
messages: 347908
nosy: Martin Bammer
priority: normal
severity: normal
status: open
title: test_concurrent_future failed
type: compile error
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



[issue34749] improve performance of binascii.a2b_base64()

2019-07-14 Thread miss-islington


miss-islington  added the comment:


New changeset 1c5e68e7145f0825f9b952389141edb9436eb43d by Miss Islington (bot) 
(Sergey Fedoseev) in branch 'master':
bpo-34749: Improved performance of binascii.a2b_base64(). (GH-9444)
https://github.com/python/cpython/commit/1c5e68e7145f0825f9b952389141edb9436eb43d


--
nosy: +miss-islington

___
Python tracker 

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



[issue25433] whitespace in strip()/lstrip()/rstrip()

2019-07-14 Thread Ulf Rompe


Change by Ulf Rompe :


--
pull_requests: +14569
pull_request: https://github.com/python/cpython/pull/14775

___
Python tracker 

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



[issue37226] Asyncio Fatal Error on SSL Transport - IndexError Deque Index Out Of Range

2019-07-14 Thread Maayan Keshet


Maayan Keshet  added the comment:

Hey Ben! Unfortunately our use case is too involved to distill into a neat 
example. We use a websocket library (autobahn) to connect to a server of a 3rd 
party which is outside our control (which is not written in python, but rather 
node.js). We receive the errors on our client.

--

___
Python tracker 

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



[issue21861] io class name are hardcoded in reprs

2019-07-14 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +14567
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14774

___
Python tracker 

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



[issue30757] pyinstaller can be added to docs, py2exe ref can be updated

2019-07-14 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

Please also add a reference to py2app (at least of the programming FAQ as 
py2app is macOS-only).

--
nosy: +ronaldoussoren

___
Python tracker 

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



[issue37583] Got a 113 error when running the test_socket

2019-07-14 Thread hai shi


hai shi  added the comment:

sure, i copied the full output of test_socket. more failed test case looks like 
need add two property functions.

--
Added file: https://bugs.python.org/file48480/test_socket_fail_info.txt

___
Python tracker 

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



[issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys

2019-07-14 Thread Arnold Dumas


Change by Arnold Dumas :


--
pull_requests: +14566
pull_request: https://github.com/python/cpython/pull/14773

___
Python tracker 

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



[issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time

2019-07-14 Thread miss-islington


miss-islington  added the comment:


New changeset c6b31061997526b31961ec34328408ca421f51fc by Miss Islington (bot) 
(Xtreak) in branch '3.7':
[3.7] bpo-37579: Improve equality behavior for pure Python datetime and time 
(GH-14726) (GH-14745)
https://github.com/python/cpython/commit/c6b31061997526b31961ec34328408ca421f51fc


--

___
Python tracker 

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



[issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time

2019-07-14 Thread Paul Ganssle


Change by Paul Ganssle :


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



[issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@

2019-07-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14565
pull_request: https://github.com/python/cpython/pull/14772

___
Python tracker 

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



[issue25433] whitespace in strip()/lstrip()/rstrip()

2019-07-14 Thread Ulf Rompe


Change by Ulf Rompe :


--
pull_requests: +14564
pull_request: https://github.com/python/cpython/pull/14771

___
Python tracker 

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



[issue21992] New AST node Else() should be introduced

2019-07-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue21992] New AST node Else() should be introduced

2019-07-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +inada.naoki, pablogsal, serhiy.storchaka

___
Python tracker 

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



[issue37583] Got a 113 error when running the test_socket

2019-07-14 Thread STINNER Victor


STINNER Victor  added the comment:

Can you copy/paste the full output of test_socket, or better: of the whole test 
suite? Put it in a file and attach it to the issue.

--

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-07-14 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

W.r.t. PyOS_CheckStack: I had that idea last year as well, and someone 
contributed a pull request, see issue33955.

--

___
Python tracker 

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



[issue37570] [Windows] distutils.util.byte_compile() fails indirect byte compiling with non-ASCII full-path

2019-07-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +inada.naoki

___
Python tracker 

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



[issue37570] [Windows] distutils.util.byte_compile() fails indirect byte compiling with non-ASCII full-path

2019-07-14 Thread STINNER Victor


Change by STINNER Victor :


--
title: `distutils.util.byte_compile` fails indirect byte compiling with 
non-ASCII full-path. -> [Windows] distutils.util.byte_compile() fails indirect 
byte compiling with non-ASCII full-path

___
Python tracker 

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



[issue37565] test_faulthandler failure

2019-07-14 Thread STINNER Victor


STINNER Victor  added the comment:

> I found a similar error reported in RedHat bugzilla (1687171) and tried 
> running the script provided by Victor Stinner

Link: https://bugzilla.redhat.com/show_bug.cgi?id=1687171

> and this closed issue on GitHub seems like it might be related?
#32 because of the Skylake chipset.

I guess that you mean: https://github.com/vstinner/faulthandler/issues/36

--

___
Python tracker 

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



[issue37565] test_faulthandler failure

2019-07-14 Thread STINNER Victor


STINNER Victor  added the comment:

I don't know why you get a crash. Can you try attached sigusr1.py script? 
Expected output:

$ python3 sigusr1.py 
called True

--
Added file: https://bugs.python.org/file48479/sigusr1.py

___
Python tracker 

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



[issue37551] IDLE: Quitting with a new, unsaved editor window causes an exception

2019-07-14 Thread Tal Einat


Tal Einat  added the comment:

This also happens on Ubuntu 18.10, with a traceback similar to that reported on 
issue #37524:

Exception ignored in: 
Traceback (most recent call last):
  File "Lib/idlelib/run.py", line 488, in close
  File "Lib/idlelib/pyshell.py", line 1017, in close
  File "Lib/idlelib/editor.py", line 1019, in close
  File "Lib/idlelib/outwin.py", line 94, in maybesave
  File "Lib/idlelib/editor.py", line 952, in get_saved
AttributeError: 'NoneType' object has no attribute 'get_saved'

--

___
Python tracker 

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



[issue37549] os.dup() fails for standard streams on Windows 7

2019-07-14 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +lukasz.langa, ned.deily
priority: normal -> release blocker

___
Python tracker 

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



[issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699)

2019-07-14 Thread Larry Hastings

Larry Hastings  added the comment:


New changeset afe3a4975cf93c97e5d6eb8800e48f368011d37a by larryhastings (Miro 
HronĨok) in branch '3.5':
bpo-30458: Disallow control chars in http URLs. (GH-12755) (#13207)
https://github.com/python/cpython/commit/afe3a4975cf93c97e5d6eb8800e48f368011d37a


--

___
Python tracker 

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



[issue32381] Python 3.6 cannot reopen .pyc file with non-ASCII path

2019-07-14 Thread STINNER Victor


STINNER Victor  added the comment:

Hum. In fact, this problem can be fixed differently: modify PyRun_xxx() 
functions to pass the filename as an Unicode string. Maybe pass it as a 
wchar_t* string or even a Python str object.

--

___
Python tracker 

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



[issue22121] Start IDLE from icon in a better place.

2019-07-14 Thread Steve Dower


Steve Dower  added the comment:

> NameError: name 'get_default_location' is not defined

Also, this was a hypothetical function that you would implement in IDLE to 
determine whatever the default location ought to be. I'm personally happy to 
stay out of that part of the argument.

--

___
Python tracker 

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



[issue22121] Start IDLE from icon in a better place.

2019-07-14 Thread Steve Dower


Steve Dower  added the comment:

> Steve, there is a problem in both lines of this suggestion.

The only problem is that you ran from your own build. Once running from an 
installed layout (which you can now easily generate with `python.bat PC\layout 
--preset-default --copy `), the comparison will be fine.

I think it's fair to assume that the new users we are concerned about are *not* 
building Python from source :)

Otherwise, there's still my suggestion of a command line option to specify the 
start directory - e.g. --start-in-home - that we can put into the shortcut so 
it only affects GUI launches and not command line launches. (Though this idea 
may not be possible with the Store package, as the shortcut is the same for 
both Start and command line.)

Besides those two options, I don't know of another way to make this work. So we 
either need to choose one of them, choose not to fix it, or wait for someone to 
come up with something new.

--

___
Python tracker 

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



[issue37559] IDLE: Scrolling issues with code context shown

2019-07-14 Thread Tal Einat


Tal Einat  added the comment:

> One way to prevent the bouncing is to fix the CC height, like it used to be.

+1 from me.  I find this behavior very distracting and unnatural.

I suggest we do consider reverting rather than adding another config value 
(minimum context lines), working towards our goal of simplicity and 
friendliness to novices and new users.

--

___
Python tracker 

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



[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread Steve Dower


Steve Dower  added the comment:

The commit to master succeeded, but we missed the bpo number in the message, 
which is why it didn't appear here.

--

___
Python tracker 

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



[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread Steve Dower


Change by Steve Dower :


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



[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread Steve Dower


Steve Dower  added the comment:


New changeset 7a430109b983806c57babf229c60d0245d0b541c by Steve Dower (Miss 
Islington (bot)) in branch '3.8':
bpo-37590: Remove redundant docs of PyEval_EvalFrameEx (GH-14765)
https://github.com/python/cpython/commit/7a430109b983806c57babf229c60d0245d0b541c


--

___
Python tracker 

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



[issue37559] IDLE: Scrolling issues with code context shown

2019-07-14 Thread Tal Einat


Tal Einat  added the comment:

Regarding point #4, scrolling by dragging the scrollbar, note that the current 
PR for adding line numbers (GH-14030) does effectively the same when dragging 
on the line numbers to select lines.  Therefore, if/when that PR is merged, 
this will become more common.

--

___
Python tracker 

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



[issue36044] PROFILE_TASK for PGO build is not a good workload

2019-07-14 Thread Steve Dower


Steve Dower  added the comment:

Looking at PR 14702, I would much rather update what `-m test --pgo` does than 
make this exclusive to Makefile.

Back when we added the --pgo flag, the intent was always to move toward an 
equivalently good profile, but for practical reasons we settled at the time for 
"skip tests that break PGO".

I know that will make the change far more skips throughout the test suite, so 
perhaps we want to change how --pgo works completely, but it would certainly be 
better to make --pgo do what it advertises than have multiple lists of PGO 
profiles.

--
nosy: +steve.dower

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-07-14 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've done some more testing, and the thread stack size could be smaller than 
16MB, but definitely not as small as the value that's currently in 
thread_pthread.h.

I prefer to have a slightly too large value here because IIRC the relation 
between the recursion limit and C stack usage is a heuristic. 

BTW. It should be possible to implement PyOS_CheckStack() on macOS. There are 
(undocumented) APIs in the public header files to get the stack base and size 
for the current thread. These APIs also work for the main thread:

# ---

#include 
#include 

int main(void)
{
printf("%#lx\n", (long)pthread_get_stacksize_np(pthread_self()));
printf("%p\n", pthread_get_stackaddr_np(pthread_self()));
}

# ---

--

___
Python tracker 

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



[issue37553] SendfileUsingSendTest tests timeout too short for Windows ARM32

2019-07-14 Thread Steve Dower


Steve Dower  added the comment:


New changeset 52c8c090870c4e45dc48d1991d7ef7de2e40b2a8 by Steve Dower (Paul 
Monson) in branch 'master':
bpo-37553: SendfileUsingSendTest tests timeout too short for Windows ARM32 
(GH-14716)
https://github.com/python/cpython/commit/52c8c090870c4e45dc48d1991d7ef7de2e40b2a8


--

___
Python tracker 

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



[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread hai shi


hai shi  added the comment:

Thanks, Steve

--

___
Python tracker 

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



[issue37524] IDLE error on closing 3.8+ debug build

2019-07-14 Thread Tal Einat


Tal Einat  added the comment:

> Doesn't reproduce on Win10 with current master.

Sorry, my mistake; I meant to post that on #37551, and got mixed up.

--

___
Python tracker 

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



[issue37571] Incorrect use of c_char_p in example code

2019-07-14 Thread miss-islington


miss-islington  added the comment:


New changeset 13c89f3c876363c44d35ec5f8dc374aecbca62a1 by Miss Islington (bot) 
in branch '3.7':
bpo-37571: Remove extra space in ctypes docs (GH14764)
https://github.com/python/cpython/commit/13c89f3c876363c44d35ec5f8dc374aecbca62a1


--

___
Python tracker 

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



[issue37551] IDLE: Quitting with a new, unsaved editor window causes an exception

2019-07-14 Thread Tal Einat


Tal Einat  added the comment:

Doesn't reproduce on Win10 with current master.

--

___
Python tracker 

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



[issue37571] Incorrect use of c_char_p in example code

2019-07-14 Thread miss-islington


miss-islington  added the comment:


New changeset 4f733f48b48735231b79cd0f6605d3d0a2d5b511 by Miss Islington (bot) 
in branch '3.8':
bpo-37571: Remove extra space in ctypes docs (GH14764)
https://github.com/python/cpython/commit/4f733f48b48735231b79cd0f6605d3d0a2d5b511


--

___
Python tracker 

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



[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14563
pull_request: https://github.com/python/cpython/pull/14768

___
Python tracker 

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



[issue37590] Remove redundant docs of PyEval_EvalFrameEx

2019-07-14 Thread Steve Dower


Steve Dower  added the comment:

I agree. This isn't important information for the documentation anyway.

--
nosy: +steve.dower
versions: +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



[issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@

2019-07-14 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 4655d576141ee56a69d2052431c636858fcb916a by larryhastings (Steve 
Dower) in branch '3.5':
bpo-36742: Fixes handling of pre-normalization characters in urlsplit() 
(GH-13017) (#13042)
https://github.com/python/cpython/commit/4655d576141ee56a69d2052431c636858fcb916a


--

___
Python tracker 

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



[issue37571] Incorrect use of c_char_p in example code

2019-07-14 Thread Steve Dower


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



[issue37571] Incorrect use of c_char_p in example code

2019-07-14 Thread Steve Dower


Steve Dower  added the comment:


New changeset 68c74d05c1fdaf59d8711431884af975ac2ac5f8 by Steve Dower in branch 
'master':
bpo-37571: Remove extra space in ctypes docs (GH14764)
https://github.com/python/cpython/commit/68c74d05c1fdaf59d8711431884af975ac2ac5f8


--

___
Python tracker 

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



[issue37571] Incorrect use of c_char_p in example code

2019-07-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14562
pull_request: https://github.com/python/cpython/pull/14767

___
Python tracker 

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



[issue37571] Incorrect use of c_char_p in example code

2019-07-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14561
pull_request: https://github.com/python/cpython/pull/14766

___
Python tracker 

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



  1   2   >