paul j3 added the comment:
The 'subparsers' object has a _parser_class attribute that is normally set to
the class of the parent parser. In the attached file I create a
class CustomParser(argparse.ArgumentParser)
that makes a parser instance which copies all of the attributes of
Guilherme Simões added the comment:
Hi Roger,
I just signed the contributor agreement. Unfortunately, I can't test on older
MacOS versions, but I also think it should work.
--
___
Python tracker rep...@bugs.python.org
New submission from STINNER Victor:
Fatal Python error: Segmentation fault
Current thread 0x:
File
/home/cpython/buildslave/3.x.snakebite-netbsd51-amd64-1/build/Lib/ctypes/test/test_as_parameter.py,
line 87 in test_callbacks
File
ingrid added the comment:
Thank you, r.david.murray. I have updated the patch with your suggestions
included.
--
Added file: http://bugs.python.org/file29917/issue17413.patch
___
Python tracker rep...@bugs.python.org
Alexandre Vassalotti added the comment:
In addition, we could bring back the switch dispatch based on the first letter
of the type name. It does seem to speed up things as well but as much as the
type cache optimization.
--
nosy: +pitrou, serhiy.storchaka
title: Optimize pickling
New submission from Eric Wieser:
It would be nice if there was a `with` expression. Such that instead of:
with open(...) as f:
result = foo(f)
One could write:
result = foo(f) with open(...) as f
This would be particularly useful in comprehensions. Instead of:
files = {}
Changes by Eric Wieser wieser.eric+py...@gmail.com:
--
components: +Interpreter Core
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17788
___
___
Stijn Hoop added the comment:
OK, fair enough.
From reading sources, it appears that hostname is using getaddrinfo(3) on
kernelhostname with hints-ai_flags AI_CANONNAME, while Lib/socket.py simply
uses gethostbyaddr(kernelhostname), and falls back on kernelhostname in case
of errors.
Mark Lawrence added the comment:
Ping :)
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14910
___
___
Python-bugs-list
Berker Peksag added the comment:
I think this needs to be discussed on python-ideas first.
--
nosy: +berker.peksag
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17788
___
Stijn Hoop added the comment:
Attached is a very lightly tested patch that matches hostname -f behaviour on
my system. I suspect this should be OK but it definitely needs more testing
than just my system...
--
keywords: +patch
Added file:
R. David Murray added the comment:
The problem with your patch is that it changes the (effective) meaning of the
'name' parameter. Before the patch, name can be an IP address. After the
patch, that will fail on Fedora. (It also fails on my Gentoo system).
It is interesting to note, as
Eric V. Smith added the comment:
Indeed, this should be on python-ideas. Eric: can you start a thread over
there? Thanks.
--
nosy: +eric.smith
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Python tracker
Mark Lawrence added the comment:
The latest patch seems okay to me. I've successfully applied it and ran the
test suite and everything passed. Could someone please take a look with a view
to getting this committed, thanks.
--
nosy: +BreamoreBoy
Antoine Pitrou added the comment:
Why did you add all those calls to PyMemoTable_Get?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17787
___
Antoine Pitrou added the comment:
I strongly disagree with Ezio's argumentation here. If Kate and Firefox are
internationalized, IDLE can very well be internationalized too.
--
nosy: +pitrou
resolution: rejected -
stage: committed/rejected -
status: closed - open
Antoine Pitrou added the comment:
That said, this issue can be considered a duplicate of #17776.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17760
___
Eli Bendersky added the comment:
Antoine, the patch LGTM. There's some more cleaning that needs to be done in
surrounding code, but I can do that later. Also I should probably update the
documentation with a bit more details.
Just add a NEWS entry when you commit.
Thanks for working on this.
Changes by R. David Murray rdmur...@bitdance.com:
--
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - IDLE Internationalization
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17760
Christian Heimes added the comment:
Here is a patch for -flto. You need to run autoconf to re-generate configure,
too.
--
keywords: +patch
nosy: +christian.heimes
Added file: http://bugs.python.org/file29920/lto_flag.patch
___
Python tracker
Changes by Barry A. Warsaw ba...@python.org:
--
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17788
___
___
Python-bugs-list mailing
Matthias Klose added the comment:
the proposed patch is wrong. when linking with -flto, you should pass all the
relevant CFLAGS to the linker as well. Also pass -fuse-linker-plugin.
and this should be an opt-in, not the default. Depending on the architecture
and the compiler version, -flto is
Richard Oudkerk added the comment:
Pickling an exception (assuming it works) does not capture the traceback.
Doing so would be difficult/impossible since the traceback refers to a linked
list of frames, and each frame has references to lots of other stuff like the
code object, the global
Roundup Robot added the comment:
New changeset 8f15a46a8c76 by R David Murray in branch '3.3':
#17135: Add note in imp to use importlib for new programs.
http://hg.python.org/cpython/rev/8f15a46a8c76
--
___
Python tracker rep...@bugs.python.org
Roger Serwy added the comment:
Extensions would need to be modified to use the gettext module.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17776
___
R. David Murray added the comment:
Thanks, Kristian.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
versions: -Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17135
R. David Murray added the comment:
The documentation deprecation has been added as part of issue 17135.
Leaving this open to address Ezio's last comment.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
Benjamin Peterson added the comment:
Okay. Will you upload the latest version?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Stijn Hoop added the comment:
OK, dumping my current findings here, as I'm still not sure what the expected
results should be.
First of all, Lib/socket.py calls gethostbyaddr with a name. As in, gethostby
_ADDR_ with a name.
This works because Modules/socketmodule.c internally uses
Mark Lawrence added the comment:
The patch doesn't apply cleanly on Windows. Trying to sort this with
TortoiseHg has left me completely flummoxed so can I leave this with the OP to
provide a new patch?
--
nosy: +BreamoreBoy
___
Python tracker
R. David Murray added the comment:
Yes, just with limited amounts of attention to spare :(
This is a rather difficult situation, since it appears we inadvertently changed
a behavior. Fortunately it was in a feature release. Unfortunately a new
parameter to make a subparser required again
R. David Murray added the comment:
Yeah, a new function was a thought that had crossed my mind as well.
getfqdnbyname, maybe? Or gethostnamefqdn? Then deprecate calling getfqdn
without an argument.
I agree that gethostbyaddr accepting a non-IP is weird. I have no idea why it
was
Changes by Jeffrey Armstrong jeffrey.armstr...@approximatrix.com:
--
nosy: +Jeffrey.Armstrong
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12641
___
New submission from Zachary Ware:
This one had subclassing issues, and SystemRandom_TestBasicOps was being
skipped by exclusion from the list of tests passed to support.run_unittest, so
it's been converted to a skip decorator.
--
components: Tests
files: test_random_discovery.diff
Mark Lawrence added the comment:
Is any more work needed on this issue or can it be closed?
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1626300
___
New submission from Zachary Ware:
Just subclassing and test_main in this one.
--
components: Tests
files: test_set_discovery.diff
keywords: patch
messages: 187259
nosy: brett.cannon, ezio.melotti, zach.ware
priority: normal
severity: normal
status: open
title: Fix test discovery for
Mark Lawrence added the comment:
If nothing else the patch will need updating to show versionadded as 3.4
instead of 3.3.
--
nosy: +BreamoreBoy
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
Mark Lawrence added the comment:
Is any more work needed on this issue or can it be closed?
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15721
___
Mark Lawrence added the comment:
It looks as if this issue can be closed as a fix has been committed. However a
new issue will be needed if the advice offered in msg181839 is followed.
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
I run my own benchmarks and don't see any regression besides a random noise.
Actually I see even speed up for some cases:
./python -m timeit -s a = '\x80'*1 a.encode()
Before patch: 29.8 usec per loop, after patch: 21.5 usec per loop.
This is just a
Terry J. Reedy added the comment:
I responded very cautiously to #17776 in part (but not only) because I had the
impression that Ezio's view was the general consensus of other developers.
Antoine, since that is wrong or at least not complete right, could you record
at least your +1 there?
My
Terry J. Reedy added the comment:
I consider it Éric's decision.
3.3 on Windows comes with the new py launcher. That might be incorporated into
the docs if it has not. That might also be a separate issue.
--
___
Python tracker rep...@bugs.python.org
Ned Deily added the comment:
Also, IDLE makes use of features provided by Tk and those vary by platform. In
some cases, IDLE uses some Tk-supplied default menus and menu items. So
internationalization of IDLE would need to investigate and make use of Tk i18n
features on all supported
Éric Araujo added the comment:
I consider documentation for the py launched a distinct issue. The original
complaint here was fixed, the part about packaging does not apply anymore, so I
will close this. If one of the changed instructions still does not work (e.g.
“setup.py build” does not
Antoine Pitrou added the comment:
+1 for internationalizing IDLE. Any decent GUI app is internationalized these
days, even developer tools.
Re: gettext, its semantics and API are a bit of a PITA, but it's basically the
standard for internationalization of FLOSS projects. There are all kind of
Glenn Linderman added the comment:
Paul, your comments are interesting, but your proposed patch doesn't actually
solve the problem.
So here I am typing away at my command prompt, and I type in a couple optional
parameters I know I'll need and start on the sequence of positional ones, and
Glenn Linderman added the comment:
I should clarify, before someone jumps in: some particular applications do
implement restrictions on order of optional and positional arguments; I'm aware
of that. getopt easily supported application defined order restrictions,
because it processed arguments
Roundup Robot added the comment:
New changeset f903cf864191 by Antoine Pitrou in branch 'default':
Issue #17741: Add ElementTree.IncrementalParser, an event-driven parser for
non-blocking applications.
http://hg.python.org/cpython/rev/f903cf864191
--
nosy: +python-dev
Zack Weinberg added the comment:
Here is a new patch vs latest trunk.
--
Added file: http://bugs.python.org/file29924/issue16624-v34a.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
Changes by Zack Weinberg za...@panix.com:
Removed file: http://bugs.python.org/file28247/issue16624-v34.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
Antoine Pitrou added the comment:
Thank you, Eli. Now committed :)
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17741
Serhiy Storchaka added the comment:
I have added some comments on Rietveld.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17742
___
___
Philip Jenvey added the comment:
PyPy's fixed this here:
https://bitbucket.org/pypy/pypy/commits/1341a432e134
The tests just need to be adapted to the stdlib test suite
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17442
Mark Lawrence added the comment:
Patches LGTM but I suggest TooManyHeaders instead of TooMuchHeaders. I've
tried the 3.2 patch against the latest default repo on Windows Vista and it
applies cleanly. All tests passed so looks as if this could be committed.
--
nosy: +BreamoreBoy
Serhiy Storchaka added the comment:
I think that it will be better not introduce a new argument, but reuse stdin.
Just allow io.BytesIO (or perhaps even any file object) be specified as stdin.
The change will be straightforward:
if isinstance(stdin, io.BytesIO):
inputdata = stdin.read()
Zack Weinberg added the comment:
I think that it will be better not introduce a new argument, but reuse stdin.
Just allow io.BytesIO (or perhaps even any file object) be specified as stdin.
If we were designing from scratch I might agree, but we aren't. Principle of
least astonishment says
Zack Weinberg added the comment:
Note also that allowing `stdin=any filelike` in a clean fashion would require
rather more surgery than you suggest, because a filelike can produce an
infinite stream of data, and people would expect that to work when the
subprocess only reads a finite prefix;
Mark Lawrence added the comment:
It will be difficult to take this forward owing to the problem description in
msg89914 being limited to importing from normal files in the same directory
does not work. Plus any problems back then may well have been fixed due to
the reworking of the import
Brett Cannon added the comment:
In case someone wants to reproduce:
mkdir pkg
echo import tester pkg/symlinked.py
ln -s pkg/symlinked.py linked.py
echo print('HIT') tester.py
That fails because Python assumes you are in the pkg directory, not the
directory you started execution.
Mark Lawrence added the comment:
It doesn't bother me that Python programmers can write unportable code, what
with consenting adults and all that. Further the implementation of PEP 3151 in
3.3 allows specific exceptions to be caught, e.g. FileNotFoundError. I can't
see anybody allowing the
Mark Lawrence added the comment:
@Michele could you provide a patch for this?
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14364
___
New submission from Christian Heimes:
The pyconfig.h file of the Windows build environment defines at least two
macros without a Py/PY prefix:
PC/pyconfig.h:#define PREFIX
PC/pyconfig.h:#define EXEC_PREFIX
This has caused multiple issues in the past. For example libexpat uses PREFIX,
too.
Serhiy Storchaka added the comment:
I partially agree with you. We must copy blocks in communicate().
Your patch is great, but I doubt that there is a best feature. If we teach
communicate() to work with file-like objects, this feature will exceed your
suggestion and 'input' parameter of
Changes by Phil Connell pconn...@gmail.com:
Removed file: http://bugs.python.org/file29679/zipimport_ns.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
___
Changes by Phil Connell pconn...@gmail.com:
Removed file: http://bugs.python.org/file29696/test.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
___
Phil Connell added the comment:
The attached patch is ready for review.
--
Added file: http://bugs.python.org/file29925/issue17633.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
Phil Connell added the comment:
The patch looks correct and complete, and still patches and passes the tests.
So, as far as I can see, this can be committed.
--
nosy: +pconnell
___
Python tracker rep...@bugs.python.org
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +zach.ware
versions: +Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16000
___
R. David Murray added the comment:
The enum module that is likely to land in 3.4 will allow us to fix this. We
can discuss whether we want to just display the name, or both the name and the
value. Omitting it would indeed be bad, IMO.
--
nosy: +r.david.murray
stage: - needs patch
Zack Weinberg added the comment:
My position is:
* input= should be supported in check_output(), for consistency with
communicate().
* I like the idea of making stdin= support file-like objects which don't have a
fileno, in both communicate() and everything that calls it, but that does not
R. David Murray added the comment:
Since it is a new feature either way, we can add stdin support and deprecate
the input= argument of communicate. But we can also go with the input= for
check_output now, and see if anyone steps up to do the bigger patch before 3.4
hits beta. Which is what
Zack Weinberg added the comment:
??? communicate() has always had input= AFAIK.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
R. David Murray added the comment:
Yes. IIUC are talking about possibly replacing it with a more powerful
feature. We wouldn't actually remove it, but we would recommend using the new
feature instead, thus making the fact that check_output doesn't have it
irrelevant.
--
Phil Connell added the comment:
Here's a patch that updates getcomments to match the behaviour of getsource,
raising OSError if the source file can't be found and TypeError when passed a
built-in.
Since this is a backwards-incompatible change, presumably it can only be
applied to 3.4.
This
Zack Weinberg added the comment:
OK, I get that, but what I'm saying is I think input= is still desirable even
if stdin= becomes more powerful.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
Phil Connell added the comment:
Updated patch with markups suggested by Serhiy.
--
Added file: http://bugs.python.org/file29927/issue17633-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17633
Nick Sloan added the comment:
Any feedback on this latest patch?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17732
___
___
Python-bugs-list
STINNER Victor added the comment:
Benchmark script, should be used with:
https://bitbucket.org/haypo/misc/src/tip/python/benchmark.py
--
Added file: http://bugs.python.org/file29928/bench_encoders.py
___
Python tracker rep...@bugs.python.org
Nadeem Vawda added the comment:
An oversight on my part, I think. I'll add tests for 3.x this weekend.
--
status: closed - open
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue14398
___
Mark Lawrence added the comment:
Tests rerun on Windows and were fine.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16624
___
___
Martin Morrison added the comment:
Latest upload has all of the agreed markups from the review.
--
Added file: http://bugs.python.org/file29929/issue17646-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
Martin Morrison added the comment:
Raised http://bz.selenic.com/show_bug.cgi?id=3894 against Mercurial for them to
workaround issue14596.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17618
Martin Morrison added the comment:
Attached a minor tweak over the last diff - I'd forgotten to fix the Struct
handling inside the Mercurial implementation as well.
All other comments still apply to this diff.
--
Added file: http://bugs.python.org/file29930/issue17618-5.diff
Éric Araujo added the comment:
Thanks for the patch, I left comments on rietveld.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17732
___
___
Changes by Martin Morrison m...@ensoft.co.uk:
--
nosy: +isoschiz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17468
___
___
Python-bugs-list
STINNER Victor added the comment:
New version of the patch:
- address most (all?) Serhiy's remarks
- _PyBytesWriter_PrepareInternal() always use min_size, not only when
overallocate is 1
- add more comments
Performances are almost the same than without the patch. It looks like they are
a
STINNER Victor added the comment:
If the imp module is marked as deprecated, it would help to explain how to port
code from imp to importlib. As it was done for os.spawn(), platform.popen(),
etc.
I'm using imp.load_source() in my setup.py to load a version.py file which only
contains
STINNER Victor added the comment:
I don't know how to change my code to use imp.load_source().
Woops, I mean to use importlib.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17177
___
Mark Lawrence added the comment:
I don't think this is worth the bother. I've checked my registry and the only
entry under HKLM\SOFTWARE\Python is PythonCore, under this are the following.
2.6
Help
Pythonwin Reference
C:\Python26\Lib\site-packages\PyWin32.chm
Modules
2.7
Martin Morrison added the comment:
Attached patch does exactly as described. Seems to be unused, and still passes
all pydoc tests.
--
keywords: +patch
nosy: +isoschiz
Added file: http://bugs.python.org/file29932/issue11182.diff
___
Python tracker
Benjamin Peterson added the comment:
What's this f_invisible thing?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
___
Changes by Martin Morrison m...@ensoft.co.uk:
Removed file: http://bugs.python.org/file29929/issue17646-2.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17646
___
Martin Morrison added the comment:
Sorry, that is an unrelated change I was experimenting with, which I
accidentally forgot to take out.
Please see the new uploaded diff.
--
Added file: http://bugs.python.org/file29933/issue17646-2.diff
___
Python
Changes by Terry J. Reedy tjre...@udel.edu:
--
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11182
___
___
Martin Morrison added the comment:
I threw together a function that implements this. The only variation from the
proposed signature was adding the onerror argument supported by the other
similar functions in the module.
--
keywords: +patch
nosy: +isoschiz
Added file:
Roundup Robot added the comment:
New changeset 465cb5ce5a7e by Ezio Melotti in branch 'default':
#11182: remove the unused and undocumented pydoc.Scanner class. Patch by
Martin Morrison.
http://hg.python.org/cpython/rev/465cb5ce5a7e
--
nosy: +python-dev
New submission from Barry A. Warsaw:
As described here:
http://www.wefearchange.org/2013/04/python-3-language-gotcha-and-short.html
the following code will produce an UnboundLocalError when the exception is
triggered:
def bad():
e = None
try:
do_something()
except
Ezio Melotti added the comment:
Fixed, thanks for the patch!
--
assignee: - ezio.melotti
nosy: +ezio.melotti
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
type: - enhancement
___
Python tracker
Ezio Melotti added the comment:
Maybe we could raise a warning when the deleted name already exists in the
local namespace?
(FWIW I knew about the fact that the name gets deleted, and still managed to
get bitten by it a couple of times.)
--
nosy: +ezio.melotti
New submission from Hank Christian:
LinkedIn
Python,
I'd like to add you to my professional network on LinkedIn.
- Henry
Henry Christian
ADJUNCT PROFESSOR at Central Texas College
Greater Los Angeles Area
Confirm that you know Henry Christian:
1 - 100 of 134 matches
Mail list logo