Mark Summerfield added the comment:
Georg said to assign this to Ethan Furman but I don't seem to have that
facility.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23292
___
New submission from Albert Zeyer:
The documentation about Py_Finalize() about freeing objects is not exactly
clear.
Esp., when I have called Py_INCREF somewhere, those objects will always have
ob_refcnt 0 unless I call Py_DECREF somewhere, what about these objects? Will
they be freed in
New submission from Mark Summerfield:
I think it would be worth documenting
globals().update(MyEnumeration.__members__) in the Interesting
Examples section of the enum docs.
I suspect that most people will find that importing enums is annoying
because they'll get
import A
STINNER Victor added the comment:
To wait for the exit of the subprocess, we use RegisterWaitForSingleObject().
To cancel this wait, we can use UnregisterWait() which returns immediatly.
Problem: UnregisterWait() doesn't tell us if the wait was cancelled or not, the
cancellation is
Drekin added the comment:
Unfortunately, I have little or no experience with Python C code and I even
don't have a C compiler installed so I cannot experiment. I'll just put my
ideas how to solve this here.
• Add sys.__readlinehook__ attribute, which can be set to a function taking a
prompt
Changes by Claudiu Popa pcmantic...@gmail.com:
--
priority: normal - high
stage: - patch review
versions: +Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22885
___
Changes by Georg Brandl ge...@python.org:
--
assignee: docs@python - ethan.furman
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23292
___
Joshua Landau added the comment:
I think I've fixed the memory leaks (plural).
There were also a host of other problems with the _UNPACK opcodes in ceval.
Here are the things I remember fixing, although I think I did slightly more:
- Not throwing an error when PyDict_New or PyDict_Update
Enrico Tröger added the comment:
I got the same error suddenly with Python 2.7.9.
I think this is quite unfortunate because it somewhat breaks existing
behaviour, especially that SSL certificate verification is enabled by default.
Don't get me wrong, this is the right thing in general and it
Guido van Rossum added the comment:
Python 3's exception chaining allows us to do the second (easier to catch
without resorting to except Exception: or even except:) while still showing
the original exception in the traceback.
--
nosy: +gvanrossum
Claudiu Popa added the comment:
Here's a patch which uses ast.literal_eval instead. This doesn't get code
executed, since literal_eval will fail loudly for anything other than a
literal. There are some issues to consider:
- let the current ast.literal_eval call bubble out with a lot of
New submission from aruseni:
https://docs.python.org/3/tutorial/controlflow.html
In many ways the object returned by range() behaves as if it is a list, but
in fact it isn’t.
--
messages: 234449
nosy: aruseni
priority: normal
severity: normal
status: open
title: A typo in the
Roundup Robot added the comment:
New changeset fb8a093db8b1 by Victor Stinner in branch '3.4':
Issue #23095, asyncio: Rewrite _WaitHandleFuture.cancel()
https://hg.python.org/cpython/rev/fb8a093db8b1
--
nosy: +python-dev
___
Python tracker
Roundup Robot added the comment:
New changeset d3804307cce4 by Victor Stinner in branch '3.4':
Issue #23095, asyncio: IocpProactor.close() must not cancel pending
https://hg.python.org/cpython/rev/d3804307cce4
--
___
Python tracker
Changes by STINNER Victor victor.stin...@gmail.com:
--
title: [Windows] asyncio: race condition related in IocpProactor.connect_pipe()
- [Windows] asyncio: race condition related to IocpProactor.connect_pipe()
___
Python tracker
STINNER Victor added the comment:
It took me several months to understand this issue. For the beginning of the
story, see:
https://code.google.com/p/tulip/issues/detail?id=196
But I think that *this* issue can be closed: UnregisterWaitEx() really do what
we need in asyncio.
I don't like the
New submission from STINNER Victor:
Currently, IocpProactor.connect_pipe() is implemented with QueueUserWorkItem()
which starts a thread that cannot be interrupted. Because of that, this
function requires special cases in _register() and close() methods of
IocpProactor.
While fixing the
Joshua Landau added the comment:
The _UNPACK opcodes are new in this changelist.
Yup, but they're used in the other unpacking syntax too:
(*(1, 2, 3), *(4, 5, 6))
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2292
Guido van Rossum added the comment:
Congrats with the fix, and thanks for your perseverance!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23095
___
New submission from STINNER Victor:
ProactorEventLoop lacks UDP support: create_datagram_endpoint() is not
supported.
New functions should be added to the _overlapped modul. Example: add maybe
WSARecvFrom()?
--
components: Windows, asyncio
messages: 234456
nosy: gvanrossum, haypo,
Claudiu Popa added the comment:
Thanks for the tip, Guido. The new patch uses exception chaining. If this needs
backporting, most probably the first patch can be used.
--
Added file: http://bugs.python.org/file37813/issue22885_1.patch
___
Python
Changes by aruseni aruseni.mag...@gmail.com:
--
assignee: - docs@python
components: +Documentation
nosy: +docs@python
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23294
___
STINNER Victor added the comment:
IocpProactor.close() must not cancel pending _WaitCancelFuture futures
FYI I found this bug when running the trollius test suite.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23095
Neil Girdhar added the comment:
Very nice! So what's left besides errors?
* Fixing the grammar, ast, and compilation for the list, dict, and set
comprehension element unpackings
Now the primary problem is giving good errors; I don't know how to make them
look like they came from the
R. David Murray added the comment:
bytes does support startswith:
b'abc'.startswith(b'a')
True
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23297
___
Andy Zobro added the comment:
This breaks custom actions.
e.g.:
class dict_action(argparse.Action):
def __init__(self, *a, **k):
argparse.Action.__init__(self, *a, **k)
TypeError: __init__() got an unexpected keyword argument 'allow_abbrev'
--
nosy: +xobes
Neil Girdhar added the comment:
Also maybe not in this changelist, but we should consider replacing STORE_MAP
and BUILD_MAP with a single opcode BUILD_MAP(n) that produces a dict out of the
top n items on the stack just like BUILD_LIST(n) does. What do you think?
--
Terry J. Reedy added the comment:
I answered my Q1 in msg187219: test.test_gettest is currently passing, with no
skips, on 2.7 and 3.4 on Win 7.
patch.diff: I would rather add the 4 lines of the proposed idle_i18n.py to an
existing module, perhaps Bindings.py itself, since that is the first
New submission from dongwm:
Sometimes I need to use argparse like this:
parser = argparse.ArgumentParser(prog='PROG')
group = parser.add_mutually_dependence_group()
group.add_argument('--foo')
group.add_argument('--bar')
parser.parse_args(['--foo', 'f', '--bar', 'b'])
Namespace(bar='b',
Changes by dongwm ciici...@gmail.com:
Added file: http://bugs.python.org/file37816/argparse_test.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23298
___
Andy Zobro added the comment:
Ignore previous comment, I wish I could delete it.
I simply provided the allow_abbrev to the wrong function and spent zero time
investigating the error.
--
___
Python tracker rep...@bugs.python.org
Changes by Benjamin Peterson benja...@python.org:
--
resolution: - duplicate
status: open - closed
superseder: - ‘tokenize.detect_encoding’ is confused between text and bytes:
no ‘startswith’ method on a byte string
___
Python tracker
Changes by dongwm ciici...@gmail.com:
Added file: http://bugs.python.org/file37815/argparse_doc.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23298
___
Eric V. Smith added the comment:
What's the typo? I'm not seeing it.
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23294
___
Joshua Landau added the comment:
According to the standard, int can be only 16 bits long so that only leaves
255/255. However, if the offset is on top of the dictionary count, this is
easily enough to clear the limits for the maximum function size (worst case is
a merge of 255 dicts with an
Neil Girdhar added the comment:
You're right.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2292
___
___
Python-bugs-list mailing list
Neil Girdhar added the comment:
I am a huge fan of giving good errors. Looks good to me. Will we need to make
sure that the call helper function we worked on produces additional
BUILD_MAP_UNPACK opcodes every 256 dictionaries just in case?
--
___
Neil Girdhar added the comment:
Another option to consider is to just use a bit on the BUILD_MAP_UNPACK and
then have a stack marking opcode at the function call (not sure what to call
it, but say FUNCTION_CALL_MARK)
The advantage would be you don't store or calculate relative stack
Joshua Landau added the comment:
Functions are already limited to 255 arguments, so I don't think so.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2292
___
Neil Girdhar added the comment:
Oh, I see. For BUILD_MAP_UNPACK we don't want to raise on duplicate dict
comprehension element unpackings, right? Maybe we should add a different
opcode, or else a flag to the opcodes, or else use the top bit of the length
parameter? What do you think?
Neil Girdhar added the comment:
I see your point: if there are 255 dictionaries, there's no room for neither
preceding keyword arguments nor positional arguments. Okay, then I like your
solution.
--
___
Python tracker rep...@bugs.python.org
Joshua Landau added the comment:
We wouldn't want to replace STORE_MAP since that's used in dictionary
comprehensions, but replacing BUILD_MAP with BUILD_MAP(n) sounds like a great
idea.
--
___
Python tracker rep...@bugs.python.org
Joshua Landau added the comment:
Good catch.
CALL_FUNCTION seems to split its opcode into two to give it a
positional-keyword pair so this seems fine. I'd hope we can do the same thing;
personally I would do:
BUILD_MAP_UNPACK(
position_of_function_in_stack_or_0 8 |
New submission from Ben Finney:
In `tokenize.detect_encoding` is the following code::
first = read_or_stop()
if first.startswith(BOM_UTF8):
# …
The `read_or_stop` function is defined as::
def read_or_stop():
try:
return readline()
except
New submission from Ben Finney:
In `tokenize.detect_encoding` is the following code::
first = read_or_stop()
if first.startswith(BOM_UTF8):
# …
The `read_or_stop` function is defined as::
def read_or_stop():
try:
return readline()
except
Ben Finney added the comment:
Possibly related to issue9969.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23297
___
___
Python-bugs-list
Mark Lawrence added the comment:
I've noticed a similar problem this morning with 5 modules rebuilt under Debug
but 29 under Release. I believe the change that triggered me spotting it is
this fb8a093db8b1 Issue #23095. Do we need a new issue for this?
--
New submission from Mike Sampson:
I'm seeing differing behaviour with subprocess.Popen(..., close_fds = False)
between 3.2 and 3.4. The docs don't say this is meant to be the case as far as
I can see.
Python 3.2.3 on Debian Wheezy
=
import subprocess
import os
Mike Sampson added the comment:
Ah, got it. Didn't see the note on the os.pipe() docs. Thanks. Closing. Sorry
for the noise.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23288
___
Changes by Mike Sampson m...@sambodata.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23288
___
___
Python-bugs-list
Changes by koobs koobs.free...@gmail.com:
--
nosy: +koobs
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22176
___
___
Python-bugs-list mailing
Changes by Mayank Tripathi oqua...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file37804/intro_typo.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23286
___
Charles-François Natali added the comment:
The review diff is weird: it seems it contains changes that aren't
EINTR-related (see e.g. argparse.rst).
Here's a manually generated diff.
--
Added file: http://bugs.python.org/file37802/eintr.diff
___
Neil Girdhar added the comment:
Added many tests, six of which fail. Started work on grammar to fix new tests.
--
Added file: http://bugs.python.org/file37805/starunpack11.diff
___
Python tracker rep...@bugs.python.org
STINNER Victor added the comment:
File descriptors are not closed, but not inherited neither, in Python 3.4. See
the PEP 446.
To have a reliable behaviour on all platforms and all Python versions, just use
the pass_fds parameter.
--
nosy: +haypo
STINNER Victor added the comment:
https://docs.python.org/dev/library/os.html#os.pipe
Changed in version 3.4: The new file descriptors are now non-inheritable.
If you don't use the subprocess module, you may use os.set_inheritable().
Changes by lilydjwg lilyd...@gmail.com:
--
nosy: +lilydjwg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5907
___
___
Python-bugs-list mailing
Changes by lilydjwg lilyd...@gmail.com:
--
nosy: +lilydjwg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11698
___
___
Python-bugs-list mailing
Michael Vogt added the comment:
Thanks everyone for the comments and feedback!
Attached is a updated patch with tests and a documentation update.
Feedback is very welcome. I decided to skip the test on systems where root is
not uid,gid=0. I could also mock that of course if you prefer it
New submission from Piotr Majkrzak:
In documentation
https://docs.python.org/3/library/concurrent.futures.html#concurrent.futures.Executor.map
is writen that this fucntion is equivalent to the builtin map. But it is not
true due to the fact that it is not lazy evalueded. The reason is in
Yuriy Taraday added the comment:
Can we move forward and land this patch? It seems to be working and for some
reason it even makes that microbenchmark work faster.
--
versions: +Python 3.5 -Python 3.3
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Here is even faster patch. When there are no dummies in source set we can just
dump a table, placing entries at the same indices.
$ ./python -m timeit -s s = set(range(10**4)) -- frozenset(s)
Unpatched: 1000 loops, best of 3: 658 usec per loop
Patched: 1000
Changes by R. David Murray rdmur...@bitdance.com:
--
resolution: - not a bug
stage: - resolved
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23288
___
Joshua Landau added the comment:
Some of the tests seemed to be failing simply because they were incorrect. This
fixes that.
--
Added file: http://bugs.python.org/file37806/starunpack12.diff
___
Python tracker rep...@bugs.python.org
New submission from Serhiy Storchaka:
Proposed patch makes faster creating new set from other set. The benefit is
only few percents when there are no hash conflicts, but can be significant if
there are hash duplicates.
$ ./python -m timeit -s s = set(range(10**4)) -- frozenset(s)
Unpatched:
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
Removed message: http://bugs.python.org/msg234435
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12312
___
Changes by Berker Peksag berker.pek...@gmail.com:
--
stage: needs patch - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12029
___
___
liyang added the comment:
--
name:李洋
celephone:15011548154
--
nosy: +liyang1...@gmail.com
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12312
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
nosy: +pitrou, rhettinger
Added file: http://bugs.python.org/file37807/set_faster_copy.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23290
69 matches
Mail list logo