[issue35226] mock.call equality surprisingly broken

2018-11-27 Thread Chris Withers

Chris Withers  added the comment:

Éric, doesn't look like I can add labels, what needs to happen for me to do so? 
(I was/am a core developer, just an extremely inactive one ;-), but happy to 
jump through whatever hoops necessary... )

--

___
Python tracker 

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



[issue35334] urllib3 fails with type error exception, when cannot reach PyPI - urllib3.util.retry

2018-11-27 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I think this is an issue with pip specifically with Ubuntu/Debian packaging 
causing the error. Please see https://github.com/pypa/pip/issues/3943, 
https://github.com/pypa/pip/issues/4779 and 
https://answers.launchpad.net/ubuntu/+question/659285 . I think this is a third 
party issue.

--
nosy: +xtreak

___
Python tracker 

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



[issue35335] msgfmt should be able to merge more than one po file

2018-11-27 Thread s-ball


New submission from s-ball :

GNU gettext msgfmt can merge several po files into one single mo file.
The current version of msgfmt can only compile one po file to one mo file.

After looking at the code, the enhancement should be simple to implement.

Command line: if one output file is given (option -o) and several input files, 
then all the input files should be combined.

Implementation:
- main should pass all the parameters to make (*args)
- make should accept one single string for compatibility or an iterable of 
string. In that latter case, the current processing should be repeated on all 
input files.

I could propose a patch (but I am afraid it ends being rather large) or a pull 
request. As a new user here, I do not know what is the best way...

--
components: Demos and Tools
messages: 330575
nosy: s-ball
priority: normal
severity: normal
status: open
title: msgfmt should be able to merge more than one po file
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, 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



[issue35334] urllib3 fails with type error exception, when cannot reach PyPI - urllib3.util.retry

2018-11-27 Thread Arno-Can Uestuensoez


New submission from Arno-Can Uestuensoez :

Hi,
I am using the installation script *adafruit-pitft.sh* which tries to apply 
*urllib3* which itself tries to install nested dependencies,
here *evdev* from PyPI.

When the installation is offline - e.g. by internal mirror of debian/raspbian - 
PyPI is not accessible. The code fails than by an type error
exception:

> adafruit-pitft.sh # or pitft.sh 
> https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/master/adafruit-pitft.sh
>
> ...
> 
>   _stacktrace=sys.exc_info()[2])
>  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3 
> none-any.whl/urllib3/util/retry.py", line 228, in increment
>
>total -= 1
>
> TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

For the current distribution(based on debian-9.6.0/stretch):

>  File 
> "/usr/share/python-wheels/urllib3-1.19.1-py2.py3-none-any.whl/urllib3/util/retry.py",
>  line 315, in increment
>
>total -= 1
>
> TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

See also: 
https://stackoverflow.com/questions/37495375/python-pip-install-throws-typeerror-unsupported-operand-types-for-retry


The following - dirty *:) - patch enables a sounding error trace:

# File: retry.py - in *def increment(self, ..* about line 315
# original: total = self.total

# patch: quick-and-dirty-fix
# START:
if isinstance(self.total, Retry):
self.total = self.total.total

if type(self.total) is not int:
self.total = 2 # default is 10
# END:

# continue with original:
total = self.total

if total is not None:
total -= 1

connect = self.connect
read = self.read
redirect = self.redirect
cause = 'unknown'
status = None
redirect_location = None

if error and self._is_connection_error(error):
# Connect retry?
if connect is False:
raise six.reraise(type(error), error, _stacktrace)
elif connect is not None:
connect -= 1


The sounding output with the temporary patch is(twice...):

> Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after 
> connection broken by 
> 'ConnectTimeoutError(requests.packages.urllib3.connection.VerifiedHTTPSConnection
>  object at/
>
>  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after 
> connection broken by 
'ConnectTimeoutError(requests.packages.urllib3.connection.VerifiedHTTPSConnection
 object at/
>
>  Could not find a version that satisfies the requirement evdev (from 
> versions: )
>
> No matching distribution found for evdev
>
> WARNING : Pip failed to install software!

In this case I did not thoroughly analysed the actual error source, thus did a 
quick and dirty patch only.

My proposal is to add the inplace operator to the class *Reply* with the 
default assignment in case of an type error and display an error message.
This is still not really the correct solution, but resolves a lot of confusion 
by required interpretation of the exception.

Arno-Can Uestuensoez

--
components: Library (Lib)
messages: 330574
nosy: Quentin.Pradet, acue, deivid, martin.panter
priority: normal
severity: normal
status: open
title: urllib3 fails with type error exception, when cannot reach PyPI - 
urllib3.util.retry
type: crash
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, 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



[issue28608] Support creating hardlink using `pathlib`

2018-11-27 Thread Alexandr Zamaraev


New submission from Alexandr Zamaraev :

see 
https://python-forum.io/Thread-makin-hardlinks-with-pathlib-Path?pid=57399#pid57399

--

___
Python tracker 

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



[issue28608] Support creating hardlink using `pathlib`

2018-11-27 Thread Alexandr Zamaraev


Change by Alexandr Zamaraev :


--
nosy: +shura_zam

___
Python tracker 

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



[issue34100] Same constants in tuples are not merged while compile()

2018-11-27 Thread INADA Naoki


INADA Naoki  added the comment:

I agree that modifying tuple is bad idea in general case.

But in case of constants, in-place modify is the easiest approach.

Our purpose is "merging" constant.  On the other hand, "build new tuple and
replace old tuple" approach makes two same constant tuples.
If old tuple is referenced from somewhere, we fail to "merging".

So I don't think we need to follow the general principle unless it reduces code.

FYI, we have similar in-place editing for interning already.
https://github.com/python/cpython/blob/master/Objects/codeobject.c#L47-L95

--

___
Python tracker 

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



[issue35322] test_datetime leaks memory on Windows

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

Oh, I see. unicode_encode_locale() has multiple bugs in the code handling 
errors :-(

I don't think that my commit 3d4226a832cabc630402589cc671cc4035d504e5 
introduced the memory leak triggered by test_datetime, it seems older. Python 
3.7 also has the bug in unicode_encode_locale(). The memory leak has been 
introduced by commit 7ed7aead9503102d2ed316175f198104e0cd674c, also written by 
me :-)

--
stage: patch review -> 
versions: +Python 3.7

___
Python tracker 

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



[issue34523] Choose the filesystem encoding before Python initialization (add _PyCoreConfig.filesystem_encoding)

2018-11-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10006

___
Python tracker 

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



[issue35322] test_datetime leaks memory on Windows

2018-11-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2018-11-27 Thread Berker Peksag


Berker Peksag  added the comment:

Thanks for the pings. I will work on this issue this weekend. Note that 3.4 and 
3.5 are in security-fix-only mode now, so I removed them from the versions 
field.

--
assignee:  -> berker.peksag
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2018-11-27 Thread John Parejko


John Parejko  added the comment:

Adding to the list of "I just ran into this". The patch submitted by fov seems 
straightforward enough: what can we do to help shepherd it along?

--
nosy: +John Parejko2

___
Python tracker 

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



Re: PEP 572 -- Assignment Expressions

2018-11-27 Thread bob gailer

On 11/27/2018 5:48 AM, Ivo Shipkaliev wrote:

Hello.
Maybe it's too late for a discussion, but I just couldn't resist.
I just found out about this new ":=" operator. I need to ask:

What is the need for this additional ":" to the "="?

Did you read the PEP? It answers the question.

Why:
  if (match := pattern.search(data)) is not None:
# Do something with match

What is wrong with:
  if match = pattern.search(data) is not None:
# Do something with match


match = pattern.search(data) is not None

returns True or False, which is then assigned to match. On the other 
hand, in


 (match := pattern.search(data)) is not None
match is assigned the result of the search; then that is compared to None.

I am glad to see this added to python. I first encountered embedded assignment 
in 1969 in the fortran iv compiler for the GE 415 computer. Love at first sight.

--
Bob Gailer

--
https://mail.python.org/mailman/listinfo/python-list


[issue33676] test_multiprocessing_fork: dangling threads warning

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

I *hope* that it will be enough :-/

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.8

___
Python tracker 

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



[issue33676] test_multiprocessing_fork: dangling threads warning

2018-11-27 Thread miss-islington


miss-islington  added the comment:


New changeset dd5293871703e6a12ffdde14eeaa86a73b7b0d99 by Miss Islington (bot) 
in branch '3.6':
bpo-33676: Fix dangling thread in _test_multiprocessing (GH-10755)
https://github.com/python/cpython/commit/dd5293871703e6a12ffdde14eeaa86a73b7b0d99


--

___
Python tracker 

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



[issue33676] test_multiprocessing_fork: dangling threads warning

2018-11-27 Thread miss-islington


miss-islington  added the comment:


New changeset 80db40cdd6a58c9d66694a43ee9a7c06ab958373 by Miss Islington (bot) 
in branch '3.7':
bpo-33676: Fix dangling thread in _test_multiprocessing (GH-10755)
https://github.com/python/cpython/commit/80db40cdd6a58c9d66694a43ee9a7c06ab958373


--
nosy: +miss-islington

___
Python tracker 

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



[issue33676] test_multiprocessing_fork: dangling threads warning

2018-11-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10005

___
Python tracker 

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



[issue33676] test_multiprocessing_fork: dangling threads warning

2018-11-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +10004
stage: resolved -> patch review

___
Python tracker 

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



[issue33676] test_multiprocessing_fork: dangling threads warning

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b7278736b3ae158a7738057e3045bc767ced019e by Victor Stinner in 
branch 'master':
bpo-33676: Fix dangling thread in _test_multiprocessing (GH-10755)
https://github.com/python/cpython/commit/b7278736b3ae158a7738057e3045bc767ced019e


--

___
Python tracker 

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



[issue35333] Rename private structs to use names closer to types

2018-11-27 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +nascheme, serhiy.storchaka

___
Python tracker 

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



[issue35333] Rename private structs to use names closer to types

2018-11-27 Thread STINNER Victor


New submission from STINNER Victor :

To prevent a compiler warning/error (on clang), I had modify Include/object.h 
and Include/pystate.h:

* Replace "PyTypeObject" with "struct _typeobject"
* Replace "PyInterpreterState" with "struct _is"
* Replace "PyThreadState" with "struct _ts"

=> see commit 9bdd2de84c1af55fbc006d3f892313623bd0195c of bpo-35134.

I propose to rename "struct _ts" to "struct PyThreadState" or "struct 
_PyThreadState", and do a similar change for "struct _ts" and "struct 
_typeobject". My intent is to make the Include/object.h and Include/pystate.h 
less surprising.

Maybe "struct _frame" should also be renamed to "struct _PyFrameObject"?

--

Python header files use many "private" C structures (struct):

struct _addr_pair
struct _arena PyArena
struct _ceval_runtime_state
struct _dictkeysobject
struct _err_stackitem
struct _frame
struct _gc_runtime_state
struct _gil_runtime_state gil
struct _heaptypeobject
struct _is
struct _longobject
struct _object
struct _odictobject PyODictObject
struct _pending_calls
struct _pycontextobject
struct _pycontexttokenobject
struct _pycontextvarobject
struct _symtable_entry
struct _traceback
struct _ts
struct _typeobject
struct _warnings_runtime_state
struct _xid
struct _xidregitem

The following structures are documented:

* struct _frozen:
  https://docs.python.org/dev/c-api/import.html#c._frozen
* struct _inittab:
  https://docs.python.org/dev/c-api/import.html#c._inittab
* struct _node:
  https://docs.python.org/dev/c-api/veryhigh.html#c.PyParser_SimpleParseString

--
components: Interpreter Core
messages: 330564
nosy: vstinner
priority: normal
severity: normal
status: open
title: Rename private structs to use names closer to types
versions: Python 3.8

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2018-11-27 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

I don’t understand this either.  For some reason the patch works when using the 
function and not when using the macro. 

I haven’t looked into this yet, and am currently traveling. I should have time 
to look into this starting December 5th when I’m back home.

--

___
Python tracker 

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



[issue34855] batch file variables

2018-11-27 Thread Steve Dower


Steve Dower  added the comment:

Yep, good catch. That should be EXTERNALS_DIR in PCbuild/find_python.bat.

--
components: +Windows
keywords: +easy
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue35319] pkgutil.get_data() is a wrapper for a deprecated class

2018-11-27 Thread Brett Cannon


Brett Cannon  added the comment:

You can use importlib.resources to read data files and such from within a 
package as an alternative.

--
nosy: +brett.cannon

___
Python tracker 

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



[issue33676] test_multiprocessing_fork: dangling threads warning

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

The bug is still alive:
https://buildbot.python.org/all/#/builders/168/builds/294

I found a bug using attached mp_debug.patch.

I wrote PR 10755 to try to fix it.

I have access to FreeBSD CURRENT buildbot. I only reproduced the bug once using:

./python -m test -v test_multiprocessing_fork -m WithThreadsTestPool 
--fail-env-changed -F 

I ran this command 4 times in parallel in 4 terminals, but I failed to reliably 
reproduce the bug. Even if I stress the computer using "./python -m test -j4 
-r" run in different shell, or using my "system_load.py 3" script, I fail to 
trigger the bug.

--
keywords: +patch
resolution: out of date -> 
status: closed -> open
Added file: https://bugs.python.org/file47953/mp_debug.patch

___
Python tracker 

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



[issue35320] Writable __spec__.has_location attribute

2018-11-27 Thread Brett Cannon


Brett Cannon  added the comment:

The docs do not specify that has_location is read-only: 
https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.has_location
 .

And PEPs are not updated once they are implemented as that would mean we would 
have to perpetually update docs in at least two different places.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35321] None _frozen_importlib.__spec__.origin attribute

2018-11-27 Thread Brett Cannon


Brett Cannon  added the comment:

I can replicate.

Do note, though, that PEPs are not documentation once they are implemented; at 
that point the official docs are what should be followed.

--
components: +Interpreter Core -Library (Lib)
nosy:  -docs@python
stage:  -> test needed
type:  -> behavior

___
Python tracker 

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



[issue33676] test_multiprocessing_fork: dangling threads warning

2018-11-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10003

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 9bdd2de84c1af55fbc006d3f892313623bd0195c by Victor Stinner in 
branch 'master':
bpo-35134: Don't define types twice in header files (GH-10754)
https://github.com/python/cpython/commit/9bdd2de84c1af55fbc006d3f892313623bd0195c


--

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10002

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

Oh cpython/pystate.h introduced this warning, when building Python with clang 
in release mode:

In file included from Parser/node.c:3:
In file included from ./Include/Python.h:107:
In file included from ./Include/traceback.h:8:
In file included from ./Include/pystate.h:123:
./Include/cpython/pystate.h:217:3: warning: redefinition of typedef 
'PyThreadState' is a C11 feature [-Wtypedef-redefinition]
} PyThreadState;
  ^
./Include/pystate.h:27:20: note: previous definition is here
typedef struct _ts PyThreadState;
   ^

--

___
Python tracker 

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



[issue35240] Travis CI: xvfb-run: error: Xvfb failed to start

2018-11-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +10001

___
Python tracker 

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



[issue35240] Travis CI: xvfb-run: error: Xvfb failed to start

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

"make doctest" has been added by commit 
859c068e52a31e13e2b9bb6a3f861fa8c290cb0e of bpo-34962.

--

___
Python tracker 

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



[issue35240] Travis CI: xvfb-run: error: Xvfb failed to start

2018-11-27 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-11-27 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +lisroach

___
Python tracker 

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



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

Python 2.7 doesn't seem to be affected:

$ TZ=UTC ./python -m test -v test_email
Tests result: SUCCESS

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue35332] shutil.rmtree(..., ignore_errors=True) doesn't ignore errors from os.close()

2018-11-27 Thread Ronal Abraham


New submission from Ronal Abraham :

These lines throw intermittently for me on AIX when removing a directory on NFS 
(python version 3.6.6-1), even when "ignore_errors=True":

https://github.com/python/cpython/blob/v3.6.6rc1/Lib/shutil.py#L433
https://github.com/python/cpython/blob/v3.6.6rc1/Lib/shutil.py#L492

Should there be try-except blocks around these lines and calls to onerror(...)?

--
components: Library (Lib)
messages: 330553
nosy: rabraham
priority: normal
severity: normal
status: open
title: shutil.rmtree(..., ignore_errors=True) doesn't ignore errors from 
os.close()
type: behavior
versions: Python 3.6, 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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-11-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Only one function cast warning is left, and it is a separate issue: issue33015.

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-11-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1c607155c9e363489036ae6258b165a3fae75134 by Serhiy Storchaka in 
branch 'master':
bpo-33012: Fix more invalid function cast warnings with gcc 8. (GH-10751)
https://github.com/python/cpython/commit/1c607155c9e363489036ae6258b165a3fae75134


--

___
Python tracker 

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



[issue33029] Invalid function cast warnings with gcc 8 for getter and setter functions

2018-11-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I have done this. Thank you for reporting about this issue.

I don't have enough motivation for making a backport for 2.7. If someone want 
to do this, a PR is welcome.

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-11-27 Thread miss-islington


miss-islington  added the comment:


New changeset d5c8bd8e4cc04873254f0bd38895a6479c23c8aa by Miss Islington (bot) 
in branch '3.6':
bpo-33012: Fix signatures of METH_NOARGS functions. (GH-10736) (GH-10748)
https://github.com/python/cpython/commit/d5c8bd8e4cc04873254f0bd38895a6479c23c8aa


--

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-11-27 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +

___
Python tracker 

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



[issue35328] Set a environment variable for venv prompt

2018-11-27 Thread Baptiste Darthenay


Baptiste Darthenay  added the comment:

How the venv prompt name would be displayed in a project like Powerline?

Or in VS Code? https://i.ibb.co/JHYrnk2/Screenshot-from-2018-11-27-19-41-47.png

Or in my custom prompt? 
https://gist.github.com/batisteo/c5c9bd87a344cdbfb7a6401648c118a2#file-batisteo-zsh-theme-L194

--

___
Python tracker 

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



Re: [Tutor] Error Python version 3.6 does not support this syntax.

2018-11-27 Thread Mats Wichmann
On 11/27/18 5:50 AM, srinivasan wrote:
> Dear Python Experts,
> 
> As still I am newbie and learning python, I am trying to reuse the
> Bluetoothctl wrapper in Python from the link (
> https://gist.github.com/egorf/66d88056a9d703928f93) I am using python3.6
> version, In pycharm editor on the bold highlighted code snippets I see the
> error message "Python version 3.6 does not support this syntax.",

once again you've posted in a way that inserts lots of extra crud, you
avoided that last time.

The syntax change is simple (and works on most older Pythons too):

except ErrorType, e:

becomes

except ErrorType as e:


> 
> Could you please how help me how the below highlighted lines of code can be
> can be ported to python3.6 version?
> 
> *except BluetoothctlError, e:*
> 
> *print(e)*
> *return None*
> 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue35312] lib2to3.pgen2.parse.ParseError is not roundtrip pickleable

2018-11-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset c57e6e2e52d5d8b4005753bed789d99ebe407fb6 by Serhiy Storchaka 
(Anthony Sottile) in branch 'master':
bpo-35312: Make lib2to3.pgen2.parse.ParseError round-trip pickle-able. 
(GH-10710)
https://github.com/python/cpython/commit/c57e6e2e52d5d8b4005753bed789d99ebe407fb6


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33029] Invalid function cast warnings with gcc 8 for getter and setter functions

2018-11-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 29d2f3c47280f05795c9d4d70f4018cb1488f0ab by Serhiy Storchaka in 
branch '3.6':
[3.6] bpo-33029: Fix signatures of getter and setter functions. (GH-10746) 
(GH-10749)
https://github.com/python/cpython/commit/29d2f3c47280f05795c9d4d70f4018cb1488f0ab


--

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-11-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset ad8ac54aa3d2323bdb5feb5e858a922840358187 by Serhiy Storchaka in 
branch '3.7':
bpo-33012: Fix signatures of METH_NOARGS functions. (GH-10736) (GH-10748)
https://github.com/python/cpython/commit/ad8ac54aa3d2323bdb5feb5e858a922840358187


--

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-11-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9998

___
Python tracker 

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



[issue35331] Incorrect __module__ attribute for _struct.Struct and perhaps a few others

2018-11-27 Thread Dan Snider


New submission from Dan Snider :

_struct.Struct not defining a valid __module__ by prefixing its tp_name slot 
with "_struct" is inconsistent with every other extension type which is 
available in the corresponding module globals.

>From the documentation of the `tp_name` slot:

Pointer to a NUL-terminated string containing the name of the type. For types 
that are accessible as module globals, the string should be the full module 
name, followed by a dot, followed by the type name; for built-in types, it 
should be just the type name. If the module is a submodule of a package, the 
full package name is part of the full module name. For example, a type named T 
defined in module M in subpackage Q in package P should have the tp_name 
initializer "P.Q.M.T".

For dynamically allocated type objects, this should just be the type name, and 
the module name explicitly stored in the type dict as the value for key 
'__module__'.



I know that this is also a way to make something unpickleable, but that seems 
like a poor way to do it and since _struct.Struct was relatively alone in this, 
I figured it was an oversight.

At the end is the script I made to display all currently alive "builtins" 
classes that have been "PyType_Ready"ed. For brevity I further manually 
filtered out obvious cases where a specified module would be inappropriate. 

The main point is that I think the new contextvars classes, _struct.Struct, and 
the weakref classes are missing the "_struct", "_contextvars", and "_weakref" 
prefixes in their tp_name slots, respectively. Since _contextvars is one of the 
few extension modules using the multiphase initialization protocol, maybe it 
should go in their type dicts (although the prefix method still works) instead, 
although i think the docs were referring to heap allocated types.



if __name__=='__main__':
import sys, collections
subclassesof = type.__subclasses__
def get_types(*names):
r = {"__builtins__":{'__import__':__import__, 'globals':globals}}
for name in names:
exec(f'from {name} import __dict__ as d; globals().update(d)', r)
return dict.fromkeys(r[k] for k in r if isinstance(r[k],type)).keys()
def derivative_classes(cls):
a = b = r = {*subclassesof(cls)}
while b:
r, a, b, = r|b, b, set().union(*map(subclassesof, b))
return r | a
classes = derivative_classes(object)
singles = None, NotImplemented, ...
od = collections.OrderedDict()
odtypes = iter(od), od.keys(), od.items(), od.values()
bltns = {cls for cls in classes if cls.__module__=='builtins'}
bltns-= get_types('builtins', 'types', '_collections_abc')
bltns-= {*map(type, odtypes)} | {*map(type, singles)}
for cls in sorted(bltns, key=vars(type)['__name__'].__get__):
print(f'# {sys.getrefcount(cls):4} {cls.__name__}')

# all of these are in _contextvars.__dict__ but have their 
__module__=='builtins':
#   25 Context
#   15 ContextVar
#   12 Token

# from _struct
#   23 Struct # IS in _struct.__dict__
#   11 unpack_iterator # no tp_new so make sense to leave as-is

# These are here because it's a mystery how they were included in the results
# without importing _testcapi:
#   25 hamt
#8 hamt_array_node
#8 hamt_bitmap_node
#8 hamt_collision_node

# no idea what these are:
#   11 items
#   11 values
#   11 keys

# these are all in _weakref.__dict__
#   76 weakcallableproxy
#   76 weakproxy
#   32 weakref

--
messages: 330544
nosy: bup
priority: normal
severity: normal
status: open
title: Incorrect __module__ attribute for _struct.Struct and perhaps a few 
others
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue35328] Set a environment variable for venv prompt

2018-11-27 Thread Anthony Sottile


Anthony Sottile  added the comment:

The current prompt works fine for me on zsh -- what's the bug here?

zsh $ virtualenv venv --prompt '(wat)'
Using real prefix 
'/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7'
New python executable in /private/tmp/venv/bin/python3.7
Also creating executable in /private/tmp/venv/bin/python
Installing setuptools, pip, wheel...done.
zsh $ . venv/bin/activate
(wat)zsh $

--
nosy: +Anthony Sottile

___
Python tracker 

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



[issue33029] Invalid function cast warnings with gcc 8 for getter and setter functions

2018-11-27 Thread miss-islington


miss-islington  added the comment:


New changeset 5ceb7018dc63fab96f81d05e62bbe704e9f10cb9 by Miss Islington (bot) 
in branch '3.7':
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
https://github.com/python/cpython/commit/5ceb7018dc63fab96f81d05e62bbe704e9f10cb9


--
nosy: +miss-islington

___
Python tracker 

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



Re: PEP 572 -- Assignment Expressions

2018-11-27 Thread Chris Angelico
On Wed, Nov 28, 2018 at 4:38 AM Ivo Shipkaliev  wrote:
>
>Hello.
>Maybe it's too late for a discussion, but I just couldn't resist.
>I just found out about this new ":=" operator. I need to ask:
>
>What is the need for this additional ":" to the "="?
>Why:
>  if (match := pattern.search(data)) is not None:
># Do something with match
>
>What is wrong with:
>  if match = pattern.search(data) is not None:
># Do something with match
>
>Assignment expression or assignment statement, it's an assignment,
> right? It is very clear to everyone that it's an assignment! Can't it all
> just be a "="?
>Thank you very much!

It's a bug magnet.

https://www.python.org/dev/peps/pep-0572/#why-not-just-turn-existing-assignment-into-an-expression

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33029] Invalid function cast warnings with gcc 8 for getter and setter functions

2018-11-27 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9997

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-11-27 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9996

___
Python tracker 

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



PEP 572 -- Assignment Expressions

2018-11-27 Thread Ivo Shipkaliev
   Hello.
   Maybe it's too late for a discussion, but I just couldn't resist.
   I just found out about this new ":=" operator. I need to ask:

   What is the need for this additional ":" to the "="?
   Why:
 if (match := pattern.search(data)) is not None:
   # Do something with match

   What is wrong with:
 if match = pattern.search(data) is not None:
   # Do something with match

   Assignment expression or assignment statement, it's an assignment,
right? It is very clear to everyone that it's an assignment! Can't it all
just be a "="?
   Thank you very much!


   Kind Regards
   Ivo Shipkaliev
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33029] Invalid function cast warnings with gcc 8 for getter and setter functions

2018-11-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9995

___
Python tracker 

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



[issue33029] Invalid function cast warnings with gcc 8 for getter and setter functions

2018-11-27 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset d4f9cf5545d6d8844e0726552ef2e366f5cc3abd by Serhiy Storchaka in 
branch 'master':
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
https://github.com/python/cpython/commit/d4f9cf5545d6d8844e0726552ef2e366f5cc3abd


--

___
Python tracker 

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



[issue35330] When using mock to wrap an existing object, side_effect requires return_value

2018-11-27 Thread Noam Yorav-Raphael


New submission from Noam Yorav-Raphael :

When using mock to wrap an existing object, and using side_effect to set a 
function to wrap a method, I would expect the wrapper function to be called 
instead of the wrapped function, and its return value to be returned. Instead, 
both the wrapper function and the wrapped functions are being called, and the 
return value of the wrapped function is returned.

If, in addition to side_effect, return_value is set, the return_value is 
ignored, but my expected behavior actually happens: only the wrapper function 
is called, and its return value is returned.

Python 3.7.0 (default, Aug 22 2018, 20:50:05)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from unittest import mock
>>> class MyClass(object):
... def func(self):
... print('func called')
... return 1
... 
>>> c = MyClass()
>>> m = mock.Mock(wraps=c)
>>> def func2():
... print('func2 called')
... return 2
... 
>>> m.func.side_effect = func2
>>> m.func()
func2 called
func called
1
>>> m.func.return_value = 3
>>> m.func()
func2 called
2

--
components: Library (Lib)
messages: 330540
nosy: noamraph
priority: normal
severity: normal
status: open
title: When using mock to wrap an existing object, side_effect requires 
return_value
type: behavior

___
Python tracker 

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



[issue35326] ctypes cast and from_address cause crash on Windows 10

2018-11-27 Thread Eryk Sun


Eryk Sun  added the comment:

The default function result type is c_int, which truncates a 64-bit pointer to 
32-bit. The attribute that needs to be set is singular restype, not plural 
restypes. Unfortunately ctypes objects have a dict, so you're not catching the 
typo in an obvious way.

Additional comments:

POINTER(c_ubyte).from_address(ptr) is not the same as cast(ptr, 
POINTER(c_ubyte)). The first one wrongly instantiates a pointer from the value 
at the ptr address instead of the address itself. If you want to use 
from_address, where ptr is a Python integer, a correct expression for this is 
POINTER(c_ubyte)(c_ubyte.from_address(ptr)).

I recommend using kernel32 = WinDLL('kernel32', use_last_error=True) instead of 
windll. This allows using ctypes.get_last_error() instead of 
kernel32.GetLastError(), which is especially more reliable when working in the 
REPL. It also avoids the problem with cached libraries on the global windll 
object, which can lead to prototype conflicts between libraries (e.g. if a 
script makes use of your library and another that uses the Windows API via 
ctypes, such as colorama), since libraries in turn cache function pointers.

--
nosy: +eryksun
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



Re: Error Python version 3.6 does not support this syntax.

2018-11-27 Thread Terry Reedy

On 11/27/2018 8:24 AM, Frank Millman wrote:

In the line 'return None',  it may be complaining that None is 
superfluous - a plain 'return' does the same thing.


PEP 8 recommends explicit 'return None' if elsewhere in the function 
there is an explicit 'return something', as in


if condition:
return makelist(args)
else:
return None

(though in the above, 'return []' might be better).  However, in the 
quoted code, there is no other return (this might be a bug).


--
Terry Jan Reedy


--
https://mail.python.org/mailman/listinfo/python-list


Re: Error Python version 3.6 does not support this syntax.

2018-11-27 Thread Terry Reedy

On 11/27/2018 7:50 AM, srinivasan wrote:

Dear Python Experts,

As still I am newbie and learning python, I am trying to reuse the
Bluetoothctl wrapper in Python from the link (
https://gist.github.com/egorf/66d88056a9d703928f93


Created in 2015


) I am using python3.6
version, In pycharm editor on the bold highlighted code snippets I see the
error message "Python version 3.6 does not support this syntax.",


No version of Python 3 supports the the old exception statement syntax.
Python 2.7, released in 2010, supports both the old and the new syntax. 
I am not sure about 2.6 and before.  It is odd to me that someone would 
use both the new print syntax and old except syntax together in 2015.



Could you please how help me how the below highlighted lines of code can be
can be ported to python3.6 version?

*except BluetoothctlError, e:*


If you run the code through the lib2to3 converter it will change ', ' to 
' as '.  I have not



Full Code snippet:


Not needed, however start_scan and make_discoverable are a bit flakey.
As written, out is discarded making the assignment to out useless and 
the 'return None' redundant (since the function always returns None).  I 
suspect that this is a bug.



 def start_scan(self):
 """Start bluetooth scanning process."""
 try:
 out = self.get_output("scan on")
 except BluetoothctlError, e:

print(e)return None

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list


[issue31512] Add non-elevated symlink support for dev mode Windows 10

2018-11-27 Thread Vidar Fauske


Vidar Fauske  added the comment:

Thanks! I addressed the comment, so hopefully this should be OK now.

--

___
Python tracker 

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



[issue33029] Invalid function cast warnings with gcc 8 for getter and setter functions

2018-11-27 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue35329] Documentation - capitalization issue

2018-11-27 Thread Hans Strijker


New submission from Hans Strijker :

In the documentation I noticed "from Package import specific_submodule". I 
recon package should be all lowercase in accordance with pep8.
(https://www.python.org/dev/peps/pep-0008/#package-and-module-names)

It may be far from the most important bug ever, but it's my first bug reported, 
and gotta start small... :-)

https://docs.python.org/3/tutorial/modules.html#importing-from-a-package

6.4.1. Importing * From a Package
...
Remember, there is nothing wrong with using from Package import 
specific_submodule! In fact, this is the recommended notation unless the 
importing module needs to use submodules with the same name from different 
packages.

--
assignee: docs@python
components: Documentation
messages: 330537
nosy: Strijker, docs@python
priority: normal
severity: normal
status: open
title: Documentation - capitalization issue
versions: Python 3.7

___
Python tracker 

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



[issue33029] Invalid function cast warnings with gcc 8 for getter and setter functions

2018-11-27 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



[issue35322] test_datetime leaks memory on Windows

2018-11-27 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

Correction: the fall-through in "else if (res == -3)" clause doesn't cause a 
memory leak, but still results in usage of uninitialized 'str'.

--

___
Python tracker 

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



[issue35328] Set a environment variable for venv prompt

2018-11-27 Thread Baptiste Darthenay


Change by Baptiste Darthenay :


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

___
Python tracker 

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



[issue34482] datetime: Tests for potential crashes due to non-UTF-8-encodable strings

2018-11-27 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

The added test exposed a leak in unicode_encode_locale(). See msg330534.

--

___
Python tracker 

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



[issue35322] test_datetime leaks memory on Windows

2018-11-27 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

This is because of a leak of 'wstr' at 
https://github.com/python/cpython/blob/1005c84535191a72ebb7587d8c5636a065b7ed79/Objects/unicodeobject.c#L3476
 .

There is another leak and usage of uninitialized 'str' because the following 
"else if" clause doesn't have a 'return' (probably due to copy-paste from 
unicode_decode_locale() in 3d4226a832cabc630402589cc671cc4035d504e5).

--
nosy: +izbyshev

___
Python tracker 

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



[issue35328] Set a environment variable for venv prompt

2018-11-27 Thread Baptiste Darthenay


New submission from Baptiste Darthenay :

When creating a new virtual env with `python3 -m venv .venv --prompt env`, the 
prompt information is only used to set a temporary PS1.

This information is lost when using custom prompt, for example with ZSH.

I propose to set VIRTUAL_ENV_PROMPT=__VENV_PROMPT__ when activating the newly 
created venv, to be used by tools and other shells.

--
messages: 330533
nosy: batisteo
priority: normal
severity: normal
status: open
title: Set a environment variable for venv prompt
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue35227] [RFE] tarfile: support adding file objects without prior known size

2018-11-27 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I came across this thread while working on the PR, creating tarinfo as Lars 
Gustäbel suggests does not work since you still need to get the size before 
reading.

Do you think the API should be different?

--

___
Python tracker 

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



[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I think this is a nice output, taking a quick look at unittest source, all the 
information needed to display this is save in the TestResult object, showing 
skipped tests is done here: 
https://github.com/python/cpython/blob/master/Lib/unittest/runner.py#L85

It seems to me that the change would not be very hard to add.

--

___
Python tracker 

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



[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Paul Ganssle

Paul Ganssle  added the comment:

@Rémi Interesting. Your suggested output does look clearer than the existing 
one, but it still doesn't indicate that anything *passed*. I think I like the 
way pytest does it the best, but if we can't expose the subtests as separate 
tests, I'd probably want it to be more like this:

test_something (test2.SomeTest) ... ok (3 subtests skipped)
test_something [2] skipped 'Not supported'
test_something [3] skipped 'Not supported'
test_something [4] skipped 'Not supported'

--

___
Python tracker 

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



[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Did you notice that `skipped 'Not supported'` will be displayed once per 
skipped subtest so changing your `for i in range(1, 3):` by `for i in range(1, 
5):` will show:

python3 -m unittest -v
test_something (test2.SomeTest) ... skipped 'Not supported'
skipped 'Not supported'
skipped 'Not supported'


Do you think it should show something like:

python3 -m unittest -v
test_something (test2.SomeTest) ... SubTest skipped 'Not supported'
SubTest skipped 'Not supported'
SubTest skipped 'Not supported'
?

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Paul Ganssle


Paul Ganssle  added the comment:

As "prior art" the way that pytest does this is to have parametrized tests show 
up as separate tests:

import pytest

@pytest.mark.parametrize("i", range(1, 3))
def test_something(i):
if i > 1:
pytest.skip('Not supported')
assert i == 1

@pytest.mark.parametrize("i", range(1, 3))
def test_something_else(i):
assert 3 > i >= 1


Running `pytest -v` for this gives:


=== test session starts 

platform linux -- Python 3.7.1, pytest-4.0.1, py-1.7.0, pluggy-0.8.0
cachedir: .pytest_cache
rootdir: /tmp/test_mod, inifile:
collected 4 items   
   

test_mod.py::test_something[1] PASSED   
 [ 25%]
test_mod.py::test_something[2] SKIPPED  
 [ 50%]
test_mod.py::test_something_else[1] PASSED  
 [ 75%]
test_mod.py::test_something_else[2] PASSED  
 [100%]

=== 3 passed, 1 skipped in 0.01 seconds 


--

___
Python tracker 

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



[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Paul Ganssle


New submission from Paul Ganssle :

It seems that if you call skipTest *anywhere* in a test function, even in a 
subTest, the *entire* function gets marked as "skipped", even if only one 
sub-test is skipped.

Example:

import unittest

class SomeTest(unittest.TestCase):
def test_something(self):
for i in range(1, 3):
with self.subTest(i):
if i > 1:
self.skipTest('Not supported')

self.assertEqual(i, 1)

If you run `python3.7 -m unittest -v` on this, you get:

$ python -m unittest -v
test_something (test_mod.SomeTest) ... skipped 'Not supported'

--
Ran 1 test in 0.000s

OK (skipped=1)


Despite the fact that the test *was* run in the `i == 1` case. Similarly, 
pytest marks this as a single skipped test:

= test session starts ===

platform linux -- Python 3.7.1, pytest-4.0.1, py-1.7.0, pluggy-0.8.0
rootdir: /tmp/test_mod, inifile:
collected 1 item

test_mod.py s   [100%]

= 1 skipped in 0.00 seconds =


The solution to this is not obvious, unfortunately. One way to solve it would 
be to have each subtest considered a "separate test". Another would be to 
detect whether subTests have been skipped and expose only the *skipped* tests 
as separate tests. You could also add a "partially skipped" marker, so to say, 
"Some parts of this were skipped"

I suspect the right answer is some combination of these three answers - 
possibly adding an extra-verbose mode that splits out all sub tests and having 
skipped subTests default to being displayed separately.

Somewhat related to issue #30997.

--
components: Tests
messages: 330527
nosy: ezio.melotti, michael.foord, p-ganssle, rbcollins
priority: normal
severity: normal
status: open
title: Using skipTest with subTest gives a misleading UI.
versions: Python 3.6, 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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset 62be74290aca26d16f3f55ece7ff6dad14e60e8d by Serhiy Storchaka in 
> branch 'master':
> bpo-33012: Fix invalid function cast warnings with gcc 8. (GH-6749)

I still get something 100 warnings with GCC 8.2.1 on Fedora 29. I wrote PR 
10744 to add a macro to cast a function pointer.

I chose to add a macro, so it will be easier to spot where we cast function 
pointers and change the implementation (cast) if needed at a single place.

--

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-11-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9991

___
Python tracker 

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



[issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var

2018-11-27 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

Got it. Thanks for the pointer.

--

___
Python tracker 

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



[issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var

2018-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

"What’s New In Python 3.7" mentions twice "build reproducibility":
https://docs.python.org/dev/whatsnew/3.7.html

--

___
Python tracker 

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



[issue34022] 6 tests fail using SOURCE_DATE_EPOCH env var

2018-11-27 Thread Chih-Hsuan Yen


Chih-Hsuan Yen  added the comment:

Looks like in https://github.com/python/cpython/pull/10327, Serhiy Storchaka 
considers fixing these issues for 3.8 only - "It is easier to skip the test on 
3.7." and then remove the "needs backport to 3.7" label. How about changing the 
target version to 3.8 only and close this issue?

--

___
Python tracker 

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



[issue34100] Same constants in tuples are not merged while compile()

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

merge_consts_recursive(): rather than modifying the 'key' tuple, would it make 
sense to *add* the new key to the cache?

--

___
Python tracker 

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



[issue34100] Same constants in tuples are not merged while compile()

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1005c84535191a72ebb7587d8c5636a065b7ed79 by Victor Stinner in 
branch 'master':
bpo-34100: Partially revert merge_consts_recursive() (GH-10743)
https://github.com/python/cpython/commit/1005c84535191a72ebb7587d8c5636a065b7ed79


--

___
Python tracker 

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



[issue33930] Segfault with deep recursion into object().__dir__

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

-_PyObject_GC_UNTRACK(m);
+PyObject_GC_UnTrack(m);

Can someone please explain me why this change has any impact? Does it mean that 
_PyObject_GC_UNTRACK() macro has a bug?

The function is quite straighforward :-)

void
PyObject_GC_Track(void *op)
{
_PyObject_GC_TRACK(op);
}

--

___
Python tracker 

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



[issue34100] Same constants in tuples are not merged while compile()

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:

> New changeset c2e1607a51d7a17f143b5a34e8cff7c6fc58a091 by Miss Islington 
> (bot) (INADA Naoki) in branch 'master'

This change introduced a lot of memory leaks (reference leaks):
https://buildbot.python.org/all/#/builders/1/builds/422

The following change fix "make && ./python -m test -R 3:3 test_code":

diff --git a/Python/compile.c b/Python/compile.c
index acb5cfe29b..cb3e73740d 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1277,6 +1277,7 @@ merge_consts_recursive(struct compiler *c, PyObject *o)
 else {
 u = k;
 }
+Py_DECREF(k);
 Py_INCREF(u);
 PyTuple_SET_ITEM(tuple, i, u);
 i++;
@@ -1288,6 +1289,7 @@ merge_consts_recursive(struct compiler *c, PyObject *o)
 Py_DECREF(key);
 return NULL;
 }
+Py_DECREF(PyTuple_GET_ITEM(key, 1));
 PyTuple_SET_ITEM(key, 1, new);
 }
 

But I dislike the frozenset branch of merge_consts_recursive(): modifying a 
tuple is a bad idea. For example, if you replace PyTuple_SET_ITEM() with 
PyTuple_SetItem(), you get a PyErr_BadInternalCall() because the reference 
count is greater than 1.

I don't see how to rewrote properly the code, so I reverted (removed) it to let 
someone else fix the code: PR 10743.

--

___
Python tracker 

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



[issue34100] Same constants in tuples are not merged while compile()

2018-11-27 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +9990

___
Python tracker 

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



[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator

2018-11-27 Thread STINNER Victor

STINNER Victor  added the comment:

Serhiy Storchaka:
"""
Objects/unicodeobject.c: In function ‘_PyUnicode_FastFill’:
Objects/unicodeobject.c:10126:24: warning: passing argument 2 of ‘unicode_fill’ 
discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
"""

Yeah, I was aware of the warning. I had a local branch but I started to make 
many unrelated changes and so I lost track of the issue :-)

The warning should now be fixed. Thanks for the report.

Note: it was a real bug which exists since at least Python 3.6 ;-)

--

___
Python tracker 

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



[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 54fa83e0a3f3b077763cb50705d7a7dbe4a40a4a by Victor Stinner in 
branch '3.6':
bpo-33954: Rewrite FILL() macro of unicodeobject.c (GH-10740)
https://github.com/python/cpython/commit/54fa83e0a3f3b077763cb50705d7a7dbe4a40a4a


--

___
Python tracker 

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



Re: Error Python version 3.6 does not support this syntax.

2018-11-27 Thread Frank Millman
"srinivasan"  wrote in message 
news:cafstbwec-ww7agrwtotk5z8fhlrfa1hocoobkv7bcyds1be...@mail.gmail.com...


As still I am newbie and learning python, I am trying to reuse the

Bluetoothctl wrapper in Python from the link (
https://gist.github.com/egorf/66d88056a9d703928f93) I am using python3.6
version, In pycharm editor on the bold highlighted code snippets I see the
error message "Python version 3.6 does not support this syntax.",


Could you please how help me how the below highlighted lines of code can 
be

can be ported to python3.6 version?



*except BluetoothctlError, e:*

*print(e)*
*return None*

Here is a quick, untested, reply. If it does not work for you, please post 
again with the output.


The correct syntax for Python 3.x is

   except BluetoothctlError as e:

The line 'print(e)' should then work.

In the line 'return None',  it may be complaining that None is superfluous - 
a plain 'return' does the same thing.


HTH

Frank Millman


--
https://mail.python.org/mailman/listinfo/python-list


Re: Error Python version 3.6 does not support this syntax.

2018-11-27 Thread Brian Oney via Python-list
On Tue, 2018-11-27 at 13:50 +0100, srinivasan wrote:
> 
> *except BluetoothctlError, e:*
> 
I don't have python3.6 available, but I believe the proper syntax is:

except BluetoothctlError as e:
print(e)

See:
https://docs.python.org/3/tutorial/errors.html?highlight=exception


HTW
-- 
https://mail.python.org/mailman/listinfo/python-list


Error Python version 3.6 does not support this syntax.

2018-11-27 Thread srinivasan
Dear Python Experts,

As still I am newbie and learning python, I am trying to reuse the
Bluetoothctl wrapper in Python from the link (
https://gist.github.com/egorf/66d88056a9d703928f93) I am using python3.6
version, In pycharm editor on the bold highlighted code snippets I see the
error message "Python version 3.6 does not support this syntax.",

Could you please how help me how the below highlighted lines of code can be
can be ported to python3.6 version?

*except BluetoothctlError, e:*

*print(e)*
*return None*

Full Code snippet:
==

import time
import pexpect
import subprocess
import sys

class BluetoothctlError(Exception):
"""This exception is raised, when bluetoothctl fails to start."""
pass

class Bluetoothctl:
"""A wrapper for bluetoothctl utility."""

def __init__(self):
out = subprocess.check_output("rfkill unblock bluetooth", shell =
True)
self.child = pexpect.spawn("bluetoothctl", echo = False)

def get_output(self, command, pause = 0):
"""Run a command in bluetoothctl prompt, return output as a list of
lines."""
self.child.send(command + "\n")
time.sleep(pause)
start_failed = self.child.expect(["bluetooth", pexpect.EOF])

if start_failed:
raise BluetoothctlError("Bluetoothctl failed after running " +
command)

return self.child.before.split("\r\n")

def start_scan(self):
"""Start bluetooth scanning process."""
try:
out = self.get_output("scan on")


*except BluetoothctlError, e:print(e)return
None*

def make_discoverable(self):
"""Make device discoverable."""
try:
out = self.get_output("discoverable on")



*   except BluetoothctlError, e:print(e)return
None*
def parse_device_info(self, info_string):
"""Parse a string corresponding to a device."""
device = {}
block_list = ["[\x1b[0;", "removed"]
string_valid = not any(keyword in info_string for keyword in
block_list)

if string_valid:
try:
device_position = info_string.index("Device")
except ValueError:
pass
else:
if device_position > -1:
attribute_list = info_string[device_position:].split("
", 2)
device = {
"mac_address": attribute_list[1],
"name": attribute_list[2]
}

return device

def get_available_devices(self):
"""Return a list of tuples of paired and discoverable devices."""
try:
out = self.get_output("devices")


*except BluetoothctlError, e:print(e)return
None*
else:
available_devices = []
for line in out:
device = self.parse_device_info(line)
if device:
available_devices.append(device)

return available_devices

def get_paired_devices(self):
"""Return a list of tuples of paired devices."""
try:
out = self.get_output("paired-devices")


*except BluetoothctlError, e:print(e)return
None*
else:
paired_devices = []
for line in out:
device = self.parse_device_info(line)
if device:
paired_devices.append(device)

return paired_devices

def get_discoverable_devices(self):
"""Filter paired devices out of available."""
available = self.get_available_devices()
paired = self.get_paired_devices()

return [d for d in available if d not in paired]

def get_device_info(self, mac_address):
"""Get device info by mac address."""
try:
out = self.get_output("info " + mac_address)


*except BluetoothctlError, e:print(e)return
None*
else:
return out

def pair(self, mac_address):
"""Try to pair with a device by mac address."""
try:
out = self.get_output("pair " + mac_address, 4)


*except BluetoothctlError, e:print(e)return
None*
else:
res = self.child.expect(["Failed to pair", "Pairing
successful", pexpect.EOF])
success = True if res == 1 else False
return success

def remove(self, mac_address):
"""Remove paired device by mac address, return success of the
operation."""
try:
out = self.get_output("remove " + mac_address, 3)


*except BluetoothctlError, e:print(e)return
None*
else:
res = self.child.expect(["not available", "Device has been
removed", pexpect.EOF])
success = True if res == 1 else False
return 

[issue33930] Segfault with deep recursion into object().__dir__

2018-11-27 Thread Gus Goulart


Gus Goulart  added the comment:

After a couple of rounds, this is the benchmark result I got for the attached 
patch. It seems to be a simple, non-performance degrading fix.

 python -m perf compare_to origin.json patch.json -G --min-speed=2
Slower (1):
- sqlalchemy_declarative: 213 ms +- 4 ms -> 219 ms +- 9 ms: 1.03x slower (+3%)

Faster (9):
- logging_format: 15.1 us +- 0.3 us -> 14.5 us +- 0.3 us: 1.05x faster (-5%)
- hexiom: 15.0 ms +- 0.5 ms -> 14.5 ms +- 0.2 ms: 1.03x faster (-3%)
- json_loads: 39.6 us +- 0.7 us -> 38.5 us +- 0.5 us: 1.03x faster (-3%)
- json_dumps: 17.2 ms +- 0.4 ms -> 16.7 ms +- 0.2 ms: 1.03x faster (-3%)
- fannkuch: 634 ms +- 4 ms -> 619 ms +- 6 ms: 1.02x faster (-2%)
- django_template: 183 ms +- 3 ms -> 178 ms +- 5 ms: 1.02x faster (-2%)
- float: 153 ms +- 2 ms -> 150 ms +- 1 ms: 1.02x faster (-2%)
- raytrace: 761 ms +- 19 ms -> 745 ms +- 8 ms: 1.02x faster (-2%)
- regex_effbot: 3.69 ms +- 0.06 ms -> 3.61 ms +- 0.05 ms: 1.02x faster (-2%)

Benchmark hidden because not significant (47): 2to3, chaos, crypto_pyaes, 
deltablue, dulwich_log, go, html5lib, logging_silent, logging_simple, mako, 
meteor_contest, nbody, nqueens, pathlib, pickle, pickle_dict, pickle_list, 
pickle_pure_python, pidigits, python_startup, python_startup_no_site, 
regex_compile, regex_dna, regex_v8, richards, scimark_fft, scimark_lu, 
scimark_monte_carlo, scimark_sor, scimark_sparse_mat_mult, spectral_norm, 
sqlalchemy_imperative, sqlite_synth, sympy_expand, sympy_integrate, sympy_sum, 
sympy_str, telco, tornado_http, unpack_sequence, unpickle, unpickle_list, 
unpickle_pure_python, xml_etree_parse, xml_etree_iterparse, xml_etree_generate, 
xml_etree_process

--
keywords: +patch
Added file: https://bugs.python.org/file47952/bpo-33930.patch

___
Python tracker 

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



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread miss-islington


miss-islington  added the comment:


New changeset b59fc311609aadaafaae68240127b4997b85859d by Miss Islington (bot) 
in branch '3.6':
bpo-35317: Fix mktime() error in test_email (GH-10721)
https://github.com/python/cpython/commit/b59fc311609aadaafaae68240127b4997b85859d


--

___
Python tracker 

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



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread miss-islington


miss-islington  added the comment:


New changeset d669154ee52048f98ac63ba177f3fd1cf62f0174 by Miss Islington (bot) 
in branch '3.7':
bpo-35317: Fix mktime() error in test_email (GH-10721)
https://github.com/python/cpython/commit/d669154ee52048f98ac63ba177f3fd1cf62f0174


--
nosy: +miss-islington

___
Python tracker 

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



[issue33029] Invalid function cast warnings with gcc 8 for getter and setter functions

2018-11-27 Thread Siddhesh Poyarekar


Siddhesh Poyarekar  added the comment:

Sorry I haven't had time to look into this since and it doesn't look like I'll 
be able to get to it in the next couple of weeks.  I had a couple of patches in 
the github fork but they're pretty outdated and probably not even correct.

If nobody gets to it by Christmas holidays, I'll give it a shot.

--

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 480833808e918a1dcebbbcfd07d5a8de3c5c2a66 by Victor Stinner in 
branch 'master':
bpo-35134: Update "make tags": add Include/cpython/ (GH-10739)
https://github.com/python/cpython/commit/480833808e918a1dcebbbcfd07d5a8de3c5c2a66


--

___
Python tracker 

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



[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7f9fb0f34555641722be5468b7fbd53dd3c0f1e2 by Victor Stinner in 
branch '3.7':
bpo-33954: Rewrite FILL() macro of unicodeobject.c (GH-10738)
https://github.com/python/cpython/commit/7f9fb0f34555641722be5468b7fbd53dd3c0f1e2


--

___
Python tracker 

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



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9989

___
Python tracker 

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



[issue33954] float.__format__('n') fails with _PyUnicode_CheckConsistency assertion error for locales with non-ascii thousands separator

2018-11-27 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 163403a63e9272fcd14707e344122c2e3c5e0244 by Victor Stinner in 
branch 'master':
bpo-33954: Fix compiler warning in _PyUnicode_FastFill() (GH-10737)
https://github.com/python/cpython/commit/163403a63e9272fcd14707e344122c2e3c5e0244


--

___
Python tracker 

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



[issue35317] test_email: test_localtime_daylight_false_dst_true() fails depending on the timezone

2018-11-27 Thread miss-islington


Change by miss-islington :


--
pull_requests: +9988

___
Python tracker 

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



  1   2   >