[issue46487] `_SSLProtocolTransport` doen't have the `get_write_buffer_limits` implementation.

2022-01-23 Thread Nova


New submission from Nova :

When calling `get_write_buffer_limits` on a SSL transport the following 
exception is raised:

```py
Traceback (most recent call last):
  File "/home/mooncell/works/test.py", line 26, in 
asyncio.run(main())
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 641, in 
run_until_complete
return future.result()
  File "/home/mooncell/works/test.py", line 24, in main
print(transport.get_write_buffer_limits())
  File "/usr/lib/python3.10/asyncio/transports.py", line 306, in 
get_write_buffer_limits
return (self._low_water, self._high_water)
AttributeError: '_SSLProtocolTransport' object has no attribute '_low_water'. 
Did you mean: '_high_water'?
```

We looked into the implementation and found out that `_SSLProtocolTransport` 
didn't override the `_FlowControlMixin.get_write_buffer_limits`.

--
components: asyncio
messages: 411382
nosy: asvetlov, mooncell07, yselivanov
priority: normal
severity: normal
status: open
title: `_SSLProtocolTransport` doen't have the `get_write_buffer_limits` 
implementation.
type: enhancement
versions: Python 3.10

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-01-23 Thread Nova


Change by Nova :


--
title: `_SSLProtocolTransport` doen't have the `get_write_buffer_limits` 
implementation. -> `_SSLProtocolTransport` doesn't have the 
`get_write_buffer_limits` implementation.

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-01-26 Thread Nova


Change by Nova :


--
versions: +Python 3.11, Python 3.7, Python 3.8, Python 3.9

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-01-26 Thread Nova


Nova  added the comment:

Hey Andrew, thanks for the reply! 

> Would you prepare a pull request?

Sure.

> ... and documenting the change.

Apparently `WriteTransport.get_write_buffer_limits` is already documented 
(https://docs.python.org/3/library/asyncio-protocol.html#asyncio.WriteTransport.get_write_buffer_limits)
 

so please can you clarify on what did you mean by that? 

I am sorry this is my first time here.

--

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-01-27 Thread Nova


Change by Nova :


--
keywords: +patch
pull_requests: +29137
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30958

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



[issue39475] window.getmaxyx() doesn't return updated height when window is resized

2020-01-28 Thread nova


New submission from nova :

Package : python(v3.6.9)
Severity: normal

When a window object has been created using curses.newwin(), increasing
the terminal size produces the KEY_RESIZE events, but getmaxyx() returns
the previous terminal size. Only by decreasing the terminal size does it
return the correct terminal dimensions.

Attachment includes:
1. video demonstrating the effect

Following is the script to reproduce the effect:

import curses

def init_curses():
curses.initscr()
window = curses.newwin(curses.LINES - 1, curses.COLS, 0, 0)

# window = curses.initscr()

curses.raw()
curses.noecho()
curses.cbreak()
window.keypad(True)

return window

def restore_terminal(window):
curses.noraw()
curses.nocbreak()
window.keypad(False)
curses.echo()
curses.endwin()

def main():
try:
window = init_curses()
resize_no = 0
maxy, maxx = window.getmaxyx()

dimension_string = "resize_no: " + str(resize_no) + ". maxy: " + 
str(maxy) + "; maxx: " + str(maxx) + '\n'
window.addstr(dimension_string)

while True:
ch = window.getch()
window.clear()

if ch == curses.KEY_RESIZE:
resize_no += 1

maxy, maxx = window.getmaxyx()
dimension_string = "resize_no: " + str(resize_no) + ". maxy: " 
+ str(maxy) + "; maxx: " + str(maxx) + '\n'
window.addstr(dimension_string)


finally:
restore_terminal(window)

if __name__ == '__main__':
main()

--
components: Extension Modules
files: bug_curses.mp4
messages: 360849
nosy: nova
priority: normal
severity: normal
status: open
title: window.getmaxyx() doesn't return updated height when window is resized
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file48868/bug_curses.mp4

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