Tim Golden added the comment:
Joseph Armbruster wrote:
> The bad news [should a different bug be created for this?]
>
> See cmdline.rst:
> .. cmdoption:: -c
> .. cmdoption:: -m
> .. describe::
New submission from Tim Golden:
The print-media stylesheet in the sphinx docs did not completely
eliminate the on-screen layout. The attached patch is against r59327 of
sphinx/style/default.css and has been tested against html, htmlhelp and
web under native Win32.
--
components
Tim Lesher added the comment:
Both CRC-32 and ADLER32 are standards (described in ISO 3309 and RFC
1950 respectively); whatever fix implemented should make sure that the
output complies.
ISO 3309 isn't available online as far as I can see, but CRC-32
reference code is published in RFC
Tim Peters added the comment:
There is nothing you can do to repr() that's sufficient by itself to
ensure eval(repr(x)) == x.
The other necessary part is correctly rounded float /input/ routines.
The 754 standard does not require correctly rounding input or output
routines. It does re
Tim Peters added the comment:
Again, without replacing float input routines too, this is /not/ good
enough to ensure eval(repr(x)) == x even across just 100%-conforming 754
platforms.
It is good enough to ensure (well, assuming the code is 100% correct)
eval(repr(x)) == x across conforming 754
Tim Peters added the comment:
[Raymond]
> ...
> NaNs in particular are a really
> difficult case because our equality testing routines
> have a fast path where identity implies equality.
Works as intended in 2.5; this is Windows output:
1.#INF
>>> nan = inf - inf
>>
Tim Peters added the comment:
[Guido]
> ... We can just say that Python
> won't work correctly unless your float input routine is rounding
> correctly; a unittest should detect whether this is the case.
Sorry, but that's intractable. Correct rounding is a property that
need
Tim Peters added the comment:
[Guido]
> I take it your position is that this can never be done 100% correctly
No. David Gay's code is believed to be 100% correctly-rounded and is
also reasonably fast in most cases. I don't know of any other "open"
string<->
Tim Peters added the comment:
It's not a question of bugs. Call the machine writing the string W and
the machine reading the string R. Then there are 4 ways R can get back
the double W started with when using the suggested algorithm:
1. W and R are the same machine. This is the way t
Tim Peters added the comment:
[Guido]
> ...
> (2) Will the Windows input routine still accept the *old*
> representations for INF and NAN? IMO that's important (a) so as to be
> able to read old pickles or marshalled data, (b) so as to be able to
> read data files writte
Tim Peters added the comment:
Historical note: Guido is probably thinking of "the old" pickle and
marshal here, which did have problems with inf and NaN on Windows (as in
they didn't work at all). Michael Hudson changed them to use special
bit patterns instead, IIRC
Tim Peters added the comment:
Guido, right, for that to work reliably, double->str and str->double
must both round correctly on the platform doing the repr(), and
str->double must round correctly on the platform reading the string.
It's quite easy to understand why at a high le
New submission from Tim Koopman:
When using rmtree with a symlink to a directory as path, it will first
follow the symlink, (try to) remove all the contents of the source
directory and then raise the exception "OSError: [Errno 20] Not a
directory".
Expected behaviour: The function s
Changes by Tim Koopman:
--
title: shutils.rmtree fails on symlink, after deleting contents ->
shutil.rmtree fails on symlink, after deleting contents
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.o
Tim Koopman added the comment:
> While we are removing the contents of the target directory as expected,
This is not what I expected at all. I expected the function to fail,
because the target was not a directory, just a symlink to a directory.
That, or behavior similar to the command &quo
Tim Peters added the comment:
If someone has a more recent version of MS's compiler, I'd be interested
to know what this does:
inc = 2.0**-43
base = 1024.0
xs = ([base + i*inc for i in range(-4, 0)] +
[base] +
[base + 2*i*inc for i in (1, 2)])
print xs
print ["%.16g&q
Tim Peters added the comment:
Thanks, Amaury! That settles an issue raised earlier: MS's
string<->double routines still don't do correct rounding, and "aren't
even close" (the specific incorrect rounding showed here isn't
Tim Peters added the comment:
Right, Unix-derived C libraries generally do IEEE-754 "round to
nearest/even" rounding, while Microsoft's do "add a half and chop"
rounding. The Python reference manual says nothing about this, and
neither does the C standard (well, C89
Tim Peters added the comment:
Nice example! Yes, the round() implementation is numerically naive, in
this particular case ignoring that x+0.5 isn't necessarily representable
(it multiplies the input by 10.0, adds 0.5, takes the floor, then
divides by 10.0, and in this specific case addin
Tim Peters added the comment:
The functionality of what was called (and I agree confusingly so)
"sign()" here is supplied by "signbit()" in C99. That standard isn't
free, but the relevant part is incorporated in the free Open Group
standards:
http://www.opengroup
Tim Peters added the comment:
Unassigned myself -- I don't care about this 4 years later either ;-)
--
assignee: tim_one -> nobody
nosy: +nobody
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
New submission from Tim Lesher:
ConfigParser doesn't prevent "manually" adding a section named DEFAULT;
however, doing so creates a duplicate, inaccessible [DEFAULT] section in
the config file:
>>> import sys, ConfigParser
>>> c = ConfigParser.ConfigPa
Tim Delaney added the comment:
I've got no further details on this bug - I've never encountered it myself.
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.pyth
Tim Peters added the comment:
Mark, these are the "spirit of 754" rules:
1. If the mathematical result is a real number, but of magnitude too
large to approximate by a machine float, overflow is signaled and the
result is an infinity (with the appropriate sign).
2. If the mathemati
New submission from Tim Golden:
My previous patch to the print stylesheet used by Sphinx was a little
overenthusiastic and resulted in the right edge of the text truncating
on some printers. This version reverts a part of that and gives a useful
result on the printers I've tried.
Patch att
New submission from Tim Golden:
A patch against r61085 of /doc to correct some very minor typos in the docs
--
components: Documentation
files: python-doc-r61085.patch
keywords: patch
messages: 63048
nosy: tim.golden
severity: minor
status: open
title: Tiny patch to docs
versions
New submission from Tim Golden:
When pygments is not available to the sphinx build environment, the
PygmentsBridge in the highlighting.py module raises an exception in the
unhighlighted function. This function attempts to use the .dest
attribute which isn't set in the __init__ if the pyg
New submission from Tim Golden:
The doc/make.bat file for building the docs under Windows assumes the
standard location for the HTML Help Workshop. The attached patch looks
for an env var called HTMLHELP and uses that if it's set, falling back
to the standard location.
--
compo
Tim Golden added the comment:
Corrected patch which replaces the @echo off at the top of the file.
Added file: http://bugs.python.org/file9573/doc-make-r61125.patch
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/
New submission from Tim Golden:
The docs for the PYTHONPATH var indicate that its items are separated by
colons. In fact they're separated by whatever's customary for the O/S.
Patch attached.
--
components: Documentation
files: doc-using-cmdline-r61249.patch
keywords: patc
Tim Golden added the comment:
Alexander Belopolsky wrote:
> Alexander Belopolsky added the comment:
>
> PYTHONPATH variable is likely to be defined by sysadmins who may not know
> what os.pathsep is. Maybe it is better to say "OS-dependent separator
> (';' on W
Tim Golden added the comment:
Alexander Belopolsky wrote:
> Alexander Belopolsky added the comment:
>
>> .. but I have made the doc reference a link to the os.pathsep
>
> I knew you would say that :-). I was making my comment out of real life
> experience: sysadmi
Tim Golden added the comment:
Alexander Belopolsky wrote:
> Alexander Belopolsky added the comment:
>
>> Feel free to propose an alternative wording for the patch
>
> I thought I already did in my first post. The complete sentence should
> read:
>
> "&q
Tim Mooney <[EMAIL PROTECTED]> added the comment:
Paul, your comment in your patch, about this being fixed post Solaris 9,
doesn't appear to be correct. I have x86_64-sun-solaris2.10 with all
patches applied and the problem exists there too. I'm using Workshop 12.
--
Tim Mooney <[EMAIL PROTECTED]> added the comment:
I agree with Terry's comment -- Python's build machinery for multi-abi
systems is suboptimal, but documenting some methods that work for some
people would at least help.
--
nosy: +enchanter
_
Tim Gordon <[EMAIL PROTECTED]> added the comment:
You've missed off the two underscores after the name __setstate__ :p
--
nosy: +QuantumTim
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.
New submission from Tim Golden <[EMAIL PROTECTED]>:
The subprocess.Popen function reorganises the command line for process
creation when shell=True is passed in under Windows. It runs the
existing executable & arguments as arguments to %COMSPEC% /c. However
this fails when a second
Changes by Tim Golden <[EMAIL PROTECTED]>:
--
title: subprocess under windows fails to quote properly under Windows when
shell=True -> subprocess under windows fails to quote properly when shell=True
__
Tracker <[EMAIL PROTE
Tim Golden <[EMAIL PROTECTED]> added the comment:
Gabriel Genellina wrote:
> Gabriel Genellina <[EMAIL PROTECTED]> added the comment:
>
> You aren't testing the modified code, the Popen call should say
> shell=True.
>
> I think that a more PEP8-complian
Tim Golden <[EMAIL PROTECTED]> added the comment:
Updated patch against r61514. Test code now PEP8-compliant (I hope). New
tests cover spaces in command and parameter with and without shell=True,
both as simple command string and as list of command/args.
Added file: http://bugs.pyth
New submission from Tim Golden <[EMAIL PROTECTED]>:
doc\make.bat, used to build the docs under Windows, retains the
hardcoded pydoc.hhp name when building htmlhelp. Now that the help files
are built as .chm this file no longer exists and the build fails.
The attached patch to make.bat
New submission from Tim Golden <[EMAIL PROTECTED]>:
At present, os.access under Windows simply calls GetFileAttributes to
determine the readonly attribute (ignoring directories). The patch
attached combines this with the use of the AccessCheck API to compare
the user's permissions
New submission from Tim Wilcoxson <[EMAIL PROTECTED]>:
According to the documentation there is not suppose to be numeric
overflow in python 2.5. However
If you run a for loop with the range(1, 3)a couple of times (for
me 2 or 3 times worked) in the IDLE (1.2.2)GUI . It will
Tim Wilcoxson <[EMAIL PROTECTED]> added the comment:
msg65177, i did try to close cmd. thats why it closed. i wasnt clear
enough. my apologies. it merely lags in command line in gives a memory
error. in IDLE, it wont respond, and it gives a logon process erorr in
windows if you try to vi
Tim Wilcoxson <[EMAIL PROTECTED]> added the comment:
not a nick aye? lol. I am new cant you tell.
And when i ran the script nothing could be closed. And, yes, I realize
it could be a memory exhaustion issue with windows. windows is notorious
for crappy resource handling. However, my c
New submission from Tim Lesher <[EMAIL PROTECTED]>:
The urllib.quote docstring implies that it quotes only characters in RFC
2396's "reserved" set.
However, urllib.quote currently escapes all characters except those in
an "always_safe" list, which consists of alph
Tim Lesher <[EMAIL PROTECTED]> added the comment:
This one-line change to threading.py makes Event.wait() return isSet().
Also includes the corresponding update to documentation in threading.rst.
--
keywords: +patch
nosy: +tlesher
Added file: http://bugs.python.org/file10203/even
Changes by Tim Lesher <[EMAIL PROTECTED]>:
--
assignee: -> georg.brandl
components: +Documentation, Library (Lib) -Interpreter Core
nosy: +georg.brandl
_
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
New submission from Tim Pietzcker <[EMAIL PROTECTED]>:
When I try to run a script that is contained in a directory whose path
contains non-ASCII characters (e. g. Umlauts), Python 3.0a4 crashes with
the following error message:
(Windows cmd console):
E:\Eigene Dateien\Kl
New submission from Tim Pietzcker <[EMAIL PROTECTED]>:
Apologies if this has been reported before; I couldn#T find it on a
search but maybe I used the wrong search terms.
When I try to run a script that is contained in a directory whose path
contains non-ASCII characters (e. g. Umlauts),
Tim Pietzcker <[EMAIL PROTECTED]> added the comment:
Please delete this issue - clicked on "Submit" too soon. Sorry again.
__
Tracker <[EMAIL PROTECTED]>
<http://
New submission from Tim Golden <[EMAIL PROTECTED]>:
The docs for _winreg refer to RegLoadKey, which is the underlying API.
The function is actually exposed as LoadKey. Patch attached.
--
assignee: georg.brandl
components: Documentation
files: _winreg.patch
keywords: patch
me
Tim Pietzcker <[EMAIL PROTECTED]> added the comment:
I should perhaps add that this happened on a German Windows XP Pro SP2
installation.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Tim Gordon <[EMAIL PROTECTED]> added the comment:
This is the intended behaviour. See
http://www.python.org/doc/2.5.2/lib/string-methods.html for details.
--
nosy: +QuantumTim
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
Tim Delaney <[EMAIL PROTECTED]> added the comment:
Confirmed fixed in 0.43 - this issue can be closed.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
New submission from Tim Michelsen <[EMAIL PROTECTED]>:
Hello,
for users on the windows platform, it could be of great help if the
sphinx-quickstart would be adjuste to their platform.
Here are my suggestions:
* create a batch file instead of the Makefile
* make-docs.bat, contents:
Changes by Tim Michelsen <[EMAIL PROTECTED]>:
--
type: -> feature request
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4203>
___
__
Tim Golden <[EMAIL PROTECTED]> added the comment:
What would be helpful would be a specific suggestion from the OP (or, better
still, a doc patch) as to exactly what should change or at least what kind of
words should go where. As it stands, this report highlights a real but quite
g
Changes by Tim Lesher <[EMAIL PROTECTED]>:
--
nosy: +tlesher
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue4483>
___
___
Python
Tim Gordon <[EMAIL PROTECTED]> added the comment:
See the documentation for file.next
(http://docs.python.org/library/stdtypes.html#file.next). As you can
see, file.next uses a buffer which will mess with the result of other
methods, such as file.tell.
--
nosy: +Quan
Tim Gordon <[EMAIL PROTECTED]> added the comment:
Try using the readline method instead of next. I don't think that
applies the same buffering.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.
Tim Peters added the comment:
"is" is for testing object identity, not numeric equality. That "1 is
1" is always true is simply an implementation detail common to all
recent versions of CPython, due to CPython caching "very small" integer
objects. The language d
Tim Peters added the comment:
Please take requests for discussion to comp.lang.python. Many people
there understand this behavior and will be happy to explain it in as
much detail as you want. The bug tracker is not the place for this.
___
Python tracker
Tim Peters added the comment:
There's no need to keep asking -- this report was already rejected ;-)
Seriously, the efficiency argument carries no weight with me -- in 15
years of using Queue in a variety of applications, the time it takes to
.put and .get "here's a piec
Tim Golden added the comment:
You need to use raw strings or to use forward-slashes in your pathnames:
r"c:\downloads\hacking\0812logcompress"
or
"c:/downloads/hacking/0812logcompress"
The sequence \0 has a special meaning in strings, introducing an octal
escape, I thi
Changes by Tim Lesher :
--
nosy: +tlesher
___
Python tracker
<http://bugs.python.org/issue5015>
___
___
Python-bugs-list mailing list
Unsubscribe:
Tim Gordon added the comment:
If you know what variable you are going to be eval-ing, or at least,
have a list of those that might be eval-ed, you can get around this
issue by making sure they are explicitly referenced in the inner scope
(i.e., in the list comprehension). For example, even
Tim Golden added the comment:
Reproduced on trunk r69621
--
nosy: +tim.golden
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue5261>
___
___
Tim Golden added the comment:
Problem seems to be in Modules/_multiprocessing/semaphore.c
line 549 where "__enter__" is defined as an alias for
semlock_acquire, as is "acquire" a few lines above. However,
while "acquire" specifies METH_VARARGS | METH_
Changes by Tim Golden :
--
type: -> crash
___
Python tracker
<http://bugs.python.org/issue5261>
___
___
Python-bugs-list mailing list
Unsubscri
Tim Golden added the comment:
OK, I can see why this is happening and in fact there are two levels of
problem. The trouble is that, in my ignorance, I can't work out exactly
why the existing code is doing what it's doing.
(References to mmapmodule.c at r69666)
Problem 1: At lin
Tim Golden added the comment:
Patch attached to mmapmodule.c and test_mmap.py
--
keywords: +patch
Added file: http://bugs.python.org/file13107/mmapmodule.patch
___
Python tracker
<http://bugs.python.org/issue2
Tim Golden added the comment:
Can't reproduce under Python 2.6 or Python 2.5.2. Likelihood is a virus
checker / indexer process.
--
nosy: +tim.golden
___
Python tracker
<http://bugs.python.org/i
Tim Golden added the comment:
Have a look at issue 2733
http://bugs.python.org/issue2733
where I've just proposed a patch in this area. I'm also
not sure exactly what's going on, but I have patched what
I believe is a linked pair of bugs in that code.
--
no
New submission from Tim Peters :
When looking into a StackOverflow question about surprisingly high memory use,
I stumbled into this (under 3.10.1, Win64):
>>> import sys
>>> s = "1 2 3 4 5".split()
>>> s
['1', '2', '3',
Change by Tim Peters :
--
type: behavior -> resource usage
___
Python tracker
<https://bugs.python.org/issue46990>
___
___
Python-bugs-list mailing list
Un
Tim Peters added the comment:
Well, that's annoying ;-) In context, the OP was saving a list of 10 million
splits. So each overallocation by a single element burned 80 million bytes of
RAM. Overallocating by 7 burned 560 million bytes.
Which is unusual. Usually a split result is short-
Tim Peters added the comment:
Actually, I see this ('Debug Assertion Failed!' in the same spot) every time I
try to run the test suite with a debug build, starting yesterday.
Didn't have time to track it down. It _appeared_ to an obscure consequence of
this commit:
Tim Peters added the comment:
BTW, the frequency of this new failure mode appears to be vastly increased if
running the debug tests with "-j0". For example, the box popping up is reliably
the very first sign of life if I run this from the PCBuild directory:
rt
Tim Peters added the comment:
Christian, yes, but only in a debug build. See Eryk Sun's message a bit above:
the machinery to prevent this is already present, but isn't getting called
early enough.
--
___
Python tracker
<https://bu
Tim Mitchell added the comment:
I would really prefer the dispatch logic remains simple and fast, rather than
handle single keyword arguments.
--
nosy: +Tim Mitchell2
___
Python tracker
<https://bugs.python.org/issue36
Tim Mitchell added the comment:
I've come up with a version that does not require a base class.
Seems a bit hacky as the descriptor __get__ method now modifies the class to
put the dispatch table in place the first time the method is accessed.
--
Added file: https://bugs.pytho
Change by Tim Mitchell :
Added file: https://bugs.python.org/file50689/test_sdm.py
___
Python tracker
<https://bugs.python.org/issue36457>
___
___
Python-bugs-list mailin
New submission from Tim Peters :
I added some excruciatingly obscure technical tricks to ensure that
fnmatch.py's regexps can't fall into exponential-time match failures.
It's hard to stop re from useless backtracking. But the new "atomic groups"
make that easy i
Change by Tim Peters :
--
keywords: +patch
pull_requests: +30118
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/32029
___
Python tracker
<https://bugs.python.org/issu
Tim Peters added the comment:
New changeset 5c3201e146b251017cd77202015f47912ddcb980 by Tim Peters in branch
'main':
bpo-47080: Use atomic groups to simplify fnmatch (GH-32029)
https://github.com/python/cpython/commit/5c3201e146b251017cd77202015f47
Change by Tim Peters :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Tim Peters added the comment:
Definitely a duplicate, and I doubt Mark or Raymond will change their mind.
One observation: while floats are not uniformly dense in [0, 1), random()
results are uniformly spaced. Each is of the form I / 2**53 for an integer I in
range(2**53).
--
nosy
Tim Golden added the comment:
> I don't see why the wmi module ( https://pypi.org/project/WMI/ ) can't be
> used instead to get the information
Well I can speak here as the author of that module and as an (occasional) core
developer. The wmi module stands on the shouldere
Tim Peters added the comment:
Various kinds of tasks:
- "Power switch must be on." Needs to done the first time. _May_ need to be
done again later (if some later task turns the power off again). Can be done
any number of times without harm (beyond the expense of checking), so lo
Tim Peters added the comment:
I believe I'm elaborating on your "footgun".
It doesn't matter to me whether we pick some scheme and document it, _if_ that
scheme is incoherent, impossible to remember, error-prone, etc.
That's how, e.g., regular expression syn
Tim Peters added the comment:
I'll testify that I won't volunteer one second of my time pursuing these
abstract "purity" crusades ;-) `isfinite()` et alia were added to supply
functions defined by current standards to work on IEEE floating-point values.
People work
New submission from Tim Peters :
Recording before I forget. These are easy:
1. As the comments note, cache the hash code.
2. Use the new (in 3.8) pow(denominator, -1, modulus) to get the inverse
instead of raising to the modulus-2 power. Should be significantly faster. If
not, the new
Tim Peters added the comment:
Why I expected a major speedup from this: the binary exponentiation routine
(for "reasonably small" exponents) does 30 * ceiling(exponent.bit_length() /
30) multiply-and-reduces, plus another for each bit set in the exponent.
That's a major dif
Tim Peters added the comment:
Well, details matter ;-) Division in Python is expensive. In the
exponentiation algorithm each reduction (in general) requires a 122-by-61 bit
division. In egcd, after it gets going nothing exceeds 61 bits, and across
iterations the inputs to the division
Tim Peters added the comment:
Mark, I did just a little browsing on this. It seems it's well known that egcd
beats straightforward exponentiation for this purpose in arbitrary precision
contexts, for reasons already sketched (egcd needs narrower arithmetic from the
start, benefits fro
Tim Peters added the comment:
I'm with Mark: leave numeric hashes alone. There's no reason to change them,
and in addition to what Mark wrote it's a positively Good Thing that `hash(i)
== i` for all sufficiently small ints. Not only is that efficient to compute,
it guara
Tim Peters added the comment:
Some random notes:
- 1425089352415399815 appears to be derived from using the golden ratio to
contrive a worst case for the Euclid egcd method. Which it's good at :-) Even
so, the current code runs well over twice as fast as when replacing the
pow(tha
Tim Peters added the comment:
For posterity:
"Modular Inverse Algorithms Without Multiplications for Cryptographic
Applications"
Laszlo Hars
https://link.springer.com/article/10.1155/ES/2006/32192
"""
On the considered computational platforms fo
New submission from Tim Peters :
For example, these should all raise ValueError instead:
>>> pow(2, -1, 1)
0
>>> pow(1, -1, 1)
0
>>> pow(0, -1, 1)
0
>>> pow(2, -1, -1)
0
>>> pow(1, -1, -1)
0
>>> pow(0, -1, -1)
0
--
component
301 - 400 of 2346 matches
Mail list logo