Evgeny Kapun added the comment:
To make fdopendir fail, just pass any valid FD which points to a non-directory,
such as a file or a pipe.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17899
Evgeny Kapun added the comment:
Simple test:
while True:
try:
listdir(0)
except NotADirectoryError:
pass
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17899
___
Raymond Hettinger added the comment:
The reasons for the previous rejections still hold: more tools make the
overall toolset harder to use, not being a primitive operation, dearth of
real-world use-cases, not being prevalent in other functional languages, easily
expressible with existing
Serhiy Storchaka added the comment:
No, I have no any interesting results. ;) If an effect exists, it should reveal
itself only in rare cases and be very small. This patch may be considered
rather as a tiny refactoring (it decreases a number of code lines).
--
Serhiy Storchaka added the comment:
In additional the patch decreases the size of the pickled data, speeds up
pickling and unpickling.
$ ./python -c import collections, pickle; od = collections.OrderedDict((i, i)
for i in range(10)); print(len(pickle.dumps(od)))
Without patch: 1536827.
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17899
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
type: behavior - crash
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17872
___
___
Damien Marié added the comment:
A side note to justify the localization of IDLE:
I think the internationalization part is important, It's a nearly invisible
overhead for the code but it will be helpful for example:
- In France, most of the highschool student have to learn python so they learn
Serhiy Storchaka added the comment:
1) A separate function might be better. I think this kind of output would
be more useful while inspecting individual byte objects, rather than having
it for arbitrary byte objects (that might be inside other containers).
I don't think the general
Changes by Daniel Urban urban.dani...@gmail.com:
--
nosy: +daniel.urban
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16429
___
___
New submission from Paul Moore:
The Python launcher for windows should recognise a hashbang line of
#!/usr/bin/env python, and use the python executable found on PATH to run the
script. If no python executable is present on PATH the launcher should fall
back to the current behaviour (using
Serhiy Storchaka added the comment:
Here is an alternative patch which outputs a bytes literal and a hexdump as a
comment.
--
Added file: http://bugs.python.org/file30121/pprint_bytes_hex_2.patch
___
Python tracker rep...@bugs.python.org
New submission from Florent Xicluna:
Looking into the summary table, there's no information about the `bytes`
built-in alias for `str`:
http://docs.python.org/2/library/functions.html
IMHO it should appear in this table (as str, unicode, bytearray) with the
appropriate `.. versionadded:`.
Ger Luijten added the comment:
Hello Roger,
Thanks for the clear explanation!
Greetings, Ger
2013/4/20 Roger Serwy rep...@bugs.python.org
Roger Serwy added the comment:
Good catch Terry! I've been testing using python -m idlelib.idle instead
of importing it from an interactive prompt.
Changes by Alejandro Rodas alexrd...@gmail.com:
--
nosy: +alex.rodas
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3405
___
___
Python-bugs-list
Antoine Pitrou added the comment:
Antoine, can you share the code for your benchmarks which show
performance improvements when framing is enabled? I am seeing the same
10-15% slowdown even when pickling stuff to pure Python objects:
The performance improvement is when unpickling, not when
Antoine Pitrou added the comment:
Le samedi 04 mai 2013 à 09:42 +, Serhiy Storchaka a écrit :
However a simple specialized code can be used for special purposes,
i.e. internally in the pprint module. I don't see how it can be reused
and don't interested in a general function.
I don't
Serhiy Storchaka added the comment:
FTR the reason to add this is consistency
This always was a weak reason.
and readability
It is a matter of taste. For me s.expandtabs(3) looks more readable than
s.expandtabs(tabsize=3).
I don't see an urgent need for this feature and don't like a
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file30121/pprint_bytes_hex_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17868
___
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file30122/pprint_bytes_hex_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17868
___
Serhiy Storchaka added the comment:
I don't understand how it would be useful in the pprint module if it
can't be useful as a general function.
How can it be used besides pprint/pformat functions?
Just the nice way is different
depending on the situations: if my bytes object is simply a
Antoine Pitrou added the comment:
I don't understand how it would be useful in the pprint module if it
can't be useful as a general function.
How can it be used besides pprint/pformat functions?
I don't understand your question. Do you never print some data at the
command-line prompt? Or
Roundup Robot added the comment:
New changeset 26068bfec70e by Serhiy Storchaka in branch '2.7':
Issue #16316: mimetypes now recognizes the .xz and .txz (.tar.xz) extensions.
http://hg.python.org/cpython/rev/26068bfec70e
New changeset d04259af01ff by Serhiy Storchaka in branch '3.3':
Issue
Serhiy Storchaka added the comment:
Have backported.
--
resolution: - fixed
status: open - closed
versions: -Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16316
___
Serhiy Storchaka added the comment:
If there are no objections I will commit the patch soon.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15809
___
Charles-François Natali added the comment:
The latest version of the patch passes on Linux, OpenIndiana and Windows.
Note that I did apply the select()-hack on all platforms (not only Windows),
because if I understood #427345 correctly, it's really there to bypass a
non-standard IE behavior
Ezio Melotti added the comment:
The idea is that the output of pprint should be something like (once #17530 is
applied):
pprint.pprint(b'\x7fELF\x01\x01\x01\x00\x00\n\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00\x01')
(b'\x7fELF\x01\x01\x01\x00\x00\n\x00\x00'
Antonio Cavallo added the comment:
So far it seems the special handling in config.site is restricted to these two
bits ptc/ptmx (I'm targeting android in cross compiling at the moment).
--
___
Python tracker rep...@bugs.python.org
New submission from Antonio Cavallo:
This patch adds autoconf.ac check for the locale.h file in addition to
langinfo.h. The patch contains also a fix to Python/fileutils.c file.
The android ndk provides locale.h but no langinfo.h: this fixes the issue.
BTW bionic doesn't have any runtime
Antoine Pitrou added the comment:
Here are some numbers:
# Without the patch
$ ./python -m timeit -s import pickle, io; d=pickle.dumps(list(range(1000)),
4); b=io.BytesIO(d) b.seek(0); pickle.load(b)
1 loops, best of 3: 180 usec per loop
$ ./python -m timeit -s import pickle, _pyio as
New submission from Serhiy Storchaka:
Inspired by simplejson issue [1] which is related to standard json module too.
JSON parser 3.3+ and wide builds of 3.2- raise an error on invalid strings
(i.e. with unpaired surrogate), while narrow builds and some third-party
parsers. Wide builds are
Roundup Robot added the comment:
New changeset 5f82b68c1f28 by Ezio Melotti in branch '3.3':
#7855: Add tests for ctypes/winreg for issues found in IronPython. Initial
patch by Dino Viehland.
http://hg.python.org/cpython/rev/5f82b68c1f28
New changeset df655ebf74d7 by Ezio Melotti in branch
Roundup Robot added the comment:
New changeset e71406d8ed5d by Ezio Melotti in branch '2.7':
#7855: Add tests for ctypes/winreg for issues found in IronPython. Initial
patch by Dino Viehland.
http://hg.python.org/cpython/rev/e71406d8ed5d
--
___
Ezio Melotti added the comment:
This should be fixed now.
Thanks for the report and the patch (and thanks Zach for confirming that it
works on Windows and for the review)!
--
assignee: dino.viehland - ezio.melotti
resolution: - fixed
stage: patch review - committed/rejected
status:
Roundup Robot added the comment:
New changeset 003e4eb92683 by Ezio Melotti in branch '3.3':
#16518: use bytes-like object throughout the docs.
http://hg.python.org/cpython/rev/003e4eb92683
New changeset d4912244cce6 by Ezio Melotti in branch 'default':
#16518: merge with 3.3.
Ezio Melotti added the comment:
The attached patch uses bytes-like objects in the error messages.
--
Added file: http://bugs.python.org/file30124/issue16518-3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16518
Changes by Antoine Pitrou pit...@free.fr:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17904
___
___
Python-bugs-list
Ezio Melotti added the comment:
binary-mode write requires bytes-like object, not 'int'
Looks like the function that raises the error (Objects/abstract.c:352) doesn't
have enough information to produce a message like that.
I attached a patch to #16518 that improves this and other error
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +eli.bendersky
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17901
___
Serhiy Storchaka added the comment:
I don't understand your question. Do you never print some data at the
command-line prompt? Or even as part of small test programs?
To be honest, I very rarely even use pprint. I'm too lazy to import it. If I
want to quickly get a hexdump, I use something
Antoine Pitrou added the comment:
Le samedi 04 mai 2013 à 15:41 +, Serhiy Storchaka a écrit :
Which is why the proposal doesn't fit well with pprint/pformat.
Perhaps I misunderstood your wish. I'm not against consider pprint as
a black box, which does all good magic inside by default.
Changes by Éric Araujo mer...@netwok.org:
--
components: +Interpreter Core -Distutils2, Library (Lib)
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1298835
Éric Araujo added the comment:
Adding Nick to this discussion, since distutils-sig is talking about these
issues right now.
Previous discussions:
http://mail.python.org/pipermail/python-list/2005-September/345116.html
http://mail.python.org/pipermail/python-dev/2005-September/056682.html
Antoine Pitrou added the comment:
I wonder if json should simply be less strict by default. If you pass the raw
unescaped character, the json module accepts it:
json.loads('{a: \ud8e9}')
{'a': '\ud8e9'}
It's only if you pass the escaped representation that json rejects it:
json.loads('{a:
Ezio Melotti added the comment:
See also #11489.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17906
___
___
Python-bugs-list mailing list
Ezio Melotti added the comment:
Return a new set with elements in an odd number of the sets.
This wording is not really clear to me.
IMHO the documentation is fine as is. The evaluation order works as usual,
and, since the symmetric difference is an associative (and commutative)
operation,
Nick Coghlan added the comment:
The discussion on distutils-sig that Éric is referring to is one were I ended
up pointing out that PEP 439 (bootstrapping pip in 3.4) needs to address this
in some manner, so that pip (which installs to site-packages) doesn't end up
fighting with system package
Ezio Melotti added the comment:
FWIW I'm +1 about adding grouper(), since it happened to me to use it and
suggest more often than any other recipe (I think it's the only recipe I
used/know), and even more often than some of the current itertools.
The fact that has been requested several times
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17862
___
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
assignee: - ezio.melotti
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17877
___
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
type: - enhancement
versions: +Python 2.7, Python 3.3, Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17887
Yogesh Chaudhari added the comment:
I am not sure if I am missing something. I had filled out the form at
http://www.python.org/psf/contrib/contrib-form/ on the day I submitted the
patch and even got back an email from Ewa Jodlowska. However, I don't see any
* after my name. I submitted the
Matthias Klose added the comment:
there is more than one thing addressed with the 'dist-packages' choice of name.
The primary reason is to have a directory where you only find python packages
as distributed by the linux distribution, and where installers do not install
to by default. Even if
Roundup Robot added the comment:
New changeset e39a8f8ceb9f by Brett Cannon in branch 'default':
#17115,17116: Have modules initialize the __package__ and __loader__
http://hg.python.org/cpython/rev/e39a8f8ceb9f
--
nosy: +python-dev
___
Python
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
stage: test needed - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17115
___
Brett Cannon added the comment:
New changeset e39a8f8ceb9f by Brett Cannon in branch 'default':
#17115,17116: Have modules initialize the __package__ and __loader__
http://hg.python.org/cpython/rev/e39a8f8ceb9f
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
Ezio Melotti added the comment:
Attached a patch that rephrases part of the suggestions made by Ned.
--
nosy: +ezio.melotti
Added file: http://bugs.python.org/file30125/issue17894.diff
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset d5ef330bac50 by Antoine Pitrou in branch 'default':
Issue #5845: Enable tab-completion in the interactive interpreter by default,
thanks to a new sys.__interactivehook__.
http://hg.python.org/cpython/rev/d5ef330bac50
--
nosy: +python-dev
Antoine Pitrou added the comment:
End-users will hopefully rejoice :)
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5845
Brett Cannon added the comment:
Just to keep on top of what is left to do for this to happen:
* get_magic(): expose in importlib
* find_module()/load_module(): eliminate all uses in the stdlib and fully
deprecate
* new_module(): use types.ModuleType() instead
* reload(): relocate
*
New submission from Brett Cannon:
imp.new_module() does not need to exist since code can use types.ModuleType's
constructor.
--
components: Library (Lib)
keywords: easy
messages: 188388
nosy: brett.cannon
priority: low
severity: normal
stage: test needed
status: open
title: Deprecate
Changes by Brett Cannon br...@python.org:
--
dependencies: +Deprecate imp.new_module() in favour of types.ModuleType
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17177
___
Ezio Melotti added the comment:
Some buildbots are failing after this:
http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/7840
http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%203.x/builds/4536
FAIL: test_everyone_has___loader__
Brett Cannon added the comment:
While thinking about asking on G+ for feedback, I realized that if I get this
to the point of a module-level warning, it won't be a big deal. It would be
just like warnings you deal with when supporting old versions of Python along
with newer versions where
Ezio Melotti added the comment:
This might be OK, however you won't be able to point to the alternatives in the
deprecation message (e.g. new_module() is deprecated, use types.ModuleType()
instead).
This can still be done in the docs though.
--
___
Brett Cannon added the comment:
Right, the docs would say the imp modules is deprecated; please see the module
documentation for alternatives or something.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17177
Roundup Robot added the comment:
New changeset 8c1385205a35 by Antoine Pitrou in branch '3.3':
Issue #17408: Avoid using an obsolete instance of the copyreg module when the
interpreter is shutdown and then started again.
http://hg.python.org/cpython/rev/8c1385205a35
New changeset 0b34fd75b937
Ezio Melotti added the comment:
3.2 only gets security fixes, can you try with 3.3/default and see if it fails
there?
(The devguide has instructions about getting an updated clone and testing on
3.3/default if you need them.)
--
nosy: +benjamin.peterson, ezio.melotti, loewis
type: -
Antoine Pitrou added the comment:
Thank you for reporting! This should be fixed now.
--
components: +Interpreter Core -None
nosy: +pitrou
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
versions: +Python 3.4
___
Brett Cannon added the comment:
It's because test_pydoc is actively deleting the __loader__ of a test module.
I'll have a look to figure out why it's doing that.
--
resolution: fixed -
status: closed - open
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
So, could you propose a patch?
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16742
___
___
Antoine Pitrou added the comment:
Closing as the original issue is fixed. Other leaks should be reported as
separate issues.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Roger Serwy added the comment:
There is a problem. Adding the encoding comment to the top of the source causes
off-by-one line errors in the traceback.
Take as an example:
1/0
Traceback (most recent call last):
File pyshell#0, line 2, in module
ZeroDivisionError: integer division or
Antoine Pitrou added the comment:
Here is a patch adding a call to gc.collect() after cleaning up most modules,
with tests.
--
keywords: +patch
nosy: +ncoghlan
stage: commit review - patch review
type: resource usage - enhancement
versions: +Python 3.4 -Python 3.2
Added file:
Antoine Pitrou added the comment:
This avenue doesn't look promising at all. Closing.
--
resolution: - works for me
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2262
Mark Dickinson added the comment:
For me s.expandtabs(3) looks more readable than s.expandtabs(tabsize=3).
I disagree: I think the second is more readable, and I think it's especially
helpful to those not intimately familiar with the language (which probably
accounts for the vast majority
Antoine Pitrou added the comment:
+1 for iterdir. However, if we get a separate scandir() returning entries with
attributes, is iterdir() still useful?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11406
Antoine Pitrou added the comment:
The attached patch uses bytes-like objects in the error messages.
I'm surprised your patch doesn't touch Python/getargs.c.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16518
Antoine Pitrou added the comment:
This looks like it is fixed by Mark's commit. Other proposals should go into
separate issues.
--
nosy: +pitrou
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
versions: -Python 3.2, Python 3.3, Python 3.4
Changes by Antoine Pitrou pit...@free.fr:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17705
___
___
Python-bugs-list
Ezio Melotti added the comment:
FWIW I was grepping for buffer protocol/interface/api, and then double-checking
for buffer in the resulting files. Python/getargs.c doesn't seem to mention
the buffer protocol/interface/api at all.
--
___
Python
Roundup Robot added the comment:
New changeset 0201d8fa8bd0 by Antoine Pitrou in branch '2.7':
Issue #14173: Avoid crashing when reading a signal handler during interpreter
shutdown.
http://hg.python.org/cpython/rev/0201d8fa8bd0
New changeset 0dfd5c7d953d by Antoine Pitrou in branch '3.3':
Antoine Pitrou added the comment:
This should be fixed now. Thank you for diagnosing this bug!
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
versions: +Python 3.4 -Python 3.2
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
As an update (since someone else has this problem) this issue stopped
once we converted from centos to archlinux (www.archlinux.org). May be
an underlying issue with something in the centos environment. We used
the same modules same configuration
Roundup Robot added the comment:
New changeset bb023c3426bc by Brett Cannon in branch 'default':
#17115: Remove what appears to be a useless chunk of code which broke
http://hg.python.org/cpython/rev/bb023c3426bc
--
___
Python tracker
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17115
___
Roundup Robot added the comment:
New changeset 97b7bd87c44c by Brett Cannon in branch 'default':
#17115: I hate you MS for not supporting C99.
http://hg.python.org/cpython/rev/97b7bd87c44c
--
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
Thanks for reporting this. Do you want to contribute a proper patch? You'll
find instructions at http://docs.python.org/devguide/
--
nosy: +pitrou
stage: - needs patch
versions: -Python 3.2
___
Python tracker
Terry J. Reedy added the comment:
Wait a week and see what happens.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17890
___
___
Antoine Pitrou added the comment:
Perhaps you should explain what the point of this is.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17855
___
Terry J. Reedy added the comment:
If you take the union/intersection/symmetric difference of n sets, the result
is a set with all items that appears in one/all/an odd number of the n sets.
The union and intersection methods actually accept n inputs, because the result
is obvious, useful, and
Antoine Pitrou added the comment:
Thanks for the patch. (Yes, I'm looking at this a bit late :-))
First, there seems to be a problem with the repr() of of.stat() results:
./python -c import os; print(os.stat('LICENSE'))
posix.stat_result(st_mode=33204, st_ino=6553619, st_dev=2053, st_nlink=1,
Phillip J. Eby added the comment:
It looks like maybe basic2 should be importing basic, not basic2.
Otherwise, you might as well just import basic2 directly and be done
with it. ;-) Likewise, I think indirect should be importing from
indirect2, not from itself? i.e., I'd expect that test to
Ned Batchelder added the comment:
I worked with Ezio to make a new patch with the full edits.
I have other ideas for edits to the rest of the document, but we can discuss
those if you like these...
--
Added file: http://bugs.python.org/file30127/descriptor_howto_2.patch
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17907
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17177
___
R. David Murray added the comment:
I think that's what the link in the first message does. However, as I remember
Bradon's talk, the short answer is: make it easy to discover (and therefore
reason about) the hierarchy of logging objects that results from all the
logging setup calls in an
New submission from Guido van Rossum:
It would be nice if there was a command-line option to tell the test runner to
call gc.collect() after each test.
See https://groups.google.com/d/msg/python-tulip/tstjvOQowIU/IRihc8NCHZUJ --
Glyph points out that always doing this is problematic because
Raymond Hettinger added the comment:
Please don't go crazy with this. I will look at the suggestions and make some
edits to improve its readability but am not going to change it into a breezy
conversational style. Instead, I'll likely put together a separate descriptor
tutorial that
Ezio Melotti added the comment:
See also #17534.
--
nosy: +ezio.melotti, michael.foord
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17908
___
1 - 100 of 105 matches
Mail list logo