[issue32075] Expose ZipImporter Type Object in the include header files.

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a plan of reimplementing zipimport in Python (see issue25711). What are you going to do with this? I think that C extensions should use a common import API. -- nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka, twouters __

[issue32075] Expose ZipImporter Type Object in the include header files.

2017-11-20 Thread Decorater
Decorater added the comment: That is true, but Well, I am using this in a project of mine currently where it loads up encrypted scripts from a zip file. However I must have the import hook itself be in an C extension and subclass the current zipimporter. However knowing a rewrite for it is be

[issue32075] Expose ZipImporter Type Object in the include header files.

2017-11-20 Thread Decorater
Decorater added the comment: Well since issue25711 might be for 3.7 and newer I guess this patch might actually be for 3.6.4 or something then. And then the rewrite would take over on 3.7 and newer depending on if the rewrite makes it in to 3.7. -- versions: +Python 3.6 -Python 3.7, P

[issue32081] ipaddress should support fast IP lookups

2017-11-20 Thread Attila Nagy
New submission from Attila Nagy : It would be nice if ipaddress could support fast IP lookups, like this: https://github.com/jsommers/pytricia -- components: Library (Lib) messages: 306535 nosy: Attila Nagy priority: normal severity: normal status: open title: ipaddress should support fa

[issue32075] Expose ZipImporter Type Object in the include header files.

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The C API cann't be changed in a bugfix release. Unless for fixing bugs, but even in that case we should be very very careful. There is no a bug. -- ___ Python tracker ___

[issue32082] atexit module: allow getting/setting list of handlers directly

2017-11-20 Thread Erik Bray
New submission from Erik Bray : In Python 2 it was possible to directly manipulate the list of registered atexit handlers through atexit._exithandlers. Obviously I'm not complaining that this went away, as it was an underscored attribute. But this possibility was still useful in the context

[issue25144] 3.5 Win install fails with "TARGETDIR"

2017-11-20 Thread Per Fryking
Per Fryking added the comment: Got the same issue with the 3.6 installer from python.org The thing is that I can't elevate the priviliges to be administrator. So I'm stuck. Uploading the log. Running windows 7 -- nosy: +Per Fryking Added file: https://bugs.python.org/file47278/Python

[issue32083] sqlite3 Cursor.description can't return column types

2017-11-20 Thread Katsuhiko YOSHIDA
New submission from Katsuhiko YOSHIDA : My schema of sqlite3 table is the following. --- schema check start --- % sqlite3 sample.db SQLite version 3.16.0 2016-11-04 19:09:39 Enter ".help" for usage hints. sqlite> PRAGMA table_info(Employees); 0|EmployeeID|int|1||1 1|LastName|varchar(20)|1||0 2|F

[issue32084] [Security] http.server can be abused to redirect to (almost) arbitrary URL

2017-11-20 Thread STINNER Victor
New submission from STINNER Victor : iDer reported a vulnerability in the HTTP server. (1) Start a local HTTP server (listen to tcp/8000): python3 -m http.server 8000 (2) Open a web browser and to go: http://localhost:8000//www.python.org/%2f.. => the browser is redirected to http://www.pyth

[issue32083] sqlite3 Cursor.description can't return column types

2017-11-20 Thread Berker Peksag
Berker Peksag added the comment: Thank you for your report. According to https://github.com/python/cpython/blob/04dee2720851ec39e831beaa3edc0c59f228f461/Modules/_sqlite/cursor.c#L573 we always set the 'type_code' field described in PEP 249 to None. Setting it would be a new feature so it can

[issue32084] [Security] http.server can be abused to redirect to (almost) arbitrary URL

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: Extract of send_head(): path = self.translate_path(self.path) f = None if os.path.isdir(path): parts = urllib.parse.urlsplit(self.path) ... urllib.parse.urlsplit('//www.python.org/%2f..') returns: SplitResult(sc

[issue32085] [Security] A New Era of SSRF - Exploiting URL Parser in Trending Programming Languages!

2017-11-20 Thread STINNER Victor
New submission from STINNER Victor : Vulnerabilities described below are likely these ones reported in bpo-30500, but it would be nice to double check if *all* reported vulnerabilities have been fixed! http://python-security.readthedocs.io/vuln/bpo-30500_urllib_connects_to_a_wrong_host.html --

[issue32086] C API: Clarify which C functions are safe to be called before Py_Initialize()

2017-11-20 Thread STINNER Victor
New submission from STINNER Victor : See the python-dev thread: https://mail.python.org/pipermail/python-dev/2017-November/150605.html -- components: Interpreter Core messages: 306544 nosy: vstinner priority: normal severity: normal status: open title: C API: Clarify which C functions ar

[issue32084] [Security] http.server can be abused to redirect to (almost) arbitrary URL

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: I wrote this patch, but I'm not sure that it's ok to always reject redirection URLs starting with //: diff --git a/Lib/http/server.py b/Lib/http/server.py index 502bce0c7a..494031b8c2 100644 --- a/Lib/http/server.py +++ b/Lib/http/server.py @@ -673,10 +673,18

[issue32087] deprecated-removed directive generates overlapping msgids in .pot files

2017-11-20 Thread KINEBUCHI Tomohiko
New submission from KINEBUCHI Tomohiko : When gettext builder is invoked, deprecated-removed directive which is defined in Doc/tools/extensions/pyspecific.py generates overlapping msgids in .pot files. For example, the following .rst source (taken from Doc/library/dmb.rst L354):: .. deprec

[issue32088] Display DeprecationWarning, PendingDeprecationWarning and ImportWarning in debug mode

2017-11-20 Thread STINNER Victor
New submission from STINNER Victor : Related python-dev thread: https://mail.python.org/pipermail/python-dev/2017-November/150608.html "[Python-Dev] Show DeprecationWarning in debug mode?" I propose to display Display DeprecationWarning, PendingDeprecationWarning and ImportWarning when Python i

[issue32087] deprecated-removed directive generates overlapping msgids in .pot files

2017-11-20 Thread KINEBUCHI Tomohiko
Change by KINEBUCHI Tomohiko : -- keywords: +patch pull_requests: +4408 stage: -> patch review ___ Python tracker ___ ___ Python-bug

[issue32088] Display DeprecationWarning, PendingDeprecationWarning and ImportWarning in debug mode

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4409 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32088] Display DeprecationWarning, PendingDeprecationWarning and ImportWarning in debug mode

2017-11-20 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-20 Thread STINNER Victor
New submission from STINNER Victor : The -X dev mode currently *hides* some ResourceWarning warnings: $ cat x.py def func(): open('/etc/issue') func() func() $ ./python x.py x.py:2: ResourceWarning: unclosed file <_io.TextIOWrapper name='/etc/issue' mode='r' encoding='UTF-8'> open('/e

[issue32088] Display DeprecationWarning, PendingDeprecationWarning and ImportWarning in debug mode

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: Warnings filters in debug mode. Reference (current code): $ ./python -c 'import warnings, pprint; pprint.pprint(warnings.filters)' [('ignore', None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0), ('ignore', None, , None, 0), ('always

[issue31790] double free or corruption (while using smem)

2017-11-20 Thread Zoltan Krajcsovics
Zoltan Krajcsovics added the comment: In a span of about 1 month, I had multiple errors: *** Error in `/usr/bin/python': free(): invalid next size (normal): 0x55f9c9e7c970 *** *** Error in `/usr/bin/python': free(): invalid next size (normal): 0x55e33fda3970 *** *** Error in `/usr/bin

[issue32050] Deprecated python3 -x option

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 733b5f3f2f2425fa939d71bc317f2e0f1968c2a0 by Victor Stinner in branch '2.7': bpo-32050: Fix -x option documentation (#4423) https://github.com/python/cpython/commit/733b5f3f2f2425fa939d71bc317f2e0f1968c2a0 -- ___

[issue32050] Deprecated python3 -x option

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4410 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32050] Fix -x option documentation

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- title: Deprecated python3 -x option -> Fix -x option documentation ___ Python tracker ___ ___ Python-bu

[issue32047] asyncio: enable debug mode when -X dev is used

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue32047] asyncio: enable debug mode when -X dev is used

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 44862df2eeec62adea20672b0fe2a5d3e160569e by Victor Stinner in branch 'master': bpo-32047: -X dev enables asyncio debug mode (#4418) https://github.com/python/cpython/commit/44862df2eeec62adea20672b0fe2a5d3e160569e -- __

[issue32090] test_put() of test_multiprocessing queue tests has a race condition

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- title: test_put() -> test_put() of test_multiprocessing queue tests has a race condition ___ Python tracker ___ __

[issue32090] test_put()

2017-11-20 Thread STINNER Victor
New submission from STINNER Victor : The test failed on AMD64 FreeBSD 10.x Shared 3.x: http://buildbot.python.org/all/#/builders/87/builds/200/steps/4/logs/stdio FAIL: test_put (test.test_multiprocessing_fork.WithProcessesTestQueue) --

[issue32091] test_s_option() of test_site.HelperFunctionsTests failed on x86 Gentoo Refleaks 3.6

2017-11-20 Thread STINNER Victor
New submission from STINNER Victor : Failure on x86 Gentoo Refleaks 3.6: http://buildbot.python.org/all/#/builders/72/builds/43 0:58:35 load avg: 5.21 [135/406/1] test_site failed -- running: test_multiprocessing_forkserver (483 sec) beginning 6 repetitions 123456 test test_site failed -- Tra

[issue32091] test_s_option() of test_site.HelperFunctionsTests failed on x86 Gentoo Refleaks 3.6

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: Same failure on x86 Gentoo Refleaks 2.7: FAIL: test_s_option (test.test_site.HelperFunctionsTests) -- Traceback (most recent call last): File "/buildbot/buildarea/2.7.ware-gentoo-x86.refleak

[issue32091] test_s_option() of test_site.HelperFunctionsTests failed on x86 Gentoo Refleaks 3.6

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue25711] Rewrite zipimport from scratch

2017-11-20 Thread Decorater
Decorater added the comment: So, after reviewing this it started to make me rethink about the zipimport.py file. So my question is how would that file work if it is an pyc file in python37.zip or something just to zipimport other modules? There is got to be some sort of low level api that ca

[issue31687] test_semaphore_tracker() of test_multiprocessing_spawn fails randomly (race condition?)

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: Failure on x86 Gentoo Refleaks 3.6, two days ago: http://buildbot.python.org/all/#/builders/72/builds/41 == FAIL: test_semaphore_tracker (test.test_multiprocessing_spawn.TestSemaphoreTracker)

[issue31630] math.tan has poor accuracy near pi/2 on OpenBSD and NetBSD

2017-11-20 Thread Tim Peters
Tim Peters added the comment: I have no opinion about any version of xxxBSD, because I've never used one ;-) If current versions of those do have this failure, has anyone opened a bug report on _their_ tracker(s)? I've seen no reason yet to imagine these failures are a fault in Python. ---

[issue32092] mock.patch with autospec does not consume self / cls argument

2017-11-20 Thread Claudiu Belu
New submission from Claudiu Belu : Currently, the autospec=True argument can be passed to mock.patch, but when trying to make assertions on the call and its arguments, it can fail, as it expects an instance / class instance reference as the first argument (self / cls arguments are not consumed

[issue32092] mock.patch with autospec does not consume self / cls argument

2017-11-20 Thread Claudiu Belu
Change by Claudiu Belu : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue32092] mock.patch with autospec does not consume self / cls argument

2017-11-20 Thread Claudiu Belu
Change by Claudiu Belu : -- components: +Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue32086] C API: Clarify which C functions are safe to be called before Py_Initialize()

2017-11-20 Thread Eric Snow
Change by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue32092] mock.patch with autospec does not consume self / cls argument

2017-11-20 Thread Claudiu Belu
Claudiu Belu added the comment: Currently, the autospec=True argument can be passed to mock.patch, but when trying to make assertions on the call and its arguments, it can fail, as it expects an instance / class instance reference as the first argument (self / cls arguments are not consumed w

[issue32092] mock.patch with autospec does not consume self / cls argument

2017-11-20 Thread Claudiu Belu
Change by Claudiu Belu : -- keywords: +patch pull_requests: +4412 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue30587] Mock with spec object does not ensure method call signatures

2017-11-20 Thread Claudiu Belu
Change by Claudiu Belu : -- keywords: +patch pull_requests: +4411 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue32050] Fix -x option documentation

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset c5a2071586f735d2a61d1756e7011cfbb6ce86c9 by Victor Stinner in branch 'master': bpo-32050: Fix -x option documentation (#4475) https://github.com/python/cpython/commit/c5a2071586f735d2a61d1756e7011cfbb6ce86c9 --

[issue32050] Fix -x option documentation

2017-11-20 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4414 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue32086] C API: Clarify which C functions are safe to be called before Py_Initialize()

2017-11-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ned.deily priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mail

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: +531 elif sys.platform.startswith("aix"): +532 getters = [_netstat_getnode] LGTM. Do you want to write this a pull request? -- nosy: +vstinner ___ Python tracker

[issue32050] Fix -x option documentation

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: I removed the note from the documentation since it was outdated. Serhiy, Terry: Do you want to work on a patch to rephrase the "DOS specific hack only" sentence? > @py -3 -x %0 %* & exit /b I'm not a BATCH expert, so I don't know if this command works on all

[issue32050] Fix -x option documentation

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset 60a376cf0023d1070329d0e861a5596637ff3275 by Victor Stinner (Miss Islington (bot)) in branch '3.6': bpo-32050: Fix -x option documentation (GH-4475) (#4477) https://github.com/python/cpython/commit/60a376cf0023d1070329d0e861a5596637ff3275 --

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _unixdll_getnode, _ifconfig_getnode, and _arp_getnode were changed recently. Are they still not working on AIX? -- nosy: +serhiy.storchaka versions: +Python 3.7 -Python 3.3, Python 3.4, Python 3.5 ___ Python track

[issue32050] Fix -x option documentation

2017-11-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I don't know either. Once of the Windows experts should review and revise. -- ___ Python tracker ___

[issue32078] string result of str(bytes()) in Python3

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: Calling str(bytes) is wrong in Python 3: $ python3 -bb Python 3.6.2 (default, Oct 2 2017, 16:51:32) >>> str(b'abc') BytesWarning: str() on a bytes instance Just don't do that :-) Use repr(bytes) if you want the b'...' format: >>> repr(b'abc') "b'abc'" ---

[issue32022] Python crashes with mutually recursive code

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: I don't think that we can fix this issue. I suggest to close it as WONTFIX. > sys.setrecursionlimit(3000) While Python does its best to catch stack overflow, the C implementation of CPython can exhaust the stack memory (8 MB in Linux?) and then crash with a

[issue32093] macOS: implement time.thread_time() using thread_info()

2017-11-20 Thread STINNER Victor
New submission from STINNER Victor : bpo-32025 added time.thread_time() function. On macOS, CLOCK_THREAD_CPUTIME_ID is not available. I propose to add a macOS implementation using thread_info(): return the sum of user and system times. -- components: macOS messages: 306569 nosy: ned.de

[issue32025] Add time.thread_time()

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: I opened bpo-32093 for macOS. I close this one. Nice enhancement, I already like this new clock ;-) -- components: +FreeBSD -Library (Lib) nosy: +koobs resolution: -> fixed stage: patch review -> resolved status: open -> closed __

[issue32043] Add a new -X dev option: "developer mode"

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +4415 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue32088] Display DeprecationWarning, PendingDeprecationWarning and ImportWarning in debug mode

2017-11-20 Thread Łukasz Langa
Łukasz Langa added the comment: New changeset 895862aa01793a26e74512befb0c66a1da2587d6 by Łukasz Langa (Victor Stinner) in branch 'master': bpo-32088: Display Deprecation in debug mode (#4474) https://github.com/python/cpython/commit/895862aa01793a26e74512befb0c66a1da2587d6 -- nosy:

[issue12276] 3.x ignores sys.tracebacklimit=0

2017-11-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Bugs in PyTraceBack_Print() ___ Python tracker __

[issue31897] Unexpected exceptions in plistlib.loads

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Opened issue32072 for infinite recursion and related issues. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32094] _args_from_interpreter_flags() doesn't keep -X options

2017-11-20 Thread Antoine Pitrou
New submission from Antoine Pitrou : `subprocess._args_from_interpreter_flags()` is used to control the flags passed to child Python processes, for example launched by multiprocessing. Unfortunately, not all flags are actually recognized by this function: $ ./python -X dev Python 3.7.0a2+ (he

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, this is Cygwin! This is a Tk bug (https://core.tcl.tk/tk/tktview?name=5ee8af61e5ef8e233158a43459624f4ecf58a6fe). It was fixed, but not completely. The fix doesn't work on Cygwin. -- ___ Python tracker

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-20 Thread Zachary Ware
Zachary Ware added the comment: > Ah, this is Cygwin! Hmm, no; Cygwin isn't installed on ware-win81-release. When was the fix made? 2.7 on Windows currently uses 8.5.15, we can bump it up to latest 8.5 if that will help. -- ___ Python tracker

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2017-11-20 Thread Michael Felt
Michael Felt added the comment: On 11/20/2017 5:22 PM, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > _unixdll_getnode, _ifconfig_getnode, and _arp_getnode were changed recently. > Are they still not working on AIX? After a clone of master: a) _unixdll_getnode is renamed to

[issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The fix was made 2015-11-09. The tag core-8-5-15 was created 2013-09-16. I'm not well experienced with fossil and thought that 8.5.15 contains this fix, but now I see that this is not true. Yes, updating Tcl/Tk can help. --

[issue28538] _socket module cross-compilation error on android-24

2017-11-20 Thread Xavier de Gaye
Change by Xavier de Gaye : -- pull_requests: +4416 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue28538] _socket module cross-compilation error on android-24

2017-11-20 Thread Xavier de Gaye
Xavier de Gaye added the comment: These changes are not needed anymore now that Unified Headers are supported by android-ndk-r14 (see issue 29040) -- resolution: fixed -> not a bug stage: resolved -> patch review status: closed -> open ___ Python tr

[issue28009] core logic of uuid.getnode() is broken for AIX - all versions

2017-11-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What return commands `ifconfig`, `ifconfig -a`, `ifconfig -av`, `ip link list`, `arp -an`, `lanscan -ai` (if not error)? -- ___ Python tracker

[issue32095] AIX: ModuleNotFoundError: No module named '_ctypes' - make install fails

2017-11-20 Thread Michael Felt
New submission from Michael Felt : after git clone from master: make install fails to complete with: Important - python is not installed already. FYI: also note - build completes successfully with 2.7.14 (will download and check other python3 versions) if test "xupgrade" != "xno" ; th

[issue32094] _args_from_interpreter_flags() doesn't keep -X options

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4417 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32095] AIX: ModuleNotFoundError: No module named '_ctypes' - make install fails

2017-11-20 Thread Michael Felt
Michael Felt added the comment: FYI: version 3.6.3 compiles and builds without this issue. + make install DESTDIR=/var/aixtools/python/Python/3.6.3.0 > .buildaix/install.out + mkinstallp.ksh /var/aixtools/python/Python/3.6.3.0 > .buildaix/mkinstallp.out -- versions: +Python 3.7 _

[issue32095] AIX: ModuleNotFoundError: No module named '_ctypes' - make install fails

2017-11-20 Thread Zachary Ware
Zachary Ware added the comment: Do you have libffi (and its development headers) installed where the compiler can find it? Python 3.7 no longer bundles a copy of libffi (see #27979). -- nosy: +zach.ware versions: -Python 3.8 ___ Python tracker

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-20 Thread Jonas H.
Jonas H. added the comment: Thanks Antoine. I will need some guidance as to what are the correct places to make these changes. I'm not quite sure about the abstractions here (runner, loader, suite, case, etc.) My PoC (see GitHub link in first post) uses a TestSuite subclass. (The subclass is

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-20 Thread Eric Snow
New submission from Eric Snow : (see the python-dev thread [1]) (related: issue #32086) When I consolidated the global runtime state into a single global, _PyRuntime, calls Py_DecodeLocale() started to break if the runtime hadn't been intialized yet. This is because that function relies on Py

[issue32095] AIX: ModuleNotFoundError: No module named '_ctypes' - make install fails

2017-11-20 Thread Michael Felt
Michael Felt added the comment: no. I'll install what I have atm. Too bad - as now it will have an install dependency. re: https://bugs.python.org/issue27976#msg274628 -- seems a warning that libffi is not available might be useful after all. Question: is ffi still bundled for Darwin - even

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-20 Thread Eric Snow
Change by Eric Snow : -- keywords: +patch pull_requests: +4418 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-20 Thread Decorater
Decorater added the comment: Interesting, on 3.6.3 on my embedded program it seems to work just fine. Did anything change in it since then? https://github.com/AraHaan/Els_kom_new/blob/master/PC/komextract_new.c -- nosy: +Decorater ___ Python tracke

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Interpreter Core versions: +Python 3.7 ___ Python tracker ___ ___ Python-bugs-list maili

[issue32086] C API: Clarify which C functions are safe to be called before Py_Initialize()

2017-11-20 Thread Decorater
Decorater added the comment: For me, it looks like Py_DecodeLocal() is still safe (according to python 3.6.3 unless anything changed in it). -- nosy: +Decorater ___ Python tracker ___

[issue32086] C API: Clarify which C functions are safe to be called before Py_Initialize()

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: > For me, it looks like Py_DecodeLocal() is still safe (according to python > 3.6.3 unless anything changed in it). This issue is a regression in Python 3.7. -- ___ Python tracker

[issue32086] C API: Clarify which C functions are safe to be called before Py_Initialize()

2017-11-20 Thread Decorater
Decorater added the comment: Ah, I see now. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue32096] Py_DecodeLocale() fails if used before the runtime is initialized.

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: Duplicate of bpo-32086. -- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> C API: Clarify which C functions are safe to be called before Py_Initialize() ___ Python tr

[issue32066] asyncio: Support pathlib.Path in create_unix_connection; sock arg should be optional

2017-11-20 Thread Yury Selivanov
New submission from Yury Selivanov : New changeset 423fd362f8e4d6c867a5afc8ac7cbeeb66cac19c by Yury Selivanov in branch 'master': bpo-32066: Support pathlib.Path in create_unix_connection; sock arg should be optional (#4447) https://github.com/python/cpython/commit/423fd362f8e4d6c867a5afc8ac7c

[issue32066] asyncio: Support pathlib.Path in create_unix_connection; sock arg should be optional

2017-11-20 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker ___

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: First, I should clarify that I'm not a unittest maintainer. However, as far as I can tell, the maintainers have not been very active lately. Also, this is a reasonably simple enhancement (at least conceptually), so I think can do without a maintainer's form

[issue2504] Add gettext.pgettext() and variants support

2017-11-20 Thread Jonathan Schoonhoven
Jonathan Schoonhoven added the comment: Is there anything I can do to help get this into the codebase and out issue purgatory? We're not that far off from the 10 year anniversary of this issue. -- nosy: +Jonathan Schoonhoven ___ Python tracker

[issue32097] doctest does not consider \r\n a

2017-11-20 Thread Bert JW Regeer
New submission from Bert JW Regeer : doctest fails to consider `\r\n` as a blank line. -- components: Library (Lib) files: test.py messages: 306595 nosy: X-Istence priority: normal severity: normal status: open title: doctest does not consider \r\n a versions: Python 2.7, Python 3.4, Py

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-20 Thread Jonas H.
Jonas H. added the comment: > > 3) Is the approach of dynamically wrapping 'skip()' around to-be-skipped > > test cases OK? > I think this is the wrong approach. A test that isn't selected shouldn't be > skipped, it should not appear in the output at all. Another reason for > putting this

[issue32094] _args_from_interpreter_flags() doesn't keep -X options

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: New changeset f39b674876d2bd47ec7fc106d673b60ff24092ca by Victor Stinner in branch 'master': bpo-32094: Update subprocess for -X dev (#4480) https://github.com/python/cpython/commit/f39b674876d2bd47ec7fc106d673b60ff24092ca -- ___

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 21/11/2017 à 00:23, Jonas H. a écrit : > > - The loader code really only deals with loading (i.e., finding + importing) > tests. Yes it expects a file pattern like "test*.py" for identifying test > case files. But apart from that it didn't "feel" right to

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: If it helps, think of TestLoader as collecting tests, rather than simply loading Python modules. -- ___ Python tracker ___ __

[issue2504] Add gettext.pgettext() and variants support

2017-11-20 Thread Éric Araujo
Éric Araujo added the comment: The patch would need to be applied on top of the current master to make a pull request. Then, the tasks outlined in that message should be addressed: https://bugs.python.org/issue2504#msg122439 -- assignee: loewis -> __

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +4419 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-li

[issue32071] Add py.test-like "-k" test selection to unittest

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: The internal Python test runner "regrtest" already implements the feature as the -m MATCH option and --matchfile FILENAME option. It's implemented in test.support._match_file(). See bpo-31324 for a recent issue on this feature: performance issue (it's going

[issue32098] Hardcoded value in Lib/test/test_os.py:L1324:URandomTests.get_urandom_subprocess()

2017-11-20 Thread hackan
New submission from hackan : The value of `count` is hardcoded to 16 in https://github.com/python/cpython/blob/6a55d09573e5c35c9e4a24a6f811120b41a2a994/Lib/test/test_os.py#L1324 -- messages: 306602 nosy: hackan priority: normal severity: normal status: open title: Hardcoded value in Li

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: Attached PR 4482 fixes warnings filters: haypo@selma$ ./python -X dev -c 'import warnings, pprint; pprint.pprint(warnings.filters)' [('ignore', None, , None, 0), ('always', None, , None, 0), ('default', None, , None, 0)] --

[issue32089] In developer mode (-X dev), ResourceWarning is only emited once per line numbers

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue32094] _args_from_interpreter_flags() doesn't keep -X options

2017-11-20 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the bug report Antoine, it's now fixed! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue32098] Hardcoded value in Lib/test/test_os.py:L1324:URandomTests.get_urandom_subprocess()

2017-11-20 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue32099] Use range in itertools roundrobin recipe

2017-11-20 Thread Terry J. Reedy
New submission from Terry J. Reedy : The itertools roundrobin recipe has an outer loop executed a preset number of times. It is currently implemented with two assignments and a while loop. https://docs.python.org/3/library/itertools.html#itertools-recipes These can be replaced with a for loop u

[issue31672] string.Template should use re.ASCII flag

2017-11-20 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- pull_requests: +4420 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue32100] IDLE: PathBrowser isn't working

2017-11-20 Thread Cheryl Sabella
New submission from Cheryl Sabella : Clicking on Path Browser in the File menu gives an error instead of opening the Path Browser. -- assignee: terry.reedy components: IDLE messages: 306606 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: PathBrows

  1   2   >