[issue38924] pathlib paths .normalize()

2019-11-28 Thread Vedran Čačić
Vedran Čačić added the comment: I think the real issue here > mypath = PurePosixPath(normpath(mypath)) is the PurePosixPath wrapper. It is nice that normpath _accepts_ pathlike objects, but it should then not return a generic str. It should try to return an object of the same type. Of

[issue31456] SimpleCookie fails to parse any cookie if an entry has whitespace in the name

2019-11-28 Thread Joel Rosdahl
Change by Joel Rosdahl : -- nosy: +Joel Rosdahl ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38924] pathlib paths .normalize()

2019-11-28 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > Yes, exactly the same behaviour, but arguing that normpath() can take a > pathlib object is just saying that it saves you from doing an intermediate > str(), which is, well, nice, but still not pretty. Consider `mypath = > mypath.normalize()`

[issue38924] pathlib paths .normalize()

2019-11-28 Thread Ionuț Ciocîrlan
Ionuț Ciocîrlan added the comment: > Can you please add an example of how normalize() should behave? ``` >>> mypath = PurePosixPath("foo/bar/bzz") >>> mypath /= "../../" >>> mypath PurePosixPath('foo/bar/bzz/../..') >>> mypath = mypath.normalize() >>> mypath PurePosixPath('foo') >>> mypath /=

[issue38938] Iterable merge performance and inclusion in itertools

2019-11-28 Thread Dennis Sweeney
Dennis Sweeney added the comment: The following seems like it is a short, readable recipe for itertools. -- Added file: https://bugs.python.org/file48748/merge_recipe.py ___ Python tracker

[issue38938] Iterable merge performance and inclusion in itertools

2019-11-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue38938] Iterable merge performance and inclusion in itertools

2019-11-28 Thread Dennis Sweeney
New submission from Dennis Sweeney : Although the implementation of the heapq.merge function uses an underlying heap structure, its behavior centers on iterators. For this reason, I believe there should either be an alias to this function in the itertools module or at least a recipe in the

[issue38500] Provide a way to get/set PyInterpreterState.frame_eval without needing to access interpreter internals

2019-11-28 Thread Paulo Henrique Silva
Change by Paulo Henrique Silva : -- nosy: +phsilva ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-11-28 Thread Vinay Sajip
Vinay Sajip added the comment: > I think Brett is thinking about eliminating the manual activate part > entirely, but any tool trying to automate that needs to do a lot of > platform-specific checks. If you have more than one venv then it seems like some manual step is required to switch

[issue38937] NameError in list comprehension within .pth file

2019-11-28 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +16895 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17414 ___ Python tracker ___

[issue38937] NameError in list comprehension within .pth file

2019-11-28 Thread Chris Billington
Chris Billington added the comment: I see. site.py calls exec() from within a function, and therefore the code is executed in the context of that function's locals and the site module globals. This means the code in .pth files can access (but not add new) local names from the

[issue38933] unusual behaviour on list of dependable lambdas

2019-11-28 Thread Tim Peters
Tim Peters added the comment: This behavior is intended and expected, so I'm closing this. As has been explained, in any kind of function (whether 'lambda' or 'def'), a non-local variable name resolves to its value at the time the function is evaluated, not the value it _had_ at the time

[issue38937] NameError in list comprehension within .pth file

2019-11-28 Thread Chris Billington
New submission from Chris Billington : The following one-liner works fine in a regular Python interpreter: $ python -c 'import sys; x = 5; [print(x + i) for i in range(5)]' 5 6 7 8 9 But in a .pth file, it raises a NameError: $ echo 'import sys; x = 5; [print(x + i) for i in range(5)]' |

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-11-28 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: > Surely "on native Windows you run venv-path\Scripts\activate[.ps1], on POSIX > you use source venv-path/bin/activate" isn't *that* hard for new users to > grok [...]? The if-Windows-X-else-Y part isn’t that hard; it’s the activate part that is :p I think

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-11-28 Thread Vinay Sajip
Vinay Sajip added the comment: > Basically activation is the biggest stumbling block I find with new users Surely "on native Windows you run venv-path\Scripts\activate[.ps1], on POSIX you use source venv-path/bin/activate" isn't *that* hard for new users to grok, and would cover the vast

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-11-28 Thread Brett Cannon
Brett Cannon added the comment: I've personally never come across Scripts in any other situation than virtual environments, but that isn't saying much about my Windows exposure either. :) Basically activation is the biggest stumbling block I find with new users when it comes to trying to

[issue38916] Remove array.fromstring

2019-11-28 Thread Brett Cannon
Brett Cannon added the comment: > How about note it in the documentation and logging rather than removing them? Yep, docs and raising DeprecationWarning should be good. -- ___ Python tracker

[issue38936] fatal error during installation 0x80070643 during python installation

2019-11-28 Thread kiranmai velishala
New submission from kiranmai velishala : Installing Python 3.8, Windows 10 64bit, exits installer and dumps the following error code to log. [3D8C:422C][2019-11-28T22:23:28]e000: Error 0x80070643: Failed to run maintanance mode for MSI package. [3D8C:422C][2019-11-28T22:23:28]e000: Error

[issue38920] Audit events for unhandled exceptions

2019-11-28 Thread Steve Dower
Change by Steve Dower : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue38920] Audit events for unhandled exceptions

2019-11-28 Thread Steve Dower
Steve Dower added the comment: New changeset bea33f5e1db6e4a554919a82894f44568576e979 by Steve Dower in branch 'master': bpo-38920: Add audit hooks for when sys.excepthook and sys.unraisable hooks are invoked (GH-17392)

[issue38920] Audit events for unhandled exceptions

2019-11-28 Thread Steve Dower
Steve Dower added the comment: New changeset b74a6f14b94d36fb72b1344663e81776bf450847 by Steve Dower in branch '3.8': bpo-38920: Add audit hooks for when sys.excepthook and sys.unraisablehook are invoked (GH-17392)

[issue38928] EnvBuilder.upgrade_dependencies() does not exist on 3.8

2019-11-28 Thread Vinay Sajip
Change by Vinay Sajip : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue38931] pathlib.Path on Windows - parser issue

2019-11-28 Thread Zachary Ware
Zachary Ware added the comment: You're welcome :) -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue38928] EnvBuilder.upgrade_dependencies() does not exist on 3.8

2019-11-28 Thread Vinay Sajip
Vinay Sajip added the comment: New changeset 18d8edbbb6626ac9cdf1152a720811beb2230b33 by Vinay Sajip (Tzu-ping Chung) in branch '3.8': bpo-38928: Remove upgrade_dependencies() from venv doc (GH-17410) https://github.com/python/cpython/commit/18d8edbbb6626ac9cdf1152a720811beb2230b33

[issue37347] Reference-counting problem in sqlite

2019-11-28 Thread Sergey Fedoseev
Change by Sergey Fedoseev : -- pull_requests: +16894 pull_request: https://github.com/python/cpython/pull/17413 ___ Python tracker ___

[issue35003] Provide an option to venv to put files in a bin/ directory on Windows

2019-11-28 Thread Tzu-ping Chung
Tzu-ping Chung added the comment: There are more differences than Scripts/bin, like Windows use Lib but POSIX uses lib/pythonX.Y. IMO it’s probably better to stick with platform conventions, especially since those can be discovered with sysconfig.get_paths(expand=False). I wonder whether

[issue38931] pathlib.Path on Windows - parser issue

2019-11-28 Thread tempest
tempest added the comment: But for course! (Slaps forehead!) Yes, giving the Windows path as a raw string works. For all the times I've done '\t'.join(str(f) for f in some_array) to get a tab-delimited text string, I should have had a clue. Sorry for the noise, and thanks for setting me

[issue38817] Immutable types inplace operations work incorrect in async

2019-11-28 Thread Andrew Svetlov
Andrew Svetlov added the comment: Raymond correctly spotted the problem. I think we should just close the issue. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-11-28 Thread Michael Felt
Michael Felt added the comment: Updated this PR, and PRs in pypa/pip and pypa/packaging to all be "in sync". -- ___ Python tracker ___

[issue38021] Modify AIX platform_tag so it provides PEP425 needs

2019-11-28 Thread Michael Felt
Change by Michael Felt : -- title: pep425 tag for AIX is inadequate -> Modify AIX platform_tag so it provides PEP425 needs ___ Python tracker ___

[issue26730] SpooledTemporaryFile rollover corrupts data silently when Unicode characters are written

2019-11-28 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > Note that the _file attribute may be TextIOWrapper after rollover() anyway > and the rollover() may be called implicitly. The code depending on the specific type of the _file is fragile at first. Okay, thanks for the detail. --

[issue38933] unusual behaviour on list of dependable lambdas

2019-11-28 Thread Vedran Čačić
Vedran Čačić added the comment: Yes, I never really understood what problem people have with it. If I manually say i = 0 f = lambda a: a[i] i = 1 g = lambda a: a[i] why does anyone expect functions f and g to be different? They have the same argument, and do the same thing with it. The