[issue41026] mailbox does not support new Path object

2020-06-18 Thread Laurence


New submission from Laurence :

The mailbox library, in particular the Mailbox class I'm using, does not 
support the new Path object requiring a clumsy `mbx = 
Maildir(str(some_path_obj))` to use with a Path instance.

It currently blows up if passed a Path directly (does not support startswith) - 
perhaps a simple solution is to coerce whatever is passed into a string inside 
`__init__`?

Could this support be added?

I feel that strings representing paths should be discouraged as a general 
principal now we have a truly portable object to represent paths, and 
supporting Path in all places it makes logical sense (without breaking 
backwards compatibility, if implemented as I suggest with coercion by 
`str(...)` inside the module) in the core library seems like a good thing to me.

--
components: Library (Lib)
messages: 371823
nosy: LimaAlphaHotel
priority: normal
severity: normal
status: open
title: mailbox does not support new Path object
type: enhancement

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



[issue41026] mailbox does not support new Path object

2020-06-18 Thread Laurence


Laurence  added the comment:

Sorry, should read "in particular the Maildir class I'm using"...

Same applies to mbox, however.

--

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



[issue41026] mailbox does not support new Path object

2020-06-19 Thread Laurence

Laurence  added the comment:

Hi Rémi,

I understand why it is the case, I just thought it would be a nice enhancement 
and quick win to add the support.

RE "you should use os.fspath() instead of str()": I'm following in the pathlib 
docuementation (https://docs.python.org/3/library/pathlib.html):

> The string representation of a path is the raw filesystem path itself (in 
> native form, e.g. with backslashes under Windows), which you can pass to any 
> function taking a file path as a string:
> >>>
> >>> p = PurePath('/etc')
> >>> str(p)
> '/etc'
> >>> p = PureWindowsPath('c:/Program Files')
> >>> str(p)
> 'c:\\Program Files'

Is the pathlib documentation wrong/out-of-date?  I Googled your suggestion of 
`os.fspath` and found <https://www.python.org/dev/peps/pep-0519/> which reads 
like the pathlib docs need correcting?

I'm trying to setup a build environment to create a PR for this issue as I 
type...

Thanks,

Laurence

--

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



[issue41026] mailbox does not support new Path object

2020-06-19 Thread Laurence


Change by Laurence :


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

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



[issue41026] mailbox does not support new Path object

2020-06-19 Thread Laurence


Laurence  added the comment:

I have patched the module to accept a path-like object, however it still 
follows the pre-pathlib ways of doing things elsewhere.  There's quite a bit of 
work to do to modernise the whole module, but this patch at least adds support 
to pass a Path to the classes it provides so external code can use pathlib and 
interface with it.

--

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



[issue11317] Documentation not updated to show string exceptions have been deprecated

2011-02-25 Thread Laurence Rowe

New submission from Laurence Rowe :

The documentation at 
http://docs.python.org/c-api/exceptions.html#deprecation-of-string-exceptions 
states that "String exceptions are still supported in the interpreter to allow 
existing code to run unmodified, but this will also change in a future 
release." String exceptions were removed in 2.6.

--
assignee: docs@python
components: Documentation
messages: 129353
nosy: docs@python, lrowe
priority: normal
severity: normal
status: open
title: Documentation not updated to show string exceptions have been deprecated
versions: Python 2.6, Python 2.7

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



[issue38305] https://2.python-requests.org/ missing TLS certicate

2019-09-28 Thread Tim Laurence


New submission from Tim Laurence :

I am unsure how to route this given the recent transition of Requests to PSF so 
my apologies if this is the wrong spot.

The page where I think most people look for Requests documentation appears to 
be broken 
  https://2.python-requests.org/

When I look more closely it looks like the server may not have a TLS 
certificate loaded. 

When I connect via http I get a redirection page to 
https://requests.kennethreitz.org/en/master/


Below is a dump of what openssl sees when trying to connect.

===
$ openssl s_client -connect 2.python-requests.org:443
CONNECTED(0005)
4608755308:error:14004438:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert 
internal 
error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/ssl/ssl_pkt.c:1205:SSL
 alert number 80
4608755308:error:140040E5:SSL routines:CONNECT_CR_SRVR_HELLO:ssl handshake 
failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/ssl/ssl_pkt.c:585:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 0 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol  : TLSv1.2
Cipher: 
Session-ID:
Session-ID-ctx:
Master-Key:
Start Time: 1569678290
Timeout   : 7200 (sec)
Verify return code: 0 (ok)
---

--
components: Library (Lib)
messages: 353452
nosy: timdaman
priority: normal
severity: normal
status: open
title: https://2.python-requests.org/ missing TLS certicate

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



[issue19008] tkinter: UnboundLocalError: local variable 'sys' referenced before assignment

2013-09-13 Thread Laurence McGlashan

New submission from Laurence McGlashan:

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python2.7/site-packages/sk1/__init__.py", line 21, in 

app.main.main()
  File "/usr/lib64/python2.7/site-packages/sk1/app/main.py", line 150, in main
application = SketchApplication(filename, options.display, 
options.geometry, run_script = options.run_script)
  File "/usr/lib64/python2.7/site-packages/sk1/app/skapp.py", line 155, in 
__init__
TkApplication.__init__(self, screen_name = screen_name, geometry = geometry)
  File "/usr/lib64/python2.7/site-packages/sk1/app/skapp.py", line 60, in 
__init__
self.init_tk(screen_name, geometry)
  File "/usr/lib64/python2.7/site-packages/sk1/app/skapp.py", line 185, in 
init_tk
TkApplication.init_tk(self, screen_name = screen_name, geometry = geometry)
  File "/usr/lib64/python2.7/site-packages/sk1/app/skapp.py", line 63, in 
init_tk
self.root = Tk(screenName = screen_name, baseName = self.tk_basename, 
className = self.tk_class_name)
  File "/usr/lib64/python2.7/lib-tk/Tkinter.py", line 1748, in __init__
if not sys.flags.ignore_environment:
UnboundLocalError: local variable 'sys' referenced before assignment


Patch attached.

--
components: Tkinter
files: Tkinter.patch
keywords: patch
messages: 197563
nosy: Laurence.McGlashan
priority: normal
severity: normal
status: open
title: tkinter: UnboundLocalError: local variable 'sys' referenced before 
assignment
versions: Python 2.7
Added file: http://bugs.python.org/file31738/Tkinter.patch

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



[issue19008] tkinter: UnboundLocalError: local variable 'sys' referenced before assignment

2013-09-13 Thread Laurence McGlashan

Changes by Laurence McGlashan :


--
type:  -> crash

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



[issue21159] configparser.InterpolationMissingOptionError is not very intuitive

2016-01-06 Thread Laurence Rowe

Laurence Rowe added the comment:

This change is causing a problem for boto under 3.5.1 (works on 3.5.0):

TypeError: get() got an unexpected keyword argument 'raw'
> /usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/configparser.py(406)_interpolate_some()
-> rawval = parser.get(section, option, raw=True, fallback=rest)

boto bug report: https://github.com/boto/boto/issues/3433

This is because boto is subclassing ConfigParser and its get method does not 
include the raw argument. A quick search shows that this also affects Kazam am 
circus.

Circus fixed it by adding **kwargs to the method. 
https://github.com/circus-tent/circus/commit/d0d2ac4fd843bb9f050a8c678956fe3682371001

--
nosy: +lrowe

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



[issue24425] Installer Vender Issue

2015-06-25 Thread John Laurence Poole

John Laurence Poole added the comment:

I attempted to install on Windows Server 2008 R2 Service Pack 1 and had the 
same problems.  I thought it might be proxy since I'm behind a firewall, but 
setting the usual values did not allow the program to overcome whatever it is 
that PIP is having problems with.

here's the log at the failure point:
MSI (s) (2C:BC) [11:10:26:806]: Executing op: CacheSizeFlush(,)
MSI (s) (2C:BC) [11:10:26:806]: Executing op: ActionStart(Name=UpdatePip,,)
Action 11:10:26: UpdatePip. 
MSI (s) (2C:BC) [11:10:26:809]: Executing op: 
CustomActionSchedule(Action=UpdatePip,ActionType=3090,Source=C:\Python27\python.exe,Target=-m
 ensurepip -U --default-pip,)
MSI (s) (2C:BC) [11:10:26:812]: Note: 1: 1721 2: UpdatePip 3: 
C:\Python27\python.exe 4: -m ensurepip -U --default-pip 
MSI (s) (2C:BC) [11:10:26:812]: Note: 1: 2262 2: Error 3: -2147287038 
Error 1721. There is a problem with this Windows Installer package. A program 
required for this install to complete could not be run. Contact your support 
personnel or package vendor. Action: UpdatePip, location: 
C:\Python27\python.exe, command: -m ensurepip -U --default-pip 
MSI (s) (2C:BC) [11:10:30:520]: Note: 1: 2262 2: Error 3: -2147287038 
MSI (s) (2C:BC) [11:10:30:520]: Product: Python 2.7.10 (64-bit) -- Error 1721. 
There is a problem with this Windows Installer package. A program required for 
this install to complete could not be run. Contact your support personnel or 
package vendor. Action: UpdatePip, location: C:\Python27\python.exe, command: 
-m ensurepip -U --default-pip 

Action ended 11:10:30: InstallFinalize. Return value 3.

To get this to install, during the installation, disengage entirely PIP, it's 
default is to install it.

--
nosy: +John Laurence Poole

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