Thomas Guettler added the comment:
Only few people seem to use daemon threads. We do and see this problem often
with Python 2.7.
How difficult is it to get this fixed for 2.7?
Is there a way to work around this problem?
--
nosy: +guettli
___
Antoine Pitrou added the comment:
It seems to me that the more appropriate change here would be to
redefine PyState_FindModule as return a *new* ref rather than a
borrowed ref and have it do the Py_INCREF before returning.
Code using it would then need to add an appropriate Py_DECREF. A
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
dependencies: +PEP 3121 Refactoring applied to _csv module
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
___
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
dependencies: +PEP 3121, 384 refactoring applied to curses_panel module
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
dependencies: +PEP 384 Refactoring applied to _csv module
title: PEP 3121 Refactoring - PEP 3121, 384 Refactoring
___
Python tracker rep...@bugs.python.org
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
dependencies: +PEP 384 inconsistent with implementation
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
___
Thomas Guettler added the comment:
There are some examples to work around this for Python2:
http://stackoverflow.com/questions/18098475/detect-interpreter-shut-down-in-daemon-thread
--
nosy: +guettli
___
Python tracker rep...@bugs.python.org
Changes by Alexander Belopolsky alexander.belopol...@gmail.com:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15787
___
___
Alexander Belopolsky added the comment:
Regarding the suggestion of separating PEP3121 and PEP384. It might be true
that datetime and other modules do not benefit directly from PEP 384, however
it is still a fact that the stdlib modules should be seen as a set of reference
modules, that are
New submission from Thomas Guettler:
This is a documentation bug: Since #1856 is not solved for Python2, it needs
to be documented.
Daemon Threads on Python2 can seg fault.
Work arounds:
http://stackoverflow.com/questions/18098475/detect-interpreter-shut-down-in-daemon-thread
--
Alexander Belopolsky added the comment:
With respect to PEP 384 refactoring, I would like to see
Tools/scripts/abitype.py used for most of the conversions. The PEP itself can
probably be amended to advertise this tool more prominently.
--
___
Serhiy Storchaka added the comment:
u'\U000104a2' == u'\ud801\udca2' on narrow build.
u'\ud801'.encode('utf-8', 'surrogatepass') == b'\xed\xa0\x81'
u'\udca2'.encode('utf-8', 'surrogatepass') == b'\xed\xb2\xa2'
Hope it will help.
--
___
Python
M. Dietrich added the comment:
for a logging library the important thing would be to not loose the information
that was meant to log. as i said i do alot of long-running huge-data-processing
scripts in py using the library. if the logging breaks but doesnt log what was
intended to log i judge
Roundup Robot added the comment:
New changeset 698fd628b001 by Eli Bendersky in branch '3.3':
Issue #18668: Properly document setting m_size in PyModuleDef
http://hg.python.org/cpython/rev/698fd628b001
New changeset 9877c25d9556 by Eli Bendersky in branch 'default':
Closing #18668: Properly
Eli Bendersky added the comment:
Thanks for the review!
--
resolution: fixed -
stage: committed/rejected - needs patch
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18668
Changes by Eli Bendersky eli...@gmail.com:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18668
___
Eli Bendersky added the comment:
Antoine, some questions about the patch:
First, I think it omits expat_capi from the state. Is that intentional?
Second, I'm not sure if this approach is fully aligned with PEP 3121. A global,
shared state is still used. Instead of actually having a different
Antoine Pitrou added the comment:
First, I think it omits expat_capi from the state. Is that
intentional?
What would it do in the state? There's nothing to release.
Second, I'm not sure if this approach is fully aligned with PEP 3121.
A global, shared state is still used. Instead of
Nick Coghlan added the comment:
I thought setting m_size to zero was for No per module state, but
reinitialization is fine? Does that not work? (I haven't actually tried it)
--
___
Python tracker rep...@bugs.python.org
Eli Bendersky added the comment:
On Wed, Aug 7, 2013 at 6:28 AM, Antoine Pitrou rep...@bugs.python.orgwrote:
Antoine Pitrou added the comment:
First, I think it omits expat_capi from the state. Is that
intentional?
What would it do in the state? There's nothing to release.
That's
New submission from Zhongyue Luo:
The docstring of methods put() and get() in Queue.py states
get(): If 'timeout' is a positive number, it blocks at most 'timeout' seconds
and raises the Full exception if no free slot was available within that time.
put(): If 'timeout' is a positive number,
Antoine Pitrou added the comment:
That's true, but I thought one of the goals of PEP 3121 is to
separate
states between sub-interpreters. So that one can't corrupt another.
I'm not
sure how much it matters in practice in this case of the pyexpat
capsule;
need to look into it more.
R. David Murray added the comment:
This is more of a documentation issue than a code issue. To be mathematically
precise, the text and error message should read a non-negative value.
Alternatively the text and error could be changed to report that timeout may
not be negative, which would
Vinay Sajip added the comment:
From the line number you mentioned, it looks like you're talking about Python
2.7. However, Python 2.7 is closed to new features: generally speaking, only
bug fixes are supposed to be committed to this branch.
I can consider expanding the Logged from ... error
New submission from Kristján Valur Jónsson:
A proposed patch adds two features to context managers:
1)It has always irked me that it was impossible to assemble nested context
managers in the python language. See issue #5251.
The main problem, that exceptions in __enter__ cannot be properly
Steven Velez added the comment:
This may be a small use case, but a use case none-the less. In my situation, I
am distributing a frozen python package and it runs under the users home
directory. If the user's name has international characters, this will fail.
I expect we will have similar
R. David Murray added the comment:
Your use cases are either already addressed by contextlib.ExitStack, or should
be addressed in the context of its existence. It is the replacement for
contextlib.nested.
--
nosy: +ncoghlan, r.david.murray
___
New submission from Vajrasky Kok:
Both python2 and python3 have this behaviour.
import os; os.getuid()
0
'I am root'
'I am root'
import spwd
spwd.getspnam('bin')
spwd.struct_spwd(sp_nam='bin', sp_pwd='*', sp_lstchg=15558, sp_min=0,
sp_max=9, sp_warn=7, sp_inact=-1, sp_expire=-1,
R. David Murray added the comment:
Ideally, for backward compatibility reasons we really ought to support access
by the old (incorrect) name even in 3.4 (with a deprecation warning, even more
ideally). I'm not sure if that's practical?
--
nosy: +r.david.murray
Kristján Valur Jónsson added the comment:
IMHO, exitstack is not a very nice construct. It's implementation is far
longer than contextlib.nested.
And the chief problem still remains, which has not been addressed until this
patch (as far as I know):
In Python, it is impossible to combine
R. David Murray added the comment:
Raising it on python-ideas sounds like a good idea, then.
I must admit that I don't understand what you mean by combining existing
context managers into a nested one that isn't addressed by ExitStack.
--
___
Changes by Eric Snow ericsnowcurren...@gmail.com:
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11619
___
___
Python-bugs-list
Kristján Valur Jónsson added the comment:
Simply put, there is no way in the language to nest two context managers, even
though we have full access to their implementation model, i.e. can call
__enter__ and __exit__ manually. This reflects badly (pun intended) on
Python's reflection and
Serhiy Storchaka added the comment:
Seems as Tk stores pasted \U000104a2 as surrogate pair \ud801\udca2. Then
it encoded in UTF-8 as \xed\xa0\x81\xed\xb2\xa2 end passed to Python. Python
converts char* to Unicode object with PyUnicode_FromString() which forbids
invalid UTF-8 including encoded
Antoine Pitrou added the comment:
(and of course, with module states not being PyObjects, we have the same
lifetimes issues as with Py_buffers not being PyObjects)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18674
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file31184/tkinter_string_conv.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file31185/tkinter_string_conv.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13153
___
New submission from Derek Wilson:
Escaping strings for serialization or display is a common problem. Currently,
in python3, in order to escape a sting, you need to do this:
'my\tstring'.encode('unicode_escape').decode('ascii')
This would give you a string that was represented like this:
Zhongyue Luo added the comment:
David,
How about like below?
elif timeout sys.float_info.epsilon:
raise ValueError('timeout' must be a positive number)
The docstring has been there for quite a while and IMHO it just doesn't make
sense passing 0.0 as a timeout value.
--
Changes by Richard Oudkerk shibt...@gmail.com:
Added file: http://bugs.python.org/file31186/b3620777f54c.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8713
___
Richard Oudkerk added the comment:
I have done quite a bit of refactoring and added some extra tests.
When I try using the forkserver start method on the OSX Tiger buildbot (the
only OSX one available) I get errors. I have disabled the tests for OSX, but
it seemed to be working before.
New submission from Corey Farwell:
Before someone comes in and tries to correct me, I know Python documentation is
different than Javadocs. It is common to test if the JSON is malformed using a
try...catch. What if I want to catch something more specific than Exception?
The only way a user
Richard Oudkerk added the comment:
IMHO it just doesn't make sense passing 0.0 as a timeout value.
I have written lots of code that looks like
timeout = max(deadline - time.time(), 0)
some_function(..., timeout=timeout)
This makes perfect sense. Working code should not be broken --
Corey Farwell added the comment:
Ideally, this would also be decoumented in json.loads/json.load
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18680
___
R. David Murray added the comment:
In what way does repr(x)[1:-1] not serve your use case?
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18679
___
R. David Murray added the comment:
Exactly. 0 means Don't wait, just raise an error immediately if the queue is
empty/full.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
___
M. Dietrich added the comment:
thanks, it will be really helpful for me to have this fixed.
as i consider this a bug it would be possible to fix this for 2.7 and yes
you are right, i talked about 2.7 as we are still using this version in
production.
--
status: pending - open
Vinay Sajip added the comment:
Sorry, not for 2.7 - it's not a bug.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18671
___
___
Nick Coghlan added the comment:
I pitched the idea of making it possible to skip the with statement body
quite some time ago, and Guido convinced me it was a bad idea for much the
same reason he chose PEP 343 over his original PEP 340 design: allowing
suppression of exceptions from __enter__
Kristján Valur Jónsson added the comment:
Hi there.
allowing
suppression of exceptions from __enter__ hides local control flow by
blurring the boundaries between with and if statements.
I'm not sure what this means. To me, it is a serious language design flaw that
you can write a context
Madison May added the comment:
Nick, it was definitely a good thing to mention. I had to learn the edit,
build, test cycle the hard way my first time. It took me a good 15-20 minutes
to figure out why none of my edits seemed to change anything :)
Anyhow, here's how I see the issue. It
Changes by Zhongyue Luo zhongyue@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file31187/queue_timeout_docstring.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
Changes by Zhongyue Luo zhongyue@gmail.com:
Added file: http://bugs.python.org/file31188/queue_timeout_docstring.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
___
Changes by Zhongyue Luo zhongyue@gmail.com:
Added file: http://bugs.python.org/file31189/queue_timeout_docstring.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18676
___
Zachary Ware added the comment:
(Apologies for the delay in replies, my available time evaporated without
notice...)
Antoine Pitrou wrote:
Does registerResource() mutate some kind of global per-process state? This
doesn't sound like a good idea.
It's not the greatest of ideas, no; but I
Zachary Ware added the comment:
Antoine Pitrou wrote:
I've committed a fix to 2.7 (I hope it's really a fix, since I don't know how
to test it).
I'll let Benjamin and Barry decide whether to backport to 2.6 and 3.2.
As for 3.1, it's pretty much dead.
That fix does work, but it should
Zachary Ware added the comment:
Here's a new patch; test_json.__main__ now uses an absolute import rather than
trying to use a relative one. Also, Makefile.pre.in is fixed (thank you, Ned!).
--
Added file: http://bugs.python.org/file31190/test_json_discovery.v2-3.3.diff
New submission from Weizhao Li:
just a typo:
270c270
raise ImportError(msg.format(parentname), name=parent_name)
---
raise ImportError(msg.format(parent_name), name=parent_name)
--
components: Library (Lib)
messages: 194641
nosy: felloak
priority: normal
Eric Snow added the comment:
Nick was probably talking about what is further elaborated in PEP 343. I'd
recommend taking a particular look at the Motivation and Summary section
regarding flow control macros.
--
nosy: +eric.snow
___
Python tracker
Zachary Ware added the comment:
That's a much better solution, thank you, Serhiy. Here's a new patch.
test.support is no longer changed at all, but regrtest.py still is; the extra
reference to the tests still causes issues, so it is removed.
--
Added file:
Changes by Terry J. Reedy tjre...@udel.edu:
--
dependencies: +IDLE Unit test for FormatParagrah.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18583
___
Terry J. Reedy added the comment:
Added tests to get 100% coverage (not counting in __name__ block).
More test cleanups. Some of the extra newlines come from getting to 'end'
instead of 'insert'. Others are avoided by adding newline to end of test
strings, which is more realistic anyway. I
62 matches
Mail list logo