[issue34588] traceback formatting can drop a frame

2018-09-05 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Further investigation reveals this is a general off-by-one error with the 
recursive traceback pruning feature.

--
components: +Interpreter Core
title: traceback module can drop a frame -> traceback formatting can drop a 
frame

___
Python tracker 

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



[issue34594] Some tests use hardcoded errno values

2018-09-05 Thread Zackery Spytz


Change by Zackery Spytz :


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

___
Python tracker 

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



[issue34594] Some tests use hardcoded errno values

2018-09-05 Thread Zackery Spytz


New submission from Zackery Spytz :

test_spwd.py and test_tabnanny.py use hardcoded errno values when they test 
some exception messages.

--
components: Tests
messages: 324662
nosy: ZackerySpytz
priority: normal
severity: normal
status: open
title: Some tests use hardcoded errno values
type: behavior
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



[issue34586] collections.ChainMap should have a get_where method

2018-09-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I haven't run across this requirement before but it does seem plausible that a 
person might want to know which underlying mapping found a match (compare with 
the "which" utility in Bash). On the other hand, we haven't had requests for 
anything like this for other lookup chains such as determining where a variable 
appears in the sequence locals-to-nested-scopes-to-globals-to-builtins.

Also, I'm not sure I like the proposed API (the method name and signature).  
Perhaps, this should be a docs recipe for a ChainMap subclass or be an example 
of a standalone search function that the takes the *maps* attribute as one of 
its arguments.  Will discuss this with the other core devs to get their 
thoughts.

--

___
Python tracker 

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



[issue34590] "Logging HOWTO" should share an example of best practices for using logging in a library

2018-09-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, I think the practices vary somewhat widely and that none of your 
questions have generally agreed upon answers.  Part of the reason that there 
are so many ways to go is that the package was modeled after Java APIs where 
the practices and needs were also widely varied.  Given the absence of 
clear-cut best practices, the docs should probably defer to StackOverflow and 
various blog posts.

--
nosy: +rhettinger

___
Python tracker 

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



[issue34566] pipe read sometimes returns EOF but returncode is still None

2018-09-05 Thread Martin Panter


Martin Panter  added the comment:

You probably only need to call "wait" once. That blocks the thread until it 
gets a result, so it is more CPU-efficient than calling "poll" in a busy loop.

Since you open a separate pipe for "stderr" in script.py, but don't do anything 
with it, there could be a deadlock with the child writing to the stderr pipe 
versus the parent reading from "stdout" or waiting for the exit status.

I guess your script is an approximation of the "sos" application. I don't have 
time to understand everything it is trying to do, but I added some comments at 
.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2018-09-05 Thread hongweipeng


hongweipeng  added the comment:

Multi-process need uses multiprocessing.Manager to share, the current problem 
should be tee-objcet thread safety issue.As Xiang Zhang said,`PyIter_Next` in 
`teedataobject_getitem` releases GIL.So the thread lock is necessary,and only 
lead iterator uses it when runs `PyIter_Next`.Can anyone help me review it.

--
nosy: +hongweipeng

___
Python tracker 

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



[issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL

2018-09-05 Thread hongweipeng


Change by hongweipeng :


--
keywords: +patch
pull_requests: +8533
stage: needs patch -> patch review

___
Python tracker 

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



[issue34593] Missing inttypes.h

2018-09-05 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

Python 3.6 requires a C compiler that supports C99. So, not MSVC 2012.

--
nosy: +benjamin.peterson
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



[issue34593] Missing inttypes.h

2018-09-05 Thread Gary Simpson


New submission from Gary Simpson :

I started with Anaconda3 (python3.64). When I add #include "python.h" to my C++ 
code, I get the visual studio 2012 compile error:
anaconda3\include\pyport.h(6): fatal error C1083: Cannot open include file: 
'inttypes.h': No such file or directory

I then installed python 3.7, and put that include directory into my project. 
But I get the same error when I try to compile. 
python.h calls pyport.h, which tries to call inttypes.h, which it can't find. I 
searched and cannot find inttypes.h anywhere on my computer.

--
messages: 324656
nosy: garyrsimpson
priority: normal
severity: normal
status: open
title: Missing inttypes.h
type: compile error
versions: 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



[issue34486] "RuntimeError: release unlocked lock" when starting a thread

2018-09-05 Thread Vladimir Matveev


Vladimir Matveev  added the comment:

I agree. From code in threading.Condition.wait looks like if it is interrupted 
either after calling _release_save and before entering try block or in finally 
block before calling _acquire_restore - it will leave the lock in non-acquired 
state. 

First part in theory can be solved if _release_save is moved into try block and 
instead of returning saved_state as a result it will accept reference to 
saved_state local and set it in C code.

Second part looks more interesting ... :)

--
nosy: +v2m

___
Python tracker 

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



[issue34592] cdll.LoadLibrary allows None as an argument

2018-09-05 Thread Sergei Lebedev


New submission from Sergei Lebedev :

LoadLibrary in Python 2.7 through 3.7 accepts None as an argument. I wonder if 
this has been allowed for a reason? If not, it should probably be changed to 
raise a TypeError instead.

>>> ctypes.cdll.LoadLibrary(None)


Interestingly, on Python 2.7 LoadLibrary explicitly mentions None as allowed in 
the error message:

>>> ctypes.cdll.LoadLibrary(42)
Traceback (most recent call last):
  File "", line 1, in 
  File "[...]/ctypes/__init__.py", line 444, in LoadLibrary
return self._dlltype(name)
  File "[...]/ctypes/__init__.py", line 366, in __init__
self._handle = _dlopen(self._name, mode)
TypeError: dlopen() argument 1 must be string or None, not int

A side-effect of None being allowed is that chaining find_library and 
LoadLibrary is error-prone:

>>> ctypes.cdll.LoadLibrary(find_library("foobar"))


--
messages: 324654
nosy: superbobry
priority: normal
severity: normal
status: open
title: cdll.LoadLibrary allows None as an argument
versions: Python 2.7, Python 3.4, Python 3.5, 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



[issue34591] smtplib mixes RFC821 and RFC822 addresses

2018-09-05 Thread Quae Quack


New submission from Quae Quack :

smtplib.sendmsg is documented to take RFC822 addresses. and e.g. if the 
`to_addrs` argument isn't provided then it gets the To address directly from 
the headers (which is in RFC822 form).

However it then proceeds to use it as an RFC821 address and sends it over the 
SMTP connection. 
https://github.com/python/cpython/blob/874809ea389e6434787e773a6054a08e0b81f734/Lib/smtplib.py#L542

--
components: Library (Lib)
messages: 324653
nosy: Quae Quack
priority: normal
severity: normal
status: open
title: smtplib mixes RFC821 and RFC822 addresses
type: security

___
Python tracker 

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



[issue34590] "Logging HOWTO" should share an example of best practices for using logging in a library

2018-09-05 Thread Nathaniel Manista


New submission from Nathaniel Manista :

https://docs.python.org/3.8/howto/logging.html#configuring-logging-for-a-library
 is a bit too short and doesn't answer some questions that I have as a library 
author about the best ways to use logging in a library.

Should I make use of a single logger object in my library, multiple loggers in 
a tree, or multiple unrelated loggers? Since I have just one public module, I'm 
tempted to say that I should just use one logger object.

Should I present as part of my public API the name of the logger object(s) 
used? Probably - the documentation starts with "When developing a library which 
uses logging, you should take care to document how the library uses logging - 
for example, the names of loggers used.". But should I also include the logger 
objects in my API? If an application wants to reach my logger, why should they 
use "logging.getLogger()" rather than 
"my_library.LOGGER"?

Should I use my library's fully-qualified name as the name of its logger? This 
seems like a great idea because it's unlikely to bring up any new conflicts. Is 
it a best practice? Is there any better practice?

The "Configuring Logging for a Library" text could answer these questions, and 
maybe it should, but... I really think a toy library example that library 
authors could follow would also help a great deal.

--
assignee: docs@python
components: Documentation
messages: 324652
nosy: Nathaniel Manista, docs@python
priority: normal
severity: normal
status: open
title: "Logging HOWTO" should share an example of best practices for using 
logging in a library
type: enhancement
versions: Python 2.7, Python 3.4, 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



[issue34589] Py_Initialize() and Py_Main() should not enable C locale coercion

2018-09-05 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue34561] Replace list sorting merge_collapse()?

2018-09-05 Thread Koos Zevenhoven

Koos Zevenhoven  added the comment:

Haha ok. Cache optimization makes it pretty complicated to reason about true 
costs. Anyway, it’s not obvious to me even that the run lengths would need to 
be descending for best performace. I’m not even starting to think about how the 
merging order might affect galloping boosts on realistic data ;-). I didn’t get 
to that power thing at this point, but it looks like it’s unrelated to this 
consideration, except perhaps by chance. I might have time tonight to have a 
look at that. Surely we don’t want an algorithm that’s optimized for what they 
call ”Timsort drag” sequences in the literature ;-).

--

___
Python tracker 

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



[issue34589] Py_Initialize() and Py_Main() should not enable C locale coercion

2018-09-05 Thread STINNER Victor


New submission from STINNER Victor :

According to Nick Coghlan, author of the PEP 538, the C locale coercion should 
not be enabled by Py_Initialize() and Py_Main(), only by the python3 program.

Attached PR fix this issue.

--
components: Interpreter Core
messages: 324649
nosy: vstinner
priority: normal
severity: normal
status: open
title: Py_Initialize() and Py_Main() should not enable C locale coercion
versions: 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



[issue34574] OrderedDict iterators are exhausted during pickling

2018-09-05 Thread Josh Rosenberg


Josh Rosenberg  added the comment:

This would presumably be a side-effect of all generic pickling operations of 
iterators; figuring out what the iterator produces requires running out the 
iterator. You could special case it case-by-case, but that just makes the 
behavior unreliable/confusing; now some iterators pickle without being mutated, 
and others don't. Do you have a proposal to fix it? Is it something that needs 
to be fixed at all, when the option to pickle the original OrderedDict directly 
is there?

--
nosy: +josh.r

___
Python tracker 

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



[issue34588] traceback module can drop a frame

2018-09-05 Thread Benjamin Peterson


New submission from Benjamin Peterson :

Consider the following script:
import traceback

def fill_stack(depth):
if depth <= 1:
return traceback.format_stack()
else:
return fill_stack(depth - 1)

assert fill_stack(4) != fill_stack(5)

On the Python 3 versions I tested, this script doesn't fail! Somehow traceback 
is producing identical tracebacks for different callstacks.

--
components: Library (Lib)
messages: 324648
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: traceback module can drop a frame
type: behavior
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



[issue34549] unittest docs could use another header

2018-09-05 Thread Nick


Change by Nick :


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



[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-05 Thread Pekka Klärck

Pekka Klärck  added the comment:

My concerns with the behavior of `__origin__` possibly changing in the future 
seem to valid. In Python 3.5 and 3.6 the behavior is 

List.__origin__ is None
List[int].__origin__ is List

while in Python 3.7

List.__origin is list
List[int].__origin__ is list

Is it likely that this is going to change again or can I rely on the current 
behavior with Python 3.7+?

--

___
Python tracker 

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



[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

2018-09-05 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue34549] unittest docs could use another header

2018-09-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

You're welcome. Feel free to close this if it answers your question.

Thanks

--

___
Python tracker 

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



[issue34586] collections.ChainMap should have a get_where method

2018-09-05 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee:  -> rhettinger
nosy: +rhettinger

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2018-09-05 Thread Zachary Ware


Zachary Ware  added the comment:

This one has nothing to do with Cygwin, this is about minimizing patching that 
IronPython (or other implementations) have to do to standard library modules.

--

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:

I don't think that we should backport this change to 3.7 and older.

I understand that the change is about supporting Cygwin. My policy to support a 
new platform is always the same: first fix *all* issues in master, get a 
working CI, find a core developer responsible to fix all issues specific to 
this platform, and only after that we can start discussing about backporting 
specific changes for that platform.

https://pythondev.readthedocs.io/cpython.html#i-want-cpython-to-support-my-platform

--

___
Python tracker 

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



[issue34584] subprocess

2018-09-05 Thread Joseph


New submission from Joseph :

Every time IDLE is opened this message "IDLE's subprocess didn't make 
connection.  Either IDLE can't start a subprocess or personal firewall software 
is blocking the connection" shows up.
When I open IDLE through .py programs the app crashes
crash code:
Process:   Python [5021]
Path:  /Applications/Python 3.7/IDLE.app/Contents/MacOS/Python
Identifier:org.python.IDLE
Version:   3.7.0 (3.7.0)
Code Type: X86-64 (Native)
Parent Process:??? [1]
Responsible:   Python [5021]
User ID:   501

Date/Time: 2018-09-05 17:09:24.893 +0800
OS Version:Mac OS X 10.13.4 (17E199)
Report Version:12
Anonymous UUID:01609E2F-27A5-CB5F-4612-5BA977830EA2

Sleep/Wake UUID:   30FAEA7D-EBF8-44D0-AE53-A40B0636777A

Time Awake Since Boot: 87000 seconds
Time Since Wake:   510 seconds

System Integrity Protection: enabled

Crashed Thread:0  Dispatch queue: com.apple.main-thread

Exception Type:EXC_CRASH (SIGABRT)
Exception Codes:   0x, 0x
Exception Note:EXC_CORPSE_NOTIFY

Termination Reason:Namespace OBJC, Code 0x1

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib  0x000101922ed6 __abort_with_payload 
+ 10
1   libsystem_kernel.dylib  0x00010191d2cf 
abort_with_payload_wrapper_internal + 89
2   libsystem_kernel.dylib  0x00010191d276 abort_with_reason + 
22
3   libobjc.A.dylib 0x000100e16962 
_objc_fatalv(unsigned long long, unsigned long long, char const*, 
__va_list_tag*) + 108
4   libobjc.A.dylib 0x000100e16814 _objc_fatal(char 
const*, ...) + 135
5   libobjc.A.dylib 0x000100e21f63 (anonymous 
namespace)::AutoreleasePoolPage::busted(bool) + 123
6   libobjc.A.dylib 0x000100e09da5 (anonymous 
namespace)::AutoreleasePoolPage::pop(void*) + 79
7   com.apple.CoreFoundation0x000100047a56 
_CFAutoreleasePoolPop + 22
8   com.apple.Foundation0x000103ee28ad -[NSAutoreleasePool 
drain] + 144
9   com.apple.Foundation0x000103f165a4 
_NSAppleEventManagerGenericHandler + 120
10  com.apple.AE0x00010a9ccdd0 
aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) + 
1788
11  com.apple.AE0x00010a9cc677 
dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 41
12  com.apple.AE0x00010a9cc565 aeProcessAppleEvent 
+ 383
13  com.apple.HIToolbox 0x0001078ad4a0 AEProcessAppleEvent 
+ 55
14  com.apple.AppKit0x0001045e1d32 _DPSNextEvent + 2788
15  com.apple.AppKit0x000104d77e34 
-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] 
+ 3044
16  libtk8.6.dylib  0x000103d4594a 
-[TKApplication(TKNotify) nextEventMatchingMask:untilDate:inMode:dequeue:] + 44
17  com.apple.AppKit0x000104813e7b -[NSApplication 
_doModalLoop:peek:] + 476
18  com.apple.AppKit0x0001049f8c9f __35-[NSApplication 
runModalForWindow:]_block_invoke_2 + 64
19  com.apple.AppKit0x0001049f8c4c __35-[NSApplication 
runModalForWindow:]_block_invoke + 75
20  com.apple.AppKit0x000104ea7219 _NSTryRunModal + 100
21  com.apple.AppKit0x000104811911 -[NSApplication 
runModalForWindow:] + 133
22  com.apple.AppKit0x0001049e6eab __19-[NSAlert 
runModal]_block_invoke_2 + 158
23  com.apple.AppKit0x0001049e6dfa __19-[NSAlert 
runModal]_block_invoke + 75
24  com.apple.AppKit0x000104ea7219 _NSTryRunModal + 100
25  com.apple.AppKit0x000104886609 -[NSAlert runModal] 
+ 124
26  libtk8.6.dylib  0x000103d32f31 Tk_MessageBoxObjCmd 
+ 2098
27  libtcl8.6.dylib 0x000103b12f08 TclNRRunCallbacks + 
58
28  _tkinter.cpython-37m-darwin.so  0x000101beebf7 Tkapp_Call + 183
29  org.python.python   0x00010077aa7b 
cfunction_call_varargs + 299
30  org.python.python   0x000100856376 
_PyEval_EvalFrameDefault + 28614
31  org.python.python   0x00010084e740 
_PyEval_EvalCodeWithName + 3088
32  org.python.python   0x00010077a50a 
_PyFunction_FastCallKeywords + 218
33  org.python.python   0x00010084f04f call_function + 671
34  org.python.python   0x00010085243d 
_PyEval_EvalFrameDefault + 12429
35  org.python.python   0x00010084e740 
_PyEval_EvalCodeWithName + 3088
36  org.python.python   0x00010077a795 
_PyFunction_FastCallDict + 469
37  

[issue34587] test_socket: testCongestion() hangs on my Fedora 28

2018-09-05 Thread STINNER Victor


New submission from STINNER Victor :

Hi,

test_socket started to hang recently on my Fedora 28 laptop. No idea why it 
started to hang.

vstinner@apu$ ./python -m test -v test_socket -m testCongestion --timeout=5
== CPython 3.8.0a0 (heads/master-dirty:39487196c8, Sep 4 2018, 23:08:20) [GCC 
8.1.1 20180712 (Red Hat 8.1.1-5)]
== Linux-4.17.19-200.fc28.x86_64-x86_64-with-glibc2.26 little-endian
== cwd: /home/vstinner/prog/python/master/build/test_python_29510
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 1.34 [1/1] test_socket
testCongestion (test.test_socket.RDSTest) ... Timeout (0:00:05)!
Thread 0x7fccf51b1700 (most recent call first):
  File "/home/vstinner/prog/python/master/Lib/test/test_socket.py", line 2074 
in _testCongestion
  File "/home/vstinner/prog/python/master/Lib/test/test_socket.py", line 332 in 
clientRun

Thread 0x7fcd082ee080 (most recent call first):
  File "/home/vstinner/prog/python/master/Lib/threading.py", line 296 in wait
  File "/home/vstinner/prog/python/master/Lib/threading.py", line 552 in wait
  File "/home/vstinner/prog/python/master/Lib/test/test_socket.py", line 2059 
in testCongestion
  File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 610 in run
  File "/home/vstinner/prog/python/master/Lib/unittest/case.py", line 658 in 
__call__
  File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122 in 
run
  File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 122 in 
run
  File "/home/vstinner/prog/python/master/Lib/unittest/suite.py", line 84 in 
__call__
  File "/home/vstinner/prog/python/master/Lib/unittest/runner.py", line 176 in 
run
  File "/home/vstinner/prog/python/master/Lib/test/support/__init__.py", line 
1900 in _run_suite
  File "/home/vstinner/prog/python/master/Lib/test/support/__init__.py", line 
1990 in run_unittest
  File "/home/vstinner/prog/python/master/Lib/test/test_socket.py", line 6032 
in test_main
  File "/home/vstinner/prog/python/master/Lib/test/libregrtest/runtest.py", 
line 179 in runtest_inner
  File "/home/vstinner/prog/python/master/Lib/test/libregrtest/runtest.py", 
line 140 in runtest
  File "/home/vstinner/prog/python/master/Lib/test/libregrtest/main.py", line 
384 in run_tests_sequential
  File "/home/vstinner/prog/python/master/Lib/test/libregrtest/main.py", line 
488 in run_tests
  File "/home/vstinner/prog/python/master/Lib/test/libregrtest/main.py", line 
566 in _main
  File "/home/vstinner/prog/python/master/Lib/test/libregrtest/main.py", line 
531 in main
  File "/home/vstinner/prog/python/master/Lib/test/libregrtest/main.py", line 
584 in main
  File "/home/vstinner/prog/python/master/Lib/test/__main__.py", line 2 in 

  File "/home/vstinner/prog/python/master/Lib/runpy.py", line 85 in _run_code
  File "/home/vstinner/prog/python/master/Lib/runpy.py", line 193 in 
_run_module_as_main

--
components: Tests
messages: 324643
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_socket: testCongestion() hangs on my Fedora 28
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



[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-05 Thread Pekka Klärck

Pekka Klärck  added the comment:

While studying the types in the typing module more, I noticed they have a 
special `__origin__` attribute which seems to contain the "real" type they 
represent. I was able to make my type conversion code to work by adding these 
lines:

if hasattr(type_, '__origin__'):
type_ = type_.__origin__

All our tests pass with this simple fix, but I'm slightly worried using it 
because `__origin__` doesn't seem to be documented. This means I'm not sure is 
my usage OK and, more importantly, makes me worried that another change in 
typing changes the behavior or removes the attribute altogether. Hopefully 
someone with more insight on this can comment my worries. Perhaps the attribute 
should also be documented as discussed earlier: 
https://github.com/python/typing/issues/335

I'd also be a little bit happier with the above fix if I could write it like

if isinstance(type_, typing.SomeBaseType):
type_ = type_.__origin__

but apparently types in the typing module don't have any public base class. I 
guess odds that some unrelated class would have `__origin__` defined is small 
enough that using `hasattr(type_, '__origin__')` is safe.

--

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2018-09-05 Thread Zachary Ware


Zachary Ware  added the comment:

The real question isn't "are we on Windows?" but rather "should we use 
msvcrt/_winapi or _posixsubprocess/select?", which is what my PR is designed to 
better fit.  I could see how we wouldn't want to backport that patch to 
maintenance branches, though; it's a significant rearrangement.  If we do want 
to backport *a* fix, I agree that simply adding `or os.name == 'nt'` should be 
sufficiently low-impact.

--

___
Python tracker 

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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:

I chose to merge the simplest change:

-path = os.environ['PATH']
+path = os.environ.get('PATH', os.defpath)

And I added unit tests for find_executable(). The bug is now fixed.

I'm not longer interested to reuse shutil.which() in 
distutils.find_executable(), since find_executable() first checks if the 
executable is in the current directory.

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks everybody! The issue should now be fixed in all supported branches ;-)

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9734024ec65311e33936faa83fb1cb249ef0de9d by Victor Stinner (Miss 
Islington (bot)) in branch '2.7':
bpo-26544: Get rid of dependence from distutils in platform. (GH-8356) (GH-8952)
https://github.com/python/cpython/commit/9734024ec65311e33936faa83fb1cb249ef0de9d


--

___
Python tracker 

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



[issue26544] platform.libc_ver() returns incorrect version number

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1a3eb125dc07a28a5af62446778ed7cca95ed3da by Victor Stinner (Miss 
Islington (bot)) in branch '3.6':
[3.7] bpo-26544: Get rid of dependence from distutils in platform. (GH-8356) 
(GH-8970) (GH-9061)
https://github.com/python/cpython/commit/1a3eb125dc07a28a5af62446778ed7cca95ed3da


--

___
Python tracker 

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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e2c1657dff86decf1e232b66e766d2e51381109c by Victor Stinner (Miss 
Islington (bot)) in branch '3.6':
bpo-34530: Fix distutils find_executable() (GH-9049) (GH-9057)
https://github.com/python/cpython/commit/e2c1657dff86decf1e232b66e766d2e51381109c


--

___
Python tracker 

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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8531

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 635461fca5e90c6e091f1e5b46adafc0d28bf0e2 by Zachary Ware in 
branch '3.6':
[3.6] bpo-34575: Build with only VS2015 on AppVeyor (GH-9066)
https://github.com/python/cpython/commit/635461fca5e90c6e091f1e5b46adafc0d28bf0e2


--

___
Python tracker 

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



[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-05 Thread Pekka Klärck

Pekka Klärck  added the comment:

Thanks for the PEP-560 reference. It explains the reasoning for the underlying 
changes, performance, and also mentions backwards incompatibility problems, 
including `issubclass(List[int], List)` causing a TypeError. It doesn't mention 
that `issubclass(List, list)` also raises a TypeError, though, nor that 
`isinstance(List, type)` now returns False.

I understand changing the implementation for performance reason, but I don't 
understand why that would require changing the behavior of `isinstance` and 
`issubclass`. The PEP explicitly mentions that the new `types.resolved_base` 
isn't called by them without explaining why. I guess that could be for 
performance reasons, but even then types in the typing could themselves 
implement `__instancecheck__` and `__subclasscheck__` and retain the old 
behavior. Or is there some actual reason for changing the behavior?

--

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:

Discussion on python-dev:
https://mail.python.org/pipermail/python-dev/2018-September/155075.html

--

___
Python tracker 

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



[issue34586] collections.ChainMap should have a get_where method

2018-09-05 Thread Zahari Dim


New submission from Zahari Dim :

When using ChainMap I have frequently needed to know the mapping inside the list
that contains the effective instance of a particular key. I have needed this
when using ChainMap to contain a piece of configuration with multiple sources,
like for example

```
from mycollections import ChainMap
configsources = ["Command line", "Config file", "Defaults"]
config = ChainMap(config_from_commandline(), config_from_file(),
  default_config())

class BadConfigError(Exception): pass
def get_key(key):
try:
index, value = config.get_where(key)
except KeyError as e:
raise BadConfigError(f"No such key: '{key}'") from e
try:
result = validate(key, value)
except ValidationError as e:
raise BadConfigError(f"Key '{key}' defined in {configsources[index] }"
 f"is invalid: {e}") from e
return result
```

I have also needed this when implementing custom DSLs (e.g. specifying which
context is a particular construct allowed to see).

I think this method would be generally useful for the ChainMap class and
moreover the best way of implementing it I can think of is  by copying the
`__getitem__` method and retaining the index:

```
class ChainMap(collections.ChainMap):
def get_where(self, key):
for i, mapping in enumerate(self.maps):
try:
return i, mapping[key] # can't use 'key in mapping' 
with defaultdict
except KeyError:
pass
return self.__missing__(key)# support subclasses that 
define __missing__
```

I'd be happy to write a patch that does just this.

--
components: Library (Lib)
messages: 324632
nosy: Zahari.Dim
priority: normal
severity: normal
status: open
title: collections.ChainMap should have a get_where method
type: enhancement
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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Zachary Ware


Change by Zachary Ware :


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

___
Python tracker 

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



[issue34577] imaplib Cyrillic password

2018-09-05 Thread Nikita Velykanov


Nikita Velykanov  added the comment:

It works. Thanks a lot!

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



[issue34481] Different behavior of C and Python impls of datetime.strftime with non-UTF-8-encodable strings

2018-09-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

I've left a mostly finished PR on #8983, but I've decided it's not really worth 
continuing to work on. Anyone can feel free to take it and run with it if they 
want to implement the fix for this.

As Alexey mentions, that PR indeed already fixes this bug, I mainly blocked on 
getting consistent behavior across all platforms. Currently that PR has 
consistent behavior across all platforms if you disable wcsftime *except* 
Ubuntu 14.0, which seems to have some kind of funky bug in wcstombs, though for 
the life of me I don't know how to consistently trigger it. I suspect that 
using strftime instead of wcsftime on all platforms would lead to simpler code 
that works most consistently, but I am guessing wcsftime is faster.

Another option is to use wsftime but fall back to strftime on MacOS in the 
event that the error condition (blank output from non-blank input) is detected.

--

___
Python tracker 

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



[issue34584] subprocess

2018-09-05 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm not to happy about the crash, the interpreter shouldn't crash like this. 
This may well be Tk related though.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> pending
type:  -> crash

___
Python tracker 

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



[issue7727] xmlrpc library returns string which contain null ( \x00 )

2018-09-05 Thread Fredrik Larsen


Change by Fredrik Larsen :


--
nosy: +fredrikhl

___
Python tracker 

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



[issue34584] subprocess

2018-09-05 Thread Joseph


Joseph  added the comment:

Problem saved... turns out I saved a math.py file in my python location and 
thats what cause the crash. when i remove the math.py file or change its name, 
python got back to work. thanks

--

___
Python tracker 

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



[issue34584] subprocess

2018-09-05 Thread Joseph


Change by Joseph :


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



[issue34585] Don't use AC_RUN_IFELSE to determine float endian

2018-09-05 Thread Ross Burton


New submission from Ross Burton :

Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of floats 
and doubles.  This hurts when cross-compiling because a default is set, 
resulting in Python silently falling back to sub-optimal codepaths.

A partial improvement would be to not set a fallback, to force the user to set 
the right byte order explicitly.

However this test can be done without running anything.  autoconf-archive has a 
macro that uses a carefully constructed double that encodes to an ASCII string 
in the binary, which is then examined using grep.  Evil genius.

Attached is a POC using this.  Currently the autoconf-archive macro only 
handles big and little endian not the ARM OABI mixed-endian format, so 
configure.ac assumes if the byte order is unknown then it's the crazy 
mixed-endian.

To be honest OABI is so old now, I don't believe anyone actually uses it 
anymore: everyone still on ARMv4 should have moved to EABI many years ago, and 
the mixed-endian support could be removed from Py3 in the future.

--
components: Build
files: 0001-Don-t-do-runtime-test-to-get-float-byte-order.patch
keywords: patch
messages: 324627
nosy: rossburton
priority: normal
severity: normal
status: open
title: Don't use AC_RUN_IFELSE to determine float endian
versions: Python 3.8
Added file: 
https://bugs.python.org/file47788/0001-Don-t-do-runtime-test-to-get-float-byte-order.patch

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Paul Moore


Paul Moore  added the comment:

One thought - appveyor.yml says that the cache of externals depends on PCBuild. 
Could it be that appveyor is caching PCBuild to verify whether it's changed 
(and hence whether to use the cached externals)? I know that sounds bizarre, 
but I'm not entirely sure why externals should be dependent on the *whole* of 
PCBuild anyway - maybe we should change it to depend only on 
PCBuild/get_externals.bat?

Clutching at straws here, there's definitely nothing obvious I can see though.

--

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Ah ok, I thought disabling the cache with APPVEYOR_CACHE_SKIP_RESTORE as true 
will trigger a successful build and in the end it will store the new set of 
artifacts from the recent compiler to the cache and then we can toggle the 
environment variable (APPVEYOR_CACHE_SKIP_RESTORE) so that for the next build 
artifacts built from old compiler are replaced with the newer ones resembling a 
cache clear. Sorry I might be wrong here and it's a workaround that I thought 
will work as in the other CI systems. I will be happy if it's solved through 
API then with the right credentials.

Thanks

--

___
Python tracker 

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



[issue34584] subprocess

2018-09-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Might be related to the below : 

open issue : https://bugs.python.org/issue14576

https://bugs.python.org/issue14576
https://bugs.python.org/issue16758
https://bugs.python.org/issue10722
https://bugs.python.org/issue7217

I think from the above threads you have something in path that collides with 
the name of some file in Python standard library.

Ref : 
https://stackoverflow.com/questions/29567051/python-error-idles-subprocess-didnt-make-connection-either-idle-cant-start

Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly

2018-09-05 Thread Nick Coghlan


Nick Coghlan  added the comment:

My guess as to why we're only seeing this for parallel test cases is taht for 
sequential tests, the implicit import inside open() is unlikely to happen while 
test_pkg is running, whereas for parallel tests, test_pkg will run in a 
relatively pristine process, and hence be more likely to trigger the implicit 
import.

--

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:

> APPVEYOR_CACHE_SKIP_RESTORE - set to true to disable cache restore
> APPVEYOR_CACHE_SKIP_SAVE - set to true to disable cache update

I see these as well, but it would only be a temporary solution and may make 
build much slower, whereas AppVeyor is already a bottleneck in our workflow. 
AppVeyor only give us two jobs in parallel which take 10-30 min, whereas it's 
common that we have much more new pull requests per hour.

--

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

One another way will be to set environment variable to skip the cache restore 
and trigger a build to see if cache is the actual problem. I don't know how 
configurable environment variables are from the UI to trigger a specific build 
with the set of environment variable values.

https://www.appveyor.com/docs/build-cache/#skipping-cache-operations-for-specific-build

> Skipping cache operations for specific build

> You can skip cache restore or save stages with the following tweak 
> environment variables:

> APPVEYOR_CACHE_SKIP_RESTORE - set to true to disable cache restore
> APPVEYOR_CACHE_SKIP_SAVE - set to true to disable cache update


Thanks

--

___
Python tracker 

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



[issue34566] pipe read sometimes returns EOF but returncode is still None

2018-09-05 Thread pmoravec


pmoravec  added the comment:

> The "poll" method does not wait for the child to exit. Normally you use the 
> "wait" method in this situation. I suspect this is a bug in the application, 
> not in Python.

Thanks for clarification. Could you please confirm what code change in that 
script is safe, then?

1) looping "while p.poll() == None   pass" to really ensure some status is 
returned.

2) calling p.wait() before p.poll()

>From a blackbox perspective, I would expect either to provide similar fixing 
>mechanism of my script. But as we call this code snippet concurrently, for 
>random commands that randomly terminates with random outcome / status, can't 
>either fix attempt cause e.g. a deadlock?

Thanks in advance for help / advice.

(just for context if it matters: the snippet is from 
https://github.com/sosreport/sos/blob/master/sos/utilities.py#L158 where the 
sos_get_command_output method is called concurrently by more threads)

--
nosy: +pmoravec

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Another way will be to invalidate the cache by manually updating 
cleanup-cache.txt in the end. But this requires a commit that has to be 
reverted later to enable caching and I don't think it's worthy to pollute git 
history for this.

https://help.appveyor.com/discussions/questions/1310-delete-cache#comment_36916917


> You can have any file as dependency that will be triggering cache 
> invalidation, even "cleanup-cache.txt" say in the root of your repo:
> cache:
> - my_cached_folder -> cleanup-cache.txt
> Whenever CRC32 of cleanup-cache.txt is changed the cache is invalidated, i.e. 
> not restored in the beginning of the build.

@paul.moore It's here : 
https://github.com/python/cpython/blob/master/.github/appveyor.yml


Thanks

--

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:

Ah! If I user my personal account which has a different token, I'm able to list 
my roles using the REST API.

So it seems that I lack some permissions on the "python" account of AppVeyor. 
Who owns this account?

--

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Paul Moore


Paul Moore  added the comment:

I don't see an appveyor.yml file in the CPython repository. How are
the appveyor builds configured? I was going to take a look, but need
to see the config :-(
On Wed, 5 Sep 2018 at 10:32, STINNER Victor  wrote:
>
>
> STINNER Victor  added the comment:
>
> REST API for the AppVeyor build cache:
> https://www.appveyor.com/docs/build-cache/#rest-api
>
> Authentication of the REST API:
> https://www.appveyor.com/docs/api/#authentication
>
> I tried:
>
> $ curl -H "Authorization: Bearer " -X "DELETE" 
> https://ci.appveyor.com/api/projects/python/cpython/buildcache; echo
>
> {"message":"You do not have required permissions to perform this action."}
>
> Oh. I'm not allowed to clear the build cache :-(
>
> I'm logged as "python" and my role is "Super User". If a Super User is not 
> allowed to clear the cache, who is allowed to do that? Maybe my URL is wrong? 
> The documentation says:
>
> DELETE 
> https://ci.appveyor.com/api/projects/{accountName}/{projectSlug}/buildcache
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:

REST API for the AppVeyor build cache:
https://www.appveyor.com/docs/build-cache/#rest-api

Authentication of the REST API:
https://www.appveyor.com/docs/api/#authentication

I tried:

$ curl -H "Authorization: Bearer " -X "DELETE" 
https://ci.appveyor.com/api/projects/python/cpython/buildcache; echo

{"message":"You do not have required permissions to perform this action."}

Oh. I'm not allowed to clear the build cache :-(

I'm logged as "python" and my role is "Super User". If a Super User is not 
allowed to clear the cache, who is allowed to do that? Maybe my URL is wrong? 
The documentation says:

DELETE 
https://ci.appveyor.com/api/projects/{accountName}/{projectSlug}/buildcache

--

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2018-09-05 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

If os.name == 'nt' is True on IronPython then why not simply do:

mswindows = sys.platform == "win32" or os.name == "nt"

For the record, both variants are used in different places in cPython source 
code. It would nice to figure out a golden standard and apply it everywhere. 
Maybe even add it as a new WINDOWS constant in the platform module.

--

___
Python tracker 

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



[issue34575] Python 3.6 compilation fails on AppVeyor: libeay.lib was created with an older compiler

2018-09-05 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

If it's due to cache then there is a REST API to clear the cache manually and 
someone with access to Appveyor credentials can give it a try to clear the 
cache and see if it's fixed.

Ref : https://github.com/appveyor/ci/issues/985

Log in and execute the below from the console as per 
https://github.com/appveyor/ci/issues/985#issuecomment-279199811

$.ajax({
url: 'https://ci.appveyor.com/api/projects///buildcache',
type: 'DELETE'})

A workaround : https://help.appveyor.com/discussions/questions/1310-delete-cache


Thanks

--
nosy: +xtreak

___
Python tracker 

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



[issue34570] Segmentation fault in _PyType_Lookup

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:

Again, I'm 90% sure that it's a bug in a third party module and so you should 
report the crash to pybot, not to Python.

--

___
Python tracker 

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



[issue34570] Segmentation fault in _PyType_Lookup

2018-09-05 Thread STINNER Victor


STINNER Victor  added the comment:

Core dumps are usually unusable on a different platform. You should extract 
informations yourself using gdb or something else. At least, I'm sure that I 
will be unable to use your core dump on Fedora (you are using Ubuntu). You can 
open a core dump using "gdb python2.7 -c coredump" and then type "where" to get 
the C traceback.

--

___
Python tracker 

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



[issue34570] Segmentation fault in _PyType_Lookup

2018-09-05 Thread Pablosky


Pablosky  added the comment:

Victor,

I am not familiar with code of pybot and RobotFramwework. So I don't know what 
extensions they are using.

I am attaching more backtraces of cores I was able to catch.

I am doing now some experiments and I am trying to find maximum amount of pybot 
processes which can run simultaneously without crash.

--
Added file: https://bugs.python.org/file47786/python_cores.zip

___
Python tracker 

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



[issue34561] Replace list sorting merge_collapse()?

2018-09-05 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34581] Windows : use of __pragma msvc extension without ifdef

2018-09-05 Thread miss-islington


miss-islington  added the comment:


New changeset 5b17d7fccd8f0b4d5030b03924eb00904585ba31 by Miss Islington (bot) 
in branch '3.7':
closes bpo-34581 : Conditionalize use of __pragma in Modules/socketmodule.c. 
(GH-9067)
https://github.com/python/cpython/commit/5b17d7fccd8f0b4d5030b03924eb00904585ba31


--
nosy: +miss-islington

___
Python tracker 

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



[issue34581] Windows : use of __pragma msvc extension without ifdef

2018-09-05 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 874809ea389e6434787e773a6054a08e0b81f734 by Benjamin Peterson 
(Erik Janssens) in branch 'master':
closes bpo-34581 : Conditionalize use of __pragma in Modules/socketmodule.c. 
(GH-9067)
https://github.com/python/cpython/commit/874809ea389e6434787e773a6054a08e0b81f734


--
nosy: +benjamin.peterson
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



[issue34581] Windows : use of __pragma msvc extension without ifdef

2018-09-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8529

___
Python tracker 

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