[issue37589] Missing dependences in the Makefile

2019-07-13 Thread Vemake


New submission from Vemake :

We use a tool to detect 138 dependence issues in the Makefile. Most of them are 
missing of c source files and header files. 

Those issues can cause incorrect results when we want to do incremental build 
and parallel build.

For example, any changes in "Include/typeslots.h" will not cause 
"Modules/atexitmodule.o" to be rebuilt, which is incorrect.

I've fixed all of them in the github PR:
https://github.com/python/cpython/pull/14758

I've tested it on my computer and the fixed version works as expected.

--
components: Build
messages: 347866
nosy: vemakereporter
priority: normal
pull_requests: 14554
severity: normal
status: open
title: Missing dependences in the Makefile
versions: Python 3.9

___
Python tracker 

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



[issue26967] argparse: allow_abbrev=False stops -vv from working

2019-07-13 Thread Petr Viktorin


Petr Viktorin  added the comment:


New changeset b1e4d1b6032d4c82b549233fa08a2c7cfe7e818b by Petr Viktorin (Miss 
Islington (bot)) in branch '3.8':
bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316) (GH-14759)
https://github.com/python/cpython/commit/b1e4d1b6032d4c82b549233fa08a2c7cfe7e818b


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue26967] argparse: allow_abbrev=False stops -vv from working

2019-07-13 Thread miss-islington


miss-islington  added the comment:


New changeset dffca9e925ee5c3072663cbe8d4d4768406d5307 by Miss Islington (bot) 
(Zac Hatfield-Dodds) in branch 'master':
bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316)
https://github.com/python/cpython/commit/dffca9e925ee5c3072663cbe8d4d4768406d5307


--
nosy: +miss-islington

___
Python tracker 

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



[issue26967] argparse: allow_abbrev=False stops -vv from working

2019-07-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14553
pull_request: https://github.com/python/cpython/pull/14759

___
Python tracker 

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



[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2019-07-13 Thread Kyle Stanley


Kyle Stanley  added the comment:

>But we have precedent in this module and should maintain it.

In general, applying different rules to standard library modules and changing 
private function naming conventions on a case-by-case basis creates rather 
drastic inconsistency. There definitely should be a universal standard across 
stdlib, especially for something as fundamental as private function naming. The 
precedent really should not be on a per-module basis.

As someone who joined the Python development community only a month ago but was 
a user of the language for 5 years, the most common convention to denote 
privation functions was a preceding underscore. In a perfect world where 
simplicity is the only concern, this should be the guideline in which stdlib 
follow consistently across the modules. However, Serhiy makes a very valid 
point:

> There are hundreds or thousands of private names in other modules. Do you 
> propose to change them all? I afraid that this will cause more harm than 
> benefit.

__all__ has been far easier to maintain since functions can be added or removed 
without issue and there's no need to rename them. However, as far as I am 
aware, this is no clear documentation that membership on the __all__ list 
denotes whether or not a function is public. Also, any user using "import 
module" instead of "from module import *" may not be aware they are accessing a 
private function.

Here's a few solutions I thought of (not mutually exclusive):

1) Document that "The list from __all__ is the universal stdlib convention for 
marking functions as public, and any not on the list are considered private. 
When possible, underscore is preferred as well, but the lack of an underscore 
does not necessarily mean the function is public."

2) When a user attempts to import or use a function that is not in __all__, a 
minimally intrusive warning message is shown upon execution to notify them that 
they are using a private function which is not officially supported for 
external usage. There should be a way to easily suppress this message if the 
user desires.

3) Add a new syntax similar to "import module" that only imports public 
functions. Currently, "from module import *" somewhat provides this, but does 
not allow for using the "module.function" syntax for referencing the functions.

The exact convention for marking functions as public or private is not nearly 
as important as having universal consistency across stdlib and clear 
communication to the users. This does not seem to be the case at the moment.

--
nosy: +aeros167

___
Python tracker 

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



[issue37583] Got a 113 error when running the test_socket

2019-07-13 Thread hai shi


hai shi  added the comment:

So I add this 113 error in `get_socket_conn_refused_errs` too ;)

--

___
Python tracker 

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



[issue22121] Start IDLE from icon in a better place.

2019-07-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Looking at the revised title, +1 for changing the IDLE Icon startup, but let's 
keep the command-line startup sticking with the current directory:

   $ mkdir pyclass
   $ cd pyclass
   $ python3.8 -m idlelib.idle # Should start in the pyclass directory

--

___
Python tracker 

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



[issue13127] xml.dom.Attr.name is not labeled as read-only

2019-07-13 Thread Giovanni Cappellotto


Giovanni Cappellotto  added the comment:

In https://github.com/python/cpython/pull/14757 I tried updating the 
implementation of `Attr._set_name` to remove and reset the attr node in the 
owner element. So now `Attr._set_name` behaves similarly to 
`Document.renameNode`.

All existing tests are still passing and I added one more test for checking the 
issue described here.

--

___
Python tracker 

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



[issue22121] Start IDLE from icon in a better place.

2019-07-13 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
assignee:  -> terry.reedy

___
Python tracker 

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



[issue13127] xml.dom.Attr.name is not labeled as read-only

2019-07-13 Thread Giovanni Cappellotto


Change by Giovanni Cappellotto :


--
keywords: +patch
pull_requests: +14552
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14757

___
Python tracker 

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



[issue22121] Start IDLE from icon in a better place.

2019-07-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Steve, there is a problem in both lines of this suggestion.

if os.path.normcase(os.getcwd()) == os.path.normcase(sys.prefix):
os.chdir(get_default_location(sys.platform))

On my 3.8 repository build, 
>>> import os; os.getcwd()
'F:\\dev\\38\\PCbuild\\win32'
>>> import sys; sys.prefix
'F:\\dev\\38'
# Don't match.  The following does.
>>> os.path.dirname(sys.executable)
'F:\\dev\\3x\\PCbuild\\win32'

>>> get_default_location
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'get_default_location' is not defined

Raymond, I understand that you are saying that the current behavior when 
starting from a command prompt is correct (I agree) and depended upon.  I 
changed the title to be clear about that.  Starting IDLE from an icon includes 
starting python from an icon and then starting IDLE with 'import idlelib.idle', 
which I do routinely for repository builds.

--
title: IDLE should start with HOME as the initial working directory -> Start 
IDLE from icon in a better place.
versions: +Python 3.9

___
Python tracker 

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



[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-13 Thread jpic


jpic  added the comment:

Thanks for the heads up.

There is still one last case where maybe parseaddr should return a tuple of
empty strings, currently:

>>> parseaddr('a@')
('', 'a@')

Is this worth changing ?

--

___
Python tracker 

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



[issue30550] Document order-preserving dictionary output in json

2019-07-13 Thread Kyle Stanley


Kyle Stanley  added the comment:

> The JSON encoder for dictionaries preserves the order of the items in a 
> dictionary

>From what I can tell, the JSON encoder does nothing to preserve the order of 
>the keys. Although the default option is to not modify the existing 
>dictionary, the items() method returns the k,v pairs in a non-random arbitrary 
>manner, which may not match the order the values were entered in. See 
>https://docs.python.org/2/library/stdtypes.html#dict.items.

--
nosy: +aeros167

___
Python tracker 

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



[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-13 Thread R. David Murray


R. David Murray  added the comment:

Right, those absolutely are valid addresses.  A resolver will normally look up 
a name with an internal dot first as if it were an FQDN, but if it does so and 
does not get an answer it will then look it up again as a "local" address 
(appending in turn the strings from the 'search' directive in resolv.conf or 
equivalent) *if* it does not end in a final dot.  If it does end in a final 
dot, no further lookup as local is done.

While it isn't *normal* to send email to a TLD using a trailing dot, it is 
*legal*.  In theory the address 'postmaster@com.' ought to be a valid email 
address (I doubt that it actually is, though). On the other hand, I will be 
very surprised if *all other* TLDs are without valid email addresses, 
especially the new ones.  It is also easy to imagine an environment using email 
with private single label domain names using trailing dots specifically to 
suppress appending of search domains for sandboxing reasons.  Thus the email 
library must support it as valid, both for RFC reasons and for practical 
reasons.

--

___
Python tracker 

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



[issue37559] IDLE: Scrolling issues with code context shown

2019-07-13 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I repeated Tal's experiment, on Windows, and added more.  I list below multiple 
issues related to code context and scrolling, and possible solutions.

1: two geometry modes.  After the text height is set on start up or by restore 
height, CC height is added to the fixed text height, making frame (and window 
height) vary.  After the window height is set by the user or zoom height, CC 
height is subtracted from the frame height, derived from the window height, 
making text height vary.

I don't remember noticing such switching between add and sub modes when CC 
height was fixed, but I presume it occurred. (I don't have pre-3.6.8 3.x to 
check.)  But it is now confusing and a nuisance.  I think we should prefer sub 
mode because add mode would undo correct zooming when zoomed, results in status 
line artifacts when row and column spaces temporarily left black, and is 
overall more obnoxious.  Perhaps we could do this by setting window height 
after setting text height.

2. text top.  With CC height varying, the top of text bobs up and down 
regardless of mode.  My initial opinion is that the visual effect is muted if 
the context foreground color is the same as normal text and the background 
similar.  Or maybe vice versa.  We might reconsider the current default, or add 
a doc recommendation.

We might experiment with border styles and their affect on the boundary between 
CC and text.

3. text bottom.  In sub mode, this stays put, but there is some white flashing 
that for me is only noticeable with a dark theme.  What happens seems to be 
this.  We start with n exposed lines of text and k lines of context. We change 
the exposed text, still n lines, by scrolling, whether with arrow key, mouse 
wheel, scrollbar arrow or trough clicks, or slider drag.  (No scroll arrows on 
my Macbook Air.) Suppose CC adjusts the context and the result is k' < k lines. 
 The text box increases by d = k-k' lines and the existing n lines are moved or 
copied  up.  In either case, the d lines at the bottom get a white background 
for a fraction of a second before being syntax colored.  

There are two oddities.  First, the padding between border and text line ends 
remains dark.  Second, after moving up and down a line where flashing happens, 
it sometimes stops after about 3 repetitions.  (Example editor.py, CC on, line 
41 top line visible, move down and back up, repeat.)

Perhaps making sure that both toplevel and frame have the proper background 
will solve the issue.  I don't know the colorizer well enough to know whether 
it is relevant here.

4. scrollbar slider.  When the scrollbar jumps up or down with the text, 
the slider necessarily jumps up or down with it.  (I am ignoring slider size 
changes in sub mode, which will nearly always be minor in comparison.)  This is 
most obvious (and obnoxious) to me when dragging the slider, which I seldom do.

One way to prevent the bouncing is to fix the CC height, like it used to be.  
Rather than revert, I would add a min height, so that min == max means fixed.  
Another way to prevent the bouncing is to avoid mixing CC and scrolling, 
especially dragging.  Adding a CC hot key would enable quick looks at current 
context while mostly having it off.  With line numbers on, I think that this 
would be even more needed.

5. arrow keys (not related to CC).  With Notepad++, down arrow scrolls through 
editor.py (1722 lines), from beginning to end, at about 30 lines per second.  
With IDLE on my machine, down arrow goes a few hundred lines at about 23 lines 
per second, with the cursor blinking as normal.  But then the cursor blinks 
off, and and scrolling stops for perhaps 2 seconds.  When the cursor comes back 
on, the file jumps about 50 lines.  This happens a few times, and the the 
cursor blinks off and stays off for at least several seconds.  It is like the 
key got tired and went to sleep.  If I then move the cursor some other key, 
arrow key works again, for a while.  Anyone else see anything like this?

The tests needed would mostly be suggestions added to an htest.

--
stage:  -> needs patch

___
Python tracker 

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



[issue37587] JSON loads performance improvement for long strings

2019-07-13 Thread Marco Paolini


Marco Paolini  added the comment:

Here's the real world example

$ ls -hs events-100k.json 
84M events-100k.json

+---+-+-+
| Benchmark | vanilla-bpo-events-100k | patched-bpo-events-100k |
+===+=+=+
| timeit| 985 ms  | 871 ms: 1.13x faster (-12%) |
+---+-+-+

--

___
Python tracker 

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



[issue25433] whitespace in strip()/lstrip()/rstrip()

2019-07-13 Thread Ulf Rompe


Ulf Rompe  added the comment:

Using a re.sub() call as documentation:

1. wouldn't be helpful for many developers. If they need to look up the 
documentation of a simple method they shouldn't be forced to learn about a more 
complex one as well to understand it.
2. would be wild guessing since the re module defines its own whitespace as 
well.

I have created a pull request that aligns the strip methods of bytearray to 
those of bytes objects. The implementation found there is cleaner and even a 
little bit faster.

Current master:

./python -m timeit -s 'bla = bytearray(b"  foo  ")' 'bla.lstrip()'
100 loops, best of 5: 245 nsec per loop
./python -m timeit -s 'bla = bytearray(b"  foo  ")' 'bla.rstrip()'
100 loops, best of 5: 245 nsec per loop
./python -m timeit -s 'bla = bytearray(b"  foo  ")' 'bla.strip()'
100 loops, best of 5: 260 nsec per loop

Using my patch:

./python -m timeit -s 'bla = bytearray(b"  foo  ")' 'bla.lstrip()'
100 loops, best of 5: 235 nsec per loop
./python -m timeit -s 'bla = bytearray(b"  foo  ")' 'bla.rstrip()'
100 loops, best of 5: 235 nsec per loop
./python -m timeit -s 'bla = bytearray(b"  foo  ")' 'bla.strip()'
100 loops, best of 5: 239 nsec per loop


I have also updated the documentation, adding "whitespace" to the glossary and 
linking to it from many places in the documentation of standard types.

--
nosy: +rompe

___
Python tracker 

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



[issue7940] re.finditer and re.findall should support negative end positions

2019-07-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

-1 on the proposal.  We don't know of any strong use cases, so there isn't a 
real problem being solved here.  Rather than providing a benefit, this feature 
request makes it more likely that people will write convoluted code or that it 
will let bugs pass silently that would otherwise be caught.

ISTM the actual issue here is an incorrect user expectation that "all things 
that having indexing will support negative indexing".  While it is common for 
objects to implement negative index support, it is not universal or required.  
Even collections.abc.Sequence does not insist on negative index support.

I think this warrants a FAQ entry (which should also mention that slice support 
as well is not universal or required, some objects have it, some don't).

Reclassifying this as documentation issue.

--
assignee:  -> docs@python
components: +Documentation -Library (Lib), Regular Expressions
nosy: +docs@python, rhettinger

___
Python tracker 

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



[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2019-07-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Do you propose to change them all?

No.  But we have precedent in this module and should maintain it.  FWIW, there 
are a number of modules that have been conscientious in this regard (for 
example, collections and random).

--

___
Python tracker 

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



[issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type

2019-07-13 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
versions: +Python 3.9 -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



[issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type

2019-07-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+1 for switching to sets or frozensets.

--
nosy: +rhettinger

___
Python tracker 

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



[issue22121] IDLE should start with HOME as the initial working directory

2019-07-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> When I start IDLE ("python -m idle") from my project directory
> I expect that it doesn't change current directory and I can
> access files in this directory by short relative name.

I rely on this behavior when teaching Python courses.  IIRC, David Beazley does 
as well.

--

___
Python tracker 

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



[issue37588] Py_DEPRECATED and unavoidable warnings

2019-07-13 Thread Phil Thompson


New submission from Phil Thompson :

I have a number of static PyTypeObject declarations. In order to avoid compiler 
warnings about missing field initialisers I always provide explicit 0 values 
for unused fields (protected by #if PY_HEX_VERSION >= ...). However with v3.8b2 
this triggers new warnings from Py_DEPRECATED because of the initialiser for 
tp_print.

I would like some way of locally suppressing Py_DEPRECATED. The attached 
trivial patch would do this by allowing me to define a null Py_DEPRECATED 
before including Python.h.

--
components: Interpreter Core
files: pyport.h.diff
keywords: patch
messages: 347848
nosy: philthompson10
priority: normal
severity: normal
status: open
title: Py_DEPRECATED and unavoidable warnings
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48478/pyport.h.diff

___
Python tracker 

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



[issue37563] Documentation - default for StreamHandler

2019-07-13 Thread Jonathan


Jonathan  added the comment:

>What fallacy?
You appeared to be saying (to paraphrase) "no-one else has ever reported this, 
so it's never been a problem". That's a fallacy.

> I was responding to "does anyone else have opinions on this?"
I was asking if anyone else wanted to chime in with an opinion.

> There are numerous examples in the stdlib where None is passed in and some 
> other value (e.g. 'utf-8' for an encoding) are used as a default
Then for clarity's purpose I'd suggest those be changed too, but that's another 
ticket.

--

___
Python tracker 

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



[issue37563] Documentation - default for StreamHandler

2019-07-13 Thread Vinay Sajip


Vinay Sajip  added the comment:

> This is a fallacy.

What fallacy? I was responding to "does anyone else have opinions on this?" I 
can't read minds of people all over the world, so I have to go by my best 
guess, which is based on how many times this issue has been reported before - 
which I believe is zero.

> It's also assuming you have seen and remember every single bug report related 
> to this from the past 16 years which, nothing personal, seems incredibly 
> unlikely given how poor humans are at remembering things in the first place.

Feel free to do a search on here to see if you can find an earlier issue about 
this.

> I'm presuming to speak for end-users yes, why not? 

Because they're a very diverse bunch who don't all speak with one voice. I, 
too, am a user (of other people's code) as much as a developer. I don't see 
things the same way as you do, here, and it's not because it's my code. I'd 
probably feel the same way if you'd pointed to some other instance of Python 
code which does the same kind of thing.

There are numerous examples in the stdlib where None is passed in and some 
other value (e.g. 'utf-8' for an encoding) are used as a default, without that 
value appearing in any documented argument list.

--

___
Python tracker 

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



[issue25998] doctest terminates when accessing __wrapped__ raises an error

2019-07-13 Thread Mickaël Schoentgen

Mickaël Schoentgen  added the comment:

Attached a simple reproduction script.

--
Added file: https://bugs.python.org/file48477/unwrapable_ob.py

___
Python tracker 

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



[issue25998] doctest terminates when accessing __wrapped__ raises an error

2019-07-13 Thread Mickaël Schoentgen

Change by Mickaël Schoentgen :


--
keywords: +patch
pull_requests: +14551
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14756

___
Python tracker 

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



[issue37521] importlib examples have their exec_module()/sys.modules assignment lines reversed

2019-07-13 Thread Benjamin Mintz


Benjamin Mintz  added the comment:

Hmm, why is the assignment to sys.modules necessary at all, if 
module_from_spec() always does so?

--

___
Python tracker 

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



[issue37573] asyncio: freeze when using MultiLoopChildWatcher on Solaris

2019-07-13 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks for the report.

--
assignee:  -> asvetlov

___
Python tracker 

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



[issue35409] Async generator might re-throw GeneratorExit on aclose()

2019-07-13 Thread Vincent Michel


Change by Vincent Michel :


--
pull_requests: +14550
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14755

___
Python tracker 

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



[issue12217] Cross-link docs for faulthandler, traceback and pdb

2019-07-13 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +14549
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14754

___
Python tracker 

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



[issue25433] whitespace in strip()/lstrip()/rstrip()

2019-07-13 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +14548
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14753

___
Python tracker 

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



[issue22121] IDLE should start with HOME as the initial working directory

2019-07-13 Thread Andy Harrington


Andy Harrington  added the comment:

This is really important for newbies.  They have no business being in the 
system Python folder.  And Idle is for newbies!

I was teaching an intro Python class, and tried to help a student who had been 
writing programs in Idle, but now could not get Python going.  It took many 
minutes for me to discover that he had created a new file while the shell 
window had focus, and innocently saved the file as math.py, without looking for 
a new directory to put it in.

What a pain tracking that down!

--
nosy: +andyharrington

___
Python tracker 

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



[issue36816] self-signed.pythontest.net TLS certificate key is too weak

2019-07-13 Thread Larry Hastings


Larry Hastings  added the comment:


New changeset 221178aea686abf13ff92b7e2b5ed3e739a53b3f by larryhastings 
(Gregory P. Smith) in branch '3.5':
[3.5] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (#13200)
https://github.com/python/cpython/commit/221178aea686abf13ff92b7e2b5ed3e739a53b3f


--
nosy: +larry

___
Python tracker 

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



[issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x

2019-07-13 Thread Ned Deily


Ned Deily  added the comment:

> That day has come, the beta for 10.15 contains Python 3.7.3.

Yay!  FTR, 763f094b1f0ce2a07768828e78afe9687e9ad3bb was released in 3.7.0.

The only reason I have left this issues open was that I also wanted to make 
sure that ensurepip failures in the post-install script do not fail silently.

--

___
Python tracker 

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



[issue37587] JSON loads performance improvement for long strings

2019-07-13 Thread Marco Paolini


Marco Paolini  added the comment:

Also on my real workload (loading 60GB jsonl file containing mostly strings) I 
measured a 10% improvement

--

___
Python tracker 

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



[issue37358] Use vectorcall for functools.partial

2019-07-13 Thread Petr Viktorin


Change by Petr Viktorin :


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



[issue37587] JSON loads performance improvement for long strings

2019-07-13 Thread Marco Paolini


Change by Marco Paolini :


--
nosy: +ezio.melotti, rhettinger

___
Python tracker 

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



[issue37587] JSON loads performance improvement for long strings

2019-07-13 Thread Marco Paolini


Change by Marco Paolini :


--
keywords: +patch
pull_requests: +14547
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14752

___
Python tracker 

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



[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington


miss-islington  added the comment:


New changeset d1524148cd08f00c0b7c1dfdf698bf96c246350d by Miss Islington (bot) 
in branch '3.7':
bpo-30088: Document that existing dir structure isn't verified by 
mailbox.Maildir (GH-1163)
https://github.com/python/cpython/commit/d1524148cd08f00c0b7c1dfdf698bf96c246350d


--

___
Python tracker 

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



[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington


miss-islington  added the comment:


New changeset b815669c833c543b0f6696c3121a179f6b2383a6 by Miss Islington (bot) 
in branch '3.8':
bpo-30088: Document that existing dir structure isn't verified by 
mailbox.Maildir (GH-1163)
https://github.com/python/cpython/commit/b815669c833c543b0f6696c3121a179f6b2383a6


--

___
Python tracker 

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



[issue36608] Replace bundled pip and setuptools with a downloader in the ensurepip module

2019-07-13 Thread Sviatoslav Sydorenko


Sviatoslav Sydorenko  added the comment:

Thanks for the feedback!

I've changed it a bit to have a separate command for downloading bundles to the 
source tree. It'd work as in `python -m ensurepip.bundle` (needs a better 
name/CLI args probably).

Does it sound better now?

--

___
Python tracker 

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



[issue36261] email examples should not gratuitously mess with preamble

2019-07-13 Thread Carl Bordum Hansen


Carl Bordum Hansen  added the comment:

I also only found the one case. Submitted a patch.

--
nosy: +carlbordum

___
Python tracker 

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



[issue36261] email examples should not gratuitously mess with preamble

2019-07-13 Thread Carl Bordum Hansen


Change by Carl Bordum Hansen :


--
keywords: +patch
pull_requests: +14546
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14751

___
Python tracker 

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



[issue37587] JSON loads performance improvement for long strings

2019-07-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +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



[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington


miss-islington  added the comment:


New changeset e44184749c2fd0921867ea5cd20b8e226c2146c2 by Miss Islington (bot) 
(Sviatoslav Sydorenko) in branch 'master':
bpo-30088: Document that existing dir structure isn't verified by 
mailbox.Maildir (GH-1163)
https://github.com/python/cpython/commit/e44184749c2fd0921867ea5cd20b8e226c2146c2


--
nosy: +miss-islington

___
Python tracker 

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



[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14545
pull_request: https://github.com/python/cpython/pull/14750

___
Python tracker 

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



[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
pull_requests: +14544
pull_request: https://github.com/python/cpython/pull/14749

___
Python tracker 

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



[issue28440] ensurepip and pip install failures on macOS Sierra with non-system Python 2.7.x

2019-07-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

In response to msg282272: That day has come, the beta for 10.15 contains Python 
3.7.3.

--

___
Python tracker 

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



[issue37587] JSON loads performance improvement for long strings

2019-07-13 Thread Marco Paolini


New submission from Marco Paolini :

I analysed the performance of json.loads in one production workload we have.

Spy-py tells me the majority of time is spent into C json module (see 
events.svg)

Digging deeper, linux perf tells me hottest loop (where 20%+ of the time is 
spent) in _json.scanstring_unicode, in this loop:

189:   movzx  eax,BYTE PTR [rbp+rbx*1+0x0]
   movDWORD PTR [rsp+0x44],eax
   cmpeax,0x22
   je 22f
   cmpeax,0x5c
   je 22f
   test   r13d,r13d
   je 180
   cmpeax,0x1f

which is related to this code in Modules/_json.c


/* Find the end of the string or the next escape */
Py_UCS4 c = 0;
for (next = end; next < len; next++) {
c = PyUnicode_READ(kind, buf, next);
if (c == '"' || c == '\\') {
break;
}
else if (strict && c <= 0x1f) {
raise_errmsg("Invalid control character at", pystr, next);
goto bail;
}
}

Two optimisations can be done:

1. remove the mov entirely. It is not needed inside the loop and it is only 
needed later, outside the loop to access the variable
2. switch around the strict check (in the second if) because strict defaults to 
1 so it will likely pass the test, while the likelyness of finding an invalid 
character is lower

Running the pyperformance json_loads benchmark I get:

++--+-+
| Benchmark  | vanilla-pyperf-pgo38 | patched-pyperf-pgo38|
++==+=+
| json_loads | 54.9 us  | 53.9 us: 1.02x faster (-2%) |
++--+-+


A micro benchmark on a 1MB long json string gives better results:

python -m pyperf timeit -s "import json; x = json.dumps({'k': '1' * 2 ** 20})" 
"json.loads(x)"

+---++-+
| Benchmark | vanilla-1m | patched-1m  |
+===++=+
| timeit| 2.62 ms| 2.39 ms: 1.10x faster (-9%) |
+---++-+

--
components: Library (Lib)
files: events.svg
messages: 347832
nosy: christian.heimes, mpaolini, pablogsal
priority: normal
severity: normal
status: open
title: JSON loads performance improvement for long strings
type: performance
versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file48476/events.svg

___
Python tracker 

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



[issue37358] Use vectorcall for functools.partial

2019-07-13 Thread miss-islington


miss-islington  added the comment:


New changeset ed184c06e2e610e12050c5d5c9b0c1c2ecabb930 by Miss Islington (bot) 
(Jeroen Demeyer) in branch 'master':
bpo-37358: Use vectorcall for functools.partial (GH-14284)
https://github.com/python/cpython/commit/ed184c06e2e610e12050c5d5c9b0c1c2ecabb930


--
nosy: +miss-islington

___
Python tracker 

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



[issue18049] Re-enable threading test on macOS

2019-07-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've converted the patch to a pull request (and closed to other issue because 
that has a patch that is less complete).

I'm not sure if it is acceptable to backport this patch to 3.8 at this time.

--
title: Re-enable threading test on OSX -> Re-enable threading test on macOS
versions: +Python 3.8, Python 3.9 -Python 3.4

___
Python tracker 

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



[issue37572] email lib bug

2019-07-13 Thread SilentGhost


SilentGhost  added the comment:

This seems to be a duplicate of #34424. You'd have to upgrade to the latest 3.7 
to get the fix.

--
nosy: +SilentGhost
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Unicode names break email header
type:  -> behavior

___
Python tracker 

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



[issue16520] subprocess.Popen() TypeError message incorrect without args argument

2019-07-13 Thread Carl Bordum Hansen


Carl Bordum Hansen  added the comment:

I think changing the message will break a lot of tests.

Here are some examples just from CPython:
https://github.com/python/cpython/blob/master/Lib/test/test_dataclasses.py#L2655
https://github.com/python/cpython/blob/master/Lib/test/test_extcall.py

It would also outdate some documentation examples.

--
nosy: +carlbordum

___
Python tracker 

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



[issue18049] Re-enable threading test on OSX

2019-07-13 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
pull_requests: +14543
pull_request: https://github.com/python/cpython/pull/14748

___
Python tracker 

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



[issue30588] Missing documentation for codecs.escape_decode

2019-07-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I disagree. We can change, rename or remove it because it is not public 
function and never was. But we can not just remove it while it is used in the 
pickle module, and there is no reason to change it as it works pretty good for 
its purpose.

If you want to make it public and maintain it, I suggest first discuss this on 
the Python-Ideas mailing list. You should prove that the benefit of adding it 
is larger than the cost of the maintance.

--

___
Python tracker 

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



[issue37572] email lib bug

2019-07-13 Thread famu xu

famu xu  added the comment:

import smtplib
from email.message import EmailMessage
from email.utils import formataddr

server = smtplib.SMTP('smtp.xxx.com',port=25)
server.login('y...@xxx.com', 'password')
msg = EmailMessage()

#if address username include Chinese or other multibytes language, it will be 
encode to utf8 and base64, like '?utf-8?B?6YKu5Lu25rWL6K+V?= ', 
but the raw smtp request data error, "From: xxx" and "To: xxx" fields has the 
error end char:"\r\r\r\r\n".
#From: ?utf-8?B?6YKu5Lu25rWL6K+V?= \r\r\r\r\n

msg['From'] =formataddr(('中文','y...@xxx.com'))
msg['To'] = formataddr(('中文姓名','t...@yyy.com'))

msg['Subject'] =subject
msg.set_content('something')

server.send_message(msg)
server.quit()

--

___
Python tracker 

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



[issue30588] Missing documentation for codecs.escape_decode

2019-07-13 Thread Carl Bordum Hansen


Change by Carl Bordum Hansen :


--
keywords: +patch
pull_requests: +14542
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14747

___
Python tracker 

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



[issue34264] Inconsistency between stack size in main thread and secondary threads on macOS

2019-07-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is a duplicate of 18049, which has a more complete patch.

--
resolution:  -> duplicate
stage: patch review -> resolved
superseder:  -> Re-enable threading test on OSX

___
Python tracker 

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



[issue34264] Inconsistency between stack size in main thread and secondary threads on macOS

2019-07-13 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
status: open -> closed

___
Python tracker 

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



[issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type

2019-07-13 Thread Larry Hastings


Larry Hastings  added the comment:

Maynard is unsupported; it only understands the old bytecode format, pre-3.6 
16-bit "wordcode".

https://docs.python.org/3.6/whatsnew/3.6.html#optimizations

--

___
Python tracker 

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



[issue37548] Document range of atan, acos and asin

2019-07-13 Thread Mark Dickinson


Mark Dickinson  added the comment:

Done for 3.9; closing. Thank you for the contribution!

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



[issue37548] Document range of atan, acos and asin

2019-07-13 Thread Mark Dickinson


Mark Dickinson  added the comment:


New changeset dc3f99fa77f415077c20a9c2b3e953e5cd894076 by Mark Dickinson 
(Giovanni Cappellotto) in branch 'master':
bpo-37548: Document range of atan, acos and asin (GH-14717)
https://github.com/python/cpython/commit/dc3f99fa77f415077c20a9c2b3e953e5cd894076


--

___
Python tracker 

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



[issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time

2019-07-13 Thread miss-islington


miss-islington  added the comment:


New changeset 143672cf028740fc549e532c049559c522930c95 by Miss Islington (bot) 
in branch '3.8':
bpo-37579: Improve equality behavior for pure Python datetime and time 
(GH-14726)
https://github.com/python/cpython/commit/143672cf028740fc549e532c049559c522930c95


--
nosy: +miss-islington

___
Python tracker 

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



[issue34722] Non-deterministic bytecode generation

2019-07-13 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

I encounter another case that leads to non-deterministic bytecode. For example, 
with commit e6b46aafad3427463d6264a68824df4797e682f1 + PR 9472, I got:

$ cat foobar.py
_m = None
$ PYTHONHASHSEED=0 ./python -m compileall --invalidation-mode=unchecked-hash 
foobar.py
Compiling 'foobar.py'...
$ sha256sum __pycache__/foobar.cpython-39.pyc
7f84b08d5536390d6ce4ccb2d65e259449c56549ee9cc67560f61771824f20ea  
__pycache__/foobar.cpython-39.pyc
$ rm __pycache__/foobar.cpython-39.pyc
$ PYTHONHASHSEED=1 ./python -m compileall --invalidation-mode=unchecked-hash 
foobar.py
Compiling 'foobar.py'...
$ sha256sum __pycache__/foobar.cpython-39.pyc
46dadbb92ad6e1e5b5f8abe9f107086cd231b2b80c15fe84f86e2081a6b8c428  
__pycache__/foobar.cpython-39.pyc

In this case there are no sets. I guess the cause is different. Should I open a 
new issue?

--

___
Python tracker 

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



[issue37586] macOS: posix_spawn(..., setsid=True)

2019-07-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is not a bug in Xcode 11. Xcode 11 includes definitions for new flags that 
get picked up by Python's build, but only work on a new version of macOS. 

I guess this could be seen as a bug in macOS 10.14 (and earlier) because it 
ignores an unknown flag instead of returning an error.  Knowing Apple that's 
unlikely to get fixed, if it even is a bug 
(
 says that returning EINVAL is optional for an invalid value of "flags").

--

___
Python tracker 

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



[issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time

2019-07-13 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
pull_requests: +14541
pull_request: https://github.com/python/cpython/pull/14745

___
Python tracker 

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



[issue7940] re.finditer and re.findall should support negative end positions

2019-07-13 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +14540
pull_request: https://github.com/python/cpython/pull/14744

___
Python tracker 

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



[issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time

2019-07-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14539
pull_request: https://github.com/python/cpython/pull/14743

___
Python tracker 

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



[issue37555] _CallList.__contains__ doesn't always respect ANY.

2019-07-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Would be nice to report a bug in Django.

--

___
Python tracker 

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



[issue37575] Python Documentation on strings (tutorial section 3.1.2.)

2019-07-13 Thread Mark Dickinson


Change by Mark Dickinson :


--
resolution:  -> not a bug
status: open -> pending
type: resource usage -> 

___
Python tracker 

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



[issue37586] macOS: posix_spawn(..., setsid=True)

2019-07-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

File a bug in Xcode 11?

If it will not be fixed we will need to add a workaround (like checking the 
macOS version explicitly).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue37586] macOS: posix_spawn(..., setsid=True)

2019-07-13 Thread Ronald Oussoren


New submission from Ronald Oussoren :

The Xcode 11 beta introduced a definition for POSIX_SPAWN_SETSID, but that flag 
is only supported on macOS 10.15 (also beta), not on earlier versions.

Because of this the testsuite will have failures when you build using Xcode 11 
on macOS 10.14. 

I'm not sure what the best way to patch this is, but lean toward a fix that 
detects the use of setsid=True on macOS 10.14 or earlier and then fails. 
Possibly as part of a larger effort to start supporting building on macOS 
"latest" and running on older versions.

Marked as low priority for now, Xcode 11 is in beta and not used to build 
release binaries.

--
assignee: ronaldoussoren
components: macOS
messages: 347816
nosy: ned.deily, ronaldoussoren
priority: low
severity: normal
stage: needs patch
status: open
title: macOS: posix_spawn(..., setsid=True)
type: behavior
versions: 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



[issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time

2019-07-13 Thread Paul Ganssle


Paul Ganssle  added the comment:


New changeset e6b46aafad3427463d6264a68824df4797e682f1 by Paul Ganssle (Xtreak) 
in branch 'master':
bpo-37579: Improve equality behavior for pure Python datetime and time 
(GH-14726)
https://github.com/python/cpython/commit/e6b46aafad3427463d6264a68824df4797e682f1


--

___
Python tracker 

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



[issue34697] ctypes: Crash if manually-created CField instance is used

2019-07-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

> Is this issue worth fixing?

Definitely yes.

> If so, is the correct way to set tp_new slot to NULL and fix the internal 
> callers so that users wouldn't be able to create CField instances?

I think yes.

Do you mind to create a PR?

--

___
Python tracker 

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



[issue37579] Difference in equality check between C and Python implementation for datetime module's timedelta and time

2019-07-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Do you mind to fix also other similar cases if they are? __lt__ and others 
should have the same property.

--

___
Python tracker 

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



[issue33326] Convert collections (cmp_op, hasconst, hasname and others) in opcode module to more optimal type

2019-07-13 Thread Batuhan


Change by Batuhan :


--
keywords: +patch
pull_requests: +14538
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14742

___
Python tracker 

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



[issue28269] [MinGW] Can't compile Python/dynload_win.c due to static strcasecmp

2019-07-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14537
pull_request: https://github.com/python/cpython/pull/14741

___
Python tracker 

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



[issue28269] [MinGW] Can't compile Python/dynload_win.c due to static strcasecmp

2019-07-13 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14536
pull_request: https://github.com/python/cpython/pull/14740

___
Python tracker 

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



[issue28269] [MinGW] Can't compile Python/dynload_win.c due to static strcasecmp

2019-07-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5 by Serhiy Storchaka 
(Minmin Gong) in branch 'master':
bpo-28269: Replace strcasecmp with system function _stricmp. (GH-13095)
https://github.com/python/cpython/commit/05f2d84cae4ba1ff15b7a1d0347305393f4bdcc5


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue37578] Change Glob: Allow Recursion for Hidden Files

2019-07-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This is an interesting question. What other implementations behave?

--

___
Python tracker 

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



[issue28292] Make Calendar.itermonthdates() behave consistently in edge cases

2019-07-13 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

There are hundreds or thousands of private names in other modules. Do you 
propose to change them all? I afraid that this will cause more harm than 
benefit.

--

___
Python tracker 

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



[issue37574] Mention spec_from_loader() in Finder.find_spec() docs.

2019-07-13 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +14535
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14739

___
Python tracker 

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



[issue37580] Markup typo in http.cookiejar doc

2019-07-13 Thread Petr Viktorin


Change by Petr Viktorin :


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



[issue37585] Comparing PyDictValues does not give expected results

2019-07-13 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> dict view values objects are missing tp_richcmp and tp_as_number

___
Python tracker 

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



[issue35476] _imp_create_dynamic_impl() does not clear error.

2019-07-13 Thread Batuhan


Batuhan  added the comment:

Can you give me the case so i can reproduce this and test it.

--
nosy: +BTaskaya

___
Python tracker 

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



[issue30088] mailbox.Maildir doesn't create subdir structure when create=True and base dir exists

2019-07-13 Thread Sviatoslav Sydorenko


Sviatoslav Sydorenko  added the comment:

Hi, I've tried clarifying this in docs as suggested @ 
https://github.com/python/cpython/pull/1163

--

___
Python tracker 

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



[issue37585] Comparing PyDictValues does not give expected results

2019-07-13 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

See also issue12445 which was a similar proposal rejected in the past.

--
nosy: +inada.naoki, xtreak

___
Python tracker 

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



[issue35476] _imp_create_dynamic_impl() does not clear error.

2019-07-13 Thread Batuhan


Change by Batuhan :


--
keywords: +patch
pull_requests: +14533
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/14738

___
Python tracker 

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



[issue37585] Comparing PyDictValues does not give expected results

2019-07-13 Thread Roundup Robot


Change by Roundup Robot :


--
keywords: +patch
pull_requests: +14531
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14737

___
Python tracker 

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



[issue37585] Comparing PyDictValues does not give expected results

2019-07-13 Thread Kristian Klette


New submission from Kristian Klette :

As a user, I expect to be able to compare the different parts a `dict`
in the same manner.

Currently, `PyDictValues` does not implement the `dictview_richcompare`, 
causing the `__eq__` to always return false, even if the values are identical.


```
my_dict = {'foo': 'bar'}
dict_copy = my_dict.copy()
other_dict = {'foo': 'bar', 'bar': 1234}

assert my_dict.keys() == my_dict.keys()
assert my_dict.keys() == dict_copy.keys()
assert my_dict.keys() != other_dict.keys()

assert my_dict.items() == my_dict.items()
assert my_dict.items() == dict_copy.items()
assert my_dict.items() != other_dict.items()

assert my_dict.values() == my_dict.values()
assert my_dict.values() == dict_copy.values()
assert my_dict.values() != other_dict.values()

```

--
components: Library (Lib)
messages: 347806
nosy: Kristian Klette
priority: normal
severity: normal
status: open
title: Comparing PyDictValues does not give expected results
type: behavior

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-07-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

As promised there is now a pull request. 

I'd love a review (and a change to approve the pull request when reviewers are 
happy, I'm trying to get back into actively contributing).

---

I now understand why locale.getdefaultlocale() fails even when LC_CTYPE is not 
set: pylifecycle sets LC_CTYPE to UTF-8 in the UTF-8 coercion code.

--

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-07-13 Thread Ronald Oussoren


Change by Ronald Oussoren :


--
pull_requests: +14530
pull_request: https://github.com/python/cpython/pull/14736

___
Python tracker 

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



[issue9938] Documentation for argparse interactive use

2019-07-13 Thread Milan Oberkirch


Milan Oberkirch  added the comment:

This issue is a duplicate of issue 9112 which was resolved by commit 9375492b

--
nosy: +zvyn

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2019-07-13 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

LC_CTYPE=UTF-8 is a valid configuration on macOS, and is in the default 
environment when you install a fresh system. This includes the beta's for macOS 
10.15 and is therefore unlikely to change anytime soon.

Interestingly enough I get this error even when I unset the relevant 
environment variables. For some reason LC_CTYPE is reset when I start the 
interpreter, even if it is set to something else. This means the usual way of 
working around this problem no longer works.

I'll create a pull request with an up-to-date version of my latest patch for 
further discussion.

BTW. I'm testing with the current tip of the tree, but 3.7.3 fails in the same 
way.

--

___
Python tracker 

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



[issue7202] "python setup.py cmd --verbose" does not set verbosity

2019-07-13 Thread Milan Oberkirch


Milan Oberkirch  added the comment:

The help states:

> usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

so I would argue that setup.py ignoring global_opts after cmd1 is not a bug.

But I do think that the fact that "python setup.py build --dry-run" does not 
prevent the build from running is not ideal.

Maybe throwing an error for misplaced global options is the best solution?

--
nosy: +zvyn

___
Python tracker 

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



[issue37584] Multiple test failures with OSError: [Errno 84] Invalid or incomplete multibyte or wide character on ZFS with utf8only=on

2019-07-13 Thread Dimiter Naydenov


Dimiter Naydenov  added the comment:

Here's some additional information I found for that specific attribute:

>From the documentation at
http://dlc.sun.com/osol/docs/content/ZFSADMIN/gazss.html
(link is dead, but here's where I found the section below: 
https://zfs-discuss.opensolaris.narkive.com/3NqQVG0H/utf8only-and-normalization-properties#post1)

utf8only
Boolean
Off
This property indicates whether a file system should reject file names
that include characters that are not present in the UTF-8 character code
set. If this property is explicitly set to off, the normalization
property must either not be explicitly set or be set to none. The
default value for the utf8only property is off. This property cannot be
changed after the file system is created.

--

___
Python tracker 

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



[issue37562] PEP 590 implementation may have introduced a performance regression

2019-07-13 Thread Mark Shannon


Change by Mark Shannon :


--
keywords: +patch
pull_requests: +14529
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/14735

___
Python tracker 

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



[issue37583] Got a 113 error when running the test_socket

2019-07-13 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Victor handled similar errors in issue36629 where this helper was introduced.

--
nosy: +vstinner, xtreak
type:  -> enhancement
versions: +Python 3.9

___
Python tracker 

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



  1   2   >