[issue30755] locale.normalize() and getdefaultlocale() convert C.UTF-8 to en_US.UTF-8

2019-07-08 Thread Gordon Messmer


Gordon Messmer  added the comment:

> I can see that it might be helpful to provide such a conversion if
> C.UTF-8 doesn't exist and en_US.UTF-8 does

That can't happen.  The "C" locale describes the behavior defined in the ISO C 
standard.  It's built-in to glibc (and should be for all other libc 
implementations).  All other locales require external support (i.e. 
/usr/lib/locale/)

https://www.gnu.org/software/libc/manual/html_node/Standard-Locales.html#Standard-Locales

--
nosy: +gordonmessmer

___
Python tracker 

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



[issue37489] pickling instance which inherited from Exception with keyword only parameter

2019-07-08 Thread liyang


liyang  added the comment:

yesterday i have test two case, first i find the code 1 not execute the 
__init__ when execute loads. second the code 1 and code 2 dumps result s is not 
equal,because the dumps is the buildin function ,so i can't find more 
message.but if the code2 only have keyword parameter the code2 is not raise 
exception. i want to debug the interpreter that can get the reason.

--
nosy: +liyang1...@gmail.com

___
Python tracker 

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



[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-07-08 Thread Kyle Stanley


Kyle Stanley  added the comment:

Typo: The PR in the above comment should be 14655, not 14642.

--

___
Python tracker 

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



[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-07-08 Thread Kyle Stanley


Kyle Stanley  added the comment:

Opened a new PR for moving "threaded_import_hangers" to "test_importlib/" 
(PR-14642). This should be the final file in "tests/" to move into 
"test_importlib/", so the issue can be closed if this PR is merged. I'll create 
a new issue for modernizing the tests once this issue is closed.

--

___
Python tracker 

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



[issue36993] zipfile: tuple IndexError on extract

2019-07-08 Thread Daniel Hillier


Change by Daniel Hillier :


--
pull_requests: +14463
pull_request: https://github.com/python/cpython/pull/14656

___
Python tracker 

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



[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-07-08 Thread Kyle Stanley


Change by Kyle Stanley :


--
pull_requests: +14462
pull_request: https://github.com/python/cpython/pull/14655

___
Python tracker 

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



[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-07-08 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

The PR is ready for review.  It raises ValueError if the escaped octal value in 
a byte string is greater than 255.

--

___
Python tracker 

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



[issue29312] Use FASTCALL in dict.update()

2019-07-08 Thread Inada Naoki


Inada Naoki  added the comment:

> Changing dict.update() calling convention may save a few nanoseconds on 
> d1.update(d2) call, but it will make d1.update(**d2) way slower with a 
> complexity of O(n): d2 must be converted to 2 lists (kwnames and args) and 
> then a new dict should be created.

But who/why use d1.update(**d2)?
In case of dict(), dict(d1, **d2) was idiom to merge two dicts.
But I don't know any practical usage of d1.update(**d2).  d1.update(d2) should 
be preferred.

--

___
Python tracker 

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



[issue37367] octal escapes applied inconsistently throughout the interpreter and lib

2019-07-08 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


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

___
Python tracker 

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



[issue37149] link to John Shipman's Tkinter 8.5 documentation fails: website no longer available

2019-07-08 Thread Ned Deily


Ned Deily  added the comment:

A few comments on this.  One, the Tkinter documentation in question seems to 
have been a personal project of John Shipman at New Mexico Tech and, as such, 
was not "official" so I've updated the issue title accordingly.  Sadly, as 
Cheryl noted, John died two years ago and I guess there were no plans in place 
for someone to take the documentation over from him.  We can all appreciate his 
very valuable contributions over the years by developing and maintaining this 
additional documentation.  It would be great to find a way to provide an 
equivalent resource for Tk 8.6.  The best alternatives today is probably Mark 
Roseman's TkDocs website and "Modern Tkinter" book/ebook, both also already 
linked on our Standard Library tkinter page. I've nosied Mark in case he has 
any thoughts on the matter.

As far as updating the page in older releases, as 3.6 release manager I did 
decide to allow the update there, even though we normally would not make such a 
change for a security-fix-only release; I did so as we are still including 3.6 
in our daily doc builds on docs.python.org (although at some point soon that 
will stop).  It's Larry's call about 3.5 but note that the current 3.5 docs on 
docs.python.org are normally only updated when a new 3.5.x security-fix release 
appears. If you want it to be considered for 3.5, it would be best to make a 
3.5 backport PR.

--
nosy: +markroseman
priority: release blocker -> 
title: link to official documentation tkinter failed  !!! -> link to John 
Shipman's Tkinter 8.5 documentation fails: website no longer available

___
Python tracker 

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



[issue37421] Some tests leak temporary files

2019-07-08 Thread STINNER Victor


STINNER Victor  added the comment:

It seems like tests don't leak temporary files anymore:

$ mkdir ~/TEMP
$ TMPDIR=~/TEMP TEMPDIR=~/TEMP ./python -m test -v -r -u all,-gui 
$ ls ~/TEMP
# empty directory

I close the issue.

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



[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-08 Thread Ned Deily


Ned Deily  added the comment:


New changeset 4834c80d799471a6c9ddaad9c5c82c8af156e4fd by Ned Deily (Pablo 
Galindo) in branch '3.7':
[3.7] bpo-37500: Revert commit 85ed1712e428f93408f56fc684816f9a85b0ebc0 
(GH-14605)
https://github.com/python/cpython/commit/4834c80d799471a6c9ddaad9c5c82c8af156e4fd

New changeset 87a918a0035da576207b85b6844f64fbb9b4c0af by Ned Deily in branch 
'3.7':
[3.7] bpo-37500: update Misc/NEWS entries to mention revert
https://github.com/python/cpython/commit/87a918a0035da576207b85b6844f64fbb9b4c0af


--

___
Python tracker 

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



[issue37149] link to official documentation tkinter failed !!!

2019-07-08 Thread Ned Deily


Ned Deily  added the comment:


New changeset f2cbf41afc9e9a0ce16bfe0c71662348453a28c4 by Ned Deily (Miss 
Islington (bot)) in branch '3.7':
bpo-37149: Replace dead link for online Tkinter reference  (GH-14616)
https://github.com/python/cpython/commit/f2cbf41afc9e9a0ce16bfe0c71662348453a28c4


--

___
Python tracker 

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



[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s

2019-07-08 Thread miss-islington


miss-islington  added the comment:


New changeset c7be35c2abd598f02a633879133caec356593241 by Miss Islington (bot) 
in branch '3.8':
bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)
https://github.com/python/cpython/commit/c7be35c2abd598f02a633879133caec356593241


--
nosy: +miss-islington

___
Python tracker 

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



[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s

2019-07-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14460
pull_request: https://github.com/python/cpython/pull/14653

___
Python tracker 

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



[issue18374] ast.parse gives wrong position (col_offset) for some BinOp-s

2019-07-08 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:


New changeset 110a47c4f42cf4db88edc1876899fff8f05190fb by Ivan Levkivskyi (Carl 
Friedrich Bolz-Tereick) in branch 'master':
bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)
https://github.com/python/cpython/commit/110a47c4f42cf4db88edc1876899fff8f05190fb


--

___
Python tracker 

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



[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

2019-07-08 Thread Brett Cannon


Change by Brett Cannon :


Removed file: https://bugs.python.org/file48461/importsfucked.zip

___
Python tracker 

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



[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

2019-07-08 Thread Brett Cannon


Change by Brett Cannon :


Removed file: https://bugs.python.org/file48460/importsfucked.zip

___
Python tracker 

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



[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

2019-07-08 Thread Brett Cannon


Brett Cannon  added the comment:

Mind re-uploading the examples files with a more appropriate file name? (Saying 
"import is f-'ed" is not motivating to those of us who wrote it to try and fix 
this.)

--

___
Python tracker 

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



[issue37521] importlib.util.module_from_spec return value is not the same as in sys.modules

2019-07-08 Thread Brett Cannon


Change by Brett Cannon :


--
nosy: +eric.snow, ncoghlan

___
Python tracker 

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



[issue37519] Three inconsistent module attributes

2019-07-08 Thread Brett Cannon


Brett Cannon  added the comment:

PEPs actually become historical documents once they are implemented, so could 
you please check what the official docs say in regards to this to see if there 
is an inconsistency in the semantics?

--
nosy: +brett.cannon

___
Python tracker 

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



[issue37514] french translation Spelling mistake on datetime python's library documentation online

2019-07-08 Thread Brett Cannon


Change by Brett Cannon :


--
assignee: docs@python -> mdk

___
Python tracker 

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



[issue37512] Error in the documentation about string concatenation

2019-07-08 Thread Brett Cannon


Brett Cannon  added the comment:

I'm going to close this as we try to avoid documenting CPython-specific details 
unless absolutely necessary. And in the case of documenting the str type we 
should avoid that.

So thanks for the suggestion, Dmitriy, but we will just leave this as a 
pleasant surprise for folks who accidentally make the mistake of writing code 
this way.

--
nosy: +brett.cannon
resolution:  -> rejected
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



[issue29312] Use FASTCALL in dict.update()

2019-07-08 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

> d2 must be converted to 2 lists (kwnames and args) and then a new dict should 
> be created.

The last part is not necessarily true. You could do the update directly, 
without having that intermediate dict.

--

___
Python tracker 

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



[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-08 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Yep, that is more or less the approach in PR14612. What I tried to achieve 
there is also minimize the amount of changes to make the pass for errors non 
intrusive.

--

___
Python tracker 

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



[issue37149] link to official documentation tkinter failed !!!

2019-07-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Larry, I have the same request of you that I did for Ned.  Please backport 
PR-14616 to 3.5.  It replaces a dead link to the most important online Tkinter 
reference.  Many people are lost without the reference, as they find reading 
the tcl/tk reference much harder.  It is like having half the tkinter doc, the 
part covering tk widgets, removed. (The question has come up on Stackoverflow 
also.)  The replacement will benefit any 3.5 users looking at the online 3.5 
docs.

--

___
Python tracker 

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



[issue30663] IDLE: Add lineno sidebar to editor window

2019-07-08 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

A closing note: Saimadhav Heblikar's initial patch on #17535 was a standalone 
proof-of-concept file was based on Canvas and Text subclasses.  The latter 
consisted mostly of two tk.eval(tcl_code) calls.  I rejected the idea of using 
tk.eval, as review and maintenance would requires knowing tcl.  But the 
submission won him my GSOC mentorship (and we did quite well working together, 
even though line-numbering was not finished).

Saimadhav's poc appears to have been inspired by Bryan Oakley's Canvas and 
Text-based answer a year earlier on https://stackoverflow.com/a/16375233.  But 
Bryan only used tk.call and tk.createcommand, not tk.eval.  Some of Saimadhav's 
tcl appears to be a translation of some of Bryan's python.

PR 2183 is a full patch also based on Canvas and Text and explicitly inspired 
by Oakley's answer.  However, the Text subclass is an edited version of 
Saimadhav's tk.eval version, not Oakley's.  This is properly closed as a 
duplicate, but it does provide the Oakley link, which does not appear on #17535.

--
nosy: +cheryl.sabella, taleinat

___
Python tracker 

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



[issue34028] Python 3.7.0 wont compile with SSL Support 1.1.0 > alledged missing X509_VERIFY_PARAM_set1_host() support

2019-07-08 Thread Caymon Sullivan


Change by Caymon Sullivan :


--
nosy: +cayman

___
Python tracker 

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



[issue37187] CField.size from the ctypes module does not behave as documented on bitfields

2019-07-08 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991

___
Python tracker 

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



[issue27679] set_bitfields() unused in _ctypes_test

2019-07-08 Thread hai shi


Change by hai shi :


--
nosy: +shihai1991
versions:  -Python 3.6

___
Python tracker 

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



[issue27679] set_bitfields() unused in _ctypes_test

2019-07-08 Thread hai shi


Change by hai shi :


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

___
Python tracker 

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



[issue37187] CField.size from the ctypes module does not behave as documented on bitfields

2019-07-08 Thread hai shi


Change by hai shi :


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

___
Python tracker 

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



[issue37149] link to official documentation tkinter failed !!!

2019-07-08 Thread Ned Deily


Ned Deily  added the comment:


New changeset 317c33e67cb6076c5a87a66c75e8c35ac581398d by Ned Deily in branch 
'3.6':
bpo-37149: Replace dead link for online Tkinter reference  (GH-14616)
https://github.com/python/cpython/commit/317c33e67cb6076c5a87a66c75e8c35ac581398d


--

___
Python tracker 

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



[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

2019-07-08 Thread Guido van Rossum


Guido van Rossum  added the comment:

Sure seems to me as if we need to have a separate pass that looks for 
out-of-place `return`, `yield`, `break` and `continue`, run before the 
optimization removes `if 0:` blocks etc.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue37369] Issue with pip in venv on Powershell in Windows

2019-07-08 Thread gaborbernat


gaborbernat  added the comment:

A note on the above points, virtualenv has started migrating over to venv via 
https://github.com/pypa/virtualenv/pull/1377 . Following this, the old ways of 
virtualenv should be left to the history books. Hopefully, I can get it out 
within the next month or so.

--
nosy: +gaborbernat

___
Python tracker 

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



[issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC

2019-07-08 Thread STINNER Victor


STINNER Victor  added the comment:

Ah by the way, this issue was mostly motivated by a customer issue, but the bug 
disappeared from customer's production.

Moreover, Python 3.8 now allows to use debug build without having to recompile 
all C extensions:
https://docs.python.org/dev/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

A debug build may also help to catch more bugs.

--

___
Python tracker 

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



[issue36389] Add gc.enable_object_debugger(): detect corrupted Python objects in the GC

2019-07-08 Thread STINNER Victor


STINNER Victor  added the comment:

I opened this issue, because I was convinced that it would be easy to implement 
checks faster than gc.setthreshold(), but I failed to write efficient tests 
which detect the bugs that I listed above.

My approach was basically to check all objects tracked by the GC every N memory 
allocations (PyGC_Malloc): too slow. I tried to put thresholds per generation: 
it was still too slow.

Maybe recent objects should be checked often, but old objects should be checked 
less often. For example, only check objects in generation 0 and scan new 
objects, and then remember the size of generation 0. At the next check, ignore 
objects already checked.

I failed to find time and interest to implement this approach. I abandon this 
issue and my PR.

In the meanwhile, gc.set_threshold(5) can be used. It isn't too slow and is 
quite good to find most bugs listed in this issue.

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



[issue29505] Submit the re, json, & csv modules to oss-fuzz testing

2019-07-08 Thread Guido Vranken


Guido Vranken  added the comment:

Hi,

I've built a generic Python fuzzer and submitted it to OSS-Fuzz.

It works by implementing a "def FuzzerRunOne(FuzzerInput):" function in Python 
in which some arbitrary code is run based on FuzzerInput, which is a bytes 
object.

This is a more versatile solution than the current re, json, csv fuzzers as it 
requires no custom C code and adding more fuzzing targets is as easy as writing 
a new harness in Python and adding a build rule.

Code coverage is measured at both the CPython level (*.c) and the Python level 
(*.py). CPython is compiled with AddressSanitizer. What this means is that both 
CPython memory bugs and Python library bugs (excessive memory consumption, 
hangs, slowdowns, unexpected exceptions) are expected to transpire.

You can see my current set of fuzzers here: 
https://github.com/guidovranken/python-library-fuzzers

The PR to OSS-Fuzz is https://github.com/google/oss-fuzz/pull/2567

Currently, the only Python maintainer who will be receiving automated bug 
reports is gpshead. Are there any other developers who normally process Python 
security bug reports and would like to receive notifications?

Feel free to respond directly in the OSS-Fuzz PR thread.

--
nosy: +Guido

___
Python tracker 

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



[issue37471] mmap module: add MAP_ALIGNED_SUPER FreeBSD and MAP_CONCEAL OpenBSD constants

2019-07-08 Thread David CARLIER


Change by David CARLIER :


--
title: mmap module: add MAP_ALIGNED_SUPER FreeBSD constant -> mmap module: add 
MAP_ALIGNED_SUPER FreeBSD and MAP_CONCEAL OpenBSD constants

___
Python tracker 

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



[issue37130] pathlib.Path.with_name() handles '.' and '..' inconsistently

2019-07-08 Thread Steinmann


Steinmann  added the comment:

@Brett: I also think making Path('.').name evaluate to '.' would be the most 
logical thing. More even so since the documentation says PurePath.name() is 
equivalent to os.path.basename()[1], but:

>>> Path('.').name
''
>>> os.path.basename('.')
'.'

Though I'm not sure if that is ok to change this behaviour or if people already 
rely on it.

No matter which decision is made, I would say the documentation should be 
improved.
If it will be the same as basename, document this also here [2].
Otherwise add a note to [1], maybe in the same format and position as was done 
for os.path.relpath().

[1] 
https://docs.python.org/3/library/pathlib.html#correspondence-to-tools-in-the-os-module
[2] https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.name

--
nosy: +lucas.steinmann

___
Python tracker 

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



[issue37055] Numerous warnings with blake2 module

2019-07-08 Thread Inada Naoki


Change by Inada Naoki :


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

___
Python tracker 

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



[issue37522] http.cookies.SimpleCookie doesn't seem to be parsed using regulars

2019-07-08 Thread MeiK

New submission from MeiK :

In Python's built-in SimpleCookie[1], regular expressions are used to parse 
cookies, which seems to be a non-standard way.

I looked at the RFC documentation related to cookie resolution: rfc2109[2] and 
rfc6265[3], the former has been replaced by the latter. These documents 
stipulate that cookies should be split with a semicolon, just like 
http.cookiejar.parse_ns_headers[4].

But if we use the approach described in the documentation, then there will be a 
set of tests that fail[5].

Current:
>>> print(SimpleCookie('keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"’))
Set-Cookie: keebler="E=mc2; L=\"Loves\"; fudge=\012;"

Modified:
>>> print(SimpleCookie('keebler="E=mc2; L=\\"Loves\\"; fudge=\\012;"’))
Set-Cookie: keebler="E=mc2

Is this a bug? Should it be modified?

English is not my native language; please excuse typing errors.

[1]: https://github.com/python/cpython/blob/master/Lib/http/cookies.py#L536
[2]: https://www.ietf.org/rfc/rfc2109.txt
[3]: https://www.ietf.org/rfc/rfc6265.txt
[4]: https://github.com/python/cpython/blob/master/Lib/http/cookiejar.py#L453
[5]: 
https://github.com/python/cpython/blob/master/Lib/test/test_http_cookies.py#L19

--
components: Extension Modules
messages: 347494
nosy: MeiK
priority: normal
severity: normal
status: open
title: http.cookies.SimpleCookie doesn't seem to be parsed using regulars
type: enhancement
versions: Python 3.5, Python 3.6, 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



[issue37421] Some tests leak temporary files

2019-07-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset cdada40b23b1f7f527797ba7cb14c25820b05981 by Victor Stinner (Miss 
Islington (bot)) in branch '3.8':
bpo-37421: test_concurrent_futures stops ForkServer (GH-14643) (GH-14645)
https://github.com/python/cpython/commit/cdada40b23b1f7f527797ba7cb14c25820b05981


--

___
Python tracker 

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



[issue30663] IDLE: Add lineno sidebar to editor window

2019-07-08 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> IDLE: Add an option to show line numbers along the left side of 
the editor window, and have it enabled by default.

___
Python tracker 

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



[issue37421] Some tests leak temporary files

2019-07-08 Thread miss-islington


Change by miss-islington :


--
pull_requests: +14456
pull_request: https://github.com/python/cpython/pull/14645

___
Python tracker 

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



[issue37421] Some tests leak temporary files

2019-07-08 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset e676244235895aeb6ec3b81ca3ccf4a70e487919 by Victor Stinner in 
branch 'master':
bpo-37421: test_concurrent_futures stops ForkServer (GH-14643)
https://github.com/python/cpython/commit/e676244235895aeb6ec3b81ca3ccf4a70e487919


--

___
Python tracker 

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



[issue37507] multiprocessing: Add a stop() method to ForkServer

2019-07-08 Thread STINNER Victor


STINNER Victor  added the comment:

Previous related discussion on python-dev:
https://mail.python.org/archives/list/python-...@python.org/thread/NJCLS7IOKKO6W7LBGPQI2VFAO57EJEPW/#DIOMN256E24NUBSPKWFQA556F43IOWXR

--

___
Python tracker 

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



[issue37337] Add _PyObject_VectorcallMethod() function

2019-07-08 Thread Petr Viktorin


Petr Viktorin  added the comment:

Thank you, Jeroen and INADA-san!

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



[issue37507] multiprocessing: Add a stop() method to ForkServer

2019-07-08 Thread STINNER Victor


STINNER Victor  added the comment:

> Side note: if you're modifying multiprocessing, asking for a review doesn't 
> hurt ;-)

I only modified tests (I only added a *private* _stop() method which is only 
used by tests). When I touch the multiprocessing module directly, I wait for a 
review.

Right now, I'm embarrassed since my "multiprocessing tests call 
_run_finalizers()" change which was supposed to be simple and safe broke 
Refleak buildbots. I had to fix test_concurrent_futures to also explicitly 
closes the forkserver there:
https://github.com/python/cpython/pull/14643

I was quite surprised to discover that a test leaves a child process in 
background. IMHO tests should have zero side effects on following tests (at 
least a test file must clear all its resources when it completes).

Python finalization is *very* fragile (not reliable at all), so I prefer to 
release resources as soon as possible, to get errors reported. Multiprocessing 
tests failures are still common, and very likely caused by these small details 
like a server which isn't stopped properly (IMHO). Tests should get a fresh and 
reliable environment.

Maybe each test should ensure that the forkserver is stopped, but I chose the 
easy fix: only stop it once at (test file) exit. Start/stop the server in each 
test might make these tests even slower, whereas multiprocessing tests are 
almost part of the slowest tests.

--

___
Python tracker 

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



[issue37507] multiprocessing: Add a stop() method to ForkServer

2019-07-08 Thread STINNER Victor


STINNER Victor  added the comment:

> There is no reason to expose "stop the forkserver" to users. How the 
> forkserver process works, what tasks it handles, is an implementation detail. 
> If users start "stopping the forkserver" in their applications for no good to 
> reason, they might get bugs now or later that they wouldn't get otherwise.

Well, we already had this conversation before. I really dislike APIs which hold 
resources but disallow to "release resources", especially when a resource is 
not a few bytes of memory, but a whole process.

Since there is a method to start the server (ensure_running), I would like to 
control when it's stopped "to ensure that errors are properly reported if 
something goes wrong."

That's why I added Process.close() in Python 3.7 and ResourceWarning in Pool in 
Python 3.8.

Here I don't propose to add a ResourceWarning if the server is not stopped 
explicitly. I only propose to add a method if the developer wants to control 
when it's stopped.

--

___
Python tracker 

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



[issue37337] Add _PyObject_VectorcallMethod() function

2019-07-08 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 762f93ff2efd6b7ef0177cad57939c0ab2002eac by Inada Naoki (Jeroen 
Demeyer) in branch 'master':
bpo-37337: Add _PyObject_CallMethodNoArgs() (GH-14267)
https://github.com/python/cpython/commit/762f93ff2efd6b7ef0177cad57939c0ab2002eac


--

___
Python tracker 

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



[issue37421] Some tests leak temporary files

2019-07-08 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +14455
pull_request: https://github.com/python/cpython/pull/14643

___
Python tracker 

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



[issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8

2019-07-08 Thread STINNER Victor


STINNER Victor  added the comment:

The test still fails times to times:
https://buildbot.python.org/all/#/builders/80/builds/644

FAIL: test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests)
--
Traceback (most recent call last):
  File 
"D:\buildarea\3.x.ware-win81-release.refleak\build\lib\test\test__xxsubinterpreters.py",
 line 492, in test_subinterpreter
self.assertTrue(interpreters.is_running(interp))
AssertionError: False is not true

--

___
Python tracker 

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



[issue19696] Merge all (non-syntactic) import-related tests into test_importlib

2019-07-08 Thread Kyle Stanley


Change by Kyle Stanley :


--
pull_requests: +14454
pull_request: https://github.com/python/cpython/pull/14642

___
Python tracker 

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