[issue32884] Adding the ability for getpass to print asterisks when password is typed

2020-08-08 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

This is easy to implement for Windows (as shown), but the unix implementation 
uses io.TextIOWrapper.readline() to get the password input.  The unix 
implementation would have to be rewritten to provide the same functionality.

--

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-08-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d94af3f7ed98e6bfb4bf5f918f464b5e23d3ed1b by Hai Shi in branch 
'master':
bpo-40275: Remove test helpers aliases in test.support (GH-21771)
https://github.com/python/cpython/commit/d94af3f7ed98e6bfb4bf5f918f464b5e23d3ed1b


--

___
Python tracker 

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



[issue41501] 0x80070643, can't install any version

2020-08-08 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue41508] Failed to open os.path in Open Module window of IDLE without any error informations

2020-08-08 Thread Alex


New submission from Alex <2423067...@qq.com>:

When openning os.path by Open Module window in IDLE (Shortcut: Alt + M), the 
window didn't open 'ntpath'(in Windows) or show any error informations.

--
assignee: terry.reedy
components: IDLE
messages: 375040
nosy: Alex-Python-Programmer, terry.reedy
priority: normal
severity: normal
status: open
title: Failed to open os.path in Open Module window of IDLE without any error 
informations
type: behavior
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



[issue40275] test.support has way too many imports

2020-08-08 Thread hai shi


Change by hai shi :


--
pull_requests: +20927
pull_request: https://github.com/python/cpython/pull/21785

___
Python tracker 

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



[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-08-08 Thread Étienne Pot

Étienne Pot  added the comment:

Before solving this issue, I think it would be best to think on a more generic 
solution on how to make Pathlib more extensible. Related to: 
https://discuss.python.org/t/make-pathlib-extensible/3428

For instance, if childs created with `p.parent()`, `p / 'subdir'` need to 
forward some state (e.g. `RemotePath(path, password=, user=)`).

Rather than __init__, maybe there should be some __post_init__ like dataclasses.

--

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-08-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset c6f282f3b1cb6da6febc3b8b6d2dc1ef714dbbf7 by Hai Shi in branch 
'master':
bpo-40275: Use new test.support helper submodules in tests (GH-21785)
https://github.com/python/cpython/commit/c6f282f3b1cb6da6febc3b8b6d2dc1ef714dbbf7


--

___
Python tracker 

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



[issue41494] Adds window resizing support to Lib/pty.py for proper output rendering

2020-08-08 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


--
title: Add window resizing support [ SIGWINCH ] to Lib/pty -> Adds window 
resizing support to Lib/pty.py for proper output rendering

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-08-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

PR-21771 "Remove test helpers aliases in test.support" was just merged.  It 
needs an immediate followup to document the new locations of constants and 
functions.  The now dead entries in test.suppport doc must be moved into new 
support module docs, with whatever revisions. As of this moment, the module 
index has
test
  test.support
  test.support.script_helper
So temp_dir, for instance, is still documented as part of test.support, which 
it no longer is, instead of the undocumented test.support.os_helper, where it 
now exclusively resides.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue41494] Adds window resizing support to Lib/pty.py for proper output rendering

2020-08-08 Thread Soumendra Ganguly


Soumendra Ganguly  added the comment:

The following are two [ very old ] stackoverflow threads that are relevant.

https://stackoverflow.com/questions/6418678/resize-the-terminal-with-python

https://stackoverflow.com/questions/16941885/want-to-resize-terminal-windows-in-python-working-but-not-quite-right

--

___
Python tracker 

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



[issue41494] Adds window resizing support to Lib/pty.py [ SIGWINCH ]

2020-08-08 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


--
title: Adds window resizing support to Lib/pty.py -> Adds window resizing 
support to Lib/pty.py [ SIGWINCH ]

___
Python tracker 

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



[issue41494] Adds window resizing support to Lib/pty.py

2020-08-08 Thread Soumendra Ganguly


Change by Soumendra Ganguly :


--
title: Adds window resizing support to Lib/pty.py for proper output rendering 
-> Adds window resizing support to Lib/pty.py

___
Python tracker 

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



[issue41508] Failed to open os.path in Open Module window of IDLE without any error informations

2020-08-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

On Windows 10: when I start 3.7.8 IDLE in Command Prompt with
  C:\Users\Terry>py -3.7 -m idlelib
and try Open Module with 'os.path', I get this traceback in Command Prompt.

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Programs\Python37\lib\tkinter\__init__.py", line 1705, in __call__
return self.func(*args)
  File "C:\Programs\Python37\lib\idlelib\query.py", line 148, in ok
entry = self.entry_ok()
  File "C:\Programs\Python37\lib\idlelib\query.py", line 218, in entry_ok
file_path = spec.loader.get_filename(name)
  File "", line 406, in 
_check_name_wrapper
ImportError: loader for ntpath cannot handle os.path


The same action displays ntpath.py in 3.8.5 and  3.9.0b5.  Line 219 in query.py 
is the same as 3.7 query.py line 218 above.  I conclude that the problem was a 
bug in importlib that was fixed more recently than your version of 3.8.  Hence 
closing.

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



[issue41501] 0x80070643, can't install any version

2020-08-08 Thread William Pickard


William Pickard  added the comment:

Try what's explained here:
https://support.microsoft.com/en-us/help/2438651/how-to-troubleshoot-windows-installer-errors

--
nosy: +WildCard65

___
Python tracker 

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



[issue41109] subclasses of pathlib.PurePosixPath never call __init__ or __new__

2020-08-08 Thread Louis-Vincent Boudreault


Louis-Vincent Boudreault  added the comment:

Path.__new__ should not call _from_parts because it breaks the specialization 
by directly using object.__new__.
This is why `_from_parts` has to be duplicated in each subclass's `__new__`.

My suggestion (first draft) is to do the parsing of arguments inside an 
`__init__` in the Path class hierarchy
and deprecate  `_from_parts`.

```
class PurePath:
   
 def __new__(cls, *args):
 if cls is PurePath:
 cls = PureWindowsPath if os.name == 'nt' else PurePosixPath
 super().__new__(cls, *args) # Here we remove call to from_parts

 def __init__(self, *args):
 # We should have an __init__ in the hierarchy.
 drv, root, parts = self._parse_args(args)  # this would get the proper 
_flavour.
 self._drv = drv
 self._root = root
 self._parts = parts

 ...

class Path(PurePath):
 def __new__(cls, *args, **kwargs):
if cls is Path:
cls = WindowsPath if os.name == 'nt' else PosixPath

# REMOVE THIS LINE: self = cls._from_parts(args, init=False) #

if not self._flavour.is_supported:
raise NotImplementedError("cannot instantiate %r on your system"
  % (cls.__name__,))
return super().__new__(cls, *args, **kwargs) # Use super

```


I don't know what is the purpose of `_init` and if it could be replaced by an 
extra keyword argument in __init__.

The class method `_from_parts` would become deprecated since the argument 
parsing would be now handled by `__init__`.

By using __init__ and avoid the direct call to `object.__new__` we would 
respect class specialization and custom class could be implemented intuitively.

--
nosy: +louis-vincent.boudre

___
Python tracker 

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



[issue41458] Avoid overflow/underflow in math.prod()

2020-08-08 Thread Tim Peters


Tim Peters  added the comment:

"Denormal" and "subnormal" mean the same thing. The former is probably still in 
more common use, but all the relevant standards moved to "subnormal" some years 
ago.

Long chains of floating mults can lose precision too, but hardly anyone bothers 
to do anything about that.  Unlike sums, they're just not common or in critical 
cores.  For example, nobody ever computes the determinant of a 
million-by-million triangular matrix by producting ;-) the diagonal.

I only recall one paper devoted to this, using "doubled precision" tricks like 
fsum employs (but much more expensive unless hardware fused mul-add is 
available):

"Accurate Floating Point Product and Exponentiation"
Stef Graillat

However, that does nothing to prevent spurious overflow or underflow.

Much simpler:  presumably pairwise products can enjoy lower accumulated error 
for essentially the same reasons pairwise summation "works well". Yet, far as I 
know, nobody bothers.

Here's a cute program:

if 1:
from decimal import Decimal
from random import random, shuffle, seed

def pairwise(xs, lo, hi):
n = hi - lo
if n == 1:
return xs[lo]
elif n == 2:
return xs[lo] * xs[lo + 1]
else:
mid = (lo + hi) // 2
return pairwise(xs, lo, mid) * pairwise(xs, mid, hi)

N = 4000
print(f"using {N=:,}")
for s in (153,
  53,
  314,
  271828,
  789):
print("\nwith aeed", s)
seed(s)
xs = [random() * 10.0 for i in range(N)]
xs.extend(1.0 / x for x in xs[:])
shuffle(xs)
print("prod   ", math.prod(xs))
print("product", product(xs)) # the code attached to this report
print("frexp  ", prod2(xs))   # straightforward frexp
print("Decimal", float(math.prod(map(Decimal, xs
print("pair   ", pairwise(xs, 0, len(xs)))

By construction, the product of xs should be close to 1.0.  With N=4000 as 
given, out-of-range doesn't happen, and all results are pretty much the same:

using N=4,000

with aeed 153
prod0.9991
product 0.9991
frexp   0.9991
Decimal 1.0042
pair1.0016

with aeed 53
prod1.0056
product 1.0056
frexp   1.0056
Decimal 1.0002
pair0.9997

with aeed 314
prod1.0067
product 1.0067
frexp   1.0067
Decimal 1.0082
pair1.0002

with aeed 271828
prod0.9984
product 0.9984
frexp   0.9984
Decimal 1.0004
pair1.0064

with aeed 789
prod0.9994
product 0.9994
frexp   0.9994
Decimal 1.0
pair1.0069

But boost N so that out-of-range is common, and only frexp and Decimal remain 
reliable. Looks almost cetain that `product()` has serious bugs:

using N=400,000

with aeed 153
prod0.0
product 1980.1146715391837
frexp   0.969
Decimal 1.027
pairnan

with aeed 53
prod0.0
product 6.595056534948324e+24
frexp   1.0484
Decimal 1.0513
pairnan

with aeed 314
prod0.0
product 6.44538471095855e+60
frexp   0.9573
Decimal 0.934
pairnan

with aeed 271828
prodinf
product 2556126.798990014
frexp   0.9818
Decimal 0.9885
pairnan

with aeed 789
prod0.0
product 118772.89118349401
frexp   0.9304
Decimal 1.0053
pairnan

--

___
Python tracker 

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



[issue41458] Avoid overflow/underflow in math.prod()

2020-08-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Here's a pairwise variant:

def prod(seq):
stack = []
exp = 0
for i, x in enumerate(seq, start=1):
m, e = frexp(x)
exp += e
stack += [m]
while not i&1:
i >>= 1
x, y = stack[-2:]
stack[-2:] = [x * y]
total = 1.0
while stack:
total *= stack.pop()
return ldexp(total, exp)

--

___
Python tracker 

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



[issue40027] re.sub inconsistency beginning with 3.7

2020-08-08 Thread Wayne Davison


Wayne Davison <4way...@gmail.com> added the comment:

Can this bug please be reopened and fixed? This is an anchored substitution, 
and so should never match more than once.

--
nosy: +4wayned

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-08-08 Thread hai shi


hai shi  added the comment:

Hi, terry. When creating the new test helpers, the docs have been updated.
such as: 
https://docs.python.org/3.10/library/test.html#module-test.support.os_helper

--

___
Python tracker 

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



[issue41458] Avoid overflow/underflow in math.prod()

2020-08-08 Thread Tim Peters


Tim Peters  added the comment:

Well, that can't work:  the most likely result for a long input is 0.0 (try 
it!). frexp() forces the mantissa into range [0.5, 1.0).  Multiply N of those, 
and the result _can_ be as small as 2**-N. So, as in Mark's code, every 
thousand times (2**-1000 is nearing the subnormal boundary) frexp() is used 
again to force the product-so-far back into range. That's straightforward when 
going "left to right".

With fancier reduction schemes, "it varies". Aiming for "obviously correct" 
rather than for maximal cleverness ;-) , here I'll associate each partial 
product with an integer e such that it's guaranteed (in the absence of 
infinities, NaNs, zeroes), abs(partial_product) >= 2^^-e. Then quick integer 
arithmetic can be used in advance to guard against a partial product 
underflowing:

def frpair(seq):
from math import frexp, ldexp
stack = []
exp = 0
for i, x in enumerate(seq, start=1):
m, e = frexp(x)
exp += e
stack += [(m, 1)]
while not i&1:
i >>= 1
(x, e1), (y, e2) = stack[-2:]
esum = e1 + e2
if esum >= 1000:
x, e = frexp(x)
exp += e
y, e = frexp(y)
exp += e
esum = 2
stack[-2:] = [(x * y, esum)]
total = 1.0
totale = 0
while stack:
x, e = stack.pop()
totale += e
if totale >= 1000:
   total, e = frexp(total)
   exp += e
   x, e = frexp(x)
   exp += e
   totale = 2
total *= x
return ldexp(total, exp)

But I see no obvious improvement in accuracy over "left to right" for the 
uniformly random test cases I've tried.

--

___
Python tracker 

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



[issue41509] ntpath.relpath behaves differently on Windows with trailing spaces

2020-08-08 Thread Jason R. Coombs


New submission from Jason R. Coombs :

On Windows:

Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:37:02) [MSC v.1924 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ntpath 
>>> ntpath.relpath('foo ', 'foo')
'.'

On macOS:

Python 3.8.5 (v3.8.5:580fbb018f, Jul 20 2020, 12:11:27) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ntpath
>>> ntpath.relpath('foo ', 'foo')
'..\\foo '


I stumbled into this issue when troubleshooting an [issue in a Setuptools 
PR](https://github.com/pypa/setuptools/pull/2305#issuecomment-670946965).

I suspect the Windows version is using some API that strips whitespace from the 
filename before performing a relative path. However, when using relpath to 
detect characters after a common path, stripping the whitespace can cause 
problems.

I wouldn't expect Windows to be performing normalization of paths in relpath, 
but it seems it does. If this behavior is by design and has a good reason, that 
behavior should be mirrored in the non-Windows implementation.

--
components: Windows
messages: 375053
nosy: jaraco, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: ntpath.relpath behaves differently on Windows with trailing spaces
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



[issue41458] Avoid overflow/underflow in math.prod()

2020-08-08 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> But I see no obvious improvement in accuracy 
> over "left to right" for the uniformly random 
> test cases I've tried.

Same here.

--

___
Python tracker 

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



[issue41455] Python Devguide differs from python docs

2020-08-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 82ca8fada15b121866530f2cdac1b7055be4a244 by Yaroslav Pankovych in 
branch 'master':
bpo-41455: Provide a link to how the third generation is collected in the GC 
docs (GH-21703)
https://github.com/python/cpython/commit/82ca8fada15b121866530f2cdac1b7055be4a244


--

___
Python tracker 

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



[issue41455] Python Devguide differs from python docs

2020-08-08 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +20928
pull_request: https://github.com/python/cpython/pull/21786

___
Python tracker 

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



[issue41455] Python Devguide differs from python docs

2020-08-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20929
pull_request: https://github.com/python/cpython/pull/21787

___
Python tracker 

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



[issue41455] Python Devguide differs from python docs

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



[issue41455] Python Devguide differs from python docs

2020-08-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +20930
pull_request: https://github.com/python/cpython/pull/21788

___
Python tracker 

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



[issue41455] Python Devguide differs from python docs

2020-08-08 Thread miss-islington


miss-islington  added the comment:


New changeset 103ce3debf07a48e79319acd0890be0c53e64fff by Miss Islington (bot) 
in branch '3.9':
bpo-41455: Provide a link to how the third generation is collected in the GC 
docs (GH-21703)
https://github.com/python/cpython/commit/103ce3debf07a48e79319acd0890be0c53e64fff


--

___
Python tracker 

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



[issue41455] Python Devguide differs from python docs

2020-08-08 Thread miss-islington


miss-islington  added the comment:


New changeset 105cfb5b182da63e8481fcb009e92546d240c6b5 by Miss Islington (bot) 
in branch '3.8':
bpo-41455: Provide a link to how the third generation is collected in the GC 
docs (GH-21703)
https://github.com/python/cpython/commit/105cfb5b182da63e8481fcb009e92546d240c6b5


--

___
Python tracker 

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



[issue41509] ntpath.relpath behaves differently on Windows with trailing spaces

2020-08-08 Thread Eryk Sun


Eryk Sun  added the comment:

> I suspect the Windows version is using some API that strips whitespace 
> from the filename before performing a relative path. 

When normalizing a path, the Windows API strips trailing dots and spaces from 
the final component. Apparently it also strips a single trailing dot from other 
components if the dot is preceded by any character other than a dot. For 
example:

>>> nt._getfullpathname('foo../bar./bam. . .')
'C:\\foo..\\bar\\bam'

The way to create or open a file or directory with a name that ends with a dot 
or space is to prefix the path with exactly "?\\". However, it is strongly 
advised to never create a file or directory with such an abnormal name. Note 
that this prefix only affects using a path in an open/create context. It 
doesn't prevent an explicit normalization, such as the following:

>>> nt._getfullpathname('?\\C:/foo../bar./bam. . .')
'?\\C:\\foo..\\bar\\bam'

> I wouldn't expect Windows to be performing normalization of paths in 
> relpath, but it seems it does. 

ntpath.relpath calls ntpath.abspath, which calls nt._getfullpathname in 
Windows. On POSIX systems, ntpath.abspath is ntpath._abspath_fallback.  The 
latter and ntpath.normpath need to be improved to better implement Windows path 
normalization. 

normpath should not exclude paths that start with '.\\' and '?\\', and 
it should trim trailing spaces and dots from component names to match how 
Windows normalizes a path. 

_abspath_fallback should default to the root directory for drive relative paths 
(e.g. "C:foo" -> "C:\\foo"). It should also substitute a device path if the 
final component in a relative or drive-letter path (but not a UNC path or 
device path) matches a known DOS device name. Matching a DOS device name 
ignores everything after a dot or colon that's preceded by zero or more spaces 
(e.g. "con .anything" -> ".\\con" and "nul:anything" -> ".\\nul").

--
nosy: +eryksun

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-08-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR21771 has broken a considerable amount of buildbopts so we would need to 
revert it if is not fixed in 24 hours

--
nosy: +pablogsal

___
Python tracker 

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



[issue40275] test.support has way too many imports

2020-08-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

>> This PR has broken a considerable amount of build bots, so we would need to 
>> revert it if is not fixed in 24 hours

Whops, sorry I just saw that this is being fixed here #21785, apologies then!

--

___
Python tracker 

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



[issue39102] Increase Enum performance

2020-08-08 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue35786] get_lock() method is not present for Values created using multiprocessing.Manager()

2020-08-08 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue39411] pyclbr rewrite using AST

2020-08-08 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue39697] Failed to build with --with-cxx-main=g++-9.2.0

2020-08-08 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue41097] confusing BufferError: Existing exports of data: object cannot be re-sized

2020-08-08 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

The error message is found in three different locations in the source code.  
One is in the bytearray class, and the other two are in the BytesIO class.  
They are unrelated code paths.

--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue41506] Inclusion or documentation of extended with syntax in 3.9

2020-08-08 Thread David Halter


Change by David Halter :


--
nosy: +davidhalter

___
Python tracker 

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



[issue41506] Inclusion or documentation of extended with syntax in 3.9

2020-08-08 Thread David Halter


David Halter  added the comment:

I second this. I just see people complaining about this not working in a lot of 
tools. This is really not necessary for a feature that should not be used 
anyway and puts work onto the greater Python ecosystem for no good reason.

--

___
Python tracker 

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



[issue41097] confusing BufferError: Existing exports of data: object cannot be re-sized

2020-08-08 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

>>> import io
>>> b = io.BytesIO()
>>> b.write(b'abc')
3
>>> buf = b.getbuffer()
>>> b.seek(0)
0
>>> b.write(b'?')
Traceback (most recent call last):
  File "", line 1, in 
BufferError: Existing exports of data: object cannot be re-sized
>>> 


The problem is caused by the b.getbuffer() call.  It increments a reference 
counter in the BytesIO object that causes the b.write() call to fail because 
the counter is > 0. The error message is misleading.  The counter is 
decremented when the buffer view is deleted.


>>> import io
>>> b = io.BytesIO()
>>> b.write(b'abc')
3
>>> buf = b.getbuffer()
>>> b.seek(0)
0
>>> b.write(b'?')
Traceback (most recent call last):
  File "", line 1, in 
BufferError: Existing exports of data: object cannot be re-sized
>>> del buf
>>> b.write(b'?')
1
>>> b.getvalue()
b'?bc'
>>> 


The documentation for io.BytesIO.getbuffer() says "Note:  As long as the view 
exists, the BytesIO object cannot be resized or closed."  Either this is a bug, 
or the documentation needs to be updated to say the io.BytesIO object is 
unwritable while any buffer views exist.

--

___
Python tracker 

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



[issue41510] Mentions of pdb.set_trace() in library/functions and library/sys uncorrectly states that set_trace expects no arguments

2020-08-08 Thread Maciej Olko


New submission from Maciej Olko :

An argument was added to pdb.set_trace() in Python 3.7 and those fragments of 
documentation should have been updated:

library/functions.rst:120
> By default, sys.breakpointhook() calls pdb.set_trace() expecting no arguments.

library/sys.rst
> For example, the default binding (e.g. pdb.set_trace()) expects no arguments, 
> but you might bind it to a function that expects additional arguments 
> (positional and/or keyword).

--
assignee: docs@python
components: Documentation
messages: 375064
nosy: Maciej Olko, docs@python
priority: normal
severity: normal
status: open
title: Mentions of pdb.set_trace() in library/functions and library/sys 
uncorrectly states that set_trace expects no arguments
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue41510] Mentions of pdb.set_trace() in library/functions and library/sys incorrectly states that set_trace expects no arguments

2020-08-08 Thread Maciej Olko


Change by Maciej Olko :


--
title: Mentions of pdb.set_trace() in library/functions and library/sys 
uncorrectly states that set_trace expects no arguments -> Mentions of 
pdb.set_trace() in library/functions and library/sys incorrectly states that 
set_trace expects no arguments

___
Python tracker 

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



[issue41510] Mentions of pdb.set_trace() in library/functions and library/sys incorrectly states that set_trace expects no arguments

2020-08-08 Thread Shubham Kumar Jha


Shubham Kumar Jha  added the comment:

I am a first-time contributor, can I start working on this?

--
nosy: +ShubhamKJha

___
Python tracker 

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



[issue41097] confusing BufferError: Existing exports of data: object cannot be re-sized

2020-08-08 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
keywords: +patch
pull_requests: +20931
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/21792

___
Python tracker 

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