Stefan Behnel added the comment:
Here is another patch that remembers the Py_ssize_t slice indices if they are
known at instantiation time. It only makes a very small difference for the
fannkuch benchmark, so that's no reason to add both the complexity and the
(IMHO ignorable) memory
Stefan Behnel added the comment:
Ok, so what are we going to do for the next alpha?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17741
___
___
New submission from Serhiy Storchaka:
$ PYTHONIOENCODING= ./python
Fatal Python error: Py_Initialize: can't initialize sys standard streams
LookupError: unknown encoding:
Aborted (core dumped)
As a consequence we can't set only the error handler.
$ PYTHONIOENCODING=:surrogateescape ./python
Changes by Serhiy Storchaka storch...@gmail.com:
--
dependencies: +Empty PYTHONIOENCODING is not the same as nonexistent
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18713
___
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file31432/empty_pythonioencoding.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18818
___
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file31433/empty_pythonioencoding.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18818
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +mark.dickinson, serhiy.storchaka
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18813
___
Nick Coghlan added the comment:
Patch looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18818
___
___
Python-bugs-list mailing
Charles-François Natali added the comment:
I propose to add an optional keyword parameter with default value SYNC
(compatibility) but that can be ASYNC, INVALIDATE (can be
SYNC|INVALIDATE and ASYNC|INVALIDATE too).
AFAICT it's mostly useless on a modern OS.
MS_INVALIDATE is a no-op on
New submission from Nuutti Kotivuori:
when tarfile generates a tar, it uses TarInfo objects which are packed to the
binary format. This packing uses itn format for filling the devmajor and
devminor fields of the tar file entry, with a default value of zero. The
field length is 8 characters,
STINNER Victor added the comment:
Patch looks good to me, but you have to update Doc/using/cmdline.rst,
at least to add a versionchanged section.
Tests would also be nice :-)
I really like the the PYTHONIOENCODING=:surrogateescape use case!
--
___
Serhiy Storchaka added the comment:
Second variant of the patch also supports empty error handler as the default
error handler (i.e. strict).
$ PYTHONIOENCODING=ascii: ./python
Python 3.4.0a1+ (default:5b5ef012cd4e+, Aug 23 2013, 10:18:51)
[GCC 4.6.3] on linux
Type help, copyright, credits or
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18817
___
___
Python-bugs-list
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18807
___
___
Python-bugs-list
Antoine Pitrou added the comment:
Yeah, pydoc will walk and import all installed Python modules, which may
trigger various kinds of issues with buggy third-party stuff.
Note that in 2.x, extension modules compiled with different fundamental options
(such as debug/non-debug) aren't
Antoine Pitrou added the comment:
Will also be useful for issue #18808 :)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18623
___
___
Drekin added the comment:
There is over year old closely related issue: http://bugs.python.org/issue13758
.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17588
___
Drekin added the comment:
Hello. Will this be fixed? It's really annoying that you cannot pass valid
unicode filename to compile(). I'm using a workaround: I just pass
placeholder and then “update” the resulting code object recursively to set
the correct co_filename. Afterwards the code
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18818
___
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com:
--
nosy: +Arfrever
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16392
___
Antoine Pitrou added the comment:
Seriously, why are we obsessed with performance when talking about a security
feature? Did anyone *actually* complain about urandom() being too slow (ok,
someone complained about it eating file descriptors... :-))?
The question is whether OpenSSL's random
New submission from July Tikhonov:
According to documentation of json.dump(), concerning its 'default' option:
default(obj) is a function that should return a serializable version of obj or
raise TypeError. The default simply raises TypeError.
But this function is actually never applied to
July Tikhonov added the comment:
Oops, my patch disables 'skipkeys' argument of dump. Another version attached.
--
Added file: http://bugs.python.org/file31437/json-default-dict-keys.diff
___
Python tracker rep...@bugs.python.org
Changes by July Tikhonov july.t...@gmail.com:
Removed file: http://bugs.python.org/file31436/json-default-dict-keys.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18820
___
Changes by Radu Voicilas radu.voici...@gmail.com:
--
nosy: +raduv
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18652
___
___
Python-bugs-list
Raymond Hettinger added the comment:
I just applied the dict version of dummy to sets in
http://hg.python.org/cpython/rev/f0202c3daa7a
and it unexpectedly broke test_gdb again:
FAIL: test_sets (test.test_gdb.PrettyPrintTests)
Verify the pretty-printing of sets
New submission from Oscar Benjamin:
I've often wanted to be able to query a takewhile object to discover the item
that failed the predicate but the item is currently discarded.
A usage example:
def sum(items):
it = iter(items)
ints = takewhile(Integral.__instancecheck__, it)
Antoine Pitrou added the comment:
Checking for dummies in dicts in python-gdb.py is implicit (see
PyDictObjectPtr.iteritems()): entries whose value is NULL are not printed.
Set entries do not have values, so instead pySetObjectPtr.write_repr() uses a
hack with the repr() of the key to check
Brett Cannon added the comment:
Because that is how it has always been:
http://hg.python.org/cpython/file/b9b521efeba3/Python/import.c#l3164 . It could
be changed but someone out there is relying on those semantics and it's a minor
thing to leave in so I don't want to mess with it.
Raymond Hettinger added the comment:
Attaching a patch, but I don't have a way to test it.
--
Added file: http://bugs.python.org/file31438/fix_dummy.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18772
Serhiy Storchaka added the comment:
With new subject this issue looks as a duplicate of (or tightly related to)
issue12832.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18713
___
Serhiy Storchaka added the comment:
In Python 3 ascii() uses the backslashreplace error handler.
class T:
... def __repr__(self):
... return '\u20ac\udcff'
...
print(ascii(T()))
\u20ac\udcff
I think using the backslashreplace error handler in repr() in Python 2.7 is
good
Rob Bairos added the comment:
However, if it fails __import()__ it doesn't get to the sys.modules[] call
anyways.
The only case affected by this are:
PASS the __import()__ call,
then FAIL the sys.modules[] lookup afterwards.
Why will that effect anything currently out there?
As it
Antoine Pitrou added the comment:
Checking repr() perpetuates the original hack so, why it may work, I think it's
better if we take the opportunity to solve it cleanly.
I'll try to take a look tonight (I suppose you're under Windows?).
--
___
Python
STINNER Victor added the comment:
This change is going to break backward compatibility. I don't think
that it can be done in Python 2.7.x, and there is no Python 2.8 (PEP
404).
--
___
Python tracker rep...@bugs.python.org
Jesús Cea Avión added the comment:
Depending of a concrete OS implementation is not good. Linux is not the only OS
out there, and I have very old machines in production yet:
# uname -a
Linux colquide..es 2.4.37 #4 Fri Dec 12 01:10:45 CET 2008 i686 unknown
I have been hit by the VM/file
Zachary Ware added the comment:
Ping!
The buildbots still seem to be failing, are my proposed fixes acceptable? Both
patches still apply cleanly.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17883
Drekin added the comment:
This patch introduces a bit ugly traceback. Shouldn't there be “raise from
None” or “raise from previous_exc” instead of simple raise?
--
nosy: +Drekin
___
Python tracker rep...@bugs.python.org
Christian Heimes added the comment:
I don't get it either. urandom is perfectly fine. I showed that urandom is just
a bit slower than SSL_rand().
How about we generalize SystemRandom so users can implement a custom RNG class
wby providing a method rng(amount) - bytes?
Antoine Pitrou
Charles-François Natali added the comment:
How about we generalize SystemRandom so users can implement
a custom RNG class wby providing a method rng(amount) - bytes?
The random module already makes it easy:
Class Random can also be subclassed if you want to use a different basic
generator
Antoine Pitrou added the comment:
How about we generalize SystemRandom so users can implement a custom
RNG class wby providing a method rng(amount) - bytes?
We may make it easier to implement custom Random implementations with
user-defined random generators, but they needn't be
Zachary Ware added the comment:
How about a combination of the two? It's still short, but gets the point
across without assuming the reader knows exactly what 'keyword-only argument'
or requiring further reading, while introducing the term and providing the link
for deeper understanding.
Brett Cannon added the comment:
If I were to change this code in any way it would be to stop passing in a dummy
value for fromlist, not stop pulling from sys.modules. The official idiom for
directly calling __import__() is::
__import__(module_name)
return sys.modules[module_name]
It just
Freek Dijkstra added the comment:
Peter, first of all, thanks for your library. I didn't mention that before, but
should have.
I'm in favour of a pragmatic approach. I've only come across NATing for RFC
1918 and RFC 6598 addresses. While it can technically be done for other
addresses, and
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: -haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17400
___
___
Python-bugs-list
STINNER Victor added the comment:
This patch introduces a bit ugly traceback. Shouldn't there be “raise from
None” or “raise from previous_exc” instead of simple raise?
Oh, I see.
os.environb[b'10']
Traceback (most recent call last):
File /home/vstinner/prog/python/default/Lib/os.py, line
Changes by Zachary Ware zachary.w...@gmail.com:
--
versions: +Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17326
___
___
Drekin added the comment:
It's also in __delitem__.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17702
___
___
Python-bugs-list mailing list
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file31413/775890a666bf.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18571
___
Roundup Robot added the comment:
New changeset ddd610cb65ef by Brett Cannon in branch '3.3':
Issue #18755: Allow imp.load_*() loaders to have get_data() called
http://hg.python.org/cpython/rev/ddd610cb65ef
New changeset b107f7a8730d by Brett Cannon in branch '3.3':
NEW entry for issue #18755
Terry J. Reedy added the comment:
Victor, do you have any opinion on this unicode filename issue?
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13758
___
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18755
___
Changes by Ned Deily n...@acm.org:
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18821
___
___
Python-bugs-list mailing list
Valerie Lambert added the comment:
Of course, here is the patch without the '--git' option.
--
Added file: http://bugs.python.org/file31442/issue-18623_v2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18623
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
--
nosy: +tshepang
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18767
___
___
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
--
nosy: +tshepang
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18769
___
___
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
--
nosy: +tshepang
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18783
___
___
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
--
nosy: +tshepang
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18804
___
___
Changes by Tshepang Lekhonkhobe tshep...@gmail.com:
--
nosy: +tshepang
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18760
___
___
Serhiy Storchaka added the comment:
How it can break backward compatibility? Currently repr() just raises
UnicodeEncodeError.
UnicodeEncodeError: 'ascii' codec can't encode character u'\u20ac' in position
0: ordinal not in range(128)
With patch it always returns 8-bit string. As far as
STINNER Victor added the comment:
How it can break backward compatibility? Currently repr() just raises
UnicodeEncodeError.
It depends on sys.getdefaultencoding() which can be modified in the site module
(or in a PYTHONSTARTUP script) using sys.setdefaultencoding(). It should not
possible
Roundup Robot added the comment:
New changeset 26c049dc1a4a by Victor Stinner in branch '3.3':
Close #17702: On error, os.environb now removes suppress the except context
http://hg.python.org/cpython/rev/26c049dc1a4a
New changeset 01f33959ddf6 by Victor Stinner in branch 'default':
(Merge 3.3)
STINNER Victor added the comment:
This patch introduces a bit ugly traceback.
It is now fixed, thanks for the report!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17702
___
Roundup Robot added the comment:
New changeset b868d0a9c5d7 by Brett Cannon in branch 'default':
Issue #18586: Remove the need for make_perf3.sh
http://hg.python.org/benchmarks/rev/b868d0a9c5d7
--
nosy: +python-dev
___
Python tracker
Changes by Brett Cannon br...@python.org:
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18586
___
Roundup Robot added the comment:
New changeset 79007c4244d6 by Barry Warsaw in branch '2.6':
- Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
http://hg.python.org/cpython/rev/79007c4244d6
--
___
Python tracker
Armin Rigo added the comment:
@Serhiy: it would certainly break a program that tries to call the repr() and
catches the UnicodeEncodeError to do something else, like encode the data
differently.
--
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
Here's a patch with a more robust test: the previous test worked, but assume
that only stdin, stdout and stderr FDs would be open in the child process. This
might not hold anymore in a near future (/dev/urandom persistent FD).
The new test is much
STINNER Victor added the comment:
I don't understand why os.dup2() is more reliable than os.pipe() for a unit
test?
Is subprocess_close-default-1.diff portable? test_os uses hasattr(os, dup2).
In Modules/posixmodule.c, it looks like the function is always defined!?
--
Changes by Andrew Svetlov andrew.svet...@gmail.com:
--
nosy: +asvetlov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17213
___
___
Marc-Andre Lemburg added the comment:
.__repr__() is not really allowed to return Unicode objects in Python 2.x. If
you do this, you're on your own. The CPython internals try to convert any
non-str object to a str object, but this is only done to assure that
PyObject_Repr() always returns a
Antoine Pitrou added the comment:
Attached patch solves the issue and removes the repr()-based hack in the gdb
plugin.
--
Added file: http://bugs.python.org/file31444/gdb_sets_repr2.patch
___
Python tracker rep...@bugs.python.org
New submission from Antoine Pitrou:
The proxyval() of many built-in types doesn't seem covered by test_gdb, as
write_repr() is specialized for most of them.
(check: add 1/0 to one of those proxyval() implementations and watch test_gdb
succeed)
--
components: Tests
messages: 195998
Antoine Pitrou added the comment:
Here is a patch for 3.3/3.4.
--
keywords: +patch
stage: needs patch - patch review
versions: -Python 2.7
Added file: http://bugs.python.org/file31445/subinterp_threads.patch
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
I don't understand why os.dup2() is more reliable than os.pipe() for a unit
test?
I use dup2() because it allows me to specify a target FD, so the
parent can know precisely which FD was opened by the preexec hook, and
check it's closed in the child
STINNER Victor added the comment:
the parent can know precisely which FD was opened by
the preexec hook, and check it's closed in the child process.
Oh ok, I see:
+self.assertNotIn(fd, remaining_fds)
You might also add a check:
self.assertLessEqual(remaining_fds, {0, 1, 2})
STINNER Victor added the comment:
I reopen the issue because some users are now requesting this feature.
I updated parser_unicode.patch to the last Python version. The new patch has
just a minor nit: test_symtable does crash :-D
I will investigate the crash later.
--
resolution:
STINNER Victor added the comment:
I'd suggest closing this as won't fix.
Agreed, it's time to upgrade to Python 3!
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5876
Changes by Antoine Pitrou pit...@free.fr:
--
stage: patch review - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18776
___
___
Ezio Melotti added the comment:
Serhiy, you forgot to attach the patch.
--
type: - enhancement
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18760
___
STINNER Victor added the comment:
Victor, do you have any opinion on this unicode filename issue?
I closed the issue #11619 in january 2013 before there was no user requesting
the feature. I just reopened the issue because users now ask for it.
--
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
Removed message: http://bugs.python.org/msg195643
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18774
___
Antoine Pitrou added the comment:
Serhiy, Martin, is one of you still working on this?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17618
___
Serhiy Storchaka added the comment:
Here is a patch with tests and documentation. For the documentation I hope on
your help.
--
Added file: http://bugs.python.org/file31447/empty_pythonioencoding_3.patch
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
It depends on sys.getdefaultencoding() which can be modified in the site
module (or in a PYTHONSTARTUP script) using sys.setdefaultencoding().
Of course. Every successful without patch repr() will left same with patch.
However the patch allows you to see
Changes by Serhiy Storchaka storch...@gmail.com:
--
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18817
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
priority: normal - low
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18817
___
Roundup Robot added the comment:
New changeset c0e9ba7b26d5 by Brett Cannon in branch 'default':
Issue #18394: Explicitly close the file object cgi.FieldStorage
http://hg.python.org/cpython/rev/c0e9ba7b26d5
--
nosy: +python-dev
___
Python tracker
Brett Cannon added the comment:
I managed to write a similar patch to Vajrasky independently, so at least I
know the approach is reasonable. =)
I'm not backporting since it really isn't that critical; I fixed it just to
turn off the ResourceWarning while running the test suite.
--
Serhiy Storchaka added the comment:
Sorry. Can't believe I done it again.
--
keywords: +patch
Added file: http://bugs.python.org/file31448/refs.xml.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18760
Antoine Pitrou added the comment:
Seems fixed now.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7732
Ezio Melotti added the comment:
LGTM.
--
stage: patch review - commit review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18757
___
___
Marc-Andre Lemburg added the comment:
Serhiy Storchaka wrote:
.__repr__() is not really allowed to return Unicode objects in Python 2.x.
If you do this, you're on your own.
PyObject_Repr() contains a code which converts unicode to str and raise an
exception if __repr__() result is not
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +georg.brandl
stage: - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18795
___
Roundup Robot added the comment:
New changeset 64678369c4d0 by Ezio Melotti in branch 'default':
#18796: improve documentation of the file argument of dis.show_code. Initial
patch by Vajrasky Kok.
http://hg.python.org/cpython/rev/64678369c4d0
--
nosy: +python-dev
Ezio Melotti added the comment:
Fixed, thanks for the report and the patch!
--
assignee: docs@python - ezio.melotti
nosy: +ezio.melotti
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - enhancement
___
Python tracker
Antoine Pitrou added the comment:
Ok, you're gonna laugh, the simplified patch has a complication (not
theoretical, it would trip test_cmd_line). Attaching patch.
--
Added file: http://bugs.python.org/file31449/persistent_urandom_fd4.patch
___
Eric Snow added the comment:
Isn't this related somewhat to #7732?
--
nosy: +eric.snow
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18810
___
___
Ezio Melotti added the comment:
Fixed, thanks for the report and the patch!
--
assignee: - ezio.melotti
nosy: +ezio.melotti
resolution: - fixed
stage: - committed/rejected
status: open - closed
type: - enhancement
versions: +Python 2.7, Python 3.3
Roundup Robot added the comment:
New changeset d7bac470951b by Ezio Melotti in branch '2.7':
#18798: fix typo in test_fcntl. Patch by Vajrasky Kok.
http://hg.python.org/cpython/rev/d7bac470951b
New changeset 41c90b8f49d9 by Ezio Melotti in branch '3.3':
#18798: fix typo in test_fcntl. Patch
1 - 100 of 149 matches
Mail list logo