[issue43856] Docs for importlib.metadata should mention Python version

2021-04-20 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +24218
pull_request: https://github.com/python/cpython/pull/25495

___
Python tracker 

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



[issue43856] Docs for importlib.metadata should mention Python version

2021-04-20 Thread Jason R. Coombs


Change by Jason R. Coombs :


--
pull_requests: +24217
pull_request: https://github.com/python/cpython/pull/25494

___
Python tracker 

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



[issue42128] Structural Pattern Matching (PEP 634)

2021-04-20 Thread Brandt Bucher


Change by Brandt Bucher :


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



[issue43475] Worst-case behaviour of hash collision with float NaN

2021-04-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


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

___
Python tracker 

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



[issue43898] Python fails to import .dylib but works when extension is changed to .so

2021-04-20 Thread Ned Deily


Ned Deily  added the comment:

Can you please give a code snippet of the behavior you believe is incorrect? It 
is not clear to me what you mean by importing a library.

--

___
Python tracker 

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



[issue40137] TODO list when PEP 573 "Module State Access from C Extension Methods" will be implemented

2021-04-20 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +24215
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/25492

___
Python tracker 

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



[issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup

2021-04-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I'm going to try it our on the server but apparently there are some problems: 
https://github.com/buildbot/buildbot/issues/5991

--

___
Python tracker 

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



[issue43877] Logging Cookbook ambiguity

2021-04-20 Thread Gene Ratzlaff


Gene Ratzlaff  added the comment:

Agreed, but only to the limits of the buffer - that's what I was getting at 
when I suggested that limitations should be explained.

--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan


Nick Coghlan  added the comment:

https://www.python.org/dev/peps/pep-0642/#representing-patterns-explicitly-in-the-abstract-syntax-tree
 covers the rationale for why it is potentially problematic to reuse expression 
nodes for match patterns: it doesn't semantically align with the fact that 
patterns are *not* expressions, so the AST ends up being closer to a concrete 
syntax tree than we would like.

For the specifics of the AST nodes:

* restricting sub expressions directly in the AST itself is tricky without side 
effects on the AST for non-pattern-matching code, so I'm intending to add any 
such restrictions that we want to enforce to the validator (other statements 
and expressions like yield, await, return, break, and continue already have 
separately enforced restrictions like that)
* cls needs to be an expression node to allow for attribute lookups
* the linked draft PR already updates the grammar to emit the new AST. 
MatchClass is able to collect the keyword args and their corresponding patterns 
in roughly the same way that MatchMapping collects its key:pattern pairs

--

___
Python tracker 

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



[issue43899] separate builtin function

2021-04-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, here's a recipe from the itertools docs:

def partition(pred, iterable):
"Use a predicate to partition entries into false entries and true 
entries"
# partition(is_odd, range(10)) --> 0 2 4 6 8   and  1 3 5 7 9
t1, t2 = tee(iterable)
return filterfalse(pred, t1), filter(pred, t2)


Also, here's a more general solution that can handle multiple categories:

>>> from collections import defaultdict
>>> def categorize(func, iterable):
d = defaultdict(list)
for x in iterable:
d[func(x)].append(x)
return dict(d)

>>> categorize(is_positive, [-3, -2, -1, 0, 1, 2, 3])
{False: [-3, -2, -1, 0], True: [1, 2, 3]}
>>> categorize(lambda x: x%3, [-3, -2, -1, 0, 1, 2, 3])
{0: [-3, 0, 3], 1: [-2, 1], 2: [-1, 2]}


At one point, Peter Norvig suggested adding a groupby classmethod to 
dictionaries.  I would support that idea.   Something like:

dict.groupby(attrgetter('country'), conferences)

--
nosy: +rhettinger

___
Python tracker 

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



[issue41701] Buildbot web page: connection lost after 1 minute, then display "Connection restored" popup

2021-04-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ee, apparently this issue in the buildbot repo may be related: 
https://github.com/buildbot/buildbot/issues/4078

Could you investigate if we can use this on our PSF server?

--

___
Python tracker 

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



[issue43900] string comprehension

2021-04-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Please take this to the python-ideas mailing list:  
https://mail.python.org/mailman3/lists/python-ideas.python.org/

If the idea gains traction, it would likely require a PEP and then this issue 
can be reopened.

--
nosy: +rhettinger
resolution:  -> later
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



[issue43900] string comprehension

2021-04-20 Thread Zachary Ware


Zachary Ware  added the comment:

filtered_s = ''.join(c for c in s if c in string.ascii_lowercase)

--
nosy: +zach.ware

___
Python tracker 

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



[issue43900] string comprehension

2021-04-20 Thread David Alvarez Lombardi


New submission from David Alvarez Lombardi :

As of now the best way to filter a str is to convert to list, filter, then join 
back to a str. I think a a string comprehension would be very useful for this.


So to get only ascii_lower case chars given this string,

s = "a1b2c3d4"


I could do this

filtered_s = c"ch for ch in s if ch in string.ascii_lowercase"


instead of this.

s_list = []
for i in range(len(s)):
if s[i] in string.ascii_lowercase:
s_list.append(s[i])

filtered_s = "".join(s_list)


--
messages: 391480
nosy: alvarezdqal
priority: normal
severity: normal
status: open
title: string comprehension
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue43899] separate builtin function

2021-04-20 Thread David Alvarez Lombardi


New submission from David Alvarez Lombardi :

I frequently find myself doing the following for lists, sets, and dicts.


passes = [x for x in seq if cond(x)]
fails = [x for x in seq if not cond(x)]


The proposed function would behave similarly to `filter`, but it would return a 
tuple of the passes iterable and fails iterable rather than just the passes.


my_list = [-3, -2, -1, 0, 1, 2, 3]
def is_positive(n):
return n > 0

positives, negatives = separate(function=is_positive, iterable=my_list)


--
messages: 391479
nosy: alvarezdqal
priority: normal
severity: normal
status: open
title: separate builtin function
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2021-04-20 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2021-04-20 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
nosy_count: 13.0 -> 14.0
pull_requests: +24214
pull_request: https://github.com/python/cpython/pull/25490

___
Python tracker 

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



[issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4

2021-04-20 Thread Arfrever Frehtes Taifersar Arahesis


Arfrever Frehtes Taifersar Arahesis  added the comment:

ARM != AMD64 (alternative name of x86_64)

--

___
Python tracker 

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



[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I've applied this PR but still am not sure that it makes readers better-off.

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

___
Python tracker 

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



[issue31727] FTP_TLS errors when use certain subcommands

2021-04-20 Thread Christian Heimes


Christian Heimes  added the comment:

I'm removing the SSL component. The issue here seems to be caused by the way 
how ftplib use the ssl module, not by a problem in the ssl module itself.

--
components: +Library (Lib) -SSL, Windows
versions: +Python 3.10, Python 3.9 -Python 3.6, Python 3.7

___
Python tracker 

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



[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-20 Thread Steve Dower


Steve Dower  added the comment:

Opening a PR against the master branch would be ideal. (Make sure you 
forked from that branch too, or you may see lots of irrelevant changes, 
which will make it impossible to review.)

--

___
Python tracker 

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



[issue40306] Enhancement request for SSLContext - flag to handle trailing dot in hostname

2021-04-20 Thread Christian Heimes


Christian Heimes  added the comment:

OpenSSL feature request: https://github.com/openssl/openssl/issues/11560

--
versions: +Python 3.10 -Python 3.7

___
Python tracker 

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



[issue43898] Python fails to import .dylib but works when extension is changed to .so

2021-04-20 Thread Ellis trisk-grove


New submission from Ellis trisk-grove :

This issue is pretty much summed up by the title. Python does manage to import 
the library and use it however only when the extension is .so otherwise python 
cannot find it and fails to import.

--
components: macOS
messages: 391473
nosy: etriskgrove, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Python fails to import .dylib but works when extension is changed to .so
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



[issue43897] Implement support for validation of pattern matching ASTs

2021-04-20 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue42128] Structural Pattern Matching (PEP 634)

2021-04-20 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Actually, I didn't see that there are still 2 open linked PRs. I'll wait 
> until those are merged.

I've moved the AST validator to its own separate issue so feel free to close 
this Brandt!

--

___
Python tracker 

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



[issue42128] Structural Pattern Matching (PEP 634)

2021-04-20 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests:  -23539

___
Python tracker 

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



[issue43897] Implement support for validation of pattern matching ASTs

2021-04-20 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


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

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Batuhan, perhaps we should change the linked issue for your AST validator PR 
> to this one. That way we can close the old catch-all PEP 634 implementation 
> issue and keep the discussion focused here.

I think it might be better as a separate issue that has a dependency on this 
one. I've created issue 43897 for this.

--

___
Python tracker 

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



[issue43897] Implement support for validation of pattern matching ASTs

2021-04-20 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
dependencies: +Make match patterns explicit in the AST

___
Python tracker 

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



[issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4

2021-04-20 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

given how old this is and how i added that test skip presumably when i setup my 
first arm buildbot... closing.

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



[issue43897] Implement support for validation of pattern matching ASTs

2021-04-20 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

ASTs of case clauses for PEP 636 are not validated through PyAST_Validate right 
now, which might crash the Python interpreter when compiling some trees that 
doesn't hold the assumptions of the compiler.

--
assignee: BTaskaya
messages: 391469
nosy: BTaskaya
priority: normal
severity: normal
status: open
title: Implement support for validation of pattern matching ASTs
versions: Python 3.10

___
Python tracker 

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



[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Géry

Géry  added the comment:

> Elsewhere in the docs, all the links to this entry use the markup, 
> :func:`super` which looks nicer in the docs than the class reference.

I was suggesting only to update the block Sphinx directive “.. function::” to 
“.. class::” for defining the signature (so that the “class” prefix appears 
before the signature, like for the other built-in types), not the inline Sphinx 
roles “:func:” to “:class:” (since for instance `int` use both in the page: 
:class:`int` and :func:`int`).

Also the “class” prefix already appears in the interactive help when typing 
`help(super)`:

Help on class super in module builtins:

class super(object)
 |  super() -> same as super(__class__, )
 |  super(type) -> unbound super object
 |  super(type, obj) -> bound super object; requires isinstance(obj, type)
 |  super(type, type2) -> bound super object; requires issubclass(type2, type)
 |  Typical use to call a cooperative superclass method:
 |  class C(B):
 |  def meth(self, arg):
 |  super().meth(arg)
 |  This works for class methods too:
 |  class C(B):
 |  @classmethod
 |  def cmeth(cls, arg):
 |  super().cmeth(arg)

--

___
Python tracker 

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



[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Also, the related text uses callable terminology, "it returns object that ...".

--

___
Python tracker 

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



[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Géry

Géry  added the comment:

> Looking again, it seems to someone has already started applying class markup 
> despite previous decisions not to do so.

Yes, and he forgot super:

class bool([x])
class bytearray([source[, encoding[, errors]]])
class bytes([source[, encoding[, errors]]])
class complex([real[, imag]])
class dict(**kwarg)
class dict(mapping, **kwarg)
class dict(iterable, **kwarg)
class float([x])
class frozenset([iterable])
class int([x])
class int(x, base=10)
class list([iterable])
class memoryview(obj)
class object
class property(fget=None, fset=None, fdel=None, doc=None)
class range(stop)
class range(start, stop[, step])
class set([iterable])
class slice(stop)
class slice(start, stop[, step])
class str(object='')
class str(object=b'', encoding='utf-8', errors='strict’)
class tuple([iterable])
class type(object)
class type(name, bases, dict, **kwds)

--

___
Python tracker 

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



[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

-0 on doing this.  While class markup has crept into the Built-in Functions 
section, super() isn't really used this way (people don't subclass it or run 
isinstance on it).

Elsewhere in the docs, all the links to this entry use the markup, 
:func:`super` which looks nicer in the docs than the class reference.

In terms of markup, "function" is a role rather than an actual type, it is used 
for most callables whether or not ``isinstance(obj, type(lambda: None))`` 
returns true.

--

___
Python tracker 

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



[issue22079] Ensure in PyType_Ready() that base class of static type is static

2021-04-20 Thread STINNER Victor


STINNER Victor  added the comment:

I recently reworked type_new() and PyType_New() in bpo-43770. I wrote 
documentation for the type_ready_inherit_as_structs() helper function of 
PyType_Ready():

// For static types, inherit tp_as_xxx structures from the base class
// if it's NULL.
//
// For heap types, tp_as_xxx structures are not NULL: they are set to the
// PyHeapTypeObject.as_xxx fields by type_new_alloc().
static void
type_ready_inherit_as_structs(PyTypeObject *type, PyTypeObject *base)

I hesitated to add assertions to ensure that fields are set if the type is a 
heap type.

One issue with static type is that it doesn't have the following fields of 
PyHeapTypeObject:

PyAsyncMethods as_async;
PyNumberMethods as_number;
PyMappingMethods as_mapping;
PySequenceMethods as_sequence; /* as_sequence comes after as_mapping,
  so that the mapping wins when both
  the mapping and the sequence define
  a given operator (e.g. __getitem__).
  see add_operators() in typeobject.c . */
PyBufferProcs as_buffer;

Is there a reason to not add these fields to PyTypeObject? PyTypeObject is not 
part of the stable ABI.

Type inheritance without these fields make PyType_Ready() weird and more 
complex.

--

___
Python tracker 

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



[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Looking again, it seems to someone has already started applying class markup 
despite previous decisions not to do so.

--
resolution: rejected -> 
status: closed -> open
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue42422] types.CodeType() has no bytecode verifier

2021-04-20 Thread STINNER Victor


STINNER Victor  added the comment:

In terms of security model, usually, if an attacker can execute arbitrary 
Python code, the game is over. Executing bytecode is the same. Python doesn't 
provide any tooling to validate bytecode in its stdlib.

https://python-security.readthedocs.io/security.html#python-security-model

If you consider that it's an important use case, you can create a project on 
PyPI to validate bytecode. I don't think that it belongs to the stdlib.

Python/ceval.c doesn't validate bytecode at runtime for performance reasons.

--

___
Python tracker 

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



[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-20 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

I have a patch for this issue. Should I attach it or should I directly open a 
PR?

--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Adrian Freund


Change by Adrian Freund :


--
nosy: +freundTech

___
Python tracker 

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



[issue43804] Add more info about building C/C++ Extensions on Windows using MSVC

2021-04-20 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Kindly have a review of my patch

--

___
Python tracker 

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



[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

In general, we've decided not to do this.  We use function mark-up in the 
section on builtin functions even though many of these are actually types.

We use class markup in other sections because that markup is well suited to 
listing all the associated methods and attributes.

--
nosy: +rhettinger
resolution:  -> rejected
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



[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Géry

Change by Géry :


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

___
Python tracker 

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



[issue43896] Update the Sphinx directive for super from function to class

2021-04-20 Thread Géry

New submission from Géry :

This PR updates the page [*Built-in 
Functions*](https://docs.python.org/3.9/library/functions.html#super) of the 
Python library documentation: `super` is not a `function` (`isinstance(super, 
type(lambda: None))` is `False`), it is a `type` (`isinstance(super, type)` is 
`True`), like `int`, `tuple`, `set`, etc. So it should get the same “class” 
prefix, i.e.

> **super**([*type*[, *object-or-type*]])

should become

> *class* **super**([*type*[, *object-or-type*]])

--
assignee: docs@python
components: Documentation
messages: 391458
nosy: docs@python, maggyero
priority: normal
severity: normal
status: open
title: Update the Sphinx directive for super from function to class
type: enhancement
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Also, I would like some more extensive argument or why not having context 
dependent nodes justifies the extra maintainance cost (I'm not against that of 
course, and I am sympathetic, but I think this needs some more extensive 
coverage or why we are doing this). Notice that we already have context 
dependent nodes and attributes, as well as implicit meaning of some values like 
None.

--

___
Python tracker 

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



[issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4

2021-04-20 Thread Irit Katriel


Irit Katriel  added the comment:

The test was disabled for ARM Linux here: 
https://github.com/python/cpython/commit/e5aefa452b2e3a5a834610cefa1656f36673f686

Does that resolve this issue?

--
nosy: +gregory.p.smith, iritkatriel

___
Python tracker 

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



[issue43888] GitHub Actions CI/CD `Coverage` job is broken on master

2021-04-20 Thread miss-islington


miss-islington  added the comment:


New changeset 077a2e76649c2fc49ebb8982b6855bab09a85e8f by Sviatoslav Sydorenko 
in branch 'master':
bpo-43888: Reduce coverage collection timeout to 1h40m in GHA (GH-25471)
https://github.com/python/cpython/commit/077a2e76649c2fc49ebb8982b6855bab09a85e8f


--
nosy: +miss-islington

___
Python tracker 

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



[issue43895] Unnecessary Cache of Shared Object Handles

2021-04-20 Thread Ian H


Ian H  added the comment:

Proposed patch is in https://github.com/python/cpython/pull/25487.

--

___
Python tracker 

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



[issue43895] Unnecessary Cache of Shared Object Handles

2021-04-20 Thread Ian H


New submission from Ian H :

While working on another project I noticed that there's a cache of shared 
object handles kept inside _PyImport_FindSharedFuncptr. See 
https://github.com/python/cpython/blob/b2b6cd00c6329426fc3b34700f2e22155b44168c/Python/dynload_shlib.c#L51-L55.
 It appears to be an optimization to work around poor caching of shared object 
handles in old libc implementations. After some testing, I have been unable to 
find any meaningful performance difference from this cache, so I propose we 
remove it to save the space.

My initial tests were on Linux (Ubuntu 18.04). I saw no discernible difference 
in the time for running the Python test suite with a single thread. Running the 
test suite using a single thread shows a lot of variance, but after running 
with and without the cache 40 times the mean times with/without the cache was 
nearly the same. Interpreter startup time also appears to be unaffected. This 
was all with a debug build, so I'm in the process of collecting data with a 
release build to see if that changes anything.

--
messages: 391453
nosy: Ian.H
priority: normal
severity: normal
status: open
title: Unnecessary Cache of Shared Object Handles
versions: Python 3.10

___
Python tracker 

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



[issue30800] zlib.compressobj took too much memory on window

2021-04-20 Thread Irit Katriel


Irit Katriel  added the comment:

It looks like you're not using this API correctly, it doesn't make sense to 
create 1 compressobj()s.   You should create one and then call compress() 
on it as many times as you need.

--
nosy: +iritkatriel
resolution:  -> not a bug
status: open -> pending

___
Python tracker 

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



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Saiyang Gou


Saiyang Gou  added the comment:

I think it might be a good idea to just strip leading spaces and tabs for 
`compile(x, ..., 'eval')` if we want consistent behavior. `compile` might be 
used in more locations in the whole Python source tree apart from 
`typing.get_type_hints`. Technically the only behavior difference between 
`eval(x)` and `compile(x, ..., 'eval')` (when `x` is a string) should be that 
the latter one does not execute the generated byte code.

--
nosy: +gousaiyang

___
Python tracker 

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



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Jarry Shaw

Jarry Shaw  added the comment:

To me, I discovered this issue because of a typo in my code. And apparently, I 
do not suggest people will write their type annotations with leading 
whitespaces purposely.

Here’s another thing though: aligning the behaviour of the two builtin 
functions is good for us users, since logically, ``compile`` is just one 
*execution* step away from ``eval`` to my understanding.

--

___
Python tracker 

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



[issue43894] IDLE editor file minor refactoring

2021-04-20 Thread E. Paine


Change by E. Paine :


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

___
Python tracker 

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



[issue43894] IDLE editor file minor refactoring

2021-04-20 Thread E. Paine


New submission from E. Paine :

Despite being large, the PR is mostly trivial changes (e.g. changing 
indentation). The main changes worth noting (and hence the reason for this 
issue) are:
1) the renaming of `ResetColorizer` to `reset_colors`, `ResetFont` to 
`reset_font`, `RemoveKeybindings` to `remove_keybindings` and 
`ApplyKeybindings` to `apply_keybindings`.
2) removal of some potentially unneeded imports
3) renaming of the `tokeneater` args to be lowercase

I chose `reset_colors` (as proposed in PR-22682) rather than `reset_colorizer` 
because we are reconfiguring the Text, code context and line numbers, rather 
than only dealing with the colouriser.

--
assignee: terry.reedy
components: IDLE
messages: 391449
nosy: epaine, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE editor file minor refactoring
versions: Python 3.10, 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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Brandt Bucher


Brandt Bucher  added the comment:

Hm, for some reason I was thinking that this was safe to do after the feature 
freeze. Let's get to it then!

Batuhan, perhaps we should change the linked issue for your AST validator PR to 
this one. That way we can close the old catch-all PEP 634 implementation issue 
and keep the discussion focused here.

Nick, you might find the discussion on this mypy PR 
(https://github.com/python/mypy/pull/10191) helpful. In particular, Adrian 
raises some points about ways we could make type inference in the AST a bit 
neater. For example: not all patterns can be used for mapping keys. Perhaps 
there is a way to organize parts of the AST hierarchy that makes this a bit 
more concrete (though we should be careful to not limit reasonable syntax 
extensions in the future by doing so).

A few notes, just from skimming the outline here:

> MatchValue(expr value)

MatchValue technically contains an expression node, although the actual 
expressions it can contain are quite limited (dotted names and negative/complex 
numbers, if I understand correctly). Can we gain anything by splitting this up 
into nodes for each of these (MatchValue(identifier* parts), etc...) instead?

> MatchClass(expr cls, pattern* patterns, identifier* extra_attrs, pattern* 
> extra_patterns)

If I remember correctly (this part was implemented a while ago), collecting the 
different positional and keyword arguments in the parser is sort of simple 
since we can pass around sequences of keyword nodes easily. I *think* that the 
new proposed design would require hacks like creating dummy MatchClass nodes 
with *only* the keyword parts and later combining them with the positional 
arguments and a class name, since it keeps the keyword names separate from 
their arguments. Maybe some of the parser folks on this thread can chime in on 
that.

Also, continuing the theme above, I think we can be more specific with "expr 
cls" here (maybe "identifier* cls"). 

> MatchRestOfSequence(identifier? target)

In the interest of brevity, maybe "MatchStar" or something?

> A NULL entry in the MatchMapping key list handles capturing extra mapping keys

I think we could just give MatchMapping a "identifier? rest" member, right? 
That way it becomes a bit easier to use, and we don't need to worry if it's 
last or not. It also keeps us from having to handle empty entries in the keys.

Oh, also, the ast unparser will need to be updated as well.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue43799] OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1

2021-04-20 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 3309113d6131e4bbac570c4f54175ecca02d025a by Christian Heimes in 
branch 'master':
bpo-43799: Also define SSLv3_method() (GH-25481)
https://github.com/python/cpython/commit/3309113d6131e4bbac570c4f54175ecca02d025a


--

___
Python tracker 

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



[issue22079] Ensure in PyType_Ready() that base class of static type is static

2021-04-20 Thread Stefan Behnel


Stefan Behnel  added the comment:

Coming back to this after a while. I would like to get rid of the work-around 
(read: huge hack) that we have in Cython for this check and thus would ask for 
the check to be removed in Py3.10.

According to the discussion, no-one seemed to remember why it was added in the 
first place, just that "bad things happened", but not what or how.

With the fix for issue 35810 in place since Py3.8, my guess is that the 
situation that this check is preventing has actually become safe now. Unless 
someone can motivate that the risks were other than a premature deallocation of 
the base type.

--

___
Python tracker 

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



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Guido van Rossum


Guido van Rossum  added the comment:

So the question is, whether anyone actually writes `x: ' str'`. Does the fix 
satisfy a real need?

If it does, why don't we change compile(x, ..., 'eval') as you suggested in 
your second comment?

--

___
Python tracker 

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



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Jarry Shaw


Jarry Shaw  added the comment:

> as discussed in https://bugs.python.org/issue41887

After some additional thoughts, I am thinking that changing the behaviour of 
``compile`` in ``'eval'`` mode directly might be a better idea, for consistency 
all over the builtin functions. 

Especially that it is a bit complex to decide if ``compile`` is called in 
``'eval'`` mode all over the code base which may need to patch with ``lstrip`` 
sanitisation.

--

___
Python tracker 

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



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Ken Jin


Change by Ken Jin :


--
nosy: +gvanrossum, kj, levkivskyi

___
Python tracker 

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



[issue43878] ./configure fails on Apple Silicon with coreutils uname

2021-04-20 Thread Keith Smiley


Keith Smiley  added the comment:

I think given that this file seems to be updated occasionally anyways we should 
still land this. I agree with the sentiment that if this was a super specific 
fix just for this edge case maybe it wouldn't be worth it.

--

___
Python tracker 

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



[issue42422] types.CodeType() has no bytecode verifier

2021-04-20 Thread Sofian Brabez


Sofian Brabez  added the comment:

It's been a while and I still have no clear guidance from there of what 
developers want to do.

Follow-up on this again to see if requires updates or just close it.

--

___
Python tracker 

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



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Jarry Shaw


Change by Jarry Shaw :


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

___
Python tracker 

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



[issue33025] urlencode produces bad output from ssl.CERT_NONE and friends that chokes decoders

2021-04-20 Thread Ethan Furman


Ethan Furman  added the comment:

Actually, I think it uses str().  An easy fix would be to use format() for all 
non-bytes objects instead -- the question then becomes how many objects 
(besides Enums with mixed-in data types) have a different str() vs format() 
display?

--

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-20 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +24208
pull_request: https://github.com/python/cpython/pull/25483

___
Python tracker 

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



[issue33025] urlencode produces bad output from ssl.CERT_NONE and friends that chokes decoders

2021-04-20 Thread Christian Heimes


Christian Heimes  added the comment:

I guess so.

We turned CERT_NONE into an IntFlag enum many years ago. urlencode() uses repr 
to convert integer enums.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue33025] urlencode produces bad output from ssl.CERT_NONE and friends that chokes decoders

2021-04-20 Thread Ethan Furman


Ethan Furman  added the comment:

IIUC, the issue is that

  urlencode( {'cert_reqs': ssl.CERT_NONE} )

no longer produces

  'cert_reqs=0'

?

--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +Guido.van.Rossum

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan


Nick Coghlan  added the comment:

It's specifically the definition of "match_case" in the AST that is affected:

match_case = (pattern pattern, expr? guard, stmt* body)

pattern = MatchAlways
 | MatchValue(expr value)
 | MatchConstant(constant value)
 | MatchSequence(pattern* patterns)
 | MatchMapping(expr* keys, pattern* patterns)
 | MatchClass(expr cls, pattern* patterns, identifier* extra_attrs, 
pattern* extra_patterns)

 | MatchRestOfSequence(identifier? target)
 -- A NULL entry in the MatchMapping key list handles capturing extra 
mapping keys

 | MatchAs(pattern? pattern, identifier target)
 | MatchOr(pattern* patterns)
  attributes (int lineno, int col_offset, int? end_lineno, int? 
end_col_offset)

Relative to the PEP 642 AST, the notion of a "matchop" is gone - MatchValue 
always compares by equality, and there's a MatchConstant node for the identity 
comparisons against None, True, and False.

The grammar, code generator, AST validator, and unparser are then updated to 
produce or consume the new AST nodes.

--

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan


Nick Coghlan  added the comment:

Agreed. I had wanted the AST to be part of the PEPs specifically *because* it's 
a public API, but didn't check until today whether or not the original PEP 634 
implementation had been merged as-is, or with a cleaned up AST definition.

https://github.com/ncoghlan/cpython/pull/8/files is the initial implementation 
with the AST and Grammar file updated.

I'll only create the CPython PR once the tests are passing, but I'll try to 
give Brandt at least a week to review it (I'll also ping him directly via 
email).

--

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-20 Thread Petr Viktorin


Petr Viktorin  added the comment:

> Should we mention PEP 652 in Include/README.rst, now that the PEP is accepted?

No, we should link to the documentation (when it's written). The PEP is a 
design document; it'll become outdated.

--

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-20 Thread Erlend Egeberg Aasland


Erlend Egeberg Aasland  added the comment:

Should we mention PEP 652 in Include/README.rst, now that the PEP is accepted?

--

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-20 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +24207
pull_request: https://github.com/python/cpython/pull/25482

___
Python tracker 

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



[issue43893] typing.get_type_hints does not accept type annotations with leading whitespaces

2021-04-20 Thread Jarry Shaw


New submission from Jarry Shaw :

`typing.get_type_hints` does not accept type annotations (in string capsulated 
form) with leading whitespaces.

```
>>> def foo(arg) -> ' str': ...
>>> typing.get_type_hints(foo)
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/typing.py", line 519, in __init__
code = compile(arg, '', 'eval')
  File "", line 1
str
IndentationError: unexpected indent

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/local/lib/python3.9/typing.py", line 1448, in get_type_hints
value = ForwardRef(value)
  File "/usr/local/lib/python3.9/typing.py", line 521, in __init__
raise SyntaxError(f"Forward reference must be an expression -- got {arg!r}")
SyntaxError: Forward reference must be an expression -- got ' str'
```

When elaborating on this issue, an inconsistency of hevaiour between ``eval`` 
function call and ``compile`` in ``'eval'`` mode was also noticed, where the 
former accepts leading whitespaces and the latter does not.

However, as discussed in https://bugs.python.org/issue41887 , I would then 
propose manually ``lstrip`` whitespaces from the type annotations:

```
519c519
< code = compile(arg.lstrip(' \t'), '', 'eval')
---
> code = compile(arg, '', 'eval')
```

--
components: Library (Lib)
messages: 391434
nosy: jarryshaw
priority: normal
severity: normal
status: open
title: typing.get_type_hints does not accept type annotations with leading 
whitespaces
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue43799] OpenSSL 3.0.0: define OPENSSL_API_COMPAT 1.1.1

2021-04-20 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +24206
pull_request: https://github.com/python/cpython/pull/25481

___
Python tracker 

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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Given that the AST is a public interface, I would advise to implement this 
before beta freeze of 3.10 to avoid making this a breaking change in the future 
for linters and the like

--
nosy: +pablogsal

___
Python tracker 

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



[issue43795] Implement PEP 652 -- Maintaining the Stable ABI

2021-04-20 Thread Petr Viktorin


Petr Viktorin  added the comment:

Thanks for linking to the issues/documentation!

I see that Py_GetArgcArgv it was exported in python3.def (i.e. stable ABI) in 
bpo-40910, which got backported to 3.9.

And the removal of PyThreadState_DeleteCurrent was reverted: bpo-38266

While we would like to deprecate/remove them in the future, they are now part 
of the stable ABI.
They are now in internal headers, so I will exclude them from the limited API.

--

___
Python tracker 

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



[issue30898] SSL cert failure running make test during Python 3.6 install

2021-04-20 Thread Christian Heimes


Christian Heimes  added the comment:

I'm closing the ticket as out of date. Please feel free to reopen the ticket if 
you can reproduce the problem with a more recent version of Python.

--
nosy: +christian.heimes
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



[issue43892] Make match patterns explicit in the AST

2021-04-20 Thread Nick Coghlan


New submission from Nick Coghlan :

In the SC submission ticket for PEP 642 
(https://github.com/python/steering-council/issues/43 ), Guido indicated he was 
in favour of the more explicit pattern matching AST changes suggested in that 
PEP.

This ticket covers adapting the pattern matching implementation to explicitly 
separate pattern nodes from expr nodes in the AST, so the code generator 
doesn't need to be context dependent.

--
assignee: ncoghlan
messages: 391430
nosy: brandtbucher, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Make match patterns explicit in the AST
type: enhancement
versions: Python 3.10

___
Python tracker 

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



[issue19023] ctypes docs: Unimplemented and undocumented features

2021-04-20 Thread David Goncalves


Change by David Goncalves :


--
nosy: +dpg
nosy_count: 11.0 -> 12.0
pull_requests: +24205
pull_request: https://github.com/python/cpython/pull/25480

___
Python tracker 

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



[issue33178] Add support for BigEndianUnion and LittleEndianUnion in ctypes

2021-04-20 Thread David Goncalves


Change by David Goncalves :


--
keywords: +patch
nosy: +dpg
nosy_count: 6.0 -> 7.0
pull_requests: +24204
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25480

___
Python tracker 

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



[issue43878] ./configure fails on Apple Silicon with coreutils uname

2021-04-20 Thread Dustin Rodrigues


Dustin Rodrigues  added the comment:

In case it changes the calculus on how to proceed, HomeBrew does install 
coreutils with a "g" prefix -- a user needs to explicitly add the gnubin 
directory to their path in order for the unprefixed version to take precedence 
over the Apple-supplied one.

https://github.com/Homebrew/homebrew-core/blob/4d04d78d5c27bde0da4e21b0669156b57c2d0839/Formula/coreutils.rb#L88-L91
https://github.com/Homebrew/homebrew-core/issues/71782

--
nosy: +dtrodrigues

___
Python tracker 

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



[issue43318] pdb can't output the prompt message when successfully clear breakpoints by "filename:lineno"

2021-04-20 Thread ZhaoJie Hu


ZhaoJie Hu  added the comment:

I found a typo in the reproduce step. I'm going to fix it here.

The unit test is updated in PR. Now it has some conflicts with the master 
branch, and I will resolve them soon.

The steps to reproduce the bug:

Assume the file to be debugged is foo.py(You can use any file you want).

1. start pdb: python -m pdb foo.py

2. set a breakpoint on any line of the file:

(Pdb) b 2
Breakpoint 1 at foo.py:2
(Pdb) b
Num Type Disp Enb   Where
1   breakpoint   keep yes   at foo.py:2

3. when clear the breakpoint using breakpoint number, it will get a 
output("Deleted breakpoint 1 at ..."):

(Pdb) cl 1
Deleted breakpoint 1 at foo.py:2

4. set another breakpoint:

(Pdb) b 3
Breakpoint 2 at foo.py:3

5. if breakpoint is cleared using (filename:lineno), it gets nothing:

(Pdb)cl foo.py:3
(Pdb)

--

___
Python tracker 

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



[issue43883] Making urlparse WHATWG conformant

2021-04-20 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-43882.

--
nosy: +vstinner

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-20 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-43883.

--

___
Python tracker 

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



[issue39432] Distutils generates the wrong export symbol for unicode module names

2021-04-20 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-20 Thread STINNER Victor


Change by STINNER Victor :


--
components: +Library (Lib)

___
Python tracker 

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



[issue43882] [security] urllib.parse should sanitize urls containing ASCII newline and tabs.

2021-04-20 Thread STINNER Victor


Change by STINNER Victor :


--
title: urllib.parse should sanitize urls containing ASCII newline and tabs. -> 
[security] urllib.parse should sanitize urls containing ASCII newline and tabs.

___
Python tracker 

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



[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-20 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

For Windows 10.0.17134 (1803) or above why don't we use the format 
"maj.min.build.ubr" in platform._norm_version (the function that post-processes 
the version string and then returns the version string in the format 
"maj.min.build")?

--

___
Python tracker 

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



[issue43284] sys.getwindowsversion().platform_version is incorrect

2021-04-20 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

I would like to help to write the fix for this issue.

--

___
Python tracker 

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



[issue17659] no way to determine First weekday (based on locale)

2021-04-20 Thread Cédric Krier

Cédric Krier  added the comment:

ping

--

___
Python tracker 

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



[issue42854] OpenSSL 1.1.1: use SSL_write_ex() and SSL_read_ex()

2021-04-20 Thread Christian Heimes


Christian Heimes  added the comment:

Ethan, what's your platform and OpenSSL version?

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

___
Python tracker 

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