[issue36323] IDLE: always display full grep path

2019-03-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

To be more exact, if 'Find in Files' is called in an unsaved editor window, 
including Output windows, the the entry starts as '*.py'.  I presume that this 
is relative to the current working directory, which is initially the startup 
directory.  But this can change in an undocumented way.  There is currently no 
way in a grep output to determine which directory was searched.  This is 
especially annoying when there are no hits and one knows that there should be 
some.

My initial thought was to prefix '*.py' with the directory of sys.executable.  
os.getcwd() might be more useful.  This would be in GrepDialog.open.  This will 
still be untested after PR12203 for #23205.
Most of this method is self-free path manipulation that can be pulled into a 
module method and separately tested.

PR12203 adds os.curdir ('.') to no-directory patterns.  After this issue, that 
will not be necessary unless a user deletes the explicit directory.  I am 
pausing a PR for this issue until I finish reviewing that one and it is merged.

In the long run, I might like to separate the 'In files' glob path into 
'Directory' and file glob pattern.  (On Windows at least, glob patterns are not 
allowed in the directory part of the pattern.)

A related improvement would be listing the base search directory once at the 
top of output windows and not repeat it on every hit line.  This would require 
revising the GoTo File/Line function.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36315] Unable to install Python 3.7.2

2019-03-16 Thread Sujoy


Sujoy  added the comment:

I am using Windows 7

--

___
Python tracker 

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



[issue36236] Python crash on macOS when CWD is invalid

2019-03-16 Thread Nick Coghlan


Nick Coghlan  added the comment:

Omitting it from sys.path in that case makes sense to me, but I'm not sure what 
sys.argv[0] should be set to.

--

___
Python tracker 

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



[issue36323] IDLE: always display full grep path

2019-03-16 Thread Terry J. Reedy


New submission from Terry J. Reedy :

The second line of the Find in Files dialog is
  In files:  []
When this is opened in the startup directory, Shell or an untitled editor, the 
entry starts as '*.py'.  When this is opened in an titled editor file, the 
initial entry is the full path.  A full path is much more useful and should 
always be given.

--
assignee: terry.reedy
components: IDLE
messages: 338115
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: always display full grep path
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue35121] Cookie domain check returns incorrect results

2019-03-16 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 4749f1b69000259e23b4cc6f63c542a9bdc62f1b by larryhastings 
(Xtreak) in branch '3.5':
[3.5] bpo-35121: prefix dot in domain for proper subdomain validation 
(GH-10258) (#12281)
https://github.com/python/cpython/commit/4749f1b69000259e23b4cc6f63c542a9bdc62f1b


--

___
Python tracker 

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



[issue23216] IDLE grep/find/replace source code needs docstrings

2019-03-16 Thread Cheryl Sabella


Change by Cheryl Sabella :


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



[issue23216] IDLE grep/find/replace source code needs docstrings

2019-03-16 Thread miss-islington


miss-islington  added the comment:


New changeset b34f1aa81433d60aee7bd744352b347dd650ca84 by Miss Islington (bot) 
in branch '3.7':
bpo-23216: IDLE: Add docstrings to search modules (GH-12141)
https://github.com/python/cpython/commit/b34f1aa81433d60aee7bd744352b347dd650ca84


--
nosy: +miss-islington

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 06e1e688228013f411aca6309562ef80df6ce5d3 by Raymond Hettinger 
(Diego Rojas) in branch 'master':
bpo-34160: Update news entry for XML order attributes (#12335)
https://github.com/python/cpython/commit/06e1e688228013f411aca6309562ef80df6ce5d3


--

___
Python tracker 

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



[issue35647] Cookie path check returns incorrect results

2019-03-16 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 382981b25092b5e9285f1e4894142af1e8f2ca86 by larryhastings 
(Xtreak) in branch '3.5':
bpo-35647: Fix path check in cookiejar (#11436) (#12277)
https://github.com/python/cpython/commit/382981b25092b5e9285f1e4894142af1e8f2ca86


--

___
Python tracker 

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



[issue23216] IDLE grep/find/replace source code needs docstrings

2019-03-16 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12336
stage: needs patch -> patch review

___
Python tracker 

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



[issue23216] IDLE grep/find/replace source code needs docstrings

2019-03-16 Thread Cheryl Sabella


Cheryl Sabella  added the comment:


New changeset 0bb5e75cf8bc9b197ffb91cba6f30543ed502708 by Cheryl Sabella in 
branch 'master':
bpo-23216: IDLE: Add docstrings to search modules (GH-12141)
https://github.com/python/cpython/commit/0bb5e75cf8bc9b197ffb91cba6f30543ed502708


--

___
Python tracker 

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



[issue35121] Cookie domain check returns incorrect results

2019-03-16 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 42ad4101d3ba7ca3c371dadf0f8880764c9f15fb by larryhastings 
(Xtreak) in branch '3.4':
[3.4] bpo-35121: prefix dot in domain for proper subdomain validation 
(GH-10258) (#12279)
https://github.com/python/cpython/commit/42ad4101d3ba7ca3c371dadf0f8880764c9f15fb


--

___
Python tracker 

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



[issue35647] Cookie path check returns incorrect results

2019-03-16 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset e260f092cd0d8975c777e73ca6fb549d59b5d452 by larryhastings 
(Xtreak) in branch '3.4':
bpo-35647: Fix path check in cookiejar (#11436) (#12278)
https://github.com/python/cpython/commit/e260f092cd0d8975c777e73ca6fb549d59b5d452


--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Raymond, it sounds like your end-user didn't agree that
> "sorting is no longer necessary or desirable."

Sorry for being unclear.  The user needed to *overcome* the sorting behavior so 
that they could produce an ordering of their own choosing.  The problem then 
became that we had to work out a way to defeat the sorting to allow the 
requested attribute ordering to be preserved.

Roughly:

   casefile = Element('casefile', clearance="confidential",
  access="internal", valid_through="31 Mar 2022")

The desired result is that the attribute order be preserved.  By removing the 
sort, a user can specify an order they want and have that specification honored.

--

___
Python tracker 

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



[issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit

2019-03-16 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue35493] multiprocessing.Pool._worker_handler(): use SIGCHLD to be notified on worker exit

2019-03-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7c994549dcffd0d9d3bb37475e6374f356e7240e by Pablo Galindo in 
branch 'master':
bpo-35493: Use Process.sentinel instead of sleeping for polling worker status 
in multiprocessing.Pool (#11488)
https://github.com/python/cpython/commit/7c994549dcffd0d9d3bb37475e6374f356e7240e


--

___
Python tracker 

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



[issue36322] Argument typo in dbm.ndbm.open

2019-03-16 Thread Marco Rougeth


Change by Marco Rougeth :


--
title: Argument typo in dam.ndbm.open -> Argument typo in dbm.ndbm.open

___
Python tracker 

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



[issue35715] ProcessPool workers hold onto return value of last task in memory

2019-03-16 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 962bdeab191ee64459caa199209331005797ea7a by Pablo Galindo (Dave 
Chevell) in branch 'master':
bpo-35715: Liberate return value of _process_worker (GH-11514)
https://github.com/python/cpython/commit/962bdeab191ee64459caa199209331005797ea7a


--
nosy: +pablogsal

___
Python tracker 

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



[issue35715] ProcessPool workers hold onto return value of last task in memory

2019-03-16 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Stefan Behnel


Stefan Behnel  added the comment:

:) The coolest thing about it is: it's not a hack at all. It's simply making 
use of the new feature in a suitable way.

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Ned Batchelder


Ned Batchelder  added the comment:

Thanks for the suggestion.  My problem has already been fixed with my own hack 
workaround.  Your idea is a good one to leave here so that other frustrated 
users will have code to copy for their hack workaround.

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Stefan Behnel


Stefan Behnel  added the comment:

Something like this:

def sort_attributes(root):
for el in root.iter():
attrib = el.attrib
if len(attrib) > 1:
attribs = sorted(attrib.items())
attrib.clear()
attrib.update(attribs)

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Stefan Behnel


Stefan Behnel  added the comment:

Ned, would it solve your problem to write a helper function that walks the tree 
and sorts the attrib dicts? That would also work in all existing CPython 
versions (because they already sort attributes anyway), for both ElementTree 
and lxml, and you wouldn't have to pass a new option into the serialiser 
conditionally based on the running Python version.

--

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Ned Batchelder


Ned Batchelder  added the comment:

I'm a bit mystified why people are still opposed to providing sorting control, 
even after people are resorting to "hack work-arounds."  The (two) pull 
requests that provide the control are simple, easy to understand, and easy to 
test.

Raymond, it sounds like your end-user didn't agree that "sorting is no longer 
necessary or desirable."

How many people have to comment here on the difficulties they are having before 
we do the simple thing that will help them?

--

___
Python tracker 

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



[issue36276] Python urllib CRLF injection vulnerability

2019-03-16 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

Marking this as duplicate of issue30458.

Thanks for the discussion.

--
resolution:  -> duplicate
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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

FWIW, this issue arose from an end-user problem. She had a hard requirement to 
show a security clearance level as the first attribute.  We did find a work 
around but it was hack.

--

___
Python tracker 

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



[issue36321] Fix misspelled attribute name in namedtuple()

2019-03-16 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +12335
stage:  -> patch review

___
Python tracker 

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



[issue36322] Argument typo in dam.ndbm.open

2019-03-16 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue36322] Argument typo in dam.ndbm.open

2019-03-16 Thread Marco Rougeth

New submission from Marco Rougeth :

Reading the documentation for `dbm.gnu.open` I noticed that there were a typo 
in the `flags` argument, it was documented as `flag`, in plural form.

The same typo was present for `dbm.ndbm.open`, but in this case, `flag` makes 
more sense than `flags`, since the function accepts only one option as a flag.

I opened a PR [1] fixing both typos, but I’d like to discuss if makes sense to 
rename the argument on `dbm.ndbm.open` from `flags` to `flag`. As point out by  
@remilapeyre, this change would be backwards compatible, since we cannot use 
the function with keyword arguments.

>>> dbm.ndbm.open(filename=‘foo’, flags=‘r’, mode=438)
Traceback (most recent call last):
  File “”, line 1, in 
TypeError: open() takes no keyword arguments

What do you folks think about it?

1 - https://github.com/python/cpython/pull/12095

--
messages: 338097
nosy: rougeth
priority: normal
severity: normal
status: open
title: Argument typo in dam.ndbm.open
type: enhancement

___
Python tracker 

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



[issue36321] Fix misspelled attribute name in namedtuple()

2019-03-16 Thread Raymond Hettinger


New submission from Raymond Hettinger :

The attribute name, '_fields_defaults' was misspelled and should have been 
''_field_defaults'.  The namedtuple documentation uses both spellings.  The 
typing.NamedTuple class consistently uses the latter spelling.  The intent was 
the both would be spelled the same way.

>>> from typing import NamedTuple
>>> class Employee(NamedTuple):
name: str
id: int = 3
>>> Employee._field_defaults
{'id': 3}

>>> from collections import namedtuple
>>> Employee = namedtuple('Employee', ['name', 'id'], defaults=[3])
>>> Employee._fields_defaults
{'id': 3}

Since 3.7 API is already released, it may be reasonable to provide both 
spellings for namedtuple().

--
assignee: rhettinger
components: Library (Lib)
messages: 338096
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Fix misspelled attribute name in namedtuple()
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-16 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
type:  -> behavior

___
Python tracker 

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



[issue36320] typing.NamedTuple to switch from OrderedDict to regular dict

2019-03-16 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Suggestions:
* Deprecate _field_types in favor of __annotations__.
* Convert __annotations__ from OrderedDict to a regular dict.

This will make the API cleaner. The first one will also remove a difference 
between NamedTuple and namedtuple().  The second is consistent with the 
decision to convert _asdict() to a regular dictionary since OrderedDict is no 
longer necessary or desirable. The second will also make the signature of 
__annotations__ match that from other classes.

--
assignee: levkivskyi
components: Library (Lib)
messages: 338095
nosy: levkivskyi, rhettinger
priority: normal
severity: normal
status: open
title: typing.NamedTuple to switch from OrderedDict to regular dict
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



[issue36298] Lib/pyclbr.py crashes when the package spec cannot be determined by importlib

2019-03-16 Thread mental


mental  added the comment:

Thanks :) I've submitted a review for the patch.

--

___
Python tracker 

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



[issue36319] Erro 0xC0000374 on windows 10

2019-03-16 Thread Андрей Казанцев

New submission from Андрей Казанцев :

On windows 10 python falls after evaluate this code
```
import time
import locale

locale.setlocale(locale.LC_ALL, 'Russian_Russia.utf8')
time.localtime(1552753806.2363703)
```

What tools would you recommend for getting more information?

--
components: Windows
files: Снимок.PNG
messages: 338093
nosy: paul.moore, steve.dower, tim.golden, zach.ware, Андрей Казанцев
priority: normal
severity: normal
status: open
title: Erro 0xC374 on windows 10
type: crash
versions: Python 3.7
Added file: https://bugs.python.org/file48212/Снимок.PNG

___
Python tracker 

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



[issue36318] Adding support for setting the "disabled" attribute of loggers from logging.config.dictConfig

2019-03-16 Thread Géry

New submission from Géry :

In the logging Python library, one can completely disable logging (for all 
levels) for a particular logger either by setting its `disabled` attribute to 
`True`, or by adding to it a `lambda record: False` filter, or by adding to it 
a `logging.NullHandler()` handler (to avoid the `logging.lastResort` handler) 
and setting its `propagate` attribute to `False` (to avoid log record 
propagation to its parent loggers):


import logging

# 1st solution
logging.getLogger("foo").disabled = True

# 2nd solution
logging.getLogger("foo").addFilter(lambda record: False)

# 3rd solution
logging.getLogger("foo").addHandler(logging.NullHandler())
logging.getLogger("foo").propagate = False


One can obtain the same logging configuration for the 2nd and 3rd solutions 
with the `logging.config.dictConfig` function:


import logging.config

# 2nd solution
logging.config.dictConfig({
"version": 1,
"filters": {
"all": {
"()": lambda: (lambda record: False)
}
},
"loggers": {
"foo": {
"filters": ["all"]
}
}
})

# 3rd solution
logging.config.dictConfig({
"version": 1,
"handlers": {
"null": {
"class": "logging.NullHandler"
}
},
"loggers": {
"foo": {
"handlers": ["null"],
"propagate": False
}
}
})


However it is currently not possible for the 1st solution:


import logging.config

# 1st solution
logging.config.dictConfig({
"version": 1,
"loggers": {
"foo": {
"disabled": True
}
}
})

What do you think about adding this feature? I think it might be very 
convenient and improve consistency.

--
components: Library (Lib)
messages: 338092
nosy: maggyero, vinay.sajip
priority: normal
severity: normal
status: open
title: Adding support for setting the "disabled" attribute of loggers from 
logging.config.dictConfig
type: enhancement
versions: Python 3.7

___
Python tracker 

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



[issue36318] Adding support for setting the "disabled" attribute of loggers from logging.config.dictConfig

2019-03-16 Thread Géry

Change by Géry :


--
keywords: +patch
pull_requests: +12334
stage:  -> patch review

___
Python tracker 

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



[issue36316] Provide SHA256 checksums for installers

2019-03-16 Thread Benjamin Peterson


Benjamin Peterson  added the comment:

MD5 isn't a security measure. It's provided for a quick check of integrity.

--
resolution:  -> wont fix
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



[issue36127] Argument Clinic: inline parsing code for functions with keyword parameters

2019-03-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1b0393d5b7842dcd9e933117d2d5404d15e2ad00 by Serhiy Storchaka in 
branch 'master':
bpo-36127: Fix compiler warning in _PyArg_UnpackKeywords(). (GH-12353)
https://github.com/python/cpython/commit/1b0393d5b7842dcd9e933117d2d5404d15e2ad00


--

___
Python tracker 

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



[issue36315] Unable to install Python 3.7.2

2019-03-16 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I believe support has been removed for Windows Vista.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue31062] socket.makefile does not handle line buffering

2019-03-16 Thread Vincent Michel


Vincent Michel  added the comment:

I ran into this issue too so I went ahead and created a pull request 
(https://github.com/python/cpython/pull/12370).

--
nosy: +vxgmichel
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue31062] socket.makefile does not handle line buffering

2019-03-16 Thread Vincent Michel


Change by Vincent Michel :


--
keywords: +patch
pull_requests: +12333
stage:  -> patch review

___
Python tracker 

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



[issue36314] Pivot_Table Docstring Error

2019-03-16 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Prakhar, for future reference, please don't submit unnecessary screenshots to 
report bugs. Screen shots are hostile to the blind or visually impaired, who 
may be reading this with a screen-reader, and they make it impossible for us to 
copy your code to run it.

In future, please copy and paste the sample code and exception, as text, not as 
a picture.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue10641] kill_python sometimes fails to kill processes on buildbots

2019-03-16 Thread Zachary Ware


Zachary Ware  added the comment:

As kill_python.exe has been removed from PCbuild/ and this hasn't been a 
problem in recent years, I'm going to go ahead and close the issue.

--
resolution:  -> out of date
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



[issue36317] Typo in documentation of _PyObject_FastCallDict

2019-03-16 Thread Rémi Lapeyre

New submission from Rémi Lapeyre :

Return result is documented as:

> Return the result on success. Raise an exception on return NULL on error.

I'm not absolutely sure but shouldn't that be "Raise an exception and return 
NULL on error."?

Or should it be "Raise an exception or return NULL on error."?

--
components: Interpreter Core
messages: 338085
nosy: remi.lapeyre, vstinner
priority: normal
severity: normal
status: open
title: Typo in documentation of _PyObject_FastCallDict
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



[issue36312] Invalid flag for some code page decoders

2019-03-16 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +12332
stage:  -> patch review

___
Python tracker 

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



[issue21269] Provide args and kwargs attributes on mock call objects

2019-03-16 Thread Kumar Akshay

Kumar Akshay  added the comment:

ping..

--

___
Python tracker 

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



[issue36316] Provide SHA256 checksums for installers

2019-03-16 Thread SilentGhost


Change by SilentGhost :


--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue36316] Provide SHA256 checksums for installers

2019-03-16 Thread fazl


New submission from fazl :

Python is widely used and should use more trustworthy checksums than MD5.

Even the successor to MD5 (SHA-1) was considered insecure in 2017. From 
https://nakedsecurity.sophos.com/2017/02/23/bang-sha-1-collides-at-38762cf7f55934b34d179ae6a4c80cadccbb7f0a/
 :

"For many years [...] MD5 was widely used [...] but it is now forbidden in the 
cryptographic world because [...] MD5 collisions are easy to generate on 
purpose, so the algorithm can no longer be trusted."

--
components: Installation
messages: 338083
nosy: fazl
priority: normal
severity: normal
status: open
title: Provide SHA256 checksums for installers
type: security
versions: Python 2.7, Python 3.7, Python 3.8

___
Python tracker 

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



[issue36315] Unable to install Python 3.7.2

2019-03-16 Thread Sujoy


New submission from Sujoy :

Getting the following error while trying to install Python 3.7.2
0x80070002- The system can not find the file specified.
Log file has been attached.

--
components: Installation
files: Python 3.7.2 (32-bit)_log.txt
messages: 338082
nosy: ecesu...@gmail.com
priority: normal
severity: normal
status: open
title: Unable to install Python 3.7.2
type: behavior
versions: Python 3.7
Added file: https://bugs.python.org/file48211/Python 3.7.2 (32-bit)_log.txt

___
Python tracker 

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



[issue35967] Better platform.processor support

2019-03-16 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 08.03.2019 18:50, Jason R. Coombs wrote:
> 
>> It's also easy to bypass that by simply seeding the global cache
>> for uname(): _uname_cache. 
>> Or you could monkey-patch the platform module
>> in your utility to work around the circular reference.
> 
> I don't think these options are possible in the general case. It was what I 
> attempted to do in the first place, but could not. Consider the situation 
> where a namespace package is present or where a script uses pkg_resources to 
> bootstrap itself (a very common case), or any other case where 
> `platform.(anything)` is invoked before the "bypass" or "monkey-patch" has a 
> chance to run. This happens when running the test suite for `cmdix` because 
> pytest invokes pkg_resources to search for entry points and that code invokes 
> `platform.system` (or similar) to evaluate environment markers long before 
> the cmdix code has been imported.

I don't quite follow: since you are the author of the tool, you can of
course have your uname.py import platform and then apply one of the
above tricks, e.g.

"""
#!/usr/bin/env python3
import platform

# Seed uname cache to avoid calling uname
platform._uname_cache = platform.uname_result(
system='Linux',
node='moon',
release='5.99.99',
version='#1 SMP 2020',
machine='x86_64',
processor='x86_64')

print ('Hello from uname.py')
print ('platform.uname() = %r' % (platform.uname(),))
"""

> Here's what happens:
> 
> `platform.(anything)` runs `platform.uname` and `platform.uname` invokes 
> `uname -p` in a subprocess _unconditionally_. Python doesn't provide hooks to 
> monkey-patch that out before it gets invoked.

This is only true for the platform APIs which need information from
uname. Not in general.

>> Or you could call your utility something else.
> 
> The point of this utility is to supply "coreutils" using Python. It's derived 
> from an abandoned project called "pycoreutils", one purpose of which is to 
> provide the core utilities on a minimal Linux distribution that doesn't have 
> uname. Another is to supply coreutils on Windows. Having an alternate name 
> isn't really viable when the purpose is to supply that interface.
> 
> 
> I do think your considerations are reasonable, and I'm close to giving up. I 
> look forward to your feedback on the 'resolved-late' branch.

I don't have anything against making calling of uname lazy.
I also don't have anything against return useful information
rather than "unknown".

Your PR is missing tests, though, to support that it actually
returns the same values are before for a set of common platforms.

--

___
Python tracker 

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



[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-16 Thread Paul Moore


Paul Moore  added the comment:

The referenced PR isn't working - in the nuget package, python.props still says 
to exclude venv (and indeed venv is still missing). There's a 
PC/layout/support/props.py file that includes the offending "remove venv" line. 
Does that need modifying too?

BTW, that file also removes ensurepip, even though options.py includes "pip" in 
the nuget package. That seems like it might be a bug?

I'm OK with making focused changes to get this working, but is there anywhere 
that documents the process by which the nuget distribution is generated (in 
terms of what the steps are and what the various files do?)

Update: I tried removing venv from props.py, but that didn't work. So I tried 
removing it from python.props as well, but still no joy. Any suggestions?

--

___
Python tracker 

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



[issue15822] installed python may fail incorrectly trying to rebuild lib2to3 grammar pickles

2019-03-16 Thread Bun Hin


Bun Hin  added the comment:

I have similar problem with python 3.7.0 or 3.7.2,
how to fix my installation to get it work?

please help

Thanks

--
nosy: +bunhin

___
Python tracker 

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



[issue36314] Pivot_Table Docstring Error

2019-03-16 Thread SilentGhost


Change by SilentGhost :


--
resolution:  -> third party
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



[issue36314] Pivot_Table Docstring Error

2019-03-16 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

By np I hope you mean numpy which is not a part of CPython and also pivot_table 
is part of pandas and could get a better resolution reporting on their repo.

--
nosy: +xtreak

___
Python tracker 

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



[issue36314] Pivot_Table Docstring Error

2019-03-16 Thread Prakhar


New submission from Prakhar :

In the docstring of Pivot_table,np.median function should be used instead of 
np.mean.

File attached for reference.

--
files: Screenshot 2019-03-16 at 4.15.25 PM.png
messages: 338077
nosy: prakharb
priority: normal
severity: normal
status: open
title: Pivot_Table Docstring Error
type: enhancement
versions: Python 3.7
Added file: https://bugs.python.org/file48210/Screenshot 2019-03-16 at 4.15.25 
PM.png

___
Python tracker 

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



[issue35100] urllib.parse.unquote_to_bytes: needs "escape plus" option

2019-03-16 Thread andrew-g


Change by andrew-g :


--
keywords: +patch
pull_requests: +12331
stage:  -> patch review

___
Python tracker 

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



[issue36010] Please provide a .zip Windows release of Python that is not crippled/for embedding only

2019-03-16 Thread Paul Moore


Change by Paul Moore :


--
keywords: +patch
pull_requests: +12330
stage: needs patch -> patch review

___
Python tracker 

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



[issue13670] Increase test coverage for pstats.py

2019-03-16 Thread andrea crotti


andrea crotti  added the comment:

It has been a long time but if it's still useful sure.

I can see some tests have been added in commit 
863b1e4d0e95036bca4e97c1b8b2ca72c19790fb
but if these are still relevant I'm happy to go ahead.

--

___
Python tracker 

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



[issue35773] test_bdb fails on AIX bot (regression)

2019-03-16 Thread SilentGhost


Change by SilentGhost :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue3905] subprocess failing in GUI applications on Windows

2019-03-16 Thread Eryk Sun


Eryk Sun  added the comment:

> A current test on a Win 7 machine similar to what I did  
> would still be good.  

Python 3.8 is the last version to support Windows 7 (i.e. NT 6.1). It should 
get bug fixes through Spring 2021, so we have a couple more years to fix this.

We should constrain the fix to just older versions of Windows (prior to 6.2) 
and the classic console file handles (i.e. the lower 2 bits are set such as 3, 
7, 11) that they use. Otherwise a bad standard handle should fail the call.

--

___
Python tracker 

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



[issue9030] ctypes variable limits

2019-03-16 Thread SilentGhost


SilentGhost  added the comment:

Is this enhancement still relevant for ctypes or can the issue be closed as 
"won't fix"?

--
nosy: +SilentGhost, amaury.forgeotdarc, belopolsky, meador.inge

___
Python tracker 

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



[issue36313] error: [Errno 13] Permission denied: '/usr/local/lib/python3.7/lib2to3/Grammar3.7.2.final.0.pickle'

2019-03-16 Thread Bun Hin


Bun Hin  added the comment:

is there any better way to configure other than as root? because this python3.7 
may be used by other user too

in a more strict environment,  compile it other than root (sudo) may not be 
allowed also.

using a user  may have permission issue as well right?  i am not sure here

--

___
Python tracker 

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



[issue16961] No regression tests for -E and individual environment vars

2019-03-16 Thread SilentGhost


SilentGhost  added the comment:

Nick, please re-open if you feel this issue is still relevant.

--
nosy: +SilentGhost
resolution:  -> out of date
stage:  -> resolved

___
Python tracker 

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



[issue10514] configure does not create accurate Makefile on AIX

2019-03-16 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +Michael.Felt

___
Python tracker 

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



[issue36312] Invalid flag for some code page decoders

2019-03-16 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue36313] error: [Errno 13] Permission denied: '/usr/local/lib/python3.7/lib2to3/Grammar3.7.2.final.0.pickle'

2019-03-16 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

configure and make run as root might cause this. See also issue15317 that is a 
similar report for source install.

--
nosy: +xtreak

___
Python tracker 

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



[issue10514] configure does not create accurate Makefile on AIX

2019-03-16 Thread SilentGhost


Change by SilentGhost :


--
nosy: +David.Edelsohn

___
Python tracker 

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



[issue3905] subprocess failing in GUI applications on Windows

2019-03-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Since Win 10 was released a year after Jun 2014, I must have still been on Win 
7 when I saw the failure. I believe there have some patches to filenos and 
subprocess since, but I don't know the relation between filenos and file 
handles.  A current test on a Win 7 machine similar to what I did  would still 
be good.  Perhaps it would have been better to reopen #25492, but I am adding 
the current Windows people nosy here.

--
nosy: +paul.moore, steve.dower, tim.golden, zach.ware -georg.brandl, jmfauth
stage:  -> test needed
status: closed -> open

___
Python tracker 

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



[issue36313] error: [Errno 13] Permission denied: '/usr/local/lib/python3.7/lib2to3/Grammar3.7.2.final.0.pickle'

2019-03-16 Thread Bun Hin


New submission from Bun Hin :

I get this error while installing some packages with pip3 inside an environment

using centOS 7 with python 3.7.2 as parallel install.
step to reproduce: (dependancies are installed)

rm -rf /usr/local/lib/python3.7
cd /root/
wget https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tgz
tar -xzf Python-3.7.2.tgz
cd Python-3.7.2
./configure --prefix=/usr/local --enable-shared --enable-optimizations 
LDFLAGS="-Wl,-rpath /usr/local/lib"
make
make altinstall

adduser a-user

su - a-user
/usr/local/lib/python3.7 -m venv user-envn
source user-envn/bin/activate

pi3 install --upgrade pip
pip install pyusb==1.0.0

result with error:

Collecting pyusb==1.0.0
  Using cached 
https://files.pythonhosted.org/packages/8a/19/66fb48a4905e472f5dfeda3a1bafac369fbf6d6fc5cf55b780864962652d/PyUSB-1.0.0.tar.gz
Complete output from command python setup.py egg_info:
running egg_info
creating pip-egg-info/pyusb.egg-info
writing pip-egg-info/pyusb.egg-info/PKG-INFO
writing dependency_links to pip-egg-info/pyusb.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/pyusb.egg-info/top_level.txt
writing manifest file 'pip-egg-info/pyusb.egg-info/SOURCES.txt'
error: [Errno 13] Permission denied: 
'/usr/local/lib/python3.7/lib2to3/Grammar3.7.2.final.0.pickle'

please help how to solve this

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 338069
nosy: bunhin
priority: normal
severity: normal
status: open
title: error: [Errno 13] Permission denied: 
'/usr/local/lib/python3.7/lib2to3/Grammar3.7.2.final.0.pickle'
versions: Python 3.7

___
Python tracker 

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



[issue22587] os.path.abspath(None) behavior is inconsistent between platforms

2019-03-16 Thread SilentGhost


SilentGhost  added the comment:

I'm closing this bug as fixed as TypeError is being raised on Linux on 3.7.2 (I 
think it was fixed for all platforms, due to work on path-like interface in 
3.6). I don't think it's worth implementing this in 2.7 at this stage.

--
nosy: +SilentGhost
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue36312] Invalid flag for some code page decoders

2019-03-16 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

>From 
>https://docs.microsoft.com/en-us/windows/desktop/api/stringapiset/nf-stringapiset-multibytetowidechar:

For the code pages listed below, dwFlags must be set to 0. Otherwise, the 
function fails with ERROR_INVALID_FLAGS.

50220
50221
50222
50225
50227
50229
57002 through 57011
65000 (UTF-7)
42 (Symbol)

But currently in PyUnicode_DecodeCodePageStateful() it is set to 
MB_ERR_INVALID_CHARS for all code pages except CP_UTF7. This causes an error 
for all other code pages list above.

>>> codecs.code_page_decode(50220, b'abc')
Traceback (most recent call last):
  File "", line 1, in 
OSError: [WinError 1004] Invalid flags

--
components: Interpreter Core, Windows
messages: 338067
nosy: doerwalter, lemburg, paul.moore, serhiy.storchaka, steve.dower, 
tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Invalid flag for some code page decoders
type: behavior
versions: Python 2.7, Python 3.7, Python 3.8

___
Python tracker 

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



[issue14934] generator objects can clear their weakrefs before being resurrected

2019-03-16 Thread SilentGhost


Change by SilentGhost :


--
versions: +Python 3.8 -Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue3905] subprocess failing in GUI applications on Windows

2019-03-16 Thread Eryk Sun


Eryk Sun  added the comment:

> I am closing this as out of date because the problem seems to have been 
> fixed elsewise.

This is a problem only in Windows 7, which we should have addressed years ago. 
It's common enough that we shouldn't leave it as just an unresolved third-party 
issue. I discussed the problem and suggested a workaround in issue 25492, which 
I closed as a duplicate of this issue four years ago.

--
resolution: out of date -> 
stage: resolved -> 
type:  -> behavior
versions: +Python 3.7, Python 3.8 -Python 3.3, Python 3.4, Python 3.5

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Is not PR 12354 a duplicate of PR 10452?

--

___
Python tracker 

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



[issue14189] Documentation for some C APIs is missing clear specification of the type of reference they return

2019-03-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This may be fixed recently (see issue18085, issue32077, issue35475 etc). Just 
check that this is true for all reported functions.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

@scoder

ok, we can close my PR and I will submit a patch to docutils.

--

___
Python tracker 

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



[issue14189] Documentation for some C APIs is missing clear specification of the type of reference they return

2019-03-16 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

I would like to work on this issue.

--
nosy: +matrixise
versions: +Python 3.8 -Python 2.7

___
Python tracker 

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



[issue36311] Flaw in Windows code page decoder for large input

2019-03-16 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

There is a flaw in PyUnicode_DecodeCodePageStateful() (exposed as 
_codecs.code_page_decode() at Python level). Since MultiByteToWideChar() takes 
the size of the input as C int, it can not be used for decoding more than 2 
GiB. Large input is split on chunks of size 2 GiB which are decoded separately. 
The problem is if it split in the middle of a multibyte character. In this case 
decoding chunks will always fail or replace incomplete parts of the multibyte 
character at both ends with what the error handler returns.

It is hard to reproduce this bug, because you need to decode more than 2 GiB, 
and you will need at least 14 GiB of RAM for this (maybe more).

--
components: Interpreter Core, Windows
messages: 338061
nosy: doerwalter, lemburg, paul.moore, serhiy.storchaka, steve.dower, 
tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Flaw in Windows code page decoder for large input
type: behavior
versions: Python 2.7, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34160] ElementTree not preserving attribute order

2019-03-16 Thread Stefan Behnel


Stefan Behnel  added the comment:

FWIW, I second Raymond's opposition against a new option. It's really not 
something that users should care about. Instead of us providing a new "sort or 
not" option, and people adding it (conditionally!) to their code to "fix" 
previous or future behaviour of the tool, they should better invest the time 
into fixing their code to not rely on behaviour that was never guaranteed.

Also, lxml cannot support such a serialisation option because it preserves the 
order of attributes as soon as they are *created*. It previously also sorted 
dicts on input, but only dicts and not other (sequential) ways to set 
attributes, which I always considered a necessary quirk to gain reproducible 
output. I'm planning to remove the sorting for Py3.6+ in the next release. It 
is better to leave the decision about attribute order entirely to the users.

It's not difficult to get sorted dict behaviour in Py3.6+ if you really want it 
(walk the tree and sort each el.attrib if you feel like it), but it's currently 
impossible to _not_ get sorted attributes but the "expected" order of creation. 
That's what we should fix.

--

___
Python tracker 

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



[issue4071] ntpath.abspath fails for long str paths

2019-03-16 Thread Eryk Sun


Eryk Sun  added the comment:

I'm closing this as a resolved issue. Python 2 is approaching end of life, and 
I don't see a pressing need for my suggestion in msg237007. We should be using 
unicode for paths in Windows anyway since its file systems are natively Unicode.

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



[issue15286] normpath does not work with local literal paths

2019-03-16 Thread Eryk Sun


Eryk Sun  added the comment:

For issue 7909, ntpath.normpath was modified to return the path unchanged if it 
begins with exactly either ".\\" or "?\\". Normalization is not 
skipped, however, if the prefix has one or more forward slashes instead of all 
backslashes. In this case, we can see that the old issue (e.g. \\.\nul -> 
\\nul) is no longer a problem. 

>>> os.path.normpath('//./nul')
'.\\nul'

Thus we can and should remove the check for `special_prefixes`.

Not normalizing local-device paths is inconsistent with WINAPI GetFullPathNameW 
(i.e. ntpath.abspath in Windows). Local-device paths are always normalized by 
the system when it's explicitly requested to do so. \\?\ local-device paths 
(with only backslash in the prefix) are only special cased to bypass 
normalization when creating or opening a file.

Also, it probably needs a separate issue, but ntpath.normpath should strip 
trailing spaces and dots from the final (or only) component for the sake of 
consistency with ntpath.abspath in Windows (where it calls GetFullPathNameW). 
For example:

>>> os.path.normpath(r'//?/C:\test . . .')
'?\\C:\\test . . .'
>>> os.path.abspath(r'//?/C:\test . . .')
'?\\C:\\test'

This normalization rule is common to all path types and all Windows versions. 
It should be supported for both ntpath.normpath and ntpath.abspath when called 
on a non-Windows platform. If an actual file or directory name ends with 
trailing dots and spaces, it is not a normal Windows path, and it should not be 
normalized.

--
nosy: +eryksun
versions: +Python 3.7, Python 3.8 -Python 3.3

___
Python tracker 

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



[issue14934] generator objects can clear their weakrefs before being resurrected

2019-03-16 Thread Windson Yang


Windson Yang  added the comment:

In the docs 
https://docs.python.org/3/extending/newtypes.html#weak-reference-support points 
out:

> /* Clear weakrefs first before calling any destructors */

So maybe we should also update the docs after fix this bug. Anyway, I will try 
to understand/fix this bug.

--
nosy: +Windson Yang
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue3905] subprocess failing in GUI applications on Windows

2019-03-16 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I reran test with IDLE started 4 ways:
I am closing this as out of date because the problem seems to have been fixed 
elsewise.

3.8.0a2+ 32 bit debug python, built today, opened from python icon, then idle 
started with 'import idlelib.idle'
3.8.0a2 64 bit installed, directly from IDLE icon
3.7.2 python -m idlelib
3.7.2 pythonw -m idlelib

#  and it ran correctly all 4 times.
>>> import subprocess
>>> p = subprocess.Popen(["python", "-c", "print(32)"], stdin=None,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
>>> p.communicate()
(b'32\r\n', b'')

Anyone with the same or similar failure on current Python (now 3.7, 3.8) should 
open a new issue and give careful details -- release or build, system, startup 
procedure, and a reproducing example only using stdlib modules (no PythonWin).

--
resolution:  -> out of date
stage: needs patch -> 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



[issue36287] Make ast.dump() not output optional default fields

2019-03-16 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

None can not be ignored in Constant(value=None). [] can not be ignored in 
Tuple(elts=[]).

There is also a problem with using ast.dump() with annotate_fields=False:

>>> from ast import *
>>> dump(Raise(cause=Name(id='B', ctx=Load())), annotate_fields=False)
"Raise(Name('B', Load()))"
>>> dump(Raise(Name('B', Load(
"Raise(exc=Name(id='B', ctx=Load()))"

For Raise(cause=X) it outputs a string which is evaluated to Raise(exc=X).

--

___
Python tracker 

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