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

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

[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

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

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

[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

[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

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

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

[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

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

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

[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

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

[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_,

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

[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

[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

[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

[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

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

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

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

[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

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

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

[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

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

[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

[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

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

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

[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

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

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

[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

[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

[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

[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

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

[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

[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

[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

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

[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

[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

[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

[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

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

[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

[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

[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

[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

[issue34584] subprocess

2018-09-05 Thread Joseph
Change by Joseph : -- components: +macOS nosy: +ned.deily, ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list

[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

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

[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

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

[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

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

[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

[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

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

[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

[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

[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

[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

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