[issue18911] minidom does not encode correctly when calling Document.writexml

2019-06-01 Thread Stefan Behnel


Change by Stefan Behnel :


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



[issue21109] tarfile: Traversal attack vulnerability

2019-06-01 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 4a686504eb2bbf69adf78077458508a7ba131667 by Raymond Hettinger 
(Yash Aggarwal) in branch 'master':
bpo-35431: Implemented math.comb (GH-11414)
https://github.com/python/cpython/commit/4a686504eb2bbf69adf78077458508a7ba131667


--

___
Python tracker 

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



[issue37120] Provide knobs to disable session ticket generation on TLS 1.3

2019-06-01 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Leaving this open for a while in case there is more work that needs to be done 
or any further comments to be resolved.

--
assignee:  -> rhettinger

___
Python tracker 

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



[issue37120] Provide knobs to disable session ticket generation on TLS 1.3

2019-06-01 Thread Christian Heimes


Christian Heimes  added the comment:

+1 for the idea

Yes, for simple flags and settings, an attribute on the SSLContext is prefer. 
The SSLContext object is the configuration space for its connections. I would 
prefer to keep the setting only on the context and not clutter SSLSocket and 
SSLObject with additional attributes. PR 13719 goes one step further and 
restricts the setter to a PROTOCOL_TLS_SERVER, too.

Let's look in the callback another time. I won't be able to come up with a 
wrapper for that in the next three days.

--

___
Python tracker 

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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-06-01 Thread jpic


jpic  added the comment:

The email API does error recovery without loading invalid domains into
the domain variable which could lead to dangerous situations, example
with "a@foo.":

>>> email.message_from_string('From: 
>>> a@foo.',policy=email.policy.default)['from'].addresses[0].domain
''

In perspective with the new patch proposed by maxking that lets an
invalid domain make it to the domain variable:

>>> email.message_from_string('From: 
>>> a@b...@c.com',policy=email.policy.default)['from'].addresses[0].domain
'b...@c.com'

For me maxking's suggestion opens the question of where to draw the
line between invalid domains should be loaded into the domain variable
and what invalid domains should not be loaded into the domain
variable.

Another smaller advantage of of Go's net/mail behaviour is that
results between parseaddr and email are consistently empty strings for
an invalid domain: parseaddr does not seem able to return a list of
defects.

--

___
Python tracker 

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



[issue21872] LZMA library sometimes fails to decompress a file

2019-06-01 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue29984] Improve test coverage for 'heapq' module

2019-06-01 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



[issue37116] Use PEP 570 syntax for positional-only parameters

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 2085bd0877e17ad4d98a4586d5eabb6faecbb190 by Serhiy Storchaka in 
branch 'master':
bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)
https://github.com/python/cpython/commit/2085bd0877e17ad4d98a4586d5eabb6faecbb190


--

___
Python tracker 

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



[issue37117] Simplify customization of the logging time through datefmt

2019-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:

> AFAIK, the converter attribute is only to "be set" with a function of such 
> signature. It is not documented that it can be used and it is only used on 
> the format time function.

What do you mean by "it is not documented"? It is documented here:

https://docs.python.org/3/library/logging.html#logging.Formatter.formatTime

See also questions on Stack Overflow relating to it:

https://stackoverflow.com/search?q=%5Bpython%5D+%5Blogging%5D+converter

Not sure what you mean by "only to be set". Obviously, it is also read 
*somewhere* - otherwise why would you set it?

> The only situation where this might break someone is if they inherit from 
> formatter, substitute the formatTime function by their own implementation and 
> rely on the function returning a time tuple. Doing that is relying on the 
> implementation of the formatter though, as the docs explain is just something 
> to be set.

But the converter is documented as returning a time tuple, and there 
conceivably exists code that relies on that. There is no reason why someone 
couldn't have implemented a Formatter subclass with an overridden formatTime 
method that assumes the converter returns a time tuple. We can't know the 
impact of this change in terms of the number of people/amount of software 
affected, but that it might break *someone's* code is IMO enough reason not to 
proceed with it.

> Note how you need to split the formatting of time into two different parts.

It's still a one-liner both ways in your example - just a slightly different 
format string. Also, note that %f doesn't give you all that much flexibility - 
you get six places whether you like it or not. So it's hardly something which 
will meet everybody's formatting requirements. So "hey, just use datefmt" won't 
cut it for all scenarios. Ditto for timezone display - there is a school of 
thought that says logs should only hold UTC time. Users can always override 
formatTime in their Formatter subclass to do exactly what they want - it could 
be a one-time thing that they can then use wherever they want.

I don't want to give the impression that I'm against *any* change - I'm not. 
You can see lots of changes in the logging codebase contributed by various 
people. A recent example in the area of logging Formatter is

https://github.com/python/cpython/pull/9703

So by all means I welcome contributions, but you might find me a bit more 
conservative than you would like!

--

___
Python tracker 

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



[issue36813] QueueListener not calling task_done upon termination

2019-06-01 Thread miss-islington


miss-islington  added the comment:


New changeset 6b282e18877ec84e927b381b4ce187eaf4ba3dd7 by Miss Islington (bot) 
(Bar Harel) in branch 'master':
bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)
https://github.com/python/cpython/commit/6b282e18877ec84e927b381b4ce187eaf4ba3dd7


--
nosy: +miss-islington

___
Python tracker 

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



[issue36813] QueueListener not calling task_done upon termination

2019-06-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13608
pull_request: https://github.com/python/cpython/pull/13722

___
Python tracker 

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



[issue36813] QueueListener not calling task_done upon termination

2019-06-01 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue36813] QueueListener not calling task_done upon termination

2019-06-01 Thread miss-islington


miss-islington  added the comment:


New changeset f286e0373feda0955c910a9fe4ef99cd2c40969e by Miss Islington (bot) 
in branch '3.7':
bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)
https://github.com/python/cpython/commit/f286e0373feda0955c910a9fe4ef99cd2c40969e


--

___
Python tracker 

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



[issue36027] Support negative exponents in pow() where a modulus is specified.

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

I think GH-13266 is ready to go, but I'd appreciate a second pair of eyes on it 
if anyone has time.

--

___
Python tracker 

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



[issue37117] Simplify customization of the logging time through datefmt

2019-06-01 Thread Mario Corchero


Mario Corchero  added the comment:

> What do you mean by "it is not documented"? It is documented here:

As it says:

"This function uses a user-configurable function to convert the creation time 
to a tuple. By default, time.localtime() is used; to change this for a 
particular formatter instance, set the converter attribute to a function with 
the same signature as time.localtime() or time.gmtime(). To change it for all 
formatters, for example if you want all logging times to be shown in GMT, set 
the converter attribute in the Formatter class." I assumed it means users can 
set such attribute but not something in the formatter class where people will 
do formatter.converter(xyz). If the intention was for users to also be able to 
use the converter attribute then I misunderstood that.

> Obviously, it is also read *somewhere* - otherwise why would you set it?

The implementation of formatTime uses it only at the moment.

> See also questions on Stack Overflow relating to it: 
> https://stackoverflow.com/search?q=%5Bpython%5D+%5Blogging%5D+converter

Through all the questions and answers in stackoverflow they are all setting the 
converter (which will still work) and some (2 I think) only are reading it when 
they are also setting it in the class (Example: 
https://stackoverflow.com/questions/6290739/python-logging-use-milliseconds-in-time-format/6290946#6290946,
 which by chance is effectively trying to solve the same problem brought up 
here).

> But the converter is documented as returning a time tuple,

It just says "set the converter attribute to a function with the same signature 
as time.localtime() or time.gmtime()" there is no reference to what the default 
value has, it could even be None when user is reading it. Of course, you wrote 
it hehe, so if you say the intent is for people to use the default formatter 
that is a different thing :).

>  but that it might break *someone's* code is IMO enough reason not to proceed 
> with it.

I looked hard and could not find any of those in Github (it does not mean that 
there are none indeed). I would agree on not releasing this as a patch release, 
but as part of a new minor I would argue that it is fair. From my point of 
view, it only breaks people depending on the implementation of it and using the 
formatter in a not common way (at least from what was seen in stackoverflow and 
github, there is also no cookbook that recommends doing anything like that).

> It's still a one-liner both ways in your example

Yeah but it requires to deeply understand how Formatter is formatting time 
rather than just using a template.

> Users can always override formatTime in their Formatter subclass to do 
> exactly what they want - it could be a one-time thing that they can then use 
> wherever they want

They need to copy paste this code around on all their scripts/apps or create 
their own library to include this.

> I don't want to give the impression that I'm against *any* change - I'm not

Don't worry, I can totally understand :), if you still think it is not worth 
pursuing this feel free to close the issue. It was an idea I thought it was 
worth pushing but it is totally your call (I won't take it at all personal ^^). 
Thanks for taking the time to answer!

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

Thanks, Raymond. I'm planning to do a post-merge review and test this weekend.

--

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:

> This seems like an attempt at victim blaming.

Er, no, it was a straight question about whether you'd read the documentation.

> I'm afraid this line of reasoning is suffering from selection bias, cherry 
> picking, confirmation bias, and probably some others too.

Er, no, it was stating that lots of people have successfully used logging on 
Windows with utf-8, as a way of justifying my opinion that there's no 
deficiency here that needs addressing.

> Sure "stream" is on there, but then you need to know about streams and make 
> the association with logging which I apparently don't. You have to remember 
> not everyone has your level of proficiency in the language. In fact, most 
> Python users don't.

Sure, and that's fine. Experienced developers learn stuff every day too. But 
responding to issues takes time (notice how many people will have been notified 
about this issue from the "nosy list" above; each would have to spend at least 
some time looking at it), so raising issues should be done only after 
exhausting other resources to make sure that the problem isn't in one's own 
level of knowledge or understanding, but an actual problem with the software. 
This is why I earlier suggested Stack Overflow and python-list as useful 
resources for improving one's knowledge and understanding.

> Lets put this another way - is there a reason NOT to have Unicode logging as 
> the default?

I have no idea what you mean by this. As my example illustrated, it's quite 
easy to log Unicode in log files.

A simple Internet search for "basicConfig encoding" yields for me as the second 
result this Stack Overflow question

https://stackoverflow.com/questions/21402530

for which the accepted answer is a slight variation on what I suggested earlier.

--

___
Python tracker 

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



[issue37117] Simplify customization of the logging time through datefmt

2019-06-01 Thread Vinay Sajip


Change by Vinay Sajip :


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



[issue36461] timeit: Additional changes for autorange

2019-06-01 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Sorry for the late reply.

> Just a question: why we need to check ``if number == 0:``? In the 
> proposal you asked for None too. What changed? Even if the function is 
> called with False, will it hurts to keep the default value?

Fair question. On rethinking, I'm okay with an explicit check for None 
or zero, ``if number is None or number < 0`` but I don't like the idea 
of accepting *any* falsey value.

Calling the function with False is fine, since False == 0 but I don't 
think it is fine to call the function with (say) [] or {} or "", which 
are all falsey values.

--

___
Python tracker 

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



[issue36461] timeit: Additional changes for autorange

2019-06-01 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

> ``if number is None or number < 0``

Sorry, that should be number == 0

--

___
Python tracker 

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



[issue36411] Python 3 f.tell() gets out of sync with file pointer in binary append+read mode

2019-06-01 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-06-01 Thread Inada Naoki


Inada Naoki  added the comment:

On Sat, Jun 1, 2019 at 2:47 AM Brett Cannon  wrote:
>
> Brett Cannon  added the comment:
>
> RE: "I think it needs significant benefits for typical users, not only for 
> Instagram. If only Instagram get benefit from this, keep it as Instagram's 
> internal patch."
>
> But who's typical in this case? You? Me? We're talking code objects, 
> something that the typical Python user doesn't even know exists if you take 
> "typical" to mean "common" or "majority". I suspect if we asked Python 
> developers if they knew what lnotab was an abbreviation of they wouldn't 
> know, let alone how it worked.
>
> And just because Instagram did this work and is making it public doesn't mean 
> (a) others wouldn't use it or (b) others are already doing it privately. 
> There are plenty of other companies with massive server installs of Python 
> beyond Instagram.
>
> My point is we have to be very careful when we start to claim we know what is 
> typical or useful to the wider community considering how huge and diverse the 
> Python community is.
>

I'm sorry for bad word choice.  I didn't mean "majority" or "common".
For example, I was +1 for gc.freeze(), even if majority users doesn't use it.

My point is (a) it's very hard others utilize it, and (b) it's very
hard others confirm the benefit.

And I suspect that Dino's estimation is wrong, but no one can verify
the estimation
because he didn't show enough concrete information.

Elaborately speaking,

* They need to use custom importer and serializer other than marshal
to import code objects.
* They need to use lightweight object for buffer.  At least,
memoryview object is large (192byte
  on Python 3.7.3 amd64).

Even if Instaram can not open source their import system, they can be
show more concrete
data.  For example, their this [1] report is very good at considering
gc.freeze().

[1] 
https://instagram-engineering.com/dismissing-python-garbage-collection-at-instagram-4dca40b29172

While I agree that mmap pyc files is interesting idea, I feel allowing
buffer object for co_code
is wrong way to achieve it (*).  But there are no enough data to
discuss the benefit.

Current status is Dino claims this idea have benefit in Instagram, but
no one can confirm the benefit.
I think we shouldn't discuss without reliable or reproducible data for
this type of proposal.

(*) One possible idea is code object have just a pointer and length
for co_code, and reference to
   object who owns the data (mmaped file).  code object can load
co_lnotab and docstring lazily too.

--

___
Python tracker 

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



[issue36984] typing docs "versionadded" is inaccurate for many attributes

2019-06-01 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
nosy: +levkivskyi

___
Python tracker 

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



[issue35849] Added thousands separators to Lib/pstats.py final report

2019-06-01 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

For reference, issue24084 is about increasing the size of the quicker timings.  
Both projects change the layout.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Yash Aggarwal


Yash Aggarwal  added the comment:

Thanks @rhettinger for cleaning up the code and closing the pr. I didn't get 
what you meant by long, and sorry for not being much active as well. I am stuck 
with a pretty time consuming internship.

--
versions: +Python 3.6 -Python 3.8

___
Python tracker 

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



[issue37101] Filterer.filter can be rewritten using built-ins just as efficient much more readable

2019-06-01 Thread Dale Visser


Dale Visser  added the comment:

I've learned a lot about the performance trade-offs of generator expressions. 
The only way of shortening this code (readability is subjective) that I've 
found not to negatively impact performance is this:

def filter(self, record):
rv = True
for f in self.filters:
if not getattr(f, 'filter', f)(record):
rv = False
break
return rv

--

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> * They need to use lightweight object for buffer.  At least,
> memoryview object is large (192byte
>  on Python 3.7.3 amd64).

Actually it is larger, because you should add the size of internal objects. In 
3.8:

>>> sys.getsizeof(memoryview(b''))
184
>>> sys.getsizeof(gc.get_referents(memoryview(b''))[0])
128

312 bytes total, not counting padding. The average size of co_code in Lib/*.py 
is 85 bytes. Unless Instagram uses gigantic functions and methods (and no 
comprehensions or lambdas), the net benefit will be negative.

--

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The size of the code object is at least 144 bytes.

>>> def f(): pass
... 
>>> sys.getsizeof(f.__code__)
144

If the function uses parameters, variables or constants (and you cannot do much 
useful without using them), their size should be added too. It overwhelms the 
size of the raw bytecode.

--

___
Python tracker 

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



[issue37121] 'ა'.upper() should return 'ა'

2019-06-01 Thread Lasha Gogua

New submission from Lasha Gogua :

Python's .upper() string method still translates Georgian characters this to 
"'Ა'" which is not right

Python 3.7.3 (default, May 11 2019, 00:45:16) 
[GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 'ა'
'ა'
>>> 'ა'.upper()
'Ა'
>>> print('ა'.upper())
Ა
>>> 

and it works in Python 3.6.x and below

Python 3.6.3 (default, Jan  4 2018, 16:40:53) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 'ა'
'ა'
>>> 'ა'.upper()
'ა'
>>> print('ა'.upper())
ა
>>> 

now i have found the solution but is it correct? What's changed in the new 
version (Python 3.7.x)?

Python 3.7.3 (default, May 11 2019, 00:45:16) 
[GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print('ა'.upper())
Ა
>>> print('ა'.encode().upper().decode())
ა
>>> print('ა'.encode('utf-8').upper().decode('utf-8'))
ა
>>>

--
components: Unicode
messages: 344174
nosy: Lasha Gogua, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: 'ა'.upper() should return 'ა'
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue37121] 'ა'.upper() should return 'ა'

2019-06-01 Thread SilentGhost


SilentGhost  added the comment:

What changed was that python 3.7 is using Unicode 11 standard, which has 
introduced changes for Georgian script. See "Casing Issues" under 
https://www.unicode.org/versions/Unicode11.0.0/#Migration

The Python is correctly implements the standard.

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +13609
pull_request: https://github.com/python/cpython/pull/13725

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 13725 is a technical fix/optimization/cleanup. Later we can apply 
algorithmic optimization.

--

___
Python tracker 

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



[issue36612] Unittest document is not clear on SetUpClass calls

2019-06-01 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

@xtreak or @lisroach, any thoughts?  Thanks!

--
nosy: +cheryl.sabella, lisroach, xtreak

___
Python tracker 

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



[issue37122] Make co->co_argcount represent the total number of positional arguments in the code object

2019-06-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

Originally proposed in:

https://mail.python.org/pipermail/python-dev/2019-June/157812.html

--
components: Interpreter Core
messages: 344178
nosy: pablogsal, scoder, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Make co->co_argcount represent the total number of positional arguments 
in the code object
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



[issue37122] Make co->co_argcount represent the total number of positional arguments in the code object

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue31968] exec(): method's default arguments from dict-inherited globals

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d by Raymond Hettinger 
(Anthony Shaw) in branch 'master':
bpo-31968: Documentation -- add clarification on the globals dict for exec() 
(GH-13140)
https://github.com/python/cpython/commit/059b9ea5ac98f432e41b05d1fa5aab4ffa22df4d


--
nosy: +rhettinger

___
Python tracker 

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



[issue31968] exec(): method's default arguments from dict-inherited globals

2019-06-01 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue37123] test_multiprocessing fails randomly on Windows

2019-06-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/58/builds/2539
https://buildbot.python.org/all/#/builders/58/builds/2539

Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", 
line 327, in test_multiprocessing
out, err = check_output([envpy, '-c',
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", 
line 42, in check_output
raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command 
'['d:\\temp\\tmp_qt0ywa6\\Scripts\\python_d.exe', '-c', 'from multiprocessing 
import Pool; print(Pool(1).apply_async("Python".lower).get(3))']' returned 
non-zero exit status 3221225477.



==
FAIL: test_mymanager (test.test_multiprocessing_spawn.WithManagerTestMyManager)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 2806, in test_mymanager
self.assertEqual(manager._process.exitcode, 0)
AssertionError: -15 != 0
--

--
messages: 344180
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_multiprocessing fails randomly on Windows

___
Python tracker 

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



[issue36993] zipfile: tuple IndexError on extract

2019-06-01 Thread Berker Peksag


Berker Peksag  added the comment:

This report is valid. Serhiy has improved error reporting of the extra field in 
feccdb2a249a71be330765be77dee57121866779.

counts can indeed be an empty tuple:

elif ln == 0:
counts = ()

If I'm reading section 4.5.3 of 
https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT correctly, I think 
we need to raise BadZipFile if ln == 0.

--
components: +Library (Lib)
nosy: +berker.peksag, serhiy.storchaka
resolution: not a bug -> 
stage: resolved -> needs patch
status: closed -> open
type:  -> behavior
versions:  -Python 3.6

___
Python tracker 

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



[issue36993] zipfile: tuple IndexError on extract

2019-06-01 Thread Berker Peksag


Change by Berker Peksag :


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

___
Python tracker 

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



[issue37124] test_msilib is potentially leaking references and memory blocks

2019-06-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

BUILDBOT FAILURE REPORT
===

Builder name: AMD64 Windows8.1 Refleaks 2.7
Builder url: https://buildbot.python.org/all/#/builders/33/
Build url: https://buildbot.python.org/all/#/builders/33/builds/604

Failed tests




Test leaking resources
--

- test_msilib is leaking references


Build summary
-

== Tests result: FAILURE then FAILURE ==

360 tests OK.

10 slowest tests:
- test_bsddb3: 4042.9s
- test_mmap: 434.0s
- test_multiprocessing: 313.8s
- test_shelve: 246.5s
- test_mailbox: 239.3s
- test_ssl: 227.2s
- test_lib2to3: 135.6s
- test_largefile: 131.5s
- test_decimal: 126.0s
- test_urllib2_localnet: 122.6s

1 test failed:
test_msilib

42 tests skipped:
test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl
test_commands test_crypt test_curses test_dbm test_dl test_epoll
test_fcntl test_fork1 test_gdb test_gdbm test_gl test_grp
test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos
test_macostools test_mhlib test_nis test_openpty test_ossaudiodev
test_pipes test_poll test_posix test_pty test_pwd test_readline
test_resource test_scriptpackages test_spwd test_sunaudiodev
test_threadsignals test_wait3 test_wait4 test_zipfile64
2 skips unexpected on win32:
test_gdb test_readline

1 re-run test:
test_msilib

Total duration: 1 hour 20 min


Tracebacks
--



Current builder status
--

The builder is failing currently

Commits
---



Other builds with similar failures
--

-  https://buildbot.python.org/all/#/builders/80/builds/608
-  https://buildbot.python.org/all/#/builders/132/builds/505

--
components: Tests
messages: 344182
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_msilib is potentially leaking references and memory blocks
type: behavior
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue37124] test_msilib is potentially leaking references and memory blocks

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +steve.dower

___
Python tracker 

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



[issue37124] test_msilib is potentially leaking references and memory blocks

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is likely to be caused by: 

https://github.com/python/cpython/pull/13688

--

___
Python tracker 

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



[issue36992] zipfile: AttributeError on extract (LZMA)

2019-06-01 Thread Berker Peksag


Berker Peksag  added the comment:

This is a duplicate of issue 36991 and will be fixed by the same PR.

--
nosy: +berker.peksag
resolution: not a bug -> duplicate
superseder:  -> zipfile: AttributeError on extract

___
Python tracker 

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



[issue37125] math.comb is leaking references

2019-06-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

./python Lib/test/bisect_cmd.py test_math -R 2:2

...

WARNING: Running tests with --huntrleaks/-R and less than 3 warmup repetitions 
can give false positives!
Run tests sequentially
0:00:00 load avg: 1.32 [1/1] test_math
beginning 4 repetitions
1234

test_math leaked [12352, 12352] references, sum=24704
test_math leaked [1, 1] memory blocks, sum=2
test_math failed

== Tests result: FAILURE ==

1 test failed:
test_math

Total duration: 663 ms
Tests result: FAILURE
ran 1 tests/2
exit 2
Tests failed: continuing with this subtest

Tests (1):
* test.test_math.IsCloseTests.testComb

Bisection completed in 13 iterations and 0:00:11

--
components: Interpreter Core, Tests
messages: 344185
nosy: pablogsal, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: math.comb is leaking references
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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

math.comb is leaking, I opened https://bugs.python.org/issue37125 to track it.

--
nosy: +pablogsal

___
Python tracker 

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



[issue36976] email: AttributeError

2019-06-01 Thread Berker Peksag


Change by Berker Peksag :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Certain Malformed email causes email.parser to throw 
AttributeError

___
Python tracker 

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



[issue37125] math.comb is leaking references

2019-06-01 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

It seems that https://github.com/python/cpython/pull/13725 fixes the leak:

❯ ./python -m test test_math -R :
Run tests sequentially
0:00:00 load avg: 1.55 [1/1] test_math
beginning 9 repetitions
123456789
.

== Tests result: SUCCESS ==

1 test OK.

Total duration: 26 sec 283 ms
Tests result: SUCCESS

--

___
Python tracker 

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



[issue37123] test_multiprocessing fails randomly on Windows

2019-06-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I couldn't find the traceback for test_venv in the buildbot logs. They were 
skipped and fixed as part of issue35978.

--
components: +Tests
nosy: +xtreak
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



[issue37123] test_multiprocessing fails randomly on Windows

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Sorry, I posted the same link twice. Here is the test_venv failure:

https://buildbot.python.org/all/#/builders/58/builds/2538

--

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/1/builds/601

OK (skipped=1)
.
test_threading leaked [9770, 9772, 9768] references, sum=29310
test_threading leaked [3960, 3961, 3959] memory blocks, sum=11880
2 tests failed again:
test_asyncio test_threading

--
components: Tests
messages: 344191
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_threading is leaking references
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



[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Can this move forward now?

--
nosy: +rhettinger

___
Python tracker 

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



[issue37122] Make co->co_argcount represent the total number of positional arguments in the code object

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset cd74e66a8c420be675fd2fbf3fe708ac02ee9f21 by Pablo Galindo in 
branch 'master':
bpo-37122: Make co->co_argcount represent the total number of positonal 
arguments in the code object (GH-13726)
https://github.com/python/cpython/commit/cd74e66a8c420be675fd2fbf3fe708ac02ee9f21


--

___
Python tracker 

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



[issue37122] Make co->co_argcount represent the total number of positional arguments in the code object

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue36993] zipfile: tuple IndexError on extract

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is not enough. IndexError can be raised for ln == 8 or 16 when file_size, 
compress_size and header_offset are all set to 0x.

--

___
Python tracker 

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



[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2019-06-01 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue33346] Syntax error with async generator inside dictionary comprehension

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ping, should we include this in beta1 or as is a "bugfix" this can be 
backported?

--

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

❯ ./python -m test test_threading -m test_excepthook_thread_None -R :
Run tests sequentially
0:00:00 load avg: 1.38 [1/1] test_threading
beginning 9 repetitions
123456789
.
test_threading leaked [364, 364, 364, 364] references, sum=1456
test_threading leaked [164, 164, 164, 164] memory blocks, sum=656
test_threading failed

== Tests result: FAILURE ==

1 test failed:
test_threading

Total duration: 159 ms
Tests result: FAILURE

--

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: normal -> high

___
Python tracker 

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



[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE

2019-06-01 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +13612
pull_request: https://github.com/python/cpython/pull/13728

___
Python tracker 

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



[issue37125] math.comb is leaking references

2019-06-01 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue36993] zipfile: tuple IndexError on extract

2019-06-01 Thread Berker Peksag


Berker Peksag  added the comment:

@alter-bug-tracer, could you please create test files for the cases Serhiy has 
just mentioned?

--

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The problem here is that there is a reference cycle with 
threading.ExceptHookArgs but structseq objects are not tracked by the GC.

--

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Jonathan


Jonathan  added the comment:

> I have no idea what you mean by this.

I don't see how I can be clearer. What are the reasons for NOT implementing 
logging to file be unicode as a default? Logging to screen is unicode as a 
default. What are the reasons for not wanting consistency?

> A simple Internet search for "basicConfig encoding" yields for me as the 
> second result this Stack Overflow question 

Indeed, and it was from that question I got my solution in fact. The problem 
was the 30-60 minutes I wasted before that trying to figure out why my program 
was crashing and why it was only crashing *sometimes*. I'd written the logging 
part of the program a year ago and not really touched it since, so the logging 
module being a possible culprit was not even in my mind when the program 
crashed.

> As my example illustrated, it's quite easy to log Unicode in log files.

Yes, things are easy when you know it's necessary. It's the process of 
discovery that's an unnecessary waste of people's time. That's why I raised 
this and that's why I would consider this a bug in my own software. It's 
inconsistent, it invites problems, and it wastes peoples time.

--

___
Python tracker 

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



[issue28595] shlex.shlex should not augment wordchars

2019-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 56624a99a916fd27152d5b23364303acc0d707de by Vinay Sajip (Evan) in 
branch 'master':
bpo-28595: Allow shlex whitespace_split with punctuation_chars (GH-2071)
https://github.com/python/cpython/commit/56624a99a916fd27152d5b23364303acc0d707de


--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 2b843ac0ae745026ce39514573c5d075137bef65 by Serhiy Storchaka in 
branch 'master':
bpo-35431: Refactor math.comb() implementation. (GH-13725)
https://github.com/python/cpython/commit/2b843ac0ae745026ce39514573c5d075137bef65


--

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-06-01 Thread Stefan Krah


Stefan Krah  added the comment:

The managed buffer can be shared:

>>> b = b'12345'
>>> m1 = memoryview(b)
>>> m2 = memoryview(m1)
>>> gc.get_referents(m1)[0]

>>> gc.get_referents(m2)[0]



And I understood that Dino proposed to share one code instance as a memory 
mapped file for *all* processes.

--
nosy: +skrah

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:

Learning is not a waste of time. You're entitled to your opinion, but this is 
not a bug in logging. We'll have to agree to disagree.

--

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2019-06-01 Thread Eric Snow


New submission from Eric Snow :

In Python/lifecycle.c (Py_FinalizeEx) we call _Py_FinishPendingCalls(), right 
after we stop all non-daemon Python threads but before we've actually started 
finalizing the runtime state.  That call looks for any remaining pending calls 
(for the main interpreter) and runs them.  There's some evidence of a bug there.

In bpo-33608 I moved the pending calls to per-interpreter state.  We saw 
failures (sometimes sporadic) on a few buildbots (e.g. FreeBSD) during runtime 
finalization.  However, nearly all of the buildbots were fine, so it may be a 
question of architecture or slow hardware.  See bpo-33608 for details on the 
failures.

There are a number of possibilities, but it's been tricky reproducing the 
problem in order to investigate.  Here are some theories:

* daemon threads (a known weak point in runtime finalization) block pending 
calls from happening until some time after portions of the runtime have already 
been cleaned up
* there's a race that causes the pending calls machinery to get caught in some 
sort infinite loop (e.g. a pending call fails and gets re-queued)
* a corner case in the pending calls logic that triggers only during 
finalization

Here are some other points to consider:

* do we have the same problem during subinterpreter finalization 
(Py_EndInterpreter() rather than runtime finalization)?
* perhaps the problem extends beyond finalization, but the conditions are more 
likely there
* the change for bpo-33608 could have introduced the bug rather that exposing 
an existing one

--
assignee: eric.snow
components: Interpreter Core
messages: 344202
nosy: eric.snow
priority: normal
severity: normal
stage: test needed
status: open
title: Handling pending calls during runtime finalization may cause problems.
type: crash

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2019-06-01 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Jonathan


Jonathan  added the comment:

> Learning is not a waste of time. You're entitled to your opinion, but this is 
> not a bug in logging. We'll have to agree to disagree.

I agree and value learning a great deal. However learning should happen on your 
own time, NOT when a program crashes randomly and tries taking you down the 
rabbit hole. I like learning but not about unrelated things when I'm trying to 
do useful work.

Fine, if you don't consider this a bug, consider it a feature request. "User 
would like Python logging of Unicode characters to be consistent" is not an 
unreasonable request.

--
status: closed -> open
type: behavior -> enhancement

___
Python tracker 

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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-06-01 Thread Abhilash Raj


Abhilash Raj  added the comment:

I don't know if we can make the API consistent between parseaddr and the 
parsing header value since they are completely different even right now. Like 
you already noticed there is no way to register defects and instead parseaddr 
returns ('', '') to denote the failure to parse.

About parsing malicious domain, my line of thinking was along the lines of 
presenting whatever is there to user of the API, without 'hiding' that 
information. It would be harder to figure out the exception if the domain is 
missing. 

Even though the domain is parsed in the `domain` value, the value itself is 
clearly invalid. Any attempt to ever use that Address() will definitely cause 
an error (perhaps, there should be a sanity check in SMTP.send_message for 
that?).

--

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2019-06-01 Thread Eric Snow


Eric Snow  added the comment:

Also, someone did manage to investigate and identify a likely cause:

https://bugs.python.org/issue33608#msg342791

--

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

I like the delegation of `float` and `complex` to use `__index__` that was 
introduced in GH-13108; it would be nice to have that regardless of which 
solution is decided on for `__int__` and `__index__`.

--

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:

Different people have different ideas of what a default should be. You can 
pretty much guarantee that whatever a default is, someone will think it should 
be something else. The basicConfig functionality has been around in its present 
form since 2003, and people in general haven't had a problem with the current 
defaults. There is no case for changing a default unless there is a consensus 
among lots of people that a default needs changing.

--
stage: resolved -> 

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Łukasz, this PR will fix the x86 Gentoo Refleaks 3.x and friends, so I would 
recommend landing this before the release.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-06-01 Thread Eric Snow


Eric Snow  added the comment:

That's really helpful, Pavel!  Thanks for investigating so thoroughly.  I'm 
going to double check all the places I've made the assumption that "tstate" 
isn't NULL and likewise for "tstate->interp".

Is there an issue open for the bug in multiprocessing?  If not, would you mind 
opening one?

--

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-06-01 Thread Eric Snow


Eric Snow  added the comment:

I've made a few tweaks and Victor did some cleanup, so I'm going to try the PR 
again.  At first I'm also going to disable the _PyEval_FinishPendingCalls() 
call in _Py_FinalizeEx() and then enable it is a separate PR.

Also, I've opened bpo-37127 specifically to track the problem with 
_PyEval_FinishPendingCalls() during _Py_FinalizeEx(), to ensure that the 
disabled call doesn't slip through the cracks. :)

--

___
Python tracker 

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



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

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue36885] Make makeunicode.py script more readable

2019-06-01 Thread Stefan Behnel


Change by Stefan Behnel :


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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Paul Moore


Paul Moore  added the comment:

> User would like Python logging of Unicode characters to be consistent

It is consistent. The encoding of

logging.basicConfig(filename='c:\\my_log.log')

is consistent with the encoding of

open('c:\\my_log.log')

Both use the system default encoding, which is not UTF-8. There is some 
discussion going on right now, as to whether it *should* be, but it isn't, and 
I wouldn't consider changing the behaviour of loging *without* changing the 
behaviour of open() to be consistent.

Logging to the console is consistent with the standard IO streams, and it was 
PEP 528 (https://www.python.org/dev/peps/pep-0528/) that made that change - 
before that, the standard IO streams, and logging to the console, used the 
console codepage.

So, while I agree that the behaviour takes a bit of work to understand, it's 
not (IMO) inconsistent, nor is it (IMO) a bug.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +13614
pull_request: https://github.com/python/cpython/pull/13731

___
Python tracker 

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



[issue5680] Command-line arguments when running in IDLE

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Can be bump this up in priority?  The patch has been awaiting review for a good 
while.

--

___
Python tracker 

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



[issue37125] math.comb is leaking references

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Fixed by https://github.com/python/cpython/pull/13725

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Is everyone comfortable with how negative numbers are handled by this patch?  
It might be better to limit the domain and raise a ValueError rather than make 
a presumption about what the user intends.

--
nosy: +rhettinger

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am going to add the imath module. If we decide to add popcount(), it may be 
better to add it in this module instead of int class.

--

___
Python tracker 

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



[issue36842] Implement PEP 578

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3b57f50efc16c65df96914ec53bc8d3dc28e18b6 by Pablo Galindo in 
branch 'master':
bpo-36842: Pass positional only parameters to code_new audit hook (GH-13707)
https://github.com/python/cpython/commit/3b57f50efc16c65df96914ec53bc8d3dc28e18b6


--
nosy: +pablogsal

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Why do we want __index__ support?  This seems like an unnecessary extension 
without relevant use cases.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

NumPy integer types are not subclasses of int.

--

___
Python tracker 

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



[issue37125] math.comb is leaking references

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Please file this in the tracker issue so that the discussions don't sprawl.  
Thx.

--

___
Python tracker 

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



[issue34303] micro-optimizations in functools.reduce()

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset e5f6207ba6cb510d9370519ba869296be01787be by Raymond Hettinger 
(Sergey Fedoseev) in branch 'master':
bpo-34303: Micro-optimizations in functools.reduce() (GH-8598)
https://github.com/python/cpython/commit/e5f6207ba6cb510d9370519ba869296be01787be


--
nosy: +rhettinger

___
Python tracker 

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



[issue34303] micro-optimizations in functools.reduce()

2019-06-01 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

I'd expect any math module function accepting integers to be sufficiently 
duck-typed to accept integer-like things (i.e., objects that implement 
`__index__`), in just the same way that the regular math module functions (sin, 
log, atan, sqrt, ...) accept arbitrary objects defining `__float__`. We already 
do this for gcd, factorial.

--

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

> Is everyone comfortable with how negative numbers are handled by this patch?

Not entirely, but it's not terribly wrong and it's consistent with how 
`int.bit_length` works. (I'm also a bit uncomfortable about `int.bit_length`s 
behaviour on negative numbers, but it is the way it is.)

--

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

> I am going to add the imath module.

Aimed at 3.8, or 3.9? This seems somewhat rushed for 3.8.

--

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Tim Peters


Tim Peters  added the comment:

I prefer that a negative int raise ValueError, but am OK with it using the 
absolute value instead (i.e., what it does now).

--

___
Python tracker 

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



[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2019-06-01 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



  1   2   >