Amaury Forgeot d'Arc added the comment:
The backslash \ has a special meaning in strings: \n is the new line character,
and \t is the tab character:
http://docs.python.org/2/reference/lexical_analysis.html#string-literals
Try to print the string!
You could use \\, or raw strings rlike this.
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net:
--
nosy: +piotr.dobrogost
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15244
___
___
New submission from John Szakmeister:
I discovered this issue while trying to track down why our upcoming release for
Nose 1.3.0 was deadlocking under Ubuntu 12.04 with Python 3.3. It turns out
that the read() was being interrupted leaving data in the subprocess's output
buffers, which
Changes by Bohuslav Slavek Kabrda bkab...@redhat.com:
--
nosy: +bkabrda
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16754
___
___
Richard Oudkerk added the comment:
The change in your patch is in a Windows-only section -- a few lines before the
chunk you can see _winapi.GetExitCodeProcess().
Since read() on Windows never fails with EINTR there is no need for
_eintr_retry_call().
If you are using Linux then there must
Richard Oudkerk added the comment:
BTW, on threads are only used on Windows. On Unix select() or poll() is used.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17367
___
STINNER Victor added the comment:
I attached a patch that I wrote for Wyplay: py_setallocators.patch. The patch
adds two functions:
PyAPI_FUNC(int) Py_GetAllocators(
char api,
void* (**malloc_p) (size_t),
void* (**realloc_p) (void*, size_t),
void (**free_p) (void*)
);
Changes by STINNER Victor victor.stin...@gmail.com:
--
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3329
___
John Szakmeister added the comment:
Good grief... how did I miss that. The problem has been flaky for me to
induce. I'll take a closer look at the correct section. Thank you Richard.
--
___
Python tracker rep...@bugs.python.org
Christian Heimes added the comment:
Gregory, thanks. :)
By the way CPython's list type does more than log(N) resize ops:
$ ./listresize.py 10 100 1000 1 10
10 list.append() do 4 resize ops.
100 list.append() do 11 resize ops.
1000 list.append() do 28 resize ops.
1 list.append() do
STINNER Victor added the comment:
To be exhaustive, another patch should be developed to replace all calls for
malloc/realloc/free by PyMem_Malloc/PyMem_Realloc/PyMem_Free. PyObject_Malloc()
is still using mmap() or malloc() internally for example.
Other examples of functions calling
Amaury Forgeot d'Arc added the comment:
Some customizable memory allocators I know have an extra parameter void
*opaque that is passed to all functions:
- in zlib: zalloc and zfree: http://www.zlib.net/manual.html#Usage
- same thing for bz2.
- lzma's ISzAlloc:
Antoine Pitrou added the comment:
By the way CPython's list type does more than log(N) resize ops:
Obviously it's an asymptotic complexity, not a hard number.
I understand the proposal as a power user tool. Most people don't
need a pneumatic hammer, an ordinary hammer suffices. But in some
Richard Oudkerk added the comment:
I will close the issue then.
If you track the problem down to a bug in Python then you can open a new one.
--
resolution: - invalid
stage: - committed/rejected
status: open - closed
___
Python tracker
Eli Bendersky added the comment:
I wouldn't expend too much effort on older versions though. So unless it's
simple to adapt, IMHO 3.3+ is good enough.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12768
Changes by Eli Bendersky eli...@gmail.com:
--
nosy: +eli.bendersky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16576
___
___
Python-bugs-list
Eli Bendersky added the comment:
I propose to start with the attached documentation fix (generated vs. 3.2 but
should be applied to all active branches).
A code fix has to be discussed more thoroughly because in theory some code
running only on x86-32 can rely on it and will break.
Eli Bendersky added the comment:
I propose to start with the attached documentation fix (generated vs. 3.2 but
should be applied to all active branches).
A code fix has to be discussed more thoroughly because in theory some code
running only on x86-32 can rely on it and will break.
Changes by Eli Bendersky eli...@gmail.com:
--
Removed message: http://bugs.python.org/msg183596
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16576
___
Changes by Eli Bendersky eli...@gmail.com:
Removed file: http://bugs.python.org/file29327/issue16576.docfix.1.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16576
___
Changes by Eli Bendersky eli...@gmail.com:
--
nosy: +amaury.forgeotdarc, belopolsky
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16576
___
___
Zachary Ware added the comment:
Fair points. I had originally put it in the section you suggested, but then
decided that it better fit in a new section of its own under Classes and
functions as that section describes in depth the API of unittest. But then,
it also makes sense to move the
karl added the comment:
orsenthil,
would that test work?
See issue-17324-test-1.patch
Here the result of the test which is FAIL as planned (given the current issue).
→ ./python.exe Lib/test/test_httpservers.py
test_header_buffering_of_send_error (__main__.BaseHTTPRequestHandlerTestCase)
Charles-François Natali added the comment:
Here's the result of a benchmark sending a 1GB file over a Gb/s ethernet
network:
vanilla:
real0m9.446s
user0m0.493s
sys 0m1.425s
sendfile:
real0m9.143s
user0m0.055s
sys 0m0.986s
The total time doesn't vary much (the reduction
New submission from Aki:
Specifying any object_pairs_hook makes JSON decoding break when JSONObject from
json/decoder.py is used.
Can be emulated easily by setting c_make_scanner = None at json/scanner.py
Example script:
**
import json
test = '{key: value, empty: {}}'
def hook(pairs):
Giampaolo Rodola' added the comment:
Note that is changed Giampaolo's patch to call sendfile
on the whole file, not by block.
That's not compatible across POSIX platforms.
--
___
Python tracker rep...@bugs.python.org
Charles-François Natali added the comment:
That's not compatible across POSIX platforms.
What do you mean ?
I juste call fstat() before calling senfile() to find out the file
size, and pass it as `count`.
--
___
Python tracker
Giampaolo Rodola' added the comment:
Ah ok, I misinterpreted what you wrote then.
Generally speaking though, you don't need to know the file size: you just
decide a blocksize (= 65536 is usually ok) and use sendfile() as you use
send().
--
___
R. David Murray added the comment:
Both the Python version and the C version are supposed to be subject to the
same tests (at least in Python3, I don't remember the state of things in 2.7),
so this probably indicates there is a missing test for this case. Do you have
any interest in trying
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti, serhiy.storchaka
stage: - test needed
type: - behavior
versions: -Python 3.1, Python 3.5
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17368
moijes12 added the comment:
This patch was built on 3.2(I made the changes on the local repo after running
command hg up 3.2). I've run the test suite and only test_site failed. This
patch has some improvements over 12768_2.patch.
--
Added file:
Charles-François Natali added the comment:
Ah ok, I misinterpreted what you wrote then.
Generally speaking though, you don't need to know the file size: you just
decide a blocksize (= 65536 is usually ok) and use sendfile() as you use
send().
But then you make much more syscalls than
Giampaolo Rodola' added the comment:
Specifying a big blocksize doesn't mean the transfer will be faster.
send/sendfile won't send more than a certain amount of bytes anyways.
If I'm not mistaken I recall from previous benchmarks that after a certain
point (131072 or something) increasing the
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17338
___
___
Python-bugs-list
Ezio Melotti added the comment:
Here's a proof of concept that defines a new _print_total_refs() function and
calls it through the PRINT_TOTAL_REFS macro, disables printing the refs by
default, and adds a -X showrefcount option to reenable it. This can also be
achieved at runtime by
Charles-François Natali added the comment:
Specifying a big blocksize doesn't mean the transfer will be faster.
send/sendfile won't send more than a certain amount of bytes anyways.
The transfer won't be faster mainly because it's really I/O bound.
But it will use less CPU, only because
Changes by Gregory P. Smith g...@krypto.org:
--
versions: +Python 3.4 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13229
___
___
Gregory P. Smith added the comment:
I'd like to take care of this at Python. At least for posix (someone else can
deal with the windows side if they want).
I just stumbled upon an extension module at work that someone wrote
specifically because os.listdir consumed way too much ram by
Changes by Piotr Dobrogost p...@bugs.python.dobrogost.net:
--
nosy: +piotr.dobrogost
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17322
___
___
Tim Golden added the comment:
IIRC Nick Coghlan had put a bit of work into this a few months ago as an
external module with a view to seeing if it got traction before putting
anything into the stdlib. Might be worth pinging him, or looking to see
what he'd done. Can't remember the keywords to
Éric Araujo added the comment:
Nick’s lib is called walkdir. See bitbucket, readthedocs, possibly
hg.python.org.
(FTR Antoine’s OO abstraction is pathlib)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11406
Berker Peksag added the comment:
I've converted Ezio's patch to Mercurial format, updated the lib2to3
documentation and added tests for assertRegexpMatches and assertRaisesRegexp
aliases[1].
[1] http://docs.python.org/3.4/library/unittest.html#deprecated-aliases
--
components: +2to3
Antoine Pitrou added the comment:
I haven't read the patch in detail but I think the reference to Java's
threading model could probably be discarded. First, I don't know if it's still
true, second, I don't think anyone cares :)
--
nosy: +pitrou
stage: needs patch - patch review
Dave Humphries added the comment:
Hi Amaury,
As I can't reopen the bug I will have to add it here (or open a new bug report).
The issue was about the string used in os.chdir() particularly.
While this is expected behaviour in a python string it is not expected
behaviour from a well formed file
Eli Bendersky added the comment:
I haven't read the patch in detail but I think the reference to Java's
threading model could probably be discarded. First, I don't know if it's
still true, second, I don't think anyone cares :)
I agree. It could be a remnant of a time where the threading
Charles-François Natali added the comment:
IIRC Nick Coghlan had put a bit of work into this a few months ago as an
external module with a view to seeing if it got traction before putting
anything into the stdlib. Might be worth pinging him, or looking to see
what he'd done. Can't remember
Tim Golden added the comment:
OK, sorry for the noise then; I had the idea that it was doing something
with iterators/generators.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11406
___
New submission from R. David Murray:
m = message_from_string(Content-Disposition: attachment;
filename*0*=can't decode this filename)
m.get_filename()
Traceback (most recent call last):
File stdin, line 1, in module
File /home/rdmurray/python/p32/Lib/email/message.py, line 752, in
Gregory P. Smith added the comment:
right he has a separate issue open tracking the walkdir stuff in
issue13229. I saw it first before finding this issue which is exactly what
I wanted. :)
--
___
Python tracker rep...@bugs.python.org
Roumen Petrov added the comment:
This is issue introduced with implementation of SOABI. Build of standard
extensions is protected by following code:
-
class PyBuildExt(build_ext):
def __init__(self, dist):
build_ext.__init__(self, dist)
self.failed = []
def
Giampaolo Rodola' added the comment:
The transfer won't be faster mainly because it's really I/O bound.
But it will use less CPU, only because you're making less syscalls.
Have you actually measured this?
--
___
Python tracker
Roundup Robot added the comment:
New changeset 33208a574875 by Stefan Krah in branch '3.3':
Issue #17361: Use cc from sysconfig for testing flags.
http://hg.python.org/cpython/rev/33208a574875
--
nosy: +python-dev
___
Python tracker
Stefan Krah added the comment:
Thanks for the patch. Should be fixed.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17361
New submission from Brandon Craig Rhodes:
A friend (@theomn on Twitter) was just working off of PEP-333 when I mentioned
to him that PEP-, and he had never heard of it, and he expressed the wish
that PEPs would have a banner or something at the top if there is a more recent
version of
Brandon Craig Rhodes added the comment:
(Corrected not to note in the title and went with enhancement)
--
title: PEP should not if it has been superseded - PEP should note if it has
been superseded
type: - enhancement
___
Python tracker
Brandon Craig Rhodes added the comment:
The original inspiration:
https://twitter.com/theomn/status/309468740611891200
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17370
___
Changes by Owen Nelson onel...@gmail.com:
--
nosy: +Owen.Nelson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17370
___
___
Python-bugs-list
Dave Malcolm added the comment:
For reference, quoting PEP 3149:
sysconfig.get_config_var('SO')
'.cpython-32mu.so'
--
nosy: +dmalcolm
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16754
New submission from Hc.Z:
My python environment is Python3.3 in Windows 7 32-bit. I was installing Pandas
package from source code, through Microsoft Visual C++ 2008 Express is
installed in my computer, the installation process still failed and report a
Unable to find vcvarsall.bat error.
I
karl added the comment:
r.david.murray,
how did you enter the first without a syntax error?
import email.message
m = message_from_string(Content-Disposition: attachment;
filename*0*=can't decode this filename)
File stdin, line 1
m = message_from_string(Content-Disposition:
R. David Murray added the comment:
Heh. I used in the original, and edited it when I posted it for
conciseness. Sigh. My apologies.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17369
Changes by R. David Murray rdmur...@bitdance.com:
--
components: +email
nosy: +barry
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17369
___
___
karl added the comment:
http://docs.python.org/3/library/xml.etree.elementtree.html#supported-xpath-syntax
20.5.2. XPath support
This module provides limited support for XPath expressions for locating
elements in a tree. The goal is to support a small subset of the abbreviated
syntax; a full
Hc.Z added the comment:
My python environment is Python3.3 in Windows 7 32-bit. I was installing Pandas
package from source code, through Microsoft Visual C++ 2008 Express is
installed in my computer, the installation process still failed and report a
Unable to find vcvarsall.bat error.
I
Terry J. Reedy added the comment:
I initially had a bit of the same confusion as Daniel, and hence agree on
clarifying.
I have more comments on 7.6. Building the documentation.
1. You need to have Python 2.4 or higher installed.
Until 3.x docs can be built with 3.x, (and I just verified that
New submission from Eric Snow:
minidom already has something like this:
http://docs.python.org/3/library/xml.dom.minidom.html#xml.dom.minidom.Node.toprettyxml
This is something that appears to have almost made it in quite a while ago:
http://effbot.org/zone/element-lib.htm#prettyprint
New submission from Eric Snow:
While working on a subclass of inspect.Signature, I realized that
inspect.signature is treated as the constructor. So subclassing isn't so
simple. At first I considered adding an extra parameter to inspect.signature
allowing different Signature classes. Not
67 matches
Mail list logo