[issue41085] Array regression test fails

2020-06-22 Thread SilentGhost


SilentGhost  added the comment:

This looks like an overflow failure in a bigmem test (though the given limit 
24Gb should accommodate that?). Do bigmem tests work on Windows?

William, you've made some sort of modifications to the versioned files, what 
are those?

--
components: +Windows
nosy: +SilentGhost, paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue41072] Python 3.8.3 passively introduced open source software contains CVE vulnerability

2020-06-22 Thread SilentGhost


Change by SilentGhost :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order

2020-06-22 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Cancelling an unintended event instead of the one we wanted is a bug,
> and prevents me from using the library at all

That problem is certainly worth fixing even if we have to break a few eggs to 
do it (this module has been around for a very long time and almost certainly 
every little detail is being relied on by some users).

The docstring for enter() and enterabs() only promises that it returns an ID 
for an event and that the ID can be used to remove the event.

The regular docs for enter() and enterabs() make a stronger promise that they 
return an "event" but doesn't specify what that means.

The Event class name doesn't has a leading underscore but is not listed in 
__all__ and is not in the main docs.

The *queue* property is documented to return an ordered list of upcoming events 
which are defined to be named tuples with fields for: time, priority, action, 
arguments, kwargs.  That is the most specific and restrictive of the documented 
promises, one that presumably is being relied on in a myriad of ways (a repr 
suitable for logging, a pretty printable list, a sortable list, named access to 
fields, unpackable tuples, etc).

If we respect those published promises, one way to go is to add a unique 
identifier field to the Event class.  If the that unique id is consecutively 
numbered, it would also allow us to guarantee FIFO ordering (not sure whether 
that is actually need though).

Here's a preliminary sketch:

   scheduler.__init__():
+  self.event_sequence = 0   # updated as events are created
...

   scheduler.enterabs():
-   event = Event(time, priority, action, argument, kwargs)
+   self.event_sequence += 1
+   event = Event(time, priority, self.event_sequence, action, argument, 
kwargs)

- class Event(namedtuple('Event', 'time, priority, action, argument, kwargs')):
-__slots__ = []
-def __eq__(s, o): return (s.time, s.priority) == (o.time, o.priority)
-def __lt__(s, o): return (s.time, s.priority) <  (o.time, o.priority)
-def __le__(s, o): return (s.time, s.priority) <= (o.time, o.priority)
-def __gt__(s, o): return (s.time, s.priority) >  (o.time, o.priority)
-def __ge__(s, o): return (s.time, s.priority) >= (o.time, o.priority)
+ Event = namedtuple('Event', 'time, priority, sequence, action, argument, 
kwargs')

The user visible effects are:

* A new field would be displayed.
* Any code that constructs Event objects manually would break instantly.
* Any code using tuple unpacking on Event objects would break instantly.
* Slightly slower Event creation time.
* Faster heap updates (because native tuple ordering is faster than pure python 
rich comparisons).

However, outside the mention in the documentation for the *queue* property, 
Event objects are not part of the public API.  Also, we do have precedent for 
adding new fields without a negative consequence (argument and kwargs were 
added in Python 3.3).

An alternative solution for removing exact events (not for FIFO stability) is 
to have enter() and enterabs() return an opaque, unique event identifier.  Then 
the code for cancel() would need to be changed to something like:

self._queue = [e for e in self._queue if id(e) != event]
heapq.heapify(self._queue)

The user visible effects are:

* enter() and enterabs() no longer return an event object
  (it was implied that they would, but not explictly promised).
  Any code relying on an actual Event object being returned
  would break.
* cancel() would only accept the opaque IDs
  (again, it was only implied that actual Event objects would be used).
  Code would break that took Event objects out of the *queue* listing
  and passed those into cancel().
* cancel() would run a bit faster (because calling id() is cheaper
  that calling the pure python rich comparisons and having them
  extract the time and priority fields).

Either way breaks a few eggs but makes the module safer to use.

--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2020-06-22 Thread Anthony Sottile


Anthony Sottile  added the comment:

This appears to have broken pydoc of the select module, I've attached a patch

$ python3.8 -m pydoc select
Traceback (most recent call last):
  File "/usr/lib/python3.8/inspect.py", line 2004, in wrap_value
value = eval(s, module_dict)
  File "", line 1, in 
NameError: name 'EPOLLIN' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/inspect.py", line 2007, in wrap_value
value = eval(s, sys_module_dict)
  File "", line 1, in 
NameError: name 'EPOLLIN' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
exec(code, run_globals)
  File "/usr/lib/python3.8/pydoc.py", line 2769, in 
cli()
  File "/usr/lib/python3.8/pydoc.py", line 2731, in cli
help.help(arg)
  File "/usr/lib/python3.8/pydoc.py", line 1971, in help
elif request: doc(request, 'Help on %s:', output=self._output)
  File "/usr/lib/python3.8/pydoc.py", line 1694, in doc
pager(render_doc(thing, title, forceload))
  File "/usr/lib/python3.8/pydoc.py", line 1687, in render_doc
return title % desc + '\n\n' + renderer.document(object, name)
  File "/usr/lib/python3.8/pydoc.py", line 384, in document
if inspect.ismodule(object): return self.docmodule(*args)
  File "/usr/lib/python3.8/pydoc.py", line 1183, in docmodule
contents.append(self.document(value, key, name))
  File "/usr/lib/python3.8/pydoc.py", line 385, in document
if inspect.isclass(object): return self.docclass(*args)
  File "/usr/lib/python3.8/pydoc.py", line 1352, in docclass
attrs = spill("Methods %s:\n" % tag, attrs,
  File "/usr/lib/python3.8/pydoc.py", line 1298, in spill
push(self.document(value,
  File "/usr/lib/python3.8/pydoc.py", line 386, in document
if inspect.isroutine(object): return self.docroutine(*args)
  File "/usr/lib/python3.8/pydoc.py", line 1411, in docroutine
signature = inspect.signature(object)
  File "/usr/lib/python3.8/inspect.py", line 3093, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
  File "/usr/lib/python3.8/inspect.py", line 2842, in from_callable
return _signature_from_callable(obj, sigcls=cls,
  File "/usr/lib/python3.8/inspect.py", line 2296, in _signature_from_callable
return _signature_from_builtin(sigcls, obj,
  File "/usr/lib/python3.8/inspect.py", line 2109, in _signature_from_builtin
return _signature_fromstr(cls, func, s, skip_bound_arg)
  File "/usr/lib/python3.8/inspect.py", line 2057, in _signature_fromstr
p(name, default)
  File "/usr/lib/python3.8/inspect.py", line 2039, in p
default_node = RewriteSymbolics().visit(default_node)
  File "/usr/lib/python3.8/ast.py", line 360, in visit
return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 445, in generic_visit
new_node = self.visit(old_value)
  File "/usr/lib/python3.8/ast.py", line 360, in visit
return visitor(node)
  File "/usr/lib/python3.8/ast.py", line 445, in generic_visit
new_node = self.visit(old_value)
  File "/usr/lib/python3.8/ast.py", line 360, in visit
return visitor(node)
  File "/usr/lib/python3.8/inspect.py", line 2031, in visit_Name
return wrap_value(node.id)
  File "/usr/lib/python3.8/inspect.py", line 2009, in wrap_value
raise RuntimeError()
RuntimeError

--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2020-06-22 Thread Anthony Sottile


Change by Anthony Sottile :


--
nosy: +Anthony Sottile
nosy_count: 4.0 -> 5.0
pull_requests: +20235
pull_request: https://github.com/python/cpython/pull/21066

___
Python tracker 

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



[issue41083] plistlib can't decode date from year 0

2020-06-22 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue41086] Exception for uninstantiated interpolation (configparser)

2020-06-22 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
nosy: +python-dev
nosy_count: 1.0 -> 2.0
pull_requests: +20233
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/21062

___
Python tracker 

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



[issue41086] Exception for uninstantiated interpolation (configparser)

2020-06-22 Thread Brian Faherty


New submission from Brian Faherty :

The ConfigParser in Lib has a parameter called `interpolation`, that expects an 
instance of a subclass of Interpolation. However, when ConfigParser is given an 
argument of an uninstantiated subclass of Interpolation, the __init__ function 
of ConfigParser accepts it and continues on. This results in a later receiving 
an error message along the lines of `TypeError: before_set()
missing 1 required positional argument: 'value'` when functions are later 
called on the ConfigParser instance. This delay between the feedback and the 
original mistake has led to a few bugs open on the issue tracker 
(https://bugs.python.org/issue26831 and https://bugs.python.org/issue26469. 
Both of which were closed after a quick and simple explanation, which can be 
easily implemented in the library itself. 

I've created a PR for this work and will attach it shortly. Please let me know 
if there is a better name for the exception other than 
`InterpolationIsNotInstantiatedError`. It seems long, but also in line with the 
other Errors already in configparser.

--
components: Library (Lib)
messages: 372137
nosy: Brian Faherty
priority: normal
severity: normal
status: open
title: Exception for uninstantiated interpolation (configparser)
type: behavior
versions: Python 3.10, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

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



[issue41072] Python 3.8.3 passively introduced open source software contains CVE vulnerability

2020-06-22 Thread xcl


Change by xcl <1318683...@qq.com>:


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



[issue41084] Signify that a SyntaxError comes from an fstring in the error message

2020-06-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

I think it's a good idea.

My only reservation would be: if the parsing of f-strings is moved into the 
parser, would it be possible to maintain the error new messages?

--

___
Python tracker 

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



[issue41085] Array regression test fails

2020-06-22 Thread William Pickard


New submission from William Pickard :

Here's the verbose stack trace of the failing test:

==
FAIL: test_index (test.test_array.LargeArrayTest)
--
Traceback (most recent call last):
  File "L:\GIT\cpython\lib\test\support\__init__.py", line 837, in wrapper
return f(self, maxsize)
  File "L:\GIT\cpython\lib\test\test_array.py", line 1460, in test_index
self.assertEqual(example.index(11), size+3)
AssertionError: -2147483645 != 2147483651

--
components: Tests
files: test_output.log
messages: 372135
nosy: WildCard65
priority: normal
severity: normal
status: open
title: Array regression test fails
type: behavior
versions: Python 3.10
Added file: https://bugs.python.org/file49257/test_output.log

___
Python tracker 

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



[issue41084] Signify that a SyntaxError comes from an fstring in the error message

2020-06-22 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

It's relatively easy to identify if a SyntaxError occurs when parsing an 
fstring expression or not. The idea is to slightly change the error message to 
start with "f-string: " when it does (in the same way in which SyntaxError 
messages are produced by the hand-written fstring parser). I have a working PR 
that produces the following:

$ cat a.py
f'{a $ b}'
$ ./python.exe a.py
  File "/Users/lysnikolaou/Repositories/cpython/a.py", line 1
(a $ b)
   ^
SyntaxError: f-string: invalid syntax

Thoughts?

--
components: Interpreter Core
messages: 372134
nosy: eric.smith, gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Signify that a SyntaxError comes from an fstring in the error message
type: enhancement
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue40773] DOC: Fix rendering for 'retval' on the pdb page

2020-06-22 Thread Chenyoo Hao


Change by Chenyoo Hao :


--
keywords: +patch
nosy: +Chenyoo Hao
nosy_count: 3.0 -> 4.0
pull_requests: +20232
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/21055

___
Python tracker 

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



[issue41071] from an int to a float , why

2020-06-22 Thread mike stern


mike stern  added the comment:

i am calm

but sometimes I am wondering if the philosophy behind python is really like 
they claimed to make it very simple. Well I see a lot of confusions sometimes , 
and this is one


From: report=bugs.python@roundup.psfhosted.org 
 on behalf of Tim Peters 

Sent: Monday, June 22, 2020 5:59 PM
To: rskir...@hotmail.com 
Subject: [issue41071] from an int to a float , why

Tim Peters  added the comment:

Mike, read that exchange again. You originally wrote

"print(2 / 2) gives 2.0 instead of 2"

but you didn't _mean_ that. You meant to say it "gives 1.0 instead of 1", or 
you meant something other than "2 / 2").  In Python 3,

>>> print(2 / 2)
1.0

Which is what Serhiy said it does.

For the rest, read the PEP again after you calm down. In particular,

"Classic division will remain the default in the Python 2.x series; true 
division will be standard in Python 3.0."

Also all true.

--

___
Python tracker 

___

--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

I suggest you to discuss the PEP 620 on python-dev, rather than on the bug 
tracker. I just posted it there today.

This issue tracks the implemetation of one part of the PEP 620.

--

___
Python tracker 

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



[issue41083] plistlib can't decode date from year 0

2020-06-22 Thread Michael Shields


New submission from Michael Shields :

On macOS 10.5.5:

/tmp $ defaults export com.apple.security.KCN -

http://www.apple.com/DTDs/PropertyList-1.0.dtd;>


absentCircleWithNoReason

applicationDate
-12-30T00:00:00Z
lastCircleStatus
-1
lastWritten
2019-10-15T17:23:33Z
pendingApplicationReminder
4001-01-01T00:00:00Z
pendingApplicationReminderInterval
86400


/tmp $ cat plist_date_reduction.py 
#!/usr/bin/env python3

import plistlib
import subprocess

if __name__ == "__main__":
plist = subprocess.check_output(["defaults", "export", 
"com.apple.security.KCN", "-"])
print(plistlib.loads(plist, fmt=plistlib.FMT_XML))
/tmp $ python3.8 plist_date_reduction.py 
Traceback (most recent call last):
  File "plist_date_reduction.py", line 8, in 
print(plistlib.loads(plist, fmt=plistlib.FMT_XML))
  File 
"/usr/local/Cellar/python@3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py",
 line 1000, in loads
return load(
  File 
"/usr/local/Cellar/python@3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py",
 line 992, in load
return p.parse(fp)
  File 
"/usr/local/Cellar/python@3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py",
 line 288, in parse
self.parser.ParseFile(fileobj)
  File 
"/private/tmp/python@3.8-20200527-50093-16hak5w/Python-3.8.3/Modules/pyexpat.c",
 line 461, in EndElement
  File 
"/usr/local/Cellar/python@3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py",
 line 300, in handle_end_element
handler()
  File 
"/usr/local/Cellar/python@3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py",
 line 376, in end_date
self.add_object(_date_from_string(self.get_data()))
  File 
"/usr/local/Cellar/python@3.8/3.8.3/Frameworks/Python.framework/Versions/3.8/lib/python3.8/plistlib.py",
 line 254, in _date_from_string
return datetime.datetime(*lst)
ValueError: year 0 is out of range

--
components: Library (Lib)
messages: 372131
nosy: shields-fn
priority: normal
severity: normal
status: open
title: plistlib can't decode date from year 0
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



[issue41039] Simplify python3.dll build

2020-06-22 Thread Nikita Nemkin


Nikita Nemkin  added the comment:

Please take your time.

FWIW, I tested this patch by 1) comparing dumpbin /exports output; 2) comparing 
bunaries themselves (.dll and .lib) and 3) linking xxlmited module.

It helps that 7-zip can open .dll and .lib files files as if they were archives.

--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread Stefan Behnel

Stefan Behnel  added the comment:

> Also, later, these structures may change to be more efficient.

Tuples? Really?

Ok, quoting PEP-620:
> Members of … PyTupleObject structures have not changed since the "Initial 
> revision" commit (1990)

I honestly think the reason for that might simply be that there's not so much 
to improve for tuples.

> nothing prevents a C extension to get or set directly
> PyTupleObject.ob_item[0] (the first item of a tuple).

I certainly understand that that is a problem, especially if "PyObject" may 
change in the future. And this is essentially what the current 
"PyTuple_GET_ITEM()" macro does in a binary module.

Should we also turn "_PyTuple_ITEMS()" into a public inline function then to 
make up for the loss of the "_GET_ITEM(t, 0)" pattern? It would make it 
explicit what is intended. I think that should be our main goal in the CPython 
side.

--

___
Python tracker 

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



[issue41071] from an int to a float , why

2020-06-22 Thread Tim Peters


Tim Peters  added the comment:

Mike, read that exchange again. You originally wrote

"print(2 / 2) gives 2.0 instead of 2"

but you didn't _mean_ that. You meant to say it "gives 1.0 instead of 1", or 
you meant something other than "2 / 2").  In Python 3,

>>> print(2 / 2)
1.0

Which is what Serhiy said it does.

For the rest, read the PEP again after you calm down. In particular,

"Classic division will remain the default in the Python 2.x series; true 
division will be standard in Python 3.0."

Also all true.

--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The long rationale is explained in PEP 620:
https://www.python.org/dev/peps/pep-0620/

PyTupleObject and PyListObject structures must become opaque. Also, later, 
these structures may change to be more efficient.

--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread Stefan Behnel

Stefan Behnel  added the comment:

> Giving a direct access to an array or PyObject* (PyObject**) is causing 
> issues with other Python implementations, like PyPy, which don't use PyObject 
> internally.

I'm wondering – if the intention is to help other implementations, then why do 
we need to break extensions in *CPython* for that? In CPython, this usage seems 
perfectly valid with the current data structure. If that ever changes, we can 
still make this change as well, but do you really see the internal layout of 
tuples change at some point? (Lists are a different case, I'd say, but tuples?)

--
nosy: +scoder

___
Python tracker 

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



[issue41071] from an int to a float , why

2020-06-22 Thread mike stern


mike stern  added the comment:

sorry but that article was about version 2.2 in 2000

Created:11-Mar-2001
Python-Version: 2.2

where is the one for 3.7


From: report=bugs.python@roundup.psfhosted.org 
 on behalf of Tim Peters 

Sent: Monday, June 22, 2020 5:20 PM
To: rskir...@hotmail.com 
Subject: [issue41071] from an int to a float , why

Tim Peters  added the comment:

Read the PEP Serhiy already linked to:

https://www.python.org/dev/peps/pep-0238/

This was a deliberate change to how "integer / integer" works, introduced with 
Python 3.

--
nosy: +tim.peters
status: open -> closed

___
Python tracker 

___

--

___
Python tracker 

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



[issue41071] from an int to a float , why

2020-06-22 Thread mike stern


mike stern  added the comment:

I appreciate your answer
I just didn't like how she answered earlier saying

I cannot reproduce. 2 / 2 gives 1.0 to me.

which is not true

thanks anyway, now i am gonna have to do some reading


From: report=bugs.python@roundup.psfhosted.org 
 on behalf of Tim Peters 

Sent: Monday, June 22, 2020 5:20 PM
To: rskir...@hotmail.com 
Subject: [issue41071] from an int to a float , why

Tim Peters  added the comment:

Read the PEP Serhiy already linked to:

https://www.python.org/dev/peps/pep-0238/

This was a deliberate change to how "integer / integer" works, introduced with 
Python 3.

--
nosy: +tim.peters
status: open -> closed

___
Python tracker 

___

--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

PySequence_Fast_ITEMS() is used in numpy at 7 lines:

numpy/core/src/common/ufunc_override.c:118:*out_objs = 
PySequence_Fast_ITEMS(seq);

---
PyUFuncOverride_GetOutObjects(PyObject *kwds, PyObject **out_kwd_obj, PyObject 
***out_objs)
---
=> PyObject** is part of the numpy C API (it's even a pointer to a PyObject** 
array)!


numpy/core/src/multiarray/arrayfunction_override.c:80:PyObject **items = 
PySequence_Fast_ITEMS(relevant_args);
---
static int
get_implementing_args_and_methods(PyObject *relevant_args,
  PyObject **implementing_args,
  PyObject **methods)
{
int num_implementing_args = 0;
Py_ssize_t i;
int j;

PyObject **items = PySequence_Fast_ITEMS(relevant_args);
Py_ssize_t length = PySequence_Fast_GET_SIZE(relevant_args);

for (i = 0; i < length; i++) {
int new_class = 1;
PyObject *argument = items[i];


=> here PySequence_Fast_GET_ITEM() can be used instead.


numpy/core/src/multiarray/arrayfunction_override.c:167:PyObject **items = 
PySequence_Fast_ITEMS(types);
numpy/core/src/multiarray/common.c:434:objects = PySequence_Fast_ITEMS(seq);
numpy/core/src/multiarray/iterators.c:1368:ret = multiiter_new_impl(n, 
PySequence_Fast_ITEMS(fast_seq));
numpy/core/src/multiarray/methods.c:1015:in_objs = 
PySequence_Fast_ITEMS(fast);
numpy/core/src/umath/override.c:38:arg_objs = PySequence_Fast_ITEMS(args);

--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

PySequence_Fast_ITEMS() must also be deprecated since it also gives a direct 
access to PyTupleObject.ob_item and PyListObject.ob_item members (PyObject**). 
PySequence_Fast_GET_ITEM() should be used instead.

--

___
Python tracker 

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



[issue41070] Simplify pyshellext.dll build

2020-06-22 Thread Steve Dower


Steve Dower  added the comment:

Looks good, but I'll want to manually test this, as it's not covered by 
automated tests. (If you happen to know how to test drag-drop of multiple files 
and non-MBCS filenames in Explorer, would love to have some tests, but given 
the low churn on this part I suspect it's not worthwhile.)

Ping me in a week if I haven't gotten to this.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue41054] Simplify resource compilation on Windows

2020-06-22 Thread Steve Dower


Steve Dower  added the comment:

Looks good. Let's rename PYTHON_DLL_NAME to ORIGINAL_FILENAME, since it took me 
10 minutes to figure out that that's how it's used...

We'll backport this one to 3.9 before RC. No NEWS file required.

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



[issue40965] Segfault when importing unittest module via C API

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

I mark this issue as a duplicate of bpo-40294.

Right, please upgrade to Python 3.8.3 which includes the fix.

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Use-after-free crash if multiple interpreters import asyncio 
module

___
Python tracker 

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



[issue40965] Segfault when importing unittest module via C API

2020-06-22 Thread The Comet


The Comet  added the comment:

Thanks for the input! I should have been more specific. I was running python 
3.8.2 when I got this segfault.

I upgraded to 3.8.3 and the issue is no longer present, so it seems this has 
already been fixed.

--

___
Python tracker 

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



[issue41071] from an int to a float , why

2020-06-22 Thread Tim Peters


Tim Peters  added the comment:

Read the PEP Serhiy already linked to:

https://www.python.org/dev/peps/pep-0238/

This was a deliberate change to how "integer / integer" works, introduced with 
Python 3.

--
nosy: +tim.peters
status: open -> closed

___
Python tracker 

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



[issue41082] Error handling and documentation of Path.home()

2020-06-22 Thread Tim Hoffmann


New submission from Tim Hoffmann :

Path.home() may fail un
(https://github.com/matplotlib/matplotlib/issues/17707#issuecomment-647180252).

1. I think the raised key error is too low-level, and it should be something 
else; what exactly t.b.d.
2. The documentation 
(https://docs.python.org/3/library/pathlib.html#pathlib.Path.home) should 
specify what happens in case of failure.
3. The documentation links to 
https://docs.python.org/3/library/os.path.html#os.path.expanduser, but that's 
not correct. _PosixFlavor.gethomedir() implements it's own user lookup, which 
is slightly different from os.path.expanduser()

--
components: Library (Lib)
messages: 372116
nosy: timhoffm
priority: normal
severity: normal
status: open
title: Error handling and documentation of Path.home()
type: behavior

___
Python tracker 

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



[issue41039] Simplify python3.dll build

2020-06-22 Thread Steve Dower


Steve Dower  added the comment:

Thanks for the change. It looks good, though I would like to have a NEWS entry 
for this so that people can find that we made a deliberate change to this DLL.

I'd also like to do some manual testing to make sure that we aren't going to 
break any obscure uses. That's basically blocked on me, sorry, but I'll try and 
get to it asap. Feel free to ping me in a week if I haven't gotten to it.

--
assignee:  -> steve.dower

___
Python tracker 

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



[issue41071] from an int to a float , why

2020-06-22 Thread mike stern


mike stern  added the comment:

Not satisfied with that reply

you can't just decide to close the ticket without even giving a reasonable 
answer, or even try that on 2.7 or 3.7 to see if it is true what I said.
Besides, that is not a convincing answer, that is actually no answer at all!!!

I made my research and this is what is it 
https://stackoverflow.com/questions/183853/what-is-the-difference-between-and-when-used-for-division

in python 2.7 
print((20 / 3)) > 6
but
print((20.0 / 3)) or print((20 / 3.0)) or print((20.0 / 3.0)) > 
6.667
however 
print((20 / 2)) > 10 # integer number


in python 3.7
print((20 / 3)) > 6.667
not only that but even
print((20 / 2)) > 10.0  # float number
unless you use //
print((20 // 2)) > 10

can someone really explain this ?

--
status: closed -> open

___
Python tracker 

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



[issue41081] Exclude __pycache__ directories from backups using CACHEDIR.TAG

2020-06-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

To spoil it for other readers: the linked page says to create a file named 
CACHEDIR.TAG with a specific first line.

--
nosy: +eric.smith

___
Python tracker 

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



[issue36207] robotsparser deny all with some rules

2020-06-22 Thread Patrick Valibus 410 Gone

Patrick Valibus 410 Gone  added the comment:

Bonjour, nous n'avons pas réussi à le faire fonctionner. Nous l'avons utilisé 
dans le cadre d'un test seo car nous essayons e reproduire des alternatives à 
scrappy. Par exemple le robots devrait bine crawler la page de notre agence seo 
https://www.410-gone.fr/seo.html mais ne devrait pas accepter les pages 
finissant par /*.php$ et pourtant si malgré qu'elles soient bloquées en 
référencement dans notre robots.txt, merci.

--
nosy: +Patrick Valibus 410 Gone -Fred AYERS, artasca, cheryl.sabella, 
lagustais, mathias44, quentin-maire

___
Python tracker 

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



[issue40893] tkinter: integrate TkDND support

2020-06-22 Thread Ned Deily


Ned Deily  added the comment:

> As for the buildbots, is this something I could help with

@zach.ware is the best person to work with on any buildbot requirements.  I've 
Nosyed him here.

For the record, I haven't yet tried to test TkDND with the various current 
macOS Tk on current versions of macOS; there are a lot of variables there and a 
lot of ways it may have issues.  I hope to take a first look soon.

--
nosy: +zach.ware

___
Python tracker 

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



[issue40893] tkinter: integrate TkDND support

2020-06-22 Thread E. Paine


E. Paine  added the comment:

Addressing Ned's issues:

I have emailed round "Linux-sig" about adding an optional dependency and Guido 
recommended I put it on "Python-dev" instead (which I hope to do in the coming 
days). As for the buildbots, is this something I could help with, or does it 
just require someone with permission to remote-logon and change as necessary?

As a side-note, I currently looking at better ways of getting binding returns 
to TkDND as the current method 
(https://github.com/python/cpython/pull/20896/commits/9a27b147239c3326046ac439abccc07127b16f91#diff-3eeb1d6bdd82965287a553385c879693R1449)
 is not that clear ('dndrtn' does nothing - the set method simply returns the 
variable contents without trying to evaluate it).

--

___
Python tracker 

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



[issue41081] Exclude __pycache__ directories from backups using CACHEDIR.TAG

2020-06-22 Thread Jakub Stasiak


Change by Jakub Stasiak :


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

___
Python tracker 

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



[issue41081] Exclude __pycache__ directories from backups using CACHEDIR.TAG

2020-06-22 Thread Jakub Stasiak


New submission from Jakub Stasiak :

It'd be nice of __pycache__ directories didn't pollute backups. Granted, one 
can add __pycache__ directory to their backup-tool-of-choice exclusion list, 
but those lists are ever growing and maybe it'd be good to help the tools and 
the users.

There's a Cache Directory Tagging Specification[1] which some backup tools like 
Borg, restic, GNU Tar and attic use out of the box (well, with a switch) and 
other tools (like rsync, Bacula, rdiff-backup and I imagine others) can be made 
to use it with a generic exclude-directories-with-this-file-present option 
(partially, just the existence of the tag file is used, not its content).


I wasn't sure what to select in Components, so I went with Library.
[1] https://bford.info/cachedir/

--
components: Library (Lib)
messages: 372109
nosy: jstasiak
priority: normal
severity: normal
status: open
title: Exclude __pycache__ directories from backups using CACHEDIR.TAG
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



[issue41035] zipfile.Path does not work properly with zip archives where paths start with /

2020-06-22 Thread sorrow


sorrow  added the comment:

>`iteritems()`

I meant `iterdir()` of course.

--

___
Python tracker 

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



[issue41035] zipfile.Path does not work properly with zip archives where paths start with /

2020-06-22 Thread sorrow


sorrow  added the comment:

Here's what I came up with:

```python
class ZipPath(zipfile.Path):
def __init__(self, root, at=""):
super().__init__(root, at)
if not at.startswith("/") and self.root.namelist()[0].startswith("/"):
self.at = f"/{at}"

def __repr__(self):
return (
f"{self.__class__.__name__}({self.root.filename!r}, "
f"{self.at.lstrip('/')!r})"
)

def __str__(self):
return posixpath.join(self.root.filename, self.at.lstrip("/"))

def _is_child(self, path):
return posixpath.dirname(path.at.strip("/")) == self.at.strip("/")

def _next(self, at):
return self.__class__(self.root, at)
```

Pretty simple. The main things are going on in `__init__` and `_is_child` 
methods. These changes are enough for `iteritems()` to work. I decided to 
include the leading slash in the `at`, but strip it for the outside world 
(__str__ and __repr__). Also, I had to override the `_next` method because it 
makes `Path` objects no matter what class it's called from.

--

___
Python tracker 

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



[issue41080] re.sub treats * incorrectly?

2020-06-22 Thread Ryan Westlund


Ryan Westlund  added the comment:

Sorry, I forgot the pydoc docs don't have as much information as the online
docs.

On Mon, Jun 22, 2020 at 1:54 PM Ezio Melotti  wrote:

>
> Ezio Melotti  added the comment:
>
> This behavior was changed in 3.7: "Empty matches for the pattern are
> replaced only when not adjacent to a previous empty match, so sub('x*',
> '-', 'abxd') returns '-a-b--d-'." [0]
>
> See also bpo-32308 and bpo-25054.
>
>
> [0]: https://docs.python.org/3/library/re.html#re.sub
>
> --
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
> superseder:  -> Replace empty matches adjacent to a previous non-empty
> match in re.sub()
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue41080] re.sub treats * incorrectly?

2020-06-22 Thread Ezio Melotti


Ezio Melotti  added the comment:

This behavior was changed in 3.7: "Empty matches for the pattern are replaced 
only when not adjacent to a previous empty match, so sub('x*', '-', 'abxd') 
returns '-a-b--d-'." [0]

See also bpo-32308 and bpo-25054.


[0]: https://docs.python.org/3/library/re.html#re.sub

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
superseder:  -> Replace empty matches adjacent to a previous non-empty match in 
re.sub()

___
Python tracker 

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



[issue41080] re.sub treats * incorrectly?

2020-06-22 Thread Ryan Westlund


New submission from Ryan Westlund :

```
>>> re.sub('a*', '-', 'a')
'--'
>>> re.sub('a*', '-', 'aa')
'--'
>>> re.sub('a*', '-', 'aaa')
'--'
```

Shouldn't it be returning one dash, not two, since the greedy quantifier will 
match all the a's? I understand why substituting on 'b' returns '-a-', but 
shouldn't this constitute only one match? In Python 2.7, it behaves as I expect:

```
>>> re.sub('a*', '-', 'a')
'-'
>>> re.sub('a*', '-', 'aa')
'-'
>>> re.sub('a*', '-', 'aaa')
'-'
```

The original case that led me to this was trying to normalize a path to end in 
one slash. I used `re.sub('/*$', '/', path)`, but a nonzero number of slashes 
came out as two.

--
components: Regular Expressions
messages: 372104
nosy: Yujiri, ezio.melotti, mrabarnett
priority: normal
severity: normal
status: open
title: re.sub treats * incorrectly?
type: behavior
versions: Python 3.10, 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



[issue19270] Document that sched.cancel() doesn't distinguish equal events and can break order

2020-06-22 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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

List of the 58 C extensions using the legacy API:

_asynciomodule.c
_bisectmodule.c
_blake2/blake2module.c
cjkcodecs/multibytecodec.c
cmathmodule.c
_csv.c
_ctypes/_ctypes.c
_cursesmodule.c
_curses_panel.c
_datetimemodule.c
_decimal/_decimal.c
_elementtree.c
faulthandler.c
gcmodule.c
grpmodule.c
_hashopenssl.c
_io/_iomodule.c
_lsprof.c
md5module.c
_multiprocessing/multiprocessing.c
_multiprocessing/posixshmem.c
_opcode.c
ossaudiodev.c
overlapped.c
_pickle.c
_posixsubprocess.c
pwdmodule.c
pyexpat.c
_queuemodule.c
_randommodule.c
readline.c
_scproxy.c
selectmodule.c
sha1module.c
sha256module.c
_sha3/sha3module.c
sha512module.c
signalmodule.c
socketmodule.c
spwdmodule.c
_sqlite/module.c
_sre.c
_ssl.c
_struct.c
symtablemodule.c
termios.c
_testbuffer.c
_testcapimodule.c
_testimportmultiple.c
_testinternalcapi.c
_threadmodule.c
_tkinter.c
_tracemalloc.c
unicodedata.c
_winapi.c
_xxsubinterpretersmodule.c
_xxtestfuzz/_xxtestfuzz.c
zlibmodule.c

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Current status: 60 stdlib extensions (51%) are ported to PEP 489 multiphase 
initialization, 58 stdlib extensions (49%) are still using the legacy API:

$ grep -E '\' $(find Modules/ -name "*.c")|wc -l
60

$ grep -E '\' $(find Modules/ -name "*.c")|wc -l
58

--

___
Python tracker 

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



[issue41075] Add support of navigating through prev. commands in IDLE

2020-06-22 Thread E. Paine

E. Paine  added the comment:

The issue I found, which I assume you are referencing Terry, is #2704. Even if 
we don't do all of what is proposed there, I think the default bindings for the 
history should be changed (I have not used any terminals that don't use ↑↓).

In my experience, very few people know of the history functionality (especially 
people new to Python - which is IDLE's main audience) and even many of those 
who teach Python don't know about it!

As for the other features suggested, I am not sure about a "previous input" 
option in the right-click menu, though it may be nice to have a separate 
history for commands and inputs (I didn't look that closely at 2704 so it is 
possible this is proposed there). I am not sure I understand the feature 
proposed in '3'.

--
nosy: +epaine

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The PR 21059 breaks Cython. I reported the issue to Cython upstream:
https://github.com/cython/cython/issues/3701

numpy is also affected: code generated by Cython (numpy/random/_mt19937.c) 
contains the issue.

--

___
Python tracker 

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



[issue41079] _PyAsyncGenWrappedValue_Type is never Readied

2020-06-22 Thread Tomasz Pytel


New submission from Tomasz Pytel :

A call is never made to PyType_Ready(&_PyAsyncGenWrappedValue_Type) on 
initialization unlike for all other Python type objects I can see. Does not 
seem to have any negative effects at the moment except to mess up my Python 
type instrumentation. May turn into a bug in the future if all types are 
assumed readied, is this intended behavior?

--
components: Interpreter Core
messages: 372099
nosy: Tomasz Pytel
priority: normal
severity: normal
status: open
title: _PyAsyncGenWrappedValue_Type is never Readied
type: behavior
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



[issue15666] PEP 3121, 384 refactoring applied to lzma module

2020-06-22 Thread Dong-hee Na


Dong-hee Na  added the comment:

Fixed by:

commit 1937edd376274cb26090d71253191502a9de32d6
Author: Dong-hee Na 
Date:   Tue Jun 23 00:53:07 2020 +0900

bpo-1635741: Port _lzma module to multiphase initialization  (GH-19382)

--
nosy: +corona10, vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20230
pull_request: https://github.com/python/cpython/pull/21059

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c96d00e88ead8f99bb6aa1357928ac4545d9287c by Victor Stinner in 
branch 'master':
bpo-41078: Fix bltinmodule.c with Py_TRACE_REFS (GH-21058)
https://github.com/python/cpython/commit/c96d00e88ead8f99bb6aa1357928ac4545d9287c


--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-06-22 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 1937edd376274cb26090d71253191502a9de32d6 by Dong-hee Na in branch 
'master':
bpo-1635741: Port _lzma module to multiphase initialization  (GH-19382)
https://github.com/python/cpython/commit/1937edd376274cb26090d71253191502a9de32d6


--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20229
pull_request: https://github.com/python/cpython/pull/21058

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c45dbe93b7094fe014442c198727ee38b25541c4 by Victor Stinner in 
branch 'master':
bpo-41078: Add pycore_list.h internal header file (GH-21057)
https://github.com/python/cpython/commit/c45dbe93b7094fe014442c198727ee38b25541c4


--

___
Python tracker 

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



[issue41071] from an int to a float , why

2020-06-22 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Mike, the bug tracker is not a help-desk for questions. There are many other 
forums where you can ask for help:

- the python-list and tutor mailing lists 
  https://www.python.org/community/lists/

- Stackoverflow

- The Python IRC channel https://www.python.org/community/irc/

- Reddit's r/learnpython

- https://python-forum.io/

--
nosy: +steven.daprano

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 384621c42f9102e31ba2c47feba144af09c989e5 by Victor Stinner in 
branch 'master':
bpo-41078: Rename pycore_tupleobject.h to pycore_tuple.h (GH-21056)
https://github.com/python/cpython/commit/384621c42f9102e31ba2c47feba144af09c989e5


--

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +20228
pull_request: https://github.com/python/cpython/pull/21057

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue16623] argparse help formatter does not honor non-breaking space

2020-06-22 Thread Zackery Spytz


Zackery Spytz  added the comment:

Python 2 is EOL, so I think this issue should be closed.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue41078] [C API] Convert PyTuple_GET_ITEM() macro to a static inline function

2020-06-22 Thread STINNER Victor


New submission from STINNER Victor :

PyTuple_GET_ITEM() can be abused to access directly the PyTupleObject.ob_item 
member:

   PyObject **items = _GET_ITEM(0);

Giving a direct access to an array or PyObject* (PyObject**) is causing issues 
with other Python implementations, like PyPy, which don't use PyObject 
internally.

I propose to convert the PyTuple_GET_ITEM() and PyList_GET_ITEM() macros to 
static inline functions to disallow that.

--
components: C API
messages: 372091
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Convert PyTuple_GET_ITEM() macro to a static inline function
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



[issue41076] Pre-feed the parser with the f-string expression location

2020-06-22 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
title: Pre-feed the parser with the f-string location -> Pre-feed the parser 
with the f-string expression location

___
Python tracker 

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



[issue41077] Make Cookiejar a bit more pythonic

2020-06-22 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Hi Srinivas, as I said on the PR, cosmetic changes are usually not accepted. 
You can have a look at the other opened bug reports to find issues you can work 
on and at the Python Dev Guide (https://devguide.python.org/) for help to get 
started hacking Python!

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue41077] Make Cookiejar a bit more pythonic

2020-06-22 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Change by Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:


--
resolution:  -> wont fix
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



[issue41075] Add support of navigating through prev. commands in IDLE

2020-06-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

There is an old issue proposing making ↑↓ navigate through history in Shell, 
with cntl/alt ↑↓, for instance, navigating through lines.  


In the meanwhile, one is supposed to be able to redefine the abstract 
 and  keys in the Keys tab of the settings 
dialog.  For instance, to Alt-Down and Alt-Up.  However, it is not currently 
working as I expect and I need to investigate more.

A new history list mechanism is a possibility, but I would want to first change 
Shell to only add syntactically correct entries to the permanent list.  One 
should be able to edit a statement until it is correct, just as when trying to 
run from the editor.  This would reduce the need to retrieve history by perhaps 
half (depending on one's syntax knowledge and typing accuracy).

--

___
Python tracker 

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



[issue41077] Make Cookiejar a bit more pythonic

2020-06-22 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
 added the comment:

I am not sure this PR will be accepted. If you are a core dev, and thinks this 
is not Okay, please feel free close this issue.

--
keywords: +patch
message_count: 1.0 -> 2.0
pull_requests: +20226
stage:  -> patch review
versions: +Python 3.10
pull_request: https://github.com/python/cpython/pull/20872

___
Python tracker 

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



[issue41077] Make Cookiejar a bit more pythonic

2020-06-22 Thread శ్రీనివాస్ రెడ్డి తాటిపర్తి

New submission from Srinivas  Reddy Thatiparthy(శ్రీనివాస్ రెడ్డి తాటిపర్తి) 
:

Title says it all.

--
messages: 372087
nosy: thatiparthy
priority: normal
severity: normal
status: open
title: Make Cookiejar a  bit more pythonic

___
Python tracker 

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



[issue41076] Pre-feed the parser with the f-string location

2020-06-22 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


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

___
Python tracker 

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



[issue41076] Pre-feed the parser with the f-string location

2020-06-22 Thread Lysandros Nikolaou


New submission from Lysandros Nikolaou :

Inspired by bpo-41064, I sat down to try and find problems with f-string 
locations in the new parser. I was able to come up with a way to compute the 
locations of the f-string expressions that I think is more consistent and 
allows us to delete all the code that was fixing the expression locations after 
the actual parsing, which accounted for about 1/6 of string_parser.c.

A high-level explanation of the change:

Before this change we were pre-feeding the parser with the location of the 
f-string itself. The parser was then parsing the expression and was computing 
the locations of all the nodes based on the offset of the f-string. After the 
parsing was done, we were identifying the offset and the lineno of the 
expression *within* the fstring and were fixing the node locations accordingly. 
For example, for an f-string like `a = 0; f'irrelevant {a}'` we were doing the 
following:

- Pre-feed the parser with lineno=0 and col_offset=7 (the offset of the 
f-string itself in the current line).
- Parse the expression (adding 7 to the col_offset of each parsed node, lineno 
remains the same since it's 0).
- Fix the node locations by shifting the Name node by 14, which is the number 
of characters in the f-string (counting the `f` and the opening quote) before 
the start of the expression.

With this change we now pre-feed the parser with the exact lineno and offset of 
the expression itself, not the f-string. This allows us to completely skip the 
third step of shifting the node locations.

--
assignee: lys.nikolaou
components: Interpreter Core
messages: 372086
nosy: eric.smith, gvanrossum, lys.nikolaou, pablogsal
priority: normal
severity: normal
status: open
title: Pre-feed the parser with the f-string location
type: behavior
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue27721] distutils strtobool returns 0 and 1 rather than False and True

2020-06-22 Thread Nathaniel Manista


Change by Nathaniel Manista :


--
nosy: +Nathaniel Manista

___
Python tracker 

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



[issue41075] Add support of navigating through prev. commands in IDLE

2020-06-22 Thread wyz23x2

New submission from wyz23x2 :

Terminals like CMD have support of navigating through commands with ↑↓. While 
directly implementing the arrows is not good in IDLE (the use for jumping to 
the prev. line in GUI is needed), there should be a good way.
Some ways:
1. Alt+↑↓. The current behavior is exactly like ↑↓.
2. A "Previous input" option in the right-click menu.
3. A "Navigate" option in the right-click menu. A GUI like this will pop up:
——
┃Navigate┃
┃  × The [4]th command   ┃
┃  O [1] command before  ┃
┃___ ┃
┃┃Paste┃ ┃
┃——— ┃
——

It would be better if 2&3 are together.

--
assignee: terry.reedy
components: IDLE
messages: 372085
nosy: terry.reedy, wyz23x2
priority: normal
severity: normal
status: open
title: Add support of navigating through prev. commands in IDLE
type: enhancement
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



[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-22 Thread hai shi


hai shi  added the comment:

Hi, victor. If you have much bpo need to manage, I could take a look in this 
week :)

--

___
Python tracker 

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



[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-22 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue38870] Expose ast.unparse in the ast module

2020-06-22 Thread Batuhan Taskaya


Change by Batuhan Taskaya :


--
pull_requests: +20224
pull_request: https://github.com/python/cpython/pull/21053

___
Python tracker 

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



[issue41069] Use non-ascii file names in tests by default

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
dependencies: +msilib does not work correctly with non-ASCII names

___
Python tracker 

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



[issue41074] msilib does not work correctly with non-ASCII names

2020-06-22 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

It encodes input string arguments with utf-8 and pass encoded strings to 8-bit 
API which expect they be encoded using the locale encoding. It may pass tests, 
create and read files, but these files will just have wrong names.

--
components: Extension Modules, Windows
messages: 372083
nosy: paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: msilib does not work correctly with non-ASCII names
type: behavior
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



[issue15848] PEP 3121, 384 Refactoring applied to xxsubtype module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 3121 part is fixed by:

commit d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318
Author: Nick Coghlan 
Date:   Sat May 23 22:24:10 2015 +1000

PEP 489: Multi-phase extension module initialization

Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.

--
nosy: +vstinner

___
Python tracker 

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



[issue15675] PEP 3121, 384 Refactoring applied to array module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 384 part is fixed by:

commit d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318
Author: Nick Coghlan 
Date:   Sat May 23 22:24:10 2015 +1000

PEP 489: Multi-phase extension module initialization

Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.

--
nosy: +vstinner

___
Python tracker 

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



[issue15652] PEP 3121, 384 refactoring applied to gdbm module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit c4862e333ab405dd5789b4061222db1982147de4
Author: Dong-hee Na 
Date:   Wed Jun 17 01:41:23 2020 +0900

bpo-1635741: Port _gdbm module to multiphase initialization (GH-20920)

--
nosy: +corona10, vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15668] PEP 3121, 384 Refactoring applied to random module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The PEP 384 part was fixed by:

commit 04f0bbfbedf8d2bb69b012f853de6648b1a9f27f
Author: Dino Viehland 
Date:   Fri Sep 13 11:12:27 2019 +0100

bpo-38075: Port _randommodule.c to PEP-384 (GH-15798)

- Migrate `Random_Type` to `PyType_FromSpec`
- To simulate an old use of `PyLong_Type.tp_as_number->nb_absolute`, I added
  code to the module init function to stash `int.__abs__` for later
  use. Ideally we'd use `PyType_GetSlot()` instead, but it doesn't currently
  work for static types in CPython, and implementing it just for this case
  doesn't seem worth it.
- Do exact check for long and dispatch to PyNumber_Absolute, use vector 
call when not exact.

--
nosy: +vstinner

___
Python tracker 

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



[issue15711] PEP 3121, 384 Refactoring applied to time module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit bd409bb5b78e7ccac5fcda9ab4cec770552f3090
Author: Paulo Henrique Silva 
Date:   Mon Mar 23 15:58:23 2020 -0300

bpo-1635741: Port time module to multiphase initialization (PEP 489) 
(GH-19107)

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue40824] Unexpected errors in __iter__ are masked in "in" and the operator module

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue40077] Convert static types to PyType_FromSpec()

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

See meta bpo-15787 "PEP 3121, 384 Refactoring" which tracks all these issues as 
dependencies.

--

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

See meta bpo-15787 "PEP 3121, 384 Refactoring" which tracks all these issues as 
dependencies.

--

___
Python tracker 

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



[issue41068] zipfile: read after write fails for non-ascii files

2020-06-22 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue40077] Convert static types to PyType_FromSpec()

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Search also for issues with "384" in their title (34 open issues):

https://bugs.python.org/issue?%40search_text==file%3Acontent=384&%40columns=title=&%40columns=id&%40columns=activity&%40sort=activity==1&%40columns=status=_count=_count=&%40group=&%40pagesize=50&%40startwith=0&%40sortdir=on&%40queryname=&%40old-queryname=&%40action=search

Search for issues with pep3121 keyword (40 open issues):

https://bugs.python.org/issue?%40search_text==file%3Acontent=&%40columns=title=&%40columns=id&%40columns=activity&%40sort=activity13==1&%40columns=status=_count=_count=&%40group=&%40pagesize=50&%40startwith=0&%40sortdir=on&%40queryname=&%40old-queryname=&%40action=search

--

___
Python tracker 

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



[issue40077] Convert static types to PyType_FromSpec()

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

For example, see bpo-15849 for the xx module.

--

___
Python tracker 

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



[issue15849] PEP 3121, 384 Refactoring applied to xx module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-40077: "Convert static types to PyType_FromSpec()".

--

___
Python tracker 

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



[issue15849] PEP 3121, 384 Refactoring applied to xx module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Hum, I reopen the issue: the xx module still defines types statically and so 
the "PEP 384" part of this issue is not fixed yet.

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



[issue15849] PEP 3121, 384 Refactoring applied to xx module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit d5cacbb1d9c3edc02bf0ba01702e7c06da5bc318
Author: Nick Coghlan 
Date:   Sat May 23 22:24:10 2015 +1000

PEP 489: Multi-phase extension module initialization

Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.

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



[issue15703] PEP 3121, 384 Refactoring applied to select module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

New changeset f919054e539a5c1afde1b31c9fd7a8f5b2313311 by Dino Viehland in 
branch 'master':
bpo-38116: Convert select module to PEP-384 (#15971)
https://github.com/python/cpython/commit/f919054e539a5c1afde1b31c9fd7a8f5b2313311

I mark this issue as a duplicate of bpo-38116.

--
nosy: +vstinner
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Make select module PEP-384 compatible

___
Python tracker 

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



[issue38116] Make select module PEP-384 compatible

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-15703 as a duplicate of this issue.

--

___
Python tracker 

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



[issue15700] PEP 3121, 384 Refactoring applied to resource module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit 45f7008a66a30cdf749ec03e580bd2692be9a8df
Author: Hai Shi 
Date:   Thu Apr 2 20:35:08 2020 +0800

bpo-1635741: Port resource extension module to multiphase initialization 
(PEP 489) (GH-19252)

Fix also reference leaks on error.

--
nosy: +shihai1991, vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15689] PEP 3121, 384 Refactoring applied to operator module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit f3d5ac47720045a72f7ef5af13046d9531e6007b
Author: Paulo Henrique Silva 
Date:   Tue Mar 24 23:18:47 2020 -0300

bpo-1635741: Port operator module to multiphase initialization (PEP 489) 
(GH-19150)

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15687] PEP 3121, 384 Refactoring applied to mmap module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit 3ad52e366fea37b02a3f619e6b7cffa7dfbdfa2e
Author: Dong-hee Na 
Date:   Sat Jun 6 00:01:02 2020 +0900

bpo-1635741: Port mmap module to multiphase initialization (GH-19459)

--
nosy: +corona10, vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15690] PEP 3121, 384 Refactoring applied to parser module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

The parser module was removed in Python 3.10 (PEP 617).

--
nosy: +vstinner
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15685] PEP 3121, 384 Refactoring applied to itertools module

2020-06-22 Thread STINNER Victor


Change by STINNER Victor :


--
versions: +Python 3.10 -Python 3.4

___
Python tracker 

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



[issue15685] PEP 3121, 384 Refactoring applied to itertools module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit 514c469719f149e1722a91a9d0c63bf89dfefb2a
Author: Dong-hee Na 
Date:   Wed Mar 18 02:46:24 2020 +0900

bpo-1635741: Port itertools module to multiphase initialization (GH-19044)

--
nosy: +corona10, vstinner
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



[issue15691] PEP 3121, 384 Refactoring applied to posix module

2020-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Fixed by:

commit 1c2fa781560608aa4be50c748d4b3f403cfa5035
Author: Victor Stinner 
Date:   Sun May 10 11:05:29 2020 +0200

bpo-40549: Convert posixmodule.c to multiphase init (GH-19982)

Convert posixmodule.c ("posix" or "nt" module) to the multiphase
initialization (PEP 489).

* Create the module using PyModuleDef_Init().
* Create ScandirIteratorType and DirEntryType with the new
  PyType_FromModuleAndSpec() (PEP 573)
* Get the module state from ScandirIteratorType and DirEntryType with
  the new PyType_GetModule() (PEP 573)
* Pass module to functions which access the module state.
* convert_sched_param() gets a new module parameter. It is now called
  directly since Argument Clinic doesn't support passing the module
  to an argument converter callback.
* Remove _posixstate_global macro.

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



  1   2   >