[issue15795] Zipfile.extractall does not preserve file permissions

2020-10-16 Thread Nikolay


Nikolay  added the comment:

Is there any chance that the pull request will be accepted? I'm a bit tired of 
using workaround every time I need unzip something on linux.

--
nosy: +kulakov-n

___
Python tracker 
<https://bugs.python.org/issue15795>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24313] json fails to serialise numpy.int64

2022-02-23 Thread Nikolay Markov


Nikolay Markov  added the comment:

Just ran into this. Are there any updates? Is there any task to contribute to 
regarding this?

--
nosy: +mxposed

___
Python tracker 
<https://bugs.python.org/issue24313>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11387] Tkinter, callback functions

2011-03-03 Thread Nikolay Fomichev

New submission from Nikolay Fomichev :

A simple code:

class App():  
def __init__(self):
self.root = tk.Tk()

self.btn = tk.Button(self.root, text='Click me')
self.btn.pack()
self.btn.bind('', self.click)

self.root.mainloop()

def click(self, event):
# Messagebox or filedialog
pass


When the button is clicked, it calls the function where a filedialog or 
messagebox is called. After the function is done the button changes - it looks 
like it's pressed. Its relief is sunken. Something like 
"self.btn.config(relief=tk.RAISED)" has no effect - relief is raised, but the 
button still looks pressed.
If no dialogs are called, all is fine.

But... if instead of "bind" I use config option "command", it works - the 
function goes well with dialogs, etc and the button is really raised.

I checked this in 2.6.6, 2.7, 3.1.2 and 3.2 on Linux and Win, everywhere is the 
same tune.

--
components: Tkinter
messages: 129990
nosy: Nikolay.Fomichev
priority: normal
severity: normal
status: open
title: Tkinter, callback functions
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 
<http://bugs.python.org/issue11387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11387] Tkinter, callback functions

2011-03-06 Thread Nikolay Fomichev

Nikolay Fomichev  added the comment:

Here it is... 


import sys
if sys.version_info[0] == 3:
import tkinter as tk
from tkinter import messagebox
from tkinter import filedialog
else:
import Tkinter as tk
import tkMessageBox as messagebox
import tkFileDialog as filedialog

class App():  
def __init__(self):
self.root = tk.Tk()

self.btnMsg = tk.Button(self.root, text='Click me')
self.btnMsg.pack()
self.btnMsg.bind('', self.clickMsg)

self.btnFd = tk.Button(self.root, text='Click me too')
self.btnFd.pack()
self.btnFd.bind('', self.clickFd)

self.btnCommand = tk.Button(self.root, text='And now click me')
self.btnCommand.pack()
self.btnCommand.config(command=self.clickCommand)

self.root.mainloop()

def clickMsg(self, event):
messagebox.showerror(title='Error!', message='The button is sunken!')
   
def clickFd(self, event):
filedialog.askdirectory(title='Choose a directory')

def clickCommand(self):
messagebox.showinfo(title='Success!', message='The button is raised.')

App()

--

___
Python tracker 
<http://bugs.python.org/issue11387>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2678] hmac performance optimization

2008-04-24 Thread Nikolay Kim

New submission from Nikolay Kim <[EMAIL PROTECTED]>:

i removed lambda in _strxor function

--
components: Library (Lib)
files: hmac.py.diff
keywords: patch
messages: 65720
nosy: fafhrd
severity: normal
status: open
title: hmac performance optimization
type: performance
versions: Python 2.5
Added file: http://bugs.python.org/file10083/hmac.py.diff

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2678>
__
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects

2020-04-24 Thread Nikolay Bryskin


Change by Nikolay Bryskin :


--
nosy: +nikicat

___
Python tracker 
<https://bugs.python.org/issue30491>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40213] contextlib.aclosing()

2020-09-21 Thread Nikolay Bryskin


Change by Nikolay Bryskin :


--
nosy: +nikicat

___
Python tracker 
<https://bugs.python.org/issue40213>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-06-18 Thread Nikolay Kim

Changes by Nikolay Kim :


--
pull_requests: +2319

___
Python tracker 
<http://bugs.python.org/issue29406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29970] Severe open file leakage running asyncio SSL server

2017-06-18 Thread Nikolay Kim

Nikolay Kim added the comment:

question is, should asyncio handle timeouts or leave it to caller?

https://github.com/python/cpython/pull/480 fixes leak during handshake.

--
nosy: +fafhrd91

___
Python tracker 
<http://bugs.python.org/issue29970>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29970] Severe open file leakage running asyncio SSL server

2017-06-18 Thread Nikolay Kim

Nikolay Kim added the comment:

I see. this is server specific problem. as a temp solution I'd use proxy for 
ssl termination.

--

___
Python tracker 
<http://bugs.python.org/issue29970>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-06-19 Thread Nikolay Kim

Nikolay Kim added the comment:

Let’s close this issue then. I don’t like it anyway.

> On Jun 19, 2017, at 10:21 AM, Grzegorz Grzywacz  
> wrote:
> 
> 
> Grzegorz Grzywacz added the comment:
> 
> This is not problem with madis-data.ncep.noaa.gov not doing ssl shutdown, 
> this is problem with asyncio not doing it.
> 
> Patch from this #30698 issue fix this too.
> 
> --
> nosy: +grzgrzgrz3
> 
> ___
> Python tracker 
> <http://bugs.python.org/issue29406>
> ___

--
nosy: +fafhrd

___
Python tracker 
<http://bugs.python.org/issue29406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-03-03 Thread Nikolay Kim

Changes by Nikolay Kim :


--
pull_requests: +371

___
Python tracker 
<http://bugs.python.org/issue29406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Nikolay Kim

New submission from Nikolay Kim:

https://github.com/python/asyncio/issues/494

--
messages: 289138
nosy: fafhrd91
priority: normal
pull_requests: 435
severity: normal
status: open
title: asyncio get_extra_info() throws exception
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 
<http://bugs.python.org/issue29742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Nikolay Kim

Nikolay Kim added the comment:

exception on get_extra_info() on closed ssl transport

```
Feb 18 13:18:09 btc electrumx_server.py[1732]: ERROR:ElectrumX:[15328] 
Traceback (most recent call last):
Feb 18 13:18:09 btc electrumx_server.py[1732]:   File 
"/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/lib/jsonrpc.py",
 line 528, in process_single_request
Feb 18 13:18:09 btc electrumx_server.py[1732]: result = await 
self.handle_payload(payload, self.request_handler)
Feb 18 13:18:09 btc electrumx_server.py[1732]:   File 
"/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/lib/jsonrpc.py",
 line 608, in handle_payload
Feb 18 13:18:09 btc electrumx_server.py[1732]: return await 
handler(**kw_args)
Feb 18 13:18:09 btc electrumx_server.py[1732]:   File 
"/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/server/session.py",
 line 282, in banner
Feb 18 13:18:09 btc electrumx_server.py[1732]: if self.is_tor():
Feb 18 13:18:09 btc electrumx_server.py[1732]:   File 
"/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/server/session.py",
 line 259, in is_tor
Feb 18 13:18:09 btc electrumx_server.py[1732]: peer_info = self.peer_info()
Feb 18 13:18:09 btc electrumx_server.py[1732]:   File 
"/usr/local/lib/python3.5/dist-packages/electrumx-0.11.1-py3.5.egg/lib/jsonrpc.py",
 line 764, in peer_info
Feb 18 13:18:09 btc electrumx_server.py[1732]: return 
self.transport.get_extra_info('peername')
Feb 18 13:18:09 btc electrumx_server.py[1732]:   File 
"/usr/lib/python3.5/asyncio/sslproto.py", line 306, in get_extra_info
Feb 18 13:18:09 btc electrumx_server.py[1732]: return 
self._ssl_protocol._get_extra_info(name, default)
Feb 18 13:18:09 btc electrumx_server.py[1732]:   File 
"/usr/lib/python3.5/asyncio/sslproto.py", line 537, in _get_extra_info
Feb 18 13:18:09 btc electrumx_server.py[1732]: return 
self._transport.get_extra_info(name, default)
Feb 18 13:18:09 btc electrumx_server.py[1732]: AttributeError: 'NoneType' 
object has no attribute 'get_extra_info'
```

--

___
Python tracker 
<http://bugs.python.org/issue29742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Nikolay Kim

Nikolay Kim added the comment:

get_extra_info() returns optional transport information, I think it is ok to 
return None for closed transport.
https://github.com/python/cpython/blob/master/Lib/asyncio/transports.py#L18

I propose this feature initially, during early tulip development
but now I think it is not good api.

--

___
Python tracker 
<http://bugs.python.org/issue29742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29743] Closing transport during handshake process leaks open socket

2017-03-06 Thread Nikolay Kim

New submission from Nikolay Kim:

https://github.com/python/asyncio/issues/487
https://github.com/KeepSafe/aiohttp/issues/1679

--
messages: 289143
nosy: fafhrd91
priority: normal
pull_requests: 436
severity: normal
status: open
title: Closing transport during handshake process leaks open socket
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 
<http://bugs.python.org/issue29743>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29742] asyncio get_extra_info() throws exception

2017-03-06 Thread Nikolay Kim

Changes by Nikolay Kim :


--
pull_requests: +438

___
Python tracker 
<http://bugs.python.org/issue29742>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29745] asyncio: Make pause/resume_reading idepotent and no-op for closed transports

2017-03-06 Thread Nikolay Kim

New submission from Nikolay Kim:

https://github.com/python/asyncio/issues/488

--
messages: 289147
nosy: fafhrd91
priority: normal
pull_requests: 439
severity: normal
status: open
title: asyncio: Make pause/resume_reading idepotent and no-op for closed 
transports
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 
<http://bugs.python.org/issue29745>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30193] Allow to load buffer objects with json.loads()

2017-04-27 Thread Nikolay Kim

New submission from Nikolay Kim:

It is not possible to use buffer objects in json.loads()

--
messages: 292487
nosy: fafhrd91
priority: normal
severity: normal
status: open
title: Allow to load buffer objects with json.loads()
versions: Python 3.6, Python 3.7

___
Python tracker 
<http://bugs.python.org/issue30193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30193] Allow to load buffer objects with json.loads()

2017-04-27 Thread Nikolay Kim

Changes by Nikolay Kim :


--
pull_requests: +1443

___
Python tracker 
<http://bugs.python.org/issue30193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30193] Support the buffer protocol in json.loads()

2017-05-08 Thread Nikolay Kim

Nikolay Kim added the comment:

I am fine with any decision. close with "won't fix" is fine too

--

___
Python tracker 
<http://bugs.python.org/issue30193>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-06-10 Thread Nikolay Kim

Nikolay Kim added the comment:

yes, i am on it

--

___
Python tracker 
<http://bugs.python.org/issue29406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31661] Issues with request rate in robotparser

2017-10-01 Thread Nikolay Bogoychev

Nikolay Bogoychev  added the comment:

Hey Serhiy,

The use of namedtuple was requested specifically at a review, I didn't 
implement it like this initially: https://bugs.python.org/review/16099/#ps6205

I wasn't aware of the performance implications. Could you please explain to me 
the type vs instance in terms of performance (or point me to a resource, a 
quick googling didn't yield anything? How was I supposed to have coded it 
properly?

Cheers,

Nick

--

___
Python tracker 
<https://bugs.python.org/issue31661>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15823] argparse produces error when multiply help lines

2012-08-30 Thread Nikolay Golub

New submission from Nikolay Golub:

When i use this code:
  parser.add_argument('-r', '--range',
action = 'store',
dest = 'ranges',
nargs = 2,
metavar = 'RANGE',
required = False,
help = 'Start and end range date and time for report 
data.'\
'Timeformat is %y-%m-%d %H:%M:%S'\
'for example -r "2012-08-20 14:48:39 
"2012-08-25 15:35:00"'
)

I get this error:


Traceback (most recent call last):
  File "./create_report.py", line 166, in 
main()
  File "./create_report.py", line 123, in main
args = parser.parse_args()
  File "/usr/lib/python2.7/argparse.py", line 1688, in parse_args
args, argv = self.parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1720, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
  File "/usr/lib/python2.7/argparse.py", line 1926, in _parse_known_args
start_index = consume_optional(start_index)
  File "/usr/lib/python2.7/argparse.py", line 1866, in consume_optional
take_action(action, args, option_string)
  File "/usr/lib/python2.7/argparse.py", line 1794, in take_action
action(self, namespace, argument_values, option_string)
  File "/usr/lib/python2.7/argparse.py", line 994, in __call__
parser.print_help()
  File "/usr/lib/python2.7/argparse.py", line 2313, in print_help
self._print_message(self.format_help(), file)
  File "/usr/lib/python2.7/argparse.py", line 2287, in format_help
return formatter.format_help()
  File "/usr/lib/python2.7/argparse.py", line 279, in format_help
help = self._root_section.format_help()
  File "/usr/lib/python2.7/argparse.py", line 209, in format_help
func(*args)
  File "/usr/lib/python2.7/argparse.py", line 209, in format_help
func(*args)
  File "/usr/lib/python2.7/argparse.py", line 515, in _format_action
help_text = self._expand_help(action)
  File "/usr/lib/python2.7/argparse.py", line 601, in _expand_help
return self._get_help_string(action) % params
ValueError: unsupported format character 'y' (0x79) at index 65

i think that it sin't normal. i always cut strings like these, according to pep8

--
components: Library (Lib)
messages: 169456
nosy: Nikolay.Golub
priority: normal
severity: normal
status: open
title: argparse produces error when multiply help lines
versions: Python 2.7

___
Python tracker 
<http://bugs.python.org/issue15823>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15823] argparse produces error when multiply help lines

2012-08-30 Thread Nikolay Golub

Nikolay Golub added the comment:

thanks!

--

___
Python tracker 
<http://bugs.python.org/issue15823>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-10-01 Thread Nikolay Bogoychev

New submission from Nikolay Bogoychev:

Robotparser doesn't support two quite important optional parameters from the 
robots.txt file. I have implemented those in the following way:
(Robotparser should be initialized in the usual way:
rp = robotparser.RobotFileParser()
rp.set_url(..)
rp.read
)

crawl_delay(useragent) - Returns time in seconds that you need to wait for 
crawling
if none is specified, or doesn't apply to this user agent, returns -1
request_rate(useragent) - Returns a list in the form [request,seconds].
if none is specified, or doesn't apply to this user agent, returns -1

--
components: Library (Lib)
files: robotparser.patch
keywords: patch
messages: 171711
nosy: XapaJIaMnu
priority: normal
severity: normal
status: open
title: robotparser doesn't support request rate and crawl delay parameters
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file27373/robotparser.patch

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-10-01 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Okay, sorry didn't know that (:
Here's the same patch (Same functionality) for python3

Feedback is welcome, as always (:

--
Added file: http://bugs.python.org/file27374/robotparser.patch

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-10-07 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Okay, here's a proper patch with documentation entry and test cases.
Please review and comment

--
Added file: http://bugs.python.org/file27476/robotparser.patch

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2012-10-07 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Reformatted patch

--
Added file: http://bugs.python.org/file27477/robotparser_reformatted.patch

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2014-05-27 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Updated patch, all comments addressed, sorry for the 6 months delay. Please 
review

--
Added file: http://bugs.python.org/file35377/robotparser_v3.patch

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16391] terminator argument for logging.FileHandlers

2012-11-02 Thread Nikolay Bryskin

New submission from Nikolay Bryskin:

"terminator" argument has appeared in logging.StreamHandler since 3.2, but it 
also may be useful for FileHandler classes.

--
components: Library (Lib)
messages: 174594
nosy: nikicat
priority: normal
severity: normal
status: open
title: terminator argument for logging.FileHandlers
type: enhancement
versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5

___
Python tracker 
<http://bugs.python.org/issue16391>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers

2012-11-05 Thread Nikolay Bryskin

Nikolay Bryskin added the comment:

Hello, Taras.

I've renamed the issue - StreamHandler should also have a "terminator" __init__ 
keyword argument.

This argument is mostly needed for automatic logging configuration using 
logging.config.dictConfig or logging.config.fileConfig.

--
title: terminator argument for logging.FileHandlers -> add "terminator" ctor 
argument to logging.StreamHandlers derived handlers

___
Python tracker 
<http://bugs.python.org/issue16391>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers

2012-11-12 Thread Nikolay Bryskin

Nikolay Bryskin added the comment:

Vinay, why do you close this feature request? Proposed workaround is just a 
workaround and even doesn't provide some functionality - for example, it seems 
impossible to define a terminator using config file.

--
resolution: invalid -> 
status: closed -> open

___
Python tracker 
<http://bugs.python.org/issue16391>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers

2012-11-12 Thread Nikolay Bryskin

Nikolay Bryskin added the comment:

Actually, I'm using dictConfig to load config from json file. And yes, ext:// 
provides a way to load custom handler, but, as far as I see 
(https://github.com/jonashaag/cpython/blob/master/Lib/logging/config.py#L379-404),
 there is no possibility to specify custom parameters - terminator, for 
example. My proposal is to add this existing documented configurable parameter 
of standard logging handlers to constructors to make it configurable.

Also, there is a demand for configurable errors handler for encoding/decoding 
strings, but I think it should be another issue.

For now I'm just using derived classes in my project to achieve this 
functionality, is it really the right way (instead of patching stdlib)?

--

___
Python tracker 
<http://bugs.python.org/issue16391>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16391] add "terminator" ctor argument to logging.StreamHandlers derived handlers

2012-11-15 Thread Nikolay Bryskin

Nikolay Bryskin added the comment:

Great, thanks!

--

___
Python tracker 
<http://bugs.python.org/issue16391>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2013-12-08 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Hey,
it has been more than an year since the last activity. 
Is there anything else I should do in order for someone of the python devs team 
to review my changes and perhaps give some feedback?

Nick

--

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2014-07-15 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Hey,

Just a friendly reminder that there has been no activity for a month and a half 
and v3 is pending for review (:

--

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2014-08-26 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Hey,

Just a friendly reminder that the patch is pending for review and there has 
been no activity for 3 months (:

--

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2013-12-09 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Thank you for the review!
I have addressed your comments and release a v2 of the patch:
Highlights:
 No longer crashes when provided with malformed crawl-delay/robots.txt 
parameter.
 Returns None when parameter is missing or syntax is invalid.
 Simplified several functions.
 Extended tests.

http://bugs.python.org/review/16099/diff/6206/Doc/library/urllib.robotparser.rst
File Doc/library/urllib.robotparser.rst (right):

http://bugs.python.org/review/16099/diff/6206/Doc/library/urllib.robotparser
Doc/library/urllib.robotparser.rst:56: .. method:: crawl_delay(useragent)
On 2013/12/09 03:30:54, berkerpeksag wrote:
> Is crawl_delay used for search engines? Google recommends you to set crawl 
> speed
> via Google Webmaster Tools instead.
> 
> See https://support.google.com/webmasters/answer/48620?hl=en.
 
Crawl delay and request rate parameters are targeted to custom crawlers that 
many people/companies write for specific tasks. The Google webmaster tools is 
targeted only to google's crawler and typically web admins have different rates 
for google/yahoo/bing and all other user agents.

http://bugs.python.org/review/16099/diff/6206/Lib/urllib/robotparser.py
File Lib/urllib/robotparser.py (right):

http://bugs.python.org/review/16099/diff/6206/Lib/urllib/robotparser.py#newco...
Lib/urllib/robotparser.py:168: for entry in self.entries:
On 2013/12/09 03:30:54, berkerpeksag wrote:
> Is there a better way to calculate this? (perhaps O(1)?)

I have followed the model of what was written beforehand. A 0(1) implementation 
(probably based on dictionaries) would require a complete rewrite of this 
library, as all previously implemented functions employ the:
for entry in self.entries:
if entry.applies_to(useragent):

logic. I don't think this matters particularly here, as those two functions in 
particular need only be called once per domain and robots.txt seldom contains 
more than 3 entries. This is why I have just followed the design laid out by 
the original developer.

Thanks

Nick

--
Added file: http://bugs.python.org/file33071/robotparser_v2.patch

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2013-12-09 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Oh... Sorry for the spam, could you please verify my documentation link syntax. 
I'm not entirely sure I got it right.

--

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2014-01-21 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Hey,

Just a reminder friendly reminder that there hasn't been any activity for a 
month and I have released a v2, pending for review (:

--

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18748] libgcc_s.so.1 must be installed for pthread_cancel to work

2014-02-26 Thread Nikolay Bryskin

Changes by Nikolay Bryskin :


--
nosy: +nikicat

___
Python tracker 
<http://bugs.python.org/issue18748>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Nikolay Dyankov

New submission from Nikolay Dyankov :

The behaviour described below is not always reproduced.

The attached test script simply tries to import a couple of dns-python
modules, which in turn import other ones. No code is being executed.
You expect it to exit for less than a second but it does not. Instead,
it hangs when "time" module is being imported (eventually it exits after
a long time).

Attached are stdout log and system call log produced by strace with
timestamps.

I don't know what causes it but I'm getting it on at least two machines
(the second being virtual):


$ cat /etc/fedora-release 
Fedora release 10 (Cambridge)
$ uname -a
Linux kiki 2.6.27.30-170.2.82.fc10.i686.PAE #1 SMP Mon Aug 17 08:24:23
EDT 2009 i686 i686 i386 GNU/Linux
$ python -c "import sys; print sys.version"
2.5.2 (r252:60911, Sep 30 2008, 15:41:38) 
[GCC 4.3.2 20080917 (Red Hat 4.3.2-4)]


$ cat /etc/redhat-release 
CentOS release 5.3 (Final)
$ uname -a
Linux proxy.sc.com 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009
i686 i686 i386 GNU/Linux
$ python -c "import sys; print sys.version"
2.4.3 (#1, Jan 21 2009, 01:10:13) 
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)]

I don't think it's related to dns-python(that's why I am posting it
here) but for reference the version used is 1.7.1.


The timestamps in stdout.log and strace.log clearly show the slowdown:

# strace.log
18:18:53 ioctl(6, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfac06b0) = -1 EINVAL
(Invalid argument)
18:18:53 mmap2(NULL, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7e4f000
18:18:53 read(6, "F\t\262\276\261s\223I"..., 4096) = 8
18:19:01 read(6, ")v\244\36\v=U\336"..., 4096) = 8
18:19:11 close(6)   = 0
18:19:11 munmap(0xb7e4f000, 4096)   = 0
18:19:11 gettimeofday({1253891951, 431529}, NULL) = 0

# stdout.log
18:18:53  dns.entropy
18:18:53  time
18:19:11  hashlib
18:19:11  _hashlib

--
components: Library (Lib)
files: dns-test.tar.gz
messages: 93108
nosy: ndyankov
severity: normal
status: open
title: importing of "time" module is terribly slow
type: behavior
versions: Python 2.4, Python 2.5
Added file: http://bugs.python.org/file14972/dns-test.tar.gz

___
Python tracker 
<http://bugs.python.org/issue6993>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Nikolay Dyankov

Nikolay Dyankov  added the comment:

Stupid me :))
I must have really missed that.

Still I don't understand why the read call takes 10 seconds to complete.

--
status: pending -> open

___
Python tracker 
<http://bugs.python.org/issue6993>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue6993] importing of "time" module is terribly slow

2009-09-25 Thread Nikolay Dyankov

Nikolay Dyankov  added the comment:

OK, I found the reason and it is the very fact of using /dev/random
which would block if there aren't enough random numbers in queue.
Maybe dns-python should be using /dev/urandom instead (though there
might be reasons for not doing so).

The mystery is revealed.
I am closing the bug.
:)

--
status: open -> closed

___
Python tracker 
<http://bugs.python.org/issue6993>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-01-31 Thread Nikolay Kim

Nikolay Kim added the comment:

madis-data.ncep.noaa.gov side does not complete ssl shutdown process.

--
keywords: +patch
nosy: +fafhrd91
Added file: http://bugs.python.org/file46474/ssl_shutdown_timeout.patch

___
Python tracker 
<http://bugs.python.org/issue29406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers

2017-01-31 Thread Nikolay Kim

Changes by Nikolay Kim :


--
versions: +Python 3.6

___
Python tracker 
<http://bugs.python.org/issue29406>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21436] Consider leaving importlib.abc.Loader.load_module()

2014-10-15 Thread Nikolay Bryskin

Changes by Nikolay Bryskin :


--
nosy: +nikicat

___
Python tracker 
<http://bugs.python.org/issue21436>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue21235] importlib's spec module create algorithm is not exposed

2014-10-15 Thread Nikolay Bryskin

Changes by Nikolay Bryskin :


--
nosy: +nikicat

___
Python tracker 
<http://bugs.python.org/issue21235>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16099] robotparser doesn't support request rate and crawl delay parameters

2015-10-07 Thread Nikolay Bogoychev

Nikolay Bogoychev added the comment:

Hey,

Friendly reminder that there has been no activity on this issue for more than 
an year.

Cheers,

Nick

--

___
Python tracker 
<http://bugs.python.org/issue16099>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32693] os.path.ismount does not accept bytes objects

2018-01-28 Thread Nikolay Aleksandrovich Pavlov

New submission from Nikolay Aleksandrovich Pavlov :

According to the documentation it ought to accept any path-like object, but 
actually throws for bytes ones. The trace of logic is the following:

1. ismount() from Lib/ntpath.py is using `os.fpath` which may return either 
bytes or str: 
https://github.com/python/cpython/blob/255f7a26da47ca6b7bd1d375b8a04920f68c119c/Lib/ntpath.py#L263.
2. The output is passed to _getvolumepathname unchanged.
3. The clinic defines that function’s only argument as 
[unicode](https://github.com/python/cpython/blob/255f7a26da47ca6b7bd1d375b8a04920f68c119c/Modules/posixmodule.c#L3793).
4. If clinic was not there it would still require to change how path_wchar is 
defined below, PyUnicode… functions will not accept bytes object: 
https://github.com/python/cpython/blob/255f7a26da47ca6b7bd1d375b8a04920f68c119c/Modules/posixmodule.c#L3808.

Suggestion: change `Lib/ntpath.py` to use `os.fsdecode` in place of `os.fspath`.

This is a relay of issue https://github.com/powerline/powerline/issues/1876. 
Initial reporter observed bug on Python 3.6 (patch unknown), I could see an 
issue in current master (all links above point to that).

--
components: Windows
messages: 310936
nosy: Nikolay Aleksandrovich Pavlov, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: os.path.ismount does not accept bytes objects
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 
<https://bugs.python.org/issue32693>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com