Commit Graph

14 Commits

Author SHA1 Message Date
Berker Peksag 8d9bb11d8f
bpo-28334: netrc() now uses expanduser() to find .netrc file (GH-4537)
Previously, netrc.netrc() was raised an exception if $HOME is not set.

Authored-By: Dimitri Merejkowsky <dimitri.merejkowsky@tanker.io>
2017-11-25 13:37:22 +03:00
James Sexton b24cd055ec bpo-30806 netrc.__repr__() is broken for writing to file (GH-2491)
netrc file format doesn't support quotes and escapes.

See https://linux.die.net/man/5/netrc
2017-09-30 16:10:31 +09:00
R David Murray 104aab956f #14984: On POSIX, enforce permissions when reading default .netrc.
Initial patch by Bruno Piguet.

This is implemented as if a useful .netrc file could exist without passwords,
which is possible in the general case; but in fact our netrc implementation
does not support it.  Fixing that issue will be an enhancement.
2013-09-17 20:30:02 -04:00
Benjamin Peterson 1df0f214a9 fix regression in netrc comment handling (closes #12009) 2011-06-10 11:32:52 -05:00
R. David Murray 78a1a15c20 Merged revisions 86925 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86925 | r.david.murray | 2010-12-01 21:58:07 -0500 (Wed, 01 Dec 2010) | 4 lines

  #10464: fix netrc handling of lines with embedded '#" characters.

  Patch by Xuanji Li.
........
2010-12-02 03:10:43 +00:00
Georg Brandl ab91fdef1f Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line

  convert old fail* assertions to assert*
........
2009-08-13 08:51:18 +00:00
Benjamin Peterson ee8712cda4 #2621 rename test.test_support to test.support 2008-05-20 21:35:26 +00:00
Guido van Rossum c12a813aa7 Patch # 1331 by Christian Heimes.
The patch fixes some of the problems on Windows. It doesn't introduce
addition problems on Linux.
2007-10-26 04:29:23 +00:00
Jason Tishler 0fd54d8050 Unconditionally opening the temp file in text mode causes this test to fail
under Cygwin. The attached patch corrects this problem.

I tested this patch under Red Hat Linux 8.0 too.
2003-08-11 12:13:14 +00:00
Neal Norwitz 996acf122d Actually run these tests from regrtest.py.
There was no test_main() and the main body was protected
by if __name__ == '__main__' so the test didn't happen
on import either.
2003-02-17 14:51:41 +00:00
Guido van Rossum 3b0a3293c3 Massive changes from SF 589982 (tempfile.py rewrite, by Zack
Weinberg).  This changes all uses of deprecated tempfile functions to
the recommended ones.
2002-08-09 16:38:32 +00:00
Barry Warsaw 04f357cffe Get rid of relative imports in all unittests. Now anything that
imports e.g. test_support must do so using an absolute package name
such as "import test.test_support" or "from test import test_support".

This also updates the README in Lib/test, and gets rid of the
duplicate data dirctory in Lib/test/data (replaced by
Lib/email/test/data).

Now Tim and Jack can have at it. :)
2002-07-23 19:04:11 +00:00
Tim Peters 863ac44b74 Whitespace normalization. 2002-04-16 01:38:40 +00:00
Andrew M. Kuchling 76fffd81e9 Add a simple test suite for netrc.py, and remove it from test_sundry 2002-03-22 02:48:57 +00:00