Hello. I did search for this but couldn't find the info anywhere else, so I'm
asking here. Please point out if I've missed some other source of the same info:
https://docs.python.org/3/reference/datamodel.html#basic-customization
documents that __new__ is special-cased so that while it is
On Sun, May 18, 2014 at 4:26 PM, Shriramana Sharma samj...@gmail.com wrote:
https://docs.python.org/3/reference/datamodel.html#basic-customization
documents that __new__ is special-cased so that while it is actually a static
method, it need not be decorated as such. I have a similar question.
Rustom Mody rustompm...@gmail.com writes:
On Sunday, May 18, 2014 5:47:05 AM UTC+5:30, Ned Batchelder wrote:
Make a list of the [Python-specific] packages you need. Put it in a
file called requirements.txt. […]
What about things installed at a lower level than pip, eg apt-get?
That's an
In article 53783c5f$0$29977$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
You may find that the IPython interactive interface to Python is useful.
It presents an interface which should be familiar to anyone with
experience with Mathematica.
Does Python have good mathematical capabilities?
SAGE: http://www.sagemath.org/
Sincerely,
Wolfgang
--
https://mail.python.org/mailman/listinfo/python-list
On 18/05/2014 14:25, Roy Smith wrote:
In article 53783c5f$0$29977$c3e8da3$54964...@news.astraweb.com,
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote:
You may find that the IPython interactive interface to Python is useful.
It presents an interface which should be familiar to
On 2014-05-18, Bill Cunningham nospam@nspam.invalid wrote:
Does Python have good mathematical capabilities?
No.
It has very good numerical computation capabilities, but it does not
really do math (at least not what a mathemetician would consider
math).
I am interested in learning a
Grant Edwards invalid@invalid.invalid wrote in message
news:llak9u$8rs$1...@reader1.panix.com...
On 2014-05-18, Bill Cunningham nospam@nspam.invalid wrote:
Does Python have good mathematical capabilities?
No.
It has very good numerical computation capabilities, but it does not
really
On 2014-05-18 16:40, Grant Edwards wrote:
On 2014-05-18, Bill Cunningham nospam@nspam.invalid wrote:
Does Python have good mathematical capabilities?
No.
It has very good numerical computation capabilities, but it does not
really do math (at least not what a mathemetician would
On Sunday, 18 May 2014 01:56:42 UTC+2, varu...@gmail.com wrote:
Hello Friends,
I am working on this code but I kind of get the same error over and over
again. Could any of you help me fix this part of the error?
File RW1:
class PHY_NETWORK:
def __init__(self, nodes,
On Mon, May 19, 2014 at 5:02 AM, varun...@gmail.com wrote:
Thank you very much Ned, Rodri and Gary. I changed the settings of gedit text
editor as mentioned in the Zed Shaw tutorial. I think this is causing me the
problem. I'll follow your advice.
I find that there are better editors than
On 05/17/2014 07:05 PM, Stefan Behnel wrote:
Roland Plüss, 17.05.2014 18:28:
On 05/17/2014 05:49 PM, Stefan Behnel wrote:
Roland Plüss, 17.05.2014 17:28:
On 05/17/2014 04:01 PM, Stefan Behnel wrote:
Roland Plüss, 17.05.2014 15:49:
On 05/17/2014 03:26 PM, Stefan Behnel wrote:
Roland Plüss,
Greetings Python users,
Python 2.7.7 release candidate 1 is now available for download. Python
2.7.7 is a regularly scheduled bugfix release for the Python 2.7 series.
The 2.7.7 release contains fixes for two severe, if arcane, potential
security vulnerabilities. The first was the possibility of
On Mon, May 19, 2014 at 5:41 AM, Roland Plüss rol...@rptd.ch wrote:
This exec source_code in module.__dict__ , should this not also be doable
with PyEval_EvalCode?
General principle: The more code you write in Python and the less in
C/C++, the happier and more productive you will be.
Drop into
I have a file compressed with bz2 and a function that expects a file handle.
When I decompress the bz2 file I get a string (binary) not a file handle.
Here is what I have that does not work. There is no error (thats a seperate
issue) CelFile.read just fails to read the data(string).
from
On 2014-05-18 19:53, Vincent Davis wrote:
I have a file compressed with bz2 and a function that expects a
file handle. When I decompress the bz2 file I get a string (binary)
not a file handle.
from bz2 import decompress,
with open('Tests/Affy/affy_v3_ex.CEL.bz2', 'rb') as handle:
Well after posting, I think I figured it out.
The key is to use StringIO to get a file handle on the string. The fact
that it is binary just complicates it a little.
with open('Tests/Affy/affy_v3_ex.CEL.bz2', 'rb') as handle:
cel_data = StringIO(decompress(handle.read()).decode('ascii'))
On Sun, May 18, 2014 at 8:38 PM, Vincent Davis vinc...@vincentdavis.net wrote:
Well after posting, I think I figured it out.
The key is to use StringIO to get a file handle on the string. The fact that
it is binary just complicates it a little.
with open('Tests/Affy/affy_v3_ex.CEL.bz2', 'rb')
On Sun, May 18, 2014 at 9:44 PM, Ian Kelly ian.g.ke...@gmail.com wrote:
You can just use bz2.open:
with bz2.open('test.txt.bz2', 'rt', encoding='ascii') as f:
... print(f.read())
Thanks I like that better then my solution.
Vincent Davis
720-301-3003
--
New submission from Larry Hastings:
If you extract current Python (3.4 or trunk) into a directory, and anywhere in
the name of the directory is the string bad, such as
/tmp/badtest
/home/baddison/src/python
then test_write_filtered_python_package() in Lib/test/test_zipfile.py will
fail. The
Changes by Georg Brandl ge...@python.org:
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21520
___
___
Python-bugs-list
New submission from rovf:
I'm running this on OSX 10.6 (SnowLeopard) with the OSX Spaces feature
enabled (i.e. several virtual desktops).
This is my (complete) program:
from tkinter.filedialog import asksaveasfilename
pathname=asksaveasfilename(initialdir='.',title='gaga')
This has the
Changes by Ned Deily n...@acm.org:
--
nosy: +ned.deily
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21521
___
___
Python-bugs-list mailing list
Antoine Pitrou added the comment:
I'm not intending to document the pending() method. Apparently the only people
wanting to use it are/were confused about how exactly to write non-blocking SSL
code, which is not a good hint.
--
resolution: - wont fix
stage: - resolved
status: open -
STINNER Victor added the comment:
tempfile_o_tmpfile2.patch: Updated patch to handle OS errors.
I'm not sure that __O_TMPFILE has the same value on all architectures.
The O_TMPFILE flag was added to fcntl.h in the glibc 2.19 (released the 8 Feb
2014):
Changes by STINNER Victor victor.stin...@gmail.com:
Removed file: http://bugs.python.org/file35276/tempfile_o_tmpfile2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21515
___
STINNER Victor added the comment:
(Oops, I made a mistake, the hardcoded constant was still present in my patch
2.)
Patch 3 uses tempfile._O_TMPFILE_WORKS variable to check if the O_TMPFILE flag
is avaialble and works.
Use os.O_TMPFILE = 0o2000 | os.O_DIRECTORY to try my patch with glibc
Serhiy Storchaka added the comment:
I have no opinion.
--
assignee: serhiy.storchaka -
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13916
___
New submission from Serhiy Storchaka:
Here is a patch which adds tests for Listbox.itemconfigure(),
PanedWindow.paneconfigure() and several tests for Menu.entryconfigure().
--
assignee: serhiy.storchaka
components: Tests, Tkinter
files: test_tkinter_configure.patch
keywords: patch
New submission from Andrew Dalke:
Python's compiler has quadratic-time time behavior based on the number of and
or or expressions. A profile shows that stackdepth_walk is calling itself in
a stack at least 512 levels deep. (My profiler doesn't go higher than that.)
I've reduced it to a simple
Changes by jorispilot jorispi...@gmail.com:
--
components: Library (Lib)
nosy: jorispilot
priority: normal
severity: normal
status: open
title: Allowing to pass pathlib.Path object in mimetypes.guess_type function
type: enhancement
versions: Python 3.4
Serhiy Storchaka added the comment:
Patch synchronized with tip and fixed support of Tcl 8.5.
--
Added file: http://bugs.python.org/file35280/tkinter_bignum_3.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16840
Roger Luethi added the comment:
New patch includes tests.
Lightly tested with Python 3.4 (because trunk doesn't build for me right now):
tests fail without patch, pass with patch.
Patch re-diffed against trunk.
--
Added file: http://bugs.python.org/file35281/ipv4addr_global2-hg.diff
Bas Wijnen added the comment:
Alexey: please be more civil.
Antoine: In that case, can you please explain how you would recommend me to
implement my use case, where most of my calls are master-initiated and
blocking, but some slave-initiated events must be non-blocking? Should I make
a lot
Larry Hastings added the comment:
Here's an eye-wateringly-thorough description of the bug for the sake of
posterity.
The test code in question is test_write_filtered_python_package() in
Lib/test/test_zipfile.py. This function uses PyZipFile to build a zipfile
from the contents of the
New submission from Serhiy Storchaka:
There is very common error when user pass list instead tuple to Tkinter. Some
functions accept both tuple and list, some functions reject list, but many
functions silently convert non-tuple value to str (e.g. [1, 2] - '[1, 2]'
instead of expected Tcl
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16840
___
___
Python-bugs-list
Thomas Guettler added the comment:
Just for the record.
Here are the discussions about this topic on the python-ideas mailing list:
https://mail.python.org/pipermail/python-ideas/2014-May/027839.html
https://mail.python.org/pipermail/python-ideas/2014-May/027858.html
--
Ian Cordasco added the comment:
I missed the fact that the user gave me the information from sys.version:
https://stackoverflow.com/questions/16545027/ironpython-error-in-url-request?noredirect=1#comment23847257_16545027
I'll throw together a failing test with this and run it against 2.7, and
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: +terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9673
___
___
Python-bugs-list
Daniel Greenfeld added the comment:
For what it's worth, I just released cached-property on PyPI and someone
suggested I join the discussion here.
Package: https://pypi.python.org/pypi/cached-property
Repo: https://github.com/pydanny/cached-property
Notes:
* 92% test coverage, albeit with a
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21523
___
Ned Deily added the comment:
Testing for Lib/test/bad isn't correct either since the test will fail when
the tests are run from an installed Python rather than just from a build
directory.
--
nosy: +ned.deily
___
Python tracker
Steve Dower added the comment:
I noticed the same thing testing the 2.7.7rc1 installer, so I've got a fix for
2.7.7. The same issue exists for imghdrdata (which was added quite recently, it
seems).
Patch attached - any concerns?
--
keywords: +patch
nosy: +benjamin.peterson,
Steve Dower added the comment:
FWIW, the installers are about 130kb larger with the files included.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19866
___
STINNER Victor added the comment:
I restore the original title, my title was a mistake.
--
title: set and frozenset constructor should use operator.length_hint to guess
the size of the iterator - memory used by frozenset created from set differs
from that of frozenset created from
New submission from Serhiy Storchaka:
Recent Tcl versions (since 8.5) no longer use internal boolean type. Instead
they use booleanString type (but looks as only internally). Here is a patch
which add support for booleanString Tcl type in case when it leaks to user.
There are no any new tests
Berker Peksag added the comment:
I couldn't reproduce it either. I also tried related urllib and urllib2 tests:
- test_urllib (passed)
- test_urllibnet (skipped - Use of the 'network' resource not enabled)
- test_urllib_response (passed)
- test_urllib2net (skipped - Use of the 'network' resource
Claudiu.Popa added the comment:
This version of the patch skips the test if the privileges can't be acquired.
--
Added file: http://bugs.python.org/file35285/issue21518.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21518
eryksun added the comment:
ctypes LibraryLoader instances cache CDLL/WinDLL instances, which cache
function pointers. Using the global ctypes.cdll and ctypes.windll loaders can
lead to conflicting definitions for restype, argtypes, and errcheck. I suggest
using a private LibraryLoader in
Brett Cannon added the comment:
Here is an implementation of importlib.util.module_from_spec(). With this it
makes PEP 451 conceptually work like:
spec = importlib.util.find_spec(name)
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
About the only other
Antoine Pitrou added the comment:
Does this work for you?
class X:
... @property
... @functools.lru_cache(None)
... def get_x(self):
... print(computing)
... return 5
...
x = X()
x.get_x
computing
5
x.get_x
5
--
nosy: +pitrou, serhiy.storchaka
Alex Gaynor added the comment:
Will that implementation cause a memory leak? Won't the lru_cache have a dict
mapping {self: result}, meaning that `self` will live forever, instead of
storing result in self.__dict__, where the lifetimes are correct.
--
nosy: +alex
Antoine Pitrou added the comment:
Will that implementation cause a memory leak? Won't the lru_cache have
a dict mapping {self: result}, meaning that `self` will live forever,
instead of storing result in self.__dict__, where the lifetimes are
correct.
Oh, you're right. Sorry for the noise.
New submission from Claudiu.Popa:
As the title says, ThreadPoolExecutor does not use a default value for
max_workers parameter, as ProcessPoolExecutor does. When the user does not care
about the number of workers and wants only for something to run in background,
he has to write code like
Claudiu.Popa added the comment:
Thanks. Here's the updated version. Also, I only tested it on Windows 8.1. I'll
try to find another machine with an older OS for testing it.
--
Added file: http://bugs.python.org/file35288/issue21518_1.patch
___
Terry J. Reedy added the comment:
The reverenced post did not give a runnable minimal example with the claimed
bug, but only described more complex code at a now dead link. The following
from http://effbot.org/tkinterbook/entry.htm works on my Win7 machine.
import tkinter as tk
master =
Roundup Robot added the comment:
New changeset 5318bf3e70a6 by Benjamin Peterson in branch '2.7':
include test data in the windows installer, so tests don't fail (closes #19866)
http://hg.python.org/cpython/rev/5318bf3e70a6
--
nosy: +python-dev
resolution: - fixed
stage: - resolved
Benjamin Peterson added the comment:
I applied the patch to my release branch, so it will make it into 2.7.7 final.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19866
___
Terry J. Reedy added the comment:
Sounds like a good idea to me. The code looks pretty straightforward as far as
I understood it.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21525
___
New submission from Alex Gaynor:
Attached patch is against the default branch, and fixes a number of typos.
--
assignee: docs@python
components: Documentation
files: typos.diff
keywords: needs review, patch
messages: 218769
nosy: alex, docs@python
priority: normal
severity: normal
Berker Peksag added the comment:
Attaching a patch that checks both XDG_CURRENT_DESKTOP and DESKTOP_SESSION env
vars for XFCE.
--
nosy: +berker.peksag
stage: test needed - patch review
versions: +Python 3.5 -Python 3.2, Python 3.3
Added file:
New submission from Benjamin Peterson:
(Copy paste from the security list)
Python 2 and 3 are susceptible to arbitrary process memory reading by
a user or adversary due to a bug in the _json module caused by
insufficient bounds checking.
The sole prerequisites of this attack are that the
Benjamin Peterson added the comment:
http://hg.python.org/cpython/rev/50c07ed1743d
http://hg.python.org/cpython/rev/a8facac493ef
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21529
Berker Peksag added the comment:
Rebased patch.
--
versions: +Python 3.5
Added file: http://bugs.python.org/file35291/issue20620_v3.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20620
Changes by Berker Peksag berker.pek...@gmail.com:
Removed file: http://bugs.python.org/file34081/issue20620.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20620
___
New submission from Benjamin Peterson:
(copy paste from security list)
Integer overflow in strop.expandtabs:
Aside:
I took a look at python over the weekend as I saw the
the Internet Bug Bounty [ https://hackerone.com/python ]
are now offering bounties for security bugs + patches for
python.
Benjamin Peterson added the comment:
5dabc2d2f776
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21530
___
Terry J. Reedy added the comment:
Reading the Tk Wiki page, it appears that Shift undoes ShiftLock except on Mac,
where it does nothing. So there is effectively only ^a and ^A, etc.
Looking as the Get New Keys dialog, the Basic Key Binding Entry pane says New
keys .. plural, but as far as I
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19979
___
___
Python-bugs-list
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17352
___
___
Python-bugs-list
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue18334
___
___
Python-bugs-list
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17421
___
___
Python-bugs-list
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17422
___
___
Python-bugs-list
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17044
___
___
Python-bugs-list
Changes by Berker Peksag berker.pek...@gmail.com:
--
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17044
___
___
Terry J. Reedy added the comment:
Now the Control-Key-C binding will be assigned to two actions.
I do not see this. I only see Control-Key-c duplicated, which is bad enough
to be patched. What did you leave out ;-).
Also see #12387, which we need to finish, and Ned's link to
Terry J. Reedy added the comment:
#17853 was in the context of metaclasses. Even so, I am puzzled by the opening
statement there that
from enum import Enum # I added this as necessary
class Season(Enum):
SPRING = Season()
works beautifully at top level as it indeed raises
NameError: name
Ethan Furman added the comment:
Terry remarked:
---
I am puzzled by the opening statement there that
from enum import Enum # I added this as necessary
class Season(Enum):
SPRING = Season()
works beautifully at top level as it indeed raises
NameError: name 'Season'
New submission from Tony Gedge:
Sending a zero-length UDP packet to asyncore closes socket by default.
The default implementation of recv() assumes that zero-length data means close.
This isn't true for UDP - it is possible to send a zero-length payload packet.
A possible work-around is to
New submission from Martin v. Löwis:
The 32-bit installer should include libpython27.a, the import library in GNU ld
format. To build it, cygwin must be installed and on PATH when the MSI is
built. The file will end up in libs/libpython27.a
--
components: Windows
messages: 218781
81 matches
Mail list logo