[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

This looks to work correctly in default branch,

 os.link('non-existent-name', 'new-name')
Traceback (most recent call last):
  File stdin, line 1, in module
FileNotFoundError: [WinError 2] The system cannot find the file specified: 
'non-existent-name'

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16812
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16812] os.symlink can return wrong FileExistsError/WindowsError information

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

Behavior for symlink is as follows

 os.symlink('non-existent-name', 'existing-name')
Traceback (most recent call last):
  File stdin, line 1, in module
PermissionError: [WinError 5] Access is denied: 'non-existent-name'

The error message is misleading, but can be fixed using the patch attached to 
issue13775

 os.symlink('non-existent-name1', 'non-existent-name2')
No error. This behavior is same on Windows and Linux. Seems odd, but can be 
justified as ok behavior.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16812
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17627] Datetime and time doesn't update timezone in a running Win app

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

This is the same as issue10634

Problem is with the Windows CRT implementation of localtime which does not seem 
to be using updated timezone information.

Can this become an issue with technologies like vMotion which allow Live 
Migration of virtual servers across data centers in different timezones?

One way to address maybe to somehow reset the CRT timezone structures on 
Windows prior to a call to localtime. Does this seem like a good approach? Is 
the issue worth pursuing?

--
nosy: +sijinjoseph
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17627
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17627] Datetime and time doesn't update timezone in a running Win app

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

Some more links discussing similar issues
http://www.sourceware.org/bugzilla/show_bug.cgi?id=154 - tzset not called 
frequently enough by localtime() and friends

http://stackoverflow.com/questions/12150651/library-code-for-dynamically-reloading-the-usr-share-zoneinfo-database
 - Workaround in linux for reloading timezone info



http://msdn.microsoft.com/en-US/library/90s5c885(v=vs.100).aspx - Microsoft CRT 
documentation for _tzset function, which can be called to reset timezone info.



Another possible fix, could be to add an overload for the functions to force 
reloading of the timezone info.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17627
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue16273] f.tell() returning negative number on Windows build

2013-04-13 Thread Sijin Joseph

Sijin Joseph added the comment:

Attaching a patch with a doc update to the tutorial, specifying that

1. The return value from f.tell is an opaque number for text files.
2. When seeking using text files the offset value needs to come from f.tell(). 
http://docs.python.org/3.4/library/io.html#io.TextIOBase.seek

--
keywords: +patch
nosy: +sijinjoseph
Added file: http://bugs.python.org/file29823/16273-doc-update.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue16273
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue17618] base85 encoding

2013-04-07 Thread Sijin Joseph

Sijin Joseph added the comment:

Is anyone working on this? I'd like to include this in a CPython sprint @MIT on 
4/13.

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17618
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12018] No tests for ntpath.samefile, ntpath.sameopenfile

2011-05-16 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy:  -sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12018
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12045] external shell command executed twice in ctypes.util._get_soname

2011-05-16 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy:  -sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12045
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11882] test_imaplib failed on x86 ubuntu

2011-05-16 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy:  -sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12034] check_GetFinalPathNameByHandle() suboptimal

2011-05-16 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Is this related to some other issue? The fix seems trivial, however I am 
curious as to how you stumbled upon this?

Is there more to this issue than just performance?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12034
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12045] external shell command executed twice in ctypes.util._get_soname

2011-05-16 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Attaching patch.

Removed the second call to os.popen and used the dump variable that was read 
earlier as the argument to re.search.

--
keywords: +patch
nosy: +sijinjoseph
Added file: http://bugs.python.org/file22010/12045.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12045
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12018] No tests for ntpath.samefile, ntpath.sameopenfile

2011-05-11 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12018
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12034] check_GetFinalPathNameByHandle() suboptimal

2011-05-11 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12034
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11882] test_imaplib failed on x86 ubuntu

2011-05-11 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11882
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12045] external shell command executed twice in ctypes.util._get_soname

2011-05-11 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12045
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8808] imaplib should support SSL contexts

2011-05-02 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Thanks Antoine. I've attached an updated patch. 

 
- the keyfile / certfile pair and the context parameter should be mutually 
exclusive (see e.g. the POP3_SSL constructor in Lib/poplib.py)
[Sijin] - Yes, Thanks, I don't know why I didn't check POP3 impl before.

- I don't think the remote test server used in test_imaplib supports client 
certificates, it probably just ignores them; that said, it's better than nothing
[Sijin] - Agreed, I don't think the server supports client certificates, but at 
least we are able to test that the connect still works. Maybe we should open a 
new task to have a remote server that supports client certificate connections? 
We could use that in test cases for other SSL related modules.

- you have a misindented line in test_logincapa
[Sijin] - Fixed.

- since we're using a remote, third-party test server, it may be better not to 
do any spurious connects (in the current patch, a first connection is 
established in the setUp() and then ignored since another one is established in 
the test body)
[Sijin] - Fixed.

- you need to update the documentation in Doc/library/imaplib.rst
[Sijin] - Done. Also added some corresponding info in the poplib and docs for 
poplib.

--
Added file: http://bugs.python.org/file21863/8808.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8808
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11620] winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings

2011-04-28 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11620
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11927] SMTP_SSL doesn't use port 465 by default

2011-04-27 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Should we add a unit test for this as well?

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11927
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8808] imaplib should support SSL contexts

2011-04-27 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

I am attaching a patch for the default branch that adds a ssl_context parameter 
to IMAP4_SSL. Also added a couple of tests to test_imaplib to test the existing 
ctor with certfile and file and also the new one that accepts an SSLContext.

Currently if the ssl_context param is provided then the keyfile and certfile 
are ignored, I wasn't sure if the ssl_context should be loaded with the 
certfile if that is provided along with the ssl_context.

If this looks ok, I can add something similar for smtplib as well.

--
keywords: +patch
Added file: http://bugs.python.org/file21810/8808.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8808
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11926] help(keywords) returns incomplete list of keywords

2011-04-26 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Should True, False and None be keywords? Technically True and False are objects 
of type bool, in fact the only objects of that type allowed. And None is a 
specially designated object as well.

P.S: Can anyone point me to where the help function is defined in the source?

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11926
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11926] help(keywords) returns incomplete list of keywords

2011-04-26 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

@Ezio - help(True), help(False) and help(None) all return the correct 
documentation for me using latest trunk. I think the quotes around True, False 
and None might be throwing things off in your case.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11926
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-26 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

@Amaury - That sounds exactly like the issue described.

To summarize the error is caused because in some versions of windows there is a 
bug that causes the handles to stdin/stdout to not be inherited correctly for 
apps run from the console via file association.

This is the kb article, http://support.microsoft.com/default.aspx?kbid=321788

In fact looks like this issue was discussed in the Python mailing list in 2004 
as well, see 
http://mail.python.org/pipermail/python-bugs-list/2004-August/024923.html

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10616] Change PyObject_AsCharBuffer() error message

2011-04-25 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Looking at object.h the buffer interface is defined as 

/* buffer interface */
typedef struct bufferinfo {
void *buf;
PyObject *obj;/* owned reference */
Py_ssize_t len;
Py_ssize_t itemsize;  /* This is Py_ssize_t so it can be
 pointed to by strides in simple case.*/
int readonly;
int ndim;
char *format;
Py_ssize_t *shape;
Py_ssize_t *strides;
Py_ssize_t *suboffsets;
Py_ssize_t smalltable[2];  /* static store for shape and strides of
  mono-dimensional buffers. */
void *internal;
} Py_buffer;

typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
typedef void (*releasebufferproc)(PyObject *, Py_buffer *);

typedef struct {
 getbufferproc bf_getbuffer;
 releasebufferproc bf_releasebuffer;
} PyBufferProcs;

The code that's throwing that error looks like

if (pb == NULL || pb-bf_getbuffer == NULL) {
PyErr_SetString(PyExc_TypeError,
expected an object with the buffer interface);

I would argue that the error message gives appropriate information because it 
is expecting the object to have a bf_getbuffer member.

Maybe the friendly error message is best handled at a higher level?

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10616
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11901] Docs for sys.hexversion should give the algorithm

2011-04-25 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Patch attached.

--
keywords: +patch
nosy: +sijinjoseph
Added file: http://bugs.python.org/file21774/11901.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11901
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11901] Docs for sys.hexversion should give the algorithm

2011-04-25 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


Removed file: http://bugs.python.org/file21774/11901.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11901
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11901] Docs for sys.hexversion should give the algorithm

2011-04-25 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Fixed minor typo.

--
Added file: http://bugs.python.org/file21775/11901.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11901
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue8808] imaplib should support SSL contexts

2011-04-25 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Is anyone working on this?

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8808
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9390] Error in sys.excepthook on windows when redirecting output of the script

2011-04-25 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

I was not able to reproduce this on Python 2.7 x64 or Python 3.2 x64 on Win 7 
SP1.

I am curious what the output is if you just run test.py, do you still get an 
error?

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9390
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-04-25 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11893] Obsolete SSLFakeFile in smtplib?

2011-04-25 Thread Sijin Joseph

Changes by Sijin Joseph sijinjos...@gmail.com:


--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11893
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue9035] os.path.ismount on windows doesn't support windows mount points

2011-04-25 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

I'd like to add the win_ismount function mentioned by Tim. Is anyone else 
working on this presently?

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9035
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result

2011-04-18 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

From reading http://support.microsoft.com/kb/899147 it does look like the .dll 
extension needs to have the Read  Execute permission in order to have code 
from the .dll be executed. It's odd that there isn't documentation that's 
easily searchable to confirm this.

Also what about scripts, .vbs, .ps1 etc. Should those be considered executables 
as well?

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10888
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7806] httplib.HTTPConnection.getresponse closes socket which destroys the response

2010-02-01 Thread Sijin Joseph

Sijin Joseph sijinjos...@gmail.com added the comment:

Looking at the code in httplib it seems that response.will_close is set under 
the following circumstances,

1. HTTP version is 0.9
2. HTTP response header connection is set to close
3. Non-chunked content with a length of zero

This suggests that the underlying socket closure is valid under the conditions 
and that a subsequent response.read() should not be returning  any content.

If you think this is still an issue, I'd suggest that you create a small 
example client/server script that

Client:
1. Opens a HTTP connection
2. Continues to read data from it and dumps it to the console.

Server:
1. Setup a script that does not close incoming HTTP connection requests and 
continues to keep sending data back to the client.

--
nosy: +sijinjoseph

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7806
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com