[issue31866] clean out some more AtheOS code

2017-10-24 Thread Benjamin Peterson

Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue31866] clean out some more AtheOS code

2017-10-24 Thread Benjamin Peterson

New submission from Benjamin Peterson :

We stopped support AtheOS in 2007. But, there are still references in the code:

$ git grep -i AtheOS
Doc/whatsnew/2.3.rst:Other new platforms now supported by Python include AtheOS
Doc/whatsnew/2.3.rst:(http://atheos.cx/), GNU/Hurd, and OpenVMS.
Lib/distutils/command/build_ext.py:# for extensions under Cygwin and 
AtheOS Python's library directory must be
Lib/distutils/command/build_ext.py:if sys.platform[:6] == 'cygwin' or 
sys.platform[:6] == 'atheos':
Lib/distutils/command/build_ext.py:elif sys.platform[:6] == "atheos":
Lib/test/test_os.py:# On AtheOS, glibc always returns ENOSYS
Lib/test/test_os.py:# On AtheOS, glibc always returns ENOSYS
Misc/HISTORY:- Support for AtheOS has been completely removed from the code 
base. It was
Misc/HISTORY:- Support for BeOS and AtheOS was removed (according to PEP 11).
Misc/HISTORY:- AtheOS is now supported.
Modules/_cryptmodule.c:/* On some platforms (AtheOS) crypt returns NULL for 
an invalid
config.guess:i*86:atheos:*:*)
config.guess:   echo ${UNAME_MACHINE}-unknown-atheos
config.sub: -atheos*)
config.sub: os=-atheos
configure:atheos*|Linux*/1*)
configure.ac:atheos*|Linux*/1*)

--
messages: 304963
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: clean out some more AtheOS code
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



[issue23699] Add a macro to ease writing rich comparisons

2017-10-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

On Tue, Oct 24, 2017, at 02:23, Petr Viktorin wrote:
> 
> Petr Viktorin  added the comment:
> 
> Both tp_richcompare and PyObject_RichCompareBool have op as the last
> argument:

Yes, indeed. Sorry, I wasn't thinking straight.

--

___
Python tracker 

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



[issue21720] "TypeError: Item in ``from list'' not a string" message

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

>>> __import__('encodings', fromlist=iter(('aliases', b'foobar')))


--

___
Python tracker 

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



[issue21720] "TypeError: Item in ``from list'' not a string" message

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I don't think the index in error message is needed. Unlike to str.join() which 
accepts arbitrary iterables of arbitrary names, the fromlist usually is a short 
tuple.

Interesting, what happen if the fromlist is not a list or tuple?

>>> __import__('encodings', fromlist=iter(('aliases', b'codecs')))


Import is successful because the iterator was exhausted by "'*' in fromlist".

--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-10-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Yes, we could memcpy things around to obtain the desired alignment. It would be 
nicer to have a builtin solution, though.

--

___
Python tracker 

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



[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-10-24 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests:  -4084

___
Python tracker 

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



[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-10-24 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

In the future, I don't think this sort of thing should be backported.  It isn't 
a bug, rather, it is a "thing x doesn't exactly look like thing y".

--

___
Python tracker 

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



[issue29116] Make str and bytes error messages on concatenation conform with other sequences

2017-10-24 Thread Antoine Pietri

Change by Antoine Pietri :


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

___
Python tracker 

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



[issue30762] Misleading message “can't concat bytes to str”

2017-10-24 Thread Berker Peksag

Change by Berker Peksag :


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



[issue21720] "TypeError: Item in ``from list'' not a string" message

2017-10-24 Thread Berker Peksag

Change by Berker Peksag :


--
pull_requests: +4083
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



[issue31865] html.unescape does not work as per documentation

2017-10-24 Thread Jun Hui Lee

New submission from Jun Hui Lee :

html.unescape(s)
Convert all named and numeric character references (e.g. >, >, &x3e;)

But running this gives:
>>> html.unescape('>, >, &x3e;')
'>, >, &x3e;'

--
assignee: docs@python
components: Documentation
messages: 304957
nosy: Jun Hui Lee, docs@python
priority: normal
severity: normal
status: open
title: html.unescape does not work as per documentation
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



[issue31845] PYTHONDONTWRITEBYTECODE and PYTHONOPTIMIZE have no effect

2017-10-24 Thread Nick Coghlan

Nick Coghlan  added the comment:

We could still use some more comprehensive test cases for the env var handling 
and the way that interacts with the command line settings, but the merged PR 
includes at least a rudimentary check for the four that directly affect 
sys.flags without any tricky side effects (PYTHONDEBUG, PYTHONVERBOSE, 
PYTHONOPTIMIZE, PYTHONDONTWRITEBYTECODE).

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior

___
Python tracker 

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



[issue31845] PYTHONDONTWRITEBYTECODE and PYTHONOPTIMIZE have no effect

2017-10-24 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset d7ac06126db86f76ba92cbca4cb702852a321f78 by Nick Coghlan in 
branch 'master':
bpo-31845: Fix reading flags from environment (GH-4105)
https://github.com/python/cpython/commit/d7ac06126db86f76ba92cbca4cb702852a321f78


--

___
Python tracker 

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



[issue21720] "TypeError: Item in ``from list'' not a string" message

2017-10-24 Thread Berker Peksag

Berker Peksag  added the comment:

issue21720_python3.diff hasn't been applied. I'll convert my 
issue21720_python3.diff patch to a pull request. I like the format of Nick's 
"".join() example in msg278794. Here's my proposal for Python 3:

f"Item {i} in 'from list' must be str, not {type(x).__name__!r}"

--
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open
versions:  -Python 3.5

___
Python tracker 

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



[issue30768] PyThread_acquire_lock_timed() should recompute the timeout when interrupted by a signal

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, the pthread condvar+mutex implementation still has the bug, so I reopen the 
issue.

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



[issue30768] PyThread_acquire_lock_timed() should recompute the timeout when interrupted by a signal

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

I merged my PR. Thanks Antoine Pitrou for the review!

This change only impacts the io.BufferedWriter and io.BufferedReader during 
Python finalization. It has no effect on theading.Lock.acquire(). It might 
impact faulthandler.dump_traceback_later(), but in practice, it shouldn't 
change anything since the internal faulthandler watchdog thread blocks all 
signals.

If I understand correctly, if the system clock is stepped back by 1 hour during 
Python finalization, after PyThread_acquire_lock_timed() computed the deadline, 
but before sem_timedwait() completed, _enter_buffered_busy() can be blocked 
during 1 hour.

Moving the system clock backward by 1 hour occurs once a year on the DST 
change. But the race condition is unlikely since the size of the time window is 
only 1 second. The DST change should occur at Python shutdown when an 
io.BufferedReader or io.BufferedWriter is used.

Since the race condition seems very unlikely and was never reported by another 
user, I propose to not backward this change. Moreover, I'm not confident to 
modify locks in a stable release :-)

--

___
Python tracker 

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



[issue30768] PyThread_acquire_lock_timed() should recompute the timeout when interrupted by a signal

2017-10-24 Thread STINNER Victor

Change by STINNER Victor :


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



[issue30768] PyThread_acquire_lock_timed() should recompute the timeout when interrupted by a signal

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 850a18e03e8f8309bc8c39adc6e7d51a4568cd9a by Victor Stinner in 
branch 'master':
bpo-30768: Recompute timeout on interrupted lock (GH-4103)
https://github.com/python/cpython/commit/850a18e03e8f8309bc8c39adc6e7d51a4568cd9a


--

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-10-24 Thread Elvis Pranskevichus

Elvis Pranskevichus  added the comment:

I think that both the pyiso8601 and boxed/iso8601 implementations parse ISO 
8601 strings incorrectly.  The standard explicitly says that all truncated 
datetime strings are *reduced accuracy timestamps*.  In other words, "2017-10" 
is *not* equal to "2017-10-01".  Instead, "2017-10" represents the whole month 
of October 2017.  Same thing with hours.  Earlier versions of ISO 8601 even 
allowed dropping the year: "--10-01", which meant October 1st of _any year_.  
They dropped this from more recent revisions of the standard.

The only place where the truncated representation means "default to zero" is 
the timezone offset, so "10:10:00+4" and "10:10:00+04:00" mean the same thing.

--
nosy: +Elvis.Pranskevichus

___
Python tracker 

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



[issue31664] Add support of new crypt methods

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

Failure on s390x SLES 3.x:

http://buildbot.python.org/all/#/builders/16/builds/65

==
FAIL: test_invalid_log_rounds (test.test_crypt.CryptTestCase)
--
Traceback (most recent call last):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-sles-z/build/Lib/test/test_crypt.py", 
line 60, in test_invalid_log_rounds
self.assertIsNone(crypt.crypt('mypassword', salt))
AssertionError: '*0' is not None

--
nosy: +haypo
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



[issue31803] time.clock() should emit a DeprecationWarning

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

Marc-Andre: "Yes, to avoid yet another Python 2/3 difference. It should be 
replaced with the appropriate variant on Windows and non-Windows platforms. 
From Serhiy's response that's time.process_time() on non-Windows platforms and 
time.perf_counter() on Windows."

I don't understand why you mean by "replaced with". Do you mean modify the 
implementation of the time.clock()?

I would like to kill time.clock() beceause it behaves differently on Windows 
and non-Windows platforms. There are two choices:

* deprecate time.clock() and later remove time.clock() -- it's deprecated since 
Python 3.3, and Python 3.7 now emits a DeprecationWarning
* modify time.clock() to get the same behaviour on all platforms: I proposed to 
modify time.clock() to become a simple alias to time.perf_counter()

Now I'm confused. I'm not sure that I understood what you suggest.

Note: time.clock() already behaves like time.perf_counter() on Windows and 
time.process_time() on non-Windows. It's exactly how it's implemented. But I 
consider that it's a bug, and I want to fix it.


"The documentation can point to the new functions and recommend
these over time.clock()."

It's already done in the doc since Python 3.3, no?

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

"Deprecated since version 3.3: The behaviour of this function depends on the 
platform: use perf_counter() or process_time() instead, depending on your 
requirements, to have a well defined behaviour."

--

___
Python tracker 

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



[issue31864] datetime violates Postel's law

2017-10-24 Thread Ned Deily

Change by Ned Deily :


--
resolution:  -> third party
status: open -> closed

___
Python tracker 

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



[issue31864] datetime violates Postel's law

2017-10-24 Thread Geoff Kuenning

Geoff Kuenning  added the comment:

Duh, my mistake.  The problem is in dateutil, which AFAICT is indeed not part 
of the Python standard library.  I'll hang my head in shame and go report the 
problem in the right place.

--
resolution: third party -> 
status: closed -> open

___
Python tracker 

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



[issue31864] datetime violates Postel's law

2017-10-24 Thread R. David Murray

R. David Murray  added the comment:

I meant the python standard library datetime package doesn't parse files, of 
course :)  Other parts of the stdlib certainly do parse files.

--

___
Python tracker 

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



[issue31864] datetime violates Postel's law

2017-10-24 Thread R. David Murray

R. David Murray  added the comment:

The python standard library does not parse files, nor does it have a _parse_rfc 
message. You say you reported the problem you are having to "the program's 
maintainer", and that is appropriate.  There does not appear to be anything in 
this report related to the python standard library, which is what would be 
appropriate for this bug tracker.

--
nosy: +r.david.murray
resolution:  -> third party
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



[issue31864] datetime violates Postel's law

2017-10-24 Thread Geoff Kuenning

Change by Geoff Kuenning :


--
components: +Library (Lib)
type:  -> behavior
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



[issue31864] datetime violates Postel's law

2017-10-24 Thread Geoff Kuenning

New submission from Geoff Kuenning :

The datetime package is too eager to reject nonconforming VCALENDAR-format 
files.  The particular issue I encountered is related to time zones.  RFC 5545 
clearly states that the DTSTART field is required.  However, there are 
situations where DTSTART isn't strictly necessary because the zone in question 
doesn't observe daylight-savings time and never has.

For example, I have a VCALENDAR file that was generated by a program that omits 
DTSTART for such zones.  Here's an example:

BEGIN:VTIMEZONE
TZID:America/Phoenix
X-LIC-LOCATION:America/Phoenix
BEGIN:DAYLIGHT
TZOFFSETFROM:-0700
TZOFFSETTO:-0700
TZNAME:Ariz
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0700
TZOFFSETTO:-0700
TZNAME:Ariz
END:STANDARD
END:VTIMEZONE

Clearly, this file violates RFC 5445, and I have reported that fact to the 
program's maintainer (who will fix the problem soon).  Nevertheless, feeding an 
ICS file to datetime._parse_rfc with this error causes a ValueError exception, 
which makes the VCALENDAR file unreadable.

In keeping with Postel's law ("Be conservative in what you do, be liberal in 
what you accept from others"), _parse_rfc should attempt to accept VCALENDAR 
files whenever it is possible to make sense of them.  Thus, for example:

if not founddtstart:
rrulelines.append('DTSTART:19000101T02')

The above could be improved a bit, for example by still rejecting entries in 
which the standard and daylight sections had different offsets (although even 
then it seems valid to assume a DTSTART in the distant past).

Although the dtstart issue is the one that prompted this report, I also noticed 
the following in _parse_rfc:

if name == "BEGIN":
if value in ("STANDARD", "DAYLIGHT"):
# Process component
pass
else:
raise ValueError("unknown component: "+value)

Again, there's an opportunity to be more robust here.  One could issue a 
warning message, but then ignore the unknown component.

In both cases (and I suspect numerous others), halting parsing is an extreme 
response to various errors, since it leaves the user of the package with no way 
to process a nonconforming file.  That's especially problematic since VCALENDAR 
files are generated by so many different programs, many of which are written by 
programmers who haven't bothered to read RFC 5445--or who have read it but then 
made some minor mistake that produces broken files.

--
messages: 304944
nosy: gkuenning
priority: normal
severity: normal
status: open
title: datetime violates Postel's law

___
Python tracker 

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



[issue25172] Unix-only crypt should not be present on Windows.

2017-10-24 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
stage:  -> needs patch
type:  -> behavior
versions: +Python 3.7 -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



[issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

What is the performance of crypt_r() in comparison with crypt()?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31702] Allow to specify the number of rounds for SHA-* hashing in crypt

2017-10-24 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

I'd raise a ValueError in that case.

--

___
Python tracker 

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



[issue31803] time.clock() should emit a DeprecationWarning

2017-10-24 Thread Marc-Andre Lemburg

Marc-Andre Lemburg  added the comment:

On 24.10.2017 11:23, STINNER Victor wrote:
> 
> Marc-Andre Lemburg: "Thanks for pointing that out. I didn't know."
> 
> Do you still think that we need to modify time.clock() rather than 
> deprecating it?

Yes, to avoid yet another Python 2/3 difference. It should be
replaced with the appropriate variant on Windows
and non-Windows platforms. From Serhiy's response that's
time.process_time() on non-Windows platforms and time.perf_counter()
on Windows.

The documentation can point to the new functions and recommend
these over time.clock().

--

___
Python tracker 

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



[issue25287] test_crypt fails on OpenBSD

2017-10-24 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue25287] test_crypt fails on OpenBSD

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 04c0a4038e8764f742de8505600b8ee97ee50776 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-25287: Backport new tests for crypt and skip test_crypt on OpenBSD. 
(GH-4111). (#4112)
https://github.com/python/cpython/commit/04c0a4038e8764f742de8505600b8ee97ee50776


--

___
Python tracker 

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



[issue31690] Make RE "a", "L" and "u" inline flags local

2017-10-24 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue31690] Make RE "a", "L" and "u" inline flags local

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 3557b05c5a7dfd7d97ddfd3b79aefd53d25e5132 by Serhiy Storchaka in 
branch 'master':
bpo-31690: Allow the inline flags "a", "L", and "u" to be used as group flags 
for RE. (#3885)
https://github.com/python/cpython/commit/3557b05c5a7dfd7d97ddfd3b79aefd53d25e5132


--

___
Python tracker 

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



[issue25287] test_crypt fails on OpenBSD

2017-10-24 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4082

___
Python tracker 

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



[issue25287] test_crypt fails on OpenBSD

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset f52dff611cff2fb9e90340b4787eda50ab2d40c6 by Serhiy Storchaka in 
branch '3.6':
bpo-25287: Backport new tests for crypt and skip test_crypt on OpenBSD. (#4111)
https://github.com/python/cpython/commit/f52dff611cff2fb9e90340b4787eda50ab2d40c6


--

___
Python tracker 

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Keep islice() non-converted. For the r parameter of permutations() use "r: 
object = None".

--

___
Python tracker 

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



[issue25287] test_crypt fails on OpenBSD

2017-10-24 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4081
stage:  -> patch review

___
Python tracker 

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2017-10-24 Thread Tal Einat

Tal Einat  added the comment:

What about islice? Does AC now support complex enough signatures to support it? 
If not, should I leave the comment as is?

--

___
Python tracker 

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

All correct. The final patch should be in the form of GitHub PR.

Don't specify the self parameter explicitly, just rename the corresponding 
variable. The rest of the patch LGTM.

--

___
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

2017-10-24 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Would one of the original authors of the patches like to create a GitHub pull 
request for this issue?

--
nosy: +csabella

___
Python tracker 

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



[issue31702] Allow to specify the number of rounds for SHA-* hashing in crypt

2017-10-24 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue28281] Remove year limits from calendar

2017-10-24 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:

I submitted Mark's patch unchanged as PR 4109.  If we don't hear from Mark, I 
will address my own comments and merge.

--

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-10-24 Thread Tal Einat

Tal Einat  added the comment:

I'd be happy to update the patches.

I asked for a bit of clarification on what this entails in msg304931 on issue 
#20180, once that's clear I'll do the same for these patches and create PRs.

--

___
Python tracker 

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



[issue28281] Remove year limits from calendar

2017-10-24 Thread Alexander Belopolsky

Change by Alexander Belopolsky :


--
pull_requests: +4079
stage: commit review -> patch review

___
Python tracker 

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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2017-10-24 Thread Tal Einat

Tal Einat  added the comment:

Id be happy to update the itertools patch.

I haven't been following AC work for quite a while. I would expect this to 
entail:

1. applying the patch to the master branch
2. merging any conflicts
3. running the clinic.py script again
4. review the output and compare it to the previous output to make sure things 
look okay

Would you also prefer this in the form of a GitHub PR?

--

___
Python tracker 

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



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

2017-10-24 Thread Alexander Belopolsky

Alexander Belopolsky  added the comment:


New changeset fdd9b217c60b454ac6a82f02c8b0b551caeac88b by Alexander Belopolsky 
in branch 'master':
Closes bpo-28292: Implemented Calendar.itermonthdays3() and itermonthdays4(). 
(#4079)
https://github.com/python/cpython/commit/fdd9b217c60b454ac6a82f02c8b0b551caeac88b


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



[issue25287] test_crypt fails on OpenBSD

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

issue31664 fixes test_crypt in 3.7. In other versions the test should be just 
skipped on OpenBSD. Blowfish is the only method supported on OpenBSD, but it 
was not supported by the Python's crypt module.

--

___
Python tracker 

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



[issue14518] Add bcrypt $2a$ to crypt.py

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The support of the Blowfish hashing (prefix '$2a$') has been added in 
issue31664.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
stage: needs patch -> resolved
status: pending -> closed
superseder:  -> Add support of new crypt methods

___
Python tracker 

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



[issue31664] Add support of new crypt methods

2017-10-24 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue31664] Add support of new crypt methods

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset eab3ff72ebe79416cc032b8508ae13332955a157 by Serhiy Storchaka in 
branch 'master':
bpo-31664: Add support for the Blowfish method in crypt. (#3854)
https://github.com/python/cpython/commit/eab3ff72ebe79416cc032b8508ae13332955a157


--

___
Python tracker 

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



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Yury Selivanov

Yury Selivanov  added the comment:

> No, just this tracker issue, a PR and a reviewer. (Sorry, I can't review
CPython code myself any more.)

Alright, I'll work on a PR after PEP 55x.

--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-10-24 Thread Stefan Krah

Stefan Krah  added the comment:

Since we have "#define PYMEM_FUNCS PYOBJ_FUNCS", I think extensions that
use PyMem_Malloc() also won't get the glibc max_align_t alignment.

But guess technically they should.

--
nosy: +skrah

___
Python tracker 

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



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Guido van Rossum

Guido van Rossum  added the comment:

> do we need a PEP to add aiter() and anext() builtins?

No, just this tracker issue, a PR and a reviewer. (Sorry, I can't review
CPython code myself any more.)

--

___
Python tracker 

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



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Yury Selivanov

Yury Selivanov  added the comment:

Guido, do we need a PEP to add aiter() and anext() builtins?

--

___
Python tracker 

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



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Davide Rizzo

Change by Davide Rizzo :


--
nosy: +gvanrossum, yselivanov

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-10-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Can we use memcpy()?

Hmm, perhaps.  Do you want to try it out (and measure any performance 
degradation)?

--

___
Python tracker 

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



[issue31299] Add "ignore_modules" option to TracebackException.format()

2017-10-24 Thread Dmitry Kazakov

Dmitry Kazakov  added the comment:

Ping. (this issue needs a decision on ignore_modules vs filter callback, and/or 
patch review)

--

___
Python tracker 

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



[issue31863] Inconsistent returncode/exitcode for terminated child processes on Windows

2017-10-24 Thread Akos Kiss

New submission from Akos Kiss :

I've been working with various approaches for running and terminating 
subprocesses on Windows and I've obtained surprisingly different results if I 
used different modules and ways of termination. Here is the script I wrote, it 
uses the `subprocess` and the `multiprocessing` modules for starting new 
subprocesses, and process termination is performed either by the modules' own 
`terminate` functions or by `os.kill`.

```py
import multiprocessing
import os
import signal
import subprocess
import sys
import time

def kill_with_os_kill(proc):
print('kill with os.kill(pid,SIGTERM)')
os.kill(proc.pid, signal.SIGTERM)

def kill_with_terminate(proc):
print('kill child with proc.terminate()')
proc.terminate()

def run_and_kill_subprocess(killfn, procarg):
print('run subprocess child with %s' % procarg)
with subprocess.Popen([sys.executable, __file__, procarg]) as proc:
time.sleep(1)
killfn(proc)
proc.wait()
print('child terminated with %s' % proc.returncode)

def run_and_kill_multiprocessing(killfn, procarg):
print('run multiprocessing child with %s' % procarg)
proc = multiprocessing.Process(target=childmain, args=(procarg,))
proc.start()
time.sleep(1)
killfn(proc)
proc.join()
print('child terminated with %s' % proc.exitcode)

def childmain(arg):
print('child process started with %s' % arg)
while True:
pass

if __name__ == '__main__':
if len(sys.argv) < 2:
print('parent process started')
run_and_kill_subprocess(kill_with_os_kill, 'subprocess-oskill')
run_and_kill_subprocess(kill_with_terminate, 'subprocess-terminate')
run_and_kill_multiprocessing(kill_with_os_kill, 
'multiprocessing-oskill')
run_and_kill_multiprocessing(kill_with_terminate, 
'multiprocessing-terminate')
else:
childmain(sys.argv[1])
```

On macOS, everything works as expected (and I think that Linux will behave 
alike):

```
$ python3 killtest.py 
parent process started
run subprocess child with subprocess-oskill
child process started with subprocess-oskill
kill with os.kill(pid,SIGTERM)
child terminated with -15
run subprocess child with subprocess-terminate
child process started with subprocess-terminate
kill child with proc.terminate()
child terminated with -15
run multiprocessing child with multiprocessing-oskill
child process started with multiprocessing-oskill
kill with os.kill(pid,SIGTERM)
child terminated with -15
run multiprocessing child with multiprocessing-terminate
child process started with multiprocessing-terminate
kill child with proc.terminate()
child terminated with -15
```

But on Windows, I got:

```
>py -3 killtest.py
parent process started
run subprocess child with subprocess-oskill
child process started with subprocess-oskill
kill with os.kill(pid,SIGTERM)
child terminated with 15
run subprocess child with subprocess-terminate
child process started with subprocess-terminate
kill child with proc.terminate()
child terminated with 1
run multiprocessing child with multiprocessing-oskill
child process started with multiprocessing-oskill
kill with os.kill(pid,SIGTERM)
child terminated with 15
run multiprocessing child with multiprocessing-terminate
child process started with multiprocessing-terminate
kill child with proc.terminate()
child terminated with -15
```

Notes:
- On Windows with `os.kill(pid, sig)`, "sig will cause the process to be 
unconditionally killed by the TerminateProcess API, and the exit code will be 
set to sig." I.e., it is not possible to detect on Windows whether a process 
was terminated by a signal or it exited properly, because `kill` does not 
actually raise a signal and no Windows API allows to differentiate between 
proper or forced termination.
- The `multiprocessing` module has a workaround for this by terminating the 
process with a designated exit code (`TERMINATE = 0x1`) and checking for 
that value afterwards, rewriting it to `-SIGTERM` if found. The related 
documentation is a bit misleading, as `exitcode` is meant to have "negative 
value -N [which] indicates that the child was terminated by signal N" -- 
however, if the process was indeed killed with `SIGTERM` (and not via 
`terminate`), then `exitcode` will be `SIGTERM` and not `-SIGTERM` (see above). 
(The documentation of `terminate` does not clarify the situation much by 
stating that "on Windows TerminateProcess() is used", since it does not mention 
the special exit code -- and well, it's not even a signal after all, so it's 
not obvious whether negative or positive exit code is to be expected.)
- The `subprocess` module choses the quite arbitrary exit code of 1 and 
documents that "negative value -N indicates that the child was terminated by 
signal N" is POSIX only, not mentioning anything about what to expect on 
Windows.

Long story short: on Windows, the observable exit code of a forcibly terminated 
child process is quite inconsistent even acros

[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

Change by Antoine Pitrou: "versions:  -Python 2.7, Python 3.3, Python 3.4, 
Python 3.5, Python 3.6"

The undefined behaviour exists and should be fixed in Python 2.7 and 3.6, no? 
Can we use memcpy()?

--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

What matters when a Python object is allocated? The start of the PyObject 
structure, or the start of the PyGC_Head structure? Would it be possible to 
align the PyObject start?

The simplest option is to store data which needs to be aligned in a second 
memory block allocated by PyMem_AlignedAlloc().

--

___
Python tracker 

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



[issue31862] Port the standard library to PEP 489 multiphase initialization

2017-10-24 Thread Marcel Plch

Change by Marcel Plch :


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

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-10-24 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
versions:  -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-10-24 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> My suggestion would be to pass alignof(type) into the allocator via macro.

Do you mean using some new PyMem_ function?  Or as as new tp_ field on the type 
declaration?

--

___
Python tracker 

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



[issue31862] Port the standard library to PEP 489 multiphase initialization

2017-10-24 Thread Petr Viktorin

Petr Viktorin  added the comment:

FWIW, Marcel is an intern in my team, tasked to learn CPython internals by 
trying to improve subinterpreter support. If I don't comment on his issues it's 
because we discussed privately beforehand.

--

___
Python tracker 

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



[issue28936] test_global_err_then_warn in test_syntax is no longer valid

2017-10-24 Thread Guido van Rossum

Guido van Rossum  added the comment:

I think this is very minor but if you two can agree that the code is right I 
think it's a nice little improvement, and I like that that particular test's 
usefulness is restored.


PS. Long-term we should really build error recovery into our antiquated parser 
and report as many errors as we can, without cascading. But that's probably a 
Python 4 project.

--

___
Python tracker 

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



[issue31862] Port the standard library to PEP 489 multiphase initialization

2017-10-24 Thread Marcel Plch

New submission from Marcel Plch :

PEP 489 introduced multiphase initialization of extension and built-in modules.
Now, almost no module in the standard library supports this feature. This 
should be improved to prepare Python for better testing of subinterpreters.

Many benefits of PEP 489 don't apply to stdlib modules. However, the PEP 
effectively says that by using multi-phase init, the module author "promises" 
that the module is "subinterpreter-friendly" [0]. So, when porting, each module 
should be checked that it e.g. doesn't use mutable process-global state.

I'd like to port stdlib to multi-phase init, starting with the easier modules, 
to:
- get familiar with contributing to CPython,
- check and track which modules are already "subinterpreter-friendly", and
- figure out how and where PEP 489 is lacking (beyond what is discussed in 
the PEP itself).


[0]: 
https://www.python.org/dev/peps/pep-0489/#subinterpreters-and-interpreter-reloading

--
components: Extension Modules
messages: 304914
nosy: Dormouse759, encukou, ncoghlan
priority: normal
severity: normal
status: open
title: Port the standard library to PEP 489 multiphase initialization
type: enhancement
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



[issue30817] Abort in PyErr_PrintEx() when no memory

2017-10-24 Thread Xavier de Gaye

Change by Xavier de Gaye :


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



[issue30817] Abort in PyErr_PrintEx() when no memory

2017-10-24 Thread Xavier de Gaye

Xavier de Gaye  added the comment:


New changeset d5d79545b73110b2f4c2b66d150409514e2ca8e0 by xdegaye in branch 
'3.6':
[3.6] bpo-30817: Fix PyErr_PrintEx() when no memory (GH-2526). (#4107)
https://github.com/python/cpython/commit/d5d79545b73110b2f4c2b66d150409514e2ca8e0


--

___
Python tracker 

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



[issue27987] obmalloc's 8-byte alignment causes undefined behavior

2017-10-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

My suggestion would be to pass alignof(type) into the allocator via macro. Then 
the allocator could at least assert it's providing good enough alignment if not 
provide the correct alignment.

I believe 16-byte alignment is special because it's glibc's malloc's default. 
So "normal" code shouldn't really be expecting anything better than 16-byte 
alignment. Code with higher alignment requirements will have to use APIs like 
the one proposed in #18835.

--

___
Python tracker 

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



[issue31834] BLAKE2: the (pure) SSE2 impl forced on x86_64 is slower than reference

2017-10-24 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

On Tue, Oct 24, 2017, at 00:25, Christian Heimes wrote:
> 
> Christian Heimes  added the comment:
> 
> I'm pretty sure that your PR has disabled all SSE optimizations. AFAIK
> gcc does not enable SSE3 and SSE4 on X86_64 by default.
> 
> $ gcc -dM -E - < /dev/null | grep SSE
> #define __SSE2_MATH__ 1
> #define __SSE_MATH__ 1
> #define __SSE2__ 1
> #define __SSE__ 1

Before this patch, this would cause blake2b.c to use slow SSE2 only
instruction, though, right?

It seems to me this represents an improvement or the status quo in all
cases. With no extra GCC flags, the reference implementation is used
rather than a slow SSE2 implementation. If extra -m flags are in CFLAGS,
the fastest implementation for the target is used.

--

___
Python tracker 

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



[issue31430] [Windows][2.7] Python 2.7 compilation fails on mt.exe crashing with error code C0000005

2017-10-24 Thread Zachary Ware

Change by Zachary Ware :


--
nosy: +db3l

___
Python tracker 

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



[issue30817] Abort in PyErr_PrintEx() when no memory

2017-10-24 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
pull_requests: +4077

___
Python tracker 

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



[issue31861] aiter() and anext() built-in functions

2017-10-24 Thread Davide Rizzo

New submission from Davide Rizzo :

PEP 525 suggested that adding aiter() and anext() would need to wait until 
async __aiter__ is dropped in 3.7. Issue 31709 solved that, so now it would be 
possible to add them.

--
components: Library (Lib)
messages: 304910
nosy: davide.rizzo
priority: normal
severity: normal
status: open
title: aiter() and anext() built-in functions
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



[issue31860] IDLE: Make font sample editable

2017-10-24 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue31860] IDLE: Make font sample editable

2017-10-24 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

The proposed patch makes the font sample in IDLE font configuration dialog 
editable. This allows users to test fonts with arbitrary samples.

--
assignee: terry.reedy
components: IDLE
messages: 304909
nosy: serhiy.storchaka, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE: Make font sample editable
type: enhancement
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



[issue31585] Refactor the enumerate.__next__ implementation

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Added a patch for history.

--
Added file: https://bugs.python.org/file47235/enum_next.diff

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Tal, do you mind to update your patches and create pull requests?

--

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-10-24 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue20182] Derby #13: Convert 50 sites to Argument Clinic across 5 files

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Tail, do you mind to update your patches and create pull requests?

--

___
Python tracker 

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



[issue30639] inspect.getfile(obj) calls object repr on failure

2017-10-24 Thread Yury Selivanov

Yury Selivanov  added the comment:

Thank you, Thomas.

--
resolution:  -> fixed
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



[issue20180] Derby #11: Convert 50 sites to Argument Clinic across 9 files

2017-10-24 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Seems Raymond have changed his mind about using Argument Clinic in itertools 
(msg302908). Tal, do you mind to update your itertools patch and create a pull 
request?

--

___
Python tracker 

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



[issue30639] inspect.getfile(obj) calls object repr on failure

2017-10-24 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset e968bc735794a7123f28f26d68fdf5dc8c845280 by Yury Selivanov 
(Thomas Kluyver) in branch 'master':
bpo-30639: Lazily compute repr for error (#2132)
https://github.com/python/cpython/commit/e968bc735794a7123f28f26d68fdf5dc8c845280


--
nosy: +yselivanov

___
Python tracker 

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



[issue31859] sharedctypes.RawArray initialization

2017-10-24 Thread Tim

New submission from Tim :

In the initialization of a new `RawArray` the `size_or_initializer` parameter 
is tested for being an instance of `int`. When passing something like 
numpy.int64 here, the code crashes, because it does not recognize this as an 
integer. The workaround is to cast to int(). Wouldn't it be nicer to compare to 
types.IntType to allow for custom integer types?

def RawArray(typecode_or_type, size_or_initializer):
'''
Returns a ctypes array allocated from shared memory
'''
type_ = typecode_to_type.get(typecode_or_type, typecode_or_type)
-if isinstance(size_or_initializer, int):
+if size_or_initializer is IntType:

--
messages: 304902
nosy: meetaig
priority: normal
severity: normal
status: open
title: sharedctypes.RawArray initialization
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue31845] PYTHONDONTWRITEBYTECODE and PYTHONOPTIMIZE have no effect

2017-10-24 Thread Nick Coghlan

Change by Nick Coghlan :


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

___
Python tracker 

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



[issue31845] PYTHONDONTWRITEBYTECODE and PYTHONOPTIMIZE have no effect

2017-10-24 Thread Nick Coghlan

Change by Nick Coghlan :


--
assignee:  -> ncoghlan

___
Python tracker 

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



[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

The bug should now be fixed.

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



[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset d8f78a1fbc0a34224289d436ad67f608fa553f0c by Victor Stinner (Miss 
Islington (bot)) in branch '3.6':
bpo-31174: Fix test_tools.test_unparse (GH-4102) (#4104)
https://github.com/python/cpython/commit/d8f78a1fbc0a34224289d436ad67f608fa553f0c


--

___
Python tracker 

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



[issue31845] PYTHONDONTWRITEBYTECODE and PYTHONOPTIMIZE have no effect

2017-10-24 Thread Nick Coghlan

Nick Coghlan  added the comment:

Huh, it appears the tests for these features are relying solely on the command 
line options, and not checking that the environment variables are also setting 
the flags properly. We should be able to account for that omission with a 
single new test in `test_cmd_line` that sets every relevant environment 
variable and checks for the expected `sys.flags` contents.

As far as what's actually going wrong goes, it's this sequence of events in 
Py_Main:

_Py_InitializeCore(&core_config);
... other code ...
apply_command_line_and_environment(&cmdline);

_Py_InitializeCore is setting the internal flags appropriately based on the 
runtime environment, but then Py_Main is stomping over those environmental 
settings with the settings from the command line.

Historically, these operations happened the other way around, so it was solely 
up to the code reading the environment variables to ensure they played nice 
with each other. Now the command line processing logic needs to be updated to 
also ensure that it only ever increases these values and never reduces them.

--

___
Python tracker 

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



[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

Python 2.7 is not affected. Even if Python 2.7 has Demo/parser/test_unparse.py, 
this test is not part of the Python test suite, and it doesn't use 
random.sample(names, 10).

--

___
Python tracker 

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



[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 8e482bea21cb942804234e36d3c6c896aabd32da by Victor Stinner in 
branch 'master':
bpo-31174: Fix test_tools.test_unparse (#4102)
https://github.com/python/cpython/commit/8e482bea21cb942804234e36d3c6c896aabd32da


--

___
Python tracker 

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



[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-10-24 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4074

___
Python tracker 

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



[issue30768] PyThread_acquire_lock_timed() should recompute the timeout when interrupted by a signal

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

To check if you are using pthread+semaphore, use:

haypo@selma$ ./python -c 'import sys; print(sys.thread_info)'
sys.thread_info(name='pthread', lock='semaphore', version='NPTL 2.25')

Here you have pthread+semaphore. It's Fedora 26 running Linux kernel 4.13.

--

___
Python tracker 

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



[issue30768] PyThread_acquire_lock_timed() should recompute the timeout when interrupted by a signal

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

I wrote PR 4103 to fix the pthread+semaphore implementation of 
PyThread_acquire_lock_timed().

Apply PR 4103, apply attached test.patch, recompile Python, and run 
interrupted_lock.py to test the PR. Result:

haypo@selma$ ./python interrupted_lock.py 
acquire(timeout=1.0) took 1.0 seconds and got 911 signals

--
Added file: https://bugs.python.org/file47234/test.patch

___
Python tracker 

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



[issue27645] Supporting native backup facility of SQLite

2017-10-24 Thread Lele Gaifax

Lele Gaifax  added the comment:

Reasonable and quite simple to implement: done in commit 
https://github.com/lelit/cpython/commit/960303f9eb394e2ba91d10e5e674997a48811ac2

--

___
Python tracker 

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



[issue30768] PyThread_acquire_lock_timed() should recompute the timeout when interrupted by a signal

2017-10-24 Thread STINNER Victor

Change by STINNER Victor :


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

___
Python tracker 

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



[issue30768] PyThread_acquire_lock_timed() should recompute the timeout when interrupted by a signal

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

Ah, I found another caller of PyThread_acquire_lock_timed() with a timeout > 0 
and intr_flag=0: _enter_buffered_busy() of Modules/_io/bufferedio.c:

/* When finalizing, we don't want a deadlock to happen with daemon
 * threads abruptly shut down while they owned the lock.
 * Therefore, only wait for a grace period (1 s.).
 * Note that non-daemon threads have already exited here, so this
 * shouldn't affect carefully written threaded I/O code.
 */
st = PyThread_acquire_lock_timed(self->lock, (PY_TIMEOUT_T)1e6, 0);

--

___
Python tracker 

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



[issue30768] PyThread_acquire_lock_timed() should recompute the timeout when interrupted by a signal

2017-10-24 Thread STINNER Victor

STINNER Victor  added the comment:

interrupted_lock.py: test threading.Lock.acquire(timeout=1.0) with SIGALRM sent 
every 1 ms (so up to 1000 times in total). Example:

haypo@selma$ ./python interrupted_lock.py 
acquire(timeout=1.0) took 1.0 seconds and got 1000 signals

Oh, in fact, threading.Lock.acquire(timeout=1.0) already recomputes the timeout 
when interrupted.

In Python stdlib, PyThread_acquire_lock_timed() is only called from one place 
with intr_flag=0: faulthandler watchdog thread, but this thread blocks all 
signals:

/* we don't want to receive any signal */
sigfillset(&set);
pthread_sigmask(SIG_SETMASK, &set, NULL);

--
Added file: https://bugs.python.org/file47233/interrupted_lock.py

___
Python tracker 

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



  1   2   >