[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-23 Thread INADA Naoki

INADA Naoki  added the comment:

Let's remove from these:

* asyncio/base_events.py:  Used for local variable. 
* email/_header_value_parser.py: Used for local variable.
* json: Examples (in document and docstring) for keeping order, and json.tool.

I don't touch other modules.

--

___
Python tracker 

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



[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-23 Thread INADA Naoki

Change by INADA Naoki :


--
pull_requests: +4890

___
Python tracker 

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



[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-23 Thread INADA Naoki

INADA Naoki  added the comment:

Agreed.
I won't remove OrderedDict usages which is part of public APIs.
This issue is for finding and removing easy local usages.

--

___
Python tracker 

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



[issue32423] The Windows SDK version 10.0.15063.0 was not found

2017-12-23 Thread Isuru Fernando

New submission from Isuru Fernando :

When compiling python 3.6.4 on appveyor using MSVC 2015 following error occurs.

(C:\bld\python_1514037886491\_b_env) 
C:\bld\python_1514037886491\work\Python-3.6.4\PCbuild>"C:\Program Files 
(x86)\MSBuild\14.0\Bin\amd64\MSBuild.exe"  
"C:\bld\python_1514037886491\work\Python-3.6.4\PCbuild\pcbuild.proj" /t:Build 
/m /nologo /v:m /p:Configuration=Release /p:Platform=x64 
/p:IncludeExternals=true /p:IncludeSSL=true /p:IncludeTkinter=true 
/p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe"  
C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5):
 error MSB8036: The Windows SDK version 10.0.15063.0 was not found. Install the 
required version of Windows SDK or change the SDK version in the project 
property pages or by right-clicking the solution and selecting "Retarget 
solution". 
[C:\bld\python_1514037886491\work\Python-3.6.4\PCbuild\pythoncore.vcxproj]

Note that appveyor Visual Studio 2015 image has only 10.0.10586, 10.0.14393 and 
10.0.26624

Here's a simple patch that fixes this on 3.6 branch. 
https://github.com/isuruf/cpython/commit/9432a2c7f63b3bb55e8066e91eade81321154476
I haven't checked that the patch works on a machine with 10.0.15063

--
components: Windows
messages: 308982
nosy: Isuru Fernando, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: The Windows SDK version 10.0.15063.0 was not found
type: compile error
versions: Python 3.6

___
Python tracker 

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



[issue32422] Make OrderedDict can be used for LRU from C

2017-12-23 Thread INADA Naoki

INADA Naoki  added the comment:

Current implementation (no news entry yet):
https://github.com/methane/cpython/pull/10/files

--

___
Python tracker 

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



[issue32422] Make OrderedDict can be used for LRU from C

2017-12-23 Thread INADA Naoki

New submission from INADA Naoki :

Currently, functools.lru_cache implement own doubly-linked list.

But it is inefficient than OrderedDict because each link node is GC object.
So it may eat more memory and take longer GC time.

I added two private C API for OrderedDict and make lru_cache use it.

* _PyODict_LRUGetItem(): Similar to PyDict_GetItemWithHash() + 
od.move_to_end(last=True).
* _PyODict_PopItem():  Similar to odict.popitem().

Why I didn't implement C version of move_to_end() is to reduce lookup.
 _PyODict_LRUGetItem(key) lookup key once while
od[key]; od.move_to_end(key) lookup key twice.

I'll benchmark it and report result here.

--
components: Interpreter Core
messages: 308980
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: Make OrderedDict can be used for LRU from C
versions: Python 3.7

___
Python tracker 

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



[issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups

2017-12-23 Thread Thomas Waldmann

Thomas Waldmann  added the comment:

Embarassing as always to stumble over some stuff and then find a 9y old ticket 
here, where it is discussed and even (almost) solved.

Our ticket: https://github.com/borgbackup/borg/issues/3471

Fixed getfqdn we use now instead of socket.getfqdn():

https://github.com/borgbackup/borg/pull/3484/commits/9b0d0f3127289fc3bbe620e8adce8038ed594e9f#diff-4b53f84e19a3bb376bf2202371ed269aR188

Note: no "else: name = hostname" at the end, that is a bug in the patch 
attached to this ticket (hostname is undefined after applying the patch).

--
nosy: +Thomas.Waldmann

___
Python tracker 

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



[issue32421] Keeping an exception in cache can segfault the interpreter

2017-12-23 Thread Yonatan Zunger

New submission from Yonatan Zunger :

Using the following decorator to memoize a function causes the interpreter to 
segfault on exit if any exceptions were stored in the cache. Changing the bad 
line to instead store copy.copy(e) makes the problem go away.

Almost certainly some kind of problem with the GC of the traceback not 
happening at the moment the interpreter expects it, but I haven't had time to 
investigate any more deeply yet.

def memoize(keyFunc=lambda x: x, cacheExceptions: bool=True):
def wrapper(func):
return _Memo(func, keyFunc, cacheExceptions)
return wrapper

class _Memo(object):
def __init__(self, func, keyFunc, cacheExceptions: bool) -> None:
self.func = func
self.keyFunc = keyFunc
self.cacheExceptions = cacheExceptions
self.lock = threading.Lock()
self.cache = {}

def __call__(self, *args, **kwargs) -> Any:
key = self.keyFunc(*args, **kwargs)
assert isinstance(key, collections.Hashable)
with self.lock:
if key in self.cache:
value = self.cache[key]
if isinstance(value, BaseException):
raise value
return value

try:
result = self.func(*args, **kwargs)
except BaseException as e:
if self.cacheExceptions:
with self.lock:
self.cache[key] = e   # BAD LINE
six.reraise(*sys.exc_info())
else:
with self.lock:
self.cache[key] = result
return result

--
components: Interpreter Core
messages: 308978
nosy: zunger
priority: normal
severity: normal
status: open
title: Keeping an exception in cache can segfault the interpreter
type: crash
versions: Python 3.6

___
Python tracker 

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



[issue32420] LookupError : unknown encoding : [0x7FF092395AD0] ANOMALY

2017-12-23 Thread Kaoru Kitamura

New submission from Kaoru Kitamura :

I tried to activate tensorflow after creating tensorflow environment with 
Anaconda Prompt.
Then, Python clashed in fatal error as attached.

I searched this kind of issues and made environment variable for UTF-8 , but it 
did not work.

Does anyone have any suggestions?

--
components: Windows
files: error_capture.png
messages: 308977
nosy: Kitamura, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: LookupError : unknown encoding : [0x7FF092395AD0] ANOMALY
type: crash
versions: Python 3.6
Added file: https://bugs.python.org/file47346/error_capture.png

___
Python tracker 

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



[issue32402] Coverity: CID 1426868/1426867: Null pointer dereferences in textio.c

2017-12-23 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 4856b0f34a6f4074cd86e66f11a635422374ae98 by INADA Naoki in branch 
'master':
bpo-32402: io: Add missing NULL check. (GH-4971)
https://github.com/python/cpython/commit/4856b0f34a6f4074cd86e66f11a635422374ae98


--

___
Python tracker 

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



[issue28236] In xml.etree.ElementTree Element can be created with empty and None tag

2017-12-23 Thread Gordon P. Hemsley

Gordon P. Hemsley  added the comment:

I disagree. This library is meant to be an interface onto XML syntax, and XML 
has pretty strict requirements on syntax. As msg277125 shows, you're liable to 
get very far downstream before the error becomes apparent.

In addition, I'm finding a number of internal inconsistencies, both between the 
docs and the code and between the Python code and the C code, that demonstrate 
that doing these type checks up front would be beneficial to the entire 
library. (Note: The C code also does not do them.)

--

___
Python tracker 

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



[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-23 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

These should be looked at one at a time (no sweeping search and replace 
missions).

The original author should be consulted when possible (they are in a better 
position to judge whether the original intent was preserved).

Published APIs should not be changed (i.e. you can't just change the default 
argument for configparser).

Docs should be changed carefully (i.e. let Bob Ippolito decide whether he wants 
to change the examples of how to use the object_pairs_hook).

Guido was very clear that you can't just downgrade every occurrence of 
OrderedDict with dict.  Please don't be so aggressive (grepping every 
occurrence in the standard library without giving it individual consideration).

--
nosy: +rhettinger

___
Python tracker 

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



[issue32295] User friendly message when invoking bdist_wheel sans wheel package

2017-12-23 Thread Éric Araujo

Éric Araujo  added the comment:

Will close soon unless someone disagrees.

--
resolution:  -> wont fix
status: open -> pending

___
Python tracker 

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



[issue32419] Add unittest support for pyc projects

2017-12-23 Thread Éric Araujo

Éric Araujo  added the comment:

Could you tell more about these projects?  In current Python 3 pyc files are in 
a __pycache__ sub-directory, not directly in the package dir; what tool 
produces «pyc projects»?

--
nosy: +eric.araujo

___
Python tracker 

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



[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-23 Thread Srinivas Reddy T

Change by Srinivas  Reddy T :


--
pull_requests: +4889

___
Python tracker 

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



[issue32415] Add Task.get_loop() and Future.get_loop()

2017-12-23 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 719ccbca69b21013a783b829de3404b5aa243827 by Yury Selivanov in 
branch 'master':
bpo-32415: Fix "error is already set" (#4999)
https://github.com/python/cpython/commit/719ccbca69b21013a783b829de3404b5aa243827


--

___
Python tracker 

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



[issue32419] Add unittest support for pyc projects

2017-12-23 Thread Bassem Girgis

New submission from Bassem Girgis :

This PR makes it possible to "unittest" projects that are all pyc with no 
__init__.py which is hardcoded in few checks in unittest.loader

--
components: Extension Modules
messages: 308970
nosy: brgirgis
priority: normal
pull_requests: 4888
severity: normal
status: open
title: Add unittest support for pyc projects
type: enhancement
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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-23 Thread Neil Schemenauer

Neil Schemenauer  added the comment:

Ho ho ho!   I spent some time to try to resolve the remaining issues with PR 
4682.  I think everything now works.  Returns from a final body of a 
try/finally was the remaining issue.  I've solved it by introducing the 
POP_NO_EXCEPT opcode.  I added a number of comments to help explain to future 
maintainers what is going on.

The PR still could use some polishing.  I have some test cases to add, to 
trigger the previously buggy try/finally + return case.  Also, I think the 
fblock_unwind_ functions in the compiler could be done more simply. 
 I don't think we need a separate function for each type, just use a case 
statement on the fblock type.  That's a fairly minor detail though.

I would also like to add a bunch more comments.  I've spent many hours figuring 
out how all this stuff works, not that I totally understand everthing.   The 
test case test_contextlib test_exit_exception_with_existing_context() was 
especially brain-busting.  I'm a bit horrified that Python has become so 
complex to support such things.

Anyhow, I'm off for holidays so no time for further polish until after 
Christmas.

--

___
Python tracker 

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



[issue32415] Add Task.get_loop() and Future.get_loop()

2017-12-23 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +4887

___
Python tracker 

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



[issue32418] Implement Server.get_loop() method

2017-12-23 Thread Srinivas Reddy T

Change by Srinivas  Reddy T :


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

___
Python tracker 

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



[issue32415] Add Task.get_loop() and Future.get_loop()

2017-12-23 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset a8fb07978953d3f55cfce836e3669d8b8e82b4c1 by Yury Selivanov in 
branch 'master':
bpo-32415: Add more tests (#4995)
https://github.com/python/cpython/commit/a8fb07978953d3f55cfce836e3669d8b8e82b4c1


--

___
Python tracker 

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



[issue32327] Make asyncio methods documented as coroutines - coroutines.

2017-12-23 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
pull_requests: +4885

___
Python tracker 

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



[issue32415] Add Task.get_loop() and Future.get_loop()

2017-12-23 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +4884

___
Python tracker 

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



[issue32415] Add Task.get_loop() and Future.get_loop()

2017-12-23 Thread Yury Selivanov

Change by Yury Selivanov :


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



[issue32357] Optimize asyncio.iscoroutine() and loop.create_task() for non-native coroutines

2017-12-23 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 0f47fa2c89a6b9a04969219dfb0c3801c611e3ca by Yury Selivanov 
(Andrew Svetlov) in branch 'master':
bpo-32357: Use PySet_GET_SIZE macro in _is_coroutine() from _asynciomodule.c  
(#4990)
https://github.com/python/cpython/commit/0f47fa2c89a6b9a04969219dfb0c3801c611e3ca


--

___
Python tracker 

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



[issue32360] Save OrderedDict imports in various stdlibs.

2017-12-23 Thread Srinivas Reddy T

Change by Srinivas  Reddy T :


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

___
Python tracker 

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



[issue32415] Add Task.get_loop() and Future.get_loop()

2017-12-23 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset ca9b36cd1a384e5ecb56d9df9a59144240353ef0 by Yury Selivanov in 
branch 'master':
bpo-32415: Add asyncio.Task.get_loop() and Future.get_loop() (#4992)
https://github.com/python/cpython/commit/ca9b36cd1a384e5ecb56d9df9a59144240353ef0


--

___
Python tracker 

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



[issue32404] fromtimestamp does not call __new__ in datetime subclasses

2017-12-23 Thread Paul Ganssle

Change by Paul Ganssle :


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

___
Python tracker 

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



[issue32403] date, time and datetime alternate constructors should take fast construction path

2017-12-23 Thread Paul Ganssle

Change by Paul Ganssle :


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

___
Python tracker 

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



[issue26666] File object hook to modify select(ors) event mask

2017-12-23 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Out of asynio library scope.

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



[issue29780] Interpreter hang on self._epoll.poll(timeout, max_ev)

2017-12-23 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

I see no hang in attached snapshot but notmal behavior.

asyncio iterates over epoll.poll constantly waiting for network events or 
timeout.

Closing the issue.

--
nosy: +asvetlov
resolution:  -> works for me
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



[issue32418] Implement Server.get_loop() method

2017-12-23 Thread Andrew Svetlov

New submission from Andrew Svetlov :

Future and Task will have the method (bpo-32415)
AbstractServer and Server should support it too.

--
components: Library (Lib), asyncio
messages: 308963
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Implement Server.get_loop() method
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue32417] fromutc does not respect datetime subclasses

2017-12-23 Thread Paul Ganssle

Paul Ganssle  added the comment:

I've noticed that there's another complicating factor here, which is that 
addition of `timedelta` does not respect subclasses either, which means that 
third party libraries implementing fromutc (as was recommended in issue 28602), 
who will likely make use of timedelta addition, are going to have a harder time 
providing something that respects subclass.

--

___
Python tracker 

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



[issue32417] fromutc does not respect datetime subclasses

2017-12-23 Thread Paul Ganssle

New submission from Paul Ganssle :

When preparing some tests for how subclasses of date and datetime react as part 
of a fix for issue 32403, I noticed a fairly big example of where subclass is 
not preserved - `tzinfo.fromutc`:

from datetime import datetime, timezone

class DateTimeSubclass(datetime):
pass

dt = DateTimeSubclass(2012, 1, 1)
dt2 = dt.astimezone(timezone.utc)

print(type(dt))
print(type(dt2))

# Result:
# 
# 

This also affects `datetime.fromtimestamp` and `datetime.now`, since both of 
these, when passed a time zone argument, will call `fromutc` internally. I 
personally think that Python's `tzinfo.fromutc` should preserve the object's 
class, but this *is* counter to the current API.

And either way, it's quite inconsistent to have `DateTimeSubclass.now()` return 
`DateTimeSubclass` but have `DateTimeSubclass.now(timezone.utc)` return 
`datetime.datetime`.

There is probably a somewhat inelegant way to get the alternate constructors 
working properly (ignore the type of the argument up until the last return and 
then construct the subclass from the components of the datetime), but I think 
it might be better to fix the behavior of tzinfo.fromutc.

Somewhat related to issue 32404 and 31222, in that this concerns which 
operations preserve type in subclasses.

--
messages: 308961
nosy: belopolsky, p-ganssle
priority: normal
severity: normal
status: open
title: fromutc does not respect datetime subclasses
versions: Python 3.5, 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



[issue32415] Add Task.get_loop() and Future.get_loop()

2017-12-23 Thread Yury Selivanov

Change by Yury Selivanov :


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

___
Python tracker 

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



[issue32357] Optimize asyncio.iscoroutine() and loop.create_task() for non-native coroutines

2017-12-23 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 558aa30f7971e087c4a00b1f49cc2ef3195c01ca by Yury Selivanov in 
branch 'master':
bpo-32357: Fix tests in refleak mode (#4989)
https://github.com/python/cpython/commit/558aa30f7971e087c4a00b1f49cc2ef3195c01ca


--

___
Python tracker 

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



[issue32416] Refactor and add new tests for the f_lineno setter

2017-12-23 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-23 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
dependencies: +Refactor and add new tests for the f_lineno setter

___
Python tracker 

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



[issue32416] Refactor and add new tests for the f_lineno setter

2017-12-23 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

Proposed PR refactors existing tests for the f_lineno setter and adds few new 
tests. This will help to avoid regressions in issue17611.

I have found that some illegal jumps are not prohibited. They can lead to 
crashes or weird behavior. For example jumps to or from the bare except block. 
This will be fixed in a separate issue.

--
components: Tests
messages: 308959
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Refactor and add new tests for the f_lineno setter
type: enhancement
versions: Python 2.7, 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



[issue32415] Add Task.get_loop() and Future.get_loop()

2017-12-23 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Agree

--

___
Python tracker 

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



[issue32415] Add Task.get_loop() and Future.get_loop()

2017-12-23 Thread Yury Selivanov

New submission from Yury Selivanov :

Currently, asyncio code accesses Future._loop and Task._loop property to 
validate the event loop and implement functions like "Task.all_tasks()".  So 
the "_loop" is a semi-official public API that other Task & Future 
implementations must follow in order to be compatible with asyncio code.

I propose to add Future.get_loop() and Task.get_loop() methods, and 
soft-deprecate ._loop property.

--
assignee: yselivanov
components: asyncio
messages: 308957
nosy: asvetlov, yselivanov
priority: normal
severity: normal
status: open
title: Add Task.get_loop() and Future.get_loop()
versions: Python 3.7

___
Python tracker 

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



[issue32357] Optimize asyncio.iscoroutine() and loop.create_task() for non-native coroutines

2017-12-23 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
pull_requests: +4878

___
Python tracker 

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



[issue32357] Optimize asyncio.iscoroutine() and loop.create_task() for non-native coroutines

2017-12-23 Thread Yury Selivanov

Change by Yury Selivanov :


--
pull_requests: +4877

___
Python tracker 

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



[issue32412] help() of bitwise operators should mention sets as well

2017-12-23 Thread R. David Murray

R. David Murray  added the comment:

Which help are you talking about?  The Operator Precedence table that you get 
if you do, eg: help('&')?  I don't think it would be appropriate to mention 
specialized uses of the operators there, although perhaps we could add a 
general note about operator overloading in the intro paragraph and use set as 
the example.  Looking at help('BITWISE'), we could add 'when the arguments are 
numbers' after the precedence table, but since that section is called 'bitwise' 
I don't think we even want to mention set there.  Did you have other sections 
in mind?

--
nosy: +r.david.murray

___
Python tracker 

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



[issue31106] os.posix_fallocate() generate exception with errno 0

2017-12-23 Thread Марк Коренберг

Марк Коренберг  added the comment:

Yes, I can. Should I create new PR ? to which branch ?

--

___
Python tracker 

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



[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2017-12-23 Thread Michael Felt

Michael Felt  added the comment:

will open a new PR for ./Doc/library/ctypes.rst

--

___
Python tracker 

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



[issue32399] _uuidmodule.c cannot build on AIX - different typedefs of uuid_t, etc..

2017-12-23 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Does this approach allow test_uuid to pass for you?

--

___
Python tracker 

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



[issue32399] _uuidmodule.c cannot build on AIX - different typedefs of uuid_t, etc..

2017-12-23 Thread Michael Felt

Michael Felt  added the comment:

As the 'basics' seem to be 'accepted', going to work on the PR so that 
configure.ac can prepare the right choices, rather than rely on a hard-coded 
_AIX determined macro.

--

___
Python tracker 

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



[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2017-12-23 Thread Roundup Robot

Change by Roundup Robot :


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

___
Python tracker 

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



[issue32414] PyCapsule_Import fails when name is in the form 'package.module.capsule'

2017-12-23 Thread lekma

New submission from lekma :

When capsule name is in the form 'package.module.capsule', PyCapsule_Import 
fails with an AttributeError (module is never an attribute of package).

--
components: Interpreter Core
messages: 308950
nosy: lekma
priority: normal
severity: normal
status: open
title: PyCapsule_Import fails when name is in the form 'package.module.capsule'
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue32413] Document that locals() may return globals()

2017-12-23 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

FWIW, this isn't a quirk of how locals() works.  Instead, it reflects the more 
interesting reality that at the top level, locals and globals *are* the same 
dictionary.   Also, that is not the only occurrence -- if exec() is called with 
only one dictionary, that dict is used for both locals and globals.

--

___
Python tracker 

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



[issue32413] Document that locals() may return globals()

2017-12-23 Thread Raymond Hettinger

Change by Raymond Hettinger :


--
nosy: +rhettinger

___
Python tracker 

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