STINNER Victor victor.stin...@haypocalc.com added the comment:
See also issue #10039.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10014
___
Antoine Pitrou pit...@free.fr added the comment:
Updated patch against current py3k.
--
Added file: http://bugs.python.org/file19142/unialloc6.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1943
Tom Morris tfmor...@gmail.com added the comment:
Sorry, I misread the 'version' field as the version the fix was committed for,
not the version the bug was reported against.
The fix was reportedly fixed in r82648 and v2.7 is r82500. If there's ever a
2.7.1, I guess the fix will appear, but
STINNER Victor victor.stin...@haypocalc.com added the comment:
The problem is that PySys_SetArgvEx() ...
Not only PySys_SetArgvEx(). There is another issue with RunMainFromImporter()
which do: sys.path[0] = filename
--
___
Python tracker
Terry J. Reedy tjre...@udel.edu added the comment:
Since 'we' can reopen any closed issue, I will try to answer what I think you
might be asking.
I closed this because of Daniel's suggestion coupled with the Richard
disclaiming further interest and neither Raghuram nor any new responder
Antoine Pitrou pit...@free.fr added the comment:
I don't know if there is a point or not, but some hosts are for some
reason intended to be connected to using IP address and their
certificates thus contains IP addresses. I think we should support that
too, and I find it a bit confusing to
Changes by Trent Mick tre...@gmail.com:
--
assignee: - trentm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2142
___
___
Python-bugs-list mailing
Brian Curtin cur...@acm.org added the comment:
I'm getting error 6 aka ERROR_INVALID_HANDLE.
I'll try to figure out what's going on later this week if I can find time. I'll
also run this on my Server 2008 machine to see how works.
--
___
Python
Antoine Pitrou pit...@free.fr added the comment:
Here is a new patch with doc updates and the corrections mentioned above.
--
Added file: http://bugs.python.org/file19141/sslcheck2.patch
___
Python tracker rep...@bugs.python.org
New submission from STINNER Victor victor.stin...@haypocalc.com:
If a program name contains a non-ascii character in its name and/or full path
and PYTHONFSENCODING is set to an encoding different than the locale encoding,
Python fails to open the program.
Example in the utf-8 locale:
$
Fred L. Drake, Jr. fdr...@acm.org added the comment:
As I understand it, the decision to return str instead of unicode
values for the simplejson module was simply inherited by the
standard library. As such, it still needs to be evaluated in the
context of the standard library, because of the
New submission from Robert Rohde ro...@robertrohde.com:
I attempted to use GZipFile to process a 1.93 GB file that expands to 18.8 GB.
This consistently produces the same corrupted output file that has
approximately, but not exactly, the right output file size.
I bypassed GZipFile by calling
New submission from kai zhu kaizhu...@gmail.com:
i'm working on an independent py2to3 utility which directly imports py2x
modules, by reverse compiling ast trees
(code.google.com/p/asciiporn/source/browse/stable.py)
while forward porting the python2x redis client, this issue came up.
i kno
Antoine Pitrou pit...@free.fr added the comment:
Patch committed in r85291 (3.x), and backported to 3.1 (r85293) and 2.7
(r85292). Thank you!
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker
Brian Curtin cur...@acm.org added the comment:
Fixed in r85299 (py3k), r85300 (release31-maint), and r85301 (release27-maint).
--
assignee: jnoller - brian.curtin
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
versions: +Python 2.7
Mads Kiilerich m...@kiilerich.com added the comment:
Indeed. But, strictly speaking, there are no tests for IPs, so it
shouldn't be taken for granted that it works, even for commonName.
The rationale is that there isn't really any point in using an IP rather
a host name.
I don't know if
Antoine Pitrou pit...@free.fr added the comment:
A big warning is now present (*) in the urllib and httplib documentation pages.
Also, once issue1589 is fixed, we can go forward and make
{http.client,urllib.request} check hostname and cert if the user gives the
location of a bunch of CA
Éric Araujo mer...@netwok.org added the comment:
Can we reopen this as a feature request for 3.2?
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2571
___
New submission from Francesco Ricciardi francesco.riccia...@hp.com:
Tested with version 3.2a2. Not tested on version 2.7.
The current implementation of functools.total_ordering generates a stack
overflow because it implements the new comparison functions with inline
operator, which the Python
Francesco Ricciardi francesco.riccia...@hp.com added the comment:
Attached there is a solution of the problem, by implementing each comparison
only with the class __xx__ and __eq__ operators.
Also in the file there is a complete test suite for it.
--
Added file:
Nik Tautenhahn n...@livinglogic.de added the comment:
Well, then at least the documentation and the What's changed need to be
updated. Furthermore, if such decisions are made, it would be at least nice to
have some general decode-hook for json.JSONDecoder - the object_hook is
only used for
Nik Tautenhahn n...@livinglogic.de added the comment:
Yep, the solution should not be maybe it's str, maybe it's unicode - I mean,
if the decoder gives you a str if there are no fancy characters and unicode if
it contains some, this might lead to some confusion... And yes, in my opinion,
this
Changes by Anders Sandvig anders.sand...@gmail.com:
--
nosy: +asandvig
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue809163
___
___
New submission from Steven Samuel Cole steven.samuel.c...@gmail.com:
inside a function, I create a local variable by using setattr with the current
module as object, as in
setattr(modules[__name__], 'name', 'value')
if I _later_ in the code set name to None, the attribute becomes unavailable
Eric Smith e...@trueblade.com added the comment:
When python sees the assignment name = None, it assumes that 'name' is a
local variable. This happens before any code is executed. It then sees that
you're printing 'name' before it is assigned to, which is an error. It does not
take into
STINNER Victor victor.stin...@haypocalc.com added the comment:
This issue depends on issue #10039.
--
dependencies: +python é.py fails with UnicodeEncodeError if PYTHONFSENCODING is
used
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
r85302: _wrealpath() and _Py_wreadlink() support surrogates in the input path.
--
realpath_fs_encoding.patch: patch _wrealpath() to encode the resulting path
with the filesystem encoding (with surrogateescape) instead of the
New submission from Antoine Pitrou pit...@free.fr:
This is an experimental patch to optimize some operations on small ints.
pystone is 5-10% faster, pybench 2-3% faster, and here are some relevant
benchmarks from unladen swallow:
### nbody ###
Min: 0.345136 - 0.317502: 1.09x faster
Avg:
Antoine Pitrou pit...@free.fr added the comment:
I think the approach in issue10044 is better.
--
status: open - pending
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9800
___
Steven Samuel Cole steven.samuel.c...@gmail.com added the comment:
I'm just a developer, I don't know anything about Python internals or what
Python sees or does at what stage.
Looking at the sample file, code executed later has an influence on code
executed earlier - and that behavior is
Eric Smith e...@trueblade.com added the comment:
It's a well documented behavior.
Surely you ran across this link while researching your problem?
http://docs.python.org/reference/executionmodel.html#naming-and-binding
The paragraph beginning The following constructs bind names ... describes
Eric Smith e...@trueblade.com added the comment:
Isn't this just the normal universal newline handling? When you open it in
binary mode you see all of the characters, but in text mode (the absence of
b) you get normalized newlines (that is, they're converted to \n).
--
components:
Steven Samuel Cole steven.samuel.c...@gmail.com added the comment:
thank you very much for the clarification.
i did indeed not come across the page you've linked to, mainly because i did
not really know what to google for. actually, i do not recall ever looking into
the python language
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Arithmetic with void* pointers is not allowed by the Microsoft compilers. char*
should be used instead.
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
Shashank shashank.sunny.si...@gmail.com added the comment:
I have updated the patch with a check for the availability of C impl and to use
pure-py impl as a fallback.
How do you suggest would the tests change? As I had mentioned before, in my
understanding since there is no change in the API
Changes by Benjamin Peterson benja...@python.org:
--
assignee: - rhettinger
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10042
___
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
How does performance change if you adjust NSMALLPOSINTS and NSMALLNEGINTS, but
make no other changes?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10044
R. David Murray rdmur...@bitdance.com added the comment:
It is what is normally done *now* when there is both a C and a python
implementation (see, for example, test_datetime.py and test_io.py for two
different approaches to that). Not all tests have been updated to this
practice.
Thanks
Mark Dickinson dicki...@gmail.com added the comment:
Looks like a nice idea, at first glance, though I haven't looked at the code in
detail. I like the use of the macros to abstract away the long implementation
details.
INPLACE_SUBTRACT_end, not INPLACE_SUBSTRACT_end, please!
--
Mark Dickinson dicki...@gmail.com added the comment:
+#define _PyLong_IS_SMALL_INT(v) \
+(((PyLongObject *)(v)) = _PyLong_small_ints \
+ ((PyLongObject *)(v)) _PyLong_SMALL_INTS_END)
+/* These macros purposedly avoid a cast to int, since it is most of time
+ useless, and sometimes
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
As Daniel pointed out, the equivalent to code in builtins section comes from
2.x itertools documentation where and equivalent generator definition is
presented for each function. While these definitions are helpful when
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
I suggest removing the equivalent to code from the zip section and
replacing it with an example showing how to use zip with a for loop
similar to the example illustrating enumerate.
+1
--
PoltoS polto...@alsenet.com added the comment:
I've the with module ssl. If I do sock.close() (sock is instance of
ssl.SSLSocket), the connection is not closed: I see it as Established in
netstat and nothing is sent over network: tcpdump show nothing going thru the
network.
Python 2.6.5
Mark Dickinson dicki...@gmail.com added the comment:
Maybe we could consider adding an extra field to a PyLong giving its
'small_int' value for small values, and some flag value for non-small longs.
An extra field wouldn't actually enlarge the size of a PyLong for small
values---on a 64-bit
PoltoS polto...@alsenet.com added the comment:
By the way, doing a sock.shutdown(socket.SHUT_RDWR) with a subsequent
sock.close() helps to really close an SSL socket. But this may raise additional
errors with subsequent close() since on some OS (like OS X) shutdown may close
the socket. Am I
Antoine Pitrou pit...@free.fr added the comment:
Maybe we could consider adding an extra field to a PyLong giving its
'small_int' value for small values, and some flag value for non-small
longs. An extra field wouldn't actually enlarge the size of a PyLong
for small values---on a 64-bit
Daniel Stutzbach dan...@stutzbachenterprises.com added the comment:
I don't think arbitrary comparisons of pointers give well-defined
results, unless those pointers both happen to point into the same
array. (Might be wrong; I don't have a copy of the C standard to
hand.)
Technically
Changes by Amaury Forgeot d'Arc amaur...@gmail.com:
--
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5870
___
___
Max maxmo...@gmail.com added the comment:
Personally, I find it impossible in some cases to understand exactly what a
function does just from reading a textual description. In those cases, I always
refer to the equivalent code if it's given. In fact that's the reason I was
looking going the
Changes by Eric Smith e...@trueblade.com:
--
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10044
___
___
Python-bugs-list
New submission from Patrick Strawderman patr...@zope.com:
cStringIO.StringO's seek method has O(n) characteristics in certain,
albeit pathological, cases, while the pure Python implementation and
cStringIO.StringI's seek methods both execute in constant time in all cases.
When the file offset
Changes by Patrick Strawderman patr...@zope.com:
--
components: +None
type: - performance
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10045
___
Changes by Patrick Strawderman patr...@zope.com:
--
components: -None
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10045
___
___
Patrick Strawderman patr...@zope.com added the comment:
The second sentence should have said the gap is filled in with n null bytes
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10045
___
Trent Mick tre...@gmail.com added the comment:
c.f. some discussion on python-dev here:
http://mail.python.org/pipermail/python-dev/2010-October/104501.html
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue2142
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10045
___
___
Python-bugs-list
R. David Murray rdmur...@bitdance.com added the comment:
I'm changing the versions to just 2.7 (though I'm not sure this can be
considered a bug fix), since StringIO is reimplemented as part of io in 3.x.
--
nosy: +r.david.murray
versions: -Python 2.6, Python 3.1, Python 3.2, Python
Changes by Aahz a...@pythoncraft.com:
--
nosy: -Aahz, aahz
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10044
___
___
Python-bugs-list mailing
Antoine Pitrou pit...@free.fr added the comment:
Technically arbitrary relational comparisons of pointers are
undefined, but in practice Antoine's assumptions here are very modest.
They boil down to:
v = array[0] v array[array_len]
I can't say anything about the standard, but p q
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Thanks, this is a good idea.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10042
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I'll update the docs with an equivalent that works and that has a comment
showing when the StopIteration is raised and caught.
--
___
Python tracker rep...@bugs.python.org
Sandro Tosi sandro.t...@gmail.com added the comment:
Hello,
i've verified that the problem still exists in an up-to-date py3k branch, and
that the proposed patch indeed fixes the bug.
Since the patch no more applies cleanly, I've refreshed it, and also added
additional information about
Antoine Pitrou pit...@free.fr added the comment:
How does performance change if you adjust NSMALLPOSINTS and
NSMALLNEGINTS, but make no other changes?
It makes a very small difference (which is understandable since it doesn't cut
down on code execution a lot).
--
Mark Dickinson dicki...@gmail.com added the comment:
Technically arbitrary relational comparisons of pointers are undefined,
but in practice Antoine's assumptions here are very modest.
I disagree: there's a very real practical danger here. Namely, optimizing
compilers are free to assume
Mark Dickinson dicki...@gmail.com added the comment:
I can't say anything about the standard, but p q looks like it should
be the same as (p - q) 0
Yep.
which looks rather well-defined for pointers.
Nope. It's only well-defined for pointers pointing into the same array (or to
one past
Sandro Tosi sandro.t...@gmail.com added the comment:
Hello,
indentation problem has been fixed in r79901 and py3k syntax has been fixed in
r74764.
wrt os.getppid(), in the documentation it's stated that with 3.2 it added
support for windows too: I'd like someone running a windows box (I don't
Antoine Pitrou pit...@free.fr added the comment:
Nope. It's only well-defined for pointers pointing into the same
array (or to one past the end of an array). Otherwise it's undefined
behaviour.
How can the compiler tell whether two pointers are into the same
array? That sounds like an
Mark Dickinson dicki...@gmail.com added the comment:
How can the compiler tell whether two pointers are into the same
array? That sounds like an undecidable criterion.
It doesn't have to be able to tell---it's allowed to assume. :-)
--
___
Python
Antoine Pitrou pit...@free.fr added the comment:
How can the compiler tell whether two pointers are into the same
array? That sounds like an undecidable criterion.
It doesn't have to be able to tell---it's allowed to assume. :-)
That doesn't very clear or understandable.
--
Eric Smith e...@trueblade.com added the comment:
In the bad old days of 386 segment:offset memory architectures this was a
problem. You could have overlapping segments but pointers inside an object were
always in the same segment, so the segment selectors never had to be inspected.
Pointers
Mark Dickinson dicki...@gmail.com added the comment:
See the example above: suppose that a compiler is looking at a (p = q)
comparison of pointers. Suppose furthermore that in a particular case that
compiler is smart enough to figure out that q is a pointer to the start of an
array. Then
Antoine Pitrou pit...@free.fr added the comment:
In the bad old days of 386 segment:offset memory architectures this
was a problem. You could have overlapping segments but pointers inside
an object were always in the same segment, so the segment selectors
never had to be inspected. Pointers
New submission from Jason Baker amnorv...@gmail.com:
There's an issue with the documentation on the atexit module[1]. It states:
Note: the functions registered via this module are not called when the program
is killed by a signal, when a Python fatal internal error is detected, or when
Mark Dickinson dicki...@gmail.com added the comment:
How is the compiler supposed to know whether a and b belong to the same
array when compiling ptr_compare?
It doesn't need to know. So long as the compiler can guarantee that its code
will produce correct results in the case that a and b
Antoine Pitrou pit...@free.fr added the comment:
See the example above: suppose that a compiler is looking at a (p =
q) comparison of pointers. Suppose furthermore that in a particular
case that compiler is smart enough to figure out that q is a pointer
to the start of an array.
Which
Antoine Pitrou pit...@free.fr added the comment:
In other words, when producing code for ptr_compare, the compiler is
allowed to *assume* that a and b point into the same array, and act
accordingly.
But this assumption doesn't bring *anything*, right?
That is, there is no shortcut way to
Antoine Pitrou pit...@free.fr added the comment:
For the record, a Py_uintptr_t version works and has the same performance.
Would you agree to it or is there still some menacing oddity from the i386 days
lurking around?
--
___
Python tracker
Mark Dickinson dicki...@gmail.com added the comment:
For the record, a Py_uintptr_t version works and has the same
performance. Would you agree to it or is there still some menacing
oddity from the i386 days lurking around?
Technically, it's still dodgy: as the gcc manual notes in:
Antoine Pitrou pit...@free.fr added the comment:
I don't think there's much point in fixing this. 2.7 users can use io.BytesIO,
which is a fast type implemented in C.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10045
Sandro Tosi sandro.t...@gmail.com added the comment:
Hello,
I find the proposed text change good, and so here's a patch to add that in a
bit different format (sorry it's quite of a mess, but I took the occasion to
wrap that paragraph to 80th column).
Regards,
Sandro
--
keywords:
Antoine Pitrou pit...@free.fr added the comment:
As Eric said. Please see the socket.makefile doc:
“Return a file object associated with the socket. The exact returned type
depends on the arguments given to makefile(). These arguments are interpreted
the same way as by the built-in open()
New submission from Thomas Klausner t...@giga.or.at:
I'm running newspipe-1.1.9, an RSS reader
(http://newspipe.sourceforge.net/), on NetBSD-5.99.11/amd64 using
Python-2.6.6.
Sometimes, it core dumps with particular feeds in the configuration (I
guess depending on the feed, because when I
STINNER Victor victor.stin...@haypocalc.com added the comment:
I just created Python/fileutils.c: update the patch for this new file.
--
Added file: http://bugs.python.org/file19153/realpath_fs_encoding-2.patch
___
Python tracker
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file19147/realpath_fs_encoding.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10014
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
There was a bug in copy_absolute(): if _Py_wgetcwd() failed, the result was
undefined (depending of the content of path buffer). Especially, absolutize()
calls copy_absolute() with a buffer allocated on the stack: the content of
STINNER Victor victor.stin...@haypocalc.com added the comment:
deleted_cwd.patch, patch based on labrat's patch updated to py3k:
http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/python/rev/77f3ad10ba45
Procedure to test the patch:
- go into Python source tree
- make a directory z
-
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Fixed handling on unary minus in r85314. In so doing, it also liberalized what
literal_eval() accepts (3j+4 for example). This simplified the implementation
and removed an unnecessary restriction which wasn't needed for
R. David Murray rdmur...@bitdance.com added the comment:
It is possible this behavior changed after the docs were written. I'm adding a
couple of people to nosy who might have some insight into that possibility. It
could be either a change in finalization procedures or a change in signal
R. David Murray rdmur...@bitdance.com added the comment:
Indeed, newspipe appears to be a pure python package, so this looks like it is
probably a bug in python somewhere.
You might want to report it to newspipe too, though. They are likely to be
able to figure out how to reduce the problem
R. David Murray rdmur...@bitdance.com added the comment:
Can you reproduce this using python2.7? Python 2.6 is in security fix only
mode now.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10047
Adam Olsen rha...@gmail.com added the comment:
Signals can directly kill a process. Try SIGTERM to see this. SIGINT is
caught and handled by Python, which just happens to default to a graceful exit
(unless stuck in a lib that prevents that.) Try pasting your script into an
interactive
Evan Driscoll eva...@gmail.com added the comment:
Hah, I totally forgot about this thing.
I'd suggest a change to the proposed patch. The patched version says:
In nearly all cases, ``join(head, tail)`` returns a location
equivalent to *path* (the only exception being when there were
R. David Murray rdmur...@bitdance.com added the comment:
Here is an updated patch incorporating the reitveld feedback and feedback from
python-dev about the API. Now we have BytesParser instead of Parser with a
parsebytes method, and a message_from_binary_file helper. Generator also now
kai zhu kaizhu...@gmail.com added the comment:
my bad for not rtfm, but it seems the newline argument has no effect in
socket.makefile.
the TextIOWrapper signatures don't seem to match. a hack to put newline
parameter in 4th position or making it a keyword arg doesn't work either
(scratch
kai zhu kaizhu...@gmail.com added the comment:
my bad again, hacking newline parameter to the correct argument position works
(its in the position where error should b).
a one line patch would be:
socket.py line 163
-text = io.TextIOWrapper(buffer, encoding, newline)
+text =
Changes by kai zhu kaizhu...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file19156/socket.makefile.newline.kwarg.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10041
kiorky kio...@cryptelium.net added the comment:
This patch doesnt apply anymore on py26.
Joining an updated patch.
--
Added file: http://bugs.python.org/file19157/strftime-pre-1900.patch
___
Python tracker rep...@bugs.python.org
Ned Deily n...@acm.org added the comment:
Since you mention 7-zip, does that mean you are seeing the problem on a Windows
platform? If so, exactly which version of Windows and what kind of system?
Also, unless someone recognizes this as a duplicate of an earlier issue, there
may not be much
98 matches
Mail list logo