[issue34029] tkinter.filedialog.askdirectory() crashing before dialog opens when importing pywinauto

2018-07-05 Thread Tal Einat


Tal Einat  added the comment:

Confirmed with Python 3.6.3 on Windows 10 64-bit: It hangs showing an empty 
window.

Debugging a bit, the hang happens in Lib/tkinter/commondialog.py, line 43:

s = w.tk.call(self.command, *w._options(self.options)) 

The value of self.command is 'tk_chooseDirectory', and w._options(self.options) 
just gives an empty tuple, so the actual call is:

s = w.tk.call('tk_chooseDirectory', ())

This means that the hang is within w.tk.call().

I'd follow this up with the pywinauto devs. To me this doesn't seem like 
something wrong with the tkinter module.

--
nosy: +taleinat

___
Python tracker 

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



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang


New submission from Windson Yang :

Just like callable() method in 
https://docs.python.org/3/library/functions.html#callable

> ...instances are callable if their class has a __call__() method.

I think we should also mention this in abs(),

abs(x)
Return the absolute value of a number. If x defines __abs__, abs(x) returns 
x.__abs__(). The argument may be an integer or a floating point number. If the 
argument is a complex number, its magnitude is returned.

--
components: Library (Lib)
messages: 321080
nosy: Windson Yang
priority: normal
severity: normal
status: open
title: abs() method accept argument that implement __abs__()
type: enhancement
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



[issue33955] Implement PyOS_CheckStack on macOS using pthread_get_stack*_np

2018-07-05 Thread Dong-hee Na


Dong-hee Na  added the comment:

benchmark result:

22.63911402298 secs  master (+0%)
22.806662271 secs PR 8046 (-0.74%)

def fib(n):
if n == 0:
return 0
if n == 1:
return 1
return fib(n-2) + fib(n-1)

if __name__ == '__main__':
import timeit
print(timeit.timeit("fib(10)", setup="from __main__ import fib"))

--

___
Python tracker 

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



[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +7701

___
Python tracker 

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



[issue34050] Broken links to "OpenSSL cipher list format" in documentation

2018-07-05 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for your report. Do you want to work on a patch, too?

--
keywords: +easy
nosy: +christian.heimes
stage:  -> needs patch
versions: +Python 2.7, 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



[issue34050] Broken links to "OpenSSL cipher list format" in documentation

2018-07-05 Thread Roland Weber


Roland Weber  added the comment:

I'm afraid I don't have the time to work on a patch.

--

___
Python tracker 

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



[issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7

2018-07-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

We have some similar failures on the x86 Gentoo Refleaks 3.7 buildbots:

http://buildbot.python.org/all/#/builders/114/builds/157/steps/4/logs/stdio
http://buildbot.python.org/all/#/builders/114/builds/155/steps/4/logs/stdio
--
Ran 310 tests in 249.377s
OK (skipped=30)
.
test_multiprocessing_spawn leaked [1, 2, 2] memory blocks, sum=5
1 test failed again:
test_multiprocessing_spawn
== Tests result: FAILURE then FAILURE ==

It seems that is due to a high load on the buildbot but I am surprised that 
this is not mitigated after PR 8059.

--
nosy: +pablogsal

___
Python tracker 

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



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

This is a reasonable request.  Would you like to make a PR?

--
nosy: +rhettinger

___
Python tracker 

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



[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7700

___
Python tracker 

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



[issue34051] Update multiprocessing example

2018-07-05 Thread Windson Yang


New submission from Windson Yang :

The docs at 
https://docs.python.org/3.8/library/multiprocessing.html#synchronization-between-processes
 give an example:

from multiprocessing import Process, Lock

def f(l, i):
l.acquire()
try:
print('hello world', i)
finally:
l.release()

if __name__ == '__main__':
lock = Lock()

for num in range(10):
Process(target=f, args=(lock, num)).start()

and point out "For instance one can use a lock to ensure that only one process 
prints to standard output at a time...". I'm not sure this is a good enough 
example for the reader. The reader can't tell the difference between the 
function with l.acquire() or not, The output just shows in the terminal at the 
same time. So I think a better idea just add time.sleep(0.1) before 
print('hello world', i) like this:

l.acquire()
try:
# do something here
# time.sleep(0.1)
print('hello world', i)

I can provide a pr if you guys like this idea.

--
assignee: docs@python
components: Documentation
messages: 321088
nosy: Windson Yang, docs@python
priority: normal
severity: normal
status: open
title: Update multiprocessing example
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



[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread miss-islington


miss-islington  added the comment:


New changeset 3f121a40c7526aedb2a40a1be8f0ae96b267bf26 by Miss Islington (bot) 
in branch '3.7':
bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336)
https://github.com/python/cpython/commit/3f121a40c7526aedb2a40a1be8f0ae96b267bf26


--

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-05 Thread Kay Hayen


Kay Hayen  added the comment:

Just to confirm, this is also happening on Windows as well, with both 32 and 64 
bits.

--

___
Python tracker 

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



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang


Change by Windson Yang :


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

___
Python tracker 

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



[issue34050] Broken links to "OpenSSL cipher list format" in documentation

2018-07-05 Thread Roland Weber


New submission from Roland Weber :

The docs for SSLContext.set_ciphers [1] in Python 3 and ssl.wrap_socket [2] in 
Python 2 contain a link for "OpenSSL cipher list format", which points to an 
empty wiki page at 
https://wiki.openssl.org/index.php/Manual:Ciphers(1)#CIPHER_LIST_FORMAT

The OpenSSL cipher list format is currently documented here instead:
https://www.openssl.org/docs/manmaster/man1/ciphers.html

[1] https://docs.python.org/3/library/ssl.html#ssl.SSLContext.set_ciphers
[2] https://docs.python.org/2/library/ssl.html#ssl.wrap_socket

--
assignee: docs@python
components: Documentation
messages: 321085
nosy: docs@python, rolweber
priority: normal
severity: normal
status: open
title: Broken links to "OpenSSL cipher list format" in documentation

___
Python tracker 

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



[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset fc05e68d8fac70349b7ea17ec14e7e0cfa956121 by Serhiy Storchaka in 
branch 'master':
bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336)
https://github.com/python/cpython/commit/fc05e68d8fac70349b7ea17ec14e7e0cfa956121


--

___
Python tracker 

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



[issue34053] Support localization of unicode descriptions

2018-07-05 Thread Pander

New submission from Pander :

Please, support localization for Unicode block description and character 
description.

Translations are available from 
https://github.com/unicode-table/unicode-table-data/tree/master/loc If 
possible, use a gettext approach similar to https://pypi.org/project/pycountry/

Implementing this feature will allow users to read Unicode descriptions in 
their own language, other than English.

For example, now is possible only in English:

from unicodedata import name
print(name('ß'))
LATIN SMALL LETTER SHARP S

So unicodedata could provide a way to translate LATIN SMALL LETTER SHARP S to 
e.g. German with:

from unicodedata import name, LOCALED_DIR
from gettext import translation
german = translation('UnicodeData' LOCALED_DIR, languages=['de'])
german.install()
print(_(name('ß')))
LATEINISCHER KLEINBUCHSTABE SCHARFES S

and something similar for unicodedata.category

--
components: Unicode
messages: 321095
nosy: PanderMusubi, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: Support localization of unicode descriptions
type: enhancement
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



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-07-05 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
nosy: +ghaering, 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



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang


Windson Yang  added the comment:

I'd love to. (BTW, @rhettinger I just watched your fantastic multiprocessing 
tutorial. :D)

--

___
Python tracker 

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



[issue1327594] Static Windows Build fails to locate existing installation

2018-07-05 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 9720f60f2aba457121bfe42d09aa3ed91f28b86f by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-33720: Improve tests for the stack overflow in marshal.loads(). 
(GH-7336). (GH-8107)
https://github.com/python/cpython/commit/9720f60f2aba457121bfe42d09aa3ed91f28b86f


--

___
Python tracker 

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



[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread miss-islington


miss-islington  added the comment:


New changeset 878c4fe40e8954372e9bf80ae555045ecae68e73 by Miss Islington (bot) 
in branch '3.6':
bpo-33720: Improve tests for the stack overflow in marshal.loads(). (GH-7336)
https://github.com/python/cpython/commit/878c4fe40e8954372e9bf80ae555045ecae68e73


--

___
Python tracker 

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



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-07-05 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


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

___
Python tracker 

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



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Windson Yang


Change by Windson Yang :


--
assignee:  -> docs@python
components: +Documentation -Library (Lib)
nosy: +docs@python

___
Python tracker 

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



[issue33720] test_marshal: crash in Python 3.7b5 on Windows 10

2018-07-05 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7699

___
Python tracker 

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



[issue34052] sqlite's create_function() raises exception on unhashable callback, but creates function

2018-07-05 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

In [1]: import sqlite3

In [2]: con = sqlite3.connect(':memory:')

In [3]: con.execute('SELECT f()')
---
OperationalError  Traceback (most recent call last)
 in ()
> 1 con.execute('SELECT f()')

OperationalError: no such function: f

In [4]: con.create_function('f', 0, [])
---
TypeError Traceback (most recent call last)
 in ()
> 1 con.create_function('f', 0, [])

TypeError: unhashable type: 'list'

In [5]: con.execute('SELECT f()')
---
OperationalError  Traceback (most recent call last)
 in ()
> 1 con.execute('SELECT f()')

OperationalError: user-defined function raised exception


It seems that something like this cause segmentation fault, but I can't 
reproduce it.
Some other similar sqlite functions also affected. They can be easily modified 
to accept unhashable objects, but probably it should be done in another issue.

--
components: Extension Modules
messages: 321094
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: sqlite's create_function() raises exception on unhashable callback, but 
creates function
type: behavior
versions: Python 2.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



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

2018-07-05 Thread simon


simon  added the comment:

Thanks 

I have found teh root cause of the problem ...

--with-openssl=[my_dir]

The configure scripts has an assumption you are compiling against a binary 
packaged version of openssl and that there is a /lib folder under [my_dir]. 
This simply does not exist under any of the source code releases of openssl. So 
after I compiled the openssl source code I had to create the lib folder under 
my openssh build directory and symlink the *.so libraries there for the 
configure script to work

This is still an issue even if you edit Setup correctlty to compile the module.

>> This is a problem for people like me who are institutional users that have 
>> cross platform enterprise softwre deployment platforms (e.g. BladeLogic). 
>> There are restricted policies on what packages you can install on a server. 
>> In most cases especially for in house developed software) you need to build 
>> all dependencies seperatly and bundle them into a package (e.g. /opt RPM) 
>> that includes all required depencencies rather than rely on distribution 
>> library packages that are hard to manage at an Enterprise level and where 
>> you may be sharing the same OS.


To make the code more robust should it not 1st check under the root of [my_dir] 
before assuming [my_dir]/lib exests or at least report teh full path with the 
/lib added onto teh end of {my_dir} so you know where confiure has gone wrong ?

Is this not a fair expectation?

no lib folder
checking for openssl/ssl.h in /home/BD7046/openssl... no
checking whether compiling and linking against OpenSSL works... no

with lib folder
checking for openssl/ssl.h in /home/BC7046/openssl... yes
checking whether compiling and linking against OpenSSL works... yes


Thanks for all your help 
#PortingPerltoPython

--

___
Python tracker 

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



[issue33735] test_multiprocessing_spawn leaked [1, 2, 1] memory blocks on AMD64 Windows8.1 Refleaks 3.7

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:

Ok ok, let me be honest with myself, my *workaround* change is not reliable :-)

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue34053] Support localization of unicode descriptions

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:

> Thanks, posted it at 
> https://groups.google.com/forum/#!topic/python-ideas/g2jj4WRVDFA

Thanks!

--

___
Python tracker 

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



[issue1327594] Static Windows Build fails to locate existing installation

2018-07-05 Thread Steve Dower


Steve Dower  added the comment:

Not sure, though I have thought about it a bit. And as with the embeddable 
package, I wouldn't want it finding a global install anyway. So this probably 
isn't an issue. (I'm pretty sure I also changed the version string to be 
statically initialised, so maybe this is fixed?)

--

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I ran git bisect with @Serhiy reproducer and it yielded commit 
3929499914d47365ae744df312e16da8955c90ac as the first bad commit that has this 
problem. I did not look more into that but the bisect is reproducible (yields 
the same commit if you run it several times).

--
nosy: +pablogsal

___
Python tracker 

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



[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-07-05 Thread Charalampos Stratakis


Charalampos Stratakis  added the comment:

Matej is this about Python 2? Because the solution didn't actually work for 
Python 2 and on Fedora we had to implement a workaround [0]. Unfortunately 
there weren't enough free cycles so far to investigate further.

[0] 
https://src.fedoraproject.org/rpms/python2/c/3056bfd92a4269ad8f9b57cab05af3125e87ca8c?branch=master

--

___
Python tracker 

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



[issue34053] Support localization of unicode descriptions

2018-07-05 Thread Pander


Pander  added the comment:

Thanks, posted it at 
https://groups.google.com/forum/#!topic/python-ideas/g2jj4WRVDFA

--

___
Python tracker 

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



[issue33941] datetime.strptime not able to recognize invalid date formats

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
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

2018-07-05 Thread Christian Heimes


Christian Heimes  added the comment:

autoconf's --with-library options typically don't support build directories and 
work with installed versions only. The --with-openssl is no different. I 
suggest that you install OpenSSL to a local directory and then configure Python 
to fetch OpenSSL from that directory.

The multissltest script in Tools/ssl uses that approach to build Python with 
multiple OpenSSL versions.

--

___
Python tracker 

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



[issue34053] Support localization of unicode descriptions

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:

I don't think that such feature belongs to the stdlib. I suggest you to start a 
project on PyPI and comes back once the module is popular enough to justify to 
be added to the stdlib.

Moreover, IMHO python-ideas is a better place, than this bug tracker, to 
propose to idea.

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



[issue29097] [Windows] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2018-07-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

I believe this can be consolidated with #15873 and closed, since that is 
finished and available in Python 3.7.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue13305] datetime.strftime("%Y") not consistent for years < 1000

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue22005] datetime.__setstate__ fails decoding python2 pickle

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue33627] test-complex of test_numeric_tower.test_complex() crashes intermittently on Ubuntu buildbots

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see the bug since at least one month. I close the issue.

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

___
Python tracker 

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



[issue33701] test_datetime crashed (SIGSEGV) on Travis CI

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:

I didn't see the bug since at least one month. I close the issue.

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

___
Python tracker 

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



[issue34054] multiprocessing should use time.monotonic() for timeout

2018-07-05 Thread STINNER Victor


New submission from STINNER Victor :

In different functions, the multiprocessing module uses the system clock: 
time.time(). The system clock can be updated manually by the system 
administrator or automatically by NTP (for example).

Attached PR modifies multiprocessing to use time.monotonic() instead to not be 
affected by system clock changes.

time.monotonic() is always available since Python 3.5. See also the PEP 418.

--
components: Library (Lib)
messages: 321115
nosy: vstinner
priority: normal
severity: normal
status: open
title: multiprocessing should use time.monotonic() for timeout
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



[issue10381] Add timezone support to datetime C API

2018-07-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

This can be closed now, I think.

--

___
Python tracker 

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



[issue23607] Inconsistency in datetime.utcfromtimestamp(Decimal)

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue12750] add cross-platform support for %s strftime-format code

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue25729] update pure python datetime.timedelta creation

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2018-07-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

Oops, that previous comment was intended for a completely different ticket. My 
mistake.

--

___
Python tracker 

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



[issue30155] Add ability to get/set tzinfo on datetime instances in C API

2018-07-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

Hmm. I never noticed this. In the past I have used the (undocumented) 
PyDateTimeAPI struct, which the official macros wrap. I'm not sure how official 
that struct is considering it doesn't show up in the documentation.

I agree that it should be possible to construct TZ-aware datetimes using the 
official C API, so I guess the question is whether to add a bunch more macros 
or document the existing struct.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue10381] Add timezone support to datetime C API

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:

I tested manually "./python -m test test_datetime test_datetime" in 3.6, 3.7 
and master branches: I confirm that the test no longer crash. It has been fixed 
by the commit 58dc03c737a71de93edef7723c9f6186116288ef.

Moreover, I don't recall a recent crash on Windows Refleak or Gentoo Refleak 
buildbots.

Thanks again Paul Ganssle for this nice enhancement!

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



[issue15443] datetime module has no support for nanoseconds

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue33381] Incorrect documentation for strftime()/strptime() format code %f

2018-07-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

I don't believe this is a duplicate if #32267, which is actually about the %z 
directive.

I think the implementation here is correct and the documentation is 
semi-correct, it depends on how you look at it, consider:

>>> datetime(2018, 1, 1, 0, 0, 0, 1).strftime('%f')
'01'

>>> datetime(2018, 1, 1, 0, 0, 0, 10).strftime('%f')
'10'

In the first case "1" got expanded to "01" and "10" was printed as-is. 
However, when you interpret it as being *after* the decimal point, you would 
consider the first one to not be zero-padded at all and the second one to be 
zero-padded on the right.

I think the documentation can just be changed to "zero-padded to 6 digits" 
without specifying left or right.

--

___
Python tracker 

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



[issue9305] Don't use east/west of UTC in date/time documentation

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue28730] __reduce__ not being called in dervied extension class from datetime.datetime

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue34054] multiprocessing should use time.monotonic() for timeout

2018-07-05 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2018-07-05 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg32

___
Python tracker 

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



[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2018-07-05 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg321110

___
Python tracker 

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



[issue34023] timedelta(seconds=x) strange results when type(x) == np.int32

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue6280] calendar.timegm() belongs in time module, next to time.gmtime()

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue31839] datetime: add method to parse isoformat() output

2018-07-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

This is a duplicate of #15873 and #24954 and can be closed, as 
`fromisoformat()` was added in Python 3.7.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue16322] time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue5516] equality not symmetric for subclasses of datetime.date and datetime.datetime

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue22426] strptime accepts the wrong '2010-06-01 MSK' string but rejects the right '2010-06-01 MSD'

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue27741] datetime.datetime.strptime functionality description incorrect

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue34054] multiprocessing should use time.monotonic() for timeout

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:

Monotonic clock: https://docs.python.org/dev/library/time.html#time.monotonic

--

___
Python tracker 

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



[issue33701] test_datetime crashed (SIGSEGV) on Travis CI

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue33381] Incorrect documentation for strftime()/strptime() format code %f

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue33988] [EASY] [3.7] test_platform fails when run with -Werror

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:

Thank you Karthikeyan Singaravelan for your fix!

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



[issue33988] [EASY] [3.7] test_platform fails when run with -Werror

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f5770f354cb982303237d581ad2b296486475965 by Victor Stinner 
(Xtreak) in branch '3.7':
bpo-33988: Fix test_warnings using -W error (GH-7985)
https://github.com/python/cpython/commit/f5770f354cb982303237d581ad2b296486475965


--

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I investigated that commit but I cannot find anything :(.

--

___
Python tracker 

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



[issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue31898] Add a `recommended-packages.txt` file

2018-07-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

> datetime.timezone -> pytz.timezone (updates driven by IANA timezone database)

I will note that `pytz.timezone` and `datetime.timezone` are not really 
comparable (they do two very different things), and as of Python 3.6, 
`dateutil.tz` is the recommended source for IANA time zones, not `pytz`, per 
https://docs.python.org/3/library/datetime.html

--
nosy: +p-ganssle

___
Python tracker 

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



[issue27400] Datetime NoneType after calling Py_Finalize and Py_Initialize

2018-07-05 Thread Paul Ganssle


Paul Ganssle  added the comment:

Hmm. I never noticed this. In the past I have used the (undocumented) 
PyDateTimeAPI struct, which the official macros wrap. I'm not sure how official 
that struct is considering it doesn't show up in the documentation.

I agree that it should be possible to construct TZ-aware datetimes using the 
official C API, so I guess the question is whether to add a bunch more macros 
or document the existing struct.

--
nosy: +p-ganssle

___
Python tracker 

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



[issue22377] %Z in strptime doesn't match EST and others

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue15390] PEP 3121, 384 refactoring applied to datetime module

2018-07-05 Thread Paul Ganssle


Change by Paul Ganssle :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-07-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

This issue, as stated, looks like a severe regression to me.

In each of my python installs, Lib/site-packages has a file called 'python.pth' 
containing 'F:/Python'.  This is not a glob of inscrutable code.  It is not 
even Python code.  Just a path.  Is this issue about something else also called 
a 'pth file'?

F:/Python latter is a package development directory on my supplementary hard 
drive.  When I first install a new version of Python (early alpha), I copy this 
tiny file.  Voila!  The packages within /Python are 'installed' for the new 
version without making copies.  Editing a file edits it for all 'installs'.  
Deleting the directory for an old and no longer needed version does not delete 
any of my files.

Import in files within F:/Python/pack act as if pack were installed in the site 
package for the version of python running the file.  I can easily run anything 
in Command Prompt with 'py -x.y -m pack.file'.  I can easily rerun with a 
different version by hitting up arrow and changing x.y.  Command Prompt's 
current working directory does not matter.

I think this is one of Python's most under-appreciated features.  I am rather 
sure there is no way to so easily get the same effect.  Abuse of a great 
feature is not a good reason to delete it completely.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34055] IDLE inserts extra blank line in prompt after SyntaxError

2018-07-05 Thread Grant Jenks


New submission from Grant Jenks :

IDLE inserts an extra blank line after the prompt after encountering a 
SyntaxError:

```
>>> 1 + 2
3
>>> print('Hello')
Hello
 v-- Missing single quote!
>>> d = {1: 'uno', 2: 'dos', 3: 'tres}
 
SyntaxError: EOL while scanning string literal
>>> print('Hello')
 <-- Extra blank line and whitespace (tab and space).
Hello
>>> 1 + 2
 <-- Extra blank line and whitespace (tab and space).
3
>>> 
```

Notice the line starting with ">>> d =" above contains a missing single quote 
which causes a "SyntaxError: EOL while scanning string literal". This causes 
IDLE to insert extra blank lines with one tab and one space after every input.

The old behavior looked like:

```
>>> 1 + 2
3
>>> print('Hello')
Hello
>>> d = {1: 'uno', 2: 'dos', 3: 'tres}
 
SyntaxError: EOL while scanning string literal
>>> print('Hello')
Hello
>>> 1 + 2
3
```

--
assignee: terry.reedy
components: IDLE
messages: 321126
nosy: grantjenks, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE inserts extra blank line in prompt after SyntaxError
type: behavior
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



[issue34042] Reference loss for local classes

2018-07-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I think I found it. After doing the bisect manually (as redirecting 
stdout/stderr) seems to affect somehow the test) I found commit 
b0a7a037b8fde56b62f886d5188bced7776777b4 as the culprit. Reverting this commit 
on the current master seem to solve the problem. This is the diff of the revert:

diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 40d7d8af6e..f7d792232e 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -613,52 +613,6 @@ new_dict_with_shared_keys(PyDictKeysObject *keys)
 return new_dict(keys, values);
 }

-
-static PyObject *
-clone_combined_dict(PyDictObject *orig)
-{
-assert(PyDict_CheckExact(orig));
-assert(orig->ma_values == NULL);
-assert(orig->ma_keys->dk_refcnt == 1);
-
-Py_ssize_t keys_size = _PyDict_KeysSize(orig->ma_keys);
-PyDictKeysObject *keys = PyObject_Malloc(keys_size);
-if (keys == NULL) {
-PyErr_NoMemory();
-return NULL;
-}
-
-memcpy(keys, orig->ma_keys, keys_size);
-
-/* After copying key/value pairs, we need to incref all
-   keys and values and they are about to be co-owned by a
-   new dict object. */
-PyDictKeyEntry *ep0 = DK_ENTRIES(keys);
-Py_ssize_t n = keys->dk_nentries;
-for (Py_ssize_t i = 0; i < n; i++) {
-PyDictKeyEntry *entry = [i];
-PyObject *value = entry->me_value;
-if (value != NULL) {
-Py_INCREF(value);
-Py_INCREF(entry->me_key);
-}
-}
-
-PyDictObject *new = (PyDictObject *)new_dict(keys, NULL);
-if (new == NULL) {
-/* In case of an error, `new_dict()` takes care of
-   cleaning up `keys`. */
-return NULL;
-}
-new->ma_used = orig->ma_used;
-assert(_PyDict_CheckConsistency(new));
-if (_PyObject_GC_IS_TRACKED(orig)) {
-/* Maintain tracking. */
-_PyObject_GC_TRACK(new);
-}
-return (PyObject *)new;
-}
-
 PyObject *
 PyDict_New(void)
 {
@@ -2527,13 +2481,7 @@ PyDict_Copy(PyObject *o)
 PyErr_BadInternalCall();
 return NULL;
 }
-
 mp = (PyDictObject *)o;
-if (mp->ma_used == 0) {
-/* The dict is empty; just return a new dict. */
-return PyDict_New();
-}
-
 if (_PyDict_HasSplitTable(mp)) {
 PyDictObject *split_copy;
 Py_ssize_t size = USABLE_FRACTION(DK_SIZE(mp->ma_keys));
@@ -2560,27 +2508,6 @@ PyDict_Copy(PyObject *o)
 _PyObject_GC_TRACK(split_copy);
 return (PyObject *)split_copy;
 }
-
-if (PyDict_CheckExact(mp) && mp->ma_values == NULL &&
-(mp->ma_used >= (mp->ma_keys->dk_nentries * 2) / 3))
-{
-/* Use fast-copy if:
-
-   (1) 'mp' is an instance of a subclassed dict; and
-
-   (2) 'mp' is not a split-dict; and
-
-   (3) if 'mp' is non-compact ('del' operation does not resize dicts),
-   do fast-copy only if it has at most 1/3 non-used keys.
-
-   The last condition (3) is important to guard against a pathological
-   case when a large dict is almost emptied with multiple del/pop
-   operations and copied after that.  In cases like this, we defer to
-   PyDict_Merge, which produces a compacted copy.
-*/
-return clone_combined_dict(mp);
-}
-
 copy = PyDict_New();
 if (copy == NULL)
 return NULL;

--

___
Python tracker 

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



[issue15443] datetime module has no support for nanoseconds

2018-07-05 Thread Steve Holden


Change by Steve Holden :


--
nosy:  -holdenweb

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-05 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Agreed, if it was a real reference bug, the interpreter should crash before the 
total reference count gets negative ;-)

--

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-05 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

I've bisected myself and the culprit seems to be 
b0a7a037b8fde56b62f886d5188bced7776777b4 ("""bpo-31179: Make dict.copy() up to 
5.5 times faster.""").

--
nosy: +yselivanov

___
Python tracker 

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



[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2018-07-05 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-05 Thread Yury Selivanov


Yury Selivanov  added the comment:

This isn't a real reference bug, but rather a bug in total refs accountability. 
 It seems that I missed the fact that we track refs to the keys table with a 
DK_INCREF macro.

The new `clone_combined_dict` uses `memcpy` to clone the keys table (along with 
its `dk_refcnt` field, but it doesn't register the fact that we have a new keys 
table after copying.  The bug can be solved with the following diff:

diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 7a1bcebec6..3ac6a54415 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -656,6 +656,7 @@ clone_combined_dict(PyDictObject *orig)
 /* Maintain tracking. */
 _PyObject_GC_TRACK(new);
 }
+_Py_INC_REFTOTAL;
 return (PyObject *)new;
 }


I don't think this is a critical-level bug that needs an emergency 3.7.1 
release, but I'll submit a PR right now. Would appreciate if you guys can 
review it.

--

___
Python tracker 

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



[issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc.

2018-07-05 Thread Matej Cepl


Matej Cepl  added the comment:

> Matej is this about Python 2?

I am currently ONLY on building python 3.7.0, nothing else bothers me at the 
moment.

Let me summarize my findings, or what I think is the situation (of course, I 
could be completely wrong):

 * See 
https://build.opensuse.org/package/show/devel:languages:python:Factory/python3 
... Tumbleweed and Leap 15  (which all have libnsl) fail to be build with 
libnsl-devel installed. It seems to me that it somehow tries to build 
nismodule.c, but fails in configure (see above), so it doesn't end up well.

I think the problem is that the Python build system expects libnsl to be the 
one which is found in Solaris and so it looks for its API. Except, the Linux 
one is different and doesn't provide the same API. And from there, it goes all 
down to hell.

With Leap 42.3 (which has glibc-2.27-4.1, but no libnsl, so I guess NIS API is 
still inside of glibc; is it possible?), nis builds correctly and so it is 
included.

* Concerning Python 2. I don't see any problems with it. 
https://build.opensuse.org/package/show/devel:languages:python:Factory/python 
shows https://is.gd/sbwIf6 that glibc is the same glibc-2.27-4.1, 
libnsl-devel-1.2.0-2.1, ./configure still fails, but 
http://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_Tumbleweed/x86_64/python-base-2.7.15-112.1.x86_64.rpm
 still contains /usr/lib64/python2.7/lib-dynload/nis.so module.

OK, so I have no clue and it is all complete mess.

--

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-05 Thread Yury Selivanov


Yury Selivanov  added the comment:

> Agreed, if it was a real reference bug, the interpreter should crash before 
> the total reference count gets negative ;-)

First thing I checked with Serhiy's script :)

A PR with a fix: https://github.com/python/cpython/pull/8119

--

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-05 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

@Antoine Wow, it seems that we both  
foundb0a7a037b8fde56b62f886d5188bced7776777b4 with one minute of difference :D

I added Yuri to the noise list as is the author of that PR.

--

___
Python tracker 

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



[issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file

2018-07-05 Thread Bruce Elgort


Bruce Elgort  added the comment:

2.7.15 scrolling is working just fine.

--

___
Python tracker 

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



[issue34042] Reference loss for local classes

2018-07-05 Thread Yury Selivanov


Change by Yury Selivanov :


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

___
Python tracker 

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



[issue34055] IDLE: erroneous 'smart' indents in shell

2018-07-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The SyntaxError is not relevant.  Interactive CPython:

>>> d=[]
>>> d=()
>>> d={}
>>>

Erroneous extra lines in IDLE 3.6+ Shell but not editor:

>>> d = []
 
>>> d=()
 
>>> d={}
 
>>> d=[i for i in [1]]
 
>>> 

The 'blank' lines are indents produced by IDLE's smart indent mechanism, which 
is trigger by keying '\n', *before* the code is tentatively compiled.

While the extra lines are an error for the examples above, they are arguably 
correct for your example, where there is no closing '}'.  The indenter treats 
it the same as if there were a closing quote, as in the following, which *is* 
the same in shell and editor, and correct.

d = {1: 'one}'
 # Indent lines up next dict item with the one above.

Even though your example is no a bug, it lead me to discover a regression in 
current 3.6+.  In the past year, there have been a couple of patches that 
touched the autoindent code.

--
stage:  -> test needed
title: IDLE inserts extra blank line in prompt after SyntaxError -> IDLE: 
erroneous 'smart' indents in shell
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



[issue34047] Scrolling in IDLE for OS X is not working correctly when reaching end of file

2018-07-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

1 down, but how about my other questions?
Is there only a problem if the slider is the first thing touched?
Is there still a problem if the line "return 'break'" in 
idlelib.editor.EditorWindow.handle_yview is deleted or disabled by prefixig it 
with '#'?  (Are you allowed to edit stdlib files?)
Do you see any messages if you start IDLE in a terminal?

--

___
Python tracker 

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



[issue34057] Py_Initialize aborts when using static Python version. Windows

2018-07-05 Thread Alberto


New submission from Alberto :

Hi,

I've followed the build instructions to get a statically linked Python library 
in windows. The compilation works great and I get a big fat statically linked 
.lib file. 

When I use it and in my code I call Py_Initialize() the program aborts and I 
get this error:

Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

It seems that python is looking for encodings on the file system instead of 
looking for the built-in one since if I do 
Py_SetPythonHome(L"C:\\Python37.0-x64"); before calling Py_Initialize it works 
fine. 

Why is Python looking for external modules when it is a statically linked 
library and encodings should be built-in?

How can I indicate Python to look for the modules in itself and not externally?

Regards

--
components: Interpreter Core
messages: 321140
nosy: illera88
priority: normal
severity: normal
status: open
title: Py_Initialize aborts when using static Python version. Windows
type: crash
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



[issue34057] Py_Initialize aborts when using static Python version. Windows

2018-07-05 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue34019] webbrowser: wrong arguments for Opera browser.

2018-07-05 Thread Bumsik Kim


Bumsik Kim  added the comment:

I also believe this can be backported to 2.7 as well.

--

___
Python tracker 

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



[issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows)

2018-07-05 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +7706

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-07-05 Thread Ivan Pozdeev


Ivan Pozdeev  added the comment:

> They are very difficult to debug because they're processed too early.  

.pth's are processed by site.py, so no more difficult than site/sitecustomize.
You can e.g. run `site.addpackage(,,None)' to debug the logic.

> They usually contain globs of inscrutable code.

An ability to contain code is there for a reason: to allow a module do 
something more intelligent than adding hardcoded paths if needed (e.g. pywin32 
adds a subdir with .dll dependencies to PATH).

A chunk of code is limited to a single line -- a conscious limitation to deter 
misuse 'cuz search path setup code is presumed to be small.

If someone needs something other than path setup, they should do it upon the 
module's import instead.
If they insist on misusing the feature, Python's design does what it's supposed 
to do in such cases: "make right things easy, make wrong things hard".

If there's a valid reason to allow larger code chunks, we can introduce a 
different syntax -- e.g. something like bash here-documents.

> Exceptions in pth files can get swallowed in some cases.

If this happens, it's a bug. A line from .pth is executed with "exec line", any 
exceptions should propagate up the stack as usual.

> They are loaded in indeterminate order.

Present a use case justifying a specific order.
I can see a probable use case: a package needs to do something using its 
dependencies, so any .pth for the dependencies should run before the one for 
the package.
But I can't see why that package can't do this upon its import instead (saves 
unnecessary work if the user won't be using that package in that session, too).
The only valid case I can see is if the package is using some 3rd-party import 
system (e.g. a .7z archive or some module repository) that needs to be loaded 
first for its search path to make sense.

--

___
Python tracker 

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



[issue34056] checked hash-based pyc files not working with imp module

2018-07-05 Thread Patrick McCarty


Change by Patrick McCarty :


Added file: https://bugs.python.org/file47672/imp-test-mod.py

___
Python tracker 

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



[issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows)

2018-07-05 Thread Sebastian Bank


Sebastian Bank  added the comment:

Perfect, thanks for the quick fix.

--

___
Python tracker 

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



[issue34049] abs() method accept argument that implement __abs__()

2018-07-05 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks

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



[issue34044] subprocess: reusing STARTUPINFO breaks under 3.7 (Windows)

2018-07-05 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 29be3bd3c9aed0190e60096a603120cacda82375 by Victor Stinner in 
branch '3.7':
bpo-34044: subprocess.Popen copies startupinfo (GH-8090) (GH-8121)
https://github.com/python/cpython/commit/29be3bd3c9aed0190e60096a603120cacda82375


--

___
Python tracker 

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



[issue34055] IDLE: erroneous 'smart' indents in shell

2018-07-05 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

def funcname(param = 'somestring)
 # Indent for next param.

is another situation where \n is treating as closing '.

--

___
Python tracker 

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



  1   2   >