[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Paul Moore
Paul Moore added the comment: New changeset f1502d097c29b266a5748312ee2451a2d6ac0af6 by Paul Moore (Stefan Grönke) in branch 'master': bpo-31569: correct PCBuild/ case to PCbuild/ in build scripts and docs (GH-3711)

Re: Grumpy-pants spoil-sport [was Re: [Tutor] beginning to code]

2017-09-25 Thread Ned Batchelder
On 9/25/17 12:29 PM, Steve D'Aprano wrote: Regardless of whether I'm using Python, Swift, Java, C, Pascal or Scheme, if I write something like: x = Parrot(name="Polly") (using Python syntax for simplicity) and somebody tries to tell me that the value of x is anything but a Parrot instance

[issue31577] crash in os.utime() in case of a bad ns argument

2017-09-25 Thread Oren Milman
New submission from Oren Milman: The following code causes the interpreter to crash: class BadInt: def __divmod__(*args): return 42 import os os.utime('foo.txt', ns=(BadInt(), 1)) This is because split_py_long_to_s_and_ns() (in Modules/posixmodule.c) assumes that PyNumber_Divmod()

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Paul Moore
Paul Moore added the comment: OK, having re-read the PR, I'm fine with applying it as is, too. -- ___ Python tracker ___

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-25 Thread Steve Dower
Changes by Steve Dower : -- pull_requests: +3738 ___ Python tracker ___ ___

TypeError with map with no len()

2017-09-25 Thread john polo
Python List, I am trying to make practice data for plotting purposes. I am using Python 3.6. The instructions I have are import matplotlib.pyplot as plt import math import numpy as np t = np.arange(0, 2.5, 0.1) y1 = map(math.sin, math.pi*t) plt.plot(t,y1) However, at this point, I get a

Grumpy-pants spoil-sport [was Re: [Tutor] beginning to code]

2017-09-25 Thread Steve D'Aprano
On Mon, 25 Sep 2017 10:53 pm, Ned Batchelder wrote: > Would we be able to end these interminable debates if we just agree that > we all know how it works, If only that were true. Not everyone understands Python semantics (or for that matter, Java/Swift/language of your choice) and I still come

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Zachary Ware
Zachary Ware added the comment: Personally, *I'd* prefer PC -> Windows and PCbuild -> Windows\build :) I'm also good with the PR as is. -- ___ Python tracker

[issue31569] inconsistent case of PCbuild/ directory

2017-09-25 Thread Steve Dower
Steve Dower added the comment: I'm okay with the PR as it stands, especially the parts that affect GitHub and appveyor, as those are almost certainly using case sensitive comparisons. It's definitely not easier to update the case of a file that is in git, and doing so will very likely break

Re: [Tutor] beginning to code

2017-09-25 Thread Ned Batchelder
On 9/25/17 9:15 AM, Antoon Pardon wrote: Op 25-09-17 om 14:53 schreef Ned Batchelder: On 9/25/17 8:24 AM, Steve D'Aprano wrote: On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote: Pass by reference doesn't imply being able to write a swap function. Really. Do you have a counter-example? A

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

2017-09-25 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___

Re: python console menu level looping

2017-09-25 Thread ROGER GRAYDON CHRISTMAN
On Mon, Sep 24, 2017 09:41 PM, Daiyue Weng wrote: > Hi, I tried to make a menu using print statements in Python 3. The code is >as follows, > >print('insert data into: ') >data_insert_method = ['new collection', 'existing collection'] >for index, elem in

[issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same.

2017-09-25 Thread R. David Murray
Changes by R. David Murray : -- nosy: +r.david.murray ___ Python tracker ___ ___

Re: Looking for an algorithm - calculate ingredients for a set of recipes

2017-09-25 Thread Paul Moore
On 25 September 2017 at 15:20, Paul Moore wrote: > On 25 September 2017 at 14:23, Ian Kelly wrote: >> You have a DAG, so you can sort it topologically. Then you can process >> it in that order so that everything that uses X will be processed >> before

Re: _sitebuiltins?

2017-09-25 Thread Steve D'Aprano
On Mon, 25 Sep 2017 12:05 pm, Stefan Ram wrote: > So when after > > import builtins > > the expression > > builtins.dir > > yields a value, then »dir« must be in »builtins«. dir is in builtins *now*, but that doesn't tell you where it came from. Anything can be added, or removed, from

Re: _sitebuiltins?

2017-09-25 Thread Steve D'Aprano
On Mon, 25 Sep 2017 11:39 am, Stefan Ram wrote: > The problem with »__module__« is that it is not always > a permissible prefix for a use of the name. For example, That's not what __module__ is intended for. Just because an object obj was created inside module M doesn't mean it is

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Marko Rauhamaa
Chris Angelico : > On Mon, Sep 25, 2017 at 7:41 PM, Marko Rauhamaa wrote: >> In Python, all expressions evaluate pointers. > > And that's an assertion that isn't backed by anything in the Python > specification. Where do you get that all Python expressions are

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Marko Rauhamaa
Antoon Pardon : > Op 25-09-17 om 15:16 schreef Marko Rauhamaa: >> No, I'm not. I'm talking about pointers in the abstract sense, both in >> case of Python and Pascal. Neither language gives any hint as to the >> physical nature of the pointer. > > Yes you are. Python doesn't

Re: Looking for an algorithm - calculate ingredients for a set of recipes

2017-09-25 Thread Paul Moore
On 25 September 2017 at 14:23, Ian Kelly wrote: > You have a DAG, so you can sort it topologically. Then you can process > it in that order so that everything that uses X will be processed > before X so that when you get to X you'll know exactly how much of it > you need

[issue31573] PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage)

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- title: PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage -> PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Chris Angelico
On Mon, Sep 25, 2017 at 7:41 PM, Marko Rauhamaa wrote: > Antoon Pardon : > >> the semantics of an assignment depends on the language > > I've only seen one kind of assignment in the general-purpose programming > languages I know, maybe with the exception of

[issue31573] PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- title: crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage -> PyStructSequence_New() doesn't validate its input type (crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

[issue31573] crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue31573] crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: Attached PR 3750 tries to validate the input type. The problem is that structseq is not exactly a type. It's hard to really validate everything. See the comment test in my PR. -- nosy: +haypo ___ Python tracker

[issue31573] crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch pull_requests: +3737 stage: -> patch review ___ Python tracker ___

Re: Looking for an algorithm - calculate ingredients for a set of recipes

2017-09-25 Thread Ian Kelly
On Mon, Sep 25, 2017 at 6:49 AM, Paul Moore wrote: > I'm trying to work out a good algorithm to code a calculation I need > to do. I can see brute force ways of handling the problem, but I keep > getting bogged down in details, and the question seems like it's > something

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Antoon Pardon
Op 25-09-17 om 15:16 schreef Marko Rauhamaa: > Antoon Pardon : > >> Op 25-09-17 om 14:16 schreef Marko Rauhamaa: >>> Python only operates with pointers. You can operate with pointers in >>> Pascal as well. >> You are talking about implementation details. > No, I'm not. I'm

[issue31558] gc.freeze() - an API to mark objects as uncollectable

2017-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Marko Rauhamaa
Antoon Pardon : > Op 25-09-17 om 14:16 schreef Marko Rauhamaa: >> Python only operates with pointers. You can operate with pointers in >> Pascal as well. > > You are talking about implementation details. No, I'm not. I'm talking about pointers in the abstract sense, both in

[issue31576] problem in math

2017-09-25 Thread ANEESH JOSE
ANEESH JOSE added the comment: Thankyou for the information . -- ___ Python tracker ___ ___ Python-bugs-list

Re: [Tutor] beginning to code

2017-09-25 Thread Antoon Pardon
Op 25-09-17 om 14:53 schreef Ned Batchelder: > On 9/25/17 8:24 AM, Steve D'Aprano wrote: >> On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote: >> >>> Pass by reference doesn't imply being able to >>> write a swap function. >> Really. Do you have a counter-example? >> >> >>> A swap function as

[issue31576] problem in math

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: It seems like you are confused between radians and degrees. math.sin() expects radians. https://docs.python.org/dev/library/math.html#math.sin Sorry but the Python bug tracker is not the right to ask questions. I close your bug report. -- nosy:

[issue31576] problem in math

2017-09-25 Thread ANEESH JOSE
New submission from ANEESH JOSE: We know that the answer of sin 90 is 1. But In Python's library math,the value of it is around 0.83... My program is as follows: import math a=math.sin(90) print(a) #Output obtained is 0.83. Hope you guys solve this on the next update or nearby I hope it is a

Looking for an algorithm - calculate ingredients for a set of recipes

2017-09-25 Thread Paul Moore
I'm trying to work out a good algorithm to code a calculation I need to do. I can see brute force ways of handling the problem, but I keep getting bogged down in details, and the question seems like it's something that should have been solved plenty of times in the past, I just don't know where to

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Antoon Pardon
Op 25-09-17 om 14:16 schreef Marko Rauhamaa: > Antoon Pardon : > >> Op 25-09-17 om 13:32 schreef Marko Rauhamaa: >>> In Python, assignment "mutates the target" as well. It's only that in >>> Python, the target is always a pointer. >> Fine if you want to word it like that, the

Re: [Tutor] beginning to code

2017-09-25 Thread Ned Batchelder
On 9/25/17 8:24 AM, Steve D'Aprano wrote: On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote: Pass by reference doesn't imply being able to write a swap function. Really. Do you have a counter-example? A swap function as possible in pascal requires two conditions. 1) Pass by reference 2)

Re: [Tutor] beginning to code

2017-09-25 Thread Antoon Pardon
Op 25-09-17 om 14:24 schreef Steve D'Aprano: > On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote: > >> Pass by reference doesn't imply being able to >> write a swap function. > Really. Do you have a counter-example? Python, smalltalk, scheme. > > >> A swap function as possible in pascal requires

[issue31574] Add dtrace hook for importlib

2017-09-25 Thread Christian Heimes
Christian Heimes added the comment: Improved script and output for "import asyncio": $ sudo stap import.stp -c "./python -c 'import asyncio'" [1506343527655342994] * Importing '_frozen_importlib_external' ... [1506343527655797118] + Imported '_frozen_importlib_external' in 454us

[issue31553] Extend json.tool to handle jsonlines (with a flag)

2017-09-25 Thread Eric Moyer
Eric Moyer added the comment: I planned to write the PR myself, on the principle of "it's my itch, I should scratch it." But if you think it is better for someone else to write it, you know the codebase better than I, and you know how long a PR takes to review/fix. My intention is to help. I'll

[issue31520] ResourceWarning: unclosed warning

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: > I’m curious how you manage to trigger the warning in the “closed” state. It comes from Refleak buildbots. Example: 0:13:47 load avg: 3.24 [ 52/407] test_urllib2net passed (239 sec) beginning 6 repetitions 123456 Resource 'http://www.imdb.com' is not

Re: [Tutor] beginning to code

2017-09-25 Thread Steve D'Aprano
On Mon, 25 Sep 2017 08:05 pm, Antoon Pardon wrote: > Pass by reference doesn't imply being able to > write a swap function. Really. Do you have a counter-example? > A swap function as possible in pascal requires two conditions. > > 1) Pass by reference > 2) Copy-over assignment. I don't know

[issue31574] Add dtrace hook for importlib

2017-09-25 Thread Christian Heimes
Christian Heimes added the comment: Example output: $ sudo stap import.stp -c "./python -c pass" [1506342342142233574] * Importing '_frozen_importlib_external' ... [1506342342142719538] + Imported '_frozen_importlib_external' [1506342342143260191] * Importing 'zipimport' ...

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Marko Rauhamaa
Antoon Pardon : > Op 25-09-17 om 13:32 schreef Marko Rauhamaa: >> In Python, assignment "mutates the target" as well. It's only that in >> Python, the target is always a pointer. > > Fine if you want to word it like that, the assignments in Pascal and > Python are still

[issue31575] Functional Programming HOWTO sub-optimal example for reduce

2017-09-25 Thread Anran Yang
New submission from Anran Yang: At the end of the Functional Programming HOWTO document (https://docs.python.org/3.7/howto/functional.html) the usage of reduce/lambda/for loops are compared and discussed. However, the example for reduce seems sub-optimal and thus the discussion is not that

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Antoon Pardon
Op 25-09-17 om 13:32 schreef Marko Rauhamaa: > Antoon Pardon : > >> Op 25-09-17 om 11:41 schreef Marko Rauhamaa: >>> Antoon Pardon : >>> the semantics of an assignment depends on the language >>> I've only seen one kind of assignment in the

[issue31520] ResourceWarning: unclosed warning

2017-09-25 Thread Martin Panter
Martin Panter added the comment: I’m curious how you manage to trigger the warning in the “closed” state. The Python I have handy is half a year out of date, but all my attempts to trigger the warning either produce the less confusing version, ResourceWarning: unclosed or there is no

[issue30347] itertools.groupby() can fail a C assert()

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Hmm, the sole issue30346 is not enough for fixing this crash. I don't know if there is a simpler fix based on issue30346, but since PR 1557 removes the code duplication I'm going to merge it in any case. -- ___

[issue30347] itertools.groupby() can fail a C assert()

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- versions: -Python 3.5 ___ Python tracker ___

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I committed the patch from Raymond's name, but GitHub set me as the author of the commit. :( -- ___ Python tracker

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d94a65a0694a188713f91ba7c9fffded090247dc by Serhiy Storchaka in branch '2.7': bpo-25732: Make functools.total_ordering implementing __ne__. (#3748) https://github.com/python/cpython/commit/d94a65a0694a188713f91ba7c9fffded090247dc --

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Marko Rauhamaa
Antoon Pardon : > Op 25-09-17 om 11:41 schreef Marko Rauhamaa: >> Antoon Pardon : >> >>> the semantics of an assignment depends on the language >> I've only seen one kind of assignment in the general-purpose >> programming languages I know,

[issue31573] crashes in os.wait3() and os.wait4() in case of a bad resource.struct_rusage

2017-09-25 Thread Oren Milman
New submission from Oren Milman: The following code causes the interpreter to crash: import os import time import resource new_pid = os.fork() if new_pid == 0: time.sleep(0.5) else: resource.struct_rusage = None os.wait3(0) We would get a crash also if we replaced 'os.wait3(0)'

[issue30152] Reduce the number of imports for argparse

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: functools.wraps() is used in more complex programs. The purpose of this PR is speeding up small scripts that just start, parse arguments, do its fast work (so fast as outputting a help or a version) and exit. Even collections is not used in a half of my

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Antoon Pardon
Op 25-09-17 om 11:41 schreef Marko Rauhamaa: > Antoon Pardon : > >> the semantics of an assignment depends on the language > I've only seen one kind of assignment in the general-purpose programming > languages I know, maybe with the exception of Prolog and Rust. I disagree.

Re: [Tutor] beginning to code

2017-09-25 Thread Antoon Pardon
Op 22-09-17 om 15:30 schreef Steve D'Aprano: > On Fri, 22 Sep 2017 10:27 pm, Marko Rauhamaa wrote: > >> r...@zedat.fu-berlin.de (Stefan Ram): >> >>> Marko Rauhamaa writes: swap(slot_ref(locals(), "x"), slot_ref(locals(), "y")) >>> You need to be able to write the call as

[issue31415] Add -X option to show import time

2017-09-25 Thread Christian Heimes
Christian Heimes added the comment: +1 for an option to profile import time. I have a minor complain: The output format is not machine-friendly, which makes it harder to perform automatic analysis. I created #31574 / PR3749 to add dtrace probes. -- nosy: +christian.heimes

[issue31574] Add dtrace hook for importlib

2017-09-25 Thread Christian Heimes
Changes by Christian Heimes : -- keywords: +patch pull_requests: +3736 stage: needs patch -> patch review ___ Python tracker ___

[issue31574] Add dtrace hook for importlib

2017-09-25 Thread Christian Heimes
New submission from Christian Heimes: #31415 proposed an option to show import timings. The output is primarily designed for humans. I propose to instrument importlib with two dtrace hooks: probe import__find__load__start(const char *) probe import__find__load__done(const char *, int);

[issue31573] struct_rusage

2017-09-25 Thread Oren Milman
Changes by Oren Milman : -- nosy: Oren Milman priority: normal severity: normal status: open title: struct_rusage ___ Python tracker

[issue30152] Reduce the number of imports for argparse

2017-09-25 Thread INADA Naoki
INADA Naoki added the comment: Oh, the pull request is far larger than I thought! I doubt that avoiding functools and collections is worth enough, because it is very common. For example: * functools is very commonly imported, especially for wraps(). * collections is imported by functools,

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +3735 stage: commit review -> patch review ___ Python tracker ___

[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2017-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 25/09/2017 à 11:39, STINNER Victor a écrit : > > Antoine: "I'm wary of raising an exception. Assuming Benjamin's patch is > correct, I vote for it." > > Can you please elaborate? You are fine with the fact that iter(file) in two > thread can return the

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Marko Rauhamaa
Antoon Pardon : > the semantics of an assignment depends on the language I've only seen one kind of assignment in the general-purpose programming languages I know, maybe with the exception of Prolog and Rust. So the assignment is the same everywhere, only the evaluation

[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: Antoine: "I'm wary of raising an exception. Assuming Benjamin's patch is correct, I vote for it." Can you please elaborate? You are fine with the fact that iter(file) in two thread can return the same line? --

[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2017-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm wary of raising an exception. Assuming Benjamin's patch is correct, I vote for it. -- ___ Python tracker ___

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

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: bpo-31549 has been marked as a duplicate of this issue. -- ___ Python tracker ___

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

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: Formatting timezone on Windows in the right encoding is an old Python (especially Python 3) issue: https://bugs.python.org/issue1040 https://bugs.python.org/issue8304 https://bugs.python.org/issue10653 https://bugs.python.org/issue16322#msg174164 --

Re: [Tutor] beginning to code

2017-09-25 Thread Antoon Pardon
Op 24-09-17 om 04:13 schreef Steve D'Aprano: >> and consider >> that something else has to happen as an alternative, and (2) understand >> that in Python, objects don't have names, they have references (which >> have names). The rest could be "implementation dependent" (no?) > No. > > There are

[issue25732] functools.total_ordering does not correctly implement not equal behaviour

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Serhiy, do you want to bring this to fruition? -- assignee: rhettinger -> serhiy.storchaka ___ Python tracker ___

[issue31520] ResourceWarning: unclosed warning

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: socket.SocketIO inherits from io.RawIOBase which inherits from io.IOBase. io.IOBase has a finalizer which calls the close() method. I tried to add a __del__ method to socket.SocketIO, but the object was already closed by the finalizer. io.FileIO uses a trick

[issue30347] itertools.groupby() can fail a C assert()

2017-09-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: rhettinger -> serhiy.storchaka ___ Python tracker ___

[issue26491] Defer DECREFs until enum object is in a consistent state for re-entrancy

2017-09-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 -Python 2.7, Python 3.5, Python 3.6 ___ Python tracker

[issue26491] Defer DECREFs until enum object is in a consistent state for re-entrancy

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 8110dbd470f3daa4de58dda66d360e3c26d3b94f by Raymond Hettinger in branch 'master': bpo-26491 Defer DECREFs until enumobject is in a consistent state (#3747) https://github.com/python/cpython/commit/8110dbd470f3daa4de58dda66d360e3c26d3b94f

[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: It's difficult to make a choice between Benjamin's PR 3670 and Serhiy's PR 3672. Benjamin wrote that about his PR: > No attempt is made to define or provide "reasonable" semantics for iterating > over a file on multiple threads. (Non-crashing) races are still

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: libexpat has been upgraded to version 2.2.4 in Python 2.7, 3.3, 3.4, 3.5, 3.6 and master. I added an unit test to Python 2.7, 3.6 and master. I'm not sure about backporting the new unit test to Python 3.3, 3.4 and 3.5. I close the issue. --

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset ad051cbce1360ad3055a048506c09bc2a5442474 by Victor Stinner in branch '3.6': bpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug (#3570) (#3746) https://github.com/python/cpython/commit/ad051cbce1360ad3055a048506c09bc2a5442474 --

[issue26491] Defer DECREFs until enum object is in a consistent state for re-entrancy

2017-09-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- pull_requests: +3734 ___ Python tracker ___

Re: Call by binding [was Re: [Tutor] beginning to code]

2017-09-25 Thread Antoon Pardon
Op 25-09-17 om 00:39 schreef Gregory Ewing: > Dennis Lee Bieber wrote: >> "Binding" itself tends to be Python specific terminology -- in >> that it >> is the parameter /name/ that gets bound/attached to the argument >> /object/. >> It is the same method as used in any Python "assignment"

[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And in 3.3. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a6bddb8e4397df30926eb1ade6420a2277174227 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': [3.6] bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case of a bad __dict__. (GH-3254) (#3743)

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 5f5da728aec9c4f74cc771fbf30037b64a447514 by Victor Stinner in branch '2.7': bpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug (#3570) (#3745) https://github.com/python/cpython/commit/5f5da728aec9c4f74cc771fbf30037b64a447514 --

[issue27385] itertools.groupby has misleading doc string

2017-09-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 -Python 2.7, Python 3.5 ___ Python tracker

[issue27385] itertools.groupby has misleading doc string

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset e2a30cd35b95dad55aea10347655f246348d1951 by Raymond Hettinger (Miss Islington (bot)) in branch '3.6': [3.6] bpo-27385: Clarify docstring for groupby() (GH-3738) (#3744)

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +3733 ___ Python tracker ___ ___

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-25 Thread STINNER Victor
Changes by STINNER Victor : -- pull_requests: +3732 stage: commit review -> patch review ___ Python tracker ___

[issue31170] Update to expat 2.2.4 (expat: utf8_toUtf8 cannot properly handle exhausting buffer)

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset e6d9fcbb8d0c325e57df08ae8781aafedb71eca2 by Victor Stinner in branch 'master': bpo-31170: Write unit test for Expat 2.2.4 UTF-8 bug (#3570) https://github.com/python/cpython/commit/e6d9fcbb8d0c325e57df08ae8781aafedb71eca2 --

[issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: libexpat has been upgraded from 2.2.1 to 2.2.4 in 2.7, 3.4, 3.5, 3.6 and master branches. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker

[issue31568] Configure thinks it finds python3.5 but doesn't

2017-09-25 Thread STINNER Victor
STINNER Victor added the comment: It seems like the bug was fixed. Nice. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue27385] itertools.groupby has misleading doc string

2017-09-25 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3731 ___ Python tracker ___

[issue27385] itertools.groupby has misleading doc string

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 49392c63a243052c8013bef80d35202bb6d7c404 by Raymond Hettinger in branch 'master': bpo-27385: Clarify docstring for groupby() (#3738) https://github.com/python/cpython/commit/49392c63a243052c8013bef80d35202bb6d7c404 --

[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've just updated the section on unbound methods. I'll be working on a number of other improvements over the next few weeks and will incorporate the suggested changes where appropriate. -- ___ Python tracker

[issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods"

2017-09-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods"

2017-09-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- dependencies: -Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) ___ Python tracker

[issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods"

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 73c915a5cd1cdd8775cf47b77fef7ca8fd42ad96 by Raymond Hettinger (Miss Islington (bot)) in branch '3.6': [3.6] bpo-23702: Update Descriptor-HOWTO to reflect the removal of unbound methods (GH-3739) (#3742)

[issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad

2017-09-25 Thread Roundup Robot
Changes by Roundup Robot : -- keywords: +patch pull_requests: +3730 stage: -> patch review ___ Python tracker ___

[issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 57c2561c8c5663aef55b00e3f29cba575ff36ccd by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31311: Fix a SystemError and a crash in ctypes._CData.__setstate__(), in case of a bad __dict__. (#3254)

[issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods"

2017-09-25 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +3729 ___ Python tracker ___

[issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods"

2017-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 0d4497b9cae7942b7f731a6f99a73985c3fb4630 by Raymond Hettinger in branch 'master': bpo-23702: Update Descriptor-HOWTO to reflect the removal of unbound methods (#3739)

[issue31549] test_strptime and test_time fail on non-English Windows

2017-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks a duplicate of issue16322. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> time.tzname on Python 3.3.0 for Windows is decoded by wrong encoding ___ Python tracker

<    1   2   3   >