| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@ankostis Totally awesome ! Even though I won't be of much help, I do hope that fixing the windows issues work out in the end. That would restore windows platform support and keep it, after all these years of supporting it just on a best-effort basis, which meant not to obviously use non-windows APIs. |
Sorry, something went wrong.
+ Del extra spaces, import os.path as osp
|
Yes, that's a start. |
Sorry, something went wrong.
|
@Byron the git.testtest_git:TestGit.test_handle_process_output() TC hangs almost on every combination under Windows. |
Sorry, something went wrong.
+ Pump once, so when input larger than `mmap.PAGESIZE`, stream is not emptied.
+ Pump once, so when input larger than `mmap.PAGESIZE`, stream is not emptied.
+ Pump once, so when input larger than `mmap.PAGESIZE`, stream is not emptied.
+ Pump code reads only once streams per `_read_lines_from_fno()` invocation, so when input larger than `mmap.PAGESIZE`, bytes are forgotten in the stream.
+ The code in `_read_lines_from_fno()` was reading the stream only once per invocation, so when input was larger than `mmap.PAGESIZE`, bytes were forgotten in the stream. + Also set deamon-threads.
+ The code in `_read_lines_from_fno()` was reading the stream only once per invocation, so when input was larger than `mmap.PAGESIZE`, bytes were forgotten in the stream. + Replaced buffer-banging code with iterate-on-file-descriptors. + Also set deamon-threads.
+ The code in `_read_lines_from_fno()` was reading the stream only once per invocation, so when input was larger than `mmap.PAGESIZE`, bytes were forgotten in the stream. + Replaced buffer-building code with iterate-on-file-descriptors. + Also set deamon-threads.
|
@Byron that was a tough one! I replaced the buffer-assembly code with iterate-on-file-descriptors. Actually the code is so simple that it maybe worth to replace the select-poll with the 2-pumps code, for all OSs? Many more bugs remain in Windows, but no hangs. A side question:
Is that possible? I would expect any language allowing such "gap" to be considered outright broken. |
Sorry, something went wrong.
…`assertRaisesRegexp`
…`assertRaisesRegexp`
+ Extract util-method to delete lock-files, also on Windows (will be needed by TCs).
+ Modify lock/read-config-file code to ensure files closed. + Use `with GitConfigarser()` more systematically in TCs. + Clear any locks left hanging from prev Tcs. + Util: mark lock-files as SHORT_LIVED; save some SSDs...
|
@ankostis Incredible work you are doing here ! Me not replying most of the time is merely an indication of me not touching the keyboard after work, so replies have to wait for the weekend. That said, I will try to address as much as possible, and in case I forget anything, please feel free to point me to it one more time.
I believe that is just me being paranoid, and considering that the internet doesn't know this issue, it probably just doesn't exist. Maybe you could delete that comment, while you are at it.
Without having had a look at the code, I may state that it must be possible to fetch data from stdout and stderr concurrently, if both channels are open. Otherwise you might see that blocking behaviour, which has bitten me in the past. If that would indeed be the case, I'd be fine with it. However, the only ways I could think of either was select/poll or threading.
Yes, please go ahead ! Everything that makes the code more idiomatic is appreciated !
Thanks for figuring this out ! As always, much appreciated :) !
Referring back to the select/poll vs Threading argument I made: Considering the added maintenance effort for having two versions of that, along with the relative rarity of doing a pull/push in the average use case, one might indeed choose to prefer using the threaded pumps instead. I will trust your expertise entirely with this one, so please feel free to remove the alternative code-path as you see fit. @ankostis You have been relentlessly working on getting this fixed, and I hope to soon have it all green on AppVeyor. It will hardly be possible to give you all the credit you deserve, but if you are interested, I would gladly make you a contributor. This could also include becoming a maintainer on Pypi to allow you pushing builds yourself. Just let me know, and I will make it happen. |
Sorry, something went wrong.
|
Thank you for your offer to become contributor, I'm honored. Unfortunately I cannot promise that I will be contributing to the project in the future; usually we are always late for deadlines :-( Regarding the thread-pump, the situation is not satisfying, both alternatives (threading, select/poll) suffer from a race condition if the python code is not absorbing data fast enough from all pipes. Threading is not enough because of how PIPE for `stdin/stderr interact with the GIL and the buffers available. In order not to rely on python's buffers, we better use Queues. But that can wait. |
Sorry, something went wrong.
|
That's good enough ! I'd be happy already if you can have an eye out on the windows side of things, as you seem to have larger stakes in it than most others. PS: You have been invited to become a contributor/maintainer. |
Sorry, something went wrong.
+ FIX TestRepo.test_submodule_update(): + submod: del `.git` file prior overwrite; Windows denied otherwise! + FIX TestRepo.test_untracked_files(): + In the `git add <file>` case, it failed with unicode args on PY2. Had to encode them with `locale.getpreferredencoding()` AND use SHELL. + cmd: add `shell` into `execute()` kwds, for overriding USE_SHELL per command. + repo: replace blocky `communicate()` in `_clone()` with thread-pumps. + test_repo.py: unittestize (almost all) assertions. + Replace open --> with open for index (base and TC). + test_index.py: Enabled a dormant assertion.
|
Reporting progress so far; strangely, almost all of the problems fixed below did not appear in Appveyor:
Generic changes
Apveyor results
Site RegressionUnfortunately, building site started to fail on Travis - but has nothing to do with my changes. $ if [ "$TRAVIS_PYTHON_VERSION" == '3.5' ]; then cd doc && make html; fi
mkdir -p build/html build/doctrees
sphinx-build -b html -d build/doctrees source build/html
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.5.2/bin/sphinx-build", line 11, in <module>
sys.exit(main())
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/sphinx/__init__.py", line 51, in main
sys.exit(build_main(argv))
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/sphinx/__init__.py", line 61, in build_main
from sphinx import cmdline
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/sphinx/cmdline.py", line 23, in <module>
from sphinx.application import Sphinx
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/sphinx/application.py", line 38, in <module>
from sphinx.environment import BuildEnvironment
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/sphinx/environment.py", line 38, in <module>
from sphinx.io import SphinxStandaloneReader, SphinxDummyWriter, SphinxFileInput
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/sphinx/io.py", line 16, in <module>
from sphinx.transforms import ApplySourceWorkaround, ExtraTranslatableNodes, Locale, \
ImportError: cannot import name 'Locale'
make: *** [html] Error 1
|
Sorry, something went wrong.
|
Here is a patch that resolves the merge conflict. In case you didn't fix it already, please feel free to apply it. Detailscommit 5aba04fbb615310c6cab38abe901f5147f0caec1
Merge: 4592785 3959556
Author: Sebastian Thiel <byronimo@gmail.com>
Date: Sat Oct 1 17:29:18 2016 +0200
Merge branch 'appveyor' of https://github.com/ankostis/GitPython into ankostis-appveyor
diff --cc setup.py
index 35b1115,2e8ee52..ff34885
--- a/setup.py
+++ b/setup.py
@@@ -70,24 -68,11 +70,27 @@@ def _stamp_version(filename)
print("WARNING: Couldn't find version line in file %s" % filename, file=sys.stderr)
install_requires = ['gitdb >= 0.6.4']
+extras_require = {
+ ':python_version == "2.6"': ['ordereddict'],
+}
+
+try:
+ if 'bdist_wheel' not in sys.argv:
+ for key, value in extras_require.items():
+ if key.startswith(':') and pkg_resources.evaluate_marker(key[1:]):
+ install_requires.extend(value)
+except Exception:
+ logging.getLogger(__name__).exception(
+ 'Something went wrong calculating platform specific dependencies, so '
+ "you're getting them all!"
+ )
+ for key, value in extras_require.items():
+ if key.startswith(':'):
+ install_requires.extend(value)
- # end
++
+ test_requires = ['node', 'ddt']
+ if sys.version_info[:2] < (2, 7):
- install_requires.append('ordereddict')
+ test_requires.append('mock')
-# end
setup(
name="GitPython",
|
Sorry, something went wrong.
|
@ankostis By the way, what do you think about an intermediate merge ? You could start out freshly on a new PR then for the last meters, while greatly reducing the risk of merge-conflicts. |
Sorry, something went wrong.
|
Merged it. @Byron practically there are 3 error remaining, and I believe all 3 of them are related to gitdb:
Can you provide any hint on how to resolve them? |
Sorry, something went wrong.
+ Some cases had restructuring of code.
|
@ankostis I agree, the errors you mention seem to be rooted in smmap and would thus have to be fixed there. Especially the one with the incompatible type appears like something that is relatively easy reproduce and fix via smmap. A hint I have not right now, just because it was years ago that I have touched the project for the last time. However, I could believe it is riddled with resource-related issues as I was banking on deterministic destructors back then. For now I will just merge the PR and try to setup the appveyor hooks. Maybe as a contributor, you can even do that yourself in case it doesn't work for me. |
Sorry, something went wrong.
|
Just pushed one last commit with those 3 TCs appropriately skipped.
Actually quite the contrary: I can only reproduce it when i run the full harness; if i launch these 2 TCs alone, they pass! So practically, I cannot enter debug-mode - I have to wait 2' just to reach this point.
Have not received an invitation yet. |
Sorry, something went wrong.
|
I have just re-invited you, maybe it comes through. Otherwise you would just have to visit https://github.com/gitpython-developers to see the invitation. Your last commit was not part of my merge, I will fetch it separately. |
Sorry, something went wrong.
|
@ankostis I think it worked ! The last commit has been cherry-picked and AppVeyor is on its way to all-green ! Even though it's not the real thing just yet, I call it an impressive piece of work! Thanks so much ! Right now I wouldn't know how to tackle the smmap issue, just as it's hard to fix anything in a project that is installed as a dependency. Probably it would be easiest if it would be reproducible locally, which I can't even do. |
Sorry, something went wrong.
|
@Byron many of the fixes in this PR can be applied also on gitdb, and as you said (haven't checked) on smmp. Is there a chance to tackle these issues in these projects? Or are they "frozen" somehow? I mean, a lot of problems just go away if resource classes are retrofitted as with .... context resources - but this means API forward compatibility is broken for future clients (existing code should work with the modified libs though). What do you think, is it worth the effort (but cna't promise anything)? |
Sorry, something went wrong.
|
For reference, reporting the CORRECT Appveyor results after #521 fixes by yarikoptic & ankostis restored skipped TCs: PY27: 5 errors: |
Sorry, something went wrong.
|
@ankostis With the latest upgrade of gitdb and smmap to 2.0, it's finally possible again to make new releases. This would allow the changes you talk about to be retro-fitted indeed, and given all the subtle problems GitPython has, it would certainly be worth doing that. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
+Rework GitCommandError.str() and add TCs on unicode handling.
Must encode them with locale.getpreferredencoding() AND use SHELL.
command.
Apveyor results