[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 course it's harder to do, especially in presence of pathlike objects of 
unknown classes, but with some reasonable assumptions on the constructors, it 
can be done---and it's much more useful. The similar debate, with similar 
conclusions, has already happened with datetime-like objects.

--
nosy: +veky

___
Python tracker 

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



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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()` vs. `mypath = PurePosixPath(normpath(mypath))`.

>From my experience in the past the intention has been to keep the API minimal 
>and below are some recent additions. Many discussions lead to the answer over 
>using a function that accepts a pathlike object already and if not add support 
>for it than add the API to pathlib itself. I will leave it to the experts on 
>this.

realink : issue30618
link_to : issue26978

--
nosy: +pitrou, serhiy.storchaka

___
Python tracker 

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



[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 /= "../../../there"
>>> mypath
PurePosixPath('foo/../../../there')
>>> mypath = mypath.normalize()
>>> mypath
PurePosixPath('../../there')
>>> mypath /= "../../and/back/again"
>>> mypath
PurePosixPath('../../there/../../and/back/again')
>>> mypath = mypath.normalize()
>>> mypath
PurePosixPath('../../../and/back/again')
```

> I assume you want the same behaviour as os.path.normpath which already 
> accepts a pathlike object to be added to pathlib.

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()` 
vs. `mypath = PurePosixPath(normpath(mypath))`.

> Do note that Path inherits from PurePath, so providing a normalize() method 
> on the latter means it will end up on the former.

That could be "circumvented" with a bit of code shuffling, e.g. moving 
everything from `PurePath` to a `PathBase` or `_Path` or somesuch, and forking 
the inheritance from there. On the other hand, it might be useful. I personally 
can't think of a scenario, but the GNU folk certainly think so, see `realpath 
--logical`: 
https://www.gnu.org/software/coreutils/manual/html_node/realpath-invocation.html

--

___
Python tracker 

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



[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 

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



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 itertools docs describing the use of heapq.merge.

Furthermore, I have an implementation (attached) of heapq.merge that is twice 
as fast for two iterables (as used in mergesort and other common cases), and is 
faster for up to 6 or 7 iterables. I think it would be nice to special-case 
this for small numbers of iterables for this significant speedup.

--
components: Library (Lib)
files: iter_merge.py
messages: 357631
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Iterable merge performance and inclusion in itertools
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48747/iter_merge.py

___
Python tracker 

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



[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: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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 between them. What about a tool like Pew (Python Env Wrapper), which 
from the README "is completely shell-agnostic and thus works on bash, zsh, 
fish, powershell, etc."

https://github.com/berdario/pew

I haven't used in under Windows, but it works a treat on POSIX for me, YMMV of 
course.

Of course, scripts installed in venvs never need activation to run - they pick 
up the correct interpreter from their venv automatically.

--

___
Python tracker 

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



[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 

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



[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 site.addpackage() function:

$ echo 'import sys; f.close()' | sudo tee 
/usr/lib/python3.8/site-packages/test.pth
import sys; f.close()
$ python
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized
Traceback (most recent call last):
  File "/usr/lib/python3.8/site.py", line 580, in 
main()
  File "/usr/lib/python3.8/site.py", line 567, in main
known_paths = addsitepackages(known_paths)
  File "/usr/lib/python3.8/site.py", line 350, in addsitepackages
addsitedir(sitedir, known_paths)
  File "/usr/lib/python3.8/site.py", line 208, in addsitedir
addpackage(sitedir, name, known_paths)
  File "/usr/lib/python3.8/site.py", line 164, in addpackage
for n, line in enumerate(f):
ValueError: I/O operation on closed file.

The example with the sys module worked because sys is in the globals the site 
module already.

Probably site.addpackage() should exec() code it its own environment:

if line.startswith(("import ", "import\t")):
exec(line, {})
continue

(added empty dict for exec() call)

or for backward compatibility for .pth files that are using globals from the 
site module without importing them (such as sys or os):

if line.startswith(("import ", "import\t")):
exec(line, globals().copy())
continue

This resolves the original issue

--

___
Python tracker 

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



[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 the function was defined.

If you need to use bindings in effect at the time the function is defined, then 
you need to do something to force that to happen.  A common way is to abuse 
Python's default-argument mechanism to initialize a local argument to the value 
of a non-local variable at function definition time.  In practice, e.g., this 
means changing the

lambda a:

in your first example to

lambda a, i=i:

Then, when the lambda is defined ('lambda' and 'def' are executable statements 
in Python! not just declarations), the then-current binding of non-local 
variable 'i' is captured and saved away as the default value of the local 
argument name 'i'.

--
nosy: +tim.peters
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[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)]' | sudo tee 
/usr/lib/python3.8/site-packages/test.pth
$ python
Error processing line 1 of /usr/lib/python3.8/site-packages/test.pth:

  Traceback (most recent call last):
File "/usr/lib/python3.8/site.py", line 169, in addpackage
  exec(line)
File "", line 1, in 
File "", line 1, in 
  NameError: name 'x' is not defined

Remainder of file ignored
Python 3.8.0 (default, Oct 23 2019, 18:51:26) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Since site.py uses exec() to exec each line of a .pth file, I thought I'd 
compare with that. It also works fine:

$ python -c 'exec("import sys; x = 5; [print(x + i) for i in range(5)]")'
5
6
7
8
9

This slight modification (the variable being used in the next statement still, 
but not within the loop of the comprehension) does not raise a NameError:

$ echo 'import sys; x = 5; [print(i) for i in range(x)]' | sudo tee 
/usr/lib/python3.8/site-packages/test.pth
import sys; x = 5; [print(i) for i in range(x)]
$ python
0
1
2
3
4
Python 3.8.0 (default, Oct 23 2019, 18:51:26) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

I know .pth file processing is very early in interpreter startup such that many 
things aren't working yet, but I wouldn't expect using a name defined outside a 
list comprehension within the loop body of said list comprehension not to work.

The following is fine also, showing that using names from outside the list 
comprehension doesn't always break:

$ echo 'import sys; [print(sys) for i in range(5)]' | sudo tee 
/usr/lib/python3.8/site-packages/test.pth
import sys; [print(sys) for i in range(5)]
$ python





Python 3.8.0 (default, Oct 23 2019, 18:51:26) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

This is fine too:

$ echo 'import sys; [print(str(sys) * i) for i in range(5)]' | sudo tee 
/usr/lib/python3.8/site-packages/test.pth
import sys; [print(str(sys) * i) for i in range(5)]
$ python





Python 3.8.0 (default, Oct 23 2019, 18:51:26) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 


My use case is looping over subdirs of a directory and adding them all to 
sys.path to provide similar functionality to python setup.py develop, with all 
python vcs repositories within a specific directory being prepended to 
sys.path, rather than having to add them one-by-one. I probably won't end up 
doing what I'm doing this way, but in any case the above seems like it's a bug, 
unless I'm grossly misunderstanding something.

--
components: Interpreter Core
messages: 357627
nosy: Chris Billington
priority: normal
severity: normal
status: open
title: NameError in list comprehension within .pth file
versions: Python 3.8

___
Python tracker 

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



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

---

> I've personally never come across Scripts in any other situation than virtual 
> environments [...].

Windows use a Scripts directory to store… scripts (Setuptools terminology, i.e. 
console and gui script entry points). So e.g. the global pip.exe would be at 
"{sys.prefix}\Scripts\pip.exe" (or is it sys.exec_prefix?) `pip install --user` 
would also install scripts into `%APPDATA%\Programs\Python\PythonXY\Scripts`. 
So venv’s setup is consistent with the rest of Python.

This directory structure can be expanded from sysconfig. So the proposal in my 
previous comment is to record the scheme in pyvenv.cfg, so you can have 
something like

def read_venv_scheme(env_dir):
with open(os.path.join(env_dir, 'pyvenv.cfg')) as f:
for line in f:
key, value = (p.strip() for p in line.split('='))
if key == 'scheme':
return value

def get_venv_environ_patch(env_dir):
scheme = read_venv_scheme(env_dir)
bin_dir = sysconfig.get_path('scripts', scheme=scheme, 
expand=False).format(base=env_dir)
return {'VIRTUAL_ENV': env_dir, 'PATH': bin_dir}

and this would give you the appropriate value on any platform.

--

___
Python tracker 

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



[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 majority of users? (i.e. not including the other, 
less-common POSIX shells.)

--

___
Python tracker 

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



[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 teach them about using virtual environments and this 
platform difference doesn't help. I would like to come up with _some_ solution 
to make it easier, even if it's something I have to put into the Python 
Launcher (although trying to get people to even agree on a name for virtual 
environments created beside the code turns out to be a hot topic). I would 
consider trying to come up with code so we have a `pipenv shell`/`conda shell` 
equivalent, but I've been told it is not pleasant to try and make work.

--

___
Python tracker 

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



[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 

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



[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 0x80070643: Failed to configure 
per-user MSI package.
[3D8C:422C][2019-11-28T22:23:28]i319: Applied execute package: tcltk_JustForMe, 
result: 0x80070643, restart: None
[3D8C:422C][2019-11-28T22:23:28]e000: Error 0x80070643: Failed to execute MSI 
package.
[3D8C:422C][2019-11-28T22:23:28]i301: Applying rollback package: 
tcltk_JustForMe, action: Modify, path: C:\Users\kivelish\AppData\Local\Package 
Cache\{978278A0-0090-4A9C-8610-001061A495AF}v3.8.150.0\tcltk.msi, arguments: ' 
ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" 
TARGETDIR="C:\Users\kivelish\AppData\Local\Programs\Python\Python38-32" 
OPTIONALFEATURESREGISTRYKEY="Software\Python\PythonCore\3.8-32\InstalledFeatures"
 REMOVE="AssociateFiles"'
[3D8C:422C][2019-11-28T22:23:30]e000: Error 0x80070643: Failed to run 
maintanance mode for MSI package.
[3D8C:422C][2019-11-28T22:23:30]e000: Error 0x80070643: Failed to configure 
per-user MSI package.

0x80070643 - Fatal Error during installation

--
components: Windows
files: FATAL_ISSUE.zip
messages: 357622
nosy: kiranmai velishala, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: fatal error during installation 0x80070643 during python installation
type: crash
versions: Python 3.8
Added file: https://bugs.python.org/file48746/FATAL_ISSUE.zip

___
Python tracker 

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



[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
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[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)
https://github.com/python/cpython/commit/bea33f5e1db6e4a554919a82894f44568576e979


--

___
Python tracker 

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



[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)
https://github.com/python/cpython/commit/b74a6f14b94d36fb72b1344663e81776bf450847


--

___
Python tracker 

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



[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 

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



[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 

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



[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


--

___
Python tracker 

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



[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 

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



[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 it’d be a good idea to record what scheme was used to create 
the venv (in pyvenv.cfg). Any Python runtime can use that value in 
get_paths(scheme=..., expand=False) to know about the venv’s structure, even if 
the venv was created on another platform. This would be particularly useful to 
e.g. inspect a Windows-native venv in a WSL Python.

--
nosy: +uranusjr

___
Python tracker 

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



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

--

___
Python tracker 

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



[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 

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



[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 

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



[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 

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



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

--

___
Python tracker 

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



[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 bytecode is completely the same. 
How can they do different things?

--

___
Python tracker 

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