New submission from James :
Recently installed Python 2.7.1 on my MacBook running OS X 10.6.6 and have not
been able to use IDLE without it freezing. When I force quit it doesn't show
that it's not responding. I can run scripts fine, but if I were to try to
copy-paste, or save via
New submission from James :
Hi distutils,
When I run:
./setup.py bdist --formats=rpm
on my source directory, I get the error:
rpm -ba --define _topdir /home/james/code/scantran/build/bdist.linux-x86_64/rpm
--clean build/bdist.linux-x86_64/rpm/SPECS/scantran.spec
-ba: unknown option
error
James added the comment:
In the source for distutils it seems to attempt to use 'rpmbuild' if it exists,
but otherwise falls back on regular 'rpm', however in my rpm:
$ rpm --version
RPM version 4.8.1
this fails as there is n
James added the comment:
I'll write a docs and script patch for this next week...
I'm happy to do the work,
Thanks for the comments.
James
--
___
Python tracker
<http://bugs.python.o
James added the comment:
i'm fine with that and willing to contribute patches, however i would feel
better if whoever upstream was, was more supportive of the idea.
someone let me know.
a thought:
- it's true (as mentioned) that distclean isn't necessarily directly related t
New submission from James :
Creating a Bitfield from a ctypes union and structure results in unexpected
behaviour. It seems when you set the bit-width of a structure field to be
greater than 8 bits it results in the subsequent bits being set to zero.
class BitFieldStruct
New submission from James:
Have any valid .netrc file. For testing purposes you can use this:
machine abc.xyz login myusername password mypassword
The documentation for netrc.__repr__() states that it "dumps the class data as
a string in the format of a netrc file". However, when
New submission from James:
For example:
Python 3.2.2 (default, Feb 10 2012, 09:23:17)
[GCC 4.4.5 20110214 (Red Hat 4.4.5-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> class A:
... def f(*args):
...
James added the comment:
I've attached a patch that I think fixes the variable arguments problem, and
changes the SystemErrors that can be obtained by misusing super() into
RuntimeErrors (I assume that's more appropriate?). There are three more
SystemErrors I'm not sure abou
James added the comment:
It turns out I don't really understand how frame objects work. My patch can
crash python if you do this:
>>> class A:
... def f(*args):
... args = 1
... print(super())
...
>>> A().f()
python: Objects/typeob
James added the comment:
Sorry, I wasn't very clear. super() currently works by assuming that self is
the first entry in f_localsplus, which is defeated, for example, by doing:
>>> class A:
... def f(self):
... del self
... super()
...
>>>
New submission from James :
I was trying to suppress the error message as shown in the title, when I
found out (by searching through the source) that there is a NullHandler
for precisely this purpose.
http://svn.python.org/view/python/trunk/Lib/logging/__init__.py?r1=66211&r2=67511
do
James added the comment:
very well,
i didn't notice the
http://docs.python.org/library/logging.html#configuring-logging-for-a-library
and i thank you for your time and efforts!
cheers,
_J
--
___
Python tracker
<http://bugs.python.org/i
New submission from James :
why is it that the zeroth readline history item is seemingly always
none. I would expect this to support zero-based indexing in python, but
perhaps I have missed some detail in readline somewhere. Cheers,
_J
ja...@work:~$ python
Python 2.5.2 (r252:60911, Oct 5 2008
James added the comment:
it seems to me, that any and all readline interfaces should/could
standardize to the indexing scheme as used by the language; maybe i'm
wrong, but since python is zero based, so could the readline interfaces.
it's definitely more logical for a python pro
James added the comment:
@mark: thanks for the comment; i suppose we should investigate why and
if c readline is 1 based...
--
___
Python tracker
<http://bugs.python.org/issue6
James added the comment:
i found this:
http://tiswww.case.edu/php/chet/readline/history.html
search for: "Variable: int history_base"
perhaps we can set this to 0 in the python bindings.
more so, perhaps someone is using 1 because they made
New submission from James :
os.path.normpath doesn't normalize paths that start with ../
you would expect the final output line in the secpnd run to read:
"normpath: badnormpath.py" instead of: "normpath: ../tmp/badnormpath.py"
example:
ja...@home:~$ cd t
James added the comment:
i looked at the source for normpath.
i know that it doesn't look at the filesystem.
assuming you're not currently sitting at the root directory, in all?
cases ../xyz brings you back to where you started. we expect normpath to
clean up a path string,
New submission from James :
Priority: 4
Keywords: patch, distutils, pyc
Comment:
I posted this on the distutils mailing list, and they said I should post
it here instead.
---
Hi,
I'm certaintly new to distutils and setuptools, however I figured I'd
send in this patch, and either i
James added the comment:
Hi, the patch only removes them if one adds the --pyc option.
I think it is a good idea to have some option or target somewhere to
remove the types of files that can be regenerated because often
developers want to "get them out of the way". Example: I'll
James added the comment:
I could agree with R. David Murray, and I think that it's fine that this
be included under a dist clean command.
Ultimately I'm writing an application and I'm trying to use distutils
with it. I'll potentially run a: "$ setup.py build_ext -i&qu
James added the comment:
ps: included is a platform independent version of the code, so that it
doesn't depend on os.system() specific commands.
HTH,
_J
--
Added file: http://bugs.python.org/file14146/clean.py.patch
___
Python tracker
James added the comment:
Antoine: Okay sorry not a mess then.
I just figure that if i'm using the distutils tool for doing all the fun
things to my local source directory that I potentially used to do with
say a makefile, then would it not be beneficial to have a useful
-option- (as includ
James added the comment:
Currently, I have (had) a make file with a clean target that would
remove these files. Would you recommend keeping this file and it's
associated functionality, or is the idea to be able to integrate this
into distutils and be able to do away with makefiles for p
New submission from James :
Hi, I have shown the output from my terminal below, since it will be
easier to follow for explaining the bug.
ja...@computer:~/testsetup$ ls
helloworld2.py image1.jpg setup.py
ja...@computer:~/testsetup$ cat setup.py
#!/usr/bin/python
import distutils.core #from
New submission from James :
Hi, in using os.utime, it's nice that you can specify `None' for the
second argument. However it would be even `nicer' to be able to specify
None for either (or potentially both) values for the argument in the
tuple. to emulate this, i've been u
James added the comment:
very well, this is a good point.
i'm guessing nobody would every accept a patch for upstream utime? (in c)
thanks for your comment.
--
___
Python tracker
<http://bugs.python.org/i
James added the comment:
great, thanks for the info.
--
___
Python tracker
<http://bugs.python.org/issue6205>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from James :
Attempting to change the working directory and then import based on that change
has no effect. Import seems impossible. Attached is tarball example. As seen
below, bar1.py can import foo from src, however bar2.py bar3.py and bar4.py
cannot, despite their respective
James added the comment:
It's an incompatible change; it would definitely break my code, however I think
it should be wishlisted for an API-break release like 3.5 or 4.0 or something
like that. IMHO, the bindings should be "pythonic", even if the underlying
library isn't.
James added the comment:
I'd be writing a patch which would allow a programmer the option to explicitly
use/instantiate the library in a zero-based way. This way throughout their
particular program, the indexing of elements could be consistent. Not having
this causes you to have to r
New submission from James:
Just the General Help that is in Python, doesn't really help. Here's what
would help, if every Module, had an example in code of how it was used instead
of the Trees. I mean, word trees, well that's what the writing reminds me of,
is word trees lik
James added the comment:
Just the General Help that is in Python, doesn't really help. Here's what
would help, if every Module, had an example in code of how it was used instead
of the Trees. I mean, word trees, well that's what the writing reminds me of,
is word trees like y
New submission from James:
Hello,
I really think that Microsoft’s last release of Quick Basic 4.5 really had
the ultimate of all help files. Here’s why, you could cut and copy the code to
the program you were working on, and then alter it to your program. It was one
of the nicer things
New submission from James:
Hello,
Now, I really want you to think about the hunt and pick method of
programming and learning how to program. Being self taught, isn’t something
that can happen unless, the authors of the software want people to learn how to
use it. Help files, are not
James added the comment:
I've written several languages, I'm no novice but, I also know when to brush
up.Its just how I started, it looks like an opening for others.
-Original Message-
From: R. David Murray
Sent: Wednesday, October 22, 2014 6:25 AM
To: geek.mo...@gmail.c
James added the comment:
What is the status of these changes? Apparently they were slated for inclusion
in 3.5 but it looks as though they haven't hit yet - is there a reason for
this, or was it just forgotten?
--
nosy: +JamesGuthrie
___
P
New submission from james:
http://www.thebigidea.co.nz/profile/james/65456
http://www.cyclefish.com/hebucoho/
https://soundation.com/user/MazeRunnerTheScorchTrials
https://issuu.com/mazerunnerthescorchtrials
http://poputka.ua/user-profile-39591.aspx
http://www.pikore.com/mazerunnerthescorch
New submission from James:
>>> import mock
>>> print mock.__version__
2.0.0
>>>
=
test.py
from mock import Mock,call
class BB(object):
def __init__(self):pass
def print_b(self):pass
def print_bb(self,tsk_id):pass
bMock = Mock(return
New submission from James:
Referring to Python 2.7 running on Windows (7/8):
At the interactive interpreter, if either 1) Caps are Locked OR 2) is
held while an alpha-character is selected, the character is output and
displayed as uppercase, as one would expect. However, in Python 2.7, when
James added the comment:
When I start the interpreter with the -S switch, the problem goes away.
Thanks for looking into it, and I apologize for the false alarm!
--
___
Python tracker
<http://bugs.python.org/issue24
Changes by James :
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue24035>
___
___
Python-bugs-list
New submission from James Lawrie :
The datagram_received:
def datagram_received(self, data, addr):
if self.recvfrom:
self.recvfrom.set_result((data, addr))
self.recvfrom = None
Throws an exception if self.recvfrom is a Future Cancelled:
Exception in callback
Change by James Gerity :
--
assignee: docs@python
components: Documentation
nosy: SnoopJeDi, docs@python
priority: normal
severity: normal
status: open
title: print() docs do not indicate its return value
versions: Python 3.11
___
Python tracker
Change by James Gerity :
--
keywords: +patch
pull_requests: +28642
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30435
___
Python tracker
<https://bugs.python.org/issu
James Gerity added the comment:
I opened this ticket on behalf of a user who asked about print() specifically
in #python on the Libera IRC network, who I assume does not find this obvious.
I don't think it would be tenable to add this note to every built-in, but
that's not th
James Gerity added the comment:
The original question was closer to the related issue of "indicate return types
for all built-ins," conversation log follows (UTC-5):
```
09:33:50 ringo__ | is there a stdlib api docs which actually has *full*
functions
New submission from James Casbon :
LogRecord makes microseconds available via the msecs attribute. This patch
adds microseconds via usecs attribute.
Some regulators (eg MIFID II) require accuracy greater than 1ms in some
industries.
This patch calls time_ns rather than time so that the
Change by James Casbon :
--
components: +Library (Lib)
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issue46292>
___
___
Python-bugs-lis
Change by James Gerity :
--
title: print() docs do not indicate its return value -> return value of
builtins is not clearly indicated
___
Python tracker
<https://bugs.python.org/issu
James Gerity added the comment:
> advertising that all functions default to returning None
This is already communicated in § 4.7 ("Defining Functions") of the official
tutorial.
I think it would be a good idea to revise that section so that this property of
functions is a litt
James Gerity added the comment:
My thought was to add something like this to the top of functions.rst:
```
Note that some of the functions listed here have the :ref:`default return value
of ``None``.
```
For reference, the builtins this applies to are:
* breakpoint()
* delattr()
* exec
Change by James Gerity :
--
nosy: +SnoopJeDi
___
Python tracker
<https://bugs.python.org/issue46555>
___
___
Python-bugs-list mailing list
Unsubscribe:
James Gerity added the comment:
> Why was it decided to not raise a syntax error...
I'm not sure if such a decision was even ever made, the error happens before
normalization is applied. I.e. the parser is doing two things here: (1)
validating the syntax against the grammar and (2)
New submission from James Marchant :
When using `create_autospec()` to create a mock object, it doesn't respect
values passed through in the style described for passing mock configurations in
the Mock constructor
(https://docs.python.org/3.8/library/unittest.mock
Change by James Gerity :
--
nosy: +SnoopJeDi
___
Python tracker
<https://bugs.python.org/issue46726>
___
___
Python-bugs-list mailing list
Unsubscribe:
James Antill added the comment:
So I think this is all the places integer overflow checking is needed
in imageop.c and rbgimgmodule.c.
There might be checks here which can't be exploited anyway, and I
haven't checked any other files yet.
Feel free to comment.
Ps. This is against
Changes by James Antill:
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1179>
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mai
James Antill added the comment:
And now the obvious typo fix, *sigh*.
__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1179>
__diff -rup Python-2.5-orig/Modules/imageop.c Python-2.5/Modules/imageop.c
--- Pyt
James Antill added the comment:
Guido: It's true that that len can be slightly bigger than x*y, the big
thing is that it can't be smaller so we can malloc(len) and use upto x*y
(which was my main focus).
I first looked at any of this code today, but I didn't see any reason
tha
James Antill added the comment:
Not sure who Neal is, and this probably isn't a final upstream fix ...
but it's what I've applied to Fedora's python. It's basically the same
patch as before, but it keeps the original * tests instead of just
replacing them with / te
James Burgess added the comment:
"Can't Fix" that is not true.
I've just fixed this in 2.7 with a trivial change to subprocesss.py, I think
it'd work in over versions too.
Note that type shenanigans are already in play in _get_handles, it's looking at
the
James Polley added the comment:
So http://bitbucket.org/birkenfeld/sphinx/issue/140/ has now been closed;
sphinx happily builds epub.
However, the python docs are still not available for download in epub format
from http://docs.python.org/download.html, which was the original request in
James Polley added the comment:
It looks like the first release that had epub support was 1.0; docs.python.org
is still using 0.6.7, according to the footer on the bottom of the page.
I suspect that this is (A) pending the upgrade to 1.0.0, which is (B) more
difficult than it sounds like, or
New submission from James Classen :
I notice that, in versions 2.7 and 3.2 on Windows XP (haven't tested any other
versions or platforms), the following statements in the interpreter work as
documented:
'%x' % 17
'%o' % 17
and output '11' and '21
James Classen added the comment:
I didn't see section 4.6.2 of the library for 3.2 documentation, only section
5.6.2 of the 2.7 docs. So this is an invalid issue.
--
resolution: -> invalid
status: open -> closed
___
Python tra
James B added the comment:
I have encountered this issue(python 2.7) with respect to positional arguments
that begin with a dash (linux/ bash).
In the following example, the parser requires three positional arguments. I
attempted to encase the arguments in single-quotes as that is expected
New submission from James Hutchison :
In python is currently there a way to elegantly throw an error if a variable is
already in the current scope?
For example:
def longfunc(self, filename):
FILE = open(filename);
header = FILE.readline();
... bunch of code ...
childfiles
James Hutchison added the comment:
For starters, this would be most efficient implementation:
def unique(varname, value, scope):
assert(not varname in scope);
scope[varname] = value;
Usage:
unique('b', 1, locals());
print(b);
But you can't put that in a loop els
James Westby added the comment:
Hi,
I think this was misdiagnosed:
from unittest.py in 2.6, loadTestFromName:
elif hasattr(obj, '__call__'):
test = obj()
if isinstance(test, TestSuite):
return test
elif isinstance(test
New submission from James Hutchison :
tested python 3.1.2
Man = multiprocessing.Manager();
d = man.dict();
d['l'] = list();
d['l'].append("hey");
print(d['l']);
>>> []
using debugger reveals a KeyError. Extend also does not work. Only thing that
New submission from James Hutchison :
I have multiple versions of python - 2.6.1 and 3.1.2. 2.6.1 is the primary
install (i.e., right click on a file and "edit with IDLE" brings up 2.6), and
was installed first. This issue occurs on 3.1.2, Windows XP 32-bit
If I highlight a break
New submission from James Hutchison :
Tested on Python 3.1.2 Windows XP 32-bit
Binary strings (such as what is returned by filereader.readline()) are never
equal to raw or normal strings, even when both strings are empty
if(b"" == ""):
print("Strings are equal&
James Hutchison added the comment:
Is there a way to get this so it behaves more intuitively? You'd think adding a
managed list to a managed dictionary (or another managed list) or making a deep
copy would work but it still doesn't. When you get an item from a managed data
str
New submission from James Bowman :
import sys
def foo():
x = [o] * 100
raise ArithmeticError
o = "something"
print sys.getrefcount(o)
try:
foo()
except ArithmeticError:
pass
print sys.getrefcount(o)
---
Gives:
4
104
Look
New submission from James Hutchison :
v.3.2a3
If the maxtasksperchild argument is used, the program will just hang after
whatever that value is rather than working as expected. Tested in Windows XP
32-bit
test code:
import multiprocessing
def f(x):
return 0;
if __name__ == '__m
New submission from James Hutchison :
The Unzip module is always unbuffered (tested v.3.1.2 Windows XP, 32-bit). This
means that if one has to do many small reads it is a lot slower than reading a
chunk of data to a buffer and then reading from that buffer. It seems logical
that the unzip
James Hutchison added the comment:
I should clarify that this is the zipfile constructor I am using:
zipfile.ZipFile(filename, mode='r', allowZip64=True);
--
___
Python tracker
<http://bugs.python.o
James Whisnant added the comment:
Varnish on the sourceforge server has been upgraded and/or reconfigured
(yesterday) to fix the issue that was happening with this file (and others).
Just an FYI that you will no longer be able to re-create the triggering error.
'content-length'
New submission from James Hutchison :
In windows, 64-bit, python *mostly* writes only a \n to stdout even though it's
mode is 'w'. However it sometimes writes a \r\n on certain print statements and
erratically when I have multiple processes writing to stdout.
Output looks fine
James Hutchison added the comment:
Sorry there isn't more info but I'm really busy right now
In fact a workaround would be appreciated if known.
--
___
Python tracker
<http://bugs.python.o
James Hutchison added the comment:
Nevermind, I have a workaround that didn't require rewriting all the print
statements but its in the C# code not the python code
--
___
Python tracker
<http://bugs.python.org/is
James Hutchison added the comment:
Yes and no, I can give you a single process single child example that just
shows that python 3.2 uses binary output while python 3.1 used system default
when piping, but trying to reproduce the multiprocessing output inconsistencies
would be... difficult
New submission from James Hutchison :
When upgrading from Python 3.1 to Python 3.2 I noticed that when my program
closed it printed out a non-consequential AttributeError Exception. My program
had a custom class that replaced stdout and stderr for use in a piped program
(it flushed the buffer
James Hutchison added the comment:
You are right, when I add:
def flush(self):
pass;
the error goes away.
When I have this:
def flush():
pass;
I get:
Exception TypeError: 'flush() takes no arguments (1 given)' in
<__main__.FlushFile object at 0x00C2
Changes by James Tatum :
--
nosy: +James.Tatum
___
Python tracker
<http://bugs.python.org/issue11623>
___
___
Python-bugs-list mailing list
Unsubscribe:
James Hutchison added the comment:
I would like to add in windows, "input" now adds a \r at the end which wasn't
in 3.1. It doesn't do it in idle. This is using just the regular console window
that opens up when you double click. I'm guessing this is related to the is
James Lamanna added the comment:
stubbing out subprocess._cleanup does not work around the problem from this
example on 2.6.5:
import subprocess, signal
subprocess._cleanup = lambda: None
signal.signal(signal.SIGCLD, signal.SIG_IGN)
subprocess.Popen(['echo','foo']
James Thomas <[EMAIL PROTECTED]> added the comment:
I can work on this task.
--
nosy: +jjt009
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
James Thomas <[EMAIL PROTECTED]> added the comment:
i'm looking at the source and there doesn't appear to be a function
uname within os.py. are we just considering the uname function in
platform.py?
___
Python tracker <[EMAI
James Thomas <[EMAIL PROTECTED]> added the comment:
much handling code already seems to exist under the line
except AttributeError:
in platform.py (function uname(), lines 1101-1161 platform.py)
i'm not too familiar with the Python codebase (i just began developing
with Python a fe
James Thomas <[EMAIL PROTECTED]> added the comment:
Alright, that makes things much clearer.
I'm looking at this code snippet in platform.py:
if system == 'unknown':
system = ''
if node == 'unknown':
node = ''
i
James Thomas <[EMAIL PROTECTED]> added the comment:
Ah, ok, the code under except AttributeError: gives me some good ideas.
Should I use the methods utilized there to extract information from the
system?
___
Python tracker <[EMAIL PROTECTE
James Thomas <[EMAIL PROTECTED]> added the comment:
Here is the patch (apply to platform.py)
--
keywords: +patch
Added file: http://bugs.python.org/file10594/platform.patch
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
James Thomas <[EMAIL PROTECTED]> added the comment:
Your patch works perfectly on windows. Thanks for your help.
___
Python tracker <[EMAIL PROTECTED]>
<http://bugs.pytho
James Thomas <[EMAIL PROTECTED]> added the comment:
I believe this patch solves the problem.
I added the line
Py_DECREF(temp)
after the code block shown above.
I also changed the line
if (PyDict_SetItemString(temp, #name, Py_BuildValue("i", name)) < 0) return
to
if (P
James Dominy <[EMAIL PROTECTED]> added the comment:
I've been working on a patch that allows pdb when run as a script to
split it's output such that the program being debugged uses a specified
tty for stdin/stdout, and leave the pdb.py IO on the original
stdin/stdout. I thi
James Antill <[EMAIL PROTECTED]> added the comment:
So if I add a:
class _WrapForRecv:
def __init__(self, obj):
self.__obj = obj
def __getattr__(self, name):
if name == "recv": name = "read"
return getattr(self.__obj, name)
...and th
New submission from James Athey <[EMAIL PROTECTED]>:
I've created a patch that improves the decompression performance of
zipfile.py by up to two orders of magnitude.
In ZipFileExt.read(), decompressed bytes waiting to be read() sit in a
string buffer, self.readbuffer. When a pi
1 - 100 of 579 matches
Mail list logo