[issue36085] Enable better DLL resolution

2019-03-12 Thread mattip
mattip added the comment: Correct me if I'm wrong, but once SetDefaultDllDirectories() is used, there is no going back: PATH no longer can change the search path no matter what flags are used with LoadLibrary* calls (see the recent Anaconda issue when they did this and broke NumPy). Assuming

[issue35704] On AIX, test_unpack_archive_xztar fails with default MAXDATA settings

2019-03-12 Thread Michael Felt
Change by Michael Felt : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34373] test_time errors on AIX

2019-03-12 Thread Michael Felt
Change by Michael Felt : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue11192] test_socket error on AIX

2019-03-12 Thread Michael Felt
Change by Michael Felt : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue34720] Fix test_importlib.test_bad_traverse for AIX

2019-03-12 Thread Michael Felt
Change by Michael Felt : -- versions: -Python 3.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-03-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset fc06a192fdc44225ef1cc879f615a81931ad0a85 by Raymond Hettinger in branch 'master': bpo-35892: Fix mode() and add multimode() (#12089) https://github.com/python/cpython/commit/fc06a192fdc44225ef1cc879f615a81931ad0a85 -- _

[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-03-12 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36216] urlsplit does not handle NFKC normalization

2019-03-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Sample buildbot log of print statement in testcase causing rerun of test : https://buildbot.python.org/all/#/builders/101/builds/364/steps/4/logs/stdio -- ___ Python tracker

[issue30040] new empty dict can be more small

2019-03-12 Thread Inada Naoki
Inada Naoki added the comment: New changeset f2a186712bfe726d54723eba37d80c7f0303a50b by Inada Naoki in branch 'master': bpo-30040: new empty dict uses key-sharing dict (GH-1080) https://github.com/python/cpython/commit/f2a186712bfe726d54723eba37d80c7f0303a50b -- __

[issue30040] new empty dict can be more small

2019-03-12 Thread Inada Naoki
Change by Inada Naoki : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ ___

[issue36229] Linear-time list, set, and bytearray ops.

2019-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is an interesting idea. But I have two concerns. 1. It is hard to implement refcount-based optimization on Python implementations which do not use reference counting (i.e. PyPy). If the effect of this optimization will be significant, people will beco

[issue36085] Enable better DLL resolution

2019-03-12 Thread Paul Moore
Paul Moore added the comment: > Also, if I'm understanding your intention, loading an extension may fail when > Python is embedded if the process is using the legacy DLL search path. So, > like with ctypes, we'll be forcing embedding applications to update how they > load DLLs in order to co

[issue35132] python-gdb error: Python Exception Type does not have a target

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: New changeset 047f8f25b93e2649d234fa565a59383fceb40e16 by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-35132: Fixes missing target in gdb pep0393 check. (GH-11848) (GH-12284) https://github.com/python/cpython/commit/047f8f25b93e2649d234fa565a593

[issue35132] python-gdb error: Python Exception Type does not have a target

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: Thanks Dylan Cali for the bug report. Lisa Roach fixed the bug in 3.7 and master branches. Until a new release is published, you can copy manually the file from: https://github.com/python/cpython/blob/3.7/Tools/gdb/libpython.py -- resolution: -> fix

[issue31784] Implementation of the PEP 564: Add time.time_ns()

2019-03-12 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +12266 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread Ned Deily
Change by Ned Deily : -- keywords: +patch pull_requests: +12267 stage: needs patch -> patch review ___ Python tracker ___ ___ Python

[issue36206] re.match() not matching escaped hyphens

2019-03-12 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +12265 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36206] re.match() not matching escaped hyphens

2019-03-12 Thread Ned Deily
Change by Ned Deily : -- pull_requests: -12265 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue36206] re.match() not matching escaped hyphens

2019-03-12 Thread Ned Deily
Change by Ned Deily : -- pull_requests: +12268 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread Ned Deily
Ned Deily added the comment: Further investigation shows that several time related functions were added to macOS at 10.12 including clock_gettime. For older systems, timemodule.c falls back to using getrusage. With Python 3.6.x, that fallbacks correctly but it appears that refactoring introd

[issue36206] re.match() not matching escaped hyphens

2019-03-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- pull_requests: -12268 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36266] Which module could not be found?

2019-03-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ __

[issue35746] [ssl][CVE-2019-5010] TALOS-2018-0758 Denial of Service

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: Yes, I close the issue. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue33725] Python crashes on macOS after fork with no exec

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: Changing the default is trivial and safe. Let's do that. Additional doc wouldn't hurt. -- ___ Python tracker ___ ___

[issue36252] update to Unicode 12

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: Would you mind to explain how you update Unicode in Python? -- ___ Python tracker ___ ___ Python-

[issue22107] tempfile module misinterprets access denied error on Windows

2019-03-12 Thread Jim Maloy
Jim Maloy added the comment: This issue persists as of today (March 2019), in Python 3.7.2 (64 bit) running on Windows 10. I gather from the comments that fixing it is no trivial matter, although I don't fully understand why. The hang of "several seconds" that was originally described is a

[issue36269] post install in setup.py does not work when executed through pip

2019-03-12 Thread Saba Kauser
New submission from Saba Kauser : Hello, I have a post install class that looks like this: if('darwin' in sys.platform): class PostInstall(install): """ Post installation - run install_name_tool on Darwin """ def run(self): clipath = os.getenv('IBM_DB_HOME', '@lo

[issue4356] Add "key" argument to "bisect" module functions

2019-03-12 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Hi, there has been renewed interest from @alexchamberlain and @f6v on GitHub for this feature. Would it be possible to get the patch reviewed so we can add it in 3.8? -- ___ Python tracker

[issue35859] Capture behavior depends on the order of an alternation

2019-03-12 Thread Ma Lin
Change by Ma Lin : -- pull_requests: +12269 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue36159] Modify Formatter Class to handle arbitrary objects

2019-03-12 Thread Ross Biro
Ross Biro added the comment: I'm currently writing a language translator between two domain specific computer languages. Because some expressions occur repeatedly, but in slightly different contexts, I make multiple passes. The first pass reduces everything it can and leaves place holder obje

[issue35859] Capture behavior depends on the order of an alternation

2019-03-12 Thread Ma Lin
Change by Ma Lin : -- pull_requests: +12270 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue35859] Capture behavior depends on the order of an alternation

2019-03-12 Thread Ma Lin
Change by Ma Lin : -- pull_requests: +12271 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue35859] Capture behavior depends on the order of an alternation

2019-03-12 Thread Ma Lin
Change by Ma Lin : Added file: https://bugs.python.org/file48204/t.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35859] Capture behavior depends on the order of an alternation

2019-03-12 Thread Ma Lin
Ma Lin added the comment: > Could you please create and run some microbenchmarks to measure > possible performance penalty of additional MARH_PUSHes? I am > especially interesting in worst cases. Besides the worst case, I prepared two solutions. Solution_A (PR12288): Fix the bugs, I can find

[issue36270] DOC: Add link to sys.exc_info for "Reference Manual"

2019-03-12 Thread Cheryl Sabella
New submission from Cheryl Sabella : In the docs for `sys.exc_info()`, the description of traceback says: traceback gets a traceback object (see the ---> Reference Manual <---) which encapsulates the call stack at the point where the exception originally occurred. It might be nice if Referen

[issue4356] Add "key" argument to "bisect" module functions

2019-03-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll look at it this weekend. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue15749] cgitb prints html for text when display disabled.

2019-03-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: I can still recreate this issue under 3.8. Should this patch be converted to a GitHub pull request? -- nosy: +cheryl.sabella versions: +Python 3.7, Python 3.8 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 ___ P

[issue36225] Lingering subinterpreters should be implicitly cleared on shutdown

2019-03-12 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: I have been wondering where the regression to test this can be put..in test__xxsubinterpreters.py may be? -- ___ Python tracker ___ __

[issue36218] .sort() segfaults consistently on crafted input

2019-03-12 Thread Ned Deily
Ned Deily added the comment: Thanks for the analysis and the suggested PR which is now awaiting review. While segfaults are nasty, I don't see how this problem would be likely exploitable as a DoS without direct access to the interpreter. So I'm downgrading it to "deferred blocker" for now

[issue36271] '_io.TextIOWrapper' object has no attribute 'mode'

2019-03-12 Thread Dávid Nemeskey
New submission from Dávid Nemeskey : TextIOWrapper objects returned by gzip.open() or bz2.open() do not have the 'mode' data member. Those returned by io.open() do. It would be nice if it did. -- components: Library (Lib) messages: 337745 nosy: nemeskeyd priority: normal severity: norma

[issue36271] '_io.TextIOWrapper' object has no attribute 'mode'

2019-03-12 Thread Dávid Nemeskey
Dávid Nemeskey added the comment: Note that this is not the same as GZipFile.mode, which is 1 or 2 (READ or WRITE), instead of the more informative "[raw][bt ]". -- ___ Python tracker ___

[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-12 Thread Saim Raza
New submission from Saim Raza : Following code logs an error and calls itself leading to stack overflow and eventually core dump in Python 3.6. >>> import logging >>> def rec(): ... logging.error("foo") ... rec() >>> rec() [1]101641 abort (core dumped) python3 FTR, this doesn't c

[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I am not sure this is related to logging and looks similar to issue35542 except stack (depends on OS) is exhausted without setrecursionlimit(). What does below return? def rec(): rec() rec() -- nosy: +xtreak _

[issue36085] Enable better DLL resolution

2019-03-12 Thread Steve Dower
Steve Dower added the comment: > That will require rewriting many scripts and packages that use ctypes or cffi > to load DLLs. It would also break DLLs that internally rely on modifying PATH > for a delayed load, though I hope that's uncommon. I think it's easier for > everyone else if we imple

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-12 Thread Steve Dower
Steve Dower added the comment: I like the patch, but I'm not sure all the tests are properly preserving the real value of USERPROFILE. Modifying this value could have a real impact on the rest of the process, so we should be very careful to undo it regardless of test result. (Modifying HOME

[issue30040] new empty dict can be more small

2019-03-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I don't think this should have been done. Conceptually, there is no basis for presuming key-sharing for new empty dicts -- you can't know what they would share with. This patch essentially undoes the entire reason for having a pre-allocated minsize dict

[issue36216] urlsplit does not handle NFKC normalization

2019-03-12 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +12272 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-12 Thread Anthony Sottile
Anthony Sottile added the comment: > Modifying this value could have a real impact on the rest of the process, so > we should be very careful to undo it regardless of test result. (Modifying > HOME is not a as big a deal since, as you point out, it's not "real" ;) ) Agreed, though I'd like t

[issue36216] urlsplit does not handle NFKC normalization

2019-03-12 Thread Steve Dower
Steve Dower added the comment: Thanks. Just posted a PR that puts the print behind a verbose flag (on Python 3 it uses subtest so that we see which character caused the failure). If that doesn't work for whatever reason, I'll just leave it out and hope that we never have to debug it on Pytho

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-12 Thread Steve Dower
Steve Dower added the comment: Great, thanks for checking! I'll merge. -- assignee: -> steve.dower ___ Python tracker ___ ___ Pyth

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-12 Thread Steve Dower
Steve Dower added the comment: New changeset 25ec4a45dcc36c8087f93bd1634b311613244fc6 by Steve Dower (Anthony Sottile) in branch 'master': bpo-36264: Don't honor POSIX HOME in os.path.expanduser on Windows (GH-12282) https://github.com/python/cpython/commit/25ec4a45dcc36c8087f93bd1634b3116132

[issue36266] Which module could not be found?

2019-03-12 Thread Steve Dower
Steve Dower added the comment: I agree. Unfortunately, the operating system does not provide this information. The best I can offer is to run Process Monitor [1] and watch its logs. It should show the paths it attempts to access. [1]: http://technet.microsoft.com/en-us/sysinternals/bb896645

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-12 Thread Zachary Ware
Zachary Ware added the comment: If we're going ahead with this, it's worth a mention in whatsnew as this is going to break things for some users. -- ___ Python tracker ___ __

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I don't understand the problem. Can someone please give the result of these commands on Python 3.6 and 3.7 on macOS? Example on Linux (Fedora 29): $ python3 >>> import platform, time >>> platform.platform() 'Linux-4.20.13-200.fc29.x86_64-x86_64-with-

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: Ah, or maybe use test.pythoninfo: $ ./python -m test.pythoninfo|grep -E '^(platform|time)' platform.architecture: 64bit ELF platform.libc_ver: glibc 2.28 platform.platform: Linux-4.20.13-200.fc29.x86_64-x86_64-with-glibc2.28 platform.python_implementation: CPy

[issue36085] Enable better DLL resolution

2019-03-12 Thread Steve Dower
Steve Dower added the comment: Since I just dug enough to find it, the best way to diagnose problems with dependent DLLs not being found is probably to run Process Monitor [1] while doing the import and checking its logs. It should show the paths that were attempted to be accessed. [1]: htt

[issue35218] decompressing and then re-compressing zipfiles with Python 3 zipfile loses flag_bits

2019-03-12 Thread keeely
keeely added the comment: Can you please get on and fix this if you're going to deprecate Python 2.0. It's unkind on your users to deprecate the old version before you've fixed basic regressions like this in the new one. Just to be clear, I am attaching the code that reproduces this (tmp.p

[issue36272] Recursive logging crashes Interpreter in Python 3

2019-03-12 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vinay.sajip ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue35854] EnvBuilder and venv symlinks do not work on Windows on 3.7.2

2019-03-12 Thread Steve Dower
Steve Dower added the comment: Yep. Done -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-12 Thread Steve Dower
Steve Dower added the comment: > If we're going ahead with this, it's worth a mention in whatsnew Good call. I'll do it -- ___ Python tracker ___

[issue35218] decompressing and then re-compressing zipfiles with Python 3 zipfile loses flag_bits

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: > I will not fill in your agreement form, and no I will not provide my reasons, > but you don't need it, it's a one-line fix. Ok. It's up to you, but in that case, we cannot merge your change. Contributors have to sign it. Your test is larger than a single l

[issue30040] new empty dict can be more small

2019-03-12 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +Mark.Shannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue36085] Enable better DLL resolution

2019-03-12 Thread Paul Moore
Paul Moore added the comment: > > This bothers me - how will backward compatibility work in that case? > > The new search order is compatible with the old search order, so you can > update all your layouts to have DLL dependencies in suitable locations and > you'll be fine. OK, cool. But one

[issue30040] new empty dict can be more small

2019-03-12 Thread Inada Naoki
Inada Naoki added the comment: > I don't think this should have been done. Conceptually, there is no basis > for presuming key-sharing for new empty dicts -- you can't know what they > would share with. This patch essentially undoes the entire reason for having a pre-allocated minsize dic

[issue36236] Python crash on macOS when CWD is invalid

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: _Py_wgetcwd() call has been introduced by the following commit: commit ee3784594b33c72c3fdca6a71892d22f14045ab6 Author: Nick Coghlan Date: Sun Mar 25 23:43:50 2018 +1000 bpo-33053: -m now adds *starting* directory to sys.path (GH-6231) (#6236)

[issue36236] Python crash on macOS when CWD is invalid

2019-03-12 Thread STINNER Victor
Change by STINNER Victor : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue30040] new empty dict can be more small

2019-03-12 Thread Inada Naoki
Change by Inada Naoki : -- nosy: +Mark.Shannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue35218] decompressing and then re-compressing zipfiles with Python 3 zipfile loses flag_bits

2019-03-12 Thread keeely
keeely added the comment: You can take out the test. It wasn't there before so who's going to care? -- ___ Python tracker ___ ___

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: This issue broke x86 Gentoo Installed with X 3.x buildbot: https://buildbot.python.org/all/#/builders/103/builds/2208 ERROR: test_prompt (test.test_venv.BasicTest) -- Traceback (most recent c

[issue36216] urlsplit does not handle NFKC normalization

2019-03-12 Thread STINNER Victor
STINNER Victor added the comment: Commit e37ef41289b77e0f0bb9a6aedb0360664c55bdd5 introduced a regression on AMD64 Windows8.1 Refleaks 2.7: test_urlparse leaked [114, 114, 114] references, sum=342 https://buildbot.python.org/all/#/builders/33/builds/532 It is fixed by PR 12291. You can tes

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-12 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +12273 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Steve Dower
Steve Dower added the comment: Presumably the issue is in the test and not the main change itself. Is this another case where Linux can't run venv tests inside a venv? -- ___ Python tracker

[issue36273] test_thread leaks a core dump on PPC64 AIX 3.x

2019-03-12 Thread STINNER Victor
New submission from STINNER Victor : PPC64 AIX 3.x: https://buildbot.python.org/all/#/builders/10/builds/2224 0:12:47 [160/420/1] test_threading failed (env changed) ... Ran 158 tests in 12.023s OK (skipped=1) Warning -- files was modified by test_threading Before: [] After: ['core'] I

[issue36216] urlsplit does not handle NFKC normalization

2019-03-12 Thread Steve Dower
Steve Dower added the comment: If it's fixed by not printing to the console, then it must be a refleak in print. Or perhaps in the test failure/repeat. That PR is going to be merged as soon as AppVeyor finishes, so nothing to worry about here. -- ___

[issue36205] Python 3.7 and 3.8 process_time is not reported correctly when built on older macOS versions

2019-03-12 Thread Ned Deily
Ned Deily added the comment: *** tip of master built on current macOS 10.14 - correct results: 3.8.0a2+ (heads/master:f45813df52, Mar 12 2019, 12:25:58) [Clang 10.0.0 (clang-1000.11.45.5)] macOS-10.14.3-x86_64-i386-64bit monotonic: namespace(adjustable=False, implementation='ma

[issue36273] test_thread leaks a core dump on PPC64 AIX 3.x

2019-03-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also https://bugs.python.org/issue35828#msg337076 where test_multiprocessing_fork seemed to leave a core dump. Maybe one test core dumps and leaves the report to the other causing env changed? -- nosy: +xtreak _

[issue34713] csvwriter.writerow()'s return type is undocumented

2019-03-12 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: csvwriter.writerows() does not return anything. The return value of csv.writecsv() is the return value of the write() method of the file object given as parameter in csv.writer(). I'm not sure it's safe to document it, should we return None instead? --

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Cheryl Sabella
Cheryl Sabella added the comment: Sorry about that. I'll work on a fix and test it on the buildbots first. There are some tests with pyvenv.cfg that are skipped if it happens in a venv (@skipInVenv decorator), but the test right above this one (test_defaults) does not use the decorator an

[issue30040] new empty dict can be more small

2019-03-12 Thread Inada Naoki
Inada Naoki added the comment: Another micro benchmark: $ ./py.edict.opt -m perf timeit --compare-to ./py.master.opt '{}' --duplicate=10 py.master.opt: . 26.3 ns +- 0.5 ns py.edict.opt: . 13.0 ns +- 0.1 ns Mean +- std dev: [py.master.opt] 26.3 ns +- 0.5

[issue10948] Trouble with dir_util created dir cache

2019-03-12 Thread Ivan Tashev
Ivan Tashev added the comment: distutils.dir_util is easily found in the documentation. If this behaviour is not fixed, at least the docs should state dir_util is not recommended for public use. -- nosy: +ivtashev ___ Python tracker

[issue36229] Linear-time list, set, and bytearray ops.

2019-03-12 Thread Brandt Bucher
Brandt Bucher added the comment: Thank for the input, Serhiy. On point (1): It's a valid concern... but I don't think it's necessarily a good enough reason to withhold a simple, yet *significant* performance increase for a common use case. This reminds me of past CPython implementation deta

[issue30040] new empty dict can be more small

2019-03-12 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-12 Thread Eryk Sun
Eryk Sun added the comment: > `os.path.expanduser` in `ntpath` uses `HOME` in preference to > `USERPROFILE` / `HOMEDRIVE\\HOMEPATH` Guido intentionally added support for HOME in ntpath.expanduser way back in Python 1.5 (circa 1997), and now we're removing it over 20 years later. I expect th

[issue36256] parser module fails on legal input

2019-03-12 Thread Brett Cannon
Brett Cannon added the comment: It's sounding like it might be worth the effort then to make lib2to3's parser not be a "hidden" thing in lib2to3, break it out as a new parser module (I have no stance on name), and then deprecate the old parser module. I think this was discussed at the last l

[issue36264] os.path.expanduser should not use HOME on windows

2019-03-12 Thread Steve Dower
Steve Dower added the comment: > Guido intentionally added support for HOME in ntpath.expanduser way back in > Python 1.5 (circa 1997), and now we're removing it over 20 years later. Wouldn't be the first thing to be removed :) -- ___ Python track

[issue35760] test_asyncio: test_async_gen_asyncio_gc_aclose_09() race condition

2019-03-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I have modified the test with help of Victor to have lower sleep delay to reproduce the bug. Since sleep calls call_later with the delay where the Timer object is created time.monotonic() + delay. I have added a print statement to see when the slee

[issue35760] test_asyncio: test_async_gen_asyncio_gc_aclose_09() race condition

2019-03-12 Thread Yury Selivanov
Yury Selivanov added the comment: Can you change "await asyncio.sleep(0.01)" to "await asyncio.sleep(1)" and check if the test still fails? (IOW see if there's a bug in Python's async gen implementation or this is simply caused by slow CI bots). -- _

[issue36256] parser module fails on legal input

2019-03-12 Thread Xavier Combelle
Xavier Combelle added the comment: never used the parser module nor lib2to3. Does they have any advantage over ast.parse and ast module ? -- ___ Python tracker ___ __

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Steve Dower
Steve Dower added the comment: It may also be that the directory exists already - the previous test explicitly removes it before calling create(). -- ___ Python tracker ___ _

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Steve Dower
Steve Dower added the comment: Maybe you can just call builder.create_configuration() from the test and pass in enough context that it doesn't have to create a real venv? That would also make the test faster. -- ___ Python tracker

[issue35760] test_asyncio: test_async_gen_asyncio_gc_aclose_09() race condition

2019-03-12 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: I changed sleep(0.01) to sleep(1) and even after 350 runs I couldn't see any failure in test. I guess it fails only for less difference in time like 0.01 and 0.001. $ ./python.exe -X dev -m test -j4 -F test_asyncgen -m test_async_gen_asyncio_gc_ac

[issue36085] Enable better DLL resolution

2019-03-12 Thread Eryk Sun
Eryk Sun added the comment: > will this change just affect the embedded Python, or will it affect > the whole process SetDefaultDllDirectories affects the whole process and cannot be reverted back to the legacy search path that includes "%SystemRoot%", "%SystemRoot%\System" (the old 16-bit

[issue30040] new empty dict can be more small

2019-03-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about creating small dict using a dict display? E.g. {'a': None}. -- ___ Python tracker ___ __

[issue35760] test_asyncio: test_async_gen_asyncio_gc_aclose_09() race condition

2019-03-12 Thread Yury Selivanov
Yury Selivanov added the comment: > I guess it fails only for less difference in time like 0.01 and 0.001. Yeah, that's what I was thinking. 0.1 seconds is still too tight, a simple GC pause can skew the timers and break the test logic. Maybe we should just increase the sleep to 0.5 or 1 se

[issue36085] Enable better DLL resolution

2019-03-12 Thread Steve Dower
Steve Dower added the comment: > The alternative ... Is what I proposed in the first place. Adding the SetDefaultDllDirectories call to Py_Main (that is, NOT for embedders) is to ensure consistency throughout the process. It'll only affect extension module dependencies that do their own del

[issue30040] new empty dict can be more small

2019-03-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Hmm, while 2x faster temporal empty dict is nice, > 10% slower case can be mitigated. > I will try more micro benchmarks and optimizations. I hate to see you working so hard to make this work. IMO, the effort is futile. Dicts were intentionally design

[issue35661] Store the venv prompt in pyvenv.cfg

2019-03-12 Thread Brett Cannon
Change by Brett Cannon : -- assignee: brett.cannon -> cheryl.sabella ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue36085] Enable better DLL resolution

2019-03-12 Thread Paul Moore
Paul Moore added the comment: OK, I don't really follow enough of the details here to comment properly. But clearly Steve and Eryk are not yet in agreement. My personal view is that this is something where we should be trying *very* hard to preserve backward compatibility. The proposal here

[issue36085] Enable better DLL resolution

2019-03-12 Thread Paul Moore
Paul Moore added the comment: > Since everyone seems to have misunderstood at least part of the proposal, I'm > not going to explain any more until I have a patch. Excluding boilerplate and > docs, it'll be about ten lines of code. +1 on that. Code is much harder to misunderstand :-) Paul

[issue30040] new empty dict can be more small

2019-03-12 Thread Mark Shannon
Mark Shannon added the comment: In general, I agree with Raymond that this is likely to counter-productive. But let's not guess, let's measure :) I expect that there are few live empty dicts at any time for most programs. In which case there is no point in any change that attempts to save me

  1   2   >