Re: pylint -> ImportError: No module named lazy_object_proxy

2016-02-10 Thread Peter Otten
Michael Ströder wrote: > HI! > > Hmm, I've used pylint before but my current installation gives me an > ImportError: > > $ pylint > Traceback (most recent call last): > File "/usr/bin/pylint", line 3, in > run_pylint() > File "/usr/lib/python2.7/site-packages/pylint/__init__.py", line

New fades version to try

2016-02-10 Thread Facundo Batista
Hello all, We're glad to announce the release of fades 4.9 (the release candidate for fades 5, which should happen in a week or so). PLEASE! Help us to test this release candidate these few days, so version 5 comes out rock solid. Thanks! :) fades is a system that automatically handles

Copying void * string to

2016-02-10 Thread Martin Phillips
I am writing a Python wrapper to go around a C library. I have encountered a problem that I have been unable to resolve with countless web searches. Several functions in the C library return pointers to dynamically allocated w_char null terminated strings. I need to copy the string to a

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > Different but kind of related, disk_usage() is not able to accept bytes: On Python 3, I don't think that it's a big issue: bytes filenames are deprecated. See the current thread on python-dev:

Re: Copying void * string to

2016-02-10 Thread Ian Kelly
On Wed, Feb 10, 2016 at 5:07 AM, Martin Phillips wrote: > I am writing a Python wrapper to go around a C library. I have encountered a > problem that I have been unable to resolve with > countless web searches. > > > > Several functions in the C library return

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Different but kind of related, disk_usage() is not able to accept bytes: >>> shutil.disk_usage(b'.') Traceback (most recent call last): File "", line 1, in File "C:\python34\lib\shutil.py", line 989, in disk total, free = nt._getdiskusage(path)

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Fred Rolland
New submission from Fred Rolland: Hi, os.path.normpath("//") returns '//' I would expect to be '/' >>> os.path.normpath("//") '//' >>> os.path.normpath("///") '/' >>> os.path.normpath("") '/' -- components: Library (Lib) messages: 260016 nosy: Fred Rolland priority: normal

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: >total, free = nt._getdiskusage(path) > NotADirectoryError: [WinError 267] The directory name is invalid The underlying C function is GetDiskFreeSpaceEx(): https://msdn.microsoft.com/fr-fr/library/windows/desktop/aa364937%28v=vs.85%29.aspx It takes a

[issue26328] shutil._copyxattr() function shouldn't fail if setting security.selinux xattr fails

2016-02-10 Thread Laurent Bigonville
Laurent Bigonville added the comment: SELinux would block setting the "security.selinux" attribute with EACCES not EPERM, so another solution could be to add errono.EACCES to the list -- ___ Python tracker

[issue26289] Optimize floor division for ints

2016-02-10 Thread Yury Selivanov
Yury Selivanov added the comment: Attaching an updated patch. > 1. I think you're missing the final multiplication by Py_SIZE(b) in the > fast_mod code. Which is odd, because your tests should catch that. So either > you didn't run the tests, or that code path isn't being used somehow.

[issue17956] add ScheduledExecutor

2016-02-10 Thread Tin Tvrtković
Tin Tvrtković added the comment: It's a shame this has been stuck in review for 2.5 years, I could really use something like this right now. neologix, why don't you put this up on PyPI for a while, at least? -- nosy: +tinchester ___ Python tracker

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': On Python 3.4, Windows 7: >>> import shutil, os >>> path = 'psuugxik1s0è' >>> os.stat(path) os.stat_result(st_mode=33206, st_ino=6755399441249628, st_dev=3158553679, st_nlink=1, st_uid=0, st_gid=0, st_size=27136, st_atime=1455 116789, st_mtime=1455116789,

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > You are right, my bad. No problem. I read the doc before replying, and it is not said that the path must exist or must be a directory: https://docs.python.org/dev/library/shutil.html#shutil.disk_usage > I'll fix doc mentioning that on Windows "path" can

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-02-10 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for digging deeply and fixing this! -- ___ Python tracker ___ ___

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Emanuel Barry
Changes by Emanuel Barry : -- assignee: -> serhiy.storchaka nosy: +ebarry, serhiy.storchaka stage: -> needs patch type: -> behavior ___ Python tracker

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: You are right, my bad. I'll fix doc mentioning that on Windows "path" can only be a directory (on UNIX it can also be a file). -- ___ Python tracker

pylint -> ImportError: No module named lazy_object_proxy

2016-02-10 Thread Michael Ströder
HI! Hmm, I've used pylint before but my current installation gives me an ImportError: $ pylint Traceback (most recent call last): File "/usr/bin/pylint", line 3, in run_pylint() File "/usr/lib/python2.7/site-packages/pylint/__init__.py", line 22, in run_pylint from pylint.lint

[issue26326] Named entity "vertical line" missed in 2.7 htmlentitydefs.py

2016-02-10 Thread Kevin Dwyer
Kevin Dwyer added the comment: The docs describe the entitydefs mapping as "A dictionary mapping XHTML 1.0 entity definitions to their replacement text in ISO Latin-1". Neither 'vbar' nor 'vline' seem to be part of the xhtml entity definitions (https://www.w3.org/TR/xhtml1/dtds.html). The

[issue24015] timeit should start with 1 loop, not 10

2016-02-10 Thread Tamás Bence Gedai
Tamás Bence Gedai added the comment: Then maybe the docs should be clarified. "If -n is not given, a suitable number of loops is calculated by trying successive powers of 10 (starting from 10) until the total time is at least 0.2 seconds." -- ___

[issue26330] shutil.disk_usage() on Windows can't properly handle unicode

2016-02-10 Thread STINNER Victor
Changes by STINNER Victor : -- assignee: -> docs@python components: +Documentation, Windows nosy: +docs@python, paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker

Re: pylint -> ImportError: No module named lazy_object_proxy

2016-02-10 Thread Michael Ströder
Peter Otten wrote: > Michael Ströder wrote: > >> HI! >> >> Hmm, I've used pylint before but my current installation gives me an >> ImportError: >> >> $ pylint >> [..] >> ImportError: No module named lazy_object_proxy >> >> Can anybody here give me a hint what's missing? >> six, astroid and tk

Re: Asyncio thought experiment

2016-02-10 Thread Sven R. Kunze
On 08.02.2016 23:13, Marko Rauhamaa wrote: As I stated in an earlier post, a normal subroutine may turn out to be blocking. To make it well-behaved under asyncio, you then dutifully tag the subroutine with "async" and adorn the blocking statement with "await". Consequently, you put "await" in

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue636648. This is intended behavior. It was introduced in changeset 01d5b80a3c03. >From the POSIX Specification [1]: """ A pathname consisting of a single shall resolve to the root directory of the process. A null pathname shall

[issue26289] Optimize floor division for ints

2016-02-10 Thread Yury Selivanov
Changes by Yury Selivanov : Added file: http://bugs.python.org/file41887/fast_divmod_6.patch ___ Python tracker ___

Re: Python Twitter Error

2016-02-10 Thread Joel Goldstick
On Wed, Feb 10, 2016 at 11:31 AM, Andra-Irina Vasile < andra.irina.vas...@gmail.com> wrote: > Hello! > > Could you be so kind to help me with an issue? I have some problems with > python when I am trying to use the twitter api... I have Python 3.5.1 (32 > bit). I tried to reinstall the module,

[issue26289] Optimize floor division for ints

2016-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the updates! No further comments from me - the patch looks good as far as I'm concerned. -- ___ Python tracker

Python Twitter Error

2016-02-10 Thread Andra-Irina Vasile
Hello! Could you be so kind to help me with an issue? I have some problems with python when I am trying to use the twitter api... I have Python 3.5.1 (32 bit). I tried to reinstall the module, but I am still receiving the same errors... I attached in this email some screenshots with them. Thank

[issue23078] unittest.mock patch autospec doesn't work on staticmethods

2016-02-10 Thread Erik Purins
Changes by Erik Purins : -- nosy: +epu ___ Python tracker ___ ___ Python-bugs-list mailing

[issue26332] OSError: exception: access violation writing <...> (Windows 10 x64, Python 3.5.1)

2016-02-10 Thread JK
New submission from JK: Hi! I came across this mysterious bug the other week, and I haven't yet found any resolution to it. In my case, I am using a proprietary 3rd party C/C++ DLL for functionality within Python, however I've come across a few others who have run into the same issue with an

[issue26333] Multiprocessing imap hangs when generator input errors

2016-02-10 Thread SilentGhost
Changes by SilentGhost : -- nosy: +jnoller, sbt versions: +Python 3.5 -Python 3.4 ___ Python tracker ___

Re: Importing two modules of same name

2016-02-10 Thread Tim Johnson
* dieter [160209 23:03]: > Carl Meyer writes: > > ... > > If you omit the future-import in Python 2.7, `import config` will import > > the neighboring app/config.py by default, and there is no way to import > > the top-level config.py. > > There is the

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: * Java: only between digits. [1] * Julia: only between digits. [2] (not well specified) * C# 7.0 (proposal): only between digits, but adjacent underscores allowed. [3] * Ada: only between digits. [4] (strong but very simple rules) * D: very much like proposed

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2016-02-10 Thread Justin Mayfield
Justin Mayfield added the comment: Alexander, That sounds unrelated. I'd treat it as a new issue until you have concrete evidence to the contrary. Also on face value it sounds like it might just be your operating systems open file limit. On OSX I think the default open file limit is in the

[issue26333] Multiprocessing imap hangs when generator input errors

2016-02-10 Thread Aaron Halfaker
New submission from Aaron Halfaker: multiprocessing.imap will hang and not raise an error if an error occurs in the generator that is being mapped over. I'd expect the error to be raised and/or the process to fail. For example, run the following code in python 2.7 or 3.4: from

[issue26329] os.path.normpath("//") returns //

2016-02-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> ___ Python tracker ___

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Georg Brandl
Georg Brandl added the comment: It sure is more strict, but I don't think it's simpler (and it's definitely not simpler to implement). (Also 1_j is pretty nice, I wouldn't want to lose that.) We can also check what other languages do. * Rust: very much like this, but trailing underscores

Re: Python's import situation has driven me to the brink of imsanity

2016-02-10 Thread Sivan Greenberg
not entirely on-topic here, but is distutils still being in active use "in the wild" ? -Sivan On Wed, Feb 10, 2016 at 2:31 AM, Oscar Benjamin wrote: > On 8 February 2016 at 00:38, wrote: > > Running python setup.py develop doesn't work, it gives

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Ethan Furman
Changes by Ethan Furman : -- nosy: +ethan.furman ___ Python tracker ___ ___

[issue25228] Regression in cookie parsing with brackets and quotes

2016-02-10 Thread Collin Anderson
Collin Anderson added the comment: The issue I'm currently running into, is that although browsers correctly ignore invalid Set-Cookie values, they allow 'any CHAR except CTLs or ";"' in cookie values set via document.cookie. So, if you say document.cookie = 'key=va"lue; path=/', the browser

Re: Heap Implementation

2016-02-10 Thread Sven R. Kunze
Hi Cem, On 08.02.2016 02:37, Cem Karan wrote: My apologies for not writing sooner, but work has been quite busy lately (and likely will be for some time to come). no problem here. :) I read your approach, and it looks pretty good, but there may be one issue with it; how do you handle the

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: C++14 uses the same strict rule as Ada, but uses apostrphes instead of underscores. [1] Thus there are two groups of languages, implementing strict or lenient rules: * Strict: Ada, C++, Java, C#, Ruby, Julia, Perl (as documented), Swift (textual

Re: Cygwin and Python3

2016-02-10 Thread Benoit Izac
Larry Hudson writes: >> Hi, I am having a hard time making my Cygwin run Python 3.5 (or >> Python 2.7 for that matter). >> The command will hang and nothing happens. > > Just curious... > > Since Python runs natively in Windows, why are you trying to run it > with Cygwin? I'm

[issue26334] bytes.translate() doesn't take keyword arguments; docs suggests it does

2016-02-10 Thread Nicholas Chammas
Nicholas Chammas added the comment: So you're saying if `bytes.translate()` accepted keyword arguments, its signature would look something like this? ``` bytes.translate(table, delete=None) ``` I guess I was under the mistaken assumption that argument names in the docs always matched keyword

[issue25228] Regression in cookie parsing with brackets and quotes

2016-02-10 Thread Martin Panter
Martin Panter added the comment: To move forward on this, I would like someone else (hopefully Antoine? :) to confirm my theory about the cookie injection attack, or otherwise explain why the patch won’t (re)open any security holes. Also, I would like to add some more test cases based on

Re: Python's import situation has driven me to the brink of imsanity

2016-02-10 Thread Mark Lawrence
On 10/02/2016 19:05, Sivan Greenberg wrote: not entirely on-topic here, but is distutils still being in active use "in the wild" ? -Sivan Given that there was distutils2 which took the same course as the Norwegian Blue, I would say no, distutils is not active. I'll happily stand

[issue26334] bytes.translate() doesn't take keyword arguments; docs suggests it does

2016-02-10 Thread Nicholas Chammas
New submission from Nicholas Chammas: The docs for `bytes.translate()` [0] show the following signature: ``` bytes.translate(table[, delete]) ``` However, calling this method with keyword arguments yields: ``` >>> b''.translate(table='la table', delete=b'delete') Traceback (most recent call

[issue26334] bytes.translate() doesn't take keyword arguments; docs suggests it does

2016-02-10 Thread SilentGhost
SilentGhost added the comment: I don't think docs suggest that in any way. The keyword arguments are typically described like this: https://docs.python.org/3/library/stdtypes.html#str.split bytes.translate has a typical signature of a function with optional positional arguments. --

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Yury Selivanov
Yury Selivanov added the comment: > I prefer simpler and more strict rule: > * Underscores are allowed only between digits in numeric literals. +1. But in any case we need a PEP for this change. -- nosy: +yselivanov ___ Python tracker

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: test_support_check_no_resource_warning_2.patch LGTM, thanks. -- ___ Python tracker ___

[issue25985] Use sys.version_info instead of sys.version

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Review: LGTM, with a minor comment. -- nosy: +haypo ___ Python tracker ___

[issue26316] Probable typo in Arg Clinic’s linear_format()

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Go ahead. -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list

[issue26314] interned strings are stored in a dict, a set would use less memory

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Why did you remove _Py_ReleaseInternedStrings()? It looks like a big memory leak when Python is embedded. -- nosy: +haypo ___ Python tracker

[issue26312] Raise SystemError on programmical errors in PyArg_Parse*()

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Yeah, I also expect SystemError from C functions (of the Python C API) badly used. RuntimeError is more used in programming bugs at Python level. pyarg_parse_error.patch LGTM. -- nosy: +haypo ___ Python tracker

[issue26335] Make mmap.write return the number of bytes written like other write methods

2016-02-10 Thread Jakub Stasiak
New submission from Jakub Stasiak: Since mmap objects are said to "behave like both bytearray and like file objects" I believe it's appropriate for the mmap.write() method to return the number of bytes written like write() of other file objects/interfaces I could find in the standard library

[issue25937] DIfference between utf8 and utf-8 when i define python source code encoding.

2016-02-10 Thread Jim Jewett
Jim Jewett added the comment: Does (did?) the utf8 special case allow for a much faster startup time, by not requiring all of the codecs machinery? -- nosy: +Jim.Jewett ___ Python tracker

[issue17956] concurrent.futures: add ScheduledExecutor

2016-02-10 Thread STINNER Victor
Changes by STINNER Victor : -- title: add ScheduledExecutor -> concurrent.futures: add ScheduledExecutor ___ Python tracker ___

Re: Cygwin and Python3

2016-02-10 Thread Terry Reedy
On 2/10/2016 4:26 PM, Benoit Izac wrote: Larry Hudson writes: Since Python runs natively in Windows, why are you trying to run it with Cygwin? I'm not implying that you shouldn't, just offhand I don't see a reason for it. I do it because it's easier to install third party

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Georg Brandl
Georg Brandl added the comment: PEP 515 is written up and posted to python-dev. -- ___ Python tracker ___ ___

[issue26200] SETREF adds unnecessary work in some cases

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > New changeset 3084914245d2 by Raymond Hettinger in branch 'default': > Issue #26200: The SETREF macro adds unnecessary work in some cases. > https://hg.python.org/cpython/rev/3084914245d2 The code using Py_DECREF() doesn't look to be vulnerable to the bug

[issue24916] In sysconfig, don't rely on sys.version format

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: @Serhiy: Can you please take a look since this issue now depends on your issue #25985? -- nosy: +haypo, serhiy.storchaka ___ Python tracker

[issue23992] multiprocessing: MapResult shouldn't fail fast upon exception

2016-02-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1ba0deb52223 by Charles-François Natali in branch 'default': Issue #23992: multiprocessing: make MapResult not fail-fast upon exception. https://hg.python.org/cpython/rev/1ba0deb52223 -- nosy: +python-dev

[issue26318] `io.open(fd, ...).name` returns numeric fd instead of None

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Hum, I don't think that it can be changed today. io.open(int).name is an int since Python 2.6. Changing it may break applications for a little benefit. > `io.open(fd, ...).name` returns numeric fd instead of None. This lead to some > nasty bugs. Why do you

[issue26315] Optimize mod division for ints

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Is this patch is a subset of issue #26289 patch? -- ___ Python tracker ___

[issue25295] functools.lru_cache raises KeyError

2016-02-10 Thread Peter Brady
Peter Brady added the comment: Yes. The patch you suggested restores the old behavior of the lru_cache. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue25593] _sock_connect_cb can be called twice resulting in InvalidStateError

2016-02-10 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

2016-02-10 Thread Charles-François Natali
Changes by Charles-François Natali : -- stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

[issue26331] Tokenizer: allow underscores for grouping in numeric literals

2016-02-10 Thread Georg Brandl
New submission from Georg Brandl: As discussed on python-ideas: https://mail.python.org/pipermail/python-ideas/2016-February/038354.html The rules are: Underscores are allowed anywhere in numeric literals, except: * at the beginning of a literal (obviously) * at the end of a literal *

Handling transactions in Python DBI module

2016-02-10 Thread Israel Brewster
I am working on implementing a Python DB API module, and am hoping I can get some help with figuring out the workflow of handling transactions. In my experience (primarily with psycopg2) the workflow goes like this: - When you open a connection (or is it when you get a cursor? I *think* it is

Re: Copying void * string to

2016-02-10 Thread eryk sun
On Wed, Feb 10, 2016 at 6:07 AM, Martin Phillips wrote: > > Several functions in the C library return pointers to dynamically allocated > w_char null > terminated strings. I need to copy the string to a Python variable and call > an existing > library function

[issue26336] Expose regex bytecode as attribute of compiled pattern object

2016-02-10 Thread Jonathan Goble
New submission from Jonathan Goble: Once a regular expression is compiled with `obj = re.compile()`, it would be nice to have access to the raw bytecode, probably as `obj.code` or `obj.bytecode`, so it can be explored programmatically. Currently, regex bytecode is only stored in a C struct

Re: Handling transactions in Python DBI module

2016-02-10 Thread Chris Angelico
On Thu, Feb 11, 2016 at 4:06 PM, Frank Millman wrote: > A connection has 2 possible states - 'in transaction', or 'not in > transaction'. When you create the connection it starts off as 'not'. > > When you call cur.execute(), it checks to see what state it is in. If the >

Re: Cygwin and Python3

2016-02-10 Thread blindanagram
On 10/02/2016 23:05, Mike S wrote: > On 2/10/2016 5:05 AM, Mark Lawrence wrote: [snip] >>> Have you seen this? >>> http://www.davidbaumgold.com/tutorials/set-up-python-windows/ >>> >> >> I have now, but I'm perfectly happy with the free versions of Visual >> Studio. [snip] > I don't see any

Re: Handling transactions in Python DBI module

2016-02-10 Thread Chris Angelico
On Thu, Feb 11, 2016 at 4:28 PM, Frank Millman wrote: > "Chris Angelico" wrote in message > news:captjjmphjvtckub6qr-vp_1epewxbgqxmfkepmohqp3papg...@mail.gmail.com... >> >> >> When I advise my students on basic databasing concepts, I recommend >> this structure: >> >> conn =

[issue24916] In sysconfig, don't rely on sys.version format

2016-02-10 Thread Ned Deily
Ned Deily added the comment: My understanding is that the "+" is added to the PY_VERSION in Include/patchlevel.h by the release management process after any tagged release, whether pre-release or final. So '+" is supposed to be set whenever CPython is built from anything other than an

Re: Handling transactions in Python DBI module

2016-02-10 Thread Frank Millman
"Chris Angelico" wrote in message news:captjjmphjvtckub6qr-vp_1epewxbgqxmfkepmohqp3papg...@mail.gmail.com... When I advise my students on basic databasing concepts, I recommend this structure: conn = psycopg2.connect(...) with conn, conn.cursor() as cur: cur.execute(...) Does this

[issue26200] SETREF adds unnecessary work in some cases

2016-02-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Most of the SETREFs in the next() functions in the itertools module should also be restored to there former state. They look to have been correct before the change, so there was no improvement, only degradation. Much of that code had been finely tuned

Re: Handling transactions in Python DBI module

2016-02-10 Thread Frank Millman
"Israel Brewster" wrote in message news:92d3c964-0323-46ee-b770-b89e7e7e6...@ravnalaska.net... I am working on implementing a Python DB API module, and am hoping I can get some help with figuring out the workflow of handling transactions. In my experience (primarily with psycopg2) the

Re: asyncio and blocking - an update

2016-02-10 Thread Frank Millman
"Chris Angelico" wrote in message news:CAPTjJmrVCkKAEevc9TW8FYYTnZgRUMPHectz+bD=dqrphxy...@mail.gmail.com... Something worth checking would be real-world database performance metrics [snip lots of valid questions] My approach is guided by something I read a long time ago, and I don't know

Re: asyncio and blocking - an update

2016-02-10 Thread Chris Angelico
On Thu, Feb 11, 2016 at 5:36 PM, Frank Millman wrote: > "Chris Angelico" wrote in message > news:CAPTjJmrVCkKAEevc9TW8FYYTnZgRUMPHectz+bD=dqrphxy...@mail.gmail.com... >> >> >> Something worth checking would be real-world database performance metrics > > > [snip lots of valid

[issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix

2016-02-10 Thread Jens Diemer
Jens Diemer added the comment: I have made https://github.com/jedie/pathlib_revised to address this, see: https://github.com/jedie/pathlib_revised#windows-max_path The idea is to add a property (I call it 'extended_path') and this will add the \\?\ prefix on all absolute path under windows.

[issue26337] Bypass imghdr module determines the type of image

2016-02-10 Thread Ramin Farajpour Cami
New submission from Ramin Farajpour Cami: import imghdr imghdr.what('phppng.png') output : 'png' if you set javascript script in file .png or .jpg , output : ValueError: invalid \x escape Hexdump: root@Ramin:~# hexdump -C phppng.png 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52

[issue26308] Solaris 10 build issues

2016-02-10 Thread Ned Deily
Changes by Ned Deily : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing

Re: asyncio and blocking - an update

2016-02-10 Thread Frank Millman
"Frank Millman" wrote in message news:n9c4p3$gmp$1...@ger.gmane.org... Some of you may have been following my attempts to modify my asyncio app so that it does not block when accessing the database. Here is an update. Here is an update to my update ... I came up with what felt like a

Re: asyncio and blocking - an update

2016-02-10 Thread Chris Angelico
On Thu, Feb 11, 2016 at 4:45 PM, Frank Millman wrote: > I have come up with a plan that seems to provide a solution. > > Instead of 'putting' one row at a time, let the database handler build up a > block of rows, and then 'put' the block. > > I tried a block of 10, and it ran

Re: ImportError: cannot import name 'RAND_egd'

2016-02-10 Thread shaunak . bangale
On Tuesday, February 9, 2016 at 1:33:23 PM UTC-7, Ian wrote: > On Tue, Feb 9, 2016 at 7:55 AM, wrote: > > Hi, > > > > I am trying to run a 60 lines Python code which is running on a mac machine > > but on windows machine, I am getting this error when I run on it on >

[issue24015] timeit should start with 1 loop, not 10

2016-02-10 Thread Tamás Bence Gedai
Tamás Bence Gedai added the comment: I don't know what happened to this issue, but it looks good to me. So here is a patch for it as Joachim suggested. $ time ./python -m timeit "import time; time.sleep(1.0)" 1 loops, best of 3: 1 sec per loop real0m4.134s user0m0.116s sys

[issue21955] ceval.c: implement fast path for integers with a single digit

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: > The test suite can be run directly from the source tree. The test suite > includes timing information for individual tests and for the the entire test. > Sample invocation: I extracted the slowest test (test_polyroots_legendre) and put it in a loop of 5

[issue26326] Named entity "vertical line" missed in 2.7 htmlentitydefs.py

2016-02-10 Thread Andreas Röhler
New submission from Andreas Röhler: Shouldn't a named entity "vbar" or "vline" be part of dict in htmlentitydefs.py? Thanks, Andreas -- messages: 260003 nosy: andreas.roehler priority: normal severity: normal status: open title: Named entity "vertical line" missed in 2.7

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Victor proposed in issue25994 to use special context manager to check that no ResourceWarning is emitted. I think that this helper can be useful in other tests. It saves 3 lines for every use. Proposed patch adds it in test.support. -- components:

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo ___ Python tracker ___ ___

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread STINNER Victor
STINNER Victor added the comment: Oh, I didn't expect that so many existing test already use the same pattern to check for ResourceWarning. Nice patch! I added a comment: we must be careful in the documentation of the helper. -- ___ Python tracker

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Martin Panter
Martin Panter added the comment: I was about to suggest adding this to test.support as well. Patch looks good to me. -- nosy: +martin.panter ___ Python tracker

[issue26325] Add helper to check that no ResourceWarning is emitted

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Addressed Victor's comments. This pattern is not widely used. Usually only raising ResourceWarning is tested, but not non-raising. -- Added file: http://bugs.python.org/file41885/test_support_check_no_resource_warning_2.patch

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > That seems fine except you might as well just put the GetWithError prototype > in the header file. Yes, of course. It was temporary placed here to avoid rebuilding all sources. Thank you Barry and Benjamin for investigating this issue. --

[issue25985] Use sys.version_info instead of sys.version

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses SilentGhosts comments. -- Added file: http://bugs.python.org/file41880/use_version_info_3.patch ___ Python tracker

[issue25985] Use sys.version_info instead of sys.version

2016-02-10 Thread SilentGhost
SilentGhost added the comment: No further comments from me. -- ___ Python tracker ___ ___ Python-bugs-list

[issue26289] Optimize floor division for ints

2016-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: A couple more observations: 1. I think you're missing the final multiplication by Py_SIZE(b) in the fast_mod code. Which is odd, because your tests should catch that. So either you didn't run the tests, or that code path isn't being used somehow. 2. Talking

[issue25994] File descriptor leaks in os.scandir()

2016-02-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Martins comments. -- Added file: http://bugs.python.org/file41881/scandir_close_4.patch ___ Python tracker

[issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle

2016-02-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 81dba6e392c3 by Serhiy Storchaka in branch '2.7': Issue #25698: Importing module if the stack is too deep no longer replaces https://hg.python.org/cpython/rev/81dba6e392c3 New changeset 1c2de3b0a474 by Serhiy Storchaka in branch '3.5': Issue

[issue26320] Web documentation for 2.7 has unreadable highlights in Table of Contents

2016-02-10 Thread Georg Brandl
Georg Brandl added the comment: That's possible. I'll have a look. -- ___ Python tracker ___ ___

  1   2   >